puzzleGoods.vue 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304
  1. <template>
  2. <view class="container">
  3. <navbar :config="config" backColor="#666"></navbar>
  4. <view id="page-top">
  5. <view class="product">
  6. <view class="u-bg-fff pb40">
  7. <view class="pic">
  8. <!-- <image src="../../../static/delImg/product2.png" mode="aspectFill"></image> -->
  9. <swiper class="swiper" indicator-dots="true" autoplay="true" interval="5000" duration="1500"
  10. circular="true">
  11. <swiper-item v-if="dataForm.video_url">
  12. <!-- <video :src="dataForm.video_url"></video> -->
  13. <j-video class="jvideo" :url="dataForm.video_url" width="750rpx" height="620rpx"></j-video>
  14. </swiper-item>
  15. <swiper-item v-for="(item, index) in imglist" :key="index">
  16. <image :src="item" mode="aspectFill"></image>
  17. </swiper-item>
  18. </swiper>
  19. <view class="p-price">
  20. <view class="pd24 u-flex-center" style="align-items: baseline;">
  21. <view class="u-FFF u-font36"><rich-text
  22. :nodes="$mUtil.priceBigSmallTwo(dataForm.min_price)"></rich-text></view>
  23. <text class="discount u-font24 u-ml20 u-del">¥{{ dataForm.max_sale_price }}</text>
  24. <!-- <text class="discount u-font24 u-ml15">{{ dataForm.discount }}折</text> -->
  25. <!-- #DCCDA4 -->
  26. <view v-if="dataForm.group_people_num > 0">
  27. <text
  28. style="font-size: 22rpx;font-weight: 500; color: #FA6138;padding: 3rpx 14rpx;margin-left: 18rpx;background-color: #DCCDA4;border-radius: 20rpx;">
  29. {{ dataForm.group_people_num }}人拼
  30. </text>
  31. </view>
  32. </view>
  33. <view class="p-ab u-flex-center">
  34. <view class="triangle-bottomright"></view>
  35. <view class="seckill u-text-center u-font28">
  36. <!-- active_state 0:未开始 * 1:进行中 * 2:已结束 -->
  37. <view class="u-bold" style="padding: 20rpx;" v-if="dataForm.active_state == 2">已结束</view>
  38. <view class="u-bold" v-if="dataForm.active_state == 1">距结束</view>
  39. <view class="u-bold" v-if="dataForm.active_state == 0">离开抢</view>
  40. <view v-show="dataForm.active_state != 2 && !selectGroup">
  41. <uni-countdown :backgroundColor="'none'" @timeup="overDown2" :color="'#3775F6'"
  42. :splitorColor="'#3775F6'" :show-day="time1[0] > 0" :day="time1[0]" :hour="time1[1]"
  43. :minute="time1[2]" :second="time1[3]"></uni-countdown>
  44. </view>
  45. <view v-show="dataForm.active_state != 2 && selectGroup">
  46. <uni-countdown :backgroundColor="'none'" :color="'#3775F6'" :splitorColor="'#3775F6'"
  47. :show-day="time2[0] > 0" :day="time2[0]" :hour="time2[1]" :minute="time2[2]"
  48. :second="time2[3]"></uni-countdown>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="mt10 u-plr30">
  54. <view>
  55. <view class="tipsStatus" v-if="shop.platform_shop">自营</view>
  56. <text class="u-font34 u-bold u-1A1A1A">{{ dataForm.title }}</text>
  57. </view>
  58. <view class="u-font24 u-mt15 u-999">
  59. <text>
  60. 已售
  61. <text class="u-FF0000">{{ dataForm.result_sale_num }}</text>
  62. 件,仅剩
  63. <text class="u-FF0000">{{ dataForm.residue_stock_total }}</text>
  64. </text>
  65. </view>
  66. <!--优惠-->
  67. <!-- <view
  68. class="bg-FFF6EE pd20 u-mt20 u-flex-center br-rd10"
  69. v-if="shopDiscounts.is_use == true"
  70. >
  71. <view class="u-FF0000 br-FF0000 u-font24">首单优惠</view>
  72. <view class="u-ml15 u-font24 u-CA7E57"
  73. >满{{ shopDiscounts.full }}元减{{
  74. shopDiscounts.reduction
  75. }}元</view
  76. >
  77. </view> -->
  78. </view>
  79. </view>
  80. </view>
  81. <!--拼团-->
  82. <view class="u-bg-fff u-mt10" v-if="teamlist && teamlist.length > 0 && !selectGroup">
  83. <view class="u-border-one">
  84. <view class="u-plr30 pt-pb30 border u-flex-center-sb">
  85. <view class="u-font28 u-1A1A1A">{{ teamlist.length }}人的拼单,可直接参与</view>
  86. <view class="u-999 u-font24" @click="goGb">
  87. 更多拼团
  88. <text class="iconfont u-ml15">&#xe6c7;</text>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="stb-list">
  93. <view class="stb-item u-plr30" style="display: flex; justify-content: space-between;"
  94. v-for="(item, index) in teamlist" :key="item.id">
  95. <view class=" pt20-pb14" style="width: 100%;" v-if="index < 4">
  96. <view class="u-flex-center">
  97. <image v-if="item.leader_user_info.head_photo" class="u-avatar65"
  98. :src="item.leader_user_info.head_photo"></image>
  99. <image v-else class="u-avatar65" src="/static/default-avatar.png" mode=""></image>
  100. <view class="u-flex u-ml25" style="display: flex;justify-content: space-around; width: 100%;">
  101. <view style="display: flex; flex-direction: column; flex: 1;">
  102. <view class="u-font24 u-1A1A1A u-text-width">{{ item.leader_user_info.nickname }}</view>
  103. <view class="u-font24 u-flex-start" style="display: flex; align-items: center">
  104. <text class="u-707070">剩余</text>
  105. <view class="u-FF0000">
  106. <uni-countdown :backgroundColor="'none'" :color="'#FF0000'" :splitorColor="'#FF0000'"
  107. :show-day="item.time[0] > 0" :day="item.time[0]" :hour="item.time[1]" :minute="item.time[2]"
  108. :second="item.time[3]" @timeup="overDown2"></uni-countdown>
  109. </view>
  110. </view>
  111. </view>
  112. <view style="display: flex; align-items: flex-start;">
  113. <view class="u-font24 u-1A1A1A" style="margin-right: 30rpx;">
  114. 还差
  115. <text class="u-FF0000">{{ item.group_person_number - item.member_user_infos.length }}</text>
  116. 人拼成
  117. </view>
  118. <view class="u-FFF stb-btn u-font24" style="flex: 1;margin-top: 12rpx;"
  119. @click="gogroup(item)">去拼单</view>
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. <view class="u-bg-fff u-mt10">
  128. <view class="u-plr30 u-flex-center-sb pt-pb35">
  129. <view class="u-flex-center">
  130. <view @click="goShop">
  131. <image class="u-avatar104" :src="shop.logo"></image>
  132. </view>
  133. <view class="u-ml25">
  134. <view class="u-font28 u-1A1A1A u-bold">{{ shop.shop_name }}</view>
  135. <view class="u-999 u-font24 u-mt5 u-text2" @click="goLocal">
  136. <text class="iconfont" style="color: #FA6138;">&#xe6db;</text>
  137. {{ shop.province_name }}{{ shop.city_name }}{{ shop.area_name }}{{ shop.address }}
  138. </view>
  139. </view>
  140. </view>
  141. <view class="iconfont" @click="goShop">&#xe6c7;</view>
  142. </view>
  143. </view>
  144. </view>
  145. <view class="u-bg-fff u-mt10">
  146. <view class="tab u-flex-center-sa u-font30 u-1A1A1A u-border-one-one"
  147. :style="`top: calc(${statusBarHeight}px + 44px)`">
  148. <view @tap="change(0)" class="pb30" :class="{ active: isChecked == 0 }">商品详情</view>
  149. <view @tap="change(1)" class="pb30" :class="{ active: isChecked == 1 }">用户评论({{ commentList.length }})</view>
  150. </view>
  151. <view class="u-mt10">
  152. <!--商品详情-->
  153. <view v-if="isChecked == 0">
  154. <view class="richText ql-editor-box">
  155. <rich-text :nodes="goodsInfo.mobile_detail"></rich-text>
  156. <!-- <jyf-parser :html="$mUtil.formatRichText(goodsInfo.mobile_detail)" ref="article"></jyf-parser> -->
  157. </view>
  158. </view>
  159. <!--评论-->
  160. <view class="u-plr30" v-else>
  161. <comment :value="commentList"></comment>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. <view style="height:170rpx;background-color:white"></view>
  167. <view class="bottom-btn u-bg-fff">
  168. <view class="pt-pb30 u-plr30 u-flex-center-sb">
  169. <button @click="share" class="u-text-center" style="line-height: normal">
  170. <view class="iconfont2 u-font44 u-999">&#xe684;</view>
  171. <view class="u-font28 u-1A1A1A">分享</view>
  172. </button>
  173. <!-- 两个按钮 -->
  174. <view class="u-flex-center" v-if="!selectGroup" >
  175. <button class="gb-btn btn-bg-dccda4 u-00321E btn-bg-dccda4-48" @click="goProduct(dataForm.goods_id)">
  176. <view>
  177. <view class="u-font36 u-bold"><rich-text
  178. :nodes="$mUtil.priceBigSmall(dataForm.min_sale_price)"></rich-text></view>
  179. </view>
  180. <view class="u-font22">单独购买</view>
  181. </button>
  182. <button v-if="dataForm.active_state == 1" class="gb-btn btn-bg-00320E u-DCCDA4 btn-bg-dccda4-482"
  183. @click="buy(1, dataForm.id)">
  184. <view>
  185. <view class="u-font36 u-bold"><rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_price)"></rich-text>
  186. </view>
  187. </view>
  188. <view class="u-font22">发起拼团</view>
  189. </button>
  190. <button v-if="dataForm.active_state == 0" class="gb-btn btn-bg-00320E u-DCCDA4 btn-bg-dccda4-482"
  191. @click="notStarted()">
  192. <view>
  193. <view class="u-font36 u-bold"><rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_price)"></rich-text>
  194. </view>
  195. </view>
  196. <view class="u-font22">发起拼团</view>
  197. </button>
  198. <button v-if="dataForm.active_state == 2" class="gb-btn btn-bg-00320E u-DCCDA4 btn-bg-dccda4-482"
  199. @click="itSover()">
  200. <view>
  201. <view class="u-font36 u-bold"><rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_price)"></rich-text>
  202. </view>
  203. </view>
  204. <view class="u-font22">发起拼团</view>
  205. </button>
  206. </view>
  207. <!-- 三个按钮 -->
  208. <view class="u-flex-center" v-if="selectGroup">
  209. <button class="gb-btn btn-bg-dccda4 u-00321E" @click="goProduct(dataForm.goods_id)">
  210. <view>
  211. <view class="u-font36 u-bold"><rich-text
  212. :nodes="$mUtil.priceBigSmall(dataForm.min_sale_price)"></rich-text></view>
  213. </view>
  214. <view class="u-font22 font11">单独购买</view>
  215. </button>
  216. <button class="gb-btn btn-bg-00320E u-DCCDA4" @click="groupGoBuy">
  217. <view>
  218. <view class="u-font36 u-bold"><rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_price)"></rich-text>
  219. </view>
  220. </view>
  221. <view class="u-font22">发起拼团</view>
  222. </button>
  223. <button class="gb-btn btn-bg-dccda4 u-00321E" @click="goGdProduct(dataForm.goods_id)">
  224. <view>
  225. <view class="u-font36 u-bold"><rich-text :nodes="$mUtil.priceBigSmall(dataForm.min_price)"></rich-text>
  226. </view>
  227. </view>
  228. <view class="u-font22">去拼团</view>
  229. </button>
  230. </view>
  231. </view>
  232. </view>
  233. <!--规格-->
  234. <uniPopup type="bottom" ref="specOpen" :touchmove="true">
  235. <view class="u-bg-fff spec">
  236. <view class="u-plr30 flex-sb u-border-one-one pb30">
  237. <view class="u-flex-center">
  238. <image class="u-goods200" :src="choseConfig.cover ? choseConfig.cover : cover"></image>
  239. <view class="u-ml20">
  240. <view class="u-999 u-font24 price-zhe">
  241. <view class="u-FF0000 u-font36"><rich-text
  242. :nodes="$mUtil.priceBigSmall(choseConfig.activity_price ? choseConfig.activity_price : moPrice)"></rich-text>
  243. </view>
  244. <text
  245. class="u-del u-ml15">¥{{ choseConfig.market_price ? choseConfig.market_price : moDelPrice }}</text>
  246. <!-- <text class="u-ml10">{{ dataForm.discount }}折</text> -->
  247. </view>
  248. <view class="u-font22 u-999 u-mt5">
  249. 活动库存 {{ stock }} 件
  250. <text
  251. class="u-ml30">商品库存{{ choseConfig.able_stock ? choseConfig.able_stock : goods_total_stock }}件</text>
  252. </view>
  253. <view class="u-font22 u-999 u-mt5"><!-- 商品库存 {{goods_total_stock}}件 --></view>
  254. <view class="u-1A1A1A u-mt25">{{ choseConfig.sku_set_name ? choseConfig.sku_set_name : '请选择' }}</view>
  255. </view>
  256. </view>
  257. <view class="iconfont u-999 closeIcon" @click="specOpenClose">&#xe612;</view>
  258. </view>
  259. <view>
  260. <view class="content">
  261. <scroll-view scroll-y="true">
  262. <view class="">
  263. <view class="u-mt30 bottom-bor" v-for="(item, index) in skuTab" :key="item.head.id">
  264. <view class="u-plr30">{{ item.head.name }}</view>
  265. <view class="u-mt20 u-border-one-one pb30">
  266. <view class="u-plr30 u-flex u-flex-warp">
  267. <view class="spec-item" :class="childrenItem.flag ? 'activeColor' : ''"
  268. @click="chonseSku(index, childrenItem.id)" v-for="childrenItem in item.values"
  269. :key="childrenItem.id">
  270. {{ childrenItem.name }}
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. </scroll-view>
  277. </view>
  278. <view class="u-plr30 u-mt30">
  279. <view class="u-flex-center-sb">
  280. <view>购买数量</view>
  281. <view class="u-flex-center">
  282. <view class="iconfont minus" @click="resNum">&#xe60b;</view>
  283. <view class="num">{{ add_num }}</view>
  284. <view class="iconfont plus-sign" @click="addNum">&#xe686;</view>
  285. </view>
  286. </view>
  287. <view class="specOpen-btn">
  288. <view v-if="btnType == 0"><button class="u-btn-two" @click="btnBuy(btnType)">立即购买</button></view>
  289. <view v-else><button class="u-btn-two" @click="btnBuy(btnType)">立即购买</button></view>
  290. </view>
  291. </view>
  292. </view>
  293. </view>
  294. </uniPopup>
  295. <!--更多拼团-->
  296. <uniPopup type="center" backgroundColor="transparent" ref="gbOpen">
  297. <view class="iconfont u-text-right u-font40 u-FFF" @click="gbClose">&#xe603;</view>
  298. <view class="u-bg-D5C49B u-mt30 br-rd20">
  299. <view class="br-284534">
  300. <view class="u-text-center gb-te">正在拼团</view>
  301. </view>
  302. <view class="gb-list pb50">
  303. <view class="gb-item u-plr30" v-for="item in teamlist" :key="item.id">
  304. <view class="u-flex-center-sb br-284534 pt28-pb18">
  305. <view class="u-flex-center u-00321E">
  306. <image class="u-avatar65" v-if="item.leader_user_info.head_photo"
  307. :src="item.leader_user_info.head_photo"></image>
  308. <!-- <image class="u-avatar65" v-else :src="imgUrl + '/head-on.png'" mode=""></image> -->
  309. <image class="u-avatar65" v-else src="/static/default-avatar.png" mode=""></image>
  310. <view class="u-ml25">
  311. <view class="u-font28 u-text-width ">{{ item.leader_user_info.nickname }}</view>
  312. <view class="u-font20 per-num">
  313. <div class="u-font24 u-flex-center">
  314. <text>还差</text>
  315. <text class="u-FF0000">{{ item.group_person_number - item.member_user_infos.length }}</text>
  316. <text>人拼成</text>
  317. </div>
  318. <view class="u-flex-start u-font24 u-flex-center" style="display: flex">
  319. <view class="u-00321E u-ml20 u-font24">剩余</view>
  320. <view class="u-FF0000">
  321. <uni-countdown :backgroundColor="'none'" :color="'#FF0000'" :splitorColor="'#FF0000'"
  322. :show-day="item.time[0] > 0" :day="item.time[0]" :hour="item.time[1]" :minute="item.time[2]"
  323. :second="item.time[3]" @timeup="overDown2"></uni-countdown>
  324. </view>
  325. </view>
  326. </view>
  327. </view>
  328. </view>
  329. <view class="u-FFF stb-btn u-font24 ml54" @click="gogroup(item)">我要参团</view>
  330. </view>
  331. </view>
  332. </view>
  333. </view>
  334. </uniPopup>
  335. <!--页面加载动画-->
  336. <ldLoading isFullScreen :active="loading"></ldLoading>
  337. <share ref="shares" :contentHeight="580" v-if="isvisible"></share>
  338. </view>
  339. </template>
  340. <script>
  341. import uniPopup from '../../../components/uni-popup/uni-popup.vue';
  342. import comment from '../../../components/ld-comment/ld-comment.vue';
  343. import jyfParser from '../../../components/jyf-parser/jyf-parser';
  344. import share from './../../public/share';
  345. import jVideo from '../../../components/j-video/j-video.vue';
  346. export default {
  347. components: {
  348. uniPopup,
  349. comment,
  350. jyfParser,
  351. share,
  352. jVideo
  353. },
  354. data() {
  355. return {
  356. //手机状态栏高度
  357. statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
  358. config: {
  359. back: true, //false是tolbar页面 是则不写
  360. title: '商品详情',
  361. color: '#1a1a1a',
  362. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  363. backgroundColor: [1, '#fff'],
  364. statusBarFontColor: '#FFFFFF'
  365. // backTabPage: "",
  366. // leftSlot:true
  367. },
  368. imglist: [], //详情图片数组
  369. goods_total_stock: null,
  370. isChecked: 0,
  371. btnName: '',
  372. btnType: '', //0 购物车,1 立即购买
  373. dataForm: {}, //商品详情
  374. shop: {}, //店铺信息
  375. shopDiscounts: {}, //店铺首单优惠
  376. stock: 0,
  377. cover: '',
  378. loading: true,
  379. moDelPrice: '',
  380. moPrice: '',
  381. goodsSkuList: [], //sku组合值
  382. skuTab: [], //sku二位数组
  383. goods_id: null,
  384. limit_buy_num: 0,
  385. choseConfig: {},
  386. hasId: '',
  387. add_num: 1,
  388. goStatus: 0, //0:购物车,1下单
  389. shop_id: 0,
  390. commentList: [],
  391. goodsInfo: {},
  392. time1: [0, 0, 0, 0],
  393. time2: [0, 0, 0, 0],
  394. teamlist: [],
  395. selectGroup: null,
  396. show: false,
  397. teamId: null,
  398. isvisible: false,
  399. id: null,
  400. timetwo: null,
  401. // imgUrl: this.$mConfig.staticUrl,
  402. fromShare: false // 是否分享过来的页面
  403. };
  404. },
  405. onShow() {
  406. var pages = getCurrentPages();
  407. var prevPage = pages[pages.length - 2];
  408. if (prevPage == undefined) {
  409. // this.config.backTabPage = "/pages/research/homepage/lidaPage";
  410. }
  411. },
  412. onLoad(options) {
  413. //当用户进来有缓存店铺
  414. this.id = options.id;
  415. //店铺推荐(商品)
  416. if (options.id) {
  417. this.getDetailInfo(options.id);
  418. }
  419. if (options.teamId) {
  420. this.teamId = options.teamId;
  421. // this.getTime(options.teamId)
  422. // console.log("团队信息"+this.teamId)
  423. }
  424. if (options.shareId) {
  425. this.recordSave(options.shareId, options.id);
  426. }
  427. if (options.share == 1) {
  428. this.fromShare = true;
  429. }
  430. },
  431. onShareAppMessage(res) {
  432. // debugger
  433. // console.log(`id=${this.dataForm.id}&Sshopid=${this.shop_id}&teamId=${this.selectGroup.id}`, )
  434. let that = this;
  435. if (res.from === 'button') {
  436. // 来自页面内分享按钮
  437. console.log(res.target);
  438. }
  439. return {
  440. title: that.shareTitle,
  441. imageUrl: that.shareImg,
  442. path: `/pages/product/goods/puzzleGoods?id=${that.dataForm.id}&Sshopid=${that.shop_id}&teamId=${that.teamId}&share=1`
  443. };
  444. },
  445. methods: {
  446. iconBtn() {
  447. if (this.fromShare) {
  448. uni.redirectTo({
  449. url: '/pages/index/home'
  450. });
  451. } else {
  452. uni.navigateBack();
  453. }
  454. },
  455. notStarted() {
  456. this.$mUtil.toast('活动尚未开始');
  457. },
  458. itSover() {
  459. this.$mUtil.toast('活动已结束');
  460. },
  461. goLocal() {
  462. uni.openLocation({
  463. latitude: Number(this.shop.tx_latitude),
  464. longitude: Number(this.shop.tx_longitude),
  465. name: this.shop.name,
  466. address: this.shop.address,
  467. success: function() {
  468. console.log('success');
  469. }
  470. });
  471. },
  472. goShop() {
  473. uni.navigateTo({
  474. url: '/pages/research/homepage/shopHomepage?shopId=' + this.shop_id
  475. });
  476. },
  477. recordSave(share_user_id, goods_id) {
  478. this.$http
  479. .post('/share/record/save', {
  480. share_user_id: share_user_id,
  481. goods_id: goods_id
  482. })
  483. .then(res => {});
  484. },
  485. share() {
  486. this.isvisible = false
  487. let token = uni.getStorageSync("apiToken");
  488. if (!token) {
  489. uni.navigateTo({
  490. url: '/pages/login/index'
  491. });
  492. } else {
  493. // console.log(`id=${this.dataForm.id}&Sshopid=${this.shop_id}&teamId=${this.selectGroup.id}`, 123)
  494. let user = uni.getStorageSync('personal');
  495. this.isvisible = true;
  496. this.$nextTick(() => {
  497. this.$refs.shares.shareInfo('/?pageType=1&type=3&id=' + this.dataForm.id + '&shareId=' + user.id,
  498. 'pages/down', this.dataForm.title, '', this.dataForm.cover);
  499. });
  500. }
  501. },
  502. /**发起拼团 */
  503. groupGoBuy() {
  504. this.selectGroup = null;
  505. this.getTeam();
  506. },
  507. getTime(id) {
  508. this.$http.get(`/groupbuy/team/info/${id}`).then(res => {
  509. if (res && res.code == 200) {
  510. this.time2 = this.$mUtil
  511. .countDown(Math.floor(res.data.count_down_end_time))
  512. .split(':')
  513. .map(val => Number(val));
  514. console.log(this.time2, 123);
  515. }
  516. });
  517. },
  518. /**去拼团 */
  519. gogroup(item) {
  520. this.$refs.gbOpen.close();
  521. this.btnType = 1;
  522. //1
  523. // uni.navigateTo({
  524. // url:"./puzzleGoodsInfo?id="+this.id+"&groupid="+item.id
  525. // })
  526. //2
  527. this.$http.get(`/groupbuy/team/info/${item.id}`).then(res => {
  528. if (res && res.code == 200) {
  529. this.time2 = this.$mUtil
  530. .countDown(Math.floor(res.data.count_down_end_time))
  531. .split(':')
  532. .map(val => Number(val));
  533. console.log(this.time2, 123);
  534. }
  535. });
  536. //3
  537. this.selectGroup = item;
  538. // console.log(item)
  539. // this.time2 = this.$mUtil
  540. // .countDown(Math.floor(this.selectGroup.end_time / 1000))
  541. // .split(":").map(val=>Number(val));
  542. // this.checkSku(item.group_buy_goods_id);
  543. },
  544. goGdProduct() {
  545. this.checkSku(this.selectGroup.group_buy_goods_id);
  546. },
  547. overDown2() {
  548. this.getTeam();
  549. },
  550. // 获取主页数据
  551. getIndexList(shopid) {
  552. this.$http.get('/yxt/shop/info/' + shopid).then(res => {
  553. uni.stopPullDownRefresh();
  554. this.loading = false;
  555. if (res.data && res.code == 200) {
  556. this.shop = res.data;
  557. }
  558. });
  559. },
  560. getByShop(id) {
  561. //店铺优惠查询
  562. this.$http.get('/marketing/firstOrder/getByShop/' + id).then(res => {
  563. if (res && res.code == 200) {
  564. this.shopDiscounts = res.data;
  565. }
  566. });
  567. },
  568. getTeam() {
  569. this.$http.get(`/groupbuy/team/list/${this.shop_id}/${this.dataForm.id}`).then(res => {
  570. if (res && res.code == 200) {
  571. res.list.forEach(val => {
  572. val.time = this.$mUtil
  573. .countDown(Math.floor(val.end_time / 1000))
  574. .split(':')
  575. .map(val => Number(val));
  576. });
  577. this.teamlist = res.list;
  578. // console.log(res.list)
  579. if (this.teamId) {
  580. this.btnType = 1;
  581. this.selectGroup = this.teamlist.filter(val => val.id == this.teamId)[0];
  582. console.log('团队信息2' + JSON.stringify(this.selectGroup));
  583. this.time2 = this.$mUtil
  584. .countDown(Math.floor(this.selectGroup.end_time / 1000))
  585. .split(':')
  586. .map(val => Number(val));
  587. }
  588. }
  589. });
  590. },
  591. getDetailInfo(id) {
  592. this.$http.get('/groupbuy/activitygoods/goodsInfo/' + id).then(res => {
  593. this.loading = false;
  594. if (res && res.code == 200) {
  595. this.dataForm = res.data;
  596. this.shop_id = res.data.shop_id;
  597. this.imglist = res.data.cover.split(',');
  598. this.getByShop(this.shop_id);
  599. this.getIndexList(this.shop_id);
  600. // active_state 0:未开始 * 1:进行中 * 2:已结束
  601. if (res.data.active_state == 0) {
  602. this.time1 = this.$mUtil
  603. .countDown(res.data.activity_start_time)
  604. .split(':')
  605. .map(val => Number(val));
  606. } else {
  607. this.time1 = this.$mUtil
  608. .countDown(res.data.finish_time)
  609. .split(':')
  610. .map(val => Number(val));
  611. }
  612. this.$http.get(`/goods/content/${this.dataForm.goods_id}`).then(res => {
  613. if (res && res.code == 200) {
  614. this.goodsInfo = res.data;
  615. this.$http.get('/marketing/firstOrder/getByShop/' + this.shop_id).then(res => {
  616. if (res && res.code == 200) {
  617. this.shopDiscounts = res.data;
  618. }
  619. });
  620. }
  621. });
  622. this.$http.get(`/comment/orderGoods/getgoodscomments/${this.dataForm.goods_id}`).then(res => {
  623. if (res && res.code == 200) {
  624. this.commentList = res.list;
  625. }
  626. });
  627. this.getTeam();
  628. }
  629. });
  630. },
  631. goProduct(id) {
  632. uni.navigateTo({
  633. url: './goods?id=' + id
  634. });
  635. },
  636. goTocart() {
  637. uni.navigateTo({
  638. url: '/pages/index/shop'
  639. });
  640. },
  641. //点击拼团更多
  642. goGb() {
  643. this.$refs.gbOpen.open();
  644. },
  645. //点击关闭
  646. gbClose() {
  647. this.$refs.gbOpen.close();
  648. },
  649. //评论,商品详情切换
  650. change(i) {
  651. this.isChecked = i;
  652. },
  653. //点购物车,立即购买
  654. buy(i, id) {
  655. this.btnType = i;
  656. this.selectGroup = null;
  657. this.checkSku(id);
  658. if (i == 0) {
  659. this.btnName = '加入购物车';
  660. } else {
  661. this.btnName = '立即购买';
  662. }
  663. },
  664. // 减数量
  665. resNum() {
  666. if (this.add_num > 1) {
  667. this.add_num--;
  668. }
  669. },
  670. //加数量
  671. addNum() {
  672. this.add_num++;
  673. },
  674. chonseSku(index, id) {
  675. this.skuTab[index].values.forEach(res => {
  676. res.flag = false;
  677. if (res.id == id) {
  678. res.flag = true;
  679. }
  680. });
  681. let choseId = [];
  682. this.skuTab.forEach(res => {
  683. res.values.forEach(Key => {
  684. if (Key.flag) {
  685. choseId.push(Key.id);
  686. }
  687. });
  688. });
  689. let totalId = choseId.join('|');
  690. this.hasId = totalId;
  691. this.goodsSkuList.forEach(res => {
  692. if (res.sku_hash_code == totalId) {
  693. this.choseConfig = res;
  694. this.stock = this.dataForm.real_stock_total;
  695. this.able_stock = res.able_stock;
  696. }
  697. });
  698. },
  699. //查询sku
  700. checkSku(id) {
  701. this.$http.get(`/groupbuy/activitygoods/skus/${this.dataForm.id}`).then(res => {
  702. this.loading = false;
  703. if (res && res.code == 200) {
  704. this.choseConfig = {};
  705. this.hasId = '';
  706. this.goods_total_stock = res.data.goods_total_stock;
  707. // this.goods_total_stock =
  708. res.data.goods.sku_table.forEach(keys => {
  709. keys.values.forEach(val => {
  710. val.flag = false;
  711. });
  712. });
  713. this.limit_buy_num = this.dataForm.limit_buy_num;
  714. this.goods_id = this.dataForm.goods_id;
  715. this.goodsSkuList = res.data.goods_sku_list;
  716. this.moPrice = this.dataForm.min_price;
  717. this.moDelPrice = this.dataForm.min_sale_price;
  718. this.cover = this.imglist[0];
  719. this.stock = this.dataForm.real_stock_total;
  720. if (res.data.goods_auth) {
  721. if (res.data.goods_auth.added) {
  722. this.$refs.specOpen.open();
  723. } else {
  724. this.$mUtil.toast('该商品已经下架');
  725. }
  726. } else {
  727. this.$mUtil.toast('没有经营权限');
  728. }
  729. //只有没数据才去重新渲染sku的数据
  730. if (this.skuTab.length == 0) {
  731. this.skuTab = res.data.goods.sku_table;
  732. for (let i in this.skuTab) {
  733. //默认选中第一个可选项
  734. this.skuTab[i].values[0].flag = true;
  735. }
  736. //显示选中的sku信息
  737. // this.chonseSku(0, this.skuTab[0].values[0].id);
  738. }
  739. //显示选中的sku信息
  740. this.chonseSku(0, this.skuTab[0].values[0].id);
  741. // if(res.data.goods.sku_table.length>0){
  742. // this.$refs.specOpen.open()
  743. // }else{
  744. // this.hasId = ''
  745. // this.btnBuy()
  746. // }
  747. }
  748. });
  749. },
  750. //关闭规格弹窗
  751. specOpenClose() {
  752. // this.show=false
  753. this.$refs.specOpen.close();
  754. },
  755. //加入购物车
  756. btnBuys() {
  757. // 判断是否选中sku
  758. if (this.skuTab.length > 0 && this.hasId == '') {
  759. this.$mUtil.toast('请选中sku');
  760. return false;
  761. }
  762. // 判断限购
  763. if (this.add_num > this.limit_buy_num && this.limit_buy_num != 0) {
  764. this.$mUtil.toast('商品限购' + this.limit_buy_num + '件');
  765. return false;
  766. }
  767. //判断库存
  768. if (this.goodsSkuList.length > 0 && this.able_stock < this.add_num) {
  769. this.$mUtil.toast('商品库存只有' + this.able_stock + '件');
  770. this.$http
  771. .post(`/singlegoods/understockrecord/save`, {
  772. shop_id: this.shop_id,
  773. goods_id: this.goods_id,
  774. single_goods_id: this.choseConfig.single_goods_id,
  775. sku_set_name: this.choseConfig.sku_set_name,
  776. buy_num: this.add_num
  777. })
  778. .then(res => {});
  779. return false;
  780. }
  781. if (this.goStatus == 0) {
  782. let data = {
  783. goods_id: this.goods_id,
  784. sku_hash_code: this.hasId,
  785. add_num: this.add_num,
  786. source_shop_id: this.shop_id.toString()
  787. };
  788. this.$http.post(`/cart/add`, data).then(res => {
  789. if (res && res.code == 200) {
  790. this.$mUtil.toast('添加成功');
  791. this.show = false;
  792. // this.$refs.specOpen.close();
  793. this.choseConfig = {};
  794. this.add_num = 1;
  795. this.cartList();
  796. }
  797. });
  798. } else {
  799. this.psotJson();
  800. }
  801. },
  802. //组合数据
  803. psotJson() {
  804. // this.loading = true;
  805. let dataJson = {};
  806. let childArr = [];
  807. let parendArr = [];
  808. // let shop = uni.getStorageSync('shop')
  809. // let shopid = shop.id ? shop.id : ''
  810. this.choseConfig;
  811. childArr.push({
  812. user_cart_id: 0,
  813. activity_goods_id: this.choseConfig.activity_goods_id,
  814. goods_id: this.goods_id,
  815. num: this.add_num,
  816. sku_hash_code: this.hasId
  817. });
  818. parendArr.push({
  819. shop_id: this.shop.id,
  820. source_shop_id: this.shop.id,
  821. activity_id: this.dataForm.group_buy_id, //活动id
  822. sponsor_activity_id: this.selectGroup ? this.selectGroup.id : 0, //拼团id
  823. user_remark: '',
  824. items: childArr
  825. });
  826. dataJson = {
  827. is_cart: false, //是否来源于购物车
  828. receipt_id: null, //收货地址ID
  829. shipment_mode: 0, //0物流,1自提
  830. shop_orders: parendArr,
  831. marketing_type: 2 //0无活动,1秒杀,2拼团
  832. };
  833. uni.setStorageSync('dataJson', dataJson);
  834. uni.navigateTo({
  835. url: '/pages/product/surePay/surePaySechill?type=group'
  836. });
  837. // let shop = uni.getStorageSync('shop')
  838. // let shopid=shop.id?shop.id:''
  839. // this.loading = false;
  840. // this.$http.post(`/order/build`, dataJson).then(res => {
  841. // if (res && res.code == 200) {
  842. // uni.setStorageSync('sureData', res.data)
  843. // uni.navigateTo({
  844. // url: '../surePay/surePay'
  845. // })
  846. // }
  847. // })
  848. },
  849. //
  850. btnBuy(i) {
  851. this.goStatus = i;
  852. let token = uni.getStorageSync("apiToken");
  853. //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
  854. if (!token) {
  855. uni.navigateTo({
  856. url: '/pages/login/index'
  857. });
  858. } else {
  859. this.btnBuys();
  860. }
  861. //0 购物车,1 立即购买
  862. }
  863. }
  864. };
  865. </script>
  866. <style lang="scss">
  867. page {
  868. background-color: #f5f5f5;
  869. }
  870. </style>
  871. <style lang="scss" scoped>
  872. @font-face {
  873. font-family: 'hxicon';
  874. /* project id 2009392 */
  875. src: url(data:font/truetype;charset=utf-8;base64,AAEAAAALAIAAAwAwR1NVQrD+s+0AAAE4AAAAQk9T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AKACsAPwABAAAAAAALABMAagADAAEECQAAACoAfQADAAEECQABAAwApwADAAEECQACAA4AswADAAEECQADAAwAwQADAAEECQAEAAwAzQADAAEECQAFABYA2QADAAEECQAGAAwA7wADAAEECQAKAFYA+wADAAEECQALACYBUQpDcmVhdGVkIGJ5IGljb25mb250Cmh4aWNvblJlZ3VsYXJoeGljb25oeGljb25WZXJzaW9uIDEuMGh4aWNvbkdlbmVyYXRlZCBieSBzdmcydHRmIGZyb20gRm9udGVsbG8gcHJvamVjdC5odHRwOi8vZm9udGVsbG8uY29tAAoAQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdAAKAGgAeABpAGMAbwBuAFIAZQBnAHUAbABhAHIAaAB4AGkAYwBvAG4AaAB4AGkAYwBvAG4AVgBlAHIAcwBpAG8AbgAgADEALgAwAGgAeABpAGMAbwBuAEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAAcwB2AGcAMgB0AHQAZgAgAGYAcgBvAG0AIABGAG8AbgB0AGUAbABsAG8AIABwAHIAbwBqAGUAYwB0AC4AaAB0AHQAcAA6AC8ALwBmAG8AbgB0AGUAbABsAG8ALgBjAG8AbQAAAAACAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0BAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgAFY2xvc2UJZmF2b3JmaWxsBWZhdm9yDGxvY2F0aW9uZmlsbAhsb2NhdGlvbgZzZWFyY2gGdW5mb2xkCHNldHRpbmdzC2ZvcndhcmRmaWxsB2ZvcndhcmQEYmFjawVyaWdodAAAAAAA) format('truetype');
  876. }
  877. @font-face {
  878. font-family: 'iconfont';
  879. /* project id 2070236 */
  880. src: url('//at.alicdn.com/t/font_2070236_id1ac7qapa.eot');
  881. src: url('//at.alicdn.com/t/font_2070236_id1ac7qapa.eot?#iefix') format('embedded-opentype'), url('//at.alicdn.com/t/font_2070236_id1ac7qapa.woff2') format('woff2'),
  882. url('//at.alicdn.com/t/font_2070236_id1ac7qapa.woff') format('woff'), url('//at.alicdn.com/t/font_2070236_id1ac7qapa.ttf') format('truetype'),
  883. url('//at.alicdn.com/t/font_2070236_id1ac7qapa.svg#iconfont') format('svg');
  884. }
  885. .hxicon {
  886. font-family: hxicon;
  887. font-size: 20px;
  888. font-style: normal;
  889. /* #ifndef APP-PLUS-NVUE */
  890. -webkit-font-smoothing: antialiased;
  891. -webkit-text-stroke-width: 0.2px;
  892. -moz-osx-font-smoothing: grayscale;
  893. /* #endif */
  894. }
  895. .price-zhe {
  896. display: flex;
  897. align-items: baseline;
  898. }
  899. .per-num {
  900. display: flex;
  901. }
  902. .bottom-bor {
  903. border-bottom: 3rpx solid #e7e7e7;
  904. }
  905. .slotBox {
  906. .back {
  907. padding: 0 13rpx;
  908. }
  909. }
  910. .pd24 {
  911. padding: 24rpx;
  912. }
  913. .pd20 {
  914. padding: 20rpx;
  915. }
  916. .pt20-pb14 {
  917. padding-top: 20rpx;
  918. padding-bottom: 14rpx;
  919. }
  920. .pt28-pb18 {
  921. padding-top: 28rpx;
  922. padding-bottom: 18rpx;
  923. }
  924. .pb30 {
  925. padding-bottom: 30rpx;
  926. }
  927. .pb40 {
  928. padding-bottom: 40rpx;
  929. }
  930. .pb50 {
  931. padding-bottom: 50rpx;
  932. }
  933. .pt-pb30 {
  934. padding-top: 30rpx;
  935. padding-bottom: 30rpx;
  936. }
  937. .pt-pb35 {
  938. padding-top: 35rpx;
  939. padding-bottom: 35rpx;
  940. }
  941. .ml54 {
  942. margin-left: 54rpx;
  943. }
  944. .ml138 {
  945. margin-left: 138rpx;
  946. }
  947. .br-rd10 {
  948. border-radius: 10rpx;
  949. }
  950. .br-rd20 {
  951. border-radius: 20rpx;
  952. }
  953. .stb-btn {
  954. padding: 8rpx 18rpx;
  955. border-radius: 10rpx;
  956. background: #ff0000;
  957. }
  958. .br-FF0000 {
  959. border: 1rpx solid #ff0000;
  960. border-radius: 24rpx;
  961. padding: 6rpx 12rpx;
  962. }
  963. .bg-FFF6EE {
  964. background-color: #fff6ee;
  965. }
  966. .mt80 {
  967. margin-top: 80rpx;
  968. }
  969. .mt10 {
  970. margin-top: 10rpx;
  971. }
  972. .product {
  973. // padding-bottom: 150rpx;
  974. }
  975. .pic {
  976. width: 100%;
  977. position: relative;
  978. .swiper {
  979. // height: 620rpx;
  980. height: 100vw;
  981. video {
  982. width: 100%;
  983. // height: 620rpx;
  984. height: 100vw;
  985. }
  986. image {
  987. width: 100%;
  988. // height: 620rpx;
  989. height: 100vw;
  990. }
  991. }
  992. .p-price {
  993. width: 100%;
  994. // position: absolute;
  995. top: 460rpx;
  996. // background: linear-gradient(90deg,#20a733, #0a824b);
  997. background: #FA6138;
  998. border-radius: 20rpx 20rpx 0px 0px;
  999. position: relative;
  1000. top: -18rpx;
  1001. .discount {
  1002. color: #ffffff;
  1003. }
  1004. }
  1005. }
  1006. .richText {
  1007. padding: 30rpx;
  1008. /deep/ img {
  1009. margin-top: 0 !important;
  1010. }
  1011. }
  1012. //秒杀,拼团样式
  1013. .p-ab {
  1014. position: absolute;
  1015. z-index: 2;
  1016. top: -8rpx;
  1017. right: 0;
  1018. }
  1019. .stb-list {
  1020. padding-bottom: 10rpx;
  1021. }
  1022. .triangle-bottomright {
  1023. width: 0;
  1024. height: 0;
  1025. border-bottom: 105rpx solid #dccda4;
  1026. border-left: 60rpx solid transparent;
  1027. }
  1028. .seckill {
  1029. background-color: #dccda4;
  1030. color: #FA6138;
  1031. padding: 12rpx 15rpx;
  1032. padding-right: 28rpx;
  1033. border-radius: 5rpx 20rpx 0px 0px;
  1034. box-sizing: border-box;
  1035. }
  1036. .seckill-btn {
  1037. width: 86%;
  1038. }
  1039. .br-284534 {
  1040. border-bottom: 1rpx solid rgba($color: #284534, $alpha: 0.3);
  1041. }
  1042. .gb-te {
  1043. padding-top: 20rpx;
  1044. padding-bottom: 15rpx;
  1045. }
  1046. .gb-btn {
  1047. padding: 20rpx 40rpx;
  1048. line-height: 30rpx;
  1049. }
  1050. .btn-bg-dccda4 {
  1051. background: #dccda4;
  1052. border-radius: 48px;
  1053. }
  1054. .btn-bg-00321E {
  1055. background: #FA6138;
  1056. border-radius: 48px;
  1057. }
  1058. .btn-bg-00320E {
  1059. background: #FA6138;
  1060. border-radius: 48px;
  1061. }
  1062. .btn-bg-dccda4-48 {
  1063. padding: 20rpx 85rpx;
  1064. border-radius: 48px;
  1065. background: #F8A764;
  1066. color: white;
  1067. margin-right: 10rpx;
  1068. }
  1069. .btn-bg-dccda4-482 {
  1070. padding: 20rpx 85rpx;
  1071. border-radius: 48px;
  1072. background: #FA6138;
  1073. color: white;
  1074. margin-left: 10rpx;
  1075. }
  1076. .tab {
  1077. position: sticky;
  1078. top: 0;
  1079. background-color: #fff;
  1080. padding-top: 38rpx;
  1081. z-index: 9;
  1082. .pb30 {
  1083. position: relative;
  1084. &::before {
  1085. content: '';
  1086. position: absolute;
  1087. left: 50%;
  1088. bottom: 0;
  1089. transform: translateX(-50%);
  1090. width: 0;
  1091. height: 2px;
  1092. background: #FA6138;
  1093. transition: all 0.3s;
  1094. }
  1095. &.active {
  1096. font-size: 30rpx;
  1097. color: #FA6138;
  1098. font-weight: 700;
  1099. &::before {
  1100. width: 100%;
  1101. }
  1102. }
  1103. }
  1104. }
  1105. .bottom-btn {
  1106. width: 100%;
  1107. position: fixed;
  1108. bottom: 0;
  1109. border-top: 1rpx solid #e6e6e6;
  1110. z-index: 9;
  1111. .cart {
  1112. position: relative;
  1113. .number {
  1114. position: absolute;
  1115. top: -10rpx;
  1116. left: 45rpx;
  1117. padding: 4rpx 8rpx;
  1118. background-color: #ff0000;
  1119. border: 4rpx solid #ffffff;
  1120. border-radius: 40rpx;
  1121. }
  1122. }
  1123. .cart-btn {
  1124. width: 230rpx;
  1125. height: 85rpx;
  1126. background: #dccda4;
  1127. border-radius: 43rpx 0rpx 0rpx 43rpx;
  1128. }
  1129. .buy-btn {
  1130. width: 230rpx;
  1131. height: 85rpx;
  1132. line-height: 85rpx;
  1133. background: #FA6138;
  1134. border-radius: 0rpx 43rpx 43rpx 0rpx;
  1135. }
  1136. }
  1137. .flex-sb {
  1138. display: flex;
  1139. justify-content: space-between;
  1140. border-bottom: 3rpx solid #e7e7e7;
  1141. }
  1142. //弹窗
  1143. .spec {
  1144. border-radius: 18rpx 18rpx 0rpx 0rpx;
  1145. padding-top: 30rpx;
  1146. max-height: 900rpx;
  1147. overflow-y: auto;
  1148. // position: fixed;
  1149. // bottom: 0;
  1150. // z-index: 999;
  1151. // width: 100%;
  1152. .spec-item {
  1153. background-color: #f6f6f6;
  1154. border: 1px solid #f6f6f6;
  1155. padding: 12rpx 30rpx;
  1156. font-size: 24rpx;
  1157. color: #1a1a1a;
  1158. border-radius: 4px;
  1159. }
  1160. .activeColor {
  1161. background-color: #e1e6e3;
  1162. border: 1px solid #3775F6;
  1163. color: #FA6138;
  1164. border-radius: 4px;
  1165. }
  1166. .spec-item:not(:last-child) {
  1167. margin-right: 24rpx;
  1168. }
  1169. //减号
  1170. .minus {
  1171. width: 50rpx;
  1172. height: 50rpx;
  1173. line-height: 50rpx;
  1174. text-align: center;
  1175. background: #dedede;
  1176. border-radius: 8rpx 0rpx 0rpx 8rpx;
  1177. }
  1178. .num {
  1179. width: 74rpx;
  1180. height: 46rpx;
  1181. line-height: 46rpx;
  1182. text-align: center;
  1183. border: 1px solid #dedede;
  1184. }
  1185. //加号
  1186. .plus-sign {
  1187. width: 50rpx;
  1188. height: 50rpx;
  1189. line-height: 50rpx;
  1190. text-align: center;
  1191. background: #dedede;
  1192. border-radius: 0rpx 8rpx 8rpx 0rpx;
  1193. }
  1194. .specOpen-btn {
  1195. margin-top: 68rpx;
  1196. padding-bottom: 34rpx;
  1197. button {
  1198. background-color: #FA6138;
  1199. color: #ffffff;
  1200. }
  1201. }
  1202. }
  1203. </style>