service.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. <template>
  2. <view class="rf-category">
  3. <!-- <a href="https://www.ciftis.org/cn/xmfb/ysztyz/index.html">进入网上展厅</a> -->
  4. <!-- #ifdef APP-PLUS -->
  5. <!-- <u-button class="btn" @click="Download">下载</u-button> -->
  6. <!-- #endif -->
  7. <view class="dcp-boxTitle">
  8. <text class="text floatLeft">
  9. {{i18n('Service')}}
  10. </text>
  11. <!-- <text class="text floatRight ">
  12. <text class="fa fa-bell-o"></text>
  13. </text> -->
  14. </view>
  15. <view class="dcp-nav">
  16. <view class="dcp-nav-title">
  17. {{i18n('MyService')}}
  18. </view>
  19. <view :class="$i18n.locale=='en'?'font':''">
  20. <view class="mywrap">
  21. <view v-for="(item,index) in initData" class="serviceItems" @click="naviGateTo(item)">
  22. <image class="icon" :src="getUrl(index)" mode="widthFix"></image>
  23. <text
  24. :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n(item.lable)}}</text>
  25. </view>
  26. </view>
  27. <!-- <view v-for="(item,index) in initData" class="serviceItem" @click="naviGateTo(item)">
  28. <image :src="getUrl(index)" style="width: 60upx;height: 60upx;margin: 20upx 10upx;vertical-align: middle;"></image>
  29. <text :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n(item.lable)}}</text>
  30. </view> -->
  31. <!-- 我的报名 -->
  32. <view class="serviceItem" @click="naviGateTo({path: '/pages/service/others/mySignup'})"
  33. v-if="isLogin()">
  34. <image src="@/static/img/server/myServer/new/8.png"
  35. style="width: 60upx;height: 60upx;margin: 20upx 10upx;vertical-align: middle;"></image>
  36. <text
  37. :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n('ApplicationHistory')}}</text>
  38. </view>
  39. <!-- 管理人员可见-会议工作台 -->
  40. <view class="serviceItem" @click="naviGateTo({path: '/pages/workbench/workbench'})" v-if="isAdmin">
  41. <image src="@/static/img/server/myServer/9.png"
  42. style="width: 60upx;height: 60upx;margin: 20upx 10upx;vertical-align: middle;"></image>
  43. <text
  44. :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n('ConferenceWorkbench')}}</text>
  45. </view>
  46. <!-- 志愿者可见 -->
  47. <view class="serviceItem" @click="naviGateTo({path: '/pages/volunteer/volunteer'})" v-if="isVolunteer">
  48. <image src="@/static/img/server/myServer/10.png"
  49. style="width: 60upx;height: 60upx;margin: 20upx 10upx;vertical-align: middle;"></image>
  50. <text
  51. :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n('ConferenceVolunteer')}}</text>
  52. </view>
  53. <!-- 特定人员可见-平台运行日报 -->
  54. <view class="serviceItem" @click="naviGateTo({path: '/pages/service/others/myExportLog'})"
  55. v-if="isCheckLog">
  56. <!-- <view class="serviceItem" @click="naviGateTo({path: '/pages/service/others/myExportLog'})" v-if="true">-->
  57. <image src="@/static/img/server/myServer/11.png"
  58. style="width: 60upx;height: 60upx;margin: 20upx 10upx;vertical-align: middle;"></image>
  59. <text :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n('MyExportLog')}}</text>
  60. </view>
  61. </view>
  62. </view>
  63. <view class="dcp-nav2">
  64. <view class="dcp-nav-title ">
  65. {{i18n('QuickaApplication')}}
  66. </view>
  67. <view class="my-serviceItem2">
  68. <view v-for="(item,index) in application" class="serviceItem2" @click="naviGateTo(item)">
  69. <image :src="getUrl2(index)"
  70. style="display: block; width: 80upx;height: 80upx;margin: 20upx auto 0upx auto;;vertical-align: middle;">
  71. </image>
  72. <text :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n(item.lable)}}</text>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="dcp-nav2">
  77. <view class="dcp-nav-title ">
  78. {{i18n('OtherServices')}}
  79. </view>
  80. <view class="my-serviceItem2">
  81. <view v-for="(item,index) in otherService" class="serviceItem2" @click="naviGateTo(item)">
  82. <image :src="getUrl2(index+3)"
  83. style="display: block; width: 80upx;height: 80upx;margin: 20upx auto 0upx auto;;vertical-align: middle;">
  84. </image>
  85. <text :style="$i18n.locale=='zh'?'font-size:28upx':'font-size:24upx'">{{i18n(item.lable)}}</text>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. </template>
  91. <script>
  92. export default {
  93. data() {
  94. return {
  95. isAdmin: false,
  96. isVolunteer: false,
  97. isCheckLog: false,
  98. initData: [{
  99. imgSrc: '@/static/img/server/myServer/new/1.png',
  100. lable: 'MyApplication',
  101. value: '',
  102. path: '/pages/service/others/myApplication',
  103. // path:'/pages/service/others/myApplication1',
  104. }, {
  105. imgSrc: '@/static/img/server/myServer/new/2.png',
  106. lable: 'MyAttention',
  107. value: '',
  108. path: '/pages/service/others/myfollow',
  109. // path:'/pages/service/others/myApplication1'
  110. }, {
  111. imgSrc: '@/static/img/server/myServer/new/3.png',
  112. lable: 'MyCollection',
  113. value: '',
  114. path: '/pages/service/others/mycollection'
  115. // path:'/pages/service/others/myApplication1'
  116. }, {
  117. imgSrc: '@/static/img/server/myServer/new/4.png',
  118. lable: 'MyActivities',
  119. value: '',
  120. path: "/pages/service/others/myactivity"
  121. // path:'/pages/service/others/myApplication1'
  122. }, {
  123. imgSrc: '@/static/img/server/myServer/new/5.png',
  124. lable: 'Interactive',
  125. path: "/pages/service/others/communication",
  126. // path:'/pages/service/others/myApplication1',
  127. value: ''
  128. },
  129. {
  130. imgSrc: '@/static/img/server/myServer/new/6.png',
  131. lable: 'MyConsultations',
  132. value: '',
  133. path: '/pages/service/others/myadvice'
  134. // path:'/pages/service/others/myApplication1'
  135. },
  136. // {
  137. // imgSrc:'@/static/img/server/myServer/new/7.png',
  138. // lable:'MyResources',
  139. // // value:'/pages/service/others/myApplication1',
  140. // path:'/pages/service/others/myApplication'
  141. // },
  142. ],
  143. application: [{
  144. imgSrc: '@/static/alipay.png',
  145. lable: 'Alliance',
  146. value: '/pages/service/membership/leagueApplication',
  147. path: '/pages/service/membership/leagueApplication'
  148. }, {
  149. imgSrc: '@/static/alipay.png',
  150. lable: 'MemberApply',
  151. value: '/pages/service/membership/index',
  152. path: '/pages/service/membership/index'
  153. // value:'/pages/service/others/myApplication1',
  154. // path:'/pages/service/others/myApplication1'
  155. }, {
  156. imgSrc: '@/static/alipay.png',
  157. lable: 'ApplicationServices',
  158. value: '/pages/service/membership/customServiceApplication',
  159. path: '/pages/service/membership/customServiceApplication'
  160. }],
  161. otherService: [{
  162. imgSrc: '@/static/alipay.png',
  163. lable: 'Help',
  164. // value:'/pages/service/others/myApplication1',
  165. value: '',
  166. path: '/pages/service/others/helpCenter'
  167. // path:'/pages/service/others/myApplication1'
  168. }, {
  169. imgSrc: '@/static/alipay.png',
  170. lable: 'Online',
  171. value: '',
  172. path: '/pages/service/others/onlineService'
  173. // path:'/pages/service/others/myApplication1'
  174. }, {
  175. imgSrc: '@/static/alipay.png',
  176. lable: 'Feedback',
  177. value: '',
  178. path: '/pages/service/others/myFeedback'
  179. }]
  180. };
  181. },
  182. onShow() {
  183. this.isAdminOrVolunteer();
  184. },
  185. computed: {
  186. },
  187. methods: {
  188. i18n(data) {
  189. return this.$t('common.' + data);
  190. },
  191. isLogin() {
  192. let user = uni.getStorageSync('user');
  193. let token = uni.getStorageSync('Auth-Token');
  194. if (user && token) {
  195. return true
  196. } else {
  197. return false
  198. }
  199. },
  200. isAdminOrVolunteer() {
  201. if (this.isLogin()) {
  202. this.$myRequest({
  203. url: '/meeting/meetingCommonQuery/isMeetingAdminByLoginAccount',
  204. data: {
  205. "loginAccount": uni.getStorageSync('loginAccount')
  206. }
  207. }).then(res => {
  208. this.isAdmin = res
  209. });
  210. this.$myRequest({
  211. url: '/meeting/meetingCommonQuery/isVolunteerByLoginAccount',
  212. data: {
  213. "loginAccount": uni.getStorageSync('loginAccount')
  214. }
  215. }).then(res => {
  216. this.isVolunteer = res
  217. });
  218. this.$myRequest({
  219. url: '/op/fileDownloadPermissions/getPermission',
  220. data: {
  221. "loginAccount": uni.getStorageSync('loginAccount')
  222. }
  223. }).then(res => {
  224. this.isCheckLog = res.data
  225. });
  226. }
  227. },
  228. getUrl(index) {
  229. // return request(data);
  230. return require('@/static/img/server/myServer/new/' + Number(index + 1) + '.png');
  231. },
  232. getUrl2(index) {
  233. // return request(data);
  234. return require('@/static/img/server/servers/new/' + Number(index + 1) + '.png');
  235. },
  236. Download() {
  237. uni.downloadFile({
  238. url: 'https://www.geidcp.com/api/file/pub/project/2020/10/13/5b2fc013140e44e7a74711650079276d.pdf', //下载地址接口返回
  239. success: (data) => {
  240. if (data.statusCode === 200) {
  241. //文件保存到本地
  242. uni.saveFile({
  243. tempFilePath: data.tempFilePath, //临时路径
  244. success: function(res) {
  245. uni.showToast({
  246. icon: 'none',
  247. mask: true,
  248. title: '文件已保存:' + res.savedFilePath, //保存路径
  249. duration: 3000,
  250. });
  251. setTimeout(() => {
  252. //打开文档查看
  253. uni.openDocument({
  254. filePath: res.savedFilePath,
  255. success: function(res) {
  256. // console.log('打开文档成功');
  257. }
  258. });
  259. }, 3000)
  260. }
  261. });
  262. }
  263. },
  264. fail: (err) => {
  265. console.log(err);
  266. uni.showToast({
  267. icon: 'none',
  268. mask: true,
  269. title: '失败请重新下载',
  270. });
  271. },
  272. });
  273. },
  274. naviGateTo(item) {
  275. let user = uni.getStorageSync('user');
  276. let token = uni.getStorageSync('Auth-Token');
  277. let label = item.lable;
  278. // if(label === "Alliance" || label === "MemberApply" || label === "ApplicationServices") {
  279. if (label != "Help" && label != "Online") {
  280. if (user && token) {
  281. if (item.path) {
  282. uni.navigateTo({
  283. url: item.path
  284. })
  285. }
  286. } else {
  287. uni.setStorageSync('pathReminder', item.path)
  288. uni.navigateTo({
  289. url: '/pages/public/login'
  290. })
  291. }
  292. } else {
  293. if (item.path) {
  294. uni.navigateTo({
  295. url: item.path
  296. })
  297. }
  298. }
  299. // }else {
  300. // if(item.path){
  301. // uni.navigateTo({
  302. // url:item.path
  303. // })
  304. // }
  305. // }
  306. },
  307. }
  308. };
  309. </script>
  310. <style lang="scss" scoped>
  311. .rf-category {
  312. .font {
  313. font-size: 26upx !important;
  314. }
  315. // background-color: $color-white;
  316. background-color: #f3f4f6;
  317. /* #ifdef APP-PLUS */
  318. margin-top: calc(20upx + var(--status-bar-height));
  319. /* #endif */
  320. .dcp-profile {
  321. background-color: #1777ff;
  322. height: 100px;
  323. }
  324. .mywrap {
  325. margin: 10upx 4% 0 0;
  326. padding-right: 1.5%;
  327. display: flex;
  328. flex-wrap: wrap;
  329. justify-content: space-between;
  330. .serviceItems {
  331. width: 42%;
  332. padding: 0 1.5%;
  333. margin: 10upx 0 10upx 5%;
  334. display: flex;
  335. align-items: center;
  336. border: 1px solid #f3f4f6;
  337. background-color: #f4f9fc;
  338. border-radius: 20upx;
  339. height: 100upx;
  340. text-align: center;
  341. .icon {
  342. display: block;
  343. width: 60upx;
  344. height: 60upx;
  345. margin-right: 10upx;
  346. }
  347. }
  348. }
  349. .serviceItem,
  350. .serviceItem2 {
  351. display: inline-block;
  352. width: 40%;
  353. height: 100upx;
  354. border: 1px solid #f3f4f6;
  355. border-radius: 20upx;
  356. margin: 10upx 5%;
  357. line-height: 100upx;
  358. background-color: #f4f9fc;
  359. }
  360. .my-serviceItem2 {
  361. display: flex;
  362. justify-content: space-between;
  363. margin: 0 5%;
  364. }
  365. .my-serviceItem2-other {
  366. margin: 0 5%;
  367. }
  368. .serviceItem2 {
  369. width: 230upx;
  370. height: 180upx;
  371. border: 1px solid #f3f4f6;
  372. border-radius: 20upx;
  373. margin: 0upx 0upx 0 20upx;
  374. text-align: center;
  375. }
  376. .middle2,
  377. .middle3 {
  378. margin: 0upx 0 0upx 40upx;
  379. display: inline-block;
  380. vertical-align: middle;
  381. margin-right: 8upx;
  382. }
  383. .middle3 {
  384. display: block;
  385. margin: 0upx 0 0upx 0upx;
  386. margin-right: 0upx;
  387. }
  388. .dcp-boxTitle {
  389. height: 200upx;
  390. background-color: #1777ff;
  391. color: #fff;
  392. .text {
  393. line-height: 80upx;
  394. font-size: 40upx;
  395. }
  396. .floatRight {
  397. float: right;
  398. margin-right: 30upx;
  399. }
  400. .floatLeft {
  401. float: left;
  402. margin-left: 30upx;
  403. }
  404. }
  405. .dcp-nav,
  406. .dcp-nav2 {
  407. margin: 0 20upx;
  408. background-color: $color-white;
  409. padding-bottom: 40upx;
  410. // height: 590upx;
  411. transform: translateY(-100upx);
  412. border-radius: 20upx;
  413. .dcp-nav-title {
  414. line-height: 80upx;
  415. padding-left: 20upx;
  416. font-weight: 700;
  417. }
  418. }
  419. .dcp-nav2 {
  420. margin-top: 20upx;
  421. height: 300upx;
  422. }
  423. }
  424. </style>