shop.vue 29 KB

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