customService.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <template>
  2. <view class="customService">
  3. <view class="serviceTab">
  4. <text class="tabListLeft" :class="curNow==0?'black':''" @click="sectionChange(0)">
  5. {{$i18n.locale ==='zh'? '定制服务' : 'Costomized'}}
  6. </text>
  7. <text :class="curNow!==0?'active2':'active'">
  8. </text>
  9. <text class="tabListRight" :class="curNow!==0?'black':''" @click="sectionChange(1)">
  10. {{ $i18n.locale ==='zh'? '资助洽商' : 'Donantion'}}
  11. </text>
  12. </view>
  13. <view class="service">
  14. <view class="custom" v-if="!curNow">
  15. <view class="custom-ser">
  16. <view class="custom-item" v-for="(item,index) in initData" :key="index">
  17. <view class="item-img">
  18. <image :src="getIconUrl(item.img)" mode=""></image>
  19. </view>
  20. <view class="item-content">
  21. <view class="item-cont-title">{{$t(item.lable)}}</view>
  22. <view class="item-cont" v-html="$t(item.value).replace(/[;;]/g,'$&\n')"></view>
  23. </view>
  24. </view>
  25. </view>
  26. <view class="custom-exam">
  27. <view class="exam-title">
  28. <text class="title">{{$t('common.CustomizedServicesUnit')}}</text>
  29. <view class="qiehuan" @tap="nextBatch">
  30. {{$t('common.NextBatch')}}
  31. <uni-icons class="loop" type="loop" color="#666666" size="16" />
  32. </view>
  33. </view>
  34. <view class="exam-unit">
  35. <u-row gutter="16">
  36. <u-col span="6" v-for="(info,index) in collaboratorList" :key="index">
  37. <view class="exam-item" @tap="unitDetail" :data-key="info.id">
  38. <view class="item-logo">
  39. <image class="logo" :src="websiteUrl + photoMap[info.unitId]" mode=""></image>
  40. </view>
  41. <view class="item-name u-line-2">
  42. {{$i18n.locale === 'zh'?info.unitZhName:info.unitEnName}}</view>
  43. <view class="item-cont u-line-2" v-if="$i18n.locale === 'zh'">
  44. {{info.unitIntroduction?info.unitIntroduction.replace(/<[^>]+>|&[^>]+;/g, ""):""}}
  45. </view>
  46. <view class="item-cont u-line-2" v-if="$i18n.locale === 'en'">
  47. {{unitIntroductionMap[info.unitId]?unitIntroductionMap[info.unitId].replace(/<[^>]+>|&[^>]+;/g, ""):""}}
  48. </view>
  49. </view>
  50. </u-col>
  51. </u-row>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="support" v-if="curNow">
  56. <view class="support-img">
  57. <image class="img" src="../../../static/img/cooperationNetwork/zzqs.png" mode=""></image>
  58. </view>
  59. <view class="module-classify-border"></view>
  60. <view class="support-cont">
  61. {{$t('common.IntroductionToFundingNegotiations')}}
  62. </view>
  63. </view>
  64. </view>
  65. <view style="height: 150upx;width: 100%;"></view>
  66. <view class="memberBtn">
  67. <u-button type="primary" shape="circle" @click="toCustomApply" v-show="!curNow" style="height: 88upx;">
  68. <!-- {{$t('common.CustomServiceApplication')}} -->
  69. {{$i18n.locale ==='zh'? '定制服务' : 'Costomized'}}
  70. </u-button>
  71. <u-button type="primary" shape="circle" @click="toDonationApply" v-show="curNow" style="height: 88upx;">
  72. {{$t('common.Donation')}}
  73. </u-button>
  74. </view>
  75. </view>
  76. </template>
  77. <script>
  78. export default {
  79. data() {
  80. return {
  81. curNow: 0,
  82. page: {
  83. pageNo: 1,
  84. pageSize: 8,
  85. },
  86. initData: [{
  87. lable: 'common.ExclusiveProjects',
  88. img: 'zsxm.png',
  89. value: 'common.IntroductionToExclusiveProjects'
  90. }, {
  91. lable: 'common.ThematicResearch',
  92. img: 'zxyj.png',
  93. value: 'common.IntroductionToExclusiveResearch'
  94. }, {
  95. lable: 'common.TailoredService',
  96. img: 'gxfw.png',
  97. value: 'common.IntroductionToPersonalizedService'
  98. }, {
  99. lable: 'common.CustomizedInformation',
  100. img: 'dzzx.png',
  101. value: 'common.CustomizedInformationIntroduction'
  102. }, {
  103. lable: 'common.JointConference',
  104. img: 'lhbh.png',
  105. value: 'common.IntroductionToTheJointMeeting'
  106. }],
  107. collaboratorList: [],
  108. unitIntroductionMap: {},
  109. photoMap: {},
  110. }
  111. },
  112. mounted() {
  113. this.setLang();
  114. },
  115. methods: {
  116. sectionChange(index) {
  117. this.curNow = index;
  118. },
  119. getIconUrl(url) {
  120. return require("../../../static/img/cooperationNetwork/" + url);
  121. },
  122. async setLang() {
  123. let param = {
  124. serviceTypeDict: '1',
  125. pageSize: 8,
  126. pageNo: this.page.pageNo,
  127. statusDict: '3'
  128. };
  129. const res = await this.$myRequest({
  130. url: '/project/coopCustomServices/',
  131. data: param
  132. });
  133. // console.log(res);
  134. const data = res.data;
  135. if (data) {
  136. this.collaboratorList = [];
  137. this.collaboratorList = data.coopCustomServices;
  138. this.photoMap = data.photoMap;
  139. this.collaboratorList.forEach(item => {
  140. if (this.photoMap[item.unitId] === '') {
  141. this.photoMap[item.unitId] = 'def/enterpriseDefault.png';
  142. }
  143. });
  144. this.unitIntroductionMap = data.unitIntroductionMap;
  145. this.page = data.page;
  146. }
  147. },
  148. nextBatch() {
  149. if (this.page.pageNo * 8 > (this.page.totalCount - 0)) {
  150. this.page.pageNo = 1;
  151. this.setLang();
  152. return;
  153. } else {
  154. this.page.pageNo++;
  155. this.setLang();
  156. }
  157. },
  158. unitDetail(e) {
  159. let key = e.currentTarget.dataset.key;
  160. uni.navigateTo({
  161. url: './components/customServiceDetails?key=' + key
  162. });
  163. },
  164. toCustomApply() {
  165. let user = uni.getStorageSync('user');
  166. let token = uni.getStorageSync('Auth-Token');
  167. if (user && token) {
  168. uni.navigateTo({
  169. url: '/pages/service/membership/customServiceApplication'
  170. })
  171. } else {
  172. uni.navigateTo({
  173. url: '/pages/public/login'
  174. })
  175. }
  176. },
  177. toDonationApply() {
  178. let user = uni.getStorageSync('user');
  179. let token = uni.getStorageSync('Auth-Token');
  180. if (user && token) {
  181. uni.navigateTo({
  182. url: '/pages/service/membership/donationApplication'
  183. })
  184. } else {
  185. uni.navigateTo({
  186. url: '/pages/public/login'
  187. })
  188. }
  189. }
  190. }
  191. }
  192. </script>
  193. <style lang="scss" scoped>
  194. .customService {
  195. padding-bottom: 140upx;
  196. .serviceTab {
  197. margin: 20upx 20upx 0 20upx;
  198. .tabListLeft,
  199. .tabListRight {
  200. width: 40%;
  201. height: 100upx;
  202. line-height: 100upx;
  203. display: inline-block;
  204. text-align: center;
  205. background-color: #fafafa;
  206. color: #C3C3C3;
  207. }
  208. .tabListLeft {
  209. border-radius: 20upx 0 0 0;
  210. }
  211. .tabListRight {
  212. border-radius: 0upx 20upx 0 0;
  213. }
  214. .active2 {
  215. display: inline-block;
  216. background-color: #fafafa;
  217. vertical-align: top;
  218. width: 20%;
  219. height: 100%;
  220. border-bottom: 100upx solid #fff;
  221. border-left: 120upx solid transparent;
  222. }
  223. .active {
  224. display: inline-block;
  225. background-color: #fafafa;
  226. vertical-align: top;
  227. width: 20%;
  228. height: 100%;
  229. border-bottom: 100upx solid #fff;
  230. border-right: 120upx solid transparent;
  231. }
  232. .black {
  233. background-color: #fff;
  234. font-weight: 600;
  235. color: #000;
  236. }
  237. }
  238. .service {
  239. margin: 0 20upx;
  240. padding-bottom: 20upx;
  241. .custom {
  242. .custom-ser {
  243. padding: 20upx 30upx;
  244. background-color: #FFFFFF;
  245. border-radius: 0 0 20upx 20upx;
  246. .custom-item {
  247. display: flex;
  248. justify-content: space-between;
  249. padding-top: 20upx;
  250. .item-img {
  251. width: 20%;
  252. height: 130upx;
  253. .image {
  254. width: 100%;
  255. height: 100%;
  256. }
  257. }
  258. .item-content {
  259. width: 75%;
  260. padding-bottom: 20upx;
  261. border-bottom: 1px solid #f1f1f1;
  262. .item-cont-title {
  263. font-size: 28upx;
  264. color: #0B0B11;
  265. font-weight: bold;
  266. }
  267. .item-cont {
  268. font-size: 26upx;
  269. color: #767676;
  270. }
  271. }
  272. &:last-child .item-content {
  273. border-bottom: none;
  274. }
  275. }
  276. }
  277. .custom-exam {
  278. margin-top: 20upx;
  279. background-color: #FFFFFF;
  280. padding: 20upx 30upx;
  281. border-radius: 20upx;
  282. .exam-title {
  283. display: flex;
  284. justify-content: space-between;
  285. .title {
  286. color: #333333;
  287. font-size: 30upx;
  288. font-weight: bold;
  289. position: relative;
  290. padding-left: 20upx;
  291. }
  292. .title:before {
  293. width: 10rpx;
  294. height: 32rpx;
  295. content: '';
  296. position: absolute;
  297. left: 0;
  298. top: 6upx;
  299. background-color: #6DD400;
  300. }
  301. .qiehuan {
  302. color: #666666;
  303. font-size: 28upx;
  304. .loop {
  305. margin-left: 5upx;
  306. }
  307. }
  308. }
  309. .exam-unit {
  310. margin: 0 -8upx;
  311. .exam-item {
  312. width: 100%;
  313. height: 350upx;
  314. border: 1px solid #E1E1E1;
  315. padding: 20upx;
  316. box-sizing: border-box;
  317. margin-top: 20upx;
  318. background-color: #F9FCFF;
  319. border-radius: 20upx;
  320. .item-logo {
  321. height: 120upx;
  322. .logo {
  323. width: 100%;
  324. height: 100%;
  325. }
  326. }
  327. .item-name {
  328. font-size: 30upx;
  329. font-weight: bold;
  330. margin: 10upx 0;
  331. color: #333333;
  332. text-align: center;
  333. }
  334. .item-cont {
  335. font-size: 28upx;
  336. color: #333333;
  337. }
  338. }
  339. }
  340. }
  341. }
  342. .support {
  343. background-color: #FFFFFF;
  344. .support-img {
  345. width: 100%;
  346. height: 380upx;
  347. padding: 30upx;
  348. .img {
  349. width: 100%;
  350. height: 100%;
  351. }
  352. }
  353. .module-classify-border {
  354. background-color: #f2f2f2;
  355. height: 20upx;
  356. width: 100%;
  357. }
  358. .support-cont {
  359. text-indent: 2em;
  360. padding: 20upx 30upx;
  361. color: #333333;
  362. font-size: 30upx;
  363. }
  364. }
  365. }
  366. .memberBtn {
  367. // position: fixed;
  368. // bottom: 0;
  369. // left: 0;
  370. // width: 100%;
  371. // background-color: #FFFFFF;
  372. padding: 30upx;
  373. height: 150upx;
  374. width: 100%;
  375. position: fixed;
  376. bottom: 0;
  377. left: 0;
  378. box-shadow: 0px -4px 10px 0px rgba(0, 0, 0, 0.06);
  379. background-color: white;
  380. }
  381. }
  382. </style>