porducthall.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  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">归属人:李丹丹</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. info:'',
  123. imageList:[],
  124. };
  125. },
  126. onLoad(option) {
  127. this.id = option.id;
  128. this.loadData();
  129. },
  130. methods: {
  131. loadData() {
  132. details({product_id: this.id}).then(({data}) =>{
  133. console.log(data);
  134. this.imageList = data.slider_image
  135. this.info = data
  136. }).catch(e =>{
  137. })
  138. },
  139. // 打开客服
  140. openKf() {
  141. this.$refs.popupkf.open();
  142. },
  143. // 关闭客服
  144. cancel() {
  145. this.$refs.popupkf.close();
  146. },
  147. nav(url) {
  148. uni.navigateTo({
  149. url
  150. })
  151. },
  152. buy() {
  153. purchase({product_id: this.id}).then(({ data }) =>{
  154. uni.navigateTo({
  155. url:'/pages/money/paySuccess?type=1'
  156. })
  157. console.log(data);
  158. }).catch(e =>{
  159. console.log(e);
  160. })
  161. }
  162. }
  163. };
  164. </script>
  165. <style lang="less">
  166. .carousel {
  167. width: 750rpx;
  168. height: 710rpx;
  169. position: relative;
  170. swiper {
  171. height: 100%;
  172. }
  173. .image-wrapper {
  174. width: 100%;
  175. height: 100%;
  176. }
  177. .swiper-item {
  178. display: flex;
  179. justify-content: center;
  180. align-content: center;
  181. // height: 750rpx;
  182. height: 710rpx;
  183. overflow: hidden;
  184. image {
  185. width: 100%;
  186. height: 100%;
  187. }
  188. }
  189. .title {
  190. background: linear-gradient(90deg, #ef4e51 0%, #f4713b 100%);
  191. width: 750rpx;
  192. position: absolute;
  193. bottom: 0;
  194. padding: 30rpx;
  195. .title-num {
  196. font-size: 50rpx;
  197. font-family: PingFang SC;
  198. font-weight: bold;
  199. color: #ffffff;
  200. text {
  201. font-size: 30rpx;
  202. }
  203. }
  204. .title-time {
  205. font-size: 28rpx;
  206. font-family: PingFang SC;
  207. font-weight: bold;
  208. color: #ffffff;
  209. }
  210. }
  211. }
  212. .title-main {
  213. padding: 30rpx 30rpx 30rpx 22rpx;
  214. .tm-left {
  215. width: 50%;
  216. .tm-title {
  217. width: 100%;
  218. font-size: 30rpx;
  219. font-family: PingFang SC;
  220. font-weight: bold;
  221. color: #1d2023;
  222. }
  223. .tm-people {
  224. margin-top: 30rpx;
  225. justify-content: flex-start;
  226. .people-image {
  227. width: 22rpx;
  228. height: 22rpx;
  229. flex-shrink: 0;
  230. }
  231. .people-name {
  232. margin-left: 12rpx;
  233. font-size: 24rpx;
  234. font-family: PingFang SC;
  235. font-weight: 500;
  236. color: #333333;
  237. }
  238. }
  239. }
  240. .tm-right {
  241. justify-content: flex-end;
  242. .tmr-item {
  243. margin-left: 38rpx;
  244. display: flex;
  245. flex-direction: column;
  246. align-items: center;
  247. .tmr-image {
  248. width: 42rpx;
  249. height: 38rpx;
  250. }
  251. .tmr-image1 {
  252. width: 42rpx;
  253. height: 42rpx;
  254. }
  255. .tmr-font {
  256. margin-top: 16rpx;
  257. font-size: 24rpx;
  258. font-family: PingFang SC;
  259. font-weight: 500;
  260. color: #333333;
  261. }
  262. }
  263. }
  264. }
  265. .dz {
  266. width: 750rpx;
  267. height: 20rpx;
  268. background: #f8f6f6;
  269. }
  270. .introduce {
  271. padding: 40rpx 24rpx;
  272. .introduct-title {
  273. display: flex;
  274. align-items: center;
  275. .introduce-image {
  276. width: 36rpx;
  277. height: 36rpx;
  278. }
  279. .introduce-font {
  280. margin-left: 10rpx;
  281. font-size: 28rpx;
  282. font-family: PingFang SC;
  283. font-weight: bold;
  284. color: #333333;
  285. }
  286. }
  287. .introduct-main {
  288. display: flex;
  289. justify-content: space-between;
  290. margin-top: 26rpx;
  291. .im-item {
  292. display: flex;
  293. align-items: center;
  294. .im-image {
  295. width: 44rpx;
  296. height: 44rpx;
  297. }
  298. .im-font {
  299. margin-left: 6rpx;
  300. font-size: 28rpx;
  301. font-family: PingFang SC;
  302. font-weight: bold;
  303. color: #333333;
  304. }
  305. }
  306. }
  307. }
  308. .explain {
  309. padding: 40rpx 34rpx 46rpx 34rpx;
  310. .explain-title {
  311. font-size: 32rpx;
  312. font-family: PingFang SC;
  313. font-weight: bold;
  314. color: #333333;
  315. }
  316. .explain-main {
  317. margin-top: 52rpx;
  318. .explainImage-box {
  319. display: flex;
  320. justify-content: space-around;
  321. align-items: center;
  322. .explain-image-item {
  323. width: 42rpx;
  324. height: 40rpx;
  325. }
  326. .explain-image-jiant {
  327. width: 38rpx;
  328. height: 10rpx;
  329. }
  330. }
  331. .explainfont-box {
  332. margin-top: 20rpx;
  333. display: flex;
  334. justify-content: space-between;
  335. .explain-font-item {
  336. font-size: 28rpx;
  337. font-family: PingFang SC;
  338. font-weight: 500;
  339. color: #333333;
  340. }
  341. }
  342. }
  343. }
  344. .detail-desc {
  345. background: #fff;
  346. margin-top: 16rpx;
  347. /deep/ img {
  348. max-width: 100% !important;
  349. display: inline !important;
  350. }
  351. /deep/ div {
  352. max-width: 100% !important;
  353. }
  354. .d-header {
  355. display: flex;
  356. justify-content: center;
  357. align-items: center;
  358. height: 80rpx;
  359. font-size: 30rpx;
  360. color: #303133;
  361. position: relative;
  362. text {
  363. padding: 0 20rpx;
  364. background: #fff;
  365. position: relative;
  366. z-index: 1;
  367. }
  368. &:after {
  369. position: absolute;
  370. left: 50%;
  371. top: 50%;
  372. transform: translateX(-50%);
  373. width: 300rpx;
  374. height: 0;
  375. content: '';
  376. border-bottom: 1px solid #ccc;
  377. }
  378. }
  379. }
  380. .bottom {
  381. position: fixed;
  382. z-index: 10;
  383. bottom: 0;
  384. background: #ffffff;
  385. width: 750rpx;
  386. height: 146rpx;
  387. justify-content: flex-start;
  388. .bottom-item {
  389. margin-left: 42rpx;
  390. display: flex;
  391. flex-direction: column;
  392. align-items: center;
  393. .bi-image {
  394. width: 38rpx;
  395. height: 34rpx;
  396. }
  397. .bottom-font {
  398. margin-top: 14rpx;
  399. font-size: 24rpx;
  400. font-family: PingFang SC;
  401. font-weight: bold;
  402. color: #333333;
  403. }
  404. .bottom-num {
  405. line-height: 1;
  406. font-size: 24rpx;
  407. font-family: PingFang SC;
  408. font-weight: bold;
  409. color: #333333;
  410. }
  411. }
  412. .shu {
  413. margin-left: 38rpx;
  414. width: 2px;
  415. height: 74rpx;
  416. background: #c0bfc0;
  417. }
  418. .btn {
  419. margin-left: 40rpx;
  420. width: 430rpx;
  421. height: 80rpx;
  422. background: #fd3b39;
  423. border-radius: 20rpx;
  424. text-align: center;
  425. font-size: 34rpx;
  426. font-family: PingFang SC;
  427. font-weight: bold;
  428. color: #ffffff;
  429. line-height: 80rpx;
  430. }
  431. }
  432. .popup-box {
  433. width: 522rpx;
  434. height: 605rpx;
  435. background-color: #ffffff;
  436. border-radius: 20rpx;
  437. position: relative;
  438. .img {
  439. position: relative;
  440. top: -56rpx;
  441. left: 0;
  442. width: 522rpx;
  443. height: 132rpx;
  444. display: flex;
  445. justify-content: center;
  446. image {
  447. border-radius: 20rpx 20rpx 0 0;
  448. width: 450rpx;
  449. height: 132rpx;
  450. }
  451. }
  452. .mian {
  453. margin-top: -44rpx;
  454. display: flex;
  455. flex-direction: column;
  456. align-items: center;
  457. // padding: 32rpx 32rpx;
  458. background-color: #ffffff;
  459. border-radius: 0 0 20rpx 20rpx;
  460. text-align: center;
  461. .delivery {
  462. font-size: 40rpx;
  463. color: #333333;
  464. display: flex;
  465. align-items: center;
  466. flex-direction: column;
  467. .title {
  468. }
  469. image {
  470. margin-top: 48rpx;
  471. width: 172rpx;
  472. height: 160rpx;
  473. }
  474. }
  475. .nocancel {
  476. font-size: 32rpx;
  477. color: #333333;
  478. margin-top: 14rpx;
  479. }
  480. .comfirm-box {
  481. margin-top: 52rpx;
  482. display: flex;
  483. // margin-bottom: 32rpx;
  484. // justify-content: space-around;
  485. .cancel {
  486. display: flex;
  487. align-items: center;
  488. justify-content: center;
  489. width: 197rpx;
  490. height: 74rpx;
  491. border: 1px solid #dcc786;
  492. border-radius: 38rpx;
  493. font-size: 32rpx;
  494. color: #605128;
  495. }
  496. .comfirm {
  497. margin-left: 32rpx;
  498. display: flex;
  499. align-items: center;
  500. justify-content: center;
  501. width: 197rpx;
  502. height: 74rpx;
  503. background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
  504. border-radius: 38px;
  505. font-size: 32rpx;
  506. color: #605128;
  507. }
  508. }
  509. }
  510. }
  511. // 文章页底部高度撑开
  512. .contentBottomHeight {
  513. height: 150rpx;
  514. }
  515. </style>