product.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579
  1. <template>
  2. <view class="container">
  3. <view class="carousel">
  4. <swiper indicator-dots :circular="true" duration="400">
  5. <swiper-item class="swiper-item" v-for="(item, index) in imgList" :key="index">
  6. <view class="image-wrapper"><image :src="item" class="loaded" mode="scaleToFill"></image></view>
  7. </swiper-item>
  8. </swiper>
  9. </view>
  10. <view class="introduce-section">
  11. <view class="price-box flex">
  12. <view class="flex_item">
  13. <view>
  14. <text class="price" v-if="wholesale == 1">{{ goodsObjact.wholesaler_price | parseFloatNum }}</text>
  15. <text class="price" v-else-if="userInfo.level > 0">{{ goodsObjact.vip_price | parseFloatNum }}</text>
  16. <text class="price" v-else>{{ goodsObjact.price | parseFloatNum }}</text>
  17. </view>
  18. <view class="vip_price">¥{{ goodsObjact.ot_price | parseFloatNum }}</view>
  19. </view>
  20. <!-- #ifdef H5 -->
  21. <view class="fenxiang" @click="open">
  22. <image class="fenxiang-img" src="https://tmp01.kktv6.com/img/share.png"></image>
  23. </view>
  24. <view class="mask" v-show="show"><image @click="onTap" src="https://tmp01.kktv6.com/img/shareimg.png"></image></view>
  25. <!-- #endif -->
  26. <!-- #ifdef MP -->
  27. <view class="fenxiang" @click="share">
  28. <image class="fenxiang-img" src="https://tmp01.kktv6.com/img/share.png"></image>
  29. </view>
  30. <!-- <button open-type="share" class="fenxiang" v-if="userInfo.level == 2">
  31. <image class="fenxiang-img" src="https://tmp01.kktv6.com/img/share.png"></image>
  32. </button> -->
  33. <!-- #endif -->
  34. </view>
  35. <view class="title">{{ goodsObjact.store_name }}</view>
  36. <!-- <view class="bot-row">
  37. <text>销量: {{ goodsObjact.sales + goodsObjact.ficti }}</text>
  38. <text>库存: {{ goodsObjact.stock - goodsObjact.ficti }}</text>
  39. <text>邮费: {{ goodsObjact.postage }}</text>
  40. </view> -->
  41. </view>
  42. <!-- <view class="quan" @click="openpop">
  43. <view class="quan-left">
  44. 领券
  45. </view>
  46. <view class="img-box">
  47. <image src="https://tmp01.kktv6.com/img/quan.png" mode="" class="quan-img"></image>
  48. </view>
  49. <view class="quan-center">
  50. 领券购物更优惠
  51. </view>
  52. <view class="quan-right">
  53. <text class="iconfont iconenter" style="color: #CCCCCC;"></text>
  54. </view>
  55. </view> -->
  56. <view class="eva-section" v-if="reply" @click="navTo('/pages/product/reply?id=' + goodsid)">
  57. <view class="e-header">
  58. <text class="tit">评价</text>
  59. <text>({{ list.replyCount }})</text>
  60. <text class="tip">好评率 {{ list.replyChance }}%</text>
  61. <text class="iconfont iconenter"></text>
  62. </view>
  63. <view class="eva-box">
  64. <image class="portrait" :src="reply.avatar || '/static/error/missing-face.png'" mode="aspectFill"></image>
  65. <view class="right">
  66. <text class="name">{{ reply.nickname }}</text>
  67. <text class="con">{{ reply.comment }}</text>
  68. <view class="con_box">
  69. <view class="con_image" v-for="item in reply.pics"><image :src="item"></image></view>
  70. </view>
  71. <view class="bot">
  72. <text class="attr"></text>
  73. <text class="time">{{ reply.add_time }}</text>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- 商品详情图 -->
  79. <view class="detail-desc">
  80. <!-- @click="showoption" -->
  81. <view class="d-header"><text>商品详情</text></view>
  82. <rich-text :nodes="goodsObjact.description"></rich-text>
  83. </view>
  84. <!-- 热销推荐 -->
  85. <view v-if="!wholesale && store_id == 0">
  86. <view class="hotsheader" v-if="hotList.length != 0">
  87. 热销推荐
  88. </view>
  89. <view class="hotgoods">
  90. <view class="hotgoods-item" v-for="item in hotList" :key = "item.id" @click="navToDetailPage(item)">
  91. <view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></image></view>
  92. <view class="title clamp margin-c-20">{{ item.store_name }}</view>
  93. <view class="hot-price">
  94. <view class="price">
  95. <text class="font-size-sm">¥</text>
  96. {{ item.price }}
  97. </view>
  98. <view class="cart-icon">
  99. <image src="https://zhibo.liuniu946.com/img/img002.png" mode=""></image>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <view class="page-bottom">
  106. <view class="action-btn-group pt-btn-group">
  107. <!-- <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
  108. <text class="iconfont iconhomefill"></text>
  109. <text>首页</text>
  110. </navigator> -->
  111. <view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
  112. <text class="iconfont iconlikefill"></text>
  113. <text>收藏</text>
  114. </view>
  115. <!-- <button v-if="!isaddCart" type="primary" class=" action-btn1 no-border buy-now-btn" @click="toggleSpec(2)">加入购物车</button> -->
  116. <button v-if="!wholesale && store_id == 0"type="primary" class=" action-btn1 no-border buy-now-btn" @click="toggleSpec(2)">加入购物车</button>
  117. <button type="primary" class=" action-btn1 no-border add-cart-btn" @click="toggleSpec(1)">立即购买</button>
  118. </view>
  119. </view>
  120. <!-- 规格-模态层弹窗 -->
  121. <view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec()">
  122. <!-- 遮罩层 -->
  123. <view class="mask"></view>
  124. <view class="layer attr-content" @click.stop="stopPrevent">
  125. <view class="a-t">
  126. <image :src="actionImage"></image>
  127. <view class="right">
  128. <text class="name">{{ goodsObjact.store_name }}</text>
  129. <text class="price">¥{{ actionPrice * goodsNumber }}</text>
  130. <!-- <text class="stock">库存:{{ goodsStore }}件</text> -->
  131. <view class="selected" v-if="specList != ''">
  132. 已选:
  133. <text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
  134. </view>
  135. </view>
  136. </view>
  137. <view v-for="(item, index) in specList" :key="index" class="attr-list">
  138. <text>{{ item.attr_name }}</text>
  139. <view class="item-list">
  140. <text
  141. v-for="(childItem, childIndex) in item.attr_value"
  142. :key="childIndex"
  143. class="tit"
  144. :class="{ selected: childItem.check }"
  145. @click="selectSpec(childItem, item, index)"
  146. >
  147. {{ childItem.attr }}
  148. </text>
  149. </view>
  150. </view>
  151. <view class="attr-list">
  152. <text>购买数量</text>
  153. <view class="num-list">
  154. <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
  155. </view>
  156. </view>
  157. <button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
  158. <button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
  159. </view>
  160. </view>
  161. <view v-if="shareShow" class="Shraremask" @click="cancel">
  162. <view class="mask-content">
  163. <scroll-view class="view-content" scroll-y>
  164. <view class="share-header">分享到</view>
  165. <view class="share-list">
  166. <view class="share-item">
  167. <!-- 微信 -->
  168. <button class="wechat-box" open-type="share">
  169. <image class="itemImage" src="https://tmp01.kktv6.com/img/img001.png" mode=""></image>
  170. <text class="itemText">微信</text>
  171. </button>
  172. <!-- 朋友圈 -->
  173. <view class="wechat-box" @click="shareToFriend()">
  174. <image class="itemImage" src="https://tmp01.kktv6.com/img/img002.png" mode=""></image>
  175. <text class="itemText">朋友圈</text>
  176. </view>
  177. </view>
  178. </view>
  179. </scroll-view>
  180. <view class="bottomButtom b-t" @click="cancel">取消</view>
  181. </view>
  182. </view>
  183. <uni-popup ref="popup1" style="z-index: 998;" type="bottom">
  184. <view class="pop-box">
  185. <view class="pop-top">
  186. <view class="top-center">
  187. 领取优惠券
  188. </view>
  189. <view class="top-right" @click="closepop">
  190. <image src="https://tmp01.kktv6.com/img/close.png" mode="" class="right-img"></image>
  191. </view>
  192. </view>
  193. <scroll-view class="scroll-h" scroll-y="true">
  194. <view class="pop-center">
  195. <view class="pop-item" v-for="(item,index) in quanlist" :key='index'>
  196. <view class="item-left">
  197. <view class="pic">
  198. ¥<text style="font-size: 59rpx;">{{item.coupon_price}}</text>
  199. </view>
  200. <view class="pic-info">
  201. 满{{item.use_min_price}}元使用
  202. </view>
  203. </view>
  204. <view class="item-right">
  205. <view class="right-left">
  206. <view class="top">
  207. {{item.title}}
  208. </view>
  209. <view class="center" v-if="item.type == 0">通用券</view>
  210. <view class="center" v-if="item.type == 2">商品券</view>
  211. <view class="foot">
  212. <text v-if="item.end_time !== '不限时'">有效期至{{item.end_time}}</text>
  213. <text v-if="item.end_time == '不限时'">不限时</text>
  214. </view>
  215. </view>
  216. <view class="right-right" @click="lingqu(item)" v-if="!item.used">
  217. 立即领取
  218. </view>
  219. <view class="right-right" v-if="item.used || item.show">
  220. 已领取
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. </scroll-view>
  226. </view>
  227. </uni-popup>
  228. <!-- 分享弹出窗 -->
  229. <view class="pop-mask" v-if="backShare" @click="closeBack"><image class="share-img" :src="shareImage" mode="aspectFit" @longpress="saveImg()"></image></view>
  230. </view>
  231. </template>
  232. <script>
  233. import { getProducts } from '@/api/product.js';
  234. import { mapState } from 'vuex';
  235. import uniNumberBox from '@/components/uni-number-box.vue';
  236. // 11
  237. // import { uniFav } from '@/components/uni-fav/uni-fav.vue';
  238. import { goodsDetail, cartAdd, collectAdd, collectDel, productDetail, productCode } from '@/api/product.js';
  239. import { saveUrl } from '@/utils/loginUtils.js';
  240. // 111
  241. // import { couponslist, setCoupons } from '@/api/coupon.js'
  242. // import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
  243. import uniPopup from '@/components/uni-popup/uni-popup.vue';
  244. // #ifdef H5
  245. import { weixindata } from '@/utils/wxAuthorized';
  246. // #endif
  247. export default {
  248. filters: {
  249. // 去处小数点后的0
  250. parseFloatNum(clock) {
  251. return parseFloat(clock);
  252. },
  253. },
  254. components: {
  255. uniNumberBox,
  256. uniFav,
  257. uniNoticeBar,
  258. uniPopup
  259. },
  260. // #ifdef MP
  261. onShareAppMessage: function(res) {
  262. // 来自页面内分享按钮
  263. let pages = getCurrentPages();
  264. // 获取当前页面
  265. let page = pages[pages.length - 1];
  266. let path = '/' + page.route + '?';
  267. // 保存传值
  268. for (let i in page.options) {
  269. path += i + '=' + page.options[i] + '&';
  270. }
  271. // 保存邀请人
  272. path += 'spread=' + this.userInfo.uid;
  273. console.log(path);
  274. let data = {
  275. path: path,
  276. imageUrl: this.goodsObjact.image,
  277. title: this.goodsObjact.store_name
  278. };
  279. console.log(data);
  280. return data;
  281. },
  282. // #endif
  283. data() {
  284. return {
  285. wholesale:'',
  286. one_num:0,
  287. is_integral: '', // 是否是积分
  288. use_integral:0, // 可用积分
  289. integral:0,
  290. is_vip: '', // 是否是vip
  291. is_repurchase: '', // 是否是复购
  292. isaddCart:0,
  293. shareShow: false, //分享
  294. backShare: false, // 分享遮罩层
  295. show: false,
  296. showModal: true, //拼单遮罩层
  297. more: true, //查看更多按钮
  298. autoplay: true,
  299. vertical: true,
  300. interval: 3000,
  301. duration: 500,
  302. buys_show: true,
  303. buys_shows: false,
  304. circular: true,
  305. type: 1, //默认支付方式add为
  306. specClass: 'none', //显示隐藏弹窗
  307. actionImage: '', //商品图片
  308. goodsid: '', //商品id
  309. store_id: '', //小店id
  310. actionPrice: '', //商品价格
  311. // specClass: 'none', //显示隐藏弹窗
  312. goodsObjact: {}, //保存商品数据
  313. goodsNumberMax: 0, //商品库存
  314. //图片循环
  315. imgList: [], //商品轮播图
  316. specList: [], //保存规格列表
  317. people: '', //拼团人数
  318. goodsNumber: 1, //购买数量(开团数量为1,整团数量为1*参团人数)
  319. carnumber: '', //整团购买商品数量
  320. reply: '', //商品数据
  321. list: '', //详情数据
  322. goodsType: 0, //商品类型1秒杀商品0为普通商品2为拼团商品3为新人礼包
  323. pinkTlist: '', //拼团数据
  324. count: 0, //点击查看更多
  325. showlist: [],
  326. showmore: true,
  327. pinkTlistnum: '',
  328. spread: '',
  329. chooseGoodsNumber: 1, //选择商品的数量
  330. specSelected: [], //选中的分类
  331. goodsStore: 0, //选中库存
  332. uniqueId: '', //选中的规格id
  333. productValue: '', //保存属性值对象
  334. isCollect: '', //是否被收藏
  335. maskshow: false, //弹窗
  336. posturl: '',
  337. shareImage: '', // 获取的分享海报
  338. option: '', //保存传值
  339. opt: '', //保存小程序传值
  340. // 保存普通商品详细
  341. goodsData: {
  342. specSelected: [], //选中的分类
  343. productValue: '', //保存属性值对象
  344. specList: [], //保存规格列表
  345. goodsStore: 0, //选中库存
  346. actionImage: '', //商品图片
  347. actionPrice: '', //商品价格
  348. goodsNumber: 1, //购买数量(开团数量为1,整团数量为1*参团人数)
  349. goodsObjact: {}, //商品对象数据
  350. uniqueId: '', //选中的规格id
  351. goodsType: 0, //商品类型1秒杀商品0为普通商品2为拼团商品3为新人礼包
  352. list: '' //报
  353. },
  354. goodsDataType: 0, //判断是否为团队的商品
  355. //保存拼团商品信息
  356. pinkGoodsData: {
  357. specSelected: [], //选中的分类
  358. productValue: '', //保存属性值对象
  359. specList: [], //保存规格列表
  360. goodsStore: 0, //选中库存
  361. actionImage: '', //商品图片
  362. actionPrice: '', //商品价格
  363. goodsNumber: 1, //购买数量(开团数量为1,整团数量为1*参团人数)
  364. goodsObjact: {}, //商品对象数据
  365. uniqueId: '', //选中的规格id
  366. goodsType: 2 //商品类型1秒杀商品0为普通商品2为拼团商品3为新人礼包
  367. },
  368. PinkShow: {}, // 显示拼团
  369. AutopinkList: [], // 谁购买了商品
  370. AutoList: '',
  371. quanlist: [], //优惠券列表
  372. tuanzhangPrice: '', // 团长立省
  373. many: 1, //1是单规格 2是多规格
  374. hotList:[],//热销推荐产品
  375. };
  376. },
  377. computed: {
  378. ...mapState(['userInfo']),
  379. },
  380. onLoad(option) {
  381. console.log('option',option);
  382. this.wholesale = option.wholesale
  383. this.use_integral = option.use_integral
  384. console.log('可用积分',this.use_integral );
  385. this.option = option;
  386. if (option.scene) {
  387. if (typeof option.scene == 'string') {
  388. let scene = ('{' + option.scene + '}')
  389. .replace('qr%26', '')
  390. .replace(/%3D/g, ':')
  391. .replace(/%26/g, ',')
  392. .replace('pid', '"pid"')
  393. .replace('type', '"type"')
  394. .replace('id', '"id"')
  395. .replace('sid', '"sid"');
  396. let opt = JSON.parse(scene);
  397. this.opt = opt;
  398. // 保存拼团订单id
  399. this.goodsid = opt.id;
  400. if (opt.pid) {
  401. // 存储邀请人
  402. this.spread = opt.pid;
  403. uni.setStorageSync('spread', opt.pid);
  404. }
  405. if (opt.type) {
  406. this.goodsType = opt.type;
  407. }
  408. }
  409. } else {
  410. //保存商品id
  411. this.goodsid = option.id;
  412. //保存店铺id
  413. this.store_id = option.sid;
  414. console.log("店铺id",this.store_id)
  415. //判断有无人邀请
  416. if (option.spread) {
  417. // 存储邀请人
  418. this.spread = option.spread;
  419. uni.setStorageSync('spread', option.spread);
  420. }
  421. //判断是否是普通商品
  422. if (option.type) {
  423. console.log(option.type);
  424. this.goodsType = option.type;
  425. }
  426. }
  427. // 保存当前页面
  428. saveUrl();
  429. },
  430. onShow() {
  431. let obj = this;
  432. obj.gethot();
  433. obj.more = true;
  434. obj.productDetail();
  435. obj.loadCoupon();
  436. // combination({}, obj.goodsid).then()
  437. },
  438. computed: {
  439. ...mapState(['userInfo', 'baseURL'])
  440. },
  441. methods: {
  442. // 跳转普通商品
  443. navToDetailPage(item) {
  444. uni.navigateTo({
  445. url: '/pages/product/product?id=' + item.id
  446. })
  447. },
  448. //获取热销推荐
  449. gethot(){
  450. getProducts({
  451. page: 1,
  452. limit: 10,
  453. sid: 29
  454. }).then(({data}) => {
  455. console.log(data);
  456. this.hotList = data;
  457. })
  458. },
  459. // 加载普通商品信息
  460. productDetail(type = false) {
  461. let obj = this;
  462. let id = obj.goodsid;
  463. // 获取普通商品信息
  464. productDetail({}, id).then(function({ data }) {
  465. console.log('-----',data)
  466. // is_integral,is_vip,is_repurchase
  467. // 判断是否在拼团商品中
  468. obj.imgList = data.storeInfo.slider_image; //保存轮播图
  469. obj.one_num = data.storeInfo.one_num
  470. obj.goodsDataProcessing(data, obj); //保存默认
  471. // #ifdef H5
  472. obj.shareDate();
  473. // #endif
  474. });
  475. return;
  476. },
  477. // 基础数据处理
  478. goodsDataProcessing(data, obj) {
  479. console.log('基础数据处理data',data)
  480. let goods = data.storeInfo;
  481. if (data.reply) {
  482. obj.reply = data.reply;
  483. }
  484. //
  485. obj.list = data;
  486. obj.goodsObjact = goods;
  487. console.log(obj.goodsObjact,'93985')
  488. let tzshen = '', tzPrice = '';
  489. // 计算价格
  490. console.log('obj.userInfo',obj.userInfo);
  491. // if ( obj.userInfo.level_info.list.length > 0 ) {
  492. // tzshen = obj.userInfo.level_info.list[1].discount / 100;
  493. // tzPrice = (obj.goodsObjact.price * 100) - (obj.goodsObjact.price * tzshen * 100);
  494. // } else {
  495. // tzPrice = (obj.goodsObjact.price * 100) - (obj.goodsObjact.vip_price * 100);
  496. // }
  497. obj.tuanzhangPrice =( obj.goodsObjact.price -obj.goodsObjact.cost )*obj.goodsObjact.level3_common_rate/100 //(tzPrice / 100).toFixed(2);
  498. console.log(tzPrice, obj.tuanzhangPrice, '团长省');
  499. //商品详情图超出屏幕问题
  500. if (obj.goodsObjact.description != null) {
  501. obj.goodsObjact.description = obj.goodsObjact.description.replace(/<img/g, '<img class="rich-img"').replace(/<p>\s*<img/g, '<p class="pHeight"><img');
  502. }
  503. if ( obj.goodsObjact.rule != null ) {
  504. obj.goodsObjact.rule ='<p>' + obj.goodsObjact.rule.replace(/\n/g, '</p><p>').trim() + '</p>'
  505. }
  506. if (data.productAttr) {
  507. let productValueArr = {}; //保存循环数据结果
  508. // 循环获取用于判断是否显示分类的数组
  509. for (let i in data.productValue) {
  510. //判断该分类是否可以选择
  511. let arr = i.split(',');
  512. for (let j = 0; j < arr.length; j++) {
  513. //判断是否已经保存该对象不存在则保存
  514. if (!productValueArr[arr[j]]) {
  515. productValueArr[arr[j]] = true;
  516. }
  517. }
  518. }
  519. console.log(productValueArr,"循环")
  520. // 循环获取分类数据并过滤保存
  521. obj.specList = data.productAttr.map(e => {
  522. let attr_value = [];
  523. let attr_values = [];
  524. // 循环获取判断是否存在相对应的数据
  525. e.attr_value.forEach(s => {
  526. // 判断是否存在对应的数据
  527. if (productValueArr[s.attr]) {
  528. attr_value.push(s);
  529. attr_values.push(s.attr);
  530. return;
  531. }
  532. });
  533. //
  534. e.attr_value = attr_value;
  535. e.attr_values = attr_values;
  536. // 判断该分类下是否有数据
  537. if (attr_value.length > 0) {
  538. return e;
  539. }
  540. }); //保存分类列表
  541. }
  542. //保存属性值
  543. obj.productValue = data.productValue;
  544. // obj.productValue = data.productValue.默认;
  545. console.log('obj.productValue ',obj.productValue )
  546. // 保存默认选中的对象
  547. obj.specSelected = []; //初始化默认选择对象
  548. for (let i = 0; i < obj.specList.length; i++) {
  549. // 设置默认数据
  550. let attrValue = obj.specList[i].attr_value[0];
  551. attrValue.check = true;
  552. obj.specSelected.push(attrValue.attr);
  553. }
  554. //保存默认选中的对象字符串名称
  555. let str = obj.specSelected.join(',');
  556. // 设置默认值
  557. if(obj.wholesale == 1){
  558. obj.actionPrice = obj.productValue[str].wholesaler_price;
  559. }else {
  560. obj.actionPrice = obj.productValue[str].price;
  561. }
  562. obj.goodsNumberMax = obj.productValue[str].stock;
  563. obj.actionImage = obj.productValue[str].image;
  564. obj.uniqueId = obj.productValue[str].unique;
  565. console.log('---999data.storeInfo',data.storeInfo)
  566. // obj.goodsStore = obj.goodsObjact[str].stock;
  567. },
  568. // 数据根据分类保存保存
  569. loadCoupon() {
  570. let obj = this;
  571. couponslist({
  572. page: 1,
  573. limit: 100
  574. }).then(({ data }) => {
  575. obj.quanlist = data;
  576. obj.quanlist.map(e => {
  577. e.coupon_price = parseInt(e.coupon_price);
  578. e.use_min_price = parseInt(e.use_min_price);
  579. e.show = false
  580. })
  581. couponslist({
  582. page: 1,
  583. limit: 100,
  584. product_id: obj.goodsid,
  585. type: 1
  586. }).then(({ data }) => {
  587. let shopList = data;
  588. shopList.map(e => {
  589. e.coupon_price = parseInt(e.coupon_price);
  590. e.use_min_price = parseInt(e.use_min_price);
  591. e.show = false
  592. })
  593. obj.quanlist = obj.quanlist.concat(shopList)
  594. })
  595. })
  596. },
  597. lingqu(item) {
  598. setCoupons({
  599. couponId: item.id
  600. }).then((data) => {
  601. console.log(data);
  602. if (data.status == 200) {
  603. this.$api.msg('领取成功')
  604. item.show = true;
  605. this.$refs.popup1.close();
  606. this.loadCoupon();
  607. }
  608. })
  609. },
  610. //分享
  611. share() {
  612. this.shareShow = true;
  613. },
  614. //取消分享
  615. cancel() {
  616. this.shareShow = false;
  617. if (!this.share) return;
  618. this.close();
  619. },
  620. // 分享海报关闭按钮
  621. closeBack() {
  622. this.backShare = false;
  623. },
  624. // 长按保存图片
  625. saveImg(w) {
  626. console.log(w);
  627. let obj = this;
  628. uni.downloadFile({
  629. //下载图片
  630. url: obj.shareImage,
  631. success: res => {
  632. console.log(res.tempFilePath);
  633. uni.saveImageToPhotosAlbum({
  634. //将图片保存在手机
  635. filePath: res.tempFilePath, //保存的位置
  636. success: res => {
  637. uni.showToast({
  638. title: '保存成功',
  639. icon: 'none'
  640. });
  641. }
  642. });
  643. }
  644. });
  645. },
  646. // 具体分享
  647. shareToFriend(item) {
  648. let obj = this;
  649. uni.showLoading({
  650. title: 'Loading...',
  651. mask: true
  652. })
  653. // #ifdef H5
  654. let url = location.href;
  655. // #endif
  656. productCode({
  657. id: obj.goodsid,
  658. type: 1,
  659. // #ifdef MP-WEIXIN
  660. user_type: 'routine', //来源
  661. // #endif
  662. // #ifdef H5
  663. user_type: 'wechat', //来源
  664. // #endif
  665. // #ifdef H5
  666. qurl: url
  667. // #endif
  668. }).then(({ data }) => {
  669. this.backShare = true;
  670. this.shareImage = data.url;
  671. uni.hideLoading();
  672. console.log(data);
  673. }).catch(e=> {
  674. uni.hideLoading()
  675. })
  676. },
  677. closepop() {
  678. this.$refs.popup1.close();
  679. },
  680. openpop() {
  681. if (this.quanlist.length == 0) {
  682. this.$api.msg('暂无优惠券')
  683. } else {
  684. this.$refs.popup1.open();
  685. }
  686. },
  687. //防止冒泡和滚动穿透
  688. stopPrevent() {},
  689. numberChange(e) {
  690. //购买数量
  691. this.chooseGoodsNumber = e.number;
  692. },
  693. // 拼团发起拼单
  694. specOPne() {
  695. this.goodsDataType = 0;
  696. //显示弹出框
  697. this.specClass = 'show';
  698. // 拼团
  699. this.productDataUp(this.pinkGoodsData);
  700. },
  701. // 一键拼团
  702. // PinkAuto() {
  703. // console.log(11111)
  704. // this.goodsDataType = 2;
  705. // //显示弹出框
  706. // this.specClass = 'show';
  707. // // 拼团
  708. // this.productDataUp(this.pinkGoodsData);
  709. // },
  710. // 处理数组结构
  711. dataUpReturn(data) {
  712. //保存处理完毕数据
  713. let arr = [];
  714. // 保存临时数据
  715. let arr1 = [];
  716. // 设置每个小数组可以存放的数量
  717. let num = 2;
  718. if (data.length > 1) {
  719. for (let i = 0; i < data.length; i++) {
  720. // 保存数据到临时数组
  721. arr1.push(data[i]);
  722. if ((i + 1) % num === 0) {
  723. console.log(arr1, 2);
  724. // 添加数据到返回数组,用map方法解决物理指针问题导致的数据对象改变问题
  725. arr.push(
  726. arr1.map(e => {
  727. return e;
  728. })
  729. );
  730. // 清空临时数组重新开始计算
  731. arr1 = [];
  732. }
  733. }
  734. }
  735. // 判断是否为奇数
  736. if (data.length % num === 1) {
  737. arr.push([data[data.length - 1]]);
  738. }
  739. return arr;
  740. },
  741. //拼团列表数据分页
  742. setPinkList() {
  743. let obj = this;
  744. let showlist = new Array();
  745. for (let i = 0; i < obj.pinkTlist.length; i++) {
  746. if (i >= obj.count) {
  747. break;
  748. }
  749. showlist[i] = obj.pinkTlist[i];
  750. }
  751. obj.showlist = showlist;
  752. },
  753. //查看更多
  754. // clickMore() {
  755. // let obj = this;
  756. // obj.count += 2;
  757. // obj.setPinkList();
  758. // if (obj.count >= obj.pinkTlist.length) {
  759. // obj.showmore = false; //当次数大于拼团数据,查看更多隐藏
  760. // } else {
  761. // obj.showmore = true; //当次数大于拼团数据,查看更多隐藏
  762. // }
  763. // },
  764. clickMore() {
  765. this.showlist = this.pinkTlist;
  766. console.log(this.showlist, 22);
  767. this.more = false;
  768. },
  769. //规格弹窗开关
  770. toggleSpec(str) {
  771. // console.log('是否是登录状态',this.hasLogin)
  772. // if (!this.hasLogin) {
  773. // uni.showModal({
  774. // title: '登录',
  775. // content: '您未登录,是否马上登陆?',
  776. // success: e => {
  777. // if (e.confirm) {
  778. // interceptor();
  779. // }
  780. // },
  781. // fail: e => {
  782. // console.log(e);
  783. // }
  784. // });
  785. // return;
  786. // }
  787. // uni.navigateTo({
  788. // url
  789. // });
  790. if (this.specClass === 'show') {
  791. this.specClass = 'hide';
  792. setTimeout(() => {
  793. this.specClass = 'none';
  794. }, 250);
  795. } else if (this.specClass === 'none') {
  796. this.specClass = 'show';
  797. }
  798. // 判断是否为数字
  799. if (typeof str == 'number') {
  800. // 保存当前购买类型
  801. this.type = str;
  802. }
  803. },
  804. //选择规格
  805. selectSpec(item, arr, ind) {
  806. console.log('--999--',item, arr, ind);
  807. arr.attr_value.forEach(function(e) {
  808. e.check = false;
  809. });
  810. item.check = true;
  811. let obj = this;
  812. obj.specSelected[ind] = item.attr;
  813. let str = obj.specSelected.join(',');
  814. console.log(str);
  815. // 获取当前选中的对象
  816. if (obj.productValue[str]) {
  817. console.log(obj.productValue[str],'当前选中对象')
  818. obj.buys_show = true;
  819. obj.buys_shows = false;
  820. if(obj.wholesale == 1){
  821. obj.actionPrice = obj.productValue[str].wholesaler_price;
  822. }else {
  823. obj.actionPrice = obj.productValue[str].price;
  824. }
  825. obj.goodsNumberMax = obj.productValue[str].stock;
  826. obj.actionImage = obj.productValue[str].image;
  827. obj.uniqueId = obj.productValue[str].unique;
  828. console.log('--9090---',obj.uniqueId )
  829. obj.goodsStore = obj.productValue[str].stock;
  830. } else {
  831. (obj.buys_show = false), (obj.buys_shows = true);
  832. }
  833. obj.specSelected[ind] = item.attr;
  834. // console.log(obj.specList)
  835. // console.log(str)
  836. if (obj.specList[str]) {
  837. let data = obj.specList[str];
  838. console.log(data)
  839. if(obj.wholesale == 1){
  840. obj.actionPrice = data.wholesaler_price;
  841. }else {
  842. obj.actionPrice = data.price;
  843. }
  844. if (obj.goodsType == 2) {
  845. obj.goodsStore = obj.productValue[item.attr].quota;
  846. } else {
  847. obj.goodsStore = obj.goodsObjact.stock;
  848. }
  849. obj.goodsNumberMax = data.stock;
  850. obj.actionImage = data.image;
  851. obj.uniqueId = data.unique;
  852. }
  853. },
  854. //显示弹窗
  855. open() {
  856. console.log('1');
  857. this.show = true;
  858. },
  859. //随意点击隐藏弹窗
  860. onTap() {
  861. if (!this.open) return;
  862. this.close();
  863. },
  864. close() {
  865. this.show = false;
  866. },
  867. //收藏
  868. toFavorite(item) {
  869. let obj = this;
  870. item.userCollect = !item.userCollect;
  871. // 判断是否已经收藏
  872. if (!item.userCollect) {
  873. collectDel({
  874. id: item.id,
  875. category: 'product'
  876. }).then(function(e) {
  877. obj.$api.msg('成功取消收藏!');
  878. });
  879. } else {
  880. collectAdd({
  881. id: item.id,
  882. category: 'product'
  883. }).then(function(e) {
  884. obj.$api.msg('成功加入收藏!');
  885. });
  886. }
  887. },
  888. //去拼团
  889. groupBooking(item, unique) {
  890. uni.navigateTo({
  891. url: '/pages/product/details?pink_id=' + item + '&unique=' + unique
  892. });
  893. },
  894. // #ifdef H5
  895. shareDate() {
  896. let obj = this;
  897. let url = window.location.href.replace(/[\?,&]{0,1}from=singlemessage/g, '') + '&spread=' + this.userInfo.uid;
  898. let bool = uni.getStorageSync('weichatBrowser') || '';
  899. // 判断是否微信浏览器
  900. if (bool) {
  901. let data;
  902. data = {
  903. link: url, // 分享链接
  904. imgUrl: obj.goodsObjact.image, // 分享图标
  905. desc: obj.goodsObjact.store_info,
  906. title: obj.goodsObjact.store_name,
  907. success: function() {}
  908. };
  909. weixindata(data);
  910. }
  911. },
  912. // #endif
  913. // 单独购买
  914. goProduct(item) {
  915. //显示弹出框
  916. this.goodsDataType = 1;
  917. this.specClass = 'show';
  918. this.productDataUp(this.goodsData);
  919. },
  920. /* 弹窗数据更新 */
  921. productDataUp(data) {
  922. console.log('--弹窗数据更新data---',data)
  923. let obj = this;
  924. obj.specSelected = data.specSelected; //选中的分类
  925. obj.productValue = data.productValue; //保存属性值对象
  926. obj.specList = data.specList; //保存规格列表
  927. obj.goodsStore = data.goodsStore; //选中库存
  928. obj.actionImage = data.actionImage; //商品图片
  929. obj.actionPrice = data.actionPrice; //商品价格
  930. obj.goodsNumber = data.goodsNumber; //购买数量(开团数量为1,整团数量为1*参团人数)
  931. obj.uniqueId = data.uniqueId; //选中的规格id
  932. },
  933. /**
  934. * 统一跳转接口,拦截未登录路由
  935. * navigator标签现在默认没有转场动画,所以用view
  936. */
  937. navTo(url) {
  938. uni.navigateTo({
  939. url
  940. });
  941. },
  942. // 确定
  943. comfim() {
  944. this.buyInfo();
  945. },
  946. // 立即购买
  947. buy(item) {
  948. console.log(this.goodsDataType,777)
  949. let obj = this;
  950. console.log('900---009',item)
  951. obj.buyInfo(item);
  952. },
  953. // 购买流程
  954. async buyInfo(item) {
  955. console.log('99999',item)
  956. let obj = this;
  957. // 创建传值对象
  958. let data = {
  959. wholesale:this.wholesale || '',
  960. cartNum: obj.chooseGoodsNumber, //商品数量
  961. uniqueId: obj.uniqueId, //商品标签
  962. new: 1, //商品是否新增加到购物车1为不加入0为加入
  963. mer_id: obj.shopId,
  964. storeId: this.store_id,
  965. };
  966. console.log('--123--',data);
  967. // 判断是否为加入购物车
  968. if (obj.type == 2) {
  969. data.new = 0;
  970. }
  971. // 判断是否为普通商品
  972. data.productId = obj.goodsid; //商品编号
  973. // data.is_gift = 1; // 是否为礼包 0 不是 1是
  974. this.specClass = 'none';
  975. cartAdd(data)
  976. .then(function(e) {
  977. let da = e.data;
  978. console.log(e);
  979. if (obj.type == 1) {
  980. // 跳转到支付页
  981. uni.navigateTo({
  982. url: '/pages/order/createOrder?id=' + da.cartId + '&is_wholesale=' + obj.wholesale + '&integral=' + obj.integral + '&use_integral=' + obj.use_integral + '&sid=' + obj.store_id
  983. });
  984. }
  985. if (obj.type == 2) {
  986. obj.$api.msg('成功加入购物车');
  987. }
  988. })
  989. .catch(e => {
  990. console.log(e);
  991. });
  992. },
  993. // 阻止触发上级事件
  994. stopPrevent() {}
  995. }
  996. };
  997. </script>
  998. <style lang="scss">
  999. /* #ifdef MP || APP-PLUS */
  1000. .barHeight {
  1001. height: var(--status-bar-height);
  1002. }
  1003. /* #endif */
  1004. page {
  1005. background: $page-color-base;
  1006. padding-bottom: 160rpx;
  1007. }
  1008. // 处理图片间白色间距问题
  1009. /deep/ .pHeight {
  1010. line-height: 0;
  1011. }
  1012. /deep/ .rich-img {
  1013. width: 100% !important;
  1014. height: auto;
  1015. }
  1016. /deep/ div,
  1017. /deep/ table {
  1018. max-width: 100% !important;
  1019. }
  1020. /* #ifdef MP */
  1021. .rich-img {
  1022. width: 100% !important;
  1023. height: auto;
  1024. }
  1025. // 处理图片间白色间距问题
  1026. .pHeight {
  1027. line-height: 0;
  1028. }
  1029. /* #endif */
  1030. .list-row {
  1031. position: fixed;
  1032. top: 450rpx;
  1033. left: 86rpx;
  1034. .row {
  1035. position: relative;
  1036. width: 578rpx;
  1037. height: 700rpx;
  1038. background: #ffffff;
  1039. border-radius: 20rpx;
  1040. .row-1 {
  1041. flex: 1;
  1042. text-align: center;
  1043. padding: 26rpx 223rpx;
  1044. border-bottom: 2rpx solid #eeeeee;
  1045. .row-1-1 {
  1046. font-size: $font-lg;
  1047. font-weight: bold;
  1048. color: #333333;
  1049. }
  1050. }
  1051. .row-2 {
  1052. padding: 0 23rpx;
  1053. .pinklist_list1 {
  1054. padding: 20rpx 0;
  1055. display: flex;
  1056. justify-content: space-around;
  1057. align-items: center;
  1058. border-bottom: 1px solid #eeeeee;
  1059. .left {
  1060. width: 74rpx;
  1061. height: 74rpx;
  1062. background-color: #e3e3e3;
  1063. border-radius: 50%;
  1064. }
  1065. .center {
  1066. display: flex;
  1067. flex-wrap: wrap;
  1068. margin-left: 17rpx;
  1069. .center-1 {
  1070. display: flex;
  1071. align-items: center;
  1072. letter-spacing: 3rpx;
  1073. .center-1-1 {
  1074. font-size: $font-base;
  1075. font-weight: 500;
  1076. color: #333333;
  1077. }
  1078. .center-1-2 {
  1079. font-size: $font-base - 2rpx;
  1080. font-weight: 500;
  1081. color: #333333;
  1082. }
  1083. }
  1084. }
  1085. .right {
  1086. width: 134rpx;
  1087. height: 59rpx;
  1088. background: $base-color;
  1089. border-radius: 10rpx;
  1090. display: flex;
  1091. align-items: center;
  1092. justify-content: center;
  1093. .right-word {
  1094. font-size: 26rpx;
  1095. font-weight: 500;
  1096. color: #ffffff;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. .row-3 {
  1102. width: 56rpx;
  1103. height: 56rpx;
  1104. position: absolute;
  1105. top: -28rpx;
  1106. right: -28rpx;
  1107. }
  1108. }
  1109. }
  1110. .iconenter {
  1111. font-size: $font-base + 2rpx;
  1112. color: #888;
  1113. }
  1114. .pinklist_list {
  1115. margin-bottom: 25rpx;
  1116. }
  1117. .kf {
  1118. width: 146rpx;
  1119. height: 146rpx;
  1120. position: fixed;
  1121. right: 0;
  1122. top: 710rpx;
  1123. z-index: 99;
  1124. image {
  1125. width: 100%;
  1126. height: 100%;
  1127. }
  1128. }
  1129. .fuli {
  1130. position: fixed;
  1131. right: 24rpx;
  1132. bottom: 400rpx;
  1133. width: 136rpx;
  1134. height: 136rpx;
  1135. z-index: 99;
  1136. image {
  1137. width: 100%;
  1138. height: 100%;
  1139. }
  1140. }
  1141. .fuli-box {
  1142. position: fixed;
  1143. right: 24rpx;
  1144. bottom: 390rpx;
  1145. width: 136rpx;
  1146. height: 136rpx;
  1147. z-index: 99;
  1148. image {
  1149. width: 100%;
  1150. height: 100%;
  1151. }
  1152. }
  1153. @keyframes rowup {
  1154. 0% {
  1155. // -webkit-transform: translate3d(0, 0, 0);
  1156. // transform: translate3d(0, 0, 0);
  1157. opacity:0
  1158. }
  1159. 100% {
  1160. // -webkit-transform: translate3d(0, -106rpx, 0);
  1161. // transform: translate3d(0, -106rpx, 0);
  1162. opacity:1;
  1163. display: none;
  1164. }
  1165. }
  1166. .pt-box {
  1167. // width: 380rpx;
  1168. height: 70rpx;
  1169. background: rgba(0, 0, 0, 0.4);
  1170. border-radius: 10rpx;
  1171. position: absolute;
  1172. top: 106rpx;
  1173. left: 24rpx;
  1174. padding: 0 15rpx;
  1175. display: flex;
  1176. align-items: center;
  1177. overflow: hidden;
  1178. -webkit-animation: 3s rowup linear infinite normal;
  1179. animation: 3s rowup linear infinite normal;
  1180. .pt-frame {
  1181. display: flex;
  1182. align-items: center;
  1183. }
  1184. .pt-img {
  1185. width: 60rpx;
  1186. height: 60rpx;
  1187. border-radius: 50%;
  1188. margin-right: 10rpx;
  1189. }
  1190. .pt-text {
  1191. font-size: $font-base;
  1192. font-weight: 500;
  1193. color: rgba(255, 255, 255, 1);
  1194. display: flex;
  1195. align-items: center;
  1196. .pt-name {
  1197. // display: inline-block;
  1198. // width: 200rpx;
  1199. // overflow: hidden;
  1200. // text-overflow: ellipsis;
  1201. // white-space: nowrap;
  1202. }
  1203. }
  1204. }
  1205. .carousel {
  1206. height: 722rpx;
  1207. position: relative;
  1208. swiper {
  1209. height: 100%;
  1210. }
  1211. .image-wrapper {
  1212. width: 100%;
  1213. height: 100%;
  1214. }
  1215. .swiper-item {
  1216. display: flex;
  1217. justify-content: center;
  1218. align-content: center;
  1219. height: 750rpx;
  1220. overflow: hidden;
  1221. image {
  1222. width: 100%;
  1223. height: 100%;
  1224. }
  1225. }
  1226. }
  1227. /* 标题简介 */
  1228. .introduce-section {
  1229. background: #fff;
  1230. padding: 20rpx 30rpx;
  1231. .title {
  1232. width: 100%;
  1233. font-size: 32rpx;
  1234. color: $font-color-dark;
  1235. // height: 50rpx;
  1236. line-height: 50rpx;
  1237. word-break: break-all;
  1238. display: -webkit-box;
  1239. -webkit-line-clamp: 2;
  1240. -webkit-box-orient: vertical;
  1241. overflow: hidden;
  1242. }
  1243. .price-box {
  1244. display: flex;
  1245. // align-items: baseline;
  1246. // height: 64rpx;
  1247. padding: 10rpx 0;
  1248. font-size: 26rpx;
  1249. color: #ff0000;
  1250. .fenxiang {
  1251. width: 36rpx;
  1252. height: 36rpx;
  1253. padding: 0;
  1254. margin: 0;
  1255. border-radius: 0;
  1256. background: #FFFFFF;
  1257. display: flex;
  1258. &::after {
  1259. border: none;
  1260. }
  1261. .fenxiang-img {
  1262. width: 36rpx;
  1263. height: 36rpx;
  1264. }
  1265. }
  1266. }
  1267. .price {
  1268. font-size: 50rpx;
  1269. font-family: PingFang SC;
  1270. font-weight: 800;
  1271. color: #FF0000;
  1272. &::before {
  1273. content: '¥';
  1274. font-size: 26rpx;
  1275. }
  1276. }
  1277. .vip_price {
  1278. // font-size: $font-lg + 2rpx;
  1279. // color: $uni-color-primary;
  1280. // padding-left: 15rpx;
  1281. margin-left: 15rpx;
  1282. font-size: $font-lg;
  1283. font-family: PingFang SC;
  1284. font-weight: 500;
  1285. text-decoration: line-through;
  1286. color: #333333;
  1287. opacity: 0.61;
  1288. }
  1289. .tz_box {
  1290. margin-left: 15rpx;
  1291. font-size: 20rpx;
  1292. font-family: PingFang SC;
  1293. font-weight: bold;
  1294. color: #303131;
  1295. line-height: 1;
  1296. padding: 6rpx 10rpx;
  1297. background: linear-gradient(90deg, #FFF4E9, #FBDBB2);
  1298. border-radius: 16rpx;
  1299. }
  1300. .m-price {
  1301. margin: 0 12rpx;
  1302. color: $font-color-light;
  1303. text-decoration: line-through;
  1304. }
  1305. .coupon-tip {
  1306. align-items: center;
  1307. padding: 4rpx 10rpx;
  1308. background: $uni-color-primary;
  1309. font-size: $font-sm;
  1310. color: #fff;
  1311. border-radius: 6rpx;
  1312. line-height: 1;
  1313. transform: translateY(-4rpx);
  1314. }
  1315. .bot-row {
  1316. display: flex;
  1317. align-items: center;
  1318. height: 50rpx;
  1319. font-size: $font-sm;
  1320. color: $font-color-light;
  1321. text {
  1322. flex: 1;
  1323. }
  1324. }
  1325. .people {
  1326. border-radius: 10rpx;
  1327. height: 35rpx !important;
  1328. position: relative;
  1329. width: 116rpx;
  1330. height: 35rpx;
  1331. // border: 2rpx solid #db1935;
  1332. .people_image {
  1333. // background-color: #db1935;
  1334. width: 100%;
  1335. height: 100%;
  1336. text-align: center;
  1337. border-top-left-radius: 20%;
  1338. border-bottom-left-radius: 20%;
  1339. image {
  1340. width: 100%;
  1341. height: 100%;
  1342. // margin-bottom: 5rpx;
  1343. }
  1344. }
  1345. .people_number {
  1346. position: absolute;
  1347. top: 0;
  1348. right: 8rpx;
  1349. font-size: 22rpx;
  1350. line-height: 35rpx;
  1351. // padding: 5rpx 10rpx;
  1352. }
  1353. }
  1354. }
  1355. /* 分享 */
  1356. .share-section {
  1357. display: flex;
  1358. align-items: center;
  1359. color: $font-color-base;
  1360. background: linear-gradient(left, #fdf5f6, #fbebf6);
  1361. padding: 12rpx 30rpx;
  1362. .share-icon {
  1363. display: flex;
  1364. align-items: center;
  1365. width: 70rpx;
  1366. height: 30rpx;
  1367. line-height: 1;
  1368. border: 1px solid $uni-color-primary;
  1369. border-radius: 4rpx;
  1370. position: relative;
  1371. overflow: hidden;
  1372. font-size: 22rpx;
  1373. color: $uni-color-primary;
  1374. &:after {
  1375. content: '';
  1376. width: 50rpx;
  1377. height: 50rpx;
  1378. border-radius: 50%;
  1379. left: -20rpx;
  1380. top: -12rpx;
  1381. position: absolute;
  1382. background: $uni-color-primary;
  1383. }
  1384. }
  1385. .iconfavorfill {
  1386. position: relative;
  1387. z-index: 1;
  1388. font-size: 24rpx;
  1389. margin-left: 2rpx;
  1390. margin-right: 10rpx;
  1391. color: #fff;
  1392. line-height: 1;
  1393. }
  1394. .tit {
  1395. font-size: $font-base;
  1396. margin-left: 10rpx;
  1397. }
  1398. .iconprompt {
  1399. padding: 10rpx;
  1400. font-size: 30rpx;
  1401. line-height: 1;
  1402. }
  1403. .share-btn {
  1404. flex: 1;
  1405. text-align: right;
  1406. font-size: $font-sm;
  1407. color: $uni-color-primary;
  1408. }
  1409. .iconenter {
  1410. font-size: $font-sm;
  1411. margin-left: 4rpx;
  1412. color: $uni-color-primary;
  1413. }
  1414. }
  1415. .c-list {
  1416. font-size: $font-sm + 2rpx;
  1417. color: #303133;
  1418. margin-top: 20rpx;
  1419. background: #fff;
  1420. .c-row {
  1421. display: flex;
  1422. align-items: center;
  1423. padding: 20rpx 30rpx;
  1424. position: relative;
  1425. .c-text {
  1426. text {
  1427. padding-left: 25rpx;
  1428. padding-right: 25rpx;
  1429. }
  1430. }
  1431. }
  1432. .tit {
  1433. width: 140rpx;
  1434. }
  1435. .con {
  1436. flex: 1;
  1437. color: $font-color-dark;
  1438. .selected-text {
  1439. margin-right: 10rpx;
  1440. }
  1441. }
  1442. .bz-list {
  1443. height: 40rpx;
  1444. font-size: $font-sm + 2rpx;
  1445. color: $font-color-dark;
  1446. text {
  1447. display: inline-block;
  1448. margin-right: 30rpx;
  1449. }
  1450. }
  1451. .con-list {
  1452. flex: 1;
  1453. display: flex;
  1454. flex-direction: column;
  1455. color: $font-color-dark;
  1456. line-height: 40rpx;
  1457. }
  1458. .red {
  1459. color: $uni-color-primary;
  1460. }
  1461. }
  1462. // 谁购买了商品
  1463. .autoPink-box {
  1464. display: flex;
  1465. align-items: center;
  1466. padding: 0 20rpx;
  1467. .auto-img {
  1468. width: 50rpx;
  1469. height: 50rpx;
  1470. border-radius: 50%;
  1471. border: 1px solid #FFFFFF;
  1472. margin-left: -10rpx;
  1473. &:first-of-type {
  1474. margin-left: 0;
  1475. }
  1476. }
  1477. .shenlue {
  1478. width: 50rpx;
  1479. height: 50rpx;
  1480. border-radius: 50%;
  1481. border: 1px solid #FFFFFF;
  1482. background: #9d9fa6;
  1483. margin-left: -10rpx;
  1484. }
  1485. .auto-text {
  1486. color: #9f9f9f;
  1487. font-size: $font-base - 2rpx;
  1488. margin-left: 10rpx;
  1489. }
  1490. }
  1491. .quan {
  1492. width: 750rpx;
  1493. height: 83rpx;
  1494. background-color: #FFFFFF;
  1495. padding: 0 24rpx;
  1496. margin: 15rpx 0;
  1497. display: flex;
  1498. align-items: center;
  1499. .quan-left {
  1500. font-size: 26rpx;
  1501. font-weight: 500;
  1502. color: #606972;
  1503. margin-right: 33rpx;
  1504. }
  1505. .img-box {
  1506. width: 90rpx;
  1507. height: 30rpx;
  1508. margin-right: 10rpx;
  1509. .quan-img {
  1510. width: 90rpx;
  1511. height: 30rpx;
  1512. }
  1513. }
  1514. .quan-center {
  1515. font-size: 26rpx;
  1516. font-weight: 500;
  1517. color: #333333;
  1518. flex: 1;
  1519. }
  1520. .quan-right {
  1521. // width: 40rpx;
  1522. // height: 40rpx;
  1523. .right-next {
  1524. width: 100%;
  1525. height: 100%;
  1526. }
  1527. }
  1528. }
  1529. /* 评价 */
  1530. .eva-section {
  1531. display: flex;
  1532. flex-direction: column;
  1533. padding: 20rpx 30rpx;
  1534. background: #fff;
  1535. margin-top: 16rpx;
  1536. .e-header {
  1537. display: flex;
  1538. align-items: center;
  1539. height: 70rpx;
  1540. font-size: $font-sm + 2rpx;
  1541. color: $font-color-light;
  1542. .tit {
  1543. font-size: $font-base + 2rpx;
  1544. color: $font-color-dark;
  1545. margin-right: 4rpx;
  1546. }
  1547. .tip {
  1548. flex: 1;
  1549. text-align: right;
  1550. }
  1551. .iconenter {
  1552. margin-left: 10rpx;
  1553. }
  1554. }
  1555. }
  1556. .eva-box {
  1557. display: flex;
  1558. padding: 20rpx 0;
  1559. .portrait {
  1560. flex-shrink: 0;
  1561. width: 80rpx;
  1562. height: 80rpx;
  1563. border-radius: 100px;
  1564. }
  1565. .right {
  1566. flex: 1;
  1567. display: flex;
  1568. flex-direction: column;
  1569. font-size: $font-base;
  1570. color: $font-color-base;
  1571. padding-left: 26rpx;
  1572. .con {
  1573. font-size: $font-base;
  1574. color: $font-color-dark;
  1575. padding: 20rpx 0;
  1576. }
  1577. .bot {
  1578. display: flex;
  1579. justify-content: space-between;
  1580. font-size: $font-sm;
  1581. color: $font-color-light;
  1582. }
  1583. }
  1584. }
  1585. .con_image {
  1586. width: 130rpx;
  1587. height: 130rpx;
  1588. display: inline-block;
  1589. padding: 15rpx;
  1590. image {
  1591. width: 100%;
  1592. height: 100%;
  1593. }
  1594. }
  1595. /* 详情 */
  1596. .detail-desc {
  1597. background: #fff;
  1598. margin-top: 16rpx;
  1599. p {
  1600. line-height: 1;
  1601. }
  1602. img {
  1603. max-width: 100%;
  1604. }
  1605. .d-header {
  1606. display: flex;
  1607. justify-content: center;
  1608. align-items: center;
  1609. height: 80rpx;
  1610. font-size: $font-base + 2rpx;
  1611. color: $font-color-dark;
  1612. position: relative;
  1613. text {
  1614. padding: 0 20rpx;
  1615. background: #fff;
  1616. position: relative;
  1617. z-index: 1;
  1618. }
  1619. &:after {
  1620. position: absolute;
  1621. left: 50%;
  1622. top: 50%;
  1623. transform: translateX(-50%);
  1624. width: 300rpx;
  1625. height: 0;
  1626. content: '';
  1627. border-bottom: 1px solid #ccc;
  1628. }
  1629. }
  1630. }
  1631. .hotgoods{
  1632. width: 100%;
  1633. display: flex;
  1634. flex-wrap: wrap;
  1635. padding: 0 32rpx 108rpx;
  1636. .hotgoods-item{
  1637. width: 48%;
  1638. background-color: #FFFFFF;
  1639. border-radius: 12rpx;
  1640. margin-bottom: 24rpx;
  1641. &:nth-child(2n + 1){
  1642. margin-right: 24rpx;
  1643. }
  1644. .image-wrapper {
  1645. width: 100%;
  1646. height: 330rpx;
  1647. border-radius: 3px;
  1648. overflow: hidden;
  1649. image {
  1650. width: 100%;
  1651. height: 100%;
  1652. opacity: 1;
  1653. border-radius: 12rpx 12rpx 0 0;
  1654. }
  1655. }
  1656. .title {
  1657. font-size: $font-base;
  1658. color: $font-color-dark;
  1659. font-weight: bold;
  1660. line-height: 80rpx;
  1661. }
  1662. .hot-price{
  1663. display: flex;
  1664. justify-content: space-between;
  1665. padding: 0 16rpx 12rpx;
  1666. .price{
  1667. font-size: 40rpx;
  1668. color: #FF0000;
  1669. font-weight: 500;
  1670. }
  1671. .cart-icon{
  1672. image{
  1673. width: 44rpx;
  1674. height: 44rpx;
  1675. }
  1676. }
  1677. }
  1678. }
  1679. }
  1680. .hotsheader{
  1681. text-align: center;
  1682. color: #FF0000;
  1683. font-size: 40rpx;
  1684. font-family: PingFang SC;
  1685. font-weight: bold;
  1686. display: flex;
  1687. justify-content: center;
  1688. align-items: center;
  1689. padding: 32rpx 0 24rpx;
  1690. }
  1691. /* 规格选择弹窗 */
  1692. .attr-content {
  1693. padding: 25rpx 30rpx;
  1694. .a-t {
  1695. display: flex;
  1696. image {
  1697. width: 170rpx;
  1698. height: 170rpx;
  1699. flex-shrink: 0;
  1700. border-radius: 8rpx;
  1701. }
  1702. .right {
  1703. display: flex;
  1704. flex-direction: column;
  1705. padding-left: 24rpx;
  1706. font-size: $font-sm + 2rpx;
  1707. color: $font-color-base;
  1708. line-height: 42rpx;
  1709. width: 75%;
  1710. .price {
  1711. font-size: $font-lg;
  1712. color: $uni-color-primary;
  1713. margin: 10rpx 0rpx;
  1714. }
  1715. .name {
  1716. font-size: 32rpx;
  1717. color: $font-color-dark;
  1718. height: 50rpx;
  1719. overflow: hidden;
  1720. text-overflow: ellipsis;
  1721. white-space: nowrap;
  1722. display: block;
  1723. }
  1724. .selected-text {
  1725. margin-right: 10rpx;
  1726. }
  1727. }
  1728. }
  1729. .attr-list {
  1730. display: flex;
  1731. flex-direction: column;
  1732. font-size: $font-base + 2rpx;
  1733. color: $font-color-base;
  1734. padding-top: 30rpx;
  1735. padding-left: 10rpx;
  1736. }
  1737. .item-list {
  1738. padding: 20rpx 0 0;
  1739. display: flex;
  1740. flex-wrap: wrap;
  1741. text {
  1742. display: flex;
  1743. align-items: center;
  1744. justify-content: center;
  1745. background: #eee;
  1746. margin-right: 20rpx;
  1747. margin-bottom: 20rpx;
  1748. border-radius: 100rpx;
  1749. min-width: 60rpx;
  1750. height: 60rpx;
  1751. padding: 0 20rpx;
  1752. font-size: $font-base;
  1753. color: #ff0000;
  1754. }
  1755. .selected {
  1756. background: #fbebee;
  1757. color: $uni-color-primary;
  1758. }
  1759. }
  1760. .num-list {
  1761. padding: 20rpx 0 0;
  1762. display: flex;
  1763. flex-wrap: wrap;
  1764. text {
  1765. display: flex;
  1766. align-items: center;
  1767. justify-content: center;
  1768. border-radius: 100rpx;
  1769. min-width: 60rpx;
  1770. height: 60rpx;
  1771. padding: 0 20rpx;
  1772. font-size: $font-base;
  1773. color: $font-color-dark;
  1774. }
  1775. }
  1776. }
  1777. /* 弹出层 */
  1778. .popup {
  1779. position: fixed;
  1780. left: 0;
  1781. top: 0;
  1782. right: 0;
  1783. bottom: 0;
  1784. z-index: 99;
  1785. &.show {
  1786. display: block;
  1787. .mask {
  1788. animation: showPopup 0.2s linear both;
  1789. }
  1790. .layer {
  1791. animation: showLayer 0.2s linear both;
  1792. }
  1793. }
  1794. &.hide {
  1795. .mask {
  1796. animation: hidePopup 0.2s linear both;
  1797. }
  1798. .layer {
  1799. animation: hideLayer 0.2s linear both;
  1800. }
  1801. }
  1802. &.none {
  1803. display: none;
  1804. }
  1805. .mask {
  1806. position: fixed;
  1807. top: 0;
  1808. left: 0;
  1809. width: 100%;
  1810. height: 100%;
  1811. z-index: 1;
  1812. background-color: rgba(0, 0, 0, 0.4);
  1813. }
  1814. .layer {
  1815. position: fixed;
  1816. z-index: 99;
  1817. bottom: 0;
  1818. width: 100%;
  1819. min-height: 35vh;
  1820. border-radius: 10rpx 10rpx 0 0;
  1821. background-color: #fff;
  1822. .btn {
  1823. height: 66rpx;
  1824. line-height: 66rpx;
  1825. border-radius: 100rpx;
  1826. background: #FF0000;
  1827. font-size: $font-base + 2rpx;
  1828. color: #fff;
  1829. margin: 30rpx auto 20rpx;
  1830. }
  1831. }
  1832. @keyframes showPopup {
  1833. 0% {
  1834. opacity: 0;
  1835. }
  1836. 100% {
  1837. opacity: 1;
  1838. }
  1839. }
  1840. @keyframes hidePopup {
  1841. 0% {
  1842. opacity: 1;
  1843. }
  1844. 100% {
  1845. opacity: 0;
  1846. }
  1847. }
  1848. @keyframes showLayer {
  1849. 0% {
  1850. transform: translateY(120%);
  1851. }
  1852. 100% {
  1853. transform: translateY(0%);
  1854. }
  1855. }
  1856. @keyframes hideLayer {
  1857. 0% {
  1858. transform: translateY(0);
  1859. }
  1860. 100% {
  1861. transform: translateY(120%);
  1862. }
  1863. }
  1864. }
  1865. //分享
  1866. .btn_fenxiang {
  1867. position: fixed;
  1868. // right: 20rpx;
  1869. right: 0;
  1870. bottom: 50%;
  1871. z-index: 95;
  1872. width: 140rpx;
  1873. height: 140rpx;
  1874. // width: 100rpx;
  1875. // color: #ffffff;
  1876. // border-radius: 100%;
  1877. // background-color: $background-color;
  1878. // line-height: 100rpx;
  1879. // text-align: center;
  1880. // font-size: 30rpx;
  1881. image {
  1882. width: 140rpx;
  1883. height: 140rpx;
  1884. }
  1885. }
  1886. .mask {
  1887. position: fixed;
  1888. top: 0;
  1889. left: 0;
  1890. width: 100%;
  1891. height: 100%;
  1892. z-index: 999;
  1893. background-color: rgba(0, 0, 0, 0.4);
  1894. image {
  1895. width: 100%;
  1896. height: 100%;
  1897. opacity: 0.8;
  1898. }
  1899. }
  1900. // 拼团协议弹窗
  1901. .xieyi-box {
  1902. position: fixed;
  1903. z-index: 998;
  1904. right: 0;
  1905. bottom: 0;
  1906. left: 0;
  1907. top: 0;
  1908. background-color: rgba(0, 0, 0, 0.4);
  1909. padding: 30rpx;
  1910. display: flex;
  1911. align-items: center;
  1912. .xieyi-frame {
  1913. background: #FFFFFF;
  1914. border-radius: 15rpx;
  1915. padding: 15rpx 0 0;
  1916. .xieyi-tit {
  1917. font-size: 40rpx;
  1918. font-weight: bold;
  1919. text-align: center;
  1920. }
  1921. .xieyi-text {
  1922. padding: 20rpx 30rpx;
  1923. font-size: 30rpx;
  1924. }
  1925. .xieyi-btn-box {
  1926. margin-top: 20rpx;
  1927. display: flex;
  1928. .xieyi-btn {
  1929. width: 50%;
  1930. height: 80rpx;
  1931. display: flex;
  1932. align-items: center;
  1933. justify-content: center;
  1934. border-bottom-left-radius: 15rpx;
  1935. background: #ffaa00;
  1936. color: #FFFFFF;
  1937. }
  1938. .queding {
  1939. border-bottom-left-radius: 0;
  1940. border-bottom-right-radius: 15rpx;
  1941. background: #03A9F4;
  1942. }
  1943. }
  1944. }
  1945. }
  1946. // 分享遮罩层
  1947. .pop-mask {
  1948. position: fixed;
  1949. z-index: 9999;
  1950. right: 0;
  1951. bottom: 0;
  1952. left: 0;
  1953. top: 0;
  1954. background-color: rgba(0, 0, 0, 0.4);
  1955. padding: 60rpx;
  1956. .share-img {
  1957. width: 100%;
  1958. height: 100%;
  1959. }
  1960. }
  1961. .shareDate {
  1962. position: fixed;
  1963. right: 0;
  1964. bottom: 50%;
  1965. z-index: 95;
  1966. width: 140rpx;
  1967. height: 140rpx;
  1968. // color: #ffffff;
  1969. // border-radius: 100%;
  1970. // width: 120rpx;
  1971. // height: 120rpx;
  1972. // line-height: 120rpx;
  1973. // background-color: $background-color;
  1974. // text-align: center;
  1975. // font-size: 30rpx;
  1976. image {
  1977. width: 140rpx;
  1978. height: 140rpx;
  1979. }
  1980. }
  1981. /* 底部操作菜单 */
  1982. .page-bottom {
  1983. position: fixed;
  1984. left: 0;
  1985. bottom: 0;
  1986. z-index: 95;
  1987. display: flex;
  1988. justify-content: center;
  1989. align-items: center;
  1990. width: 100%;
  1991. height: 100rpx;
  1992. background: rgba(255, 255, 255, 1);
  1993. box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
  1994. // border-radius: 16rpx;
  1995. .kefu-mp {
  1996. padding: 0;
  1997. background: 0;
  1998. &::after {
  1999. border: 0;
  2000. }
  2001. }
  2002. .p-b-btn {
  2003. display: flex;
  2004. flex-direction: column;
  2005. align-items: center;
  2006. justify-content: center;
  2007. font-size: $font-sm;
  2008. color: $font-color-base;
  2009. width: 180rpx;
  2010. height: 100rpx;
  2011. // padding-left: 15rpx;
  2012. .kefu-btn {
  2013. width: 36rpx;
  2014. height: 35rpx;
  2015. margin-bottom: 8rpx;
  2016. }
  2017. .iconfont {
  2018. font-size: 40rpx;
  2019. line-height: 48rpx;
  2020. color: $font-color-light;
  2021. }
  2022. &.active,
  2023. &.active .iconfont {
  2024. color: #ff0000;
  2025. }
  2026. .icon-fenxiang2 {
  2027. font-size: 42rpx;
  2028. transform: translateY(-2rpx);
  2029. }
  2030. .iconlikefill {
  2031. font-size: 46rpx;
  2032. }
  2033. }
  2034. .gobuy {
  2035. width: 100%;
  2036. background: #db1935;
  2037. height: 100%;
  2038. color: #ffffff;
  2039. text-align: center;
  2040. padding-top: 25rpx;
  2041. // border-radius: 15rpx;
  2042. }
  2043. .primary-text {
  2044. display: flex;
  2045. height: 100%;
  2046. flex-direction: column;
  2047. align-items: center;
  2048. justify-content: center;
  2049. line-height: 1.7;
  2050. }
  2051. .pt-btn-group {
  2052. margin-left: 0 !important;
  2053. width: 100%;
  2054. }
  2055. .action-btn-group {
  2056. display: flex;
  2057. height: 100%;
  2058. overflow: hidden;
  2059. margin-left: 20rpx;
  2060. position: relative;
  2061. // border-top-right-radius: 15rpx;
  2062. // border-bottom-right-radius: 15rpx;
  2063. &:after {
  2064. content: '';
  2065. position: absolute;
  2066. top: 50%;
  2067. right: 50%;
  2068. transform: translateY(-50%);
  2069. height: 28rpx;
  2070. width: 0;
  2071. // border-right: 1px solid rgba(255, 255, 255, 0.5);
  2072. }
  2073. .action-btn {
  2074. display: flex;
  2075. align-items: center;
  2076. justify-content: center;
  2077. width: 540rpx;
  2078. height: 100%;
  2079. font-size: $font-base;
  2080. padding: 0;
  2081. border-radius: 0;
  2082. background: transparent;
  2083. &.buy-now-btn {
  2084. background-color: #ffb238;
  2085. }
  2086. &.add-cart-btn {
  2087. background-color: #DF3525;
  2088. }
  2089. &.btn-favorites-btn {
  2090. background-color: rgba(24, 179, 255, 1);
  2091. }
  2092. }
  2093. .action-btn1 {
  2094. display: flex;
  2095. align-items: center;
  2096. justify-content: center;
  2097. width: 580rpx;
  2098. height: 100%;
  2099. font-size: $font-base;
  2100. padding: 0;
  2101. border-radius: 0;
  2102. background: transparent;
  2103. &.buy-now-btn {
  2104. // background-color: #ffb238;
  2105. background: linear-gradient(90deg, #454545, #666666);
  2106. }
  2107. &.add-cart-btn {
  2108. background-color: #FF0000;
  2109. // background: linear-gradient(90deg, #FE8119, #FF4E00);
  2110. }
  2111. }
  2112. }
  2113. }
  2114. //拼团列表
  2115. .pinklistbox1 {
  2116. padding: 15rpx 15rpx;
  2117. background: #ffffff;
  2118. text-align: center;
  2119. font-size: 26rpx;
  2120. margin-top: 25rpx;
  2121. }
  2122. .pinklistbox {
  2123. background: #ffffff;
  2124. margin-top: 25rpx;
  2125. overflow: hidden;
  2126. }
  2127. .pink_num {
  2128. background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
  2129. padding: 15rpx 25rpx;
  2130. font-size: 26rpx;
  2131. color: #DC442C;
  2132. }
  2133. .pint {
  2134. // background: -webkit-linear-gradient(left, #ff1f4f, #ff0409);
  2135. background: #DF3525;
  2136. padding: 10rpx 25rpx;
  2137. color: #ffffff;
  2138. font-size: 24rpx;
  2139. border-radius: 25rpx;
  2140. .iconenter {
  2141. font-size: 15px;
  2142. color: #ffffff;
  2143. }
  2144. }
  2145. .pinklist {
  2146. padding: 0rpx 25rpx;
  2147. padding-top: 45rpx !important;
  2148. }
  2149. .pink_img {
  2150. width: 100rpx;
  2151. height: 100rpx;
  2152. image {
  2153. width: 100%;
  2154. height: 100%;
  2155. border-radius: 100%;
  2156. }
  2157. }
  2158. .pink_people {
  2159. font-size: 28rpx;
  2160. text {
  2161. color: #dd524d;
  2162. }
  2163. }
  2164. .pink_time {
  2165. font-size: 26rpx;
  2166. color: #909399;
  2167. }
  2168. .pink_name {
  2169. width: 200rpx;
  2170. overflow: hidden;
  2171. white-space: nowrap;
  2172. text-overflow: ellipsis;
  2173. padding-left: 10rpx;
  2174. // background: #FC2A3F;
  2175. // height: 50rpx;
  2176. }
  2177. .More {
  2178. width: 100%;
  2179. line-height: 2;
  2180. background-color: #DF3525;
  2181. font-size: $font-lg;
  2182. margin: 0 auto;
  2183. text-align: center;
  2184. color: #ffffff;
  2185. // border-radius: 50rpx;
  2186. }
  2187. .Shraremask {
  2188. position: fixed;
  2189. left: 0;
  2190. top: 0;
  2191. right: 0;
  2192. bottom: 0;
  2193. display: flex;
  2194. justify-content: center;
  2195. align-items: flex-end;
  2196. z-index: 998;
  2197. transition: 0.3s;
  2198. background-color: rgba(51, 51, 51, 0.6);
  2199. .bottomButtom {
  2200. position: absolute;
  2201. left: 0;
  2202. bottom: 0;
  2203. display: flex;
  2204. justify-content: center;
  2205. align-items: center;
  2206. width: 100%;
  2207. height: 90rpx;
  2208. background: #fff;
  2209. z-index: 9;
  2210. font-size: $font-base + 2rpx;
  2211. color: $font-color-dark;
  2212. }
  2213. }
  2214. .mask-content {
  2215. width: 100%;
  2216. height: 380rpx;
  2217. transition: 0.3s;
  2218. background: #fff;
  2219. &.has-bottom {
  2220. padding-bottom: 90rpx;
  2221. }
  2222. .view-content {
  2223. height: 100%;
  2224. }
  2225. }
  2226. .share-header {
  2227. height: 110rpx;
  2228. font-size: $font-base + 2rpx;
  2229. color: font-color-dark;
  2230. display: flex;
  2231. align-items: center;
  2232. justify-content: center;
  2233. padding-top: 10rpx;
  2234. &:before,
  2235. &:after {
  2236. content: '';
  2237. width: 240rpx;
  2238. heighg: 0;
  2239. border-top: 1px solid $border-color-base;
  2240. transform: scaleY(0.5);
  2241. margin-right: 30rpx;
  2242. }
  2243. &:after {
  2244. margin-left: 30rpx;
  2245. margin-right: 0;
  2246. }
  2247. }
  2248. .share-list {
  2249. display: flex;
  2250. width: 80%;
  2251. margin: 0rpx auto;
  2252. }
  2253. .share-item {
  2254. min-width: 33.33%;
  2255. display: flex;
  2256. justify-content: center;
  2257. align-items: center;
  2258. height: 180rpx;
  2259. width: 100%;
  2260. .wechat-box {
  2261. width: 50%;
  2262. height: 100%;
  2263. background: #ffffff;
  2264. border: 0;
  2265. display: flex;
  2266. align-items: center;
  2267. flex-direction: column;
  2268. &::after {
  2269. border: 0;
  2270. }
  2271. .itemImage {
  2272. width: 80rpx;
  2273. height: 80rpx;
  2274. margin-bottom: 16rpx;
  2275. }
  2276. .itemText {
  2277. font-size: $font-base;
  2278. color: $font-color-base;
  2279. line-height: 2;
  2280. }
  2281. }
  2282. }
  2283. .pop-box {
  2284. width: 750rpx;
  2285. background: #F8F6F6;
  2286. z-index: 999;
  2287. border-radius: 10rpx 10rpx 0px 0px;
  2288. .pop-top {
  2289. display: flex;
  2290. align-items: center;
  2291. padding: 35rpx 30rpx 45rpx 60rpx;
  2292. .top-center {
  2293. font-size: 32rpx;
  2294. font-weight: bold;
  2295. color: #333333;
  2296. text-align: center;
  2297. flex: 1;
  2298. }
  2299. .top-right {
  2300. width: 30rpx;
  2301. height: 30rpx;
  2302. .right-img {
  2303. width: 30rpx;
  2304. height: 30rpx;
  2305. }
  2306. }
  2307. }
  2308. .scroll-h {
  2309. max-height: 956rpx;
  2310. }
  2311. .pop-center {
  2312. padding-bottom: 20rpx;
  2313. .pop-item {
  2314. width: 693rpx;
  2315. height: 170rpx;
  2316. background: #FFFFFF;
  2317. border: 1px solid #DFEDE4;
  2318. border-radius: 10rpx;
  2319. margin: 0rpx auto 20rpx;
  2320. display: flex;
  2321. &:last-of-type {
  2322. margin: 0rpx auto 0rpx;
  2323. }
  2324. .item-left {
  2325. width: 195rpx;
  2326. height: 170rpx;
  2327. background: #FDEFEF;
  2328. border-right: 1px solid #FFD8D8;
  2329. text-align: center;
  2330. padding-top: 28rpx;
  2331. .pic {
  2332. font-size: 28rpx;
  2333. font-weight: bold;
  2334. color: #FC6168;
  2335. }
  2336. .pic-info {
  2337. font-size: 22rpx;
  2338. font-weight: 500;
  2339. color: #FC6168;
  2340. }
  2341. }
  2342. .item-right {
  2343. flex: 1;
  2344. display: flex;
  2345. // align-items: center;
  2346. padding-right: 20rpx;
  2347. .right-left {
  2348. padding: 33rpx 0rpx 0 18rpx;
  2349. flex: 1;
  2350. .top {
  2351. font-size: 30rpx;
  2352. font-weight: bold;
  2353. color: #333333;
  2354. margin-bottom: 5rpx;
  2355. }
  2356. .center {
  2357. font-size: 22rpx;
  2358. font-weight: 500;
  2359. color: #999999;
  2360. margin-bottom: 5rpx;
  2361. }
  2362. .foot {
  2363. font-size: 22rpx;
  2364. font-weight: 500;
  2365. color: #999999;
  2366. }
  2367. }
  2368. .right-right {
  2369. width: 120rpx;
  2370. height: 46rpx;
  2371. background: #FC6168;
  2372. border-radius: 23rpx;
  2373. font-size: 22rpx;
  2374. font-weight: 500;
  2375. color: #FFFFFF;
  2376. display: flex;
  2377. justify-content: center;
  2378. align-items: center;
  2379. margin: auto;
  2380. }
  2381. }
  2382. }
  2383. }
  2384. }
  2385. </style>