shop.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  1. <template>
  2. <view class="container">
  3. <scroll-view style="height: 100vh;" class="floor-list"
  4. :scroll-top="scrollTop" scroll-y="true" @scroll="scroll" @scrolltoupper="upper" @scrolltolower="lower"
  5. refresher-enabled="true">
  6. <view class="carousel">
  7. <swiper indicator-dots circular=true duration="400">
  8. <swiper-item class="swiper-item" v-for="(item,index) in imgList" :key="index">
  9. <view class="image-wrapper">
  10. <image
  11. :src="item.src"
  12. class="loaded"
  13. mode="aspectFill"
  14. ></image>
  15. </view>
  16. </swiper-item>
  17. </swiper>
  18. </view>
  19. <view class="introduce-section">
  20. <view class="titleLayout" >
  21. <view class="title">恒源祥2019春季长袖白色t恤 新款春装</view>
  22. <view @tap="shopDetail" style="display: flex;flex-direction: row;">
  23. <view class="titleRight">
  24. <view style="font-size: 36upx;color: #D9332E;text-align: right;">0%</view>
  25. <view style="color: #606266;font-size: 28upx;">好评率</view>
  26. </view>
  27. <view style="display: flex;align-items: center;">
  28. <uni-icon size="18" type="arrowright"></uni-icon>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="titleLayout price-box">
  33. <view>
  34. <text class="price-tip">¥</text>
  35. <text class="price">341.6</text>
  36. <text class="m-price">¥488</text>
  37. </view>
  38. <view>
  39. <text style="color: #909399">月销售0</text>
  40. </view>
  41. </view>
  42. </view>
  43. <!-- 分享 -->
  44. <!-- <view class="share-section" @click="share">
  45. <view class="share-icon">
  46. <text class="yticon icon-xingxing"></text>
  47. </view>
  48. <text class="tit">该商品分享可领49减10红包</text>
  49. <text class="yticon icon-bangzhu1"></text>
  50. <view class="share-btn">
  51. 立即分享
  52. <text class="yticon icon-you"></text>
  53. </view>
  54. </view> -->
  55. <view class="c-list">
  56. <view style="display: flex;justify-content: space-between;" class="c-row b-b" @click="toggleSpec">
  57. <view style="font-size: 32upx;color: #909399;">规则数量选择</view>
  58. <view>
  59. <uni-icon size="20" type="arrowright"></uni-icon>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 评价 -->
  64. <view @tap="shopDetail" style="border-bottom: 20rpx solid #F5F5F5;" class="eva-section">
  65. <view style="display: flex;justify-content: space-between;" class="c-row b-b">
  66. <view style="font-size: 32upx;color: #909399;">评价</view>
  67. <view>
  68. <uni-icon size="20" type="arrowright"></uni-icon>
  69. </view>
  70. </view>
  71. <assess />
  72. </view>
  73. <!-- :class="iScrolltop == 2?'activeColor' : ''" -->
  74. <view class="detail-desc" >
  75. <van-tabs v-model="active" @click="onChange">
  76. <van-tab :name="0" title="详情">
  77. <rich-text :nodes="desc"></rich-text>
  78. </van-tab>
  79. <van-tab :name="1" title="常见问题">
  80. 详情ddddddddddd 常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题常见问题d常见问题常见问题常见问题常见问题常见问题常见问题
  81. </van-tab>
  82. </van-tabs>
  83. </view>
  84. <!-- 底部操作菜单 -->
  85. <view class="page-bottom">
  86. <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
  87. <text class="yticon icon-xiatubiao--copy"></text>
  88. <text>首页</text>
  89. </navigator>
  90. <navigator url="/pages/index/cart" open-type="navigate" class="p-b-btn">
  91. <text class="yticon icon-gouwuche"></text>
  92. <text>购物车</text>
  93. </navigator>
  94. <view class="p-b-btn" :class="{active: favorite}" @click="toFavorite">
  95. <text class="yticon icon-shoucang"></text>
  96. <text>收藏</text>
  97. </view>
  98. <view class="action-btn-group">
  99. <button type="primary" @click="openCar" class=" action-btn no-border add-cart-btn">加入购物车</button>
  100. <button type="primary" class=" action-btn no-border buy-now-btn" @click="buy">立即购买</button>
  101. </view>
  102. </view>
  103. <!-- 规格-模态层弹窗 -->
  104. <view
  105. class="popup spec"
  106. :class="specClass"
  107. @touchmove.stop.prevent="stopPrevent"
  108. @click="toggleSpec"
  109. >
  110. <!-- 遮罩层 -->
  111. <view class="mask"></view>
  112. <view class="layer attr-content" @click.stop="stopPrevent">
  113. <view class="a-t">
  114. <image src="https://gd3.alicdn.com/imgextra/i3/0/O1CN01IiyFQI1UGShoFKt1O_!!0-item_pic.jpg_400x400.jpg"></image>
  115. <view class="right">
  116. <text class="price" style="font-size: 36upx;color: #303133">¥328.00</text>
  117. <view class="selected">
  118. 已选:
  119. <text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">
  120. {{sItem.name}}
  121. </text>
  122. </view>
  123. </view>
  124. <view @click="closeCar" style="position: absolute;right: 10%;">
  125. <uni-icon size="20" type="close"></uni-icon>
  126. </view>
  127. </view>
  128. <view v-for="(item,index) in specList" :key="index" class="attr-list">
  129. <text>{{item.name}}</text>
  130. <view class="item-list">
  131. <text
  132. v-for="(childItem, childIndex) in specChildList"
  133. v-if="childItem.pid === item.id"
  134. :key="childIndex" class="tit"
  135. :class="{selected: childItem.selected}"
  136. @click="selectSpec(childIndex, childItem.pid)"
  137. >
  138. {{childItem.name}}
  139. </text>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. <!-- 分享 -->
  145. <!-- <share
  146. ref="share"
  147. :contentHeight="580"
  148. :shareList="shareList"
  149. ></share> -->
  150. </scroll-view>
  151. </view>
  152. </template>
  153. <script>
  154. import assess from '@/component/assess.vue' // 评价列表
  155. import uniIcon from '@/component/uni-icon/uni-icon.vue'
  156. export default{
  157. components: {
  158. uniIcon,
  159. assess
  160. },
  161. data() {
  162. return {
  163. windowHeight: 0, // 窗口高度
  164. iScrolltop: 1,
  165. active: 0,
  166. scrollTop: 0,
  167. old: {
  168. scrollTop: 0
  169. },
  170. specClass: 'none',
  171. specSelected:[],
  172. favorite: true,
  173. shareList: [],
  174. imgList: [
  175. {
  176. src: 'https://gd3.alicdn.com/imgextra/i3/0/O1CN01IiyFQI1UGShoFKt1O_!!0-item_pic.jpg_400x400.jpg'
  177. },
  178. {
  179. src: 'https://gd3.alicdn.com/imgextra/i3/TB1RPFPPFXXXXcNXpXXXXXXXXXX_!!0-item_pic.jpg_400x400.jpg'
  180. },
  181. {
  182. src: 'https://gd2.alicdn.com/imgextra/i2/38832490/O1CN01IYq7gu1UGShvbEFnd_!!38832490.jpg_400x400.jpg'
  183. }
  184. ],
  185. desc: `
  186. <div style="width:100%">
  187. <img style="width:100%;display:block;" src="https://gd3.alicdn.com/imgextra/i4/479184430/O1CN01nCpuLc1iaz4bcSN17_!!479184430.jpg_400x400.jpg" />
  188. <img style="width:100%;display:block;" src="https://gd2.alicdn.com/imgextra/i2/479184430/O1CN01gwbN931iaz4TzqzmG_!!479184430.jpg_400x400.jpg" />
  189. <img style="width:100%;display:block;" src="https://gd3.alicdn.com/imgextra/i3/479184430/O1CN018wVjQh1iaz4aupv1A_!!479184430.jpg_400x400.jpg" />
  190. <img style="width:100%;display:block;" src="https://gd4.alicdn.com/imgextra/i4/479184430/O1CN01tWg4Us1iaz4auqelt_!!479184430.jpg_400x400.jpg" />
  191. <img style="width:100%;display:block;" src="https://gd1.alicdn.com/imgextra/i1/479184430/O1CN01Tnm1rU1iaz4aVKcwP_!!479184430.jpg_400x400.jpg" />
  192. </div>
  193. `,
  194. specList: [
  195. {
  196. id: 1,
  197. name: '尺寸',
  198. },
  199. {
  200. id: 2,
  201. name: '颜色',
  202. },
  203. ],
  204. specChildList: [
  205. {
  206. id: 1,
  207. pid: 1,
  208. name: 'XS',
  209. },
  210. {
  211. id: 2,
  212. pid: 1,
  213. name: 'S',
  214. },
  215. {
  216. id: 3,
  217. pid: 1,
  218. name: 'M',
  219. },
  220. {
  221. id: 4,
  222. pid: 1,
  223. name: 'L',
  224. },
  225. {
  226. id: 5,
  227. pid: 1,
  228. name: 'XL',
  229. },
  230. {
  231. id: 6,
  232. pid: 1,
  233. name: 'XXL',
  234. },
  235. {
  236. id: 7,
  237. pid: 2,
  238. name: '白色',
  239. },
  240. {
  241. id: 8,
  242. pid: 2,
  243. name: '珊瑚粉',
  244. },
  245. {
  246. id: 9,
  247. pid: 2,
  248. name: '草木绿',
  249. },
  250. ]
  251. };
  252. },
  253. onLaunch: function(){
  254. this.active = 1;
  255. console.log(this.active);
  256. console.log("kdkkdkd");
  257. },
  258. onShow: function() {
  259. console.log("11")
  260. console.log(this.windowHeight)
  261. let that = this;
  262. uni.getSystemInfo({
  263. success: function (res) {
  264. that.windowHeight = res.screenHeight;
  265. // console.log("屏幕宽度:"+res.screenWidth);
  266. // console.log("屏幕高度:"+res.screenHeight);
  267. // console.log("可使用窗口宽度:"+res.windowWidth);
  268. // console.log("可使用窗口高度:"+res.windowHeight);
  269. }
  270. });
  271. },
  272. async onLoad(options){
  273. //接收传值,id里面放的是标题,因为测试数据并没写id
  274. let id = options.id;
  275. if(id){
  276. this.$api.msg(`点击了${id}`);
  277. }
  278. //规格 默认选中第一条
  279. this.specList.forEach(item=>{
  280. for(let cItem of this.specChildList){
  281. if(cItem.pid === item.id){
  282. this.$set(cItem, 'selected', true);
  283. this.specSelected.push(cItem);
  284. break; //forEach不能使用break
  285. }
  286. }
  287. })
  288. this.shareList = await this.$api.json('shareList');
  289. },
  290. methods:{
  291. shopDetail() {
  292. uni.navigateTo({
  293. url: './commemt',
  294. });
  295. },
  296. onChange(event) {
  297. this.active = event.detail.name;
  298. console.log(this.active)
  299. },
  300. //规格弹窗开关
  301. toggleSpec() {
  302. this.specClass = 'show';
  303. // if(this.specClass === 'show'){
  304. // this.specClass = 'hide';
  305. // setTimeout(() => {
  306. // this.specClass = 'none';
  307. // }, 250);
  308. // }else if(this.specClass === 'none'){
  309. // this.specClass = 'show';
  310. // }
  311. },
  312. //
  313. openCar() {
  314. this.specClass = 'show';
  315. },
  316. closeCar() {
  317. this.specClass = 'none';
  318. },
  319. //选择规格
  320. selectSpec(index, pid){
  321. let list = this.specChildList;
  322. list.forEach(item=>{
  323. if(item.pid === pid){
  324. this.$set(item, 'selected', false);
  325. }
  326. })
  327. this.$set(list[index], 'selected', true);
  328. //存储已选择
  329. /**
  330. * 修复选择规格存储错误
  331. * 将这几行代码替换即可
  332. * 选择的规格存放在specSelected中
  333. */
  334. this.specSelected = [];
  335. list.forEach(item=>{
  336. if(item.selected === true){
  337. this.specSelected.push(item);
  338. }
  339. })
  340. },
  341. // 滚动到顶部
  342. upper(e) {
  343. console.log(e)
  344. console.log("顶部")
  345. },
  346. // 滚到底部
  347. lower(e) {
  348. console.log("底部")
  349. },
  350. // 滚动时触发
  351. scroll(e) {
  352. this.old.scrollTop = e.detail.scrollTop
  353. console.log(e.detail.scrollTop);
  354. if(e.detail.scrollTop > this.windowHeight) {
  355. this.iScrolltop = 2;
  356. }else {
  357. this.iScrolltop = 1;
  358. }
  359. },
  360. //收藏
  361. toFavorite(){
  362. this.favorite = !this.favorite;
  363. },
  364. buy(){
  365. uni.navigateTo({
  366. url: './sureBuy'
  367. })
  368. },
  369. stopPrevent(){}
  370. },
  371. }
  372. </script>
  373. <style lang='scss'>
  374. page{
  375. /* background: $page-color-base; */
  376. padding-bottom: 160upx;
  377. }
  378. .icon-you{
  379. font-size: 28upx + 2upx;
  380. color: #888;
  381. }
  382. .carousel {
  383. height: 722upx;
  384. position:relative;
  385. swiper{
  386. height: 100%;
  387. }
  388. .image-wrapper{
  389. width: 100%;
  390. height: 100%;
  391. }
  392. .swiper-item {
  393. display: flex;
  394. justify-content: center;
  395. align-content: center;
  396. height: 750upx;
  397. overflow: hidden;
  398. image {
  399. width: 100%;
  400. height: 100%;
  401. }
  402. }
  403. }
  404. .titleLayout {
  405. display: flex;
  406. justify-content: space-between;
  407. padding-bottom: 20upx;
  408. }
  409. /* 标题简介 */
  410. .introduce-section{
  411. background: #fff;
  412. padding: 20upx 30upx;
  413. .title{
  414. font-size: 36upx;
  415. color: #303133;
  416. height: 50upx;
  417. line-height: 50upx;
  418. width: 70%;
  419. white-space:nowrap;
  420. overflow:hidden;
  421. text-overflow:ellipsis;
  422. }
  423. .titleRight {
  424. border-left: 1px solid #F5F5F5;
  425. padding-left: 32upx;
  426. }
  427. .price-box{
  428. display:flex;
  429. align-items:baseline;
  430. height: 64upx;
  431. padding: 10upx 0;
  432. font-size: 26upx;
  433. color:#fa436a;
  434. }
  435. .price{
  436. font-size: $font-lg + 2upx;
  437. }
  438. .m-price{
  439. margin:0 12upx;
  440. color: #909399;
  441. text-decoration: line-through;
  442. }
  443. .coupon-tip{
  444. align-items: center;
  445. padding: 4upx 10upx;
  446. background: #fa436a;
  447. font-size: 24upx;
  448. color: #fff;
  449. border-radius: 6upx;
  450. line-height: 1;
  451. transform: translateY(-4upx);
  452. }
  453. .bot-row{
  454. display:flex;
  455. align-items:center;
  456. height: 50upx;
  457. font-size: 24upx;
  458. color: #909399;
  459. text{
  460. flex: 1;
  461. }
  462. }
  463. }
  464. /* 分享 */
  465. .share-section{
  466. display:flex;
  467. align-items:center;
  468. color: #606266;
  469. background: linear-gradient(left, #fdf5f6, #fbebf6);
  470. padding: 12upx 30upx;
  471. .share-icon{
  472. display:flex;
  473. align-items:center;
  474. width: 70upx;
  475. height: 30upx;
  476. line-height: 1;
  477. border: 1px solid #fa436a;
  478. border-radius: 4upx;
  479. position:relative;
  480. overflow: hidden;
  481. font-size: 22upx;
  482. color: #fa436a;
  483. &:after{
  484. content: '';
  485. width: 50upx;
  486. height: 50upx;
  487. border-radius: 50%;
  488. left: -20upx;
  489. top: -12upx;
  490. position:absolute;
  491. background: #fa436a;
  492. }
  493. }
  494. .icon-xingxing{
  495. position:relative;
  496. z-index: 1;
  497. font-size: 24upx;
  498. margin-left: 2upx;
  499. margin-right: 10upx;
  500. color: #fff;
  501. line-height: 1;
  502. }
  503. .tit{
  504. font-size: 28upx;
  505. margin-left:10upx;
  506. }
  507. .icon-bangzhu1{
  508. padding: 10upx;
  509. font-size: 30upx;
  510. line-height: 1;
  511. }
  512. .share-btn{
  513. flex: 1;
  514. text-align:right;
  515. font-size: 24upx;
  516. color: #fa436a;
  517. }
  518. .icon-you{
  519. font-size: 24upx;
  520. margin-left: 4upx;
  521. color: #fa436a;
  522. }
  523. }
  524. .c-list{
  525. font-size: 24upx + 2upx;
  526. color: #606266;
  527. background: #fff;
  528. border-top: 20upx solid #F5F5F5;
  529. border-bottom: 20upx solid #F5F5F5;
  530. .c-row{
  531. display:flex;
  532. align-items:center;
  533. padding: 20upx 30upx;
  534. position:relative;
  535. }
  536. .tit{
  537. width: 140upx;
  538. }
  539. .con{
  540. flex: 1;
  541. color: #303133;
  542. .selected-text{
  543. margin-right: 10upx;
  544. }
  545. }
  546. .bz-list{
  547. height: 40upx;
  548. font-size: 24upx+2upx;
  549. color: #303133;
  550. text{
  551. display: inline-block;
  552. margin-right: 30upx;
  553. }
  554. }
  555. .con-list{
  556. flex: 1;
  557. display:flex;
  558. flex-direction: column;
  559. color: #303133;
  560. line-height: 40upx;
  561. }
  562. .red{
  563. color: #fa436a;
  564. }
  565. }
  566. /* 评价 */
  567. .eva-section{
  568. display: flex;
  569. flex-direction: column;
  570. padding: 20upx 30upx;
  571. background: #fff;
  572. margin-top: 16upx;
  573. .e-header{
  574. display: flex;
  575. align-items: center;
  576. height: 70upx;
  577. font-size: 24upx + 2upx;
  578. color: #909399;
  579. .tit{
  580. font-size: 28upx + 2upx;
  581. color: #303133;
  582. margin-right: 4upx;
  583. }
  584. .tip{
  585. flex: 1;
  586. text-align: right;
  587. }
  588. .icon-you{
  589. margin-left: 10upx;
  590. }
  591. }
  592. }
  593. .eva-box{
  594. display: flex;
  595. padding: 20upx 0;
  596. .portrait{
  597. flex-shrink: 0;
  598. width: 80upx;
  599. height: 80upx;
  600. border-radius: 100px;
  601. }
  602. .right{
  603. flex: 1;
  604. display: flex;
  605. flex-direction: column;
  606. font-size: 28upx;
  607. color: #606266;
  608. padding-left: 26upx;
  609. .con{
  610. font-size: 28upx;
  611. color: #303133;
  612. padding: 20upx 0;
  613. }
  614. .bot{
  615. display: flex;
  616. justify-content: space-between;
  617. font-size: 24upx;
  618. color:#909399;
  619. }
  620. }
  621. }
  622. /* 详情 */
  623. .detail-desc{
  624. background: #fff;
  625. margin-top: 16upx;
  626. width: 100%;
  627. .d-header{
  628. display: flex;
  629. justify-content: center;
  630. align-items: center;
  631. height: 80upx;
  632. font-size: 28upx + 2upx;
  633. color: #303133;
  634. position: relative;
  635. text{
  636. padding: 0 20upx;
  637. background: #fff;
  638. position: relative;
  639. z-index: 1;
  640. }
  641. &:after{
  642. position: absolute;
  643. left: 50%;
  644. top: 50%;
  645. transform: translateX(-50%);
  646. width: 300upx;
  647. height: 0;
  648. content: '';
  649. border-bottom: 1px solid #ccc;
  650. }
  651. }
  652. }
  653. /* 规格选择弹窗 */
  654. .attr-content{
  655. padding: 10upx 30upx;
  656. .a-t{
  657. display: flex;
  658. image{
  659. width: 170upx;
  660. height: 170upx;
  661. flex-shrink: 0;
  662. margin-top: -40upx;
  663. border-radius: 8upx;;
  664. }
  665. .right{
  666. display: flex;
  667. flex-direction: column;
  668. padding-left: 24upx;
  669. font-size: 24upx + 2upx;
  670. color: #606266;
  671. line-height: 42upx;
  672. justify-content: space-around;
  673. .price{
  674. font-size: $font-lg;
  675. color: #fa436a;
  676. margin-bottom: 10upx;
  677. }
  678. .selected-text{
  679. margin-right: 10upx;
  680. }
  681. }
  682. }
  683. .attr-list{
  684. display: flex;
  685. flex-direction: column;
  686. font-size: 28upx + 2upx;
  687. color: #606266;
  688. padding-top: 30upx;
  689. padding-left: 10upx;
  690. }
  691. .item-list{
  692. padding: 20upx 0 0;
  693. display: flex;
  694. flex-wrap: wrap;
  695. text{
  696. display: flex;
  697. align-items: center;
  698. justify-content: center;
  699. background: #eee;
  700. margin-right: 20upx;
  701. margin-bottom: 20upx;
  702. border-radius: 100upx;
  703. min-width: 60upx;
  704. height: 60upx;
  705. padding: 0 20upx;
  706. font-size: 28upx;
  707. color: #303133;
  708. }
  709. .selected{
  710. background: #fbebee;
  711. color: #fa436a;
  712. }
  713. }
  714. }
  715. /* 弹出层 */
  716. .popup {
  717. position: fixed;
  718. left: 0;
  719. top: 0;
  720. right: 0;
  721. bottom: 100upx;
  722. z-index: 99;
  723. &.show {
  724. display: block;
  725. .mask{
  726. animation: showPopup 0.2s linear both;
  727. }
  728. .layer {
  729. animation: showLayer 0.2s linear both;
  730. }
  731. }
  732. &.hide {
  733. .mask{
  734. animation: hidePopup 0.2s linear both;
  735. }
  736. .layer {
  737. animation: hideLayer 0.2s linear both;
  738. }
  739. }
  740. &.none {
  741. display: none;
  742. }
  743. .mask{
  744. position: fixed;
  745. top: 0;
  746. width: 100%;
  747. height: 90%;
  748. z-index: 1;
  749. background-color: rgba(0, 0, 0, 0.4);
  750. }
  751. .layer {
  752. position: fixed;
  753. z-index: 99;
  754. bottom: 100upx;
  755. width: 100%;
  756. min-height: 40vh;
  757. border-radius: 10upx 10upx 0 0;
  758. background-color: #fff;
  759. .btn{
  760. height: 66upx;
  761. line-height: 66upx;
  762. border-radius: 100upx;
  763. background: #fa436a;
  764. font-size: 28upx + 2upx;
  765. color: #fff;
  766. margin: 30upx auto 20upx;
  767. }
  768. }
  769. @keyframes showPopup {
  770. 0% {
  771. opacity: 0;
  772. }
  773. 100% {
  774. opacity: 1;
  775. }
  776. }
  777. @keyframes hidePopup {
  778. 0% {
  779. opacity: 1;
  780. }
  781. 90% {
  782. opacity: 0;
  783. }
  784. }
  785. @keyframes showLayer {
  786. 0% {
  787. transform: translateY(120%);
  788. }
  789. 100% {
  790. transform: translateY(0%);
  791. }
  792. }
  793. @keyframes hideLayer {
  794. 0% {
  795. transform: translateY(0);
  796. }
  797. 100% {
  798. transform: translateY(120%);
  799. }
  800. }
  801. }
  802. .van-sticky {
  803. /* z-index: 0!important; */
  804. }
  805. /* 详情固定 */
  806. .activeColor {
  807. /* background: #fff!important; */
  808. position: fixed;
  809. background-color: #fff;
  810. top: 0upx;
  811. z-index: 99;
  812. margin-top: 0;
  813. }
  814. /* 底部操作菜单 */
  815. .page-bottom{
  816. position: fixed;
  817. left: 0;
  818. bottom: 0;
  819. display: flex;
  820. justify-content: center;
  821. align-items: center;
  822. width: 100%;
  823. height: 100upx;
  824. z-index: 99;
  825. background: rgba(255,255,255,.9);
  826. .p-b-btn{
  827. display:flex;
  828. flex-direction: column;
  829. align-items: center;
  830. justify-content: center;
  831. font-size: 24upx;
  832. color: #606266;
  833. width: 96upx;
  834. height: 80upx;
  835. .yticon{
  836. font-size: 40upx;
  837. line-height: 48upx;
  838. color: #909399;
  839. }
  840. &.active, &.active .yticon{
  841. color: #fa436a;
  842. }
  843. .icon-fenxiang2{
  844. font-size: 42upx;
  845. transform: translateY(-2upx);
  846. }
  847. .icon-shoucang{
  848. font-size: 46upx;
  849. }
  850. }
  851. .action-btn-group{
  852. display: flex;
  853. height: 76upx;
  854. border-radius: 100px;
  855. overflow: hidden;
  856. box-shadow: 0 20upx 40upx -16upx #fa436a;
  857. box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  858. background: linear-gradient(to right, #ffac30,#fa436a,#F56C6C);
  859. margin-left: 20upx;
  860. position:relative;
  861. &:after{
  862. content: '';
  863. position:absolute;
  864. top: 50%;
  865. right: 50%;
  866. transform: translateY(-50%);
  867. height: 28upx;
  868. width: 0;
  869. border-right: 1px solid rgba(255,255,255,.5);
  870. }
  871. .action-btn{
  872. display:flex;
  873. align-items: center;
  874. justify-content: center;
  875. width: 180upx;
  876. height: 100%;
  877. font-size: 28upx ;
  878. padding: 0;
  879. border-radius: 0;
  880. background: transparent;
  881. }
  882. }
  883. }
  884. </style>