productCollage.vue 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088
  1. <template>
  2. <view class="container">
  3. <!-- 轮播图 -->
  4. <view class="carousel">
  5. <swiper indicator-dots :circular="true" duration="400">
  6. <swiper-item class="swiper-item" v-for="(item, index) in imgList" :key="index">
  7. <view class="image-wrapper"><image :src="item" class="loaded" mode="scaleToFill"></image></view>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. <!-- 介绍部分 -->
  12. <view class="introduce-section">
  13. <view class="introduce-price flex1">
  14. <view class="price">
  15. <view class="price-left">
  16. <view class="left-1">¥</view>
  17. <view class="left-2">{{goodsObjact.price}}</view>
  18. </view>
  19. <!-- <view class="price-right" >单买价 ¥{{goodsObjact.product_price}}</view> -->
  20. </view>
  21. <view class="people flex_item">
  22. <view class="people_number">{{goodsObjact.people}}人拼</view>
  23. </view>
  24. </view>
  25. <view class="title" >{{goodsObjact.title}}</view>
  26. <view class="bot-row flex1">
  27. <view>快递:¥ {{goodsObjact.postage}}</view>
  28. <view>剩余:{{ goodsObjact.quota}}件</view>
  29. <view>销量:{{ goodsObjact.sales }}</view>
  30. </view>
  31. </view>
  32. <!-- <view class="c-list">
  33. <view class="c-row b-b"><text class="tit">拼团玩法</text></view>
  34. <view class="c-row b-b">
  35. <view class="c-text">
  36. ①开团/参团
  37. <text>——</text>
  38. ②邀请好友
  39. <text>——</text>
  40. ③满员发货
  41. </view>
  42. </view>
  43. <view class="c-row b-b" @click="toggleSpec()" v-if="goodsType == 2">
  44. <text class="tit">购买数量</text>
  45. <view class="con">
  46. <text class="selected-text">{{ goodsNumber }}</text>
  47. </view>
  48. <text class="iconfont iconenter"></text>
  49. </view>
  50. </view> -->
  51. <view class="pinklistbox" v-if="pinkTlist.length > 0">
  52. <view class="listbox-1 flex1">
  53. <view >{{pinkTlist.length}}人在拼单,可直接参与</view>
  54. <view class="more flex-center" @click="opens_popup" v-if="more">查看全部
  55. <image src="../../../static/img/img39.png"></image>
  56. </view>
  57. </view>
  58. <view class="pinklist">
  59. <view v-for="(ls, ind) in showlist" :key="ind" class="flex pinklist_list">
  60. <view class="pink_row flex1">
  61. <view class="pink_img"><image :src="ls.avatar"></image></view>
  62. <view class="pink_name">{{ ls.nickname }}</view>
  63. </view>
  64. <view class="pink_tpl flex1">
  65. <view >
  66. <view class="pink_people">
  67. 还差
  68. <text>{{ ls.count}}</text>
  69. 人拼团
  70. </view>
  71. <!-- <view class="pink_people">
  72. 剩余{{ls.time || '00:00:00'}}
  73. </view> -->
  74. </view>
  75. <view class="pint" @click="groupBooking(ls.id)">
  76. 去拼单
  77. <!-- <text class="iconfont iconenter"></text> opens_popups-->
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. <!-- 评价 -->
  84. <!-- <view class="eva-section" v-if="replyCount > 0" @click="navTo('/pages/product/reply')">
  85. <view class="e-header">
  86. <text class="tit">评价</text>
  87. <text class="number">({{replyCount}})</text>
  88. <text class="tip">全部评价</text>
  89. <text class="iconfont iconenter"></text>
  90. </view>
  91. <view class="eva-box">
  92. <view class="box-1 flex1">
  93. <view class="left flex-start">
  94. <image :src="commentList.avatar"></image>
  95. <view class="content">
  96. <view class="content-name">{{commentList.nickname}}</view>
  97. <view class="content-time">{{commentList.add_time}}</view>
  98. </view>
  99. </view>
  100. <view class="right flex-upDown-center">
  101. <view><uniRate text="1" size="14" margin="1" :value="commentList.product_score" ></uniRate></view>
  102. <text class="red">{{commentList.product_score}}分</text>
  103. </view>
  104. </view>
  105. <view class="box-2">{{commentList.comment}}</view>
  106. <view class="box-3">
  107. <view v-for="(item,index) in commentList.pics" :key="index" class="box-3-1">
  108. <image :src="item"></image>
  109. </view>
  110. </view>
  111. </view>
  112. </view> -->
  113. <view class="eva-section" v-if="reply.length > 0" @click="navTo('/pages/product/reply?id=' + goodsid)">
  114. <view class="e-header">
  115. <text class="tit">评价</text>
  116. <text>({{ list.replyCount }})</text>
  117. <text class="tip">好评率 {{ list.replyChance }}%</text>
  118. <text class="iconfont iconenter"></text>
  119. </view>
  120. <view class="eva-box">
  121. <image class="portrait" :src="reply.avatar" mode="aspectFill"></image>
  122. <view class="right">
  123. <text class="name">{{ reply.nickname }}</text>
  124. <text class="con">{{ reply.comment }}</text>
  125. <view class="con_box">
  126. <view class="con_image" v-for="item in reply.pics"><image :src="item"></image></view>
  127. </view>
  128. <view class="bot">
  129. <text class="attr"></text>
  130. <text class="time">{{ reply.add_time }}</text>
  131. </view>
  132. </view>
  133. </view>
  134. </view>
  135. <!-- 商品详情图 -->
  136. <view class="detail-desc">
  137. <view class="desc-title flex-center">
  138. <view class="one"></view>
  139. 商品详情
  140. <view class="two"></view>
  141. </view>
  142. <rich-text :nodes="goodsObjact.description"></rich-text>
  143. </view>
  144. <!-- <view class="detail-desc">
  145. <view class="d-header"><text>图文详情</text></view>
  146. <rich-text :nodes="goodsObjact.description"></rich-text>
  147. </view> -->
  148. <!-- 拼团商品 -->
  149. <view class="page-bottom" >
  150. <!-- <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
  151. <text class="iconfont iconhomefill"></text>
  152. <text>首页</text>
  153. </navigator> -->
  154. <!--<view class="botton-1 flex-center">
  155. <view class="botton-frame" @click="toFavorite(goodsObjact)">
  156. <view class="img-box" v-if="goodsObjact.userCollect == false"><image src="../../static/label/img02.png"></image></view>
  157. <view class="img-box" v-if="goodsObjact.userCollect == true"><image src="../../static/label/img08.png"></image></view>
  158. <view class="word" :class="{ active: goodsObjact.userCollect }">收藏</view>
  159. </view>
  160. </view>
  161. <view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
  162. <text class="iconfont iconlikefill"></text>
  163. <text>收藏</text>
  164. </view> -->
  165. <view class="action-btn-group">
  166. <!-- <button type="primary" class=" action-btn no-border btn-favorites-btn" @click="navTo('/pages/favorites/favorites')">收藏夹</button> -->
  167. <!-- <button type="primary" class=" action-btn no-border buy-now-btn" @click="toFavorite(goodsObjact)">{{ goodsObjact.userCollect ? '取消收藏' : '收藏' }}</button> -->
  168. <button type="primary" class=" action-btn no-border add-cart-btn" @click="specOPne()">一键开团</button>
  169. </view>
  170. </view>
  171. <!-- 规格-模态层弹窗 -->
  172. <view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec()">
  173. <!-- 遮罩层 -->
  174. <view class="mask"></view>
  175. <view class="layer attr-content" @click.stop="stopPrevent">
  176. <view class="a-t">
  177. <image :src="actionImage"></image>
  178. <view class="right">
  179. <text class="name">{{ goodsObjact.store_name }}</text>
  180. <text class="price">¥{{ actionPrice * goodsNumber }}</text>
  181. <text class="stock">库存:{{ goodsStore }}件</text>
  182. <view class="selected" v-if="specList != ''">
  183. 已选:
  184. <text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
  185. </view>
  186. </view>
  187. </view>
  188. <view v-for="(item, index) in specList" :key="index" class="attr-list">
  189. <text>{{ item.attr_name }}</text>
  190. <view class="item-list">
  191. <text
  192. v-for="(childItem, childIndex) in item.attr_value"
  193. :key="childIndex"
  194. class="tit"
  195. :class="{ selected: childItem.check }"
  196. @click="selectSpec(childItem, item, index)"
  197. >
  198. {{ childItem.attr }}
  199. </text>
  200. </view>
  201. </view>
  202. <!-- <view class="attr-list">
  203. <text>购买数量</text>
  204. <view class="item-list">
  205. <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
  206. </view>
  207. </view> -->
  208. <button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
  209. <button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
  210. </view>
  211. </view>
  212. <!-- 查看全部拼单 -->
  213. <uni-popup ref="popup" type="center" >
  214. <view class="popup-row">
  215. <view class="popup-1">
  216. 正在拼单
  217. </view>
  218. <scroll-view scroll-y="true" class="popcont-box">
  219. <view class="popup-2">
  220. <view v-for="(item,index) in pinkTlist" :key="index" class="popup-2-row flex1">
  221. <view class="row-1 flex1">
  222. <view class="one">
  223. <image :src="item.avatar"></image>
  224. <view class="two">
  225. <view class="two-1">{{item.nickname }}</view>
  226. <!-- <view>剩余 {{item.time}}</view> -->
  227. </view>
  228. </view>
  229. <text class="two-1-1">还差{{item.count}}人</text>
  230. </view>
  231. <view class="row-2" @click="groupBooking(item.id)">
  232. 去拼单
  233. </view>
  234. </view>
  235. </view>
  236. </scroll-view>
  237. </view>
  238. <view class="delete" @click="closes_popup"><image src="../../../static/img/deletes.png"></image></view>
  239. </uni-popup>
  240. <!-- <uni-popup ref="popups" type="center" >
  241. <view class="popup-rows" >
  242. <view class="rows-1">参与李丹的拼单</view>
  243. <view class="rows-2">仅剩<text class="red">1</text>个名额,23:41:55后结束</view>
  244. <view class="rows-3 flex1">
  245. <view class="rows-3-group" v-for="(item,index) in information" >
  246. <view class="group-1">
  247. <image src="../../static/delete/timg.jpg"></image>
  248. <view class="group-1-1" >团长</view>
  249. </view>
  250. <view class="group-2">婷930sadasa</view>
  251. </view>
  252. <view class="rows-3-group" v-for="i in (5 - information.length) " >
  253. <view class="group-1">
  254. <image src="../../static/label/blank.png"></image>
  255. </view>
  256. <view class="group-2">带邀请</view>
  257. </view>
  258. </view>
  259. <view class="rows-4" @click="navTo('/pages/order/createOrder')">参与拼单</view>
  260. </view>
  261. <view class="delete" @click="groupBooking()"><image src="../../static/label/deletes.png"></image></view>
  262. </uni-popup>
  263. -->
  264. <!-- #ifdef H5 -->
  265. <!-- <view class="btn_fenxiang" @click="open">分享</view> -->
  266. <view class="mask" v-show="show"><image @click="onTap" src="https://mmz.liuniu946.com/statics/img/shareimg.png"></image></view>
  267. <!-- #endif -->
  268. <!-- #ifdef MP-WEIXIN -->
  269. <button open-type="share" class="shareDate">分享</button>
  270. <!-- #endif -->
  271. </view>
  272. </template>
  273. <script>
  274. import { mapState } from 'vuex';
  275. import { uniFav } from '@/components/uni-fav/uni-fav.vue';
  276. import { groupGoods, cartAdd, collectAdd, collectDel, productDetail } from '@/api/product.js';
  277. import { saveUrl } from '@/utils/loginUtils.js';
  278. import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
  279. import uniRate from '@/components/uni-rate/uni-rate.vue';
  280. import uniPopup from '@/components/uni-popup/uni-popup.vue'
  281. import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
  282. import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
  283. import uniNumberBox from '@/components/uni-number-box.vue';
  284. // #ifdef H5
  285. import { weixindata } from '@/utils/wxAuthorized';
  286. // #endif
  287. export default {
  288. components: {
  289. uniNumberBox,
  290. uniFav,
  291. uniNoticeBar,
  292. uniRate,
  293. uniPopup,
  294. uniPopupMessage,
  295. uniPopupDialog
  296. },
  297. // #ifdef MP
  298. onShareAppMessage: function(res) {
  299. if (res.from === 'button') {
  300. // 来自页面内分享按钮
  301. let pages = getCurrentPages();
  302. // 获取当前页面
  303. let page = pages[pages.length - 1];
  304. let path = '/' + page.route + '?';
  305. // 保存传值
  306. for (let i in page.options) {
  307. path += i + '=' + page.options[i] + '&';
  308. }
  309. // 保存邀请人
  310. path += 'spread=' + this.userInfo.uid;
  311. let data = {
  312. path: path,
  313. imageUrl: this.goodsObjact.image,
  314. title: this.goodsObjact.title
  315. };
  316. return data;
  317. }
  318. },
  319. // #endif
  320. data() {
  321. return {
  322. imgList: [], //商品轮播图
  323. goodsObjact: {}, //保存商品数据
  324. pinkTlist:{
  325. length:5
  326. }, //进行中的拼团的信息
  327. showlist: [],//进行中的拼团前两组的信息
  328. replyCount:0,//评价总数
  329. commentList:{},
  330. specList: [],
  331. ishow:'',
  332. information:[],
  333. popuplist:[],
  334. show: false,
  335. showModal: true, //拼单遮罩层
  336. more: true, //查看更多按钮
  337. autoplay: true,
  338. vertical: true,
  339. interval: 3000,
  340. duration: 500,
  341. buys_show: true,
  342. buys_shows: false,
  343. circular: true,
  344. type: 1, //默认支付方式add为
  345. specClass: 'none', //显示隐藏弹窗
  346. actionImage: '', //商品图片
  347. goodsid: '', //商品id
  348. actionPrice: '', //商品价格
  349. // specClass: 'none', //显示隐藏弹窗
  350. shareList: [], //分享列表
  351. goodsNumberMax: 0, //商品库存
  352. //图片循环
  353. people: '', //拼团人数
  354. goodsNumber: 1, //购买数量(开团数量为1,整团数量为1*参团人数)
  355. carnumber: '', //整团购买商品数量
  356. reply: {}, //商品数据
  357. list: '', //详情数据
  358. goodsType: 1, //商品类型1秒杀商品0为普通商品2为拼团商品3为新人礼包
  359. count: 0, //点击查看更多
  360. showmore: true,
  361. pinkTlistnum: '',
  362. spread: '',
  363. chooseGoodsNumber: 1, //选择商品的数量
  364. specSelected: [], //选中的分类
  365. goodsStore: 0, //选中库存
  366. uniqueId: '',
  367. productValue: '',
  368. isCollect: '', //是否被收藏
  369. maskshow: false, //弹窗
  370. posturl: '',
  371. option: '', //保存传值
  372. opt: '', //保存小程序传值
  373. uniquetype:false,//判断是否是从拼团详情界面跳回的 false 不是 true 是
  374. shop:''//返回的拼团订单id
  375. };
  376. },
  377. onLoad(option) {
  378. this.option = option;
  379. if (option.scene) {
  380. if (typeof option.scene == 'string') {
  381. let scene = ('{' + option.scene + '}')
  382. .replace('qr%26', '')
  383. .replace(/%3D/g, ':')
  384. .replace(/%26/g, ',')
  385. .replace('pid', '"pid"')
  386. .replace('type', '"type"')
  387. .replace('id', '"id"');
  388. let opt = JSON.parse(scene);
  389. this.opt = opt;
  390. // 保存拼团订单id
  391. this.goodsid = opt.id;
  392. if (opt.pid) {
  393. // 存储邀请人
  394. this.spread = opt.pid;
  395. uni.setStorageSync('spread', opt.pid);
  396. }
  397. if (opt.type) {
  398. this.goodsType = opt.type;
  399. }
  400. }
  401. } else {
  402. //保存商品id
  403. this.goodsid = option.id;
  404. //判断有无人邀请
  405. if (option.spread) {
  406. // 存储邀请人
  407. this.spread = option.spread;
  408. uni.setStorageSync('spread', option.spread);
  409. }
  410. //判断是否是普通商品
  411. if (option.type) {
  412. console.log(option.type);
  413. this.goodsType = option.type;
  414. }
  415. }
  416. //判断是否是从拼团详情界面跳回的
  417. if (option.uniquetype) {
  418. console.log(option.uniquetype);
  419. this.uniquetype = option.uniquetype;
  420. }
  421. //接受返回的拼团订单id
  422. if (option.shop) {
  423. console.log(option.uniquetype);
  424. this.shop = option.shop;
  425. }
  426. // 保存当前页面
  427. saveUrl();
  428. },
  429. onShow() {
  430. let obj = this;
  431. groupGoods({}, obj.goodsid).then(function({ data }) {
  432. console.log(data,112)
  433. let goods = data.storeInfo;
  434. obj.imgList = goods.images;//拼团轮播图
  435. obj.goodsObjact = goods;//拼团拼团产品信息
  436. obj.pinkTlist = data.pink;//进行中的拼团的信息
  437. obj.showlist = obj.pinkTlist.slice(0, 2);//截取拼团信息的前两组
  438. obj.replyCount = data.replyCount;//评价总数
  439. //obj.commentList = data.reply[0];//保存评价里的第一条
  440. obj.specList = data.productAttr;//保存产品属性
  441. //商品详情图超出屏幕问题
  442. if (obj.goodsObjact.description != null) {
  443. obj.goodsObjact.description = obj.goodsObjact.description.replace(/<img/g, '<img class="rich-img"').replace(/<p>\S*<img/g, '<p class="pHeight"><img');
  444. }
  445. if(obj.pinkTlist.length<=2){
  446. obj.more = false;
  447. };
  448. if (data.reply) {
  449. obj.reply = data.reply;
  450. }
  451. obj.list = data; //详情数据
  452. obj.productValue = data.productValue; //保存属性值
  453. // 保存数据修改数组
  454. // console.log(obj.pinkTlist,55)
  455. obj.people = goods.people; //拼团人数
  456. obj.productId = goods.product_id;
  457. // 保存默认选中的对象
  458. obj.specSelected = []; //初始化默认选择对象
  459. for (let i = 0; i < obj.specList.length; i++) {
  460. // 设置默认数据
  461. let attrValue = obj.specList[i].attr_value[0];
  462. attrValue.check = true;
  463. obj.specSelected.push(attrValue.attr);
  464. }
  465. //保存默认选中的对象字符串名称
  466. let str = obj.specSelected.join(',');
  467. // 设置默认值
  468. obj.actionPrice = obj.productValue[str].price;
  469. obj.goodsNumberMax = obj.productValue[str].stock;
  470. obj.actionImage = obj.productValue[str].image;
  471. obj.uniqueId = obj.productValue[str].unique;
  472. obj.goodsStore = obj.productValue[str].quota;
  473. console.log(obj.goodsStore,9000)
  474. // #ifdef H5
  475. obj.shareDate();
  476. // #endif
  477. // obj.clickMore();
  478. });
  479. // combination({}, obj.goodsid).then()
  480. },
  481. computed: {
  482. ...mapState(['userInfo', 'baseURL'])
  483. },
  484. methods: {
  485. //选择规格
  486. selectSpec(item, arr, ind) {
  487. console.log(item,arr,ind,';')
  488. arr.attr_value.forEach(function(e) {
  489. e.check = false;
  490. });
  491. item.check = true;
  492. let obj = this;
  493. obj.specSelected[ind] = item.attr;
  494. let str = obj.specSelected.join(',');
  495. console.log(obj.productValue[str],116)
  496. if (obj.productValue[str]) {
  497. obj.buys_show = true;
  498. obj.buys_shows = false;
  499. obj.actionPrice = obj.productValue[str].price;
  500. obj.goodsNumberMax = obj.productValue[str].stock;
  501. obj.actionImage = obj.productValue[str].image;
  502. obj.uniqueId = obj.productValue[str].unique;
  503. if (obj.goodsType == 2) {
  504. obj.goodsStore = obj.productValue[str].quota;
  505. } else {
  506. obj.goodsStore = obj.productValue[str].product_stock;
  507. }
  508. } else {
  509. (obj.buys_show = false), (obj.buys_shows = true);
  510. }
  511. },
  512. numberChange(e) {
  513. //购买数量
  514. this.chooseGoodsNumber = e.number;
  515. // console.log(e.number)
  516. // console.log(this.chooseGoodsNumber,'chooseGoodsNumber')
  517. },
  518. opens_popup(){
  519. this.$refs.popup.open()
  520. },
  521. closes_popup(){
  522. this.$refs.popup.close()
  523. },
  524. opens_popups(){
  525. this.$refs.popup.close()
  526. this.$refs.popups.open()
  527. },
  528. closes_popups(){
  529. this.$refs.popups.close()
  530. },
  531. // 处理数组结构
  532. dataUpReturn(data) {
  533. //保存处理完毕数据
  534. let arr = [];
  535. // 保存临时数据
  536. let arr1 = [];
  537. // 设置每个小数组可以存放的数量
  538. let num = 2;
  539. if (data.length > 1) {
  540. for (let i = 0; i < data.length; i++) {
  541. // 保存数据到临时数组
  542. arr1.push(data[i]);
  543. if ((i + 1) % num === 0) {
  544. console.log(arr1, 2);
  545. // 添加数据到返回数组,用map方法解决物理指针问题导致的数据对象改变问题
  546. arr.push(
  547. arr1.map(e => {
  548. return e;
  549. })
  550. );
  551. // 清空临时数组重新开始计算
  552. arr1 = [];
  553. }
  554. }
  555. }
  556. // 判断是否为奇数
  557. if (data.length % num === 1) {
  558. arr.push([data[data.length - 1]]);
  559. }
  560. return arr;
  561. },
  562. specOPne() {
  563. //显示弹出框
  564. // 是否有开团用户
  565. // if (this.pinkTlist.length > 0) {
  566. // this.groupBooking(this.pinkTlist[0][0].id);
  567. // } else {
  568. // }
  569. this.specClass = 'show';
  570. },
  571. //去拼团
  572. groupBooking(item) {
  573. uni.navigateTo({
  574. url: '/pages/product/details?pink_id=' + item
  575. });
  576. },
  577. //拼团列表数据分页
  578. setPinkList() {
  579. let obj = this;
  580. let showlist = new Array();
  581. for (let i = 0; i < obj.pinkTlist.length; i++) {
  582. if (i >= obj.count) {
  583. break;
  584. }
  585. showlist[i] = obj.pinkTlist[i];
  586. }
  587. obj.showlist = showlist;
  588. },
  589. //查看更多
  590. // clickMore() {
  591. // let obj = this;
  592. // obj.count += 2;
  593. // obj.setPinkList();
  594. // if (obj.count >= obj.pinkTlist.length) {
  595. // obj.showmore = false; //当次数大于拼团数据,查看更多隐藏
  596. // } else {
  597. // obj.showmore = true; //当次数大于拼团数据,查看更多隐藏
  598. // }
  599. // },
  600. clickMore() {
  601. this.showlist = this.pinkTlist;
  602. console.log(this.showlist, 22);
  603. this.more = false;
  604. },
  605. //规格弹窗开关
  606. toggleSpec(str) {
  607. if (this.specClass === 'show') {
  608. this.specClass = 'hide';
  609. setTimeout(() => {
  610. this.specClass = 'none';
  611. }, 250);
  612. } else if (this.specClass === 'none') {
  613. this.specClass = 'show';
  614. }
  615. // 判断是否为数字
  616. if (typeof str == 'number') {
  617. // 保存当前购买类型
  618. this.type = str;
  619. }
  620. },
  621. //显示弹窗
  622. open() {
  623. this.show = true;
  624. },
  625. //随意点击隐藏弹窗
  626. onTap() {
  627. if (!this.open) return;
  628. this.close();
  629. },
  630. close() {
  631. this.show = false;
  632. },
  633. //收藏
  634. toFavorite(item) {
  635. let obj = this;
  636. item.userCollect = !item.userCollect;
  637. // 判断是否已经收藏
  638. if (!item.userCollect) {
  639. collectDel({
  640. id: item.id,
  641. category: 'pink'
  642. }).then(function(e) {
  643. obj.$api.msg('成功取消收藏!');
  644. });
  645. } else {
  646. collectAdd({
  647. id: item.id,
  648. category: 'pink'
  649. }).then(function(e) {
  650. obj.$api.msg('成功加入收藏!');
  651. });
  652. }
  653. },
  654. // #ifdef H5
  655. shareDate() {
  656. let obj = this;
  657. let url = window.location.href.replace(/[\?,&]{0,1}from=singlemessage/g, '') + '&spread=' + this.userInfo.uid;
  658. let bool = uni.getStorageSync('weichatBrowser') || '';
  659. // 判断是否微信浏览器
  660. if (bool) {
  661. let data;
  662. if (obj.goodsType == 0) {
  663. data = {
  664. link: url, // 分享链接
  665. imgUrl: obj.goodsObjact.image, // 分享图标
  666. desc: obj.goodsObjact.store_info,
  667. title: obj.goodsObjact.store_name,
  668. success: function() {}
  669. };
  670. }
  671. if (obj.goodsType == 2) {
  672. data = {
  673. link: url, // 分享链接
  674. imgUrl: obj.goodsObjact.image, // 分享图标
  675. title: obj.goodsObjact.title,
  676. desc: obj.goodsObjact.info,
  677. success: function() {}
  678. };
  679. }
  680. weixindata(data);
  681. }
  682. },
  683. // #endif
  684. /**
  685. * 统一跳转接口,拦截未登录路由
  686. * navigator标签现在默认没有转场动画,所以用view
  687. */
  688. navTo(url) {
  689. uni.navigateTo({
  690. url
  691. });
  692. },
  693. // 立即购买
  694. buy(item) {
  695. let obj = this;
  696. if(obj.uniquetype == false){
  697. // 创建传值对象
  698. console.log(obj.list.productValue);
  699. console.log(obj.list);
  700. let data = {
  701. // cartNum: obj.goodsNumber, //商品数量
  702. cartNum: obj.chooseGoodsNumber, //商品数量
  703. uniqueId: obj.uniqueId, //商品标签
  704. new: 1, //商品是否新增加到购物车1为不加入0为加入
  705. mer_id: obj.shopId,
  706. combinationId: obj.goodsid, //拼团编号
  707. productId: obj.goodsObjact.product_id, //商品编号
  708. };
  709. this.specClass = 'none';
  710. cartAdd(data)
  711. .then(function(e) {
  712. let da = e.data;
  713. console.log(e);
  714. if (obj.type == 1) {
  715. // 跳转到支付页
  716. uni.navigateTo({
  717. url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
  718. });
  719. }
  720. if (obj.type == 2) {
  721. obj.$api.msg('成功加入购物车');
  722. obj.toggleSpec();
  723. }
  724. })
  725. .catch(e => {
  726. console.log(e);
  727. });
  728. }else{
  729. console.log(obj.uniquetype,'obj.uniquetype')
  730. uni.navigateTo({
  731. url: '/pages/product/details?pink_id=' + obj.shop + '&unique=' + obj.uniqueId + '&uniquetype=' + obj.uniquetype
  732. });
  733. }
  734. },
  735. // 阻止触发上级事件
  736. stopPrevent() {}
  737. }
  738. };
  739. </script>
  740. <style lang="scss">
  741. page {
  742. background: $page-color-base;
  743. padding-bottom: 160rpx;
  744. line-height: 1;
  745. }
  746. // 处理图片间白色间距问题
  747. /deep/ .pHeight {
  748. line-height: 0;
  749. }
  750. /deep/ div,
  751. /deep/ table {
  752. max-width: 100% !important;
  753. }
  754. /* #ifdef MP */
  755. .rich-img {
  756. width: 100% !important;
  757. height: auto;
  758. }
  759. // 处理图片间白色间距问题
  760. .pHeight {
  761. line-height: 0;
  762. }
  763. /* #endif */
  764. .popup-row{
  765. width:580rpx;
  766. background:#ffffff;
  767. border-radius:20rpx;
  768. .popup-1{
  769. padding: 35rpx 0;
  770. font-size:$font-lg;
  771. font-weight:bold;
  772. color:#333333;
  773. text-align: center;
  774. border-bottom: 1px solid #EEEEEE;
  775. }
  776. .popcont-box {
  777. height: 600rpx;
  778. }
  779. .popup-2{
  780. padding: 0 25rpx;
  781. .popup-2-row{
  782. padding: 25rpx 0;
  783. border-bottom: 1px solid #EEEEEE;
  784. &:nth-last-child(1){
  785. border-bottom:none;
  786. }
  787. .row-1{
  788. width: 70%;
  789. .one{
  790. display: flex;
  791. align-items: center;
  792. image{
  793. width: 75rpx;
  794. height: 75rpx;
  795. border-radius: 50%;
  796. }
  797. }
  798. .two{
  799. margin-left: 20rpx;
  800. font-size:28rpx;
  801. font-weight:500;
  802. color:#333333;
  803. .two-1{
  804. // margin-bottom: 20rpx;
  805. font-size:$font-base;
  806. font-weight:500;
  807. max-width: 160rpx;
  808. overflow: hidden;
  809. text-overflow: ellipsis;
  810. white-space: nowrap;
  811. }
  812. }
  813. .two-1-1{
  814. font-size:$font-base;
  815. font-weight:500;
  816. color:#666666;
  817. }
  818. }
  819. .row-2{
  820. padding: 20rpx 30rpx;
  821. background:$base-color;
  822. border-radius:10rpx;
  823. font-size:28rpx;
  824. font-weight:500;
  825. color:#FFFFFF;
  826. }
  827. }
  828. }
  829. }
  830. .popup-rows{
  831. width:580rpx;
  832. background:#ffffff;
  833. border-radius:20rpx;
  834. text-align: center;
  835. padding-bottom: 35rpx;
  836. .rows-1{
  837. font-size:$font-lg;
  838. font-weight:bold;
  839. color:#333333;
  840. padding-top: 60rpx;
  841. }
  842. .rows-2{
  843. margin-top: 25rpx;
  844. font-size:28rpx;
  845. font-weight:500;
  846. color:#333333;
  847. }
  848. .rows-3{
  849. margin-top: 35rpx;
  850. padding: 0 50rpx;
  851. .rows-3-group {
  852. display: flex;
  853. align-items: center;
  854. flex-direction: column;
  855. .group-1{
  856. display: flex;
  857. align-items: center;
  858. flex-direction: column;
  859. }
  860. .group-2{
  861. flex: 1;
  862. font-size:$font-sm - 4rpx;
  863. font-weight:500;
  864. color:#666666;
  865. margin-top: 10rpx;
  866. width:55rpx;
  867. overflow:hidden;
  868. white-space:nowrap;
  869. text-overflow:ellipsis;
  870. }
  871. image{
  872. width: 80rpx;
  873. height: 80rpx;
  874. border-radius: 50%;
  875. }
  876. .group-1-1{
  877. z-index: 10;
  878. margin-top: -25rpx;
  879. width:70rpx;
  880. height:25rpx;
  881. background:#e64048;
  882. border-radius:12rpx;
  883. font-size:$font-sm - 4rpx;
  884. font-weight:500;
  885. color:#ffffff;
  886. line-height: 25rpx;
  887. }
  888. }
  889. }
  890. .rows-4{
  891. margin: 40rpx 45rpx 0rpx 45rpx;
  892. padding: 25rpx 0;
  893. background:$base-color;
  894. border-radius:10rpx;
  895. font-size:$font-lg;
  896. font-weight:500;
  897. color:#ffffff;
  898. }
  899. }
  900. .delete{
  901. width: 60rpx;
  902. height: 60rpx;
  903. position: absolute;
  904. right: -30rpx;
  905. top:-30rpx;
  906. image{
  907. width: 60rpx;
  908. height: 60rpx;
  909. }
  910. }
  911. /* 评价 */
  912. .eva-section {
  913. padding: 20rpx 30rpx;
  914. background: #fff;
  915. margin-top: 20rpx;
  916. .e-header {
  917. display: flex;
  918. align-items: center;
  919. font-size:28rpx;
  920. color: #333333;
  921. .tit {
  922. margin-right: 15rpx;
  923. }
  924. .tip {
  925. flex: 1;
  926. font-size:24rpx;
  927. color: #999999;
  928. text-align: right;
  929. }
  930. .iconenter {
  931. width: 24rpx;
  932. height: 24rpx;
  933. margin-left: 10rpx;
  934. }
  935. }
  936. .eva-box {
  937. padding-top: 30rpx;
  938. .box-1{
  939. .left{
  940. image{
  941. width: 80rpx;
  942. height: 80rpx;
  943. border-radius: 50%;
  944. }
  945. .content{
  946. margin-left: 15rpx;
  947. .content-name{
  948. font-size:24rpx;
  949. font-weight:500;
  950. color:#333333;
  951. }
  952. .content-time{
  953. font-size:20rpx;
  954. font-weight:500;
  955. color:#999999;
  956. }
  957. }
  958. }
  959. .right{
  960. .image{
  961. width: 25rpx;
  962. height: 25rpx;
  963. margin-left: 10rpx;
  964. }
  965. .red{
  966. margin-left: 15rpx;
  967. font-size:24rpx;
  968. font-weight:500;
  969. color:#fd5b23;
  970. }
  971. .con_image{
  972. }
  973. }
  974. }
  975. .box-2{
  976. padding: 30rpx 0 15rpx 0;
  977. font-size:28rpx;
  978. font-weight:500;
  979. color:#666666;
  980. }
  981. .box-3{
  982. .box-3-1{
  983. display: inline;
  984. width: 150rpx;
  985. height: 150rpx;
  986. image{
  987. margin-right: 20rpx;
  988. width: 150rpx;
  989. height: 150rpx;
  990. }
  991. }
  992. }
  993. }
  994. }
  995. /* .list-row {
  996. position: fixed;
  997. top: 450rpx;
  998. left: 86rpx;
  999. .row {
  1000. position: relative;
  1001. width: 578rpx;
  1002. height: 700rpx;
  1003. background: #ffffff;
  1004. border-radius: 20rpx;
  1005. .row-1 {
  1006. flex: 1;
  1007. text-align: center;
  1008. padding: 26rpx 223rpx;
  1009. border-bottom: 2rpx solid #eeeeee;
  1010. .row-1-1 {
  1011. font-size: $font-lg;
  1012. font-weight: bold;
  1013. color: #333333;
  1014. }
  1015. }
  1016. .row-2 {
  1017. padding: 0 23rpx;
  1018. .pinklist_list {
  1019. padding: 20rpx 0;
  1020. display: flex;
  1021. justify-content: space-around;
  1022. align-items: center;
  1023. border-bottom: 1px solid #eeeeee;
  1024. .left {
  1025. width: 74rpx;
  1026. height: 74rpx;
  1027. background-color: #e3e3e3;
  1028. border-radius: 50%;
  1029. }
  1030. .center {
  1031. display: flex;
  1032. flex-wrap: wrap;
  1033. margin-left: 17rpx;
  1034. .center-1 {
  1035. display: flex;
  1036. align-items: center;
  1037. letter-spacing: 3rpx;
  1038. .center-1-1 {
  1039. font-size: $font-base;
  1040. font-weight: 500;
  1041. color: #333333;
  1042. }
  1043. .center-1-2 {
  1044. font-size: $font-base - 2rpx;
  1045. font-weight: 500;
  1046. color: #333333;
  1047. }
  1048. }
  1049. }
  1050. .right {
  1051. width: 134rpx;
  1052. height: 59rpx;
  1053. background: $base-color;
  1054. border-radius: 10rpx;
  1055. display: flex;
  1056. align-items: center;
  1057. justify-content: center;
  1058. .right-word {
  1059. font-size: 26rpx;
  1060. font-weight: 500;
  1061. color: #ffffff;
  1062. }
  1063. }
  1064. }
  1065. }
  1066. .row-3 {
  1067. width: 56rpx;
  1068. height: 56rpx;
  1069. position: absolute;
  1070. top: -28rpx;
  1071. right: -28rpx;
  1072. }
  1073. }
  1074. } */
  1075. .iconenter {
  1076. font-size: $font-base + 2rpx;
  1077. color: #888;
  1078. }
  1079. .carousel {
  1080. height: 722rpx;
  1081. position: relative;
  1082. swiper {
  1083. height: 100%;
  1084. }
  1085. .image-wrapper {
  1086. width: 100%;
  1087. height: 100%;
  1088. }
  1089. .swiper-item {
  1090. display: flex;
  1091. justify-content: center;
  1092. align-content: center;
  1093. height: 750rpx;
  1094. overflow: hidden;
  1095. image {
  1096. width: 100%;
  1097. height: 100%;
  1098. }
  1099. }
  1100. }
  1101. /* 标题简介 */
  1102. .introduce-section {
  1103. background: #fff;
  1104. padding: 15rpx 25rpx 30rpx 25rpx;
  1105. .introduce-price{
  1106. width: 100%;
  1107. overflow: hidden;
  1108. .price{
  1109. display: flex;
  1110. align-items: flex-end;
  1111. justify-content: flex-start;
  1112. .price-left{
  1113. display: flex;
  1114. align-items: flex-end;
  1115. color:#fc4141;
  1116. margin-right: 20rpx;
  1117. .left-1{
  1118. margin-right: 5rpx;
  1119. font-size:28rpx;
  1120. }
  1121. .left-2{
  1122. font-size:$font-lg + 16rpx;
  1123. line-height: 38rpx;
  1124. }
  1125. }
  1126. .price-right{
  1127. font-size:28rpx;
  1128. color:#333333;
  1129. opacity:0.61;
  1130. }
  1131. }
  1132. .people{
  1133. width: 140rpx;
  1134. height: 45rpx;
  1135. background: url(../../../static/img/img43.png) no-repeat center;
  1136. background-size: 100%;
  1137. .people_number{
  1138. margin-left: 60rpx;
  1139. font-size:20rpx;
  1140. font-weight:500;
  1141. color:rgba(250,39,64,1);
  1142. line-height: 40rpx;
  1143. }
  1144. }
  1145. /* .share{
  1146. image{
  1147. width: 30rpx;
  1148. height: 35rpx;
  1149. }
  1150. } */
  1151. }
  1152. .title {
  1153. margin-top: 30rpx;
  1154. font-size: 32rpx;
  1155. color: #1D2023;
  1156. line-height: 40rpx;
  1157. font-weight: 600;
  1158. }
  1159. .bot-row{
  1160. margin-top: 20rpx;
  1161. overflow: hidden;
  1162. font-size:24rpx;
  1163. font-weight:500;
  1164. color:#999999;
  1165. }
  1166. }
  1167. /* 标题简介 */
  1168. /* .introduce-section {
  1169. background: #fff;
  1170. padding: 20rpx 30rpx;
  1171. .title {
  1172. font-size: 32rpx;
  1173. color: $font-color-dark;
  1174. height: 50rpx;
  1175. line-height: 50rpx;
  1176. }
  1177. .price-box {
  1178. display: flex;
  1179. align-items: baseline;
  1180. // height: 64rpx;
  1181. padding: 10rpx 0;
  1182. font-size: 26rpx;
  1183. color: $uni-color-primary;
  1184. }
  1185. .price {
  1186. font-size: $font-lg + 2rpx;
  1187. color: #666666 !important;
  1188. }
  1189. .vip_price {
  1190. font-size: $font-lg + 2rpx;
  1191. color: $uni-color-primary;
  1192. padding-left: 15rpx;
  1193. }
  1194. .m-price {
  1195. margin: 0 12rpx;
  1196. color: $font-color-light;
  1197. text-decoration: line-through;
  1198. }
  1199. .coupon-tip {
  1200. align-items: center;
  1201. padding: 4rpx 10rpx;
  1202. background: $uni-color-primary;
  1203. font-size: $font-sm;
  1204. color: #fff;
  1205. border-radius: 6rpx;
  1206. line-height: 1;
  1207. transform: translateY(-4rpx);
  1208. }
  1209. .bot-row {
  1210. display: flex;
  1211. align-items: center;
  1212. height: 50rpx;
  1213. font-size: $font-sm;
  1214. color: $font-color-light;
  1215. text {
  1216. flex: 1;
  1217. }
  1218. }
  1219. .people {
  1220. border-radius: 10rpx;
  1221. height: 35rpx !important;
  1222. border: 2rpx solid #db1935;
  1223. height: 40rpx;
  1224. .people_image {
  1225. background-color: #db1935;
  1226. width: 40rpx;
  1227. height: 35rpx;
  1228. text-align: center;
  1229. border-top-left-radius: 20%;
  1230. border-bottom-left-radius: 20%;
  1231. image {
  1232. width: 25rpx;
  1233. height: 20rpx;
  1234. // margin-bottom: 5rpx;
  1235. }
  1236. }
  1237. .people_number {
  1238. padding: 5rpx 10rpx;
  1239. }
  1240. }
  1241. } */
  1242. /* 分享 */
  1243. .share-section {
  1244. display: flex;
  1245. align-items: center;
  1246. color: $font-color-base;
  1247. background: linear-gradient(left, #fdf5f6, #fbebf6);
  1248. padding: 12rpx 30rpx;
  1249. .share-icon {
  1250. display: flex;
  1251. align-items: center;
  1252. width: 70rpx;
  1253. height: 30rpx;
  1254. line-height: 1;
  1255. border: 1px solid $uni-color-primary;
  1256. border-radius: 4rpx;
  1257. position: relative;
  1258. overflow: hidden;
  1259. font-size: 22rpx;
  1260. color: $uni-color-primary;
  1261. &:after {
  1262. content: '';
  1263. width: 50rpx;
  1264. height: 50rpx;
  1265. border-radius: 50%;
  1266. left: -20rpx;
  1267. top: -12rpx;
  1268. position: absolute;
  1269. background: $uni-color-primary;
  1270. }
  1271. }
  1272. .iconfavorfill {
  1273. position: relative;
  1274. z-index: 1;
  1275. font-size: 24rpx;
  1276. margin-left: 2rpx;
  1277. margin-right: 10rpx;
  1278. color: #fff;
  1279. line-height: 1;
  1280. }
  1281. .tit {
  1282. font-size: $font-base;
  1283. margin-left: 10rpx;
  1284. }
  1285. .iconprompt {
  1286. padding: 10rpx;
  1287. font-size: 30rpx;
  1288. line-height: 1;
  1289. }
  1290. .share-btn {
  1291. flex: 1;
  1292. text-align: right;
  1293. font-size: $font-sm;
  1294. color: $uni-color-primary;
  1295. }
  1296. .iconenter {
  1297. font-size: $font-sm;
  1298. margin-left: 4rpx;
  1299. color: $uni-color-primary;
  1300. }
  1301. }
  1302. .c-list {
  1303. font-size: $font-sm + 2rpx;
  1304. color: #303133;
  1305. margin-top: 20rpx;
  1306. background: #fff;
  1307. .c-row {
  1308. display: flex;
  1309. align-items: center;
  1310. padding: 20rpx 30rpx;
  1311. position: relative;
  1312. .c-text {
  1313. text {
  1314. padding-left: 25rpx;
  1315. padding-right: 25rpx;
  1316. }
  1317. }
  1318. }
  1319. .tit {
  1320. width: 140rpx;
  1321. }
  1322. .con {
  1323. flex: 1;
  1324. color: $font-color-dark;
  1325. .selected-text {
  1326. margin-right: 10rpx;
  1327. }
  1328. }
  1329. .bz-list {
  1330. height: 40rpx;
  1331. font-size: $font-sm + 2rpx;
  1332. color: $font-color-dark;
  1333. text {
  1334. display: inline-block;
  1335. margin-right: 30rpx;
  1336. }
  1337. }
  1338. .con-list {
  1339. flex: 1;
  1340. display: flex;
  1341. flex-direction: column;
  1342. color: $font-color-dark;
  1343. line-height: 40rpx;
  1344. }
  1345. .red {
  1346. color: $uni-color-primary;
  1347. }
  1348. }
  1349. /* 评价 */
  1350. /* .eva-section {
  1351. display: flex;
  1352. flex-direction: column;
  1353. padding: 20rpx 30rpx;
  1354. background: #fff;
  1355. margin-top: 16rpx;
  1356. .e-header {
  1357. display: flex;
  1358. align-items: center;
  1359. height: 70rpx;
  1360. font-size: $font-sm + 2rpx;
  1361. color: $font-color-light;
  1362. .tit {
  1363. font-size: $font-base + 2rpx;
  1364. color: $font-color-dark;
  1365. margin-right: 4rpx;
  1366. }
  1367. .tip {
  1368. flex: 1;
  1369. text-align: right;
  1370. }
  1371. .iconenter {
  1372. margin-left: 10rpx;
  1373. }
  1374. }
  1375. }
  1376. .eva-box {
  1377. display: flex;
  1378. padding: 20rpx 0;
  1379. .portrait {
  1380. flex-shrink: 0;
  1381. width: 80rpx;
  1382. height: 80rpx;
  1383. border-radius: 100px;
  1384. }
  1385. .right {
  1386. flex: 1;
  1387. display: flex;
  1388. flex-direction: column;
  1389. font-size: $font-base;
  1390. color: $font-color-base;
  1391. padding-left: 26rpx;
  1392. .con {
  1393. font-size: $font-base;
  1394. color: $font-color-dark;
  1395. padding: 20rpx 0;
  1396. }
  1397. .bot {
  1398. display: flex;
  1399. justify-content: space-between;
  1400. font-size: $font-sm;
  1401. color: $font-color-light;
  1402. }
  1403. }
  1404. }
  1405. .con_image {
  1406. width: 130rpx;
  1407. height: 130rpx;
  1408. display: inline-block;
  1409. padding: 15rpx;
  1410. image {
  1411. width: 100%;
  1412. height: 100%;
  1413. }
  1414. }*/
  1415. /* 详情 */
  1416. .detail-desc {
  1417. .desc-title{
  1418. font-size:28rpx;
  1419. font-weight:500;
  1420. color:#1D2023;
  1421. padding: 25rpx 0;
  1422. .one{
  1423. width:77rpx;
  1424. height:1px;
  1425. background:linear-gradient( to right ,rgba(204,204,204,0), rgba(204,204,204,1));
  1426. margin-right: 10rpx;
  1427. }
  1428. .two{
  1429. margin-left: 10rpx;
  1430. width:77rpx;
  1431. height:1px;
  1432. background:linear-gradient( to left ,rgba(204,204,204,0), rgba(204,204,204,1));
  1433. }
  1434. }
  1435. }
  1436. /* .detail-desc {
  1437. background: #fff;
  1438. margin-top: 16rpx;
  1439. img {
  1440. max-width: 100%;
  1441. }
  1442. .d-header {
  1443. display: flex;
  1444. justify-content: center;
  1445. align-items: center;
  1446. height: 80rpx;
  1447. font-size: $font-base + 2rpx;
  1448. color: $font-color-dark;
  1449. position: relative;
  1450. text {
  1451. padding: 0 20rpx;
  1452. background: #fff;
  1453. position: relative;
  1454. z-index: 1;
  1455. }
  1456. &:after {
  1457. position: absolute;
  1458. left: 50%;
  1459. top: 50%;
  1460. transform: translateX(-50%);
  1461. width: 300rpx;
  1462. height: 0;
  1463. content: '';
  1464. border-bottom: 1px solid #ccc;
  1465. }
  1466. }
  1467. } */
  1468. /* 规格选择弹窗 */
  1469. .attr-content {
  1470. padding: 25rpx 30rpx;
  1471. .a-t {
  1472. display: flex;
  1473. image {
  1474. width: 170rpx;
  1475. height: 170rpx;
  1476. flex-shrink: 0;
  1477. border-radius: 8rpx;
  1478. }
  1479. .right {
  1480. display: flex;
  1481. flex-direction: column;
  1482. padding-left: 24rpx;
  1483. font-size: $font-sm + 2rpx;
  1484. color: $font-color-base;
  1485. line-height: 42rpx;
  1486. width: 75%;
  1487. .price {
  1488. font-size: $font-lg;
  1489. color: $uni-color-primary;
  1490. margin: 10rpx 0rpx;
  1491. }
  1492. .name {
  1493. font-size: 32rpx;
  1494. color: $font-color-dark;
  1495. height: 50rpx;
  1496. overflow: hidden;
  1497. text-overflow: ellipsis;
  1498. white-space: nowrap;
  1499. display: block;
  1500. }
  1501. .selected-text {
  1502. margin-right: 10rpx;
  1503. }
  1504. }
  1505. }
  1506. .attr-list {
  1507. display: flex;
  1508. flex-direction: column;
  1509. font-size: $font-base + 2rpx;
  1510. color: $font-color-base;
  1511. padding-top: 30rpx;
  1512. padding-left: 10rpx;
  1513. }
  1514. .item-list {
  1515. padding: 20rpx 0 0;
  1516. display: flex;
  1517. flex-wrap: wrap;
  1518. text {
  1519. display: flex;
  1520. align-items: center;
  1521. justify-content: center;
  1522. background: #eee;
  1523. margin-right: 20rpx;
  1524. margin-bottom: 20rpx;
  1525. border-radius: 100rpx;
  1526. min-width: 60rpx;
  1527. height: 60rpx;
  1528. padding: 0 20rpx;
  1529. font-size: $font-base;
  1530. color: $font-color-dark;
  1531. }
  1532. .selected {
  1533. background: #fbebee;
  1534. color: $uni-color-primary;
  1535. }
  1536. }
  1537. }
  1538. /* 弹出层 */
  1539. .popup {
  1540. position: fixed;
  1541. left: 0;
  1542. top: 0;
  1543. right: 0;
  1544. bottom: 0;
  1545. z-index: 99;
  1546. &.show {
  1547. display: block;
  1548. .mask {
  1549. animation: showPopup 0.2s linear both;
  1550. }
  1551. .layer {
  1552. animation: showLayer 0.2s linear both;
  1553. }
  1554. }
  1555. &.hide {
  1556. .mask {
  1557. animation: hidePopup 0.2s linear both;
  1558. }
  1559. .layer {
  1560. animation: hideLayer 0.2s linear both;
  1561. }
  1562. }
  1563. &.none {
  1564. display: none;
  1565. }
  1566. .mask {
  1567. position: fixed;
  1568. top: 0;
  1569. width: 100%;
  1570. height: 100%;
  1571. z-index: 1;
  1572. background-color: rgba(0, 0, 0, 0.4);
  1573. }
  1574. .layer {
  1575. position: fixed;
  1576. z-index: 99;
  1577. bottom: 0;
  1578. width: 100%;
  1579. min-height: 35vh;
  1580. border-radius: 10rpx 10rpx 0 0;
  1581. background-color: #fff;
  1582. .btn {
  1583. height: 66rpx;
  1584. line-height: 66rpx;
  1585. border-radius: 100rpx;
  1586. background: $uni-color-primary;
  1587. font-size: $font-base + 2rpx;
  1588. color: #fff;
  1589. margin: 30rpx auto 20rpx;
  1590. }
  1591. }
  1592. @keyframes showPopup {
  1593. 0% {
  1594. opacity: 0;
  1595. }
  1596. 100% {
  1597. opacity: 1;
  1598. }
  1599. }
  1600. @keyframes hidePopup {
  1601. 0% {
  1602. opacity: 1;
  1603. }
  1604. 100% {
  1605. opacity: 0;
  1606. }
  1607. }
  1608. @keyframes showLayer {
  1609. 0% {
  1610. transform: translateY(120%);
  1611. }
  1612. 100% {
  1613. transform: translateY(0%);
  1614. }
  1615. }
  1616. @keyframes hideLayer {
  1617. 0% {
  1618. transform: translateY(0);
  1619. }
  1620. 100% {
  1621. transform: translateY(120%);
  1622. }
  1623. }
  1624. }
  1625. //分享
  1626. .btn_fenxiang {
  1627. position: fixed;
  1628. right: 20rpx;
  1629. bottom: 50%;
  1630. z-index: 95;
  1631. width: 100rpx;
  1632. color: #ffffff;
  1633. border-radius: 100%;
  1634. background-color: $background-color;
  1635. line-height: 100rpx;
  1636. text-align: center;
  1637. font-size: 30rpx;
  1638. }
  1639. .shareDate{
  1640. position: fixed;
  1641. right: 20rpx;
  1642. bottom: 50%;
  1643. z-index: 95;
  1644. color: #ffffff;
  1645. border-radius: 100rpx;
  1646. height: 120rpx;
  1647. line-height: 120rpx;
  1648. background-color: $background-color;
  1649. text-align: center;
  1650. font-size: 30rpx;
  1651. }
  1652. /* 底部操作菜单 */
  1653. .page-bottom {
  1654. position: fixed;
  1655. bottom: 0rpx;
  1656. z-index: 95;
  1657. display: flex;
  1658. justify-content: center;
  1659. align-items: center;
  1660. width: 100%;
  1661. height: 100rpx;
  1662. background: rgba(255, 255, 255, 0.9);
  1663. .botton-1{
  1664. width: 100rpx;
  1665. height: 100rpx;
  1666. background-color: #FFFFFF;
  1667. .botton-frame {
  1668. display: flex;
  1669. align-items: center;
  1670. flex-direction: column;
  1671. .img-box {
  1672. width: 45rpx;
  1673. height: 40rpx;
  1674. image{
  1675. width: 100%;
  1676. height: 100%;
  1677. }
  1678. }
  1679. }
  1680. .word{
  1681. margin-top: 6rpx;
  1682. font-size:20rpx;
  1683. font-weight:400;
  1684. color:#666666;
  1685. &.active {
  1686. color: $uni-color-primary;
  1687. }
  1688. }
  1689. }
  1690. .p-b-btn {
  1691. display: flex;
  1692. flex-direction: column;
  1693. align-items: center;
  1694. justify-content: center;
  1695. font-size: $font-sm;
  1696. color: $font-color-base;
  1697. width: 100rpx;
  1698. height: 100rpx;
  1699. .iconfont {
  1700. font-size: 40rpx;
  1701. line-height: 48rpx;
  1702. color: $font-color-light;
  1703. }
  1704. &.active,
  1705. &.active .iconfont {
  1706. color: $uni-color-primary;
  1707. }
  1708. .icon-fenxiang2 {
  1709. font-size: 42rpx;
  1710. transform: translateY(-2rpx);
  1711. }
  1712. .iconlikefill {
  1713. font-size: 46rpx;
  1714. }
  1715. }
  1716. .gobuy {
  1717. width: 100%;
  1718. background: #db1935;
  1719. height: 100%;
  1720. color: #ffffff;
  1721. text-align: center;
  1722. padding-top: 25rpx;
  1723. border-radius: 15rpx;
  1724. }
  1725. .action-btn-group {
  1726. display: flex;
  1727. flex:1;
  1728. height: 100%;
  1729. overflow: hidden;
  1730. position: relative;
  1731. &:after {
  1732. content: '';
  1733. position: absolute;
  1734. top: 50%;
  1735. right: 50%;
  1736. transform: translateY(-50%);
  1737. height: 28rpx;
  1738. width: 0;
  1739. // border-right: 1px solid rgba(255, 255, 255, 0.5);
  1740. }
  1741. .action-btn {
  1742. display: flex;
  1743. align-items: center;
  1744. justify-content: center;
  1745. flex: 1;
  1746. height: 100%;
  1747. font-size: $font-lg + 4rpx;
  1748. font-weight:bold;
  1749. background: transparent;
  1750. border-radius:0;
  1751. letter-spacing: 5rpx;
  1752. &.buy-now-btn {
  1753. background-color: #ffb238;
  1754. }
  1755. &.add-cart-btn {
  1756. background:$base-color;
  1757. }
  1758. &.btn-favorites-btn {
  1759. background-color: rgba(24, 179, 255, 1);
  1760. }
  1761. }
  1762. /* .action-btn1 {
  1763. display: flex;
  1764. align-items: center;
  1765. justify-content: center;
  1766. width: 210rpx;
  1767. height: 100%;
  1768. font-size: $font-base;
  1769. padding: 0;
  1770. border-radius: 0;
  1771. background: transparent;
  1772. &.buy-now-btn {
  1773. background-color: #ffb238;
  1774. }
  1775. &.add-cart-btn {
  1776. background-color: #db1935;
  1777. }
  1778. } */
  1779. }
  1780. }
  1781. // 底部拼团、秒杀支付按钮
  1782. .goods-pay-box {
  1783. position: fixed;
  1784. left: 0;
  1785. bottom: 0;
  1786. z-index: 95;
  1787. width: 750rpx;
  1788. height: 100rpx;
  1789. line-height: 1;
  1790. color: #ffffff;
  1791. text-align: center;
  1792. font-size: $font-lg;
  1793. .bgLine {
  1794. background: linear-gradient(90deg, rgba(239, 78, 81, 1) 0%, rgba(244, 113, 59, 1) 100%);
  1795. }
  1796. // 拼团支付按钮
  1797. .goods-pay {
  1798. display: flex;
  1799. align-content: center;
  1800. flex-wrap: wrap;
  1801. justify-content: center;
  1802. .goods-buttom,
  1803. .goods-buttom-money {
  1804. width: 100%;
  1805. }
  1806. .goods-buttom-money {
  1807. font-size: $font-base;
  1808. }
  1809. }
  1810. .goods-pay-stop,
  1811. .goods-pay {
  1812. padding: 15rpx 0;
  1813. height: 100%;
  1814. width: 100%;
  1815. }
  1816. .goods-pay-stop {
  1817. background: $color-gray;
  1818. line-height: 70rpx;
  1819. }
  1820. }
  1821. //拼团列表
  1822. .pinklistbox {
  1823. background: #ffffff;
  1824. text-align: center;
  1825. font-size: 26rpx;
  1826. margin-top: 25rpx;
  1827. .listbox-1{
  1828. padding: 25rpx;
  1829. font-size:$font-lg - 2rpx;
  1830. font-weight:500;
  1831. color:#333333;
  1832. border-bottom: 1px solid #EEEEEE;
  1833. .more{
  1834. font-size:$font-base - 2rpx;
  1835. font-weight:500;
  1836. color:#999999;
  1837. image {
  1838. width: 25rpx;
  1839. height: 25rpx;
  1840. }
  1841. }
  1842. }
  1843. .pinklist{
  1844. margin: 0 25rpx;
  1845. .pinklist_list{
  1846. padding: 25rpx 0;
  1847. border-bottom: 1px solid #EEEEEE;
  1848. &:nth-last-child(1){
  1849. border-bottom: none;
  1850. }
  1851. }
  1852. }
  1853. }
  1854. /* .pinklistbox {
  1855. background: #ffffff;
  1856. margin-top: 25rpx;
  1857. overflow: hidden;
  1858. } */
  1859. .pink_num {
  1860. background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
  1861. padding: 15rpx 25rpx;
  1862. font-size: 26rpx;
  1863. color: #dd524d;
  1864. }
  1865. .pint {
  1866. background: -webkit-linear-gradient(0deg, #fa2740,#fe5544);
  1867. border-radius:10rpx;
  1868. margin-left: 20rpx;
  1869. padding: 20rpx 25rpx;
  1870. color: #ffffff;
  1871. font-size: $font-base - 2rpx;
  1872. /* .iconenter {
  1873. font-size: 15px;
  1874. color: #ffffff;
  1875. } */
  1876. }
  1877. .pink_row {
  1878. .pink_img{
  1879. width: 70rpx;
  1880. height: 70rpx;
  1881. image {
  1882. width: 100%;
  1883. height: 100%;
  1884. border-radius: 100%;
  1885. }
  1886. }
  1887. }
  1888. .pink_people {
  1889. font-size: $font-base - 2rpx;
  1890. // margin-top: 10rpx;
  1891. text {
  1892. color: $font-color;
  1893. }
  1894. }
  1895. .pink_time {
  1896. font-size: 26rpx;
  1897. color: #909399;
  1898. }
  1899. .pink_name {
  1900. font-size:30rpx;
  1901. color:#333333;
  1902. margin-left: 20rpx;
  1903. }
  1904. .More {
  1905. width: 100%;
  1906. line-height: 2;
  1907. background-color: #fc2a3f;
  1908. font-size:$font-lg;
  1909. margin: 0 auto;
  1910. text-align: center;
  1911. color: #ffffff;
  1912. // border-radius: 50rpx;
  1913. }
  1914. .mask {
  1915. z-index: 999;
  1916. width: 100%;
  1917. height: 100%;
  1918. position: fixed;
  1919. top: 0;
  1920. left: 0;
  1921. text-align: center;
  1922. background-color: rgba(0, 0, 0, 0.5);
  1923. image {
  1924. width: 100%;
  1925. height: 100%;
  1926. opacity: 0.8;
  1927. }
  1928. }
  1929. </style>