porducthall.vue 11 KB

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