product-details.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775
  1. <!-- 商品详情 -->
  2. <template>
  3. <view class="wrap">
  4. <HeaderViewBar ref='HeaderViewBar' title='商品详情' :titleOpacity="scrollTop / 100" :opacity="scrollTop / 100"
  5. :hideBack="true" backgroundColor='linear-gradient(180deg, #E63D23, #F58711)'
  6. style="position: fixed; top: 0; z-index: 999999999;">
  7. <view class="header-btn-box" :style="{width: headerContainerWidth + 'px', paddingRight: 36}">
  8. <button type="default" class="back" @tap="back()">
  9. <image src="../../../static/return-2.png" mode="widthFix"></image>
  10. </button>
  11. <view class="header-right-box">
  12. <button type="default">
  13. <image src="../../../static/circle-1.png" mode="widthFix"></image>
  14. </button>
  15. <button type="default">
  16. <image src="../../../static/circle-2.png" mode="widthFix"></image>
  17. </button>
  18. </view>
  19. </view>
  20. </HeaderViewBar>
  21. <view class="swiper-box">
  22. <swiper class="swiper" @change="swiperChange" :circular="true" autoplay="true" interval="3000"
  23. duration="500">
  24. <swiper-item v-for="(item,index) in swiperList" :key="index">
  25. <view class="swiper-item">
  26. <image :src="item" class="banner-img" mode="aspectFill" />
  27. </view>
  28. </swiper-item>
  29. </swiper>
  30. <view class="diandian">
  31. <view class="diandiandian" :class="(swiperCurrent == index ? 'diandiandian_active' : '')"
  32. v-for="(item, index) in swiperList">
  33. </view>
  34. </view>
  35. </view>
  36. <view class="spike-module-box">
  37. <image src="../../../static/bg-17.png" class="spike-bg" mode=""></image>
  38. <view class="spike-module-content">
  39. <view class="spike-module-content-left">
  40. 秒杀价:
  41. <view class="spike-price">
  42. ¥39.00
  43. </view>
  44. <text class="del-price-white">¥56.00</text>
  45. </view>
  46. <view class="spike-module-content-right">
  47. <view class="spike-module-content-right-label">距秒杀截止时间</view>
  48. <view class="bottom-label">
  49. <text class="bottom-label-text">14天</text>
  50. <u-count-down :time="30 * 60 * 60 * 1000" format="HH:mm:ss" autoStart millisecond
  51. @change="onChange">
  52. <view class="time">
  53. <view class="time__custom">
  54. <text
  55. class="time__custom__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}</text>
  56. </view>
  57. <text class="time__doc">:</text>
  58. <view class="time__custom">
  59. <text class="time__custom__item">{{ timeData.minutes }}</text>
  60. </view>
  61. <text class="time__doc">:</text>
  62. <view class="time__custom">
  63. <text class="time__custom__item">{{ timeData.seconds }}</text>
  64. </view>
  65. </view>
  66. </u-count-down>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="padding-box">
  72. <view class="module">
  73. <view class="price-row">
  74. ¥394.00 <text class="del-price">¥34.00</text>
  75. </view>
  76. <view class="product-name">
  77. 藕粉桂花坚果藕粉羹营养早代餐 坚果羹营养早餐懒人冲饮食品
  78. </view>
  79. <view class="row-between">
  80. <view class="tag">
  81. 1罐50g
  82. </view>
  83. <view class="box">
  84. <image src="../../../static/bg-8.png" class="bg" mode="aspectFill" />
  85. <view class="fan">
  86. </view>
  87. <view class="fan-prirce">
  88. ¥<text>8.00</text>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="type-list">
  93. <view class="type-item">
  94. 菊花决明子茶
  95. </view>
  96. <view class="type-item pink-border">
  97. 藕粉桂花坚果羹
  98. </view>
  99. <view class="type-item">
  100. 黑芝麻羹
  101. </view>
  102. </view>
  103. </view>
  104. <view class="module">
  105. <view class="module-row">
  106. <view class="module-label">
  107. 产品功效
  108. </view>
  109. <view class="module-right-row">
  110. <text class="child">强身益智</text>
  111. <text class="child">健胃润肠</text>
  112. <button type="default" class="module-btn">健胃润肠</button>
  113. </view>
  114. </view>
  115. <view class="module-row">
  116. <view class="module-label">
  117. 适合人群
  118. </view>
  119. <view class="module-right-row">
  120. <text class="child">亚健康</text>
  121. <text class="child">心血管患者</text>
  122. <text class="child">糖尿病患者</text>
  123. <text class="child">体弱多病</text>
  124. <text class="child">消化不良</text>
  125. <text class="child">心血管患者</text>
  126. <text class="child">糖尿病患者</text>
  127. <text class="child">体弱多病</text>
  128. </view>
  129. </view>
  130. <view class="module-row">
  131. <view class="module-label">
  132. 有效搭配
  133. </view>
  134. <view class="module-right-row-between">
  135. <view class="module-right-row-tab">
  136. <view class="tab-child">
  137. 乌鸡
  138. </view>
  139. <view class="tab-child">
  140. 木耳
  141. </view>
  142. <view class="tab-child">
  143. 枸杞
  144. </view>
  145. </view>
  146. <image src="../../../static/back-icon2.png" mode="widthFix" class="back-icon"></image>
  147. </view>
  148. </view>
  149. </view>
  150. <view class="module">
  151. <view class="module-row">
  152. <view class="module-label">
  153. 配送
  154. </view>
  155. <view class="module-right-row">
  156. <view class="msg">
  157. 嘉兴南湖区旭辉广场2号楼
  158. </view>
  159. </view>
  160. </view>
  161. <view class="module-row">
  162. <view class="module-label">
  163. 发货
  164. </view>
  165. <view class="module-right-row">
  166. <view class="msg">
  167. 北京携手熊猫总部
  168. </view>
  169. <text class="express-shipping">快递:免运费</text>
  170. </view>
  171. </view>
  172. <view class="module-row">
  173. <view class="module-label">
  174. 源头
  175. </view>
  176. <view class="module-right-row">
  177. <view class="msg">
  178. 宁夏中宁县
  179. </view>
  180. <button class="border-orange">产品可溯源</button>
  181. </view>
  182. </view>
  183. <view class="module-row">
  184. <view class="module-label">
  185. 时令
  186. </view>
  187. <view class="module-right-row">
  188. <view class="msg">
  189. 6月/7月/8月
  190. </view>
  191. </view>
  192. </view>
  193. <view class="module-row">
  194. <view class="module-label">
  195. 时令
  196. </view>
  197. <view class="module-right-row-between">
  198. <view class="module-right-row-tab">
  199. <text class="assure">产品可溯源</text>
  200. <text class="assure">七天无理由退换</text>
  201. </view>
  202. <image src="../../../static/back-icon2.png" mode="widthFix" class="back-icon"></image>
  203. </view>
  204. </view>
  205. <view class="module-row">
  206. <view class="module-label">
  207. 参数
  208. </view>
  209. <view class="module-right-row-between">
  210. <view class="module-right-row-tab">
  211. <text class="assure">生产日期</text>
  212. <text class="assure">产地</text>
  213. <text class="assure">净含量…</text>
  214. </view>
  215. </view>
  216. </view>
  217. </view>
  218. <view class="comment-module">
  219. <view class="comment-module-label">
  220. 商品评价(600)
  221. </view>
  222. <view class="comment-box">
  223. <view class="comment-tab-list">
  224. <view class="comment-tab-item">
  225. 口味鲜美多汁
  226. </view>
  227. <view class="comment-tab-item">
  228. 很好吃
  229. </view>
  230. <view class="comment-tab-item">
  231. 还会再买
  232. </view>
  233. </view>
  234. <view class="comment-list">
  235. <view class="comment-item" v-for="(item, index) in 3">
  236. <view class="comment-item-top">
  237. <image src="../../../static/avatar.png" class="avatar" mode="aspectFill"></image>
  238. <view class="comment-item-top-sidebar">
  239. <view class="comment-item-top-column">
  240. <view class="user-name">
  241. 乔治的晚餐
  242. </view>
  243. <view class="stars-wrapper">
  244. <block v-for="(val, index) in 5">
  245. <image class="star-img"
  246. :src="star > index ? '../../../static/star-active.png' : '../../../static/star.png'"
  247. mode="aspectFill"></image>
  248. </block>
  249. </view>
  250. </view>
  251. <text class="time">2020-9-15</text>
  252. </view>
  253. </view>
  254. <view class="comment-item-content">
  255. 香肠精选不同部位的猪肉,按照一定的肥瘦比列进行搭。香肠精选不同部位的猪肉,按照一定的肥瘦比列进行搭。
  256. </view>
  257. </view>
  258. </view>
  259. <view class="buyers-show-module">
  260. <view class="buyers-show-label">
  261. 买家秀(14)
  262. </view>
  263. <scroll-view scroll-x="true" class="buyers-show-list">
  264. <image src="../../../static/img-4.png" class="buyers-show-img" v-for="(item, index) in 7"
  265. mode="aspectFill"></image>
  266. </scroll-view>
  267. </view>
  268. </view>
  269. </view>
  270. <view class="details-module">
  271. <view class="details-module-label">
  272. 商品详情
  273. </view>
  274. <view class="details-box">
  275. <image src="../../../static/img-4.png" mode="widthFix" class="img"></image>
  276. </view>
  277. </view>
  278. </view>
  279. <view class="footer">
  280. <view class="footer-leftsidebar">
  281. <button type="default" @tap="shoppingCart">
  282. <image src="../../../static/foot-tab2.png" mode="heightFix"></image>
  283. 购物车
  284. <view class="num">
  285. 99
  286. </view>
  287. </button>
  288. <button type="default">
  289. <image src="../../../static/foot-tab1.png" mode="heightFix"></image>
  290. 客服
  291. </button>
  292. <button type="default" @tap="collect">
  293. <image :src="select ? '../../../static/foot-tab3active.png' : '../../../static/foot-tab3.png'"
  294. mode="heightFix"></image>
  295. {{select ? '已收藏' : '收藏'}}
  296. </button>
  297. </view>
  298. <view class="footer-rightsidebar">
  299. <button type="default" class="footer-rightsidebar-btn" @tap="addCartSuccess">
  300. <image src="../../../static/btn-bg1.png" mode=""></image>
  301. <view class="footer-rightsidebar-btn-container">
  302. 加入购物车
  303. </view>
  304. </button>
  305. <button type="default" class="footer-rightsidebar-btn2">
  306. <image src="../../../static/btn-bg2.png" mode=""></image>
  307. <view class="footer-rightsidebar-btn-container2">
  308. 立即购买
  309. </view>
  310. </button>
  311. </view>
  312. </view>
  313. <!-- 保障-弹窗 -->
  314. <view v-show="isShowAssure">
  315. <view class="mask" @tap="closeAssure"></view>
  316. <view class="window-box">
  317. <view class="window-title">保障</view>
  318. <view class="window-top">
  319. <view class="window-row">
  320. <view class="window-label">产品可溯源</view>
  321. </view>
  322. <view class="window-row">
  323. <view class="window-label">七天无理由退换</view>
  324. <view class="window-msg">满足相应条件(吊牌缺失、洗涤后不支持)时,消费者可以申请“七天无理由退换货”</view>
  325. </view>
  326. </view>
  327. <view class="window-bottom">
  328. <button type="default">确定</button>
  329. </view>
  330. </view>
  331. </view>
  332. <!-- 保障-弹窗 -->
  333. <!-- 选择规格-弹窗 -->
  334. <view v-show="isShowSelectSpecification">
  335. <view class="mask" @tap="closeSelectSpecification"></view>
  336. <view class="selectSpecification-box">
  337. <view class="product-module">
  338. <image src="../../../static/img-4.png" class="product-img" mode="aspectFill"></image>
  339. <view class="product-module-sidebar">
  340. <view class="price-row">
  341. ¥394.00
  342. <text class="del-price">¥34.00</text>
  343. </view>
  344. <view class="product-module-title">藕粉桂花坚果藕粉羹营养早代餐 坚果羹营养早餐懒人冲饮食品</view>
  345. </view>
  346. </view>
  347. <view class="delivery-address-box">
  348. <view class="delivery-address-label">配送地址</view>
  349. <view class="location-row">
  350. <image src="../../../static/location-1.png" class="location-icon" mode=""></image>
  351. <view class="row-location-between">
  352. <text class="location-msg">山东省 临沂市 兰山区 柳青街道 </text>
  353. <image src="../../../static/back-icon2.png" class="back-icon" mode="widthFix"></image>
  354. </view>
  355. </view>
  356. </view>
  357. <view class="taste-row">
  358. <view class="taste-label">
  359. 口味
  360. </view>
  361. <view v-for="(item, index) in list" :key="index">
  362. <view :class="'type ' + [id == index ? 'active' : '']" @click="choseItem(index)">
  363. {{ item.name }}
  364. </view>
  365. </view>
  366. </view>
  367. <view class="number-box-between">
  368. <view class="number-label">购买数量<text>(限购10件)库存1899件</text></view>
  369. <view class="calc_box">
  370. <view class="calc_btn">
  371. <image src="../../../static/less.png" mode="widthFix" />
  372. </view>
  373. <input type="number" value="1" class="calc_number" />
  374. <view class="calc_btn">
  375. <image src="../../../static/add.png" mode="widthFix" />
  376. </view>
  377. </view>
  378. </view>
  379. <view class="window-bottom">
  380. <button type="default">确定</button>
  381. </view>
  382. </view>
  383. </view>
  384. <!-- 选择规格-弹窗 -->
  385. <!-- 限源预售-参数-弹窗 -->
  386. <view v-show="isShowParameter">
  387. <view class="mask" @tap="closeParameter"></view>
  388. <view class="window-box">
  389. <view class="window-title">参数</view>
  390. <view class="window-top">
  391. <view class="parameter-row">
  392. <view class="parameter-row-label">品牌</view>
  393. <view class="parameter-row-msg">程老伯</view>
  394. </view>
  395. <view class="parameter-row">
  396. <view class="parameter-row-label">价格</view>
  397. <view class="parameter-row-msg">0-50元</view>
  398. </view>
  399. <view class="parameter-row">
  400. <view class="parameter-row-label">产地</view>
  401. <view class="parameter-row-msg">中国大陆</view>
  402. </view>
  403. <view class="parameter-row">
  404. <view class="parameter-row-label">省份</view>
  405. <view class="parameter-row-msg">山东省</view>
  406. </view>
  407. <view class="parameter-row">
  408. <view class="parameter-row-label">同城服务</view>
  409. <view class="parameter-row-msg">同城24小时物流送货上门</view>
  410. </view>
  411. <view class="parameter-row">
  412. <view class="parameter-row-label">包装方式</view>
  413. <view class="parameter-row-msg">包装</view>
  414. </view>
  415. <view class="parameter-row">
  416. <view class="parameter-row-label">售卖方式</view>
  417. <view class="parameter-row-msg">单品</view>
  418. </view>
  419. <view class="parameter-row">
  420. <view class="parameter-row-label">套餐份量</view>
  421. <view class="parameter-row-msg">5人份</view>
  422. </view>
  423. <view class="parameter-row">
  424. <view class="parameter-row-label">套餐周期</view>
  425. <view class="parameter-row-msg">1周</view>
  426. </view>
  427. <view class="parameter-row">
  428. <view class="parameter-row-label">配送频次</view>
  429. <view class="parameter-row-msg">1周2次</view>
  430. </view>
  431. <view class="parameter-row">
  432. <view class="parameter-row-label">净含量</view>
  433. <view class="parameter-row-msg">500g 1500g 2500g</view>
  434. </view>
  435. <view class="parameter-row">
  436. <view class="parameter-row-label">厂址</view>
  437. <view class="parameter-row-msg">山东烟台</view>
  438. </view>
  439. <view class="parameter-row">
  440. <view class="parameter-row-label">厂家联系方式</view>
  441. <view class="parameter-row-msg">05358585333</view>
  442. </view>
  443. <view class="parameter-row">
  444. <view class="parameter-row-label">厂名</view>
  445. <view class="parameter-row-msg">程老伯旗舰店</view>
  446. </view>
  447. <view class="parameter-row">
  448. <view class="parameter-row-label">保质期</view>
  449. <view class="parameter-row-msg">7</view>
  450. </view>
  451. </view>
  452. <view class="window-bottom">
  453. <button type="default">确定</button>
  454. </view>
  455. </view>
  456. </view>
  457. <!-- 限源预售-参数-弹窗 -->
  458. <!-- 限源预售-选择规格-弹窗 -->
  459. <view v-show="isShowPreSaleSelectSpecification">
  460. <view class="mask" @tap="closePreSaleSelectSpecification"></view>
  461. <view class="selectSpecification-box">
  462. <view class="product-module">
  463. <image src="../../../static/img-4.png" class="product-img" mode="aspectFill"></image>
  464. <view class="product-module-sidebar">
  465. <view class="price-row">
  466. ¥394.00
  467. <text class="del-price">¥34.00</text>
  468. </view>
  469. <view class="product-module-title">陶太萌油蟠桃(黄肉蟠桃)</view>
  470. </view>
  471. </view>
  472. <view class="delivery-address-box">
  473. <view class="delivery-address-label">配送地址</view>
  474. <view class="location-row">
  475. <image src="../../../static/location-1.png" class="location-icon" mode=""></image>
  476. <view class="row-location-between">
  477. <text class="location-msg">山东省 临沂市 兰山区 柳青街道 </text>
  478. <image src="../../../static/back-icon2.png" class="back-icon" mode="widthFix"></image>
  479. </view>
  480. </view>
  481. </view>
  482. <view class="taste-row">
  483. <view class="taste-label">
  484. 净含量
  485. </view>
  486. <view class="specification-list">
  487. <view v-for="(item, index) in list3" :key="index">
  488. <view :class="'type2 ' + [choose == index ? 'active' : '']" @click="chooseItem(index)">
  489. {{ item.name }}
  490. </view>
  491. </view>
  492. </view>
  493. </view>
  494. <view class="taste-row">
  495. <view class="taste-label">
  496. 规格
  497. </view>
  498. <view class="specification-list">
  499. <view v-for="(item, index) in list2" :key="index">
  500. <view :class="'type2 ' + [selected == index ? 'active' : '']" @click="selectedItem(index)">
  501. {{ item.name }}
  502. </view>
  503. </view>
  504. </view>
  505. </view>
  506. <view class="number-box-between">
  507. <view class="number-label">购买数量<text>(限购10件)库存1899件</text></view>
  508. <view class="calc_box">
  509. <view class="calc_btn">
  510. <image src="../../../static/less.png" mode="widthFix" />
  511. </view>
  512. <input type="number" value="1" class="calc_number" />
  513. <view class="calc_btn">
  514. <image src="../../../static/add.png" mode="widthFix" />
  515. </view>
  516. </view>
  517. </view>
  518. <view class="window-bottom">
  519. <button type="default">确定</button>
  520. </view>
  521. </view>
  522. </view>
  523. <!-- 限源预售-选择规格-弹窗 -->
  524. </view>
  525. </template>
  526. <script>
  527. import HeaderViewBar from '../../../components/header-view-bar/header-view-bar.vue';
  528. import popupMessage from '../../../components/addSuccess.vue';
  529. export default {
  530. components: {
  531. HeaderViewBar,
  532. popupMessage
  533. },
  534. data() {
  535. return {
  536. headerHeight: 0,
  537. headerContainerWidth: 0,
  538. scrollTop: 0,
  539. //轮播
  540. swiperList: [
  541. '../../../static/img-4.png',
  542. '../../../static/img-4.png',
  543. '../../../static/img-4.png'
  544. ],
  545. swiperCurrent: 0,
  546. star: 3, //评价,默认3星
  547. select: false, //收藏
  548. isShowAssure: false, //保障弹窗
  549. isShowSelectSpecification: false, //选择规格-弹窗
  550. //口味-单选
  551. list: [{
  552. name: '桂花坚果藕粉羹【实发1罐500g】'
  553. },
  554. {
  555. name: '坚果水果藕粉羹【实发1罐500g】'
  556. },
  557. {
  558. name: '桂花坚果藕粉羹【拍1份发两罐 拍2份发5罐同款】'
  559. },
  560. {
  561. name: '坚果水果藕粉羹【拍1份发两罐 拍2份发5罐同款】'
  562. },
  563. {
  564. name: '坚果水果+桂花坚果[(拍1份发2罐)(拍2份发5罐,2罐坚果水果+3罐…'
  565. }
  566. ],
  567. id: '0', //单选 初始化第一个高亮
  568. isShowParameter: false, //限源预售-参数-弹窗
  569. isShowPreSaleSelectSpecification: false, //限源预售-选择规格-弹窗
  570. list2: [{
  571. name: '小果55-60mm【个头偏小】'
  572. },
  573. {
  574. name: '中果55-60mm【实惠装】'
  575. },
  576. {
  577. name: '大果60-65mm【性价比】'
  578. },
  579. {
  580. name: '精选大果65mm+【超值人气爆款】'
  581. }
  582. ],
  583. selected: '3', //单选 初始化第一个高亮
  584. list3: [{
  585. name: '3斤'
  586. },
  587. {
  588. name: '5斤'
  589. },
  590. {
  591. name: '9斤'
  592. }
  593. ],
  594. choose: '2', //单选 初始化第一个高亮
  595. //倒计时
  596. timeData: {},
  597. }
  598. },
  599. onShow() {
  600. setTimeout(() => {
  601. this.headerHeight = this.$refs['HeaderViewBar'].getHeaderStyle().headerHeight;
  602. this.headerContainerWidth = this.$refs['HeaderViewBar'].getHeaderStyle().headerContainerWidth;
  603. }, 20);
  604. },
  605. methods: {
  606. // 返回顶部
  607. toTop() {
  608. uni.pageScrollTo({
  609. scrollTop: 0,
  610. duration: 100,
  611. });
  612. },
  613. //返回上一页
  614. back() {
  615. uni.navigateBack({
  616. delta: 1,
  617. })
  618. },
  619. //轮播
  620. swiperChange(e) {
  621. const {
  622. current
  623. } = e.detail;
  624. this.swiperCurrent = current;
  625. },
  626. //加入购物车成功-弹窗
  627. addCartSuccess(){
  628. uni.showToast({
  629. title: '加入购物车成功',
  630. duration: 2000
  631. });
  632. },
  633. //收藏
  634. collect: function() {
  635. this.select = !this.select;
  636. },
  637. //保障-弹窗
  638. showAssure() {
  639. this.isShowAssure = true;
  640. },
  641. closeAssure() {
  642. this.isShowAssure = false;
  643. },
  644. //选择规格-弹窗
  645. showSelectSpecification() {
  646. this.isShowSelectSpecification = true;
  647. },
  648. closeSelectSpecification() {
  649. this.isShowSelectSpecification = false;
  650. },
  651. //口味-单选
  652. choseItem: function(index) {
  653. // console.log(index)
  654. this.id = index;
  655. },
  656. //限源预售-参数-弹窗
  657. showParameter() {
  658. this.isShowParameter = true;
  659. },
  660. closeParameter() {
  661. this.isShowParameter = false;
  662. },
  663. //限源预售-选择规格-弹窗
  664. showPreSaleSelectSpecification() {
  665. this.isShowPreSaleSelectSpecification = true;
  666. },
  667. closePreSaleSelectSpecification() {
  668. this.isShowPreSaleSelectSpecification = false;
  669. },
  670. //限源预售-规格-单选
  671. selectedItem: function(index) {
  672. // console.log(index)
  673. this.selected = index;
  674. },
  675. //限源预售-净含量-单选
  676. chooseItem: function(index) {
  677. // console.log(index)
  678. this.choose = index;
  679. },
  680. //倒计时
  681. onChange(e) {
  682. this.timeData = e
  683. },
  684. //跳转购物车
  685. shoppingCart(){
  686. uni.navigateTo({
  687. url:'../../shopping-cart/shopping-cart'
  688. })
  689. },
  690. },
  691. onPageScroll(e) {
  692. this.scrollTop = e.scrollTop;
  693. }
  694. }
  695. </script>
  696. <style scoped lang="scss">
  697. @import "./product-details.css";
  698. .time {
  699. @include flex;
  700. align-items: center;
  701. &__custom {
  702. margin-top: 4px;
  703. width: 19px;
  704. height: 20px;
  705. line-height: 20px;
  706. background-color: #FC4A04 !important;
  707. border-radius: 4px;
  708. /* #ifndef APP-NVUE */
  709. display: flex;
  710. /* #endif */
  711. justify-content: center;
  712. align-items: center;
  713. &__item {
  714. color: #fff !important;
  715. font-size: 24rpx !important;
  716. text-align: center;
  717. font-weight: bold;
  718. margin: 0 !important;
  719. }
  720. }
  721. &__doc {
  722. color: #F2501A !important;
  723. padding: 0 6rpx !important;
  724. font-size: 36rpx !important;
  725. margin: 0 !important;
  726. }
  727. }
  728. </style>