hallpay.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  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. uni.navigateTo({
  212. url:'/pages/money/success'
  213. })
  214. })
  215. }
  216. }
  217. };
  218. </script>
  219. <style lang="less">
  220. .center {
  221. background: #f8f6f6;
  222. min-height: 100%;
  223. height: auto;
  224. }
  225. .top {
  226. margin-top: 10rpx;
  227. background-color: #ffffff;
  228. padding: 56rpx 0;
  229. display: flex;
  230. flex-direction: column;
  231. justify-content: center;
  232. align-items: center;
  233. .top-main {
  234. display: flex;
  235. justify-content: center;
  236. align-items: center;
  237. line-height: 1;
  238. .num {
  239. font-size: 28rpx;
  240. font-family: PingFang SC;
  241. font-weight: bold;
  242. color: #fd3b39;
  243. text {
  244. font-size: 50rpx;
  245. }
  246. }
  247. .top-image {
  248. margin-left: 10rpx;
  249. width: 26rpx;
  250. height: 28rpx;
  251. }
  252. }
  253. .downtime {
  254. margin-top: 20rpx;
  255. }
  256. }
  257. .product {
  258. margin-top: 20rpx;
  259. padding: 35rpx 35rpx 40rpx 35rpx;
  260. background-color: #ffffff;
  261. justify-content: flex-start;
  262. align-items: flex-start;
  263. .product-image {
  264. width: 210rpx;
  265. height: 210rpx;
  266. border-radius: 10rpx;
  267. }
  268. .product-info {
  269. margin-left: 26rpx;
  270. padding-top: 10rpx;
  271. line-height: 1;
  272. .title {
  273. line-height: 1;
  274. font-size: 30rpx;
  275. font-family: PingFang SC;
  276. font-weight: bold;
  277. color: #333333;
  278. text {
  279. color: #999999;
  280. }
  281. }
  282. .buyId {
  283. margin-top: 30rpx;
  284. }
  285. .buyName {
  286. margin-top: 24rpx;
  287. }
  288. .buyPhone {
  289. margin-top: 24rpx;
  290. }
  291. }
  292. }
  293. .main {
  294. margin-top: 20rpx;
  295. padding: 30rpx 0 40rpx;
  296. background: #ffffff;
  297. .main-tip {
  298. padding: 0 30rpx;
  299. font-size: 30rpx;
  300. font-family: PingFang SC;
  301. font-weight: 500;
  302. color: #999999;
  303. }
  304. .main-title {
  305. margin-top: 34rpx;
  306. justify-content: flex-start;
  307. .current {
  308. background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
  309. color: #ffffff !important;
  310. }
  311. .main-item {
  312. width: 33%;
  313. }
  314. .mt-item {
  315. margin: 0 auto;
  316. width: 160rpx;
  317. height: 60rpx;
  318. background: #f8f8f8;
  319. border-radius: 10rpx;
  320. display: flex;
  321. justify-content: center;
  322. align-items: center;
  323. .mt-image {
  324. width: 32rpx;
  325. height: 32rpx;
  326. }
  327. .mt-image1 {
  328. width: 38rpx;
  329. height: 32rpx;
  330. }
  331. .mt-image2 {
  332. width: 36rpx;
  333. height: 32rpx;
  334. }
  335. .mt-font {
  336. margin-left: 10rpx;
  337. font-size: 30rpx;
  338. font-family: PingFang SC;
  339. font-weight: bold;
  340. color: #333333;
  341. }
  342. }
  343. }
  344. .swiper-box {
  345. width: 100%;
  346. padding: 14rpx 30rpx 0;
  347. .tc-item {
  348. padding: 50rpx 2rpx 0;
  349. line-height: 1;
  350. .tcitem-name {
  351. width: 118rpx;
  352. font-size: 30rpx;
  353. font-family: PingFang SC;
  354. font-weight: 500;
  355. color: #999999;
  356. }
  357. .ali-name {
  358. width: 380rpx;
  359. font-size: 30rpx;
  360. font-family: PingFang SC;
  361. font-weight: 500;
  362. color: #333333;
  363. }
  364. .tcitem-image {
  365. width: 26rpx;
  366. height: 28rpx;
  367. }
  368. }
  369. }
  370. }
  371. .upload-image {
  372. width: 160rpx;
  373. height: 160rpx;
  374. border-radius: 10rpx;
  375. }
  376. .upload-title {
  377. font-size: 30rpx;
  378. font-family: PingFang SC;
  379. font-weight: bold;
  380. color: #333333;
  381. }
  382. .upload-main {
  383. padding-top: 32rpx;
  384. display: flex;
  385. justify-content: center;
  386. align-items: center;
  387. flex-direction: column;
  388. .upload-font {
  389. margin-top: 24rpx;
  390. font-size: 30rpx;
  391. font-family: PingFang SC;
  392. font-weight: bold;
  393. color: #333333;
  394. }
  395. }
  396. .upload {
  397. margin-top: 20rpx;
  398. padding: 34rpx 30rpx 40rpx 30rpx;
  399. background: #ffffff;
  400. }
  401. .bottom {
  402. position: fixed;
  403. bottom: 0;
  404. background: #ffffff;
  405. width: 750rpx;
  406. height: 146rpx;
  407. justify-content: flex-start;
  408. .bottom-item {
  409. margin-left: 30rpx;
  410. display: flex;
  411. flex-direction: column;
  412. align-items: center;
  413. .bi-image {
  414. width: 38rpx;
  415. height: 34rpx;
  416. }
  417. .bottom-font {
  418. margin-top: 14rpx;
  419. font-size: 24rpx;
  420. font-family: PingFang SC;
  421. font-weight: bold;
  422. color: #333333;
  423. }
  424. .bottom-num {
  425. line-height: 1;
  426. font-size: 24rpx;
  427. font-family: PingFang SC;
  428. font-weight: bold;
  429. color: #333333;
  430. }
  431. }
  432. .shu {
  433. margin-left: 20rpx;
  434. width: 2px;
  435. height: 74rpx;
  436. background: #c0bfc0;
  437. }
  438. .btn {
  439. margin-left: 20rpx;
  440. width: 430rpx;
  441. height: 80rpx;
  442. background: #fd3b39;
  443. border-radius: 20rpx;
  444. text-align: center;
  445. font-size: 34rpx;
  446. font-family: PingFang SC;
  447. font-weight: bold;
  448. color: #ffffff;
  449. line-height: 80rpx;
  450. }
  451. }
  452. // 文章页底部高度撑开
  453. .contentBottomHeight {
  454. height: 150rpx;
  455. }
  456. </style>