community.vue 18 KB

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