index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. <template>
  2. <view class="content">
  3. <!-- 自定义导航 -->
  4. <view class="zdyNavBox">
  5. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  6. <view class="zdyNav">
  7. <view class="zdyNavLeft">
  8. <image src="../../static/img/nav_icon_back.png" mode="aspectFit" class="backImg" @click="goback">
  9. </image>
  10. </view>
  11. <view class="zdyNavTitle">网约车优享</view>
  12. <view style="width: 50px;"></view>
  13. </view>
  14. </view>
  15. <view class="status_bar" :style="{height: iStatusBarHeight + 'px'}"></view>
  16. <view style="height: 44px;"></view>
  17. <view class="top">
  18. <view class="topLeft">
  19. <view class="topMs">网约车优享认证入口</view>
  20. <image src="../../static/img/icon_arrow@2x.png" mode="" class="topImg"></image>
  21. </view>
  22. <view class="topRzBtn" @click="rzBtn">去认证</view>
  23. </view>
  24. <view class="searchBox">
  25. <view class="searchView">
  26. <image src="../../static/img/icon_search.png" class="searchImg"></image>
  27. <input type="text" class="searchInput" v-model="name" @confirm="search" placeholder="请输入电话、姓名搜索"/>
  28. </view>
  29. </view>
  30. <view class="listBox">
  31. <view class="line" v-for="(item,index) in items">
  32. <view class="lineZt lineState1" v-if="item.applyState==1">未审</view>
  33. <view class="lineZt lineState2" v-if="item.applyState==2">通过</view>
  34. <view class="lineZt lineState3" v-if="item.applyState==0">退回</view>
  35. <view class="lineName">
  36. <view >
  37. <view class="lineNameBox">
  38. <span>{{item.customerName}}</span> <span style="padding-left: 10rpx;">{{item.mobilePhone}}</span>
  39. </view>
  40. <view class="plateNumberBox">
  41. <span>{{item.plateNumber}}</span>
  42. <span style="padding-left: 10rpx;" v-if="item.carmodelType==1">丰田网约车</span>
  43. <span style="padding-left: 10rpx;" v-if="item.carmodelType==2">其他网约车</span>
  44. </view>
  45. </view>
  46. <view class="examine" v-if="item.applyState==1" @click="examine(2,item.id)">审核</view>
  47. </view>
  48. <view class="lineBottom">
  49. <view class="lineTime"> {{item.createTime}} </view>
  50. <view class="lineBottomBtnBox">
  51. <view class="returnBtn" v-if="item.applyState==1" @click="examine(0,item.id)">退回</view>
  52. <view class="seeBtn" @click="seeImg(item.imgs)">查看凭证</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <!-- <view class="carBox" @click="goapply">
  58. <image src="../../static/img/wyc.png" mode="" class="wycImg"></image>
  59. <view class="carMs">网约车优享申请</view>
  60. </view>
  61. -->
  62. <!-- 认证 -->
  63. <view class="authentication" @click="rzHide()" v-if="rzShow">
  64. <view class="rzBox" @click.stop="">
  65. <view class="rzTitle">认证</view>
  66. <view class="wxsm">微信扫码填写认证信息</view>
  67. <view class="wxImgBox">
  68. <!-- <canvas canvas-id="qrcode" style="width: 437rpx;height: 437rpx;" /> -->
  69. <canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" />
  70. </view>
  71. <view class="rzBottom">
  72. <view class="tzBottomBtn" @click="rzHide()">关闭</view>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- <canvas canvas-id="qrcode" :style="{width: `${qrcodeSize}px`, height: `${qrcodeSize}px`}" /> -->
  77. </view>
  78. </template>
  79. <script>
  80. import uQRCode from '@/utils/uqrcode.js'
  81. export default {
  82. data() {
  83. return {
  84. iStatusBarHeight:'',
  85. rzShow:false,
  86. page:1,
  87. name:'',
  88. items:'',
  89. shopID:'86B933FF-3782-4F82-A192-176E7A45AA13',
  90. shopName:'fzh123',
  91. sourceUserID:'00958045-3341-4AF7-9460-801F5B52E3E2',
  92. sourceName:'姜国远',
  93. qrcodeSrc: '',
  94. qrcodeSize:300,
  95. qrcodeText: '',
  96. url:'',
  97. token:'',
  98. uid:'',
  99. }
  100. },
  101. onLoad(opt) {
  102. console.log(window.location.origin)
  103. this.url=window.location.origin
  104. this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
  105. this.getList();
  106. console.log(opt)
  107. this.token=opt.token;
  108. this.uid=opt.uid
  109. },
  110. created() {
  111. },
  112. methods: {
  113. make() {
  114. uni.showLoading({
  115. title: '二维码生成中',
  116. mask: true
  117. })
  118. //this.qrcodeText=this.url+'/#/pages/wyCar/apply'+'?shopID='+this.shopID+'&shopName='+this.shopName+'&sourceUserID='+this.sourceUserID+'&sourceName='+this.sourceName+'&token='+this.token+'&uid='+this.uid+'&v='+Date.now()
  119. this.qrcodeText=this.url+'/#/pages/wyCar/apply'+'?&token='+this.token+'&uid='+this.uid+'&v='+Date.now()
  120. this.qrcodeText=encodeURI(this.qrcodeText)
  121. console.log(this.qrcodeText)
  122. uQRCode.make({
  123. canvasId: 'qrcode',
  124. text: this.qrcodeText,
  125. size: this.qrcodeSize,
  126. margin: 10,
  127. success: res => {
  128. this.qrcodeSrc = res
  129. //console.log('qrcodeSrc = ' + this.qrcodeSrc);
  130. },
  131. complete: () => {
  132. uni.hideLoading()
  133. }
  134. })
  135. },
  136. seeImg(imgs){
  137. if(imgs){
  138. var arr=imgs.split(',')
  139. uni.previewImage({
  140. urls: arr,
  141. longPressActions: {
  142. itemList: ['发送给朋友', '保存图片',],
  143. success: function(data) {},
  144. fail: function(err) {}
  145. }
  146. });
  147. }else{
  148. uni.showToast({
  149. title: '暂无凭证',
  150. icon: 'none',
  151. duration: 3000
  152. });
  153. }
  154. },
  155. examine(num,sheetId){
  156. var that = this;
  157. if(num==2){
  158. var content='确认审核通过?'
  159. }else{
  160. var content='确认退回?'
  161. }
  162. uni.showModal({
  163. title: '提示',
  164. content: content,
  165. success: function(res) {
  166. if (res.confirm) {
  167. uni.showLoading({
  168. title: '加载中'
  169. });
  170. that.$http('api/online-apply/state', {
  171. sheetId: sheetId,
  172. state: num
  173. }, 'POST').then(res => {
  174. uni.showToast({
  175. title: '操作成功',
  176. icon: 'none',
  177. duration: 3000
  178. });
  179. that.page = 1;
  180. that.getList()
  181. })
  182. } else if (res.cancel) {
  183. }
  184. }
  185. });
  186. },
  187. search(){
  188. this.page = 1
  189. this.getList()
  190. },
  191. getList(){
  192. uni.showLoading({
  193. title: '加载中'
  194. });
  195. this.isload = false;
  196. this.$http('api/online-apply/data', {
  197. input:this.name,
  198. page:this.page,
  199. limit:20,
  200. }, 'GET').then(res => {
  201. uni.hideLoading();
  202. this.isload = true;
  203. var list = res.data.data.Items;
  204. this.shopID=res.data.data.shopID;
  205. this.shopName=res.data.data.shopName;
  206. this.sourceName=res.data.data.sourceName;
  207. this.sourceUserID=res.data.data.sourceUserID
  208. //this.url=res.data.data.url
  209. if (this.page == 1) {
  210. this.items = list
  211. } else {
  212. this.items = this.items.concat(list)
  213. }
  214. })
  215. },
  216. goapply(){
  217. uni.navigateTo({
  218. url:'/pages/wyCar/apply?shopID='+this.shopID+'&shopName='+this.shopName+'&sourceUserID='+this.sourceUserID+'&sourceName='+this.sourceName+'&token='+this.token+'&uid='+this.uid
  219. })
  220. },
  221. rzHide(){
  222. this.rzShow=false;
  223. },
  224. rzBtn(){
  225. this.rzShow=true;
  226. this.make();
  227. },
  228. goback(){
  229. //app交互
  230. var standalone = window.navigator.standalone
  231. var userAgent = window.navigator.userAgent.toLowerCase()
  232. var safari = /safari/.test(userAgent)
  233. var ios = /iphone|ipod|ipad|mac/.test(userAgent)
  234. var android = /android/.test(userAgent)
  235. if (ios) {
  236. if ( true) {//!standalone&& !safari
  237. window.webkit.messageHandlers.goMyNav.postMessage(null)
  238. }
  239. } else if (android) {
  240. window.android.postMessage()
  241. }
  242. },
  243. },
  244. onPullDownRefresh() {
  245. this.page = 1;
  246. this.getList()
  247. setTimeout(function() {
  248. uni.stopPullDownRefresh();
  249. }, 1000);
  250. }
  251. }
  252. </script>
  253. <style scoped>
  254. .authentication{
  255. width: 100vw;height: 100vh;
  256. background: rgba(0,0,0,0.6);
  257. position: fixed;
  258. left: 0;
  259. bottom: 0;
  260. }
  261. .tzBottomBtn{
  262. width: 682rpx;color: #FEFFFE;font-weight: 500;
  263. height: 74rpx;font-size: 28rpx;line-height:74rpx ;
  264. background: #3F90F7;text-align: center;
  265. border-radius: 37rpx;margin-top: 13rpx;
  266. }
  267. .rzBottom{
  268. background: #FFFFFF;
  269. box-shadow: 0rpx -2rpx 20rpx 0rpx rgba(153,153,153,0.2);
  270. height: 100rpx;
  271. width: 100vw;
  272. position: fixed;
  273. left: 0;
  274. bottom: 0;
  275. display: flex;
  276. justify-content: center;
  277. }
  278. .wxsm{
  279. font-weight: 400;font-size: 28rpx;padding-top: 80rpx;
  280. color: #3C3C3C;text-align: center;
  281. }
  282. .wxImgBox{
  283. width: 300px;
  284. height: 300px;
  285. background: #EDEDED;
  286. margin: 0 auto;
  287. margin-top: 30rpx;
  288. }
  289. .rzBox{
  290. width: 100vw;
  291. height: 80vh;
  292. background: #FFFFFF;
  293. margin-top: 20vh;
  294. border-radius: 32rpx 32rpx 0rpx 0rpx;
  295. }
  296. .rzTitle{
  297. font-weight: 600;font-size: 30rpx;padding-left: 24rpx;
  298. color: #3C3C3C;padding-top: 30rpx;
  299. }
  300. .carBox{
  301. position: fixed;left: 50rpx;bottom: 200rpx;text-align: center;
  302. }
  303. .wycImg{
  304. width: 68rpx;height: 68rpx;
  305. }
  306. .carMs{
  307. font-weight: 500;
  308. color: #333333;
  309. line-height: 33rpx;
  310. width: 104rpx;
  311. font-size: 24rpx;
  312. }
  313. .listBox{
  314. padding:0 24rpx;
  315. }
  316. .lineState2{
  317. background: #00A040;
  318. }
  319. .lineState3{
  320. background: #FF3B30;
  321. }
  322. .lineBottom{
  323. display: flex;justify-content: space-between;
  324. padding:16rpx 20rpx ;
  325. }
  326. .lineBottomBtnBox{
  327. display: flex;
  328. }
  329. .lineTime{
  330. color: #999999;
  331. font-size: 24rpx;
  332. line-height: 50rpx;
  333. }
  334. .returnBtn{
  335. width: 96rpx;color: #FF8130;
  336. height: 48rpx;text-align: center;line-height: 48rpx;
  337. border-radius: 6rpx;
  338. border: 1rpx solid #FF8130;
  339. font-size: 24rpx;font-weight: 600;
  340. }
  341. .seeBtn{
  342. width: 136rpx;font-size: 24rpx;
  343. height: 48rpx;line-height: 48rpx;
  344. border-radius: 6rpx;text-align: center;
  345. border: 1rpx solid #DDDDDD;
  346. color: #3C3C3C;margin-left: 24rpx;
  347. }
  348. .lineName{
  349. display: flex;justify-content: space-between;
  350. padding: 10rpx 20rpx;
  351. border-bottom: 1px solid #EEEEEE;
  352. padding-bottom: 16rpx;
  353. }
  354. .lineNameBox{
  355. font-weight: 600;font-size: 30rpx;
  356. color: #3C3C3C;line-height: 42rpx;
  357. }
  358. .plateNumberBox{
  359. color: #666666;font-size: 24rpx;
  360. line-height: 33rpx;padding-top: 10rpx;
  361. }
  362. .examine{
  363. width: 96rpx;color: #FFFFFF;
  364. height: 56rpx;font-size: 24rpx;
  365. background: #3F90F7;
  366. border-radius: 6rpx;
  367. line-height: 56rpx;
  368. text-align: center;
  369. margin-top: 18rpx;
  370. }
  371. .line{
  372. background: #FFFFFF;
  373. border-radius: 6rpx;
  374. margin-top: 20rpx;
  375. }
  376. .lineZt{
  377. width: 69rpx;line-height: 32rpx;
  378. height: 32rpx;font-size: 22rpx;
  379. text-align: center;color: #FFFFFF;
  380. border-radius: 10rpx 0rpx 10rpx 0rpx;
  381. }
  382. .lineState1{
  383. background: #FF8130;
  384. }
  385. .top{
  386. width: 750rpx;
  387. height: 72rpx;
  388. background: #FF8130;
  389. display: flex;
  390. justify-content: space-between;
  391. }
  392. .topLeft{
  393. font-size: 26rpx;
  394. display: flex;padding-left: 35rpx;padding-top: 17rpx;color: #FFFFFF;
  395. line-height: 38rpx;
  396. }
  397. .topImg{
  398. width: 24rpx;height: 24rpx;margin-left: 8rpx;margin-top: 9rpx;
  399. }
  400. .topRzBtn{
  401. width: 110rpx;font-size: 26rpx;
  402. height: 52rpx;line-height: 52rpx;text-align: center;
  403. background: #FFFFFF;
  404. border-radius: 6rpx;
  405. color: #FF8130;
  406. margin-top: 12rpx;
  407. margin-right: 24rpx;
  408. }
  409. .searchBox{
  410. background: #FFFFFF;
  411. padding: 24rpx;
  412. }
  413. .searchView{
  414. width: 702rpx;
  415. height: 36rpx;
  416. background: #F4F5F7;
  417. border-radius: 36rpx;
  418. display: flex;
  419. padding: 18rpx 0;
  420. }
  421. .searchImg{
  422. width: 36rpx;height: 36rpx;margin-left: 24rpx;
  423. }
  424. .searchInput{
  425. line-height: 36rpx;height: 36rpx;font-size: 26rpx;
  426. padding-left: 16rpx;
  427. }
  428. .content{
  429. min-height: 100vh;
  430. background: #F6F6F6;
  431. }
  432. .zdyNavBox {
  433. width: 100vw;
  434. background: #FFFFFF;
  435. position: fixed;
  436. top: 0;
  437. left: 0;
  438. z-index: 99;
  439. }
  440. .zdyNav {
  441. height: 44px;
  442. display: flex;
  443. justify-content: space-between;
  444. align-items: center;
  445. }
  446. .backImg {
  447. width: 44rpx;
  448. height: 44rpx;
  449. margin-left: 10rpx;
  450. margin-right: 20rpx;
  451. }
  452. .homeImg {
  453. width: 44rpx;
  454. height: 44rpx;
  455. }
  456. .zdyNavLeft {
  457. display: flex;
  458. align-items: center;
  459. }
  460. .zdyNavTitle {
  461. height: 44px;
  462. background: #FFFFFF;
  463. text-align: center;
  464. font-size: 34rpx;
  465. line-height: 44px;
  466. }
  467. .tab {
  468. background: #FFFFFF;
  469. display: flex;
  470. justify-content: space-between;
  471. line-height: 92rpx;
  472. /* position: fixed; */
  473. width: calc(100vw - 100rpx);
  474. padding-left: 50rpx;
  475. padding-right: 50rpx;
  476. height: 92rpx;
  477. z-index: 11;
  478. border-top: 1px solid #EEEEEE;
  479. }
  480. .tabLine {
  481. font-size: 28rpx;
  482. color: #333333;
  483. text-align: center;
  484. }
  485. .tabActive {
  486. color: #FF0000;
  487. font-weight: bold;
  488. border-bottom: 4rpx solid #FF0000;
  489. }
  490. .main {
  491. padding-top: 260rpx;
  492. padding-bottom: 20rpx;
  493. background-color: #F4F5F7;
  494. }
  495. .itemBg {
  496. margin: 20rpx 24rpx;
  497. background-color: #FFFFFF;
  498. border-radius: 10rpx;
  499. padding: 20rpx;
  500. }
  501. .itemTop {
  502. display: flex;
  503. justify-content: space-between;
  504. }
  505. .itemType {
  506. color: #999999;
  507. font-size: 24rpx;
  508. }
  509. .itemSheetState {
  510. font-size: 24rpx;
  511. color: #999999
  512. }
  513. .redColor {
  514. color: #FF0000;
  515. }
  516. .orangeColor {
  517. color: #F19D01;
  518. }
  519. .greenColor {
  520. color: #00A040;
  521. }
  522. .itemShopBg {
  523. display: flex;
  524. justify-content: space-between;
  525. margin-top: 20rpx;
  526. }
  527. .shopName {
  528. color: #333333;
  529. font-size: 30rpx;
  530. font-weight: bold;
  531. /* 隐藏文字显示 ...不换行 */
  532. overflow: hidden;
  533. text-overflow: ellipsis;
  534. white-space: nowrap;
  535. }
  536. .price {
  537. color: #333333;
  538. font-weight: bold;
  539. font-size: 32rpx;
  540. }
  541. .itemName {
  542. color: #666666;
  543. font-size: 24rpx;
  544. padding-top: 16rpx;
  545. height: 30rpx;
  546. overflow: hidden;
  547. text-overflow: ellipsis;
  548. white-space: nowrap;
  549. }
  550. .plateBg {
  551. display: flex;
  552. justify-content: space-between;
  553. align-items: center;
  554. }
  555. .plateNumber {
  556. color: #666666;
  557. font-size: 24rpx;
  558. margin-bottom: 20rpx;
  559. display: flex;
  560. }
  561. .itemLineBottom {
  562. display: flex;
  563. justify-content: flex-end;
  564. }
  565. .itemBtn1 {
  566. width: 150rpx;
  567. height: 56rpx;
  568. border-radius: 36rpx;
  569. border: 2rpx solid #DDDDDD;
  570. text-align: center;
  571. line-height: 56rpx;
  572. font-size: 28rpx;
  573. color: #3C3C3C;
  574. margin-left: 40rpx;
  575. }
  576. .itemBtn2 {
  577. width: 150rpx;
  578. height: 56rpx;
  579. border-radius: 36rpx;
  580. border: 2rpx solid #FF4F00;
  581. text-align: center;
  582. line-height: 56rpx;
  583. font-size: 28rpx;
  584. color: #FF4F00;
  585. margin-left: 40rpx;
  586. }
  587. .orderState {
  588. color: #F19D01;
  589. font-size: 24rpx;
  590. padding-left: 20rpx;
  591. }
  592. .renBox{
  593. color: #1A1A1A;
  594. background: #F7F7F7;
  595. border-radius: 10rpx;
  596. display: flex;
  597. padding: 20rpx;font-size: 24rpx;
  598. line-height: 30rpx;
  599. margin-top: 16rpx;
  600. }
  601. .renimg{
  602. width: 30rpx;height: 30rpx;
  603. }
  604. .renMobilePhone{
  605. padding-left: 13rpx;
  606. }
  607. .itemaddress{
  608. font-size: 24rpx;display: flex;
  609. color: #3C3C3C;padding-top: 16rpx;
  610. line-height: 33rpx;
  611. }
  612. .addressDD{
  613. width: 10rpx;
  614. height: 10rpx;
  615. background: #FF0000;
  616. border-radius: 50%;
  617. margin-top: 10rpx;
  618. margin-right: 5rpx;
  619. }
  620. .sschahao{
  621. width: 40rpx;
  622. height: 40rpx;
  623. padding-top: 16rpx;
  624. }
  625. </style>