hallpay.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <template>
  2. <view class="center">
  3. <view class="top">
  4. <view class="top-main">
  5. <view class="num">
  6. <text>{{ info.price }}</text>
  7. </view>
  8. <!-- <image class="top-image" src="../../static/img/copy.png" mode=""></image> -->
  9. </view>
  10. <view class="downtime">
  11. <uni-countdowns
  12. color="#FFFFFF"
  13. splitor-color="#FD3B39"
  14. background-color="#FD3B39"
  15. border-color="#FD3B39"
  16. :show-day="false"
  17. :hour="stopTime.stopTimeH"
  18. :minute="stopTime.stopTimeM"
  19. :second="stopTime.stopTimeS"
  20. ></uni-countdowns>
  21. </view>
  22. </view>
  23. <view class="product flex">
  24. <image class="product-image" :src="info.image" mode=""></image>
  25. <view class="product-info">
  26. <view class="title">{{ info.name }}</view>
  27. <view class="title buyId">
  28. <text>卖家ID:</text>
  29. {{ info.user_id }}
  30. </view>
  31. <view class="title buyName">
  32. <text>卖家昵称:</text>
  33. {{ info.nickname }}
  34. </view>
  35. <!-- <view class="title buyPhone">
  36. <text>卖家手机号:</text>
  37. 123456897
  38. </view> -->
  39. </view>
  40. </view>
  41. <view class="main">
  42. <view class="main-tip">请向以下账号自行转账(任选一种方式)</view>
  43. <view class="main-title flex">
  44. <view class="main-item">
  45. <view class="mt-item" @click="change('0')" :class="{ current: tabCurrentIndex === 0 }" v-if="zfb != ''">
  46. <image class="mt-image" :src="tabCurrentIndex == 0 ? '../../static/img/aliD.png' : '../../static/img/ali.png'" mode=""></image>
  47. <view class="mt-font" :class="{ current: tabCurrentIndex === 0 }">支付宝</view>
  48. </view>
  49. </view>
  50. <view class="main-item">
  51. <view class="mt-item" @click="change('1')" :class="{ current: tabCurrentIndex === 1 }" v-if="bank != ''">
  52. <image class="mt-image1" :src="tabCurrentIndex == 1 ? '../../static/img/bankD.png' : '../../static/img/bank.png'" mode=""></image>
  53. <view class="mt-font" :class="{ current: tabCurrentIndex === 1 }">银行卡</view>
  54. </view>
  55. </view>
  56. <view class="main-item">
  57. <view class="mt-item" @click="change('2')" :class="{ current: tabCurrentIndex === 2 }" v-if="wx != ''">
  58. <image class="mt-image2" :src="tabCurrentIndex == 2 ? '../../static/img/yueD.png' : '../../static/img/yue.png'" mode=""></image>
  59. <view class="mt-font" :class="{ current: tabCurrentIndex === 2 }">微信</view>
  60. </view>
  61. </view>
  62. </view>
  63. <swiper class="swiper-box" :current="tabCurrentIndex" :duration="500" @change="changeTab" :style="{ height: tabCurrentIndex == 2 ? '450rpx' : '280rpx' }">
  64. <swiper-item class="tab-content" v-if="zfb != ''">
  65. <view class="tc-item flex">
  66. <view class="tcitem-name">账号</view>
  67. <view class="ali-name">{{ zfb.payment }}</view>
  68. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  69. </view>
  70. <view class="tc-item flex">
  71. <view class="tcitem-name">姓名</view>
  72. <view class="ali-name">{{ zfb.name }}</view>
  73. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  74. </view>
  75. </swiper-item>
  76. <swiper-item class="tab-content" v-if="bank != ''">
  77. <view class="tc-item flex">
  78. <view class="tcitem-name">姓名</view>
  79. <view class="ali-name">{{ bank.name }}</view>
  80. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  81. </view>
  82. <view class="tc-item flex">
  83. <view class="tcitem-name">银行</view>
  84. <view class="ali-name">{{ bank.bank }}</view>
  85. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  86. </view>
  87. <!-- <view class="tc-item flex">
  88. <view class="tcitem-name">开户行</view>
  89. <view class="ali-name">椒江支行</view>
  90. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  91. </view> -->
  92. <view class="tc-item flex">
  93. <view class="tcitem-name">账号</view>
  94. <view class="ali-name">{{ bank.payment }}</view>
  95. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  96. </view>
  97. </swiper-item>
  98. <swiper-item class="tab-content" v-if="wx != ''">
  99. <view class="tc-item flex">
  100. <view class="tcitem-name">账号</view>
  101. <view class="ali-name">{{ wx.payment }}</view>
  102. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  103. </view>
  104. <view class="tc-item flex">
  105. <view class="tcitem-name">姓名</view>
  106. <view class="ali-name">{{ wx.name }}</view>
  107. <image class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  108. </view>
  109. <view class="tc-item">
  110. <view class="upload-title" style="color: #9d9d9d;">微信二维码</view>
  111. <view class="upload-main"><image class="upload-image" :src="wx.image" mode=""></image></view>
  112. </view>
  113. </swiper-item>
  114. </swiper>
  115. </view>
  116. <view class="upload">
  117. <view class="upload-title">上传支付截图</view>
  118. <view class="upload-main">
  119. <image class="upload-image" src="../../static/img/add.png" mode="" v-if="image == ''" @click="uploads()"></image>
  120. <image class="upload-image" :src="image" mode="" @click="uploads()" v-else></image>
  121. <view class="upload-font">点击上传支付截图</view>
  122. </view>
  123. </view>
  124. <view class="contentBottomHeight"></view>
  125. <view class="bottom flex">
  126. <view class="bottom-item">
  127. <image class="bi-image" src="../../static/img/call.png" mode=""></image>
  128. <view class="bottom-font">联系卖家</view>
  129. </view>
  130. <view class="shu"></view>
  131. <view class="bottom-item">
  132. <image class="bi-image" src="../../static/img/kf.png" mode=""></image>
  133. <view class="bottom-font">联系客服</view>
  134. </view>
  135. <view class="btn" @click="buy()">立即购买</view>
  136. </view>
  137. </view>
  138. </template>
  139. <script>
  140. import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
  141. import { user_auction_order,upload,up_image } from '@/api/order.js';
  142. import { timeComputed } from '@/utils/rocessor.js';
  143. export default {
  144. components: {
  145. uniCountdowns
  146. },
  147. data() {
  148. return {
  149. // 倒计时
  150. stopTime: {
  151. stopTimeH: 0,
  152. stopTimeM: 0,
  153. stopTimeS: 0
  154. },
  155. tabCurrentIndex: 0,
  156. id: '',
  157. info: '',
  158. bank: '',
  159. wx: '',
  160. zfb: '',
  161. image:'',
  162. };
  163. },
  164. onLoad(option) {
  165. this.id = option.ordid;
  166. this.loadData();
  167. },
  168. methods: {
  169. uploads(){
  170. upload({
  171. filename: ''
  172. }).then(data => {
  173. this.image = data[0].url;
  174. })
  175. },
  176. loadData() {
  177. user_auction_order({ type: 1, order_id: this.id }).then(({ data }) => {
  178. let now_time = timeComputed(data.time);
  179. this.stopTime.stopTimeH = now_time.hours;
  180. this.stopTime.stopTimeM = now_time.minutes;
  181. this.stopTime.stopTimeS = now_time.seconds;
  182. this.info = data;
  183. this.zfb = data.zfb;
  184. this.wx = data.wx;
  185. this.bank = data.bank;
  186. });
  187. },
  188. open() {
  189. this.$refs.popup.open();
  190. },
  191. close() {
  192. this.$refs.popup.close();
  193. },
  194. nav(url) {
  195. uni.navigateTo({
  196. url
  197. });
  198. },
  199. //swiper 切换
  200. changeTab(e) {
  201. this.tabCurrentIndex = e.target.current;
  202. },
  203. toBack() {
  204. uni.navigateBack({});
  205. },
  206. change(num) {
  207. this.tabCurrentIndex = num * 1;
  208. },
  209. buy() {
  210. up_image({id:this.info.id,image: this.image}).then(({data}) => {
  211. this.$api.msg(支付成功)
  212. })
  213. }
  214. }
  215. };
  216. </script>
  217. <style lang="less">
  218. .center {
  219. background: #f8f6f6;
  220. min-height: 100%;
  221. height: auto;
  222. }
  223. .top {
  224. margin-top: 10rpx;
  225. background-color: #ffffff;
  226. padding: 56rpx 0;
  227. display: flex;
  228. flex-direction: column;
  229. justify-content: center;
  230. align-items: center;
  231. .top-main {
  232. display: flex;
  233. justify-content: center;
  234. align-items: center;
  235. line-height: 1;
  236. .num {
  237. font-size: 28rpx;
  238. font-family: PingFang SC;
  239. font-weight: bold;
  240. color: #fd3b39;
  241. text {
  242. font-size: 50rpx;
  243. }
  244. }
  245. .top-image {
  246. margin-left: 10rpx;
  247. width: 26rpx;
  248. height: 28rpx;
  249. }
  250. }
  251. .downtime {
  252. margin-top: 20rpx;
  253. }
  254. }
  255. .product {
  256. margin-top: 20rpx;
  257. padding: 35rpx 35rpx 40rpx 35rpx;
  258. background-color: #ffffff;
  259. justify-content: flex-start;
  260. align-items: flex-start;
  261. .product-image {
  262. width: 210rpx;
  263. height: 210rpx;
  264. border-radius: 10rpx;
  265. }
  266. .product-info {
  267. margin-left: 26rpx;
  268. padding-top: 10rpx;
  269. line-height: 1;
  270. .title {
  271. line-height: 1;
  272. font-size: 30rpx;
  273. font-family: PingFang SC;
  274. font-weight: bold;
  275. color: #333333;
  276. text {
  277. color: #999999;
  278. }
  279. }
  280. .buyId {
  281. margin-top: 30rpx;
  282. }
  283. .buyName {
  284. margin-top: 24rpx;
  285. }
  286. .buyPhone {
  287. margin-top: 24rpx;
  288. }
  289. }
  290. }
  291. .main {
  292. margin-top: 20rpx;
  293. padding: 30rpx 0 40rpx;
  294. background: #ffffff;
  295. .main-tip {
  296. padding: 0 30rpx;
  297. font-size: 30rpx;
  298. font-family: PingFang SC;
  299. font-weight: 500;
  300. color: #999999;
  301. }
  302. .main-title {
  303. margin-top: 34rpx;
  304. justify-content: flex-start;
  305. .current {
  306. background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
  307. color: #ffffff !important;
  308. }
  309. .main-item {
  310. width: 33%;
  311. }
  312. .mt-item {
  313. margin: 0 auto;
  314. width: 160rpx;
  315. height: 60rpx;
  316. background: #f8f8f8;
  317. border-radius: 10rpx;
  318. display: flex;
  319. justify-content: center;
  320. align-items: center;
  321. .mt-image {
  322. width: 32rpx;
  323. height: 32rpx;
  324. }
  325. .mt-image1 {
  326. width: 38rpx;
  327. height: 32rpx;
  328. }
  329. .mt-image2 {
  330. width: 36rpx;
  331. height: 32rpx;
  332. }
  333. .mt-font {
  334. margin-left: 10rpx;
  335. font-size: 30rpx;
  336. font-family: PingFang SC;
  337. font-weight: bold;
  338. color: #333333;
  339. }
  340. }
  341. }
  342. .swiper-box {
  343. width: 100%;
  344. padding: 14rpx 30rpx 0;
  345. .tc-item {
  346. padding: 50rpx 2rpx 0;
  347. line-height: 1;
  348. .tcitem-name {
  349. width: 118rpx;
  350. font-size: 30rpx;
  351. font-family: PingFang SC;
  352. font-weight: 500;
  353. color: #999999;
  354. }
  355. .ali-name {
  356. width: 380rpx;
  357. font-size: 30rpx;
  358. font-family: PingFang SC;
  359. font-weight: 500;
  360. color: #333333;
  361. }
  362. .tcitem-image {
  363. width: 26rpx;
  364. height: 28rpx;
  365. }
  366. }
  367. }
  368. }
  369. .upload-image {
  370. width: 160rpx;
  371. height: 160rpx;
  372. border-radius: 10rpx;
  373. }
  374. .upload-title {
  375. font-size: 30rpx;
  376. font-family: PingFang SC;
  377. font-weight: bold;
  378. color: #333333;
  379. }
  380. .upload-main {
  381. padding-top: 32rpx;
  382. display: flex;
  383. justify-content: center;
  384. align-items: center;
  385. flex-direction: column;
  386. .upload-font {
  387. margin-top: 24rpx;
  388. font-size: 30rpx;
  389. font-family: PingFang SC;
  390. font-weight: bold;
  391. color: #333333;
  392. }
  393. }
  394. .upload {
  395. margin-top: 20rpx;
  396. padding: 34rpx 30rpx 40rpx 30rpx;
  397. background: #ffffff;
  398. }
  399. .bottom {
  400. position: fixed;
  401. bottom: 0;
  402. background: #ffffff;
  403. width: 750rpx;
  404. height: 146rpx;
  405. justify-content: flex-start;
  406. .bottom-item {
  407. margin-left: 30rpx;
  408. display: flex;
  409. flex-direction: column;
  410. align-items: center;
  411. .bi-image {
  412. width: 38rpx;
  413. height: 34rpx;
  414. }
  415. .bottom-font {
  416. margin-top: 14rpx;
  417. font-size: 24rpx;
  418. font-family: PingFang SC;
  419. font-weight: bold;
  420. color: #333333;
  421. }
  422. .bottom-num {
  423. line-height: 1;
  424. font-size: 24rpx;
  425. font-family: PingFang SC;
  426. font-weight: bold;
  427. color: #333333;
  428. }
  429. }
  430. .shu {
  431. margin-left: 20rpx;
  432. width: 2px;
  433. height: 74rpx;
  434. background: #c0bfc0;
  435. }
  436. .btn {
  437. margin-left: 20rpx;
  438. width: 430rpx;
  439. height: 80rpx;
  440. background: #fd3b39;
  441. border-radius: 20rpx;
  442. text-align: center;
  443. font-size: 34rpx;
  444. font-family: PingFang SC;
  445. font-weight: bold;
  446. color: #ffffff;
  447. line-height: 80rpx;
  448. }
  449. }
  450. // 文章页底部高度撑开
  451. .contentBottomHeight {
  452. height: 150rpx;
  453. }
  454. </style>