porducthall.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. <template>
  2. <view class="container">
  3. <view class="carousel">
  4. <swiper indicator-dots :circular="true" duration="400">
  5. <swiper-item class="swiper-item" v-for="(item, index) in imageList" :key="index">
  6. <view class="image-wrapper"><image :src="item" class="loaded" mode="scaleToFill"></image></view>
  7. </swiper-item>
  8. </swiper>
  9. <view class="title flex">
  10. <view class="title-num">
  11. <text>¥</text>
  12. {{ info.hanging_price }}
  13. </view>
  14. <view class="title-time">挂售时间:{{ info.time }}</view>
  15. </view>
  16. </view>
  17. <view class="title-main flex">
  18. <view class="tm-left">
  19. <view class="tm-title clamp">{{ info.name }}</view>
  20. <view class="tm-people flex">
  21. <image class="people-image" src="../../static/img/people.png" mode=""></image>
  22. <view class="people-name">归属人:{{info.user_nickname}}</view>
  23. </view>
  24. </view>
  25. <view class="tm-right flex">
  26. <!-- <view class="tmr-item">
  27. <image class="tmr-image" src="../../static/img/shua.png" mode=""></image>
  28. <view class="tmr-font">刷新倒计时</view>
  29. </view> -->
  30. <view class="tmr-item" @click="nav('/pages/hall/history?id='+id)">
  31. <image class="tmr-image1" src="../../static/img/yuan.png" mode=""></image>
  32. <view class="tmr-font">溯源</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="dz"></view>
  37. <view class="introduce">
  38. <view class="introduct-title">
  39. <image class="introduce-image" src="../../static/img/productIcon.png" mode=""></image>
  40. <view class="introduce-font">艺术品挂售交易平台</view>
  41. </view>
  42. <view class="introduct-main">
  43. <view class="im-item">
  44. <image class="im-image" src="../../static/img/jian.png" mode=""></image>
  45. <view class="im-font">大师作品</view>
  46. </view>
  47. <view class="im-item">
  48. <image class="im-image" src="../../static/img/zheng.png" mode=""></image>
  49. <view class="im-font">证书收藏</view>
  50. </view>
  51. <view class="im-item">
  52. <image class="im-image" src="../../static/img/gong.png" mode=""></image>
  53. <view class="im-font">自由交易</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="dz"></view>
  58. <view class="explain">
  59. <view class="explain-title">商品挂售说明</view>
  60. <view class="explain-main">
  61. <view class="explainImage-box">
  62. <image class="explain-image-item" src="../../static/img/lc1.png" mode=""></image>
  63. <image class="explain-image-jiant" src="../../static/img/jingt.png" mode=""></image>
  64. <image class="explain-image-item" src="../../static/img/lc2.png" mode=""></image>
  65. <image class="explain-image-jiant" src="../../static/img/jingt.png" mode=""></image>
  66. <image class="explain-image-item" src="../../static/img/lc3.png" mode=""></image>
  67. <image class="explain-image-jiant" src="../../static/img/jingt.png" mode=""></image>
  68. <image class="explain-image-item" src="../../static/img/lc4.png" mode=""></image>
  69. </view>
  70. <view class="explainfont-box">
  71. <view class="explain-font-item">挂售商品</view>
  72. <view class="explain-font-item">支付货款</view>
  73. <view class="explain-font-item">卖家发货</view>
  74. <view class="explain-font-item">挂售/提货</view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="detail-desc">
  79. <view class="d-header"><text>商品详情</text></view>
  80. <rich-text class="detail-centent" :nodes="info.description"></rich-text>
  81. <view class="contentBottomHeight"></view>
  82. </view>
  83. <view class="bottom flex">
  84. <view class="bottom-item">
  85. <image class="bi-image" src="../../static/img/quan.png" mode=""></image>
  86. <view class="bottom-font">预约券</view>
  87. <!-- <view class="bottom-num">200</view> -->
  88. </view>
  89. <view class="shu"></view>
  90. <view class="bottom-item" @click="openKf()">
  91. <image class="bi-image" src="../../static/img/kf.png" mode=""></image>
  92. <view class="bottom-font">联系</view>
  93. <view class="bottom-num">客服</view>
  94. </view>
  95. <view class="btn" @click="buy()">立即购买</view>
  96. </view>
  97. <uni-popup ref="popupkf" type="center">
  98. <view class="popup-box">
  99. <view class="img"><image src="../../static/img/img009.png" mode=""></image></view>
  100. <view class="mian">
  101. <view class="delivery">
  102. <view class="title">已经为您定制专属客服</view>
  103. <image src="../../static/img/img010.png" mode=""></image>
  104. </view>
  105. <view class="nocancel">客服VX:{{ text }}</view>
  106. <view class="comfirm-box">
  107. <view class="cancel" @click="cancel">取消</view>
  108. <view class="comfirm" @click="comfirm(text)">复制微信</view>
  109. </view>
  110. </view>
  111. </view>
  112. </uni-popup>
  113. </view>
  114. </template>
  115. <script>
  116. import { details,purchase } from '@/api/hall.js'
  117. export default {
  118. data() {
  119. return {
  120. text:'123456',
  121. id:'',
  122. uid:'',
  123. name:'',
  124. peoplename:'',
  125. info:'',
  126. imageList:[],
  127. };
  128. },
  129. onLoad(option) {
  130. this.id = option.id;
  131. this.uid = option.uid
  132. this.name = option.name
  133. this.peoplename = option.peoplename
  134. this.loadData();
  135. },
  136. methods: {
  137. loadData() {
  138. details({product_id: this.id}).then(({data}) =>{
  139. console.log(data);
  140. this.imageList = data.slider_image
  141. if (data.description != '') {
  142. data.description = data.description.replace(/\<img/gi, '<img class="rich-img"');
  143. }
  144. this.info = data
  145. }).catch(e =>{
  146. })
  147. },
  148. // 打开客服
  149. openKf() {
  150. this.$refs.popupkf.open();
  151. },
  152. // 关闭客服
  153. cancel() {
  154. this.$refs.popupkf.close();
  155. },
  156. nav(url) {
  157. uni.navigateTo({
  158. url
  159. })
  160. },
  161. buy() {
  162. purchase({product_id: this.id}).then(({ data }) =>{
  163. uni.navigateTo({
  164. url:'/pages/money/paySuccess?type=1&uid=' + this.uid + + '&name='+ this.name + '&peoplename=' + this.peoplename
  165. })
  166. console.log(data);
  167. }).catch(e =>{
  168. console.log(e);
  169. })
  170. }
  171. }
  172. };
  173. </script>
  174. <style lang="less">
  175. .carousel {
  176. width: 750rpx;
  177. height: 710rpx;
  178. position: relative;
  179. swiper {
  180. height: 100%;
  181. }
  182. .image-wrapper {
  183. width: 100%;
  184. height: 100%;
  185. }
  186. .swiper-item {
  187. display: flex;
  188. justify-content: center;
  189. align-content: center;
  190. // height: 750rpx;
  191. height: 710rpx;
  192. overflow: hidden;
  193. image {
  194. width: 100%;
  195. height: 100%;
  196. }
  197. }
  198. .title {
  199. background: linear-gradient(90deg, #ef4e51 0%, #f4713b 100%);
  200. width: 750rpx;
  201. position: absolute;
  202. bottom: 0;
  203. padding: 30rpx;
  204. .title-num {
  205. font-size: 50rpx;
  206. font-family: PingFang SC;
  207. font-weight: bold;
  208. color: #ffffff;
  209. text {
  210. font-size: 30rpx;
  211. }
  212. }
  213. .title-time {
  214. font-size: 28rpx;
  215. font-family: PingFang SC;
  216. font-weight: bold;
  217. color: #ffffff;
  218. }
  219. }
  220. }
  221. .title-main {
  222. padding: 30rpx 30rpx 30rpx 22rpx;
  223. .tm-left {
  224. width: 50%;
  225. .tm-title {
  226. width: 100%;
  227. font-size: 30rpx;
  228. font-family: PingFang SC;
  229. font-weight: bold;
  230. color: #1d2023;
  231. }
  232. .tm-people {
  233. margin-top: 30rpx;
  234. justify-content: flex-start;
  235. .people-image {
  236. width: 22rpx;
  237. height: 22rpx;
  238. flex-shrink: 0;
  239. }
  240. .people-name {
  241. margin-left: 12rpx;
  242. font-size: 24rpx;
  243. font-family: PingFang SC;
  244. font-weight: 500;
  245. color: #333333;
  246. }
  247. }
  248. }
  249. .tm-right {
  250. justify-content: flex-end;
  251. .tmr-item {
  252. margin-left: 38rpx;
  253. display: flex;
  254. flex-direction: column;
  255. align-items: center;
  256. .tmr-image {
  257. width: 42rpx;
  258. height: 38rpx;
  259. }
  260. .tmr-image1 {
  261. width: 42rpx;
  262. height: 42rpx;
  263. }
  264. .tmr-font {
  265. margin-top: 16rpx;
  266. font-size: 24rpx;
  267. font-family: PingFang SC;
  268. font-weight: 500;
  269. color: #333333;
  270. }
  271. }
  272. }
  273. }
  274. .dz {
  275. width: 750rpx;
  276. height: 20rpx;
  277. background: #f8f6f6;
  278. }
  279. .introduce {
  280. padding: 40rpx 24rpx;
  281. .introduct-title {
  282. display: flex;
  283. align-items: center;
  284. .introduce-image {
  285. width: 36rpx;
  286. height: 36rpx;
  287. }
  288. .introduce-font {
  289. margin-left: 10rpx;
  290. font-size: 28rpx;
  291. font-family: PingFang SC;
  292. font-weight: bold;
  293. color: #333333;
  294. }
  295. }
  296. .introduct-main {
  297. display: flex;
  298. justify-content: space-between;
  299. margin-top: 26rpx;
  300. .im-item {
  301. display: flex;
  302. align-items: center;
  303. .im-image {
  304. width: 44rpx;
  305. height: 44rpx;
  306. }
  307. .im-font {
  308. margin-left: 6rpx;
  309. font-size: 28rpx;
  310. font-family: PingFang SC;
  311. font-weight: bold;
  312. color: #333333;
  313. }
  314. }
  315. }
  316. }
  317. .explain {
  318. padding: 40rpx 34rpx 46rpx 34rpx;
  319. .explain-title {
  320. font-size: 32rpx;
  321. font-family: PingFang SC;
  322. font-weight: bold;
  323. color: #333333;
  324. }
  325. .explain-main {
  326. margin-top: 52rpx;
  327. .explainImage-box {
  328. display: flex;
  329. justify-content: space-around;
  330. align-items: center;
  331. .explain-image-item {
  332. width: 42rpx;
  333. height: 40rpx;
  334. }
  335. .explain-image-jiant {
  336. width: 38rpx;
  337. height: 10rpx;
  338. }
  339. }
  340. .explainfont-box {
  341. margin-top: 20rpx;
  342. display: flex;
  343. justify-content: space-between;
  344. .explain-font-item {
  345. font-size: 28rpx;
  346. font-family: PingFang SC;
  347. font-weight: 500;
  348. color: #333333;
  349. }
  350. }
  351. }
  352. }
  353. .detail-desc {
  354. background: #fff;
  355. margin-top: 16rpx;
  356. /deep/ img {
  357. max-width: 100% !important;
  358. display: inline !important;
  359. }
  360. /deep/ div {
  361. max-width: 100% !important;
  362. }
  363. .d-header {
  364. display: flex;
  365. justify-content: center;
  366. align-items: center;
  367. height: 80rpx;
  368. font-size: 30rpx;
  369. color: #303133;
  370. position: relative;
  371. text {
  372. padding: 0 20rpx;
  373. background: #fff;
  374. position: relative;
  375. z-index: 1;
  376. }
  377. &:after {
  378. position: absolute;
  379. left: 50%;
  380. top: 50%;
  381. transform: translateX(-50%);
  382. width: 300rpx;
  383. height: 0;
  384. content: '';
  385. border-bottom: 1px solid #ccc;
  386. }
  387. }
  388. }
  389. .bottom {
  390. position: fixed;
  391. z-index: 10;
  392. bottom: 0;
  393. background: #ffffff;
  394. width: 750rpx;
  395. height: 146rpx;
  396. justify-content: flex-start;
  397. .bottom-item {
  398. margin-left: 42rpx;
  399. display: flex;
  400. flex-direction: column;
  401. align-items: center;
  402. .bi-image {
  403. width: 38rpx;
  404. height: 34rpx;
  405. }
  406. .bottom-font {
  407. margin-top: 14rpx;
  408. font-size: 24rpx;
  409. font-family: PingFang SC;
  410. font-weight: bold;
  411. color: #333333;
  412. }
  413. .bottom-num {
  414. line-height: 1;
  415. font-size: 24rpx;
  416. font-family: PingFang SC;
  417. font-weight: bold;
  418. color: #333333;
  419. }
  420. }
  421. .shu {
  422. margin-left: 38rpx;
  423. width: 2px;
  424. height: 74rpx;
  425. background: #c0bfc0;
  426. }
  427. .btn {
  428. margin-left: 40rpx;
  429. width: 430rpx;
  430. height: 80rpx;
  431. background: #fd3b39;
  432. border-radius: 20rpx;
  433. text-align: center;
  434. font-size: 34rpx;
  435. font-family: PingFang SC;
  436. font-weight: bold;
  437. color: #ffffff;
  438. line-height: 80rpx;
  439. }
  440. }
  441. .popup-box {
  442. width: 522rpx;
  443. height: 605rpx;
  444. background-color: #ffffff;
  445. border-radius: 20rpx;
  446. position: relative;
  447. .img {
  448. position: relative;
  449. top: -56rpx;
  450. left: 0;
  451. width: 522rpx;
  452. height: 132rpx;
  453. display: flex;
  454. justify-content: center;
  455. image {
  456. border-radius: 20rpx 20rpx 0 0;
  457. width: 450rpx;
  458. height: 132rpx;
  459. }
  460. }
  461. .mian {
  462. margin-top: -44rpx;
  463. display: flex;
  464. flex-direction: column;
  465. align-items: center;
  466. // padding: 32rpx 32rpx;
  467. background-color: #ffffff;
  468. border-radius: 0 0 20rpx 20rpx;
  469. text-align: center;
  470. .delivery {
  471. font-size: 40rpx;
  472. color: #333333;
  473. display: flex;
  474. align-items: center;
  475. flex-direction: column;
  476. .title {
  477. }
  478. image {
  479. margin-top: 48rpx;
  480. width: 172rpx;
  481. height: 160rpx;
  482. }
  483. }
  484. .nocancel {
  485. font-size: 32rpx;
  486. color: #333333;
  487. margin-top: 14rpx;
  488. }
  489. .comfirm-box {
  490. margin-top: 52rpx;
  491. display: flex;
  492. // margin-bottom: 32rpx;
  493. // justify-content: space-around;
  494. .cancel {
  495. display: flex;
  496. align-items: center;
  497. justify-content: center;
  498. width: 197rpx;
  499. height: 74rpx;
  500. border: 1px solid #dcc786;
  501. border-radius: 38rpx;
  502. font-size: 32rpx;
  503. color: #605128;
  504. }
  505. .comfirm {
  506. margin-left: 32rpx;
  507. display: flex;
  508. align-items: center;
  509. justify-content: center;
  510. width: 197rpx;
  511. height: 74rpx;
  512. background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
  513. border-radius: 38px;
  514. font-size: 32rpx;
  515. color: #605128;
  516. }
  517. }
  518. }
  519. }
  520. // 文章页底部高度撑开
  521. .contentBottomHeight {
  522. height: 150rpx;
  523. }
  524. </style>