productCollage.vue 43 KB

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