community.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. <template>
  2. <view class="container">
  3. <view class="tabs">
  4. <scroll-view scroll-x class="nav" style="background-color: #efefef;color: #5b5b5b;">
  5. <view class="flex text-center">
  6. <view class="cu-item flex-sub" :class="index==subsectionCurrent?'text-checked':''" v-for="(item,index) in subsectionList" :key="index" @tap="subsectionChange(index)" >
  7. {{item.name}}
  8. </view>
  9. </view>
  10. </scroll-view>
  11. </view>
  12. <view style="height: 100%;">
  13. <swiper style="height: 100%;" :current="subsectionCurrent" @change="swiperChange"
  14. @animationfinish="animationfinish">
  15. <!-- <swiper-item >
  16. <scroll-view scroll-y style="height: 100%;">
  17. <view class="bg-white " >
  18. <view style="margin: 0 0rpx 40rpx;">
  19. <image style="width: 100%;" mode="widthFix" src="http://139.9.103.171:8888/group1/M00/00/01/iwlnq1-_4mqAf_t4AAKPnq9axkQ981.png" ></image>
  20. </view>
  21. <view class="bg-white padding-top-20" style="position: relative;top:-20rpx;">
  22. <view class="text-bold text-lg margin-left-30 margin-bottom-sm">
  23. <text class="cuIcon-titles text-blue margin-right-10 "></text>
  24. <text>通用服务</text>
  25. </view>
  26. <view class="cu-list grid col-4 no-border " style="border-radius: 50rpx;">
  27. <view class="cu-item" @click="goDetail(item)" v-for="(item,index) in commonList" :key="index">
  28. <view class="grid-icon ">
  29. <image :src="item.icon" mode="widthFix"/>
  30. </view>
  31. <view class="cu-tag bg-orange badge" v-if="item.badge>0">{{item.badge}}</view>
  32. <text class="text-sm ">{{item.title}}</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="text-bold text-lg margin-left-30 margin-bottom-sm ">
  37. <text class="cuIcon-titles text-blue margin-right-10 "></text>
  38. <text>手机服务</text>
  39. </view>
  40. <view class="cu-list grid col-4 no-border " style="border-radius: 50rpx;">
  41. <view class="cu-item" @click="goDetail(item)" v-for="(item,index) in mobileList" :key="index">
  42. <view class="grid-icon ">
  43. <image :src="item.icon" mode="widthFix"/>
  44. </view>
  45. <view class="cu-tag bg-orange badge" v-if="item.badge>0">{{item.badge}}</view>
  46. <text class="text-sm ">{{item.title}}</text>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="bg-white padding-top-20" style="position: relative;top:-10rpx;">
  51. <view class="text-bold text-lg margin-left-30 margin-bottom-sm">
  52. <text class="cuIcon-titles text-blue margin-right-10 "></text>
  53. <text>宽带服务</text>
  54. </view>
  55. <view class="cu-list grid col-4 no-border " style="border-radius: 50rpx;">
  56. <view class="cu-item" @click="goDetail(item)" v-for="(item,index) in broadbandList" :key="index">
  57. <view class="grid-icon ">
  58. <image :src="item.icon" mode="widthFix"/>
  59. </view>
  60. <view class="cu-tag bg-orange badge" v-if="item.badge>0">{{item.badge}}</view>
  61. <text class="text-sm ">{{item.title}}</text>
  62. </view>
  63. </view>
  64. </view>
  65. <view style="height: 80rpx;">
  66. <u-divider bgColor="#f1f1f1;" height="80">到底了</u-divider>
  67. </view>
  68. </scroll-view>
  69. </swiper-item> -->
  70. <swiper-item >
  71. <scroll-view scroll-y style="height: 100%;background-color: #F1F1F1;">
  72. <view style="margin: 0 20rpx;">
  73. <u-waterfall v-model="oldManList" ref="uWaterfall">
  74. <template v-slot:left="{leftList}">
  75. <view @click="goElderlyDetail(item)" class="demo-warter" v-for="(item, index) in leftList" :key="index">
  76. <image :src="item.image" mode="scaleToFill" class="demo-image" ></image>
  77. <view class="time">
  78. <text class="padding-bottom-10">抓拍时间:</text>
  79. <text>{{item.time}}</text>
  80. </view>
  81. <view class="flex justify-center margin-bottom-50">
  82. <view class="cu-btn line-blue round df" style="width: 70%;">
  83. 查看详情
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <template v-slot:right="{rightList}">
  89. <view @click="goElderlyDetail(item)" class="demo-warter" v-for="(item, index) in rightList" :key="index">
  90. <image :src="item.image" mode="scaleToFill" class="demo-image" ></image>
  91. <view class="time">
  92. <text class="padding-bottom-10">抓拍时间:</text>
  93. <text>{{item.time}}</text>
  94. </view>
  95. <view class="flex justify-center margin-bottom-50">
  96. <view class="cu-btn line-blue round df" style="width: 70%;">
  97. 查看详情
  98. </view>
  99. </view>
  100. </view>
  101. </template>
  102. </u-waterfall>
  103. </view>
  104. </scroll-view>
  105. </swiper-item>
  106. <swiper-item >
  107. <scroll-view scroll-y style="height: 100%;background-color: #F1F1F1;">
  108. <view style="margin: 0 20rpx;">
  109. <u-waterfall v-model="carList" ref="uWaterfall">
  110. <template v-slot:left="{leftList}">
  111. <view @click="goCarDetail(item)" class="demo-warter" v-for="(item, index) in leftList" :key="index">
  112. <image :src="item.image" class="demo-image" mode="scaleToFill"></image>
  113. <view class="time">
  114. <text class="padding-bottom-10">抓拍时间:</text>
  115. <text>{{item.time}}</text>
  116. </view>
  117. <view class="flex justify-center margin-bottom-50">
  118. <view class="cu-btn line-blue round df" style="width: 70%;">
  119. 查看详情
  120. </view>
  121. </view>
  122. </view>
  123. </template>
  124. <template v-slot:right="{rightList}">
  125. <view @click="goCarDetail(item)" class="demo-warter" v-for="(item, index) in rightList" :key="index">
  126. <image :src="item.image" class="demo-image" mode="scaleToFill"></image>
  127. <view class="time">
  128. <text class="padding-bottom-10">抓拍时间:</text>
  129. <text>{{item.time}}</text>
  130. </view>
  131. <view class="flex justify-center margin-bottom-50">
  132. <view class="cu-btn line-blue round df" style="width: 70%;">
  133. 查看详情
  134. </view>
  135. </view>
  136. </view>
  137. </template>
  138. </u-waterfall>
  139. </view>
  140. </scroll-view>
  141. </swiper-item>
  142. </swiper>
  143. </view>
  144. </view>
  145. </template>
  146. <script>
  147. var app=getApp()
  148. export default {
  149. components:{
  150. },
  151. data() {
  152. return {
  153. oldManList:[],
  154. carList:[],
  155. tabCurrent:0,
  156. subsectionCurrent: 0,
  157. subsectionList: [
  158. // {
  159. // name: '通讯服务'
  160. // },
  161. {
  162. name: '老人关爱'
  163. },
  164. {
  165. name: '车辆关爱'
  166. },
  167. ],
  168. // 卡片列表
  169. cardList:[
  170. {
  171. title:'热门活动',
  172. subTiltle:'优惠多多',
  173. type:'url',
  174. target:'https://yx.nx.189.cn/u/public/index.php/index/index/rmhd.html'
  175. },
  176. {
  177. title:'充值交费',
  178. subTiltle:'用于充值交费',
  179. type:'url',
  180. target:'https://mp.weixin.qq.com/s/oGB5l9lZCQHHJJuXT0umRw'
  181. },
  182. {
  183. title:'宽带预约',
  184. subTiltle:'用于宽带预约',
  185. type:'url',
  186. target:'https://wap.nx.189.cn/pages/market/html/market.html'
  187. },
  188. {
  189. title:'充30减2',
  190. subTiltle:'手机充值满减活动',
  191. type:'url',
  192. target:'https://yx.nx.189.cn/t/public/index.php/dyq/index'
  193. },
  194. {
  195. title:'抽话费',
  196. subTiltle:'用于抽话费',
  197. type:'url',
  198. target:'https://pms.189.cn/cljy-web/static/chfchf/chfchf_zc_index.html?shopid=2000118600000002&cmpid=dp-002&number=undefined'
  199. },
  200. {
  201. title:'流量超市',
  202. subTiltle:'用于充值流量',
  203. type:'url',
  204. target:'https://yx.nx.189.cn/t/public/index.php/flowcs/index'
  205. },
  206. ],
  207. commonList:[
  208. {
  209. icon:'../../static/telecom/paihao.png',
  210. title:"营业厅排号",
  211. badge:0,
  212. type:'url',
  213. target:'https://pdweb.360sides.com/?qudao=ningxia'
  214. },
  215. {
  216. icon:'../../static/telecom/xiaohu.png',
  217. title:"销户服务",
  218. badge:0,
  219. type:'url',
  220. target:'https://yx.nx.189.cn/t/public/index.php/hd2020zzyw/kuandai'
  221. },
  222. {
  223. icon:'../../static/telecom/tuiding-zengzhi.png',
  224. title:"增值服务退订",
  225. badge:0,
  226. type:'url',
  227. target:'http://im.189.cn/cw/index.html?cf=1&cid=6400'
  228. },
  229. {
  230. icon:'../../static/telecom/tuiding1.png',
  231. title:"应用功能退订",
  232. badge:0,
  233. type:'url',
  234. target:'https://yx.nx.189.cn/t/public/index.php/hd2020zzyw/yy'
  235. }
  236. ],
  237. mobileList:[
  238. {
  239. icon:'../../static/telecom/chongzhi.png',
  240. title:"话费充值",
  241. badge:0,
  242. type:'applet',
  243. target:'wxd4daf5a66b681275'
  244. },
  245. {
  246. icon:'../../static/telecom/liuliang.png',
  247. title:"流量充值",
  248. badge:0,
  249. type:'url',
  250. target:'https://yx.nx.189.cn/t/public/index.php/flowcs/index'
  251. },
  252. {
  253. icon:'../../static/telecom/icon21.png',
  254. title:"号卡精选",
  255. badge:0,
  256. type:'url',
  257. target:'https://yx.nx.189.cn/t/public/index.php/hkcs/index'
  258. },
  259. {
  260. icon:'../../static/telecom/xiehao.png',
  261. title:"携号转网",
  262. badge:0,
  263. type:'url',
  264. target:'https://yx.nx.189.cn/m_lx2020xhzw/login_xhzw.do'
  265. },
  266. {
  267. icon:'../../static/telecom/icon25.png',
  268. title:"手机挂失",
  269. badge:0,
  270. type:'url',
  271. target:'https://yx.nx.189.cn/t/public/index.php/hd2020zzyw/guashi.html'
  272. },
  273. {
  274. icon:'../../static/telecom/icon26.png',
  275. title:"手机补换卡",
  276. badge:0,
  277. type:'url',
  278. target:'https://yx.nx.189.cn/t/public/index.php/hd2020zzyw/buhuanka'
  279. },
  280. {
  281. icon:'../../static/telecom/icon24.png',
  282. title:"彩铃功能",
  283. badge:0,
  284. type:'url',
  285. target:'https://yx.nx.189.cn/t/public/index.php/hd2020zzyw/cailing'
  286. },
  287. ],
  288. broadbandList:[
  289. {
  290. icon:'../../static/telecom/icon31.png',
  291. title:"宽带订单查询",
  292. badge:0,
  293. type:'url',
  294. target:'https://yx.nx.189.cn/x/kd_yj/order.php'
  295. },
  296. {
  297. icon:'../../static/telecom/icon32.png',
  298. title:"宽带自助排障",
  299. badge:0,
  300. type:'url',
  301. target:'https://x.189.cn/tykf-services/sso?channel=NX_WEIXIN_Soo&reqMode=5&reqParam=hK8dQ%2F1J63ieVlPpE55UzGkn6hYdnMN25CW93bWD%2FTnwiQ2lOVtZ3E3higHv+%2BXd4tUIpuOnSY%2BVYTLziitWtYd2sArB68J422bltp46KFKLbr%2Fpx6l2JOKRI+a6OaIxCk'
  302. },
  303. {
  304. icon:'../../static/telecom/icon33.png',
  305. title:"宽带升级",
  306. badge:0,
  307. type:'url',
  308. target:'http://hd.nxeb.cc/pages/market/html/modify.html?client=0'
  309. },
  310. {
  311. icon:'../../static/telecom/icon34.png',
  312. title:"宽带移机",
  313. badge:0,
  314. type:'url',
  315. target:'https://yx.nx.189.cn/x/kd_yj/'
  316. },
  317. {
  318. icon:'../../static/telecom/icon35.png',
  319. title:"宽带超市",
  320. badge:0,
  321. type:'url',
  322. target:'http://hd.nxeb.cc/pages/market/html/market.html?rand=1535419737668&client=0'
  323. }
  324. ]
  325. }
  326. },
  327. onLoad(options) {
  328. this.fetchStaticData()
  329. },
  330. onShow() {
  331. if (!this.$isEmpty(getApp().globalData.subsectionCurrent)) {
  332. this.subsectionCurrent=getApp().globalData.subsectionCurrent
  333. }
  334. },
  335. methods: {
  336. subsectionChange(index) {
  337. this.subsectionCurrent = index
  338. },
  339. tabChange(index){
  340. this.tabCurrent=index
  341. },
  342. swiperChange(e) {
  343. this.subsectionCurrent = e.detail.current
  344. },
  345. animationfinish({detail: { current }}) {
  346. this.swiperCurrent = current;
  347. this.subsectionCurrent = current;
  348. },
  349. goDetail(item){
  350. if (this.$isEmpty(item.type)) {
  351. uni.showToast({
  352. title:"即将推出",
  353. icon:"none"
  354. })
  355. return
  356. }
  357. if (item.type=='applet') {
  358. //小程序跳转
  359. uni.navigateToMiniProgram({
  360. appId: item.target,
  361. path: 'pages/index/index'
  362. })
  363. }else{
  364. //h5跳转
  365. uni.navigateTo({
  366. url:"../webview/webview?url="+item.target
  367. })
  368. }
  369. },
  370. goElderlyDetail(item){
  371. app.globalData.elderlyDetail=item
  372. uni.navigateTo({
  373. url:"./detail/elderlyDetail",
  374. })
  375. },
  376. goCarDetail(item){
  377. app.globalData.carDetail=item
  378. uni.navigateTo({
  379. url:"./detail/carDetail",
  380. })
  381. },
  382. fetchStaticData(){
  383. this.oldManList=[
  384. {
  385. name:'李爱琴',
  386. sex:'女',
  387. age:'64',
  388. temperature:'36.4',
  389. idCard:'640302195608152578',
  390. device:'阅海万家D区西北门',
  391. plotName:'阅海万家D区',
  392. image:'http://139.9.103.171:1888/miniofile/app/del/1607607748(1).jpg',
  393. time:'2020-12-05 09:31:22'
  394. }
  395. ,
  396. {
  397. name:'阮启方',
  398. sex:'男',
  399. age:'66',
  400. temperature:'36.3',
  401. idCard:'640302195804232481',
  402. device:'阅海万家D区西北门',
  403. plotName:'阅海万家D区',
  404. image:'http://139.9.103.171:1888/miniofile/app/del/1607608168(1).jpg',
  405. time:'2020-11-20 15:31:22'
  406. }
  407. ,
  408. {
  409. name:'李爱琴',
  410. sex:'女',
  411. age:'64',
  412. temperature:'36.2',
  413. idCard:'640302195608152578',
  414. device:'阅海万家D区北门',
  415. plotName:'阅海万家D区',
  416. image:'http://139.9.103.171:1888/miniofile/app/del/1607607676(1).jpg',
  417. time:'2020-12-10 15:31:22'
  418. }
  419. ,
  420. {
  421. name:'阮启方',
  422. sex:'男',
  423. age:'66',
  424. temperature:'36.6',
  425. idCard:'640302195804232481',
  426. device:'阅海万家D区西北门',
  427. plotName:'阅海万家D区',
  428. image:'http://139.9.103.171:1888/miniofile/app/del/1607608107.jpg',
  429. time:'2020-11-20 12:32:52'
  430. }
  431. ]
  432. this.carList=[
  433. {
  434. number:'宁A096L0',
  435. device:'粤海玩家D区西门',
  436. parking:'阅海万家D区西门停车场',
  437. image:'http://139.9.103.171:1888/miniofile/app/del/1607602946(1).jpg',
  438. time:'2020-12-10 12:38:26'
  439. },
  440. {
  441. number:'宁A096L0',
  442. device:'粤海玩家D区西门',
  443. parking:'阅海万家D区西门停车场',
  444. image:'http://139.9.103.171:1888/miniofile/app/del/1607602903(1).jpg',
  445. time:'2020-12-10 19:42:52'
  446. },
  447. {
  448. number:'宁A096L0',
  449. device:'粤海玩家D区西门',
  450. parking:'阅海万家D区西门停车场',
  451. image:'http://139.9.103.171:1888/miniofile/app/del/1607602845(1).jpg',
  452. time:'2020-12-05 11:32:16'
  453. },
  454. {
  455. number:'宁A096L0',
  456. device:'粤海玩家D区西门',
  457. parking:'阅海万家D区西门停车场',
  458. image:'http://139.9.103.171:1888/miniofile/app/del/cb034601a1594a248da5bef3d29fcebd.jpeg',
  459. time:'2020-12-05 14:46:32'
  460. },
  461. {
  462. number:'宁A096L0',
  463. device:'粤海玩家D区西门',
  464. parking:'阅海万家D区西门停车场',
  465. image:'http://139.9.103.171:1888/miniofile/app/del/1607602745(1).jpg',
  466. time:'2020-12-04 12:38:26'
  467. },
  468. {
  469. number:'宁A096L0',
  470. device:'粤海玩家D区西门',
  471. parking:'阅海万家D区西门停车场',
  472. image:'http://139.9.103.171:1888/miniofile/app/del/31ff5310f499d55764b24bf6c7c8083e.jpeg',
  473. time:'2020-12-04 18:22:52'
  474. },
  475. {
  476. number:'宁A096L0',
  477. device:'粤海玩家D区西门',
  478. parking:'阅海万家D区西门停车场',
  479. image:'http://139.9.103.171:1888/miniofile/app/del/1566433075317.jpg',
  480. time:'2020-12-01 11:26:32'
  481. },
  482. {
  483. number:'宁A096L0',
  484. device:'粤海玩家D区西门',
  485. parking:'阅海万家D区西门停车场',
  486. image:'http://139.9.103.171:1888/miniofile/app/del/1566433083707.jpg',
  487. time:'2020-12-01 16:42:52'
  488. },
  489. {
  490. number:'宁A096L0',
  491. device:'粤海玩家D区西门',
  492. parking:'阅海万家D区西门停车场',
  493. image:'http://139.9.103.171:1888/miniofile/app/1606682778(1).jpg',
  494. time:'2020-11-24 09:38:26'
  495. },
  496. {
  497. number:'宁A096L0',
  498. device:'粤海玩家D区西门',
  499. parking:'阅海万家D区西门停车场',
  500. image:'http://139.9.103.171:1888/miniofile/app/1606682866(1).jpg',
  501. time:'2020-11-24 16:42:52'
  502. }
  503. ]
  504. }
  505. }
  506. }
  507. </script>
  508. <style lang="scss">
  509. page{
  510. height: 100%;
  511. width: 100%;
  512. }
  513. .text-checked{
  514. font-weight: 800;
  515. background-color: #FFFFFF;
  516. color: #2f7ff5;
  517. font-size: 800;
  518. }
  519. .container {
  520. height: calc(100vh);
  521. background-color: #F6F6F6;
  522. padding: 90rpx 0rpx 0rpx;
  523. .tabs {
  524. height: 90rpx;
  525. position: fixed;
  526. top: 0rpx;
  527. left: 0;
  528. right: 0;
  529. width: 100%;
  530. z-index: 3;
  531. }
  532. }
  533. view{
  534. box-sizing: border-box;
  535. }
  536. .top1{
  537. border-radius: 40rpx 40rpx 0 0;
  538. position: relative;
  539. top: -30rpx;
  540. .card{
  541. border-radius: 20rpx;
  542. }
  543. }
  544. .grid-icon{
  545. image{
  546. width: 56rpx;height: 56rpx;
  547. }
  548. }
  549. .scroll-view {
  550. height: 150rpx;
  551. white-space: nowrap;
  552. width: 100%;
  553. position: relative;
  554. top: -30rpx;
  555. }
  556. .scroll-view-item {
  557. color: #FFFFFF;
  558. background-image: linear-gradient(to right, #2f7ff5, #2f7ff5);
  559. display: inline-block;
  560. text-align: left;
  561. padding: 20rpx 40rpx;
  562. margin:0 8rpx;
  563. width:24%;
  564. border-radius: 12rpx;
  565. }
  566. .scroll-view-item:first-child{
  567. margin-left: 30rpx;
  568. }
  569. .scroll-view-item:last-child{
  570. margin-right: 30rpx;
  571. }
  572. .demo-warter {
  573. height: 580rpx;
  574. margin: 20rpx 8rpx;
  575. background-color: #ffffff;
  576. position: relative;
  577. border-top-right-radius: 12rpx;
  578. border-top-left-radius: 12rpx;
  579. .time{
  580. display: flex;flex-direction: column;
  581. padding-left: 20rpx;
  582. padding-bottom: 40rpx;
  583. }
  584. }
  585. .demo-image {
  586. border-top-right-radius: 12rpx;
  587. border-top-left-radius: 12rpx;
  588. height: 360rpx;
  589. padding-bottom: 10rpx;
  590. width: 100%;
  591. }
  592. </style>