hallpay.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. <template>
  2. <view class="center">
  3. <view class="top">
  4. <view class="top-main">
  5. <view class="num" style="color: #888888;">挂售价格¥{{ info.price }}</view>
  6. <!-- <image class="top-image" src="../../static/img/copy.png" mode=""></image> -->
  7. </view>
  8. <view class="top-main" style="margin-top: 30rpx;">
  9. <view class="num">
  10. <text>实际支付¥ {{ info.actual_price }}</text>
  11. </view>
  12. <!-- <image class="top-image" src="../../static/img/copy.png" mode=""></image> -->
  13. </view>
  14. <!-- <view v-if="status == 1">
  15. <view class="downtime" v-if="stopTime.stopTimeH < 0 || stopTime.stopTimeM < 0 || stopTime.stopTimeS < 0">订单已过期</view>
  16. <view class="downtime" v-else>
  17. <uni-countdowns
  18. color="#FFFFFF"
  19. splitor-color="#FD3B39"
  20. background-color="#FD3B39"
  21. border-color="#FD3B39"
  22. :show-day="false"
  23. :hour="stopTime.stopTimeH"
  24. :minute="stopTime.stopTimeM"
  25. :second="stopTime.stopTimeS"
  26. ></uni-countdowns>
  27. </view>
  28. </view> -->
  29. </view>
  30. <view class="product flex">
  31. <image class="product-image" :src="info.image" mode=""></image>
  32. <view class="product-info">
  33. <view class="title">{{ info.name }}</view>
  34. <view class="title buyId">
  35. <text>卖家ID:</text>
  36. {{ info.collection_id }}
  37. </view>
  38. <view class="title buyName">
  39. <text>卖家昵称:</text>
  40. {{ info.c_nickname }}
  41. </view>
  42. <view class="title buyPhone">
  43. <text>卖家手机号:</text>
  44. {{ zfb != '' ? zfb.phone : wx != '' ? wx.phone : bank.phone }}
  45. </view>
  46. </view>
  47. </view>
  48. <view class="main">
  49. <view class="main-tip">请向以下账号自行转账</view>
  50. <!-- <view class="main-title flex">
  51. <view class="main-item">
  52. <view class="mt-item" @click="change('0')" :class="{ current: tabCurrentIndex === 0 }" v-if="zfb != ''">
  53. <image class="mt-image" :src="tabCurrentIndex == 0 ? '../../static/img/aliD.png' : '../../static/img/ali.png'" mode=""></image>
  54. <view class="mt-font" :class="{ current: tabCurrentIndex === 0 }">支付宝</view>
  55. </view>
  56. </view>
  57. <view class="main-item">
  58. <view class="mt-item" @click="change('1')" :class="{ current: tabCurrentIndex === 1 }" v-if="bank != ''">
  59. <image class="mt-image1" :src="tabCurrentIndex == 1 ? '../../static/img/bankD.png' : '../../static/img/bank.png'" mode=""></image>
  60. <view class="mt-font" :class="{ current: tabCurrentIndex === 1 }">银行卡</view>
  61. </view>
  62. </view>
  63. <view class="main-item">
  64. <view class="mt-item" @click="change('2')" :class="{ current: tabCurrentIndex === 2 }" v-if="wx != ''">
  65. <image class="mt-image2" :src="tabCurrentIndex == 2 ? '../../static/img/yueD.png' : '../../static/img/yue.png'" mode=""></image>
  66. <view class="mt-font" :class="{ current: tabCurrentIndex === 2 }">微信</view>
  67. </view>
  68. </view>
  69. </view> -->
  70. <!-- <swiper
  71. class="swiper-box"
  72. :duration="500"
  73. @change="changeTab"
  74. :style="{ height: tabCurrentIndex == 2 ? '450rpx' : tabCurrentIndex == 1 ? '340rpx' : '280rpx' }"
  75. :current="tabCurrentIndex"
  76. disable-touch
  77. >
  78. <swiper-item class="tab-content" v-if="zfb != ''">
  79. <scroll-view scroll-y="true" style="height: 100%;">
  80. <view class="tc-item flex">
  81. <view class="tcitem-name">账号</view>
  82. <view class="ali-name">{{ zfb.payment }}</view>
  83. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(zfb.payment)"></image>
  84. </view>
  85. <view class="tc-item flex">
  86. <view class="tcitem-name">姓名</view>
  87. <view class="ali-name">{{ zfb.name }}</view>
  88. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(zfb.name)"></image>
  89. </view>
  90. </scroll-view>
  91. </swiper-item>
  92. <swiper-item class="tab-content" v-else></swiper-item>
  93. <swiper-item class="tab-content" v-if="bank != ''">
  94. <scroll-view scroll-y="true" style="height: 100%;">
  95. <view class="tc-item flex">
  96. <view class="tcitem-name">姓名</view>
  97. <view class="ali-name">{{ bank.name }}</view>
  98. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.name)"></image>
  99. </view>
  100. <view class="tc-item flex">
  101. <view class="tcitem-name">银行</view>
  102. <view class="ali-name">{{ bank.bank }}</view>
  103. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.bank)"></image>
  104. </view>
  105. <view class="tc-item flex">
  106. <view class="tcitem-name">支行</view>
  107. <view class="ali-name">{{ bank.bank_name }}</view>
  108. <image @click="copy(bank.bank_name)" class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  109. </view>
  110. <view class="tc-item flex">
  111. <view class="tcitem-name">账号</view>
  112. <view class="ali-name">{{ bank.payment }}</view>
  113. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.payment)"></image>
  114. </view>
  115. </scroll-view>
  116. </swiper-item>
  117. <swiper-item class="tab-content" v-else></swiper-item>
  118. <swiper-item class="tab-content" v-if="wx != ''">
  119. <scroll-view scroll-y="true" style="height: 100%;">
  120. <view class="tc-item flex">
  121. <view class="tcitem-name">账号</view>
  122. <view class="ali-name">{{ wx.payment }}</view>
  123. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(wx.payment)"></image>
  124. </view>
  125. <view class="tc-item flex">
  126. <view class="tcitem-name">姓名</view>
  127. <view class="ali-name">{{ wx.name }}</view>
  128. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(wx.name)"></image>
  129. </view>
  130. <view class="tc-item">
  131. <view class="upload-title" style="color: #9d9d9d;">微信二维码</view>
  132. <view class="upload-main" @click="lookimg(wx.image)"><image class="upload-image" :src="wx.image" mode="aspectFit"></image></view>
  133. </view>
  134. </scroll-view>
  135. </swiper-item>
  136. <swiper-item class="tab-content" v-else></swiper-item>
  137. </swiper> -->
  138. <view class="swiper-box">
  139. <view v-if="chain" class="tab-content">
  140. <view class="tc-item flex">
  141. <view class="tcitem-name">地址</view>
  142. <view class="ali-name">{{ chain.payment }}</view>
  143. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(chain.payment)"></image>
  144. </view>
  145. <view class="tc-item flex">
  146. <view class="tcitem-name">链名</view>
  147. <view class="ali-name">{{ chain.bank }}</view>
  148. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(chain.name)"></image>
  149. </view>
  150. <view class="tc-item">
  151. <view class="upload-title" style="color: #9d9d9d;">收款码</view>
  152. <view class="upload-main" @click="lookimg(chain.image)"><image class="upload-image" :src="chain.image" mode="aspectFit"></image></view>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <view class="upload">
  158. <view class="upload-title">上传支付截图</view>
  159. <view class="upload-main">
  160. <image class="upload-image" src="../../static/img/add.png" mode="" v-if="!image" @click="uploads"></image>
  161. <image class="upload-image" :src="image" mode="" @click="uploads" v-if="image"></image>
  162. <view class="upload-font">点击上传支付截图</view>
  163. </view>
  164. </view>
  165. <view class="contentBottomHeight"></view>
  166. <view class="bottom flex">
  167. <view class="bottom-item" @click.stop="tocall()">
  168. <image class="bi-image" src="../../static/img/call.png" mode=""></image>
  169. <view class="bottom-font">联系卖家</view>
  170. </view>
  171. <view class="shu"></view>
  172. <view class="bottom-item" @click.stop="openKf()">
  173. <image class="bi-image" src="../../static/img/kf.png" mode=""></image>
  174. <view class="bottom-font">联系客服</view>
  175. </view>
  176. <view class="btn" @click.stop="buy()">完成上传</view>
  177. </view>
  178. <uni-popup ref="popupkf" type="center">
  179. <view class="popup-box">
  180. <view class="img"><image src="../../static/img/img009.png" mode=""></image></view>
  181. <view class="mian">
  182. <view class="delivery">
  183. <view class="title">已经为您定制专属客服</view>
  184. <image src="../../static/img/img010.png" mode=""></image>
  185. </view>
  186. <view class="nocancel">客服VX:{{ text }}</view>
  187. <view class="comfirm-box">
  188. <view class="cancel" @click="cancel">取消</view>
  189. <view class="comfirm" @click="copy(text)">复制微信</view>
  190. </view>
  191. </view>
  192. </view>
  193. </uni-popup>
  194. </view>
  195. </template>
  196. <script>
  197. import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
  198. import uniCopy from '@/components/js_sdk/xb-copy/uni-copy.js';
  199. import { user_auction_order, upload, up_image, edit_voucher, time } from '@/api/order.js';
  200. import { timeComputed } from '@/utils/rocessor.js';
  201. // import { json } from 'node:stream/consumers';
  202. export default {
  203. components: {
  204. uniCountdowns
  205. },
  206. data() {
  207. return {
  208. type: 1,
  209. // 倒计时
  210. stopTime: {
  211. stopTimeH: 0,
  212. stopTimeM: 0,
  213. stopTimeS: 0
  214. },
  215. tabCurrentIndex: 0,
  216. id: '',
  217. info: '',
  218. bank: '',
  219. wx: '',
  220. zfb: '',
  221. chain:'',
  222. image: '',
  223. status: 1,
  224. text: '123456',
  225. payTime: '',
  226. upFileLoding:false
  227. };
  228. },
  229. onLoad(option) {
  230. this.id = option.ordid;
  231. this.loadData();
  232. // this.getpayTime();
  233. if (option.type) {
  234. this.type = option.type;
  235. }
  236. },
  237. methods: {
  238. uploads() {
  239. const that = this;
  240. if (that.upFileLoding) {
  241. return
  242. }
  243. that.upFileLoding = true;
  244. setTimeout(()=>{
  245. that.upFileLoding = false;
  246. },1000);
  247. upload({
  248. filename: ''
  249. }).then(data => {
  250. that.image = data[0].url;
  251. }).catch((e)=>{
  252. console.log(e);
  253. });
  254. },
  255. // getpayTime() {
  256. // time().then(({ data }) => {
  257. // this.payTime = data.tow_time * 1 * 60;
  258. // this.loadData();
  259. // });
  260. // },
  261. loadData() {
  262. user_auction_order({ type: 1, order_id: this.id }).then(({ data }) => {
  263. let time = data.time * 1 > data.radd_time * 1 ? data.time : data.radd_time;
  264. let now_time = timeComputed(time + this.payTime);
  265. this.status = data.status;
  266. this.stopTime.stopTimeH = now_time.hours;
  267. this.stopTime.stopTimeM = now_time.minutes;
  268. this.stopTime.stopTimeS = now_time.seconds;
  269. this.info = data;
  270. this.zfb = data.zfb;
  271. this.wx = data.wx;
  272. this.bank = data.bank;
  273. this.chain = data.chain;
  274. console.log(data.zfb.length, '123456');
  275. if (data.zfb.length == []) {
  276. this.tabCurrentIndex = 1;
  277. if (data.bank.length == []) {
  278. this.tabCurrentIndex = 2;
  279. }
  280. }
  281. console.log(this.tabCurrentIndex);
  282. });
  283. },
  284. nav(url) {
  285. uni.navigateTo({
  286. url
  287. });
  288. },
  289. copy(value) {
  290. let obj = this;
  291. let content = value; //需要复制的内容
  292. console.log('复制的内容:', content);
  293. // content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
  294. const result = uniCopy(content);
  295. if (result === false) {
  296. uni.showToast({
  297. title: '不支持'
  298. });
  299. } else {
  300. uni.showToast({
  301. title: '复制成功',
  302. icon: 'none'
  303. });
  304. }
  305. },
  306. tocall() {
  307. let num = this.zfb != '' ? this.zfb.phone : this.wx != '' ? this.wx.phone : this.bank.phone;
  308. console.log(num);
  309. uni.makePhoneCall({
  310. phoneNumber: num //仅为示例
  311. });
  312. },
  313. // 查看大图
  314. lookimg(src) {
  315. console.log(src);
  316. let arr = [src];
  317. uni.previewImage({
  318. current: src,
  319. urls: arr
  320. });
  321. },
  322. //swiper 切换
  323. changeTab(e) {
  324. this.tabCurrentIndex = e.target.current;
  325. },
  326. toBack() {
  327. uni.navigateBack({});
  328. },
  329. change(num) {
  330. this.tabCurrentIndex = num * 1;
  331. },
  332. // 打开客服
  333. openKf() {
  334. this.$refs.popupkf.open();
  335. },
  336. // 关闭客服
  337. cancel() {
  338. this.$refs.popupkf.close();
  339. },
  340. buy() {
  341. if (this.image == '') {
  342. return this.$api.msg('请上传支付凭证');
  343. }
  344. if (this.type == 1) {
  345. up_image({ id: this.info.id, image: this.image }).then(({ data }) => {
  346. uni.navigateTo({
  347. url: '/pages/money/success'
  348. });
  349. });
  350. }
  351. if (this.type == 2) {
  352. edit_voucher({ order_id: this.id, image: this.image }).then(({ data }) => {
  353. uni.navigateTo({
  354. url: '/pages/money/success'
  355. });
  356. });
  357. }
  358. }
  359. }
  360. };
  361. </script>
  362. <style lang="less">
  363. .center {
  364. background: #f8f6f6;
  365. min-height: 100%;
  366. height: auto;
  367. }
  368. .top {
  369. margin-top: 10rpx;
  370. background-color: #ffffff;
  371. padding: 56rpx 0;
  372. display: flex;
  373. flex-direction: column;
  374. justify-content: center;
  375. align-items: center;
  376. .top-main {
  377. display: flex;
  378. justify-content: center;
  379. align-items: center;
  380. line-height: 1;
  381. .num {
  382. font-size: 28rpx;
  383. font-family: PingFang SC;
  384. font-weight: bold;
  385. color: #fd3b39;
  386. text {
  387. font-size: 50rpx;
  388. }
  389. }
  390. .top-image {
  391. margin-left: 10rpx;
  392. width: 26rpx;
  393. height: 28rpx;
  394. }
  395. }
  396. .downtime {
  397. margin-top: 20rpx;
  398. }
  399. }
  400. .product {
  401. margin-top: 20rpx;
  402. padding: 35rpx 35rpx 40rpx 35rpx;
  403. background-color: #ffffff;
  404. justify-content: flex-start;
  405. align-items: flex-start;
  406. .product-image {
  407. width: 210rpx;
  408. height: 210rpx;
  409. border-radius: 10rpx;
  410. }
  411. .product-info {
  412. margin-left: 26rpx;
  413. padding-top: 10rpx;
  414. line-height: 1;
  415. .title {
  416. line-height: 1;
  417. font-size: 30rpx;
  418. font-family: PingFang SC;
  419. font-weight: bold;
  420. color: #333333;
  421. text {
  422. color: #999999;
  423. }
  424. }
  425. .buyId {
  426. margin-top: 30rpx;
  427. }
  428. .buyName {
  429. margin-top: 24rpx;
  430. }
  431. .buyPhone {
  432. margin-top: 24rpx;
  433. }
  434. }
  435. }
  436. .main {
  437. margin-top: 20rpx;
  438. padding: 30rpx 0 40rpx;
  439. background: #ffffff;
  440. .main-tip {
  441. padding: 0 30rpx;
  442. font-size: 30rpx;
  443. font-family: PingFang SC;
  444. font-weight: 500;
  445. color: #999999;
  446. }
  447. .main-title {
  448. margin-top: 34rpx;
  449. justify-content: flex-start;
  450. .current {
  451. background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
  452. color: #ffffff !important;
  453. }
  454. .main-item {
  455. width: 33%;
  456. }
  457. .mt-item {
  458. margin: 0 auto;
  459. width: 160rpx;
  460. height: 60rpx;
  461. background: #f8f8f8;
  462. border-radius: 10rpx;
  463. display: flex;
  464. justify-content: center;
  465. align-items: center;
  466. .mt-image {
  467. width: 32rpx;
  468. height: 32rpx;
  469. }
  470. .mt-image1 {
  471. width: 38rpx;
  472. height: 32rpx;
  473. }
  474. .mt-image2 {
  475. width: 36rpx;
  476. height: 32rpx;
  477. }
  478. .mt-font {
  479. margin-left: 10rpx;
  480. font-size: 30rpx;
  481. font-family: PingFang SC;
  482. font-weight: bold;
  483. color: #333333;
  484. }
  485. }
  486. }
  487. .swiper-box {
  488. width: 100%;
  489. padding: 14rpx 30rpx 0;
  490. .tc-item {
  491. padding: 50rpx 2rpx 0;
  492. line-height: 1;
  493. .tcitem-name {
  494. width: 118rpx;
  495. font-size: 30rpx;
  496. font-family: PingFang SC;
  497. font-weight: 500;
  498. color: #999999;
  499. }
  500. .ali-name {
  501. width: 380rpx;
  502. font-size: 30rpx;
  503. font-family: PingFang SC;
  504. font-weight: 500;
  505. color: #333333;
  506. }
  507. .tcitem-image {
  508. width: 26rpx;
  509. height: 28rpx;
  510. }
  511. }
  512. }
  513. }
  514. .upload-image {
  515. width: 160rpx;
  516. height: 160rpx;
  517. border-radius: 10rpx;
  518. }
  519. .upload-title {
  520. font-size: 30rpx;
  521. font-family: PingFang SC;
  522. font-weight: bold;
  523. color: #333333;
  524. }
  525. .upload-main {
  526. padding-top: 32rpx;
  527. display: flex;
  528. justify-content: center;
  529. align-items: center;
  530. flex-direction: column;
  531. .upload-font {
  532. margin-top: 24rpx;
  533. font-size: 30rpx;
  534. font-family: PingFang SC;
  535. font-weight: bold;
  536. color: #333333;
  537. }
  538. }
  539. .upload {
  540. margin-top: 20rpx;
  541. padding: 34rpx 30rpx 40rpx 30rpx;
  542. background: #ffffff;
  543. }
  544. .bottom {
  545. position: fixed;
  546. bottom: 0;
  547. background: #ffffff;
  548. width: 750rpx;
  549. height: 146rpx;
  550. justify-content: flex-start;
  551. .bottom-item {
  552. margin-left: 30rpx;
  553. display: flex;
  554. flex-direction: column;
  555. align-items: center;
  556. .bi-image {
  557. width: 38rpx;
  558. height: 34rpx;
  559. }
  560. .bottom-font {
  561. margin-top: 14rpx;
  562. font-size: 24rpx;
  563. font-family: PingFang SC;
  564. font-weight: bold;
  565. color: #333333;
  566. }
  567. .bottom-num {
  568. line-height: 1;
  569. font-size: 24rpx;
  570. font-family: PingFang SC;
  571. font-weight: bold;
  572. color: #333333;
  573. }
  574. }
  575. .shu {
  576. margin-left: 20rpx;
  577. width: 2px;
  578. height: 74rpx;
  579. background: #c0bfc0;
  580. }
  581. .btn {
  582. margin-left: 20rpx;
  583. width: 430rpx;
  584. height: 80rpx;
  585. background: #fd3b39;
  586. border-radius: 20rpx;
  587. text-align: center;
  588. font-size: 34rpx;
  589. font-family: PingFang SC;
  590. font-weight: bold;
  591. color: #ffffff;
  592. line-height: 80rpx;
  593. }
  594. }
  595. // 文章页底部高度撑开
  596. .contentBottomHeight {
  597. height: 150rpx;
  598. }
  599. .popup-box {
  600. width: 522rpx;
  601. height: 605rpx;
  602. background-color: #ffffff;
  603. border-radius: 20rpx;
  604. position: relative;
  605. .img {
  606. position: relative;
  607. top: -56rpx;
  608. left: 0;
  609. width: 522rpx;
  610. height: 132rpx;
  611. display: flex;
  612. justify-content: center;
  613. image {
  614. border-radius: 20rpx 20rpx 0 0;
  615. width: 450rpx;
  616. height: 132rpx;
  617. }
  618. }
  619. .mian {
  620. margin-top: -44rpx;
  621. display: flex;
  622. flex-direction: column;
  623. align-items: center;
  624. // padding: 32rpx 32rpx;
  625. background-color: #ffffff;
  626. border-radius: 0 0 20rpx 20rpx;
  627. text-align: center;
  628. .delivery {
  629. font-size: 40rpx;
  630. color: #333333;
  631. display: flex;
  632. align-items: center;
  633. flex-direction: column;
  634. .title {
  635. }
  636. image {
  637. margin-top: 48rpx;
  638. width: 172rpx;
  639. height: 160rpx;
  640. }
  641. }
  642. .nocancel {
  643. font-size: 32rpx;
  644. color: #333333;
  645. margin-top: 14rpx;
  646. }
  647. .comfirm-box {
  648. margin-top: 52rpx;
  649. display: flex;
  650. // margin-bottom: 32rpx;
  651. // justify-content: space-around;
  652. .cancel {
  653. display: flex;
  654. align-items: center;
  655. justify-content: center;
  656. width: 197rpx;
  657. height: 74rpx;
  658. border: 1px solid #dcc786;
  659. border-radius: 38rpx;
  660. font-size: 32rpx;
  661. color: #605128;
  662. }
  663. .comfirm {
  664. margin-left: 32rpx;
  665. display: flex;
  666. align-items: center;
  667. justify-content: center;
  668. width: 197rpx;
  669. height: 74rpx;
  670. background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
  671. border-radius: 38px;
  672. font-size: 32rpx;
  673. color: #605128;
  674. }
  675. }
  676. }
  677. }
  678. </style>