hallorderDetail.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. <template>
  2. <view class="content">
  3. <view class="order-item">
  4. <view class="goods-box-single">
  5. <image class="goods-img" :src="item.image" mode="aspectFill"></image>
  6. <view class="right position-relative">
  7. <view class="flex">
  8. <text class="title">{{ item.name }}</text>
  9. <view class="title-right">
  10. <view class="price">{{ item.price }}</view>
  11. </view>
  12. </view>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="row b-b flex">
  17. <text class="tit">订单总价</text>
  18. <view class="input">¥{{ item.price }}</view>
  19. </view>
  20. <view class="orderDetialBox">
  21. <view class="f-header m-t">
  22. <view class="f-left-icon"></view>
  23. <view class="tit-box"><text class="tit">订单信息</text></view>
  24. </view>
  25. <view class="item flex">
  26. <view class="title-left flex">
  27. <text class="title">订单编号:</text>
  28. <view class="text">{{ item.order_id }}</view>
  29. </view>
  30. <view class="buttom-right" @click="copyOrderId(item.order_id)">复制单号</view>
  31. </view>
  32. <view class="item flex">
  33. <view class="title-left flex">
  34. <text class="title">下单时间:</text>
  35. <view class="text">{{ item.create_time }}</view>
  36. </view>
  37. </view>
  38. <view class="item flex">
  39. <view class="title-left flex">
  40. <text class="title">完成时间:</text>
  41. <view class="text">{{ item.update_time }}</view>
  42. </view>
  43. </view>
  44. <view class="item flex">
  45. <view class="title-left flex">
  46. <text class="title">卖家昵称:</text>
  47. <view class="text">{{ item.c_nickname }}</view>
  48. </view>
  49. </view>
  50. <view class="item flex">
  51. <view class="title-left flex">
  52. <text class="title">卖家电话:</text>
  53. <view class="text">{{ item.phone }}</view>
  54. </view>
  55. </view>
  56. <view class="main">
  57. <!-- <view class="main-tip">卖家收款方式</view> -->
  58. <!-- <view class="main-title flex">
  59. <view class="main-item">
  60. <view class="mt-item" @click="change('0')" :class="{ current: tabCurrentIndex === 0 }" v-if="zfb != ''">
  61. <image class="mt-image" :src="tabCurrentIndex == 0 ? '../../static/img/aliD.png' : '../../static/img/ali.png'" mode=""></image>
  62. <view class="mt-font" :class="{ current: tabCurrentIndex === 0 }">支付宝</view>
  63. </view>
  64. </view>
  65. <view class="main-item">
  66. <view class="mt-item" @click="change('1')" :class="{ current: tabCurrentIndex === 1 }" v-if="bank != ''">
  67. <image class="mt-image1" :src="tabCurrentIndex == 1 ? '../../static/img/bankD.png' : '../../static/img/bank.png'" mode=""></image>
  68. <view class="mt-font" :class="{ current: tabCurrentIndex === 1 }">银行卡</view>
  69. </view>
  70. </view>
  71. <view class="main-item">
  72. <view class="mt-item" @click="change('2')" :class="{ current: tabCurrentIndex === 2 }" v-if="wx != ''">
  73. <image class="mt-image2" :src="tabCurrentIndex == 2 ? '../../static/img/yueD.png' : '../../static/img/yue.png'" mode=""></image>
  74. <view class="mt-font" :class="{ current: tabCurrentIndex === 2 }">微信</view>
  75. </view>
  76. </view>
  77. <view class="main-item">
  78. <view class="mt-item" @click="change('3')" :class="{ current: tabCurrentIndex === 3 }" v-if="chain != ''">
  79. <image class="mt-image2" :src="tabCurrentIndex == 3 ? '../../static/img/yueD.png' : '../../static/img/yue.png'" mode=""></image>
  80. <view class="mt-font" :class="{ current: tabCurrentIndex === 3 }">钱包</view>
  81. </view>
  82. </view>
  83. </view> -->
  84. <view class="swiper-box" v-if="chain != ''">
  85. <view class="tc-item flex">
  86. <view class="tcitem-name">地址</view>
  87. <view class="ali-name">{{ chain.payment }}</view>
  88. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(chain.payment)"></image>
  89. </view>
  90. <view class="tc-item flex">
  91. <view class="tcitem-name">链名</view>
  92. <view class="ali-name">{{ chain.bank }}</view>
  93. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(chain.bank)"></image>
  94. </view>
  95. <view class="tc-item">
  96. <view class="upload-title" style="color: #9d9d9d;">钱包二维码</view>
  97. <view class="upload-main" @click="lookimg(chain.image)"><image class="upload-image" :src="chain.image" mode="aspectFit"></image></view>
  98. </view>
  99. </view>
  100. <!-- <swiper
  101. class="swiper-box"
  102. :duration="500"
  103. @change="changeTab"
  104. :style="{ height: tabCurrentIndex == 2 ? '450rpx' : tabCurrentIndex == 1 ? '340rpx' : '280rpx' }"
  105. :current="tabCurrentIndex"
  106. disable-touch
  107. >
  108. <swiper-item class="tab-content" v-if="zfb != ''">
  109. <scroll-view scroll-y="true" style="height: 100%;">
  110. <view class="tc-item flex">
  111. <view class="tcitem-name">账号</view>
  112. <view class="ali-name">{{ zfb.payment }}</view>
  113. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(zfb.payment)"></image>
  114. </view>
  115. <view class="tc-item flex">
  116. <view class="tcitem-name">姓名</view>
  117. <view class="ali-name">{{ zfb.name }}</view>
  118. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(zfb.name)"></image>
  119. </view>
  120. </scroll-view>
  121. </swiper-item>
  122. <swiper-item class="tab-content" v-else></swiper-item>
  123. <swiper-item class="tab-content" v-if="bank != ''">
  124. <scroll-view scroll-y="true" style="height: 100%;">
  125. <view class="tc-item flex">
  126. <view class="tcitem-name">姓名</view>
  127. <view class="ali-name">{{ bank.name }}</view>
  128. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.name)"></image>
  129. </view>
  130. <view class="tc-item flex">
  131. <view class="tcitem-name">银行</view>
  132. <view class="ali-name">{{ bank.bank }}</view>
  133. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.bank)"></image>
  134. </view>
  135. <view class="tc-item flex">
  136. <view class="tcitem-name">支行</view>
  137. <view class="ali-name">{{ bank.bank_name }}</view>
  138. <image @click="copy(bank.bank_name)" class="tcitem-image" src="../../static/img/copy.png" mode=""></image>
  139. </view>
  140. <view class="tc-item flex">
  141. <view class="tcitem-name">账号</view>
  142. <view class="ali-name">{{ bank.payment }}</view>
  143. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(bank.payment)"></image>
  144. </view>
  145. </scroll-view>
  146. </swiper-item>
  147. <swiper-item class="tab-content" v-else></swiper-item>
  148. <swiper-item class="tab-content" v-if="wx != ''">
  149. <scroll-view scroll-y="true" style="height: 100%;">
  150. <view class="tc-item flex">
  151. <view class="tcitem-name">账号</view>
  152. <view class="ali-name">{{ wx.payment }}</view>
  153. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(wx.payment)"></image>
  154. </view>
  155. <view class="tc-item flex">
  156. <view class="tcitem-name">姓名</view>
  157. <view class="ali-name">{{ wx.name }}</view>
  158. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(wx.name)"></image>
  159. </view>
  160. <view class="tc-item">
  161. <view class="upload-title" style="color: #9d9d9d;">微信二维码</view>
  162. <view class="upload-main" @click="lookimg(wx.image)"><image class="upload-image" :src="wx.image" mode="aspectFit"></image></view>
  163. </view>
  164. </scroll-view>
  165. </swiper-item>
  166. <swiper-item class="tab-content" v-else></swiper-item>
  167. <swiper-item class="tab-content" v-if="chain != ''">
  168. <scroll-view scroll-y="true" style="height: 100%;">
  169. <view class="tc-item flex">
  170. <view class="tcitem-name">地址</view>
  171. <view class="ali-name">{{ chain.payment }}</view>
  172. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(chain.payment)"></image>
  173. </view>
  174. <view class="tc-item flex">
  175. <view class="tcitem-name">姓名</view>
  176. <view class="ali-name">{{ chain.name }}</view>
  177. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(chain.name)"></image>
  178. </view>
  179. <view class="tc-item flex">
  180. <view class="tcitem-name">链名</view>
  181. <view class="ali-name">{{ chain.bank }}</view>
  182. <image class="tcitem-image" src="../../static/img/copy.png" mode="" @click="copy(chain.bank)"></image>
  183. </view>
  184. <view class="tc-item">
  185. <view class="upload-title" style="color: #9d9d9d;">钱包二维码</view>
  186. <view class="upload-main" @click="lookimg(chain.image)"><image class="upload-image" :src="chain.image" mode="aspectFit"></image></view>
  187. </view>
  188. </scroll-view>
  189. </swiper-item>
  190. <swiper-item class="tab-content" v-else></swiper-item>
  191. </swiper> -->
  192. </view>
  193. <view class="zf flex">
  194. <view class="title-left"><text class="title">支付凭证(点击右边图片查看大图):</text></view>
  195. <image class="zfpz" @click="lookimg(item.upload_image)" :src="item.upload_image" mode=""></image>
  196. </view>
  197. </view>
  198. <view class="btHeight"></view>
  199. </view>
  200. </template>
  201. <script>
  202. import { user_auction_order } from '@/api/order.js';
  203. import uniCopy from '@/components/js_sdk/xb-copy/uni-copy.js';
  204. export default {
  205. data() {
  206. return {
  207. id: '',
  208. item: '',
  209. tabCurrentIndex: 0,
  210. info: '',
  211. bank: '',
  212. wx: '',
  213. zfb: '',
  214. chain:''
  215. };
  216. },
  217. onLoad(opt) {
  218. this.id = opt.id;
  219. this.loadData();
  220. },
  221. methods: {
  222. loadData() {
  223. uni.showLoading({
  224. title: '加载中'
  225. });
  226. user_auction_order({ order_id: this.id }).then(({ data }) => {
  227. console.log(data);
  228. this.item = data;
  229. this.bank = data.bank;
  230. this.wx = data.wx;
  231. this.zfb = data.zfb;
  232. this.chain = data.chain
  233. uni.hideLoading();
  234. });
  235. },
  236. // 查看大图
  237. lookimg(src) {
  238. console.log(src);
  239. let arr = [src];
  240. uni.previewImage({
  241. current: src,
  242. urls: arr
  243. });
  244. },
  245. copy(value) {
  246. let obj = this;
  247. let content = value; //需要复制的内容
  248. console.log('复制的内容:', content);
  249. // content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
  250. const result = uniCopy(content);
  251. if (result === false) {
  252. uni.showToast({
  253. title: '不支持'
  254. });
  255. } else {
  256. uni.showToast({
  257. title: '复制成功',
  258. icon: 'none'
  259. });
  260. }
  261. },
  262. //swiper 切换
  263. changeTab(e) {
  264. this.tabCurrentIndex = e.target.current;
  265. },
  266. change(num) {
  267. this.tabCurrentIndex = num * 1;
  268. },
  269. // 复制订单编号
  270. copyOrderId(text) {
  271. // #ifndef H5
  272. uni.setClipboardData({
  273. data: text,
  274. success: e => {
  275. uni.showToast({
  276. title: '复制成功',
  277. duration: 1500
  278. });
  279. }
  280. });
  281. // #endif
  282. // #ifdef H5
  283. // 获取需要复制的文字
  284. const copyStr = text;
  285. // 创建input标签存放需要复制的文字
  286. const oInput = document.createElement('input');
  287. // 把文字放进input中,供复制
  288. oInput.value = copyStr;
  289. // 添加文
  290. document.body.appendChild(oInput);
  291. // 选中创建的input
  292. oInput.select();
  293. // 执行复制方法, 该方法返回bool类型的结果,告诉我们是否复制成功
  294. const copyResult = document.execCommand('copy');
  295. // 操作中完成后 从Dom中删除创建的input
  296. document.body.removeChild(oInput);
  297. // 根据返回的复制结果 给用户不同的提示
  298. if (copyResult) {
  299. uni.showToast({
  300. title: '已复制到粘贴板',
  301. duration: 2000
  302. });
  303. } else {
  304. this.$api.msg('复制失败');
  305. }
  306. // #endif
  307. }
  308. }
  309. };
  310. </script>
  311. <style lang="scss">
  312. page {
  313. background: $page-color-base;
  314. }
  315. // 订单详细
  316. .orderDetialBox {
  317. margin-top: 20rpx;
  318. padding: 0 30rpx;
  319. background-color: #ffffff;
  320. font-size: $font-base;
  321. color: $font-color-base;
  322. .item {
  323. height: 80rpx;
  324. .text {
  325. padding-left: 10rpx;
  326. }
  327. .buttom-right {
  328. width: 180rpx;
  329. border-radius: 99rpx;
  330. padding: 10rpx;
  331. text-align: center;
  332. border: 1px solid $border-color-light;
  333. }
  334. }
  335. .zf {
  336. .zfpz {
  337. width: 160rpx;
  338. height: 160rpx;
  339. }
  340. }
  341. }
  342. .row {
  343. display: flex;
  344. align-items: center;
  345. position: relative;
  346. padding: 0 30rpx;
  347. height: 80rpx;
  348. background: #fff;
  349. .order-status {
  350. font-size: $font-lg;
  351. color: $color-red;
  352. font-weight: 500;
  353. }
  354. .refund {
  355. font-size: 30rpx;
  356. color: $font-color-dark;
  357. }
  358. .noRefund {
  359. font-size: 30rpx;
  360. color: $font-color-light;
  361. }
  362. .tit {
  363. flex-shrink: 0;
  364. width: 120rpx;
  365. font-size: 30rpx;
  366. color: $font-color-dark;
  367. }
  368. .input {
  369. text-align: right;
  370. flex: 1;
  371. font-size: 30rpx;
  372. color: $font-color-dark;
  373. &.payColor {
  374. color: $color-red;
  375. }
  376. }
  377. .iconlocation {
  378. font-size: 36rpx;
  379. color: $font-color-light;
  380. }
  381. }
  382. .add-btn {
  383. display: flex;
  384. align-items: center;
  385. justify-content: center;
  386. width: 690rpx;
  387. height: 80rpx;
  388. margin: 60rpx auto;
  389. font-size: $font-lg;
  390. color: #fff;
  391. background-color: $base-color;
  392. border-radius: 10rpx;
  393. // box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  394. }
  395. /* 多条商品 */
  396. .order-item {
  397. display: flex;
  398. flex-direction: column;
  399. padding-left: 30rpx;
  400. background: #fff;
  401. margin-top: 20rpx;
  402. /* 单条商品 */
  403. .goods-box-single {
  404. display: flex;
  405. padding: 20rpx 0;
  406. .goods-img {
  407. display: block;
  408. width: 120rpx;
  409. height: 120rpx;
  410. }
  411. .right {
  412. flex: 1;
  413. display: flex;
  414. flex-direction: column;
  415. padding: 0 30rpx 0 24rpx;
  416. overflow: hidden;
  417. height: 100%;
  418. .title {
  419. align-self: flex-start;
  420. font-size: $font-base + 2rpx;
  421. color: $font-color-dark;
  422. }
  423. .title-right {
  424. flex-shrink: 0;
  425. text-align: right;
  426. align-self: flex-start;
  427. }
  428. .attr-box {
  429. font-size: $font-sm + 2rpx;
  430. color: $font-color-light;
  431. }
  432. .evaluate {
  433. color: #ffffff;
  434. font-size: 24rpx;
  435. display: inline-block;
  436. text-align: right;
  437. text {
  438. background: #fa2740;
  439. padding: 5rpx 15rpx;
  440. }
  441. }
  442. .yesevaluate {
  443. color: #333333;
  444. font-size: 24rpx;
  445. display: inline-block;
  446. text-align: right;
  447. text {
  448. border: 2rpx solid #333333;
  449. padding: 5rpx 15rpx;
  450. }
  451. }
  452. .price {
  453. font-size: $font-base + 2rpx;
  454. color: $font-color-dark;
  455. &:before {
  456. content: '¥';
  457. font-size: $font-sm;
  458. margin: 0 2rpx 0 8rpx;
  459. }
  460. }
  461. }
  462. }
  463. }
  464. // 标题头
  465. .f-header {
  466. display: flex;
  467. align-items: center;
  468. height: 80rpx;
  469. .tit-box {
  470. @extend %font-title-box;
  471. }
  472. .tit {
  473. @extend %font-title;
  474. }
  475. .f-left-icon {
  476. @extend %f-left-icon;
  477. }
  478. }
  479. // 共有底部高度
  480. $btHeight: 100rpx;
  481. .btHeight {
  482. height: $btHeight;
  483. }
  484. // 拼团按钮
  485. .group-nav {
  486. position: fixed;
  487. bottom: 0;
  488. left: 0;
  489. height: $btHeight;
  490. width: 100%;
  491. justify-content: flex-end;
  492. padding-right: 30rpx;
  493. .bottom {
  494. }
  495. }
  496. .main {
  497. margin-top: 20rpx;
  498. padding: 30rpx 0 40rpx;
  499. background: #ffffff;
  500. .main-tip {
  501. padding: 0 30rpx;
  502. font-size: 30rpx;
  503. font-family: PingFang SC;
  504. font-weight: 500;
  505. color: #999999;
  506. }
  507. .main-title {
  508. margin-top: 34rpx;
  509. justify-content: flex-start;
  510. .current {
  511. background: linear-gradient(143.2747deg, #ff6a00, #ee0979) !important;
  512. color: #ffffff !important;
  513. }
  514. .main-item {
  515. width: 33%;
  516. }
  517. .mt-item {
  518. margin: 0 auto;
  519. width: 160rpx;
  520. height: 60rpx;
  521. background: #f8f8f8;
  522. border-radius: 10rpx;
  523. display: flex;
  524. justify-content: center;
  525. align-items: center;
  526. .mt-image {
  527. width: 32rpx;
  528. height: 32rpx;
  529. }
  530. .mt-image1 {
  531. width: 38rpx;
  532. height: 32rpx;
  533. }
  534. .mt-image2 {
  535. width: 36rpx;
  536. height: 32rpx;
  537. }
  538. .mt-font {
  539. margin-left: 10rpx;
  540. font-size: 30rpx;
  541. font-family: PingFang SC;
  542. font-weight: bold;
  543. color: #333333;
  544. }
  545. }
  546. }
  547. .swiper-box {
  548. width: 100%;
  549. padding: 14rpx 30rpx 0;
  550. .tc-item {
  551. padding: 50rpx 2rpx 0;
  552. line-height: 1;
  553. .tcitem-name {
  554. width: 118rpx;
  555. font-size: 30rpx;
  556. font-family: PingFang SC;
  557. font-weight: 500;
  558. color: #999999;
  559. }
  560. .ali-name {
  561. width: 380rpx;
  562. font-size: 30rpx;
  563. font-family: PingFang SC;
  564. font-weight: 500;
  565. color: #333333;
  566. }
  567. .tcitem-image {
  568. width: 26rpx;
  569. height: 28rpx;
  570. }
  571. }
  572. }
  573. }
  574. </style>