hallpay.vue 11 KB

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