productCollage.vue 42 KB

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