product-details.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  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">
  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. 收藏
  296. </button>
  297. </view>
  298. <view class="footer-rightsidebar">
  299. <button type="default" class="footer-rightsidebar-btn" @tap="showToast">
  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 class="window" v-show="isShowAddSuccess">
  315. <image src="../../../static/circle-active.png" mode="widthFix"></image>
  316. 添加成功,在购物车等您呦~
  317. </view>
  318. <!-- 加入购物车成功-弹窗 -->
  319. <!-- 保障-弹窗 -->
  320. <view v-show="isShowAssure">
  321. <view class="mask" @tap="closeAssure"></view>
  322. <view class="window-box">
  323. <view class="window-title">保障</view>
  324. <view class="window-top">
  325. <view class="window-row">
  326. <view class="window-label">产品可溯源</view>
  327. </view>
  328. <view class="window-row">
  329. <view class="window-label">七天无理由退换</view>
  330. <view class="window-msg">满足相应条件(吊牌缺失、洗涤后不支持)时,消费者可以申请“七天无理由退换货”</view>
  331. </view>
  332. </view>
  333. <view class="window-bottom">
  334. <button type="default">确定</button>
  335. </view>
  336. </view>
  337. </view>
  338. <!-- 保障-弹窗 -->
  339. <!-- 选择规格-弹窗 -->
  340. <view v-show="isShowSelectSpecification">
  341. <view class="mask" @tap="closeSelectSpecification"></view>
  342. <view class="selectSpecification-box">
  343. <view class="product-module">
  344. <image src="../../../static/img-4.png" class="product-img" mode="aspectFill"></image>
  345. <view class="product-module-sidebar">
  346. <view class="price-row">
  347. ¥394.00
  348. <text class="del-price">¥34.00</text>
  349. </view>
  350. <view class="product-module-title">藕粉桂花坚果藕粉羹营养早代餐 坚果羹营养早餐懒人冲饮食品</view>
  351. </view>
  352. </view>
  353. <view class="delivery-address-box">
  354. <view class="delivery-address-label">配送地址</view>
  355. <view class="location-row">
  356. <image src="../../../static/location-1.png" class="location-icon" mode=""></image>
  357. <view class="row-location-between">
  358. <text class="location-msg">山东省 临沂市 兰山区 柳青街道 </text>
  359. <image src="../../../static/back-icon2.png" class="back-icon" mode="widthFix"></image>
  360. </view>
  361. </view>
  362. </view>
  363. <view class="taste-row">
  364. <view class="taste-label">
  365. 口味
  366. </view>
  367. <view v-for="(item, index) in list" :key="index">
  368. <view :class="'type ' + [id == index ? 'active' : '']" @click="choseItem(index)">
  369. {{ item.name }}
  370. </view>
  371. </view>
  372. </view>
  373. <view class="number-box-between">
  374. <view class="number-label">购买数量<text>(限购10件)库存1899件</text></view>
  375. <view class="calc_box">
  376. <view class="calc_btn">
  377. <image src="../../../static/less.png" mode="widthFix" />
  378. </view>
  379. <input type="number" value="1" class="calc_number" />
  380. <view class="calc_btn">
  381. <image src="../../../static/add.png" mode="widthFix" />
  382. </view>
  383. </view>
  384. </view>
  385. <view class="window-bottom">
  386. <button type="default">确定</button>
  387. </view>
  388. </view>
  389. </view>
  390. <!-- 选择规格-弹窗 -->
  391. <!-- 限源预售-参数-弹窗 -->
  392. <view v-show="isShowParameter">
  393. <view class="mask" @tap="closeParameter"></view>
  394. <view class="window-box">
  395. <view class="window-title">参数</view>
  396. <view class="window-top">
  397. <view class="parameter-row">
  398. <view class="parameter-row-label">品牌</view>
  399. <view class="parameter-row-msg">程老伯</view>
  400. </view>
  401. <view class="parameter-row">
  402. <view class="parameter-row-label">价格</view>
  403. <view class="parameter-row-msg">0-50元</view>
  404. </view>
  405. <view class="parameter-row">
  406. <view class="parameter-row-label">产地</view>
  407. <view class="parameter-row-msg">中国大陆</view>
  408. </view>
  409. <view class="parameter-row">
  410. <view class="parameter-row-label">省份</view>
  411. <view class="parameter-row-msg">山东省</view>
  412. </view>
  413. <view class="parameter-row">
  414. <view class="parameter-row-label">同城服务</view>
  415. <view class="parameter-row-msg">同城24小时物流送货上门</view>
  416. </view>
  417. <view class="parameter-row">
  418. <view class="parameter-row-label">包装方式</view>
  419. <view class="parameter-row-msg">包装</view>
  420. </view>
  421. <view class="parameter-row">
  422. <view class="parameter-row-label">售卖方式</view>
  423. <view class="parameter-row-msg">单品</view>
  424. </view>
  425. <view class="parameter-row">
  426. <view class="parameter-row-label">套餐份量</view>
  427. <view class="parameter-row-msg">5人份</view>
  428. </view>
  429. <view class="parameter-row">
  430. <view class="parameter-row-label">套餐周期</view>
  431. <view class="parameter-row-msg">1周</view>
  432. </view>
  433. <view class="parameter-row">
  434. <view class="parameter-row-label">配送频次</view>
  435. <view class="parameter-row-msg">1周2次</view>
  436. </view>
  437. <view class="parameter-row">
  438. <view class="parameter-row-label">净含量</view>
  439. <view class="parameter-row-msg">500g 1500g 2500g</view>
  440. </view>
  441. <view class="parameter-row">
  442. <view class="parameter-row-label">厂址</view>
  443. <view class="parameter-row-msg">山东烟台</view>
  444. </view>
  445. <view class="parameter-row">
  446. <view class="parameter-row-label">厂家联系方式</view>
  447. <view class="parameter-row-msg">05358585333</view>
  448. </view>
  449. <view class="parameter-row">
  450. <view class="parameter-row-label">厂名</view>
  451. <view class="parameter-row-msg">程老伯旗舰店</view>
  452. </view>
  453. <view class="parameter-row">
  454. <view class="parameter-row-label">保质期</view>
  455. <view class="parameter-row-msg">7</view>
  456. </view>
  457. </view>
  458. <view class="window-bottom">
  459. <button type="default">确定</button>
  460. </view>
  461. </view>
  462. </view>
  463. <!-- 限源预售-参数-弹窗 -->
  464. <!-- 限源预售-选择规格-弹窗 -->
  465. <view v-show="isShowPreSaleSelectSpecification">
  466. <view class="mask" @tap="closePreSaleSelectSpecification"></view>
  467. <view class="selectSpecification-box">
  468. <view class="product-module">
  469. <image src="../../../static/img-4.png" class="product-img" mode="aspectFill"></image>
  470. <view class="product-module-sidebar">
  471. <view class="price-row">
  472. ¥394.00
  473. <text class="del-price">¥34.00</text>
  474. </view>
  475. <view class="product-module-title">陶太萌油蟠桃(黄肉蟠桃)</view>
  476. </view>
  477. </view>
  478. <view class="delivery-address-box">
  479. <view class="delivery-address-label">配送地址</view>
  480. <view class="location-row">
  481. <image src="../../../static/location-1.png" class="location-icon" mode=""></image>
  482. <view class="row-location-between">
  483. <text class="location-msg">山东省 临沂市 兰山区 柳青街道 </text>
  484. <image src="../../../static/back-icon2.png" class="back-icon" mode="widthFix"></image>
  485. </view>
  486. </view>
  487. </view>
  488. <view class="taste-row">
  489. <view class="taste-label">
  490. 净含量
  491. </view>
  492. <view class="specification-list">
  493. <view v-for="(item, index) in list3" :key="index">
  494. <view :class="'type2 ' + [choose == index ? 'active' : '']" @click="chooseItem(index)">
  495. {{ item.name }}
  496. </view>
  497. </view>
  498. </view>
  499. </view>
  500. <view class="taste-row">
  501. <view class="taste-label">
  502. 规格
  503. </view>
  504. <view class="specification-list">
  505. <view v-for="(item, index) in list2" :key="index">
  506. <view :class="'type2 ' + [selected == index ? 'active' : '']" @click="selectedItem(index)">
  507. {{ item.name }}
  508. </view>
  509. </view>
  510. </view>
  511. </view>
  512. <view class="number-box-between">
  513. <view class="number-label">购买数量<text>(限购10件)库存1899件</text></view>
  514. <view class="calc_box">
  515. <view class="calc_btn">
  516. <image src="../../../static/less.png" mode="widthFix" />
  517. </view>
  518. <input type="number" value="1" class="calc_number" />
  519. <view class="calc_btn">
  520. <image src="../../../static/add.png" mode="widthFix" />
  521. </view>
  522. </view>
  523. </view>
  524. <view class="window-bottom">
  525. <button type="default">确定</button>
  526. </view>
  527. </view>
  528. </view>
  529. <!-- 限源预售-选择规格-弹窗 -->
  530. </view>
  531. </template>
  532. <script>
  533. import HeaderViewBar from '../../../components/header-view-bar/header-view-bar.vue';
  534. import popupMessage from '../../../components/addSuccess.vue';
  535. export default {
  536. components: {
  537. HeaderViewBar,
  538. popupMessage
  539. },
  540. data() {
  541. return {
  542. headerHeight: 0,
  543. headerContainerWidth: 0,
  544. scrollTop: 0,
  545. //轮播
  546. swiperList: [
  547. '../../../static/img-4.png',
  548. '../../../static/img-4.png',
  549. '../../../static/img-4.png'
  550. ],
  551. swiperCurrent: 0,
  552. star: 3, //评价,默认3星
  553. isShowAddSuccess: false, //加入购物车成功弹窗
  554. select: false, //收藏
  555. isShowAssure: false, //保障弹窗
  556. isShowSelectSpecification: false, //选择规格-弹窗
  557. //口味-单选
  558. list: [{
  559. name: '桂花坚果藕粉羹【实发1罐500g】'
  560. },
  561. {
  562. name: '坚果水果藕粉羹【实发1罐500g】'
  563. },
  564. {
  565. name: '桂花坚果藕粉羹【拍1份发两罐 拍2份发5罐同款】'
  566. },
  567. {
  568. name: '坚果水果藕粉羹【拍1份发两罐 拍2份发5罐同款】'
  569. },
  570. {
  571. name: '坚果水果+桂花坚果[(拍1份发2罐)(拍2份发5罐,2罐坚果水果+3罐…'
  572. }
  573. ],
  574. id: '0', //单选 初始化第一个高亮
  575. isShowParameter: false, //限源预售-参数-弹窗
  576. isShowPreSaleSelectSpecification: false, //限源预售-选择规格-弹窗
  577. list2: [{
  578. name: '小果55-60mm【个头偏小】'
  579. },
  580. {
  581. name: '中果55-60mm【实惠装】'
  582. },
  583. {
  584. name: '大果60-65mm【性价比】'
  585. },
  586. {
  587. name: '精选大果65mm+【超值人气爆款】'
  588. }
  589. ],
  590. selected: '3', //单选 初始化第一个高亮
  591. list3: [{
  592. name: '3斤'
  593. },
  594. {
  595. name: '5斤'
  596. },
  597. {
  598. name: '9斤'
  599. }
  600. ],
  601. choose: '2', //单选 初始化第一个高亮
  602. //倒计时
  603. timeData: {},
  604. }
  605. },
  606. onShow() {
  607. setTimeout(() => {
  608. this.headerHeight = this.$refs['HeaderViewBar'].getHeaderStyle().headerHeight;
  609. this.headerContainerWidth = this.$refs['HeaderViewBar'].getHeaderStyle().headerContainerWidth;
  610. }, 20);
  611. },
  612. methods: {
  613. // 返回顶部
  614. toTop() {
  615. uni.pageScrollTo({
  616. scrollTop: 0,
  617. duration: 100,
  618. });
  619. },
  620. //返回上一页
  621. back() {
  622. uni.navigateBack({
  623. delta: 1,
  624. })
  625. },
  626. //轮播
  627. swiperChange(e) {
  628. const {
  629. current
  630. } = e.detail;
  631. this.swiperCurrent = current;
  632. },
  633. //加入购物车成功-弹窗
  634. showToast() {
  635. this.isShowAddSuccess = true;
  636. },
  637. closeAddSuccess() {
  638. this.isShowAddSuccess = false;
  639. },
  640. //收藏
  641. collect: function() {
  642. this.select = !this.select;
  643. },
  644. //保障-弹窗
  645. showAssure() {
  646. this.isShowAssure = true;
  647. },
  648. closeAssure() {
  649. this.isShowAssure = false;
  650. },
  651. //选择规格-弹窗
  652. showSelectSpecification() {
  653. this.isShowSelectSpecification = true;
  654. },
  655. closeSelectSpecification() {
  656. this.isShowSelectSpecification = false;
  657. },
  658. //口味-单选
  659. choseItem: function(index) {
  660. // console.log(index)
  661. this.id = index;
  662. },
  663. //限源预售-参数-弹窗
  664. showParameter() {
  665. this.isShowParameter = true;
  666. },
  667. closeParameter() {
  668. this.isShowParameter = false;
  669. },
  670. //限源预售-选择规格-弹窗
  671. showPreSaleSelectSpecification() {
  672. this.isShowPreSaleSelectSpecification = true;
  673. },
  674. closePreSaleSelectSpecification() {
  675. this.isShowPreSaleSelectSpecification = false;
  676. },
  677. //限源预售-规格-单选
  678. selectedItem: function(index) {
  679. // console.log(index)
  680. this.selected = index;
  681. },
  682. //限源预售-净含量-单选
  683. chooseItem: function(index) {
  684. // console.log(index)
  685. this.choose = index;
  686. },
  687. //倒计时
  688. onChange(e) {
  689. this.timeData = e
  690. },
  691. },
  692. onPageScroll(e) {
  693. this.scrollTop = e.scrollTop;
  694. }
  695. }
  696. </script>
  697. <style scoped lang="scss">
  698. @import "./product-details.css";
  699. .time {
  700. @include flex;
  701. align-items: center;
  702. &__custom {
  703. margin-top: 4px;
  704. width: 19px;
  705. height: 20px;
  706. line-height: 20px;
  707. background-color: #FC4A04 !important;
  708. border-radius: 4px;
  709. /* #ifndef APP-NVUE */
  710. display: flex;
  711. /* #endif */
  712. justify-content: center;
  713. align-items: center;
  714. &__item {
  715. color: #fff !important;
  716. font-size: 24rpx !important;
  717. text-align: center;
  718. font-weight: bold;
  719. margin: 0 !important;
  720. }
  721. }
  722. &__doc {
  723. color: #F2501A !important;
  724. padding: 0 6rpx !important;
  725. font-size: 36rpx !important;
  726. margin: 0 !important;
  727. }
  728. }
  729. </style>