productCollage.vue 43 KB

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