productCollage.vue 43 KB

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