goodsDet.vue 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535
  1. <template>
  2. <view class="detail_all pages">
  3. <!-- banner -->
  4. <view class="detail-banner">
  5. <!-- <image :src="goodsDet.goodsPicture" mode=""></image> -->
  6. <swiper class="swiper" :autoplay="true" interval="2000" duration="500" :circular="true" style="width: 100%; height: 410rpx">
  7. <swiper-item v-for="(item, index) in goodsDet.goodsPicture" :key="index">
  8. <image :src="item" mode="aspectFill" style="width: 100%"></image>
  9. </swiper-item>
  10. </swiper>
  11. </view>
  12. <!-- 详情 -->
  13. <view class="info">
  14. <view class="info-box">
  15. <view class="info-box-con">
  16. <view style="color: #ff0303">
  17. <span style="font-size: 24rpx">¥</span>
  18. <text style="font-size: 36rpx; font-weight: bold">{{ goodsDet.goodsMoney }}</text>
  19. </view>
  20. <view class="info-box-con-cart" v-if="goodsDet.goodsLabel && goodsDet.goodsLabel.length">
  21. <view v-for="(item, index) in goodsDet.goodsLabel">{{ item }}</view>
  22. </view>
  23. <view class="info-box-con-name">
  24. {{ goodsDet.goodsName }}
  25. </view>
  26. <view class="info-box-con-select">
  27. <view class="info-box-con-select-l">
  28. <view>
  29. <span>打包费</span>
  30. <text>¥{{ goodsDet.packMoney }}/份</text>
  31. </view>
  32. <view>已售{{ goodsDet.sales }}</view>
  33. </view>
  34. <view class="info-box-con-select-r" @click="skuShow = true">加入购物车</view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- tabs -->
  40. <view class="tabs">
  41. <view class="tabs-box">
  42. <view class="tabs-box-item" @click="switchTba(index)" v-for="(item, index) in tabs" :key="index">
  43. {{ item.name }}
  44. <view v-show="current == index"></view>
  45. </view>
  46. </view>
  47. </view>
  48. <view v-if="current == 0" style="background-color: #fff9ed">
  49. <view class="goodsInfo">
  50. <view class="goodsInfo-box">
  51. <view class="goodsInfo-box-c">
  52. <view class="goodsInfo-box-title">产品描述</view>
  53. <view class="goodsInfo-box-c-item">
  54. <u-parse :html="goodsDet.goodsDescribe"></u-parse>
  55. </view>
  56. <!-- <view class="goodsInfo-box-c-item" v-for="(item,index) in infoList" :key="index">
  57. <view class="">
  58. {{item.name}}
  59. </view>
  60. <view class="">
  61. {{item.con}}
  62. </view>
  63. </view> -->
  64. </view>
  65. </view>
  66. </view>
  67. <!-- 图片详情 -->
  68. <view class="imgInfo" v-if="goodsDet.goodsParticularsPicture && goodsDet.goodsParticularsPicture.length">
  69. <view class="imgInfo-box">
  70. <view class="imgInfo-box-title">图片详情</view>
  71. <view class="imgInfo-box-img">
  72. <image v-for="(item, index) in goodsDet.goodsParticularsPicture" :key="index" :src="item" mode="widthFix"></image>
  73. </view>
  74. <!-- <view class="detail_describe" v-if="goodsDet.goodsParticularsPicture.length">
  75. <view class="detail_describe_ce">
  76. <view class="detail_describe_text">商品详情图</view>
  77. <image v-for="(item,index) in goodsDet.goodsParticularsPicture" :key='index' :src="item"
  78. style="width: 100%;" mode="scaleToFill"></image>
  79. </view>
  80. </view> -->
  81. </view>
  82. </view>
  83. </view>
  84. <!-- 评论 -->
  85. <view v-if="current == 1">
  86. <view class="pingjia">
  87. <view class="pingjia-box">
  88. <view class="pingjia-box-title">商品评价</view>
  89. <view class="" style="width: 600rpx" v-if="current == 1">
  90. <view class="pingjia-box-btn">
  91. <u-button hover-class="none" @click="sel(0)" shape="circle" size="mini" :plain="false" :custom-style="count == 0 ? customStyle : customStyle1">
  92. 全部评论
  93. </u-button>
  94. <u-button hover-class="none" @click="sel(1)" shape="circle" size="mini" :plain="false" :custom-style="count == 1 ? customStyle : customStyle1">
  95. 好评({{ EvaluateData.goodReputation ? EvaluateData.goodReputation : 0 }})
  96. </u-button>
  97. <u-button hover-class="none" @click="sel(2)" shape="circle" size="mini" :plain="false" :custom-style="count == 2 ? customStyle : customStyle1">
  98. 中评({{ EvaluateData.mediumReview ? EvaluateData.mediumReview : 0 }})
  99. </u-button>
  100. <u-button hover-class="none" @click="sel(3)" shape="circle" size="mini" :plain="false" :custom-style="count == 3 ? customStyle : customStyle1">
  101. 差评({{ EvaluateData.negativeComment ? EvaluateData.negativeComment : 0 }})
  102. </u-button>
  103. </view>
  104. <view class="pingjia-box-item" v-for="(item, index) in EvaluateList" :key="index">
  105. <view class="flex justify-between align-center">
  106. <view class="flex align-center">
  107. <u-avatar :src="item.avatar" size="65"></u-avatar>
  108. <view class="margin-left-sm" style="line-height: 46upx; font-size: 24rpx">
  109. {{ item.userName ? item.userName : '匿名' }}
  110. </view>
  111. <view class="flex margin-left-sm">
  112. <u-icon v-for="ite in item.score" :key="ite" color="#FCD202" name="star-fill"></u-icon>
  113. </view>
  114. </view>
  115. <view class="timess">{{ item.createTime }}</view>
  116. </view>
  117. <view class="margin-top-sm">{{ item.evaluateMessage }}</view>
  118. <view class="pinglunImg" v-if="item.pictures != undefined && item.pictures">
  119. <view class="pinglunImg-box flex justify-between flex-wrap">
  120. <image
  121. style="margin-bottom: 20rpx"
  122. @click="yuanlan(item.pictures == undefined ? [] : item.pictures.split(','), index2)"
  123. v-for="(item2, index2) in item.pictures == undefined ? [] : item.pictures.split(',')"
  124. :src="item2"
  125. mode=""
  126. ></image>
  127. <image style="margin-bottom: 20rpx; width: 140rpx; height: 0" src="" mode=""></image>
  128. <image style="margin-bottom: 20rpx; width: 140rpx; height: 0" src="" mode=""></image>
  129. </view>
  130. </view>
  131. <view class="margin-top-sm" v-if="item.shopReplyMessage">
  132. <view class="flex align-center">
  133. <view class="flex align-center text-df" style="color: #999999">
  134. <view class="text-df">商家回复:</view>
  135. {{ item.shopReplyMessage }}
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. <empty v-if="!EvaluateList.length"></empty>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. <!-- <view class="detail">
  146. <view class="detail_text">{{goodsDet.goodsName}}</view>
  147. <view class="detail_biao" v-if="goodsDet.goodsLabel.length">
  148. <view class="detail_biao_sty" v-for="(ite, ind) in goodsDet.goodsLabel" :key='ind'>{{ite}}</view>
  149. </view>
  150. <text style="font-size: 22upx;color: #999999;" v-if="goodsDet.packMoney&&goodsDet.packMoney>0">打包費:{{goodsDet.packMoney}}元/1份</text>
  151. <view class="margin-top" v-for="(item,index) in attrList" :key="index">
  152. <view class="text-bold text-black">{{item.value}}</view>
  153. <view class="flex margin-tb-sm flex-wrap">
  154. <view v-for="(ite, ind) in item.detail" :key="ind" @click="skuSel(ite,index,ind)"
  155. class="margin-bottom-sm">
  156. <view class="btn" :class="item.goodsId == index && item.attrId == ind?'active': ''">
  157. {{ite.name}}
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. </view> -->
  163. <!-- 产品描述 -->
  164. <!-- <view class="detail_describe">
  165. <view class="detail_describe_ce">
  166. <view class="detail_describe_text">产品描述</view>
  167. <u-parse :html="goodsDet.goodsDescribe"></u-parse>
  168. </view>
  169. </view> -->
  170. <view style="height: 180rpx"></view>
  171. <!-- 加购 -->
  172. <view class="settlement" @click="isPopupShow">
  173. <view class="settlement_img">
  174. <image src="../../../static/images/index/diancan.png" mode=""></image>
  175. <view class="settlement_hot">{{ goodsNum }}</view>
  176. </view>
  177. <view class="settlement_le">
  178. <text>¥</text>
  179. {{ totalPrice }}
  180. </view>
  181. <view class="settlement_ri" @click.stop="goConfirm()">去结算</view>
  182. </view>
  183. <!-- 购物车弹窗 -->
  184. <u-popup v-model="popupShow" mode="bottom" border-radius="20">
  185. <view style="padding-bottom: 30rpx">
  186. <view class="flex justify-between align-center" style="height: 90rpx; padding: 0 30rpx; background-color: #b2d5c6">
  187. <view class="text-bold text-black text-df">已选餐品</view>
  188. <view class="flex align-center">
  189. <image src="../../../static/images/index/delete.png" style="width: 28rpx; height: 31rpx" mode=""></image>
  190. <text class="margin-left-xs" @click="empty">清空购物车</text>
  191. </view>
  192. </view>
  193. <scroll-view scroll-y="true" style="padding: 0 30rpx; background-color: #fff9ed">
  194. <view v-for="(item, ind) in goodsList.orderGoodsList[0]" :key="ind">
  195. <view class="flex margin-tb-sm">
  196. <image mode="aspectFill" :src="item.goodsPicture[0]" style="width: 96rpx; height: 96rpx; border-radius: 10rpx"></image>
  197. <view class="margin-left-sm" style="display: flex; flex-direction: column; justify-content: space-between">
  198. <view>{{ item.goodsName }}</view>
  199. <view v-if="item.skuMessage">{{ item.skuMessage }}</view>
  200. <view class="text-bold text-sm" style="color: #ff0303">
  201. ¥
  202. <text class="text-lg">{{ item.goodsPrice }}</text>
  203. </view>
  204. </view>
  205. <view class="flex justify-between align-center" style="margin-left: auto">
  206. <view class="flex align-center justify-between">
  207. <view @click.stop="noAdd(item, ind)">
  208. <image src="../../../static/images/index/jian.png" style="width: 54rpx; height: 54rpx"></image>
  209. </view>
  210. <view class="text-center margin-lr-xs">{{ item.goodsNum }}</view>
  211. <view @click.stop="add(item, ind)">
  212. <image src="../../../static/images/index/add.png" style="width: 50rpx; height: 50rpx"></image>
  213. </view>
  214. </view>
  215. </view>
  216. </view>
  217. </view>
  218. </scroll-view>
  219. </view>
  220. <view class="settlement1 margin-top-lg">
  221. <view class="settlement_img">
  222. <image src="../../../static/images/index/diancan.png" mode="aspectFill"></image>
  223. <view class="settlement_hot">{{ goodsNum }}</view>
  224. </view>
  225. <view class="settlement_le">
  226. <text>¥</text>
  227. {{ totalPrice }}
  228. </view>
  229. <view class="settlement_ri" @click.stop="goConfirm()">去结算</view>
  230. </view>
  231. </u-popup>
  232. <!-- 选择规格弹窗 -->
  233. <u-popup v-model="skuShow" mode="center" :closeable="true" border-radius="20">
  234. <view style="width: 700rpx">
  235. <view class="text-center text-lg text-bold padding-tb">{{ goodsDet.goodsName }}</view>
  236. <view class="margin-top-sm padding-lr" v-for="(item, index) in attrList" :key="index">
  237. <view class="text-bold text-black">{{ item.value }}</view>
  238. <view class="flex margin-tb-sm flex-wrap">
  239. <view v-for="(ite, ind) in item.detail" :key="ind" @click="skuSel(ite, index, ind)" class="margin-bottom-sm">
  240. <view class="skuBtn" :class="item.goodsId == index && item.attrId == ind ? 'active' : ''">
  241. {{ ite.name }}
  242. </view>
  243. </view>
  244. </view>
  245. </view>
  246. <view class="flex justify-between padding-lr padding-top">
  247. <view>
  248. <view class="text-xl text-bold" style="color: #ff0303">
  249. <text class="text-sm">¥</text>
  250. {{ price }}
  251. </view>
  252. <view class="detail_describe_text2">{{ checkString }}</view>
  253. </view>
  254. <u-number-box v-model="value" :min="1" @change="valChange"></u-number-box>
  255. </view>
  256. <view class="detail_account_bottom padding">
  257. <view class="detail_account_bottom_le" @click="payment()">立即购买</view>
  258. <view class="detail_account_bottom_ri" @click="orderSel(2)">加入购物车</view>
  259. </view>
  260. </view>
  261. </u-popup>
  262. <!-- <view class="detail_account">
  263. <view class="detail_account_top">
  264. <view class="detail_account_top_le">
  265. <view class="detail_account_text"><text>¥</text>{{price}}</view>
  266. <view class="detail_describe_text2">{{checkString}}</view>
  267. </view>
  268. </view>
  269. <view class="detail_account_bottom">
  270. <view class="detail_account_bottom_le" @click="payment()">立即购买</view>
  271. <view class="detail_account_bottom_ri" @click="orderSel(2)">加入购物车</view>
  272. </view>
  273. </view> -->
  274. </view>
  275. </template>
  276. <script>
  277. import empty from '@/components/empty.vue'
  278. export default {
  279. components: {
  280. empty
  281. },
  282. data() {
  283. return {
  284. customStyle: {
  285. color: '#000',
  286. background: '#9ACAB9',
  287. marginRight: '20rpx',
  288. border: 0
  289. },
  290. customStyle1: {
  291. color: '#333333',
  292. background: '#F2F2F2',
  293. marginRight: '20rpx',
  294. border: 0
  295. },
  296. EvaluateData: {},
  297. shopDet: {},
  298. skuShow: false,
  299. totalPrice: 0,
  300. goodsNum: 0,
  301. infoList: [
  302. {
  303. name: '原料',
  304. con: '土豆'
  305. },
  306. {
  307. name: '份量',
  308. con: '1人份'
  309. },
  310. {
  311. name: '荤素',
  312. con: '素菜'
  313. },
  314. {
  315. name: '菜系',
  316. con: '川菜'
  317. },
  318. {
  319. name: '口味',
  320. con: '咸香'
  321. },
  322. {
  323. name: '辅料',
  324. con: '姜,辣椒,蒜,葱'
  325. }
  326. ],
  327. current: 0,
  328. tabs: [
  329. {
  330. id: 0,
  331. name: '详情'
  332. },
  333. {
  334. id: 1,
  335. name: '评价'
  336. }
  337. ],
  338. goodsList: {
  339. orderGoodsList: [[]]
  340. },
  341. popupShow: false,
  342. goodsId: '',
  343. goodsDet: {},
  344. skuId: '',
  345. skuMessage: '',
  346. skuList: [],
  347. attrList: [],
  348. checkString: '',
  349. checkStateList: [],
  350. CheckattrValue: false,
  351. userId: '',
  352. value: 1,
  353. shopId: '',
  354. price: 0,
  355. echoSkuList: [],
  356. echoSku: [],
  357. isEchoSku: {},
  358. orderType: 2,
  359. orderId: '',
  360. evaluatePage: 1,
  361. evaluateLimit: 10,
  362. grade: '',
  363. count: 0,
  364. EvaluateList: [],
  365. dataList: [], //店铺商品
  366. backType: ''
  367. }
  368. },
  369. onLoad(option) {
  370. console.log(option)
  371. this.userId = uni.getStorageSync('userId')
  372. this.goodsId = option.goodsId
  373. this.shopId = option.shopId
  374. this.orderId = option.orderId ? option.orderId : ''
  375. this.orderType = option.orderType ? option.orderType : 2
  376. this.backType = option.backType ? option.backType : ''
  377. uni.showLoading({
  378. title: '加载中...',
  379. mask: true // 是否显示透明蒙层,防止触摸穿透
  380. })
  381. this.getData()
  382. this.getShopData()
  383. this.getEchoOrder()
  384. },
  385. onShow() {
  386. this.userId = uni.getStorageSync('userId')
  387. this.getOrderList()
  388. },
  389. onReachBottom: function () {
  390. if (this.current == 1) {
  391. this.evaluatePage = this.evaluatePage + 1
  392. this.getEvaluateList()
  393. }
  394. },
  395. methods: {
  396. // 获取店铺信息
  397. getShopData() {
  398. let data = {
  399. shopId: this.shopId
  400. }
  401. this.$Request.get('/app/goods/selectGoodsList', data).then((res) => {
  402. if (res.code == 0 && res.data) {
  403. this.dataList = res.data.list
  404. }
  405. uni.hideLoading()
  406. })
  407. },
  408. // 去结算
  409. goConfirm() {
  410. if (!this.userId) {
  411. uni.navigateTo({
  412. url: '/pages/public/login'
  413. })
  414. return
  415. }
  416. let goodstr1 = 0 //商品库的 必须次数
  417. let goodstr2 = 0 //购物车的 必须次数
  418. let regex = new RegExp('必选', 'g')
  419. if (this.goodsList && this.goodsList.orderGoodsList[0].length > 0) {
  420. console.log('good12----' + this.dataList)
  421. let dataList = JSON.stringify(this.dataList)
  422. if (dataList.match(regex)) {
  423. goodstr1 = dataList.match(regex).length
  424. console.log('goodstr1c----' + goodstr1)
  425. if (dataList.indexOf('必选') != -1) {
  426. //检测商品是否存在必选
  427. let goodsList = JSON.stringify(this.goodsList.orderGoodsList)
  428. if (goodsList.match(regex)) {
  429. goodstr2 = goodsList.match(regex).length
  430. console.log('goodstr2----' + goodstr2)
  431. if (goodstr1 == goodstr2) {
  432. //检查购物车商品是否存在必须
  433. uni.navigateTo({
  434. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType
  435. })
  436. } else {
  437. uni.showToast({
  438. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  439. icon: 'none'
  440. })
  441. return
  442. }
  443. } else {
  444. uni.showToast({
  445. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  446. icon: 'none'
  447. })
  448. return
  449. }
  450. }
  451. } else {
  452. uni.navigateTo({
  453. url: '/pages/index/shop/confirmOrder?shopId=' + this.shopId + '&orderType=' + this.orderType
  454. })
  455. }
  456. } else {
  457. uni.showToast({
  458. title: '请先添加商品',
  459. icon: 'none'
  460. })
  461. }
  462. },
  463. // 预览图片
  464. yuanlan(arr, index) {
  465. uni.previewImage({
  466. urls: arr,
  467. current: index
  468. })
  469. },
  470. switchTba(index) {
  471. this.current = index
  472. if (index == 0) {
  473. this.getData()
  474. } else {
  475. this.evaluatePage = 1
  476. this.getEvaluateList()
  477. }
  478. },
  479. sel(e) {
  480. this.grade = e
  481. this.count = e
  482. this.evaluatePage = 1
  483. this.getEvaluateList()
  484. },
  485. // 获取评论列表
  486. getEvaluateList() {
  487. let data = {
  488. goodsId: this.goodsId,
  489. shopId: this.shopId,
  490. page: this.evaluatePage,
  491. limit: this.evaluateLimit,
  492. grade: this.grade
  493. }
  494. this.$Request.get('/app/goods/selectEvaluateByShopId', data).then((res) => {
  495. if (res.code == 0 && res.data) {
  496. this.EvaluateData = res.data
  497. if (this.evaluatePage == 1) {
  498. this.EvaluateList = res.data.pageUtils.list
  499. } else {
  500. this.EvaluateList = [...this.EvaluateList, ...res.data.pageUtils.list]
  501. }
  502. }
  503. })
  504. },
  505. // 展示购物车弹窗
  506. isPopupShow() {
  507. console.log(this.goodsList, '677')
  508. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0].length > 0) {
  509. this.popupShow = true
  510. } else {
  511. uni.showToast({
  512. title: '请先添加商品',
  513. icon: 'none'
  514. })
  515. }
  516. },
  517. getEchoOrder() {
  518. let data = {
  519. shopId: this.shopId,
  520. goodsId: this.goodsId
  521. }
  522. this.$Request.get('/app/order/echoOrder', data).then((res) => {
  523. if (res.code == 0 && res.data) {
  524. this.echoSkuList = res.data
  525. if (res.data[0].skuMessage) {
  526. this.echoSku = res.data[0].skuMessage.split(',')
  527. }
  528. }
  529. })
  530. },
  531. valChange(e) {
  532. console.log('当前值为: ' + e.value)
  533. this.value = e.value
  534. },
  535. // 立即购买
  536. payment() {
  537. let token = uni.getStorageSync('token')
  538. if (!token) {
  539. uni.navigateTo({
  540. url: '/pages/public/login'
  541. })
  542. return
  543. }
  544. if (this.attrList.length) {
  545. if (this.checkString == '' || !this.CheckattrValue) {
  546. this.$queue.showToast('请选择正确的商品规格')
  547. return
  548. }
  549. }
  550. let goodstr1 = 0 //商品库的 必须次数
  551. let goodstr2 = 0 //购物车的 必须次数
  552. let regex = new RegExp('必选', 'g')
  553. console.log('good----')
  554. console.log('good----' + this.dataList, this.goodsDet)
  555. let dataList = JSON.stringify(this.dataList)
  556. console.log('good22----' + dataList)
  557. if (dataList.match(regex)) {
  558. goodstr1 = dataList.match(regex).length
  559. console.log('goodstr1n----' + goodstr1)
  560. if (dataList.indexOf('必选') != -1) {
  561. //检测商品是否存在必选
  562. let goodsList = JSON.stringify(this.goodsDet)
  563. if (goodsList.match(regex)) {
  564. goodstr2 = goodsList.match(regex).length
  565. console.log('goodstr2----' + goodstr2)
  566. if (goodstr1 == goodstr2) {
  567. //检查购物车商品是否存在必须
  568. let data = {
  569. goodsId: this.goodsDet.goodsId,
  570. skuMessage: this.skuMessage,
  571. skuId: this.skuId,
  572. num: this.value,
  573. orderType: this.orderType,
  574. shopId: this.shopId
  575. }
  576. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  577. if (res.code == 0) {
  578. this.skuShow = false
  579. uni.navigateTo({
  580. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  581. })
  582. } else {
  583. this.$queue.showToast(res.msg)
  584. }
  585. })
  586. } else {
  587. uni.showToast({
  588. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  589. icon: 'none'
  590. })
  591. return
  592. }
  593. } else {
  594. uni.showToast({
  595. title: '有' + goodstr1 + '个必选商品,请选择后结算',
  596. icon: 'none'
  597. })
  598. return
  599. }
  600. }
  601. } else {
  602. let data = {
  603. goodsId: this.goodsDet.goodsId,
  604. skuMessage: this.skuMessage,
  605. skuId: this.skuId,
  606. num: this.value,
  607. orderType: this.orderType,
  608. shopId: this.shopId
  609. }
  610. this.$Request.post('/app/order/buyGoods', data).then((res) => {
  611. if (res.code == 0) {
  612. this.skuShow = false
  613. uni.navigateTo({
  614. url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this.orderType + '&shopId=' + this.shopId
  615. })
  616. } else {
  617. this.$queue.showToast(res.msg)
  618. }
  619. })
  620. }
  621. // let data = {
  622. // goodsId: this.goodsDet.goodsId,
  623. // skuMessage: this.skuMessage,
  624. // skuId: this.skuId,
  625. // num: this.value,
  626. // orderType: this.orderType,
  627. // shopId: this.shopId,
  628. // }
  629. // this.$Request.post("/app/order/buyGoods", data).then(res => {
  630. // if (res.code == 0) {
  631. // uni.navigateTo({
  632. // url: '/pages/index/shop/payOrder?orderId=' + res.data + '&orderType=' + this
  633. // .orderType
  634. // })
  635. // } else {
  636. // this.$queue.showToast(res.msg);
  637. // }
  638. // })
  639. },
  640. // 添加数量
  641. add(item, index) {
  642. // this.count++;
  643. console.log(item, index)
  644. this.goodsList.orderGoodsList[0][index].goodsNum++
  645. let data = {
  646. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  647. type: 1,
  648. num: 1,
  649. shopId: this.shopId
  650. }
  651. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  652. if (res.code == 0) {
  653. this.getOrderList()
  654. } else {
  655. this.$queue.showToast(res.msg)
  656. this.goodsList.orderGoodsList[0][index].goodsNum--
  657. }
  658. })
  659. },
  660. // 减少数量
  661. noAdd(item, index) {
  662. console.log(item, index)
  663. this.goodsList.orderGoodsList[0][index].goodsNum--
  664. // this.count--;
  665. let data = {
  666. orderGoodsId: this.goodsList.orderGoodsList[0][index].id,
  667. type: 2,
  668. num: 1,
  669. shopId: this.shopId
  670. }
  671. this.$Request.get('/app/order/updateGoodsNum', data).then((res) => {
  672. if (res.code == 0) {
  673. this.getOrderList()
  674. }
  675. })
  676. },
  677. // 清空购物车
  678. empty() {
  679. let data = {
  680. shopId: this.shopId
  681. }
  682. this.$Request.post('/app/order/emptyShoppingTrolley', data).then((res) => {
  683. if (res.code == 0) {
  684. this.totalPrice = 0
  685. this.goodsNum = 0
  686. this.goodsList = {
  687. orderGoodsList: [[]]
  688. }
  689. this.echoSkuList = []
  690. this.echoSku = []
  691. this.getOrderList()
  692. this.popupShow = false
  693. this.getEchoOrder()
  694. }
  695. })
  696. },
  697. // 获取购物车商品列表
  698. getOrderList() {
  699. // 显示加载提示
  700. uni.showLoading({
  701. title: '加载中', // 加载提示文本
  702. mask: true // 是否显示透明蒙层,防止触摸穿透
  703. })
  704. let data = {
  705. shopId: this.shopId,
  706. page: 1,
  707. limit: 1000,
  708. status: 1
  709. // orderType: this.orderType
  710. }
  711. this.$Request.get('/app/order/selectAllOrderList', data).then((res) => {
  712. console.log(res.data, 'rrrrrrrrrrrrrr')
  713. if (res.code == 0 && res.data.pageUtils.list.length) {
  714. this.goodsList = res.data.pageUtils.list[0]
  715. if (this.goodsList && this.goodsList.orderGoodsList && this.goodsList.orderGoodsList[0]) {
  716. this.totalPrice = res.data.money
  717. this.goodsNum = 0
  718. this.goodsList.orderGoodsList[0].forEach((res) => {
  719. res.goodsPicture = res.goodsPicture.split(',')
  720. this.goodsNum += res.goodsNum
  721. })
  722. if (!this.goodsList.orderGoodsList[0].length) {
  723. this.popupShow = false
  724. }
  725. }
  726. }
  727. uni.hideLoading()
  728. })
  729. },
  730. // 加入购物车
  731. orderSel(e) {
  732. if (this.value < 1) {
  733. uni.showToast({
  734. title: '数量不能小于1',
  735. icon: 'none'
  736. })
  737. return
  738. }
  739. if (!this.userId) {
  740. uni.navigateTo({
  741. url: '/pages/public/login'
  742. })
  743. return
  744. }
  745. if (this.attrList.length) {
  746. if (this.checkString == '' || !this.CheckattrValue) {
  747. this.$queue.showToast('请选择正确的商品规格')
  748. return
  749. }
  750. }
  751. // console.log(this.goodsDet)
  752. // console.log(this.echoSku, 'echoSku')
  753. // if (this.echoSku.length) {
  754. // this.echoSkuList.forEach(res => {
  755. // if (res.skuMessage == this.skuMessage) {
  756. // this.isEchoSku = res
  757. // }
  758. // })
  759. // if (JSON.stringify(this.isEchoSku) != "{}") {
  760. // let data = {
  761. // orderGoodsId: this.isEchoSku.id,
  762. // type: 1,
  763. // num: this.value,
  764. // shopId: this.shopId,
  765. // }
  766. // this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
  767. // if (res.code == 0) {
  768. // setTimeout(function() {
  769. // uni.navigateBack()
  770. // }, 1000)
  771. // } else {
  772. // this.$queue.showToast(res.msg);
  773. // }
  774. // });
  775. // return
  776. // }
  777. // }
  778. if (this.orderId) {
  779. let data = {
  780. goodsId: this.goodsDet.goodsId,
  781. skuMessage: this.skuMessage,
  782. skuId: this.skuId,
  783. num: this.value,
  784. shopId: this.shopId,
  785. orderId: this.orderId
  786. }
  787. this.$Request.post('/app/order/joinOrder', data).then((res) => {
  788. if (res.code == 0) {
  789. // this.$queue.showToast('添加成功');
  790. // if (e == 1) {
  791. // uni.navigateTo({
  792. // url: '/pages/diancan/confirmOrder?shopId=' + this.shopId
  793. // })
  794. // } else {
  795. // this.skuShow = false
  796. // this.getOrderList()
  797. // }
  798. this.$queue.showToast('添加成功')
  799. this.skuShow = false
  800. this.getOrderList()
  801. } else {
  802. this.$queue.showToast(res.msg)
  803. }
  804. })
  805. } else {
  806. let data = {
  807. goodsId: this.goodsDet.goodsId,
  808. skuMessage: this.skuMessage,
  809. skuId: this.skuId,
  810. num: this.value,
  811. shopId: this.shopId
  812. }
  813. this.$Request.post('/app/order/insertOrder', data).then((res) => {
  814. if (res.code == 0) {
  815. this.$queue.showToast('添加成功')
  816. if (e == 1) {
  817. uni.navigateTo({
  818. url: '/pages/diancan/payOrder?shopId=' + this.shopId
  819. })
  820. } else {
  821. if (this.backType != '') {
  822. setTimeout(function () {
  823. uni.navigateBack()
  824. }, 1000)
  825. } else {
  826. this.skuShow = false
  827. this.getOrderList()
  828. }
  829. }
  830. } else {
  831. this.$queue.showToast(res.msg)
  832. }
  833. })
  834. }
  835. },
  836. // 选择规格
  837. skuSel(item, index, ind) {
  838. this.attrList[index].goodsId = index
  839. this.attrList[index].attrId = ind
  840. this.checkStateList[index].name = item.name
  841. this.checkString = ''
  842. this.checkStateList.forEach((d) => {
  843. if (d.name) {
  844. if (this.checkString) {
  845. this.checkString = this.checkString + ',' + d.name
  846. } else {
  847. this.checkString = d.name
  848. }
  849. }
  850. })
  851. console.log(this.attrList)
  852. for (var i = 0; i < this.skuList.length; i++) {
  853. let d = this.skuList[i]
  854. if (d.detailJson == this.checkString) {
  855. console.log(d.detailJson, this.checkString)
  856. // if (d.stock > 0) {
  857. this.skuId = d.id
  858. this.skuMessage = d.detailJson
  859. this.price = d.skuPrice
  860. this.CheckattrValue = true
  861. // } else {
  862. // this.$queue.showToast('库存不足请选择其他规格')
  863. // }
  864. break
  865. } else {
  866. this.CheckattrValue = false
  867. }
  868. }
  869. },
  870. // 获取商品详情
  871. getData() {
  872. let data = {
  873. goodsId: this.goodsId
  874. }
  875. this.$Request.get('/app/goods/selectGoodsById', data).then((res) => {
  876. uni.hideLoading()
  877. if (res.code == 0) {
  878. this.goodsDet = res.data
  879. this.goodsDet.goodsLabel = this.goodsDet.goodsLabel ? this.goodsDet.goodsLabel.split(',') : []
  880. this.goodsDet.goodsPicture = this.goodsDet.goodsPicture ? this.goodsDet.goodsPicture.split(',') : []
  881. this.goodsDet.goodsParticularsPicture = this.goodsDet.goodsParticularsPicture ? this.goodsDet.goodsParticularsPicture.split(',') : []
  882. this.price = this.goodsDet.goodsMoney
  883. this.skuList = this.goodsDet.sku
  884. if (this.goodsDet.attr.length) {
  885. this.attrList = this.goodsDet.attr[0] ? this.goodsDet.attr[0].attrValue : []
  886. } else {
  887. this.skuId = this.goodsDet.sku[0].id
  888. }
  889. this.attrList.forEach((res) => {
  890. let data = {
  891. name: ''
  892. }
  893. this.checkStateList.push(data)
  894. let detail = []
  895. res.detail.split(',').forEach((d) => {
  896. let data = {
  897. name: '',
  898. state: ''
  899. }
  900. data.name = d
  901. detail.push(data)
  902. })
  903. res.detail = detail
  904. })
  905. }
  906. })
  907. }
  908. }
  909. }
  910. </script>
  911. <style scoped lang="scss">
  912. .pages {
  913. width: 100%;
  914. height: 100vh;
  915. background-color: #f5f5f5;
  916. }
  917. .timess {
  918. color: #999999;
  919. font-size: 24rpx;
  920. margin-left: 10rpx;
  921. }
  922. .pinglunImg {
  923. width: 100%;
  924. margin-top: 10rpx;
  925. }
  926. .pinglunImg-box {
  927. width: 100%;
  928. image {
  929. // margin-left: 10rpx;
  930. width: 140upx;
  931. height: 140upx;
  932. border-radius: 10rpx;
  933. }
  934. }
  935. // 评价
  936. .pingjia {
  937. width: 100%;
  938. height: auto;
  939. display: flex;
  940. justify-content: center;
  941. margin-top: 20rpx;
  942. background-color: #fff9ed;
  943. // padding-bottom: 50rpx;
  944. .pingjia-box {
  945. width: 686rpx;
  946. height: auto;
  947. border-radius: 16rpx;
  948. display: flex;
  949. justify-content: center;
  950. flex-wrap: wrap;
  951. .pingjia-box-title {
  952. // background-color: red;
  953. width: 600rpx;
  954. padding-top: 40rpx;
  955. padding-bottom: 10rpx;
  956. font-size: 32rpx;
  957. font-weight: 800;
  958. columns: #333333;
  959. }
  960. .pingjia-box-btn {
  961. width: 600rpx;
  962. display: flex;
  963. margin-top: 30rpx;
  964. padding-bottom: 50rpx;
  965. }
  966. .pingjia-box-item:nth-of-type(1) {
  967. margin-top: 50rpx;
  968. }
  969. .pingjia-box-item {
  970. width: 600rpx;
  971. margin-bottom: 50rpx;
  972. }
  973. }
  974. }
  975. .skuBtn {
  976. padding: 10rpx 30rpx;
  977. border-radius: 10rpx;
  978. text-align: center;
  979. margin: 10rpx 20rpx;
  980. font-size: 28rpx;
  981. color: #333333;
  982. border: 2px solid #f2f2f2;
  983. }
  984. .info {
  985. width: 100%;
  986. height: 283rpx;
  987. display: flex;
  988. justify-content: center;
  989. margin-top: 30rpx;
  990. .info-box {
  991. width: 686rpx;
  992. height: 100%;
  993. background-color: #fff9ed;
  994. border-radius: 16rpx;
  995. display: flex;
  996. justify-content: center;
  997. }
  998. .info-box-con {
  999. padding: 24rpx 0;
  1000. width: 615rpx;
  1001. height: 100%;
  1002. .info-box-con-name {
  1003. width: 100%;
  1004. margin-top: 16rpx;
  1005. color: #333333;
  1006. font-size: 38rpx;
  1007. font-weight: 800;
  1008. }
  1009. .info-box-con-cart {
  1010. width: 100%;
  1011. height: 38rpx;
  1012. display: flex;
  1013. margin-top: 20rpx;
  1014. view:nth-of-type(1) {
  1015. margin-left: 0;
  1016. }
  1017. view {
  1018. height: 100%;
  1019. background: rgba(129, 189, 179, 0.4);
  1020. border-radius: 4rpx;
  1021. color: #81bdb3;
  1022. margin-left: 10rpx;
  1023. padding: 0 15rpx 0 15rpx;
  1024. font-size: 20rpx;
  1025. font-weight: bold;
  1026. display: flex;
  1027. justify-content: center;
  1028. align-items: center;
  1029. }
  1030. }
  1031. .info-box-con-select {
  1032. margin-top: 16rpx;
  1033. width: 100%;
  1034. height: 56rpx;
  1035. display: flex;
  1036. justify-content: space-between;
  1037. .info-box-con-select-l {
  1038. display: flex;
  1039. align-items: center;
  1040. view:nth-of-type(1) {
  1041. color: #707070;
  1042. }
  1043. view:nth-of-type(2) {
  1044. color: #988251;
  1045. margin-left: 20rpx;
  1046. }
  1047. }
  1048. .info-box-con-select-r {
  1049. width: 176rpx;
  1050. height: 100%;
  1051. display: flex;
  1052. justify-content: center;
  1053. align-items: center;
  1054. font-size: 28rpx;
  1055. color: #333333;
  1056. font-weight: bold;
  1057. background: rgba(129, 189, 179, 0.8);
  1058. border: 2rpx solid #81bdb3;
  1059. border-radius: 8rpx;
  1060. }
  1061. }
  1062. }
  1063. }
  1064. .tabs {
  1065. width: 100%;
  1066. height: 86rpx;
  1067. display: flex;
  1068. justify-content: center;
  1069. margin-top: 44rpx;
  1070. background-color: #fff9ed;
  1071. border-bottom: 2rpx solid #e9e9e9;
  1072. border-radius: 32rpx 32rpx 0 0;
  1073. .tabs-box {
  1074. width: 686rpx;
  1075. height: 100%;
  1076. display: flex;
  1077. align-items: center;
  1078. .tabs-box-item:nth-of-type(1) {
  1079. margin-left: 0;
  1080. }
  1081. .tabs-box-item {
  1082. font-size: 32rpx;
  1083. font-weight: bold;
  1084. color: #333333;
  1085. margin-left: 100rpx;
  1086. width: 65rpx;
  1087. display: flex;
  1088. flex-wrap: wrap;
  1089. justify-content: center;
  1090. view {
  1091. width: 55rpx;
  1092. height: 6rpx;
  1093. background-color: #568d84;
  1094. margin-top: 6rpx;
  1095. border-radius: 10rpx;
  1096. }
  1097. }
  1098. }
  1099. }
  1100. .goodsInfo {
  1101. width: 100%;
  1102. height: auto;
  1103. display: flex;
  1104. justify-content: center;
  1105. .goodsInfo-box {
  1106. width: 686rpx;
  1107. height: 100%;
  1108. border-radius: 16rpx 16rpx 0 0;
  1109. display: flex;
  1110. justify-content: center;
  1111. .goodsInfo-box-c {
  1112. width: 600rpx;
  1113. height: 100%;
  1114. padding: 40rpx 0 40rpx 0;
  1115. }
  1116. .goodsInfo-box-title {
  1117. // margin-top: 40rpx;
  1118. color: #333333;
  1119. font-size: 32rpx;
  1120. font-weight: 800;
  1121. }
  1122. .goodsInfo-box-c-item {
  1123. margin-top: 40rpx;
  1124. display: flex;
  1125. view:nth-of-type(1) {
  1126. font-size: 28rpx;
  1127. color: #999999;
  1128. font-weight: 500;
  1129. }
  1130. view:nth-of-type(2) {
  1131. font-size: 28rpx;
  1132. color: #333333;
  1133. font-weight: 500;
  1134. margin-left: 83rpx;
  1135. }
  1136. }
  1137. }
  1138. }
  1139. .imgInfo {
  1140. width: 100%;
  1141. height: auto;
  1142. display: flex;
  1143. justify-content: center;
  1144. .imgInfo-box {
  1145. width: 686rpx;
  1146. border-radius: 0 0 16rpx 16rpx;
  1147. .imgInfo-box-title {
  1148. width: 100%;
  1149. text-align: center;
  1150. font-size: 28rpx;
  1151. font-weight: bold;
  1152. }
  1153. .imgInfo-box-img {
  1154. margin-top: 20rpx;
  1155. image {
  1156. width: 100%;
  1157. margin-top: -6rpx;
  1158. }
  1159. }
  1160. }
  1161. }
  1162. .settlement {
  1163. width: 94%;
  1164. line-height: 3.4;
  1165. position: fixed;
  1166. bottom: 10rpx;
  1167. left: 3%;
  1168. display: flex;
  1169. justify-content: space-between;
  1170. }
  1171. .settlement1 {
  1172. width: 94%;
  1173. background-color: rgba(129, 189, 179, 0.4);
  1174. line-height: 2.8;
  1175. border-radius: 49rpx;
  1176. position: relative;
  1177. /* bottom: 10rpx; */
  1178. left: 0;
  1179. right: 0;
  1180. /* left: 3%; */
  1181. display: flex;
  1182. justify-content: space-between;
  1183. margin: 20rpx auto;
  1184. }
  1185. .settlement_le {
  1186. width: 552rpx;
  1187. padding-left: 20%;
  1188. color: #000;
  1189. font-size: 30rpx;
  1190. background-image: url(@/static/images/index/1.png);
  1191. background-size: 100% 100%;
  1192. }
  1193. .settlement_le text {
  1194. font-size: 22rpx;
  1195. }
  1196. .settlement_ri {
  1197. margin-left: -8rpx;
  1198. width: 180rpx;
  1199. font-family: PingFang SC;
  1200. font-weight: 800;
  1201. color: #333333;
  1202. display: flex;
  1203. justify-content: center;
  1204. align-items: center;
  1205. background-image: url(@/static/images/index/2.png);
  1206. background-size: 100% 100%;
  1207. }
  1208. .settlement_img {
  1209. width: 91rpx;
  1210. height: 96rpx;
  1211. position: absolute;
  1212. // bottom: 30rpx;
  1213. left: 5%;
  1214. }
  1215. .settlement_img image {
  1216. margin-top: 10rpx;
  1217. width: 74rpx;
  1218. height: 81rpx;
  1219. }
  1220. .settlement_hot {
  1221. width: 35rpx;
  1222. height: 35rpx;
  1223. line-height: 35rpx;
  1224. text-align: center;
  1225. border-radius: 50%;
  1226. position: absolute;
  1227. top: 5rpx;
  1228. right: 0;
  1229. background-color: #ff130a;
  1230. color: #ffffff;
  1231. font-size: 20rpx;
  1232. font-weight: bold;
  1233. color: #ffffff;
  1234. }
  1235. .select_all {
  1236. width: 100%;
  1237. position: relative;
  1238. }
  1239. .btn {
  1240. padding: 10rpx 30rpx;
  1241. /* height: 60rpx; */
  1242. /* background-color: #F2F2F2; */
  1243. border-radius: 10rpx;
  1244. text-align: center;
  1245. /* line-height: 60rpx; */
  1246. margin-right: 20rpx;
  1247. font-size: 28rpx;
  1248. color: #333333;
  1249. border: 2px solid #f2f2f2;
  1250. }
  1251. .active {
  1252. /* border: 2px solid #FCD202 !important;
  1253. background: #FCD202 !important; */
  1254. background: rgba(129, 189, 179, 0.2) !important;
  1255. border: 2px solid rgba(129, 189, 179, 1) !important;
  1256. opacity: 0.6;
  1257. }
  1258. .detail_all {
  1259. position: relative;
  1260. }
  1261. /* banner */
  1262. .detail-banner {
  1263. width: 100%;
  1264. height: 400rpx;
  1265. }
  1266. .detail-banner image {
  1267. width: 100%;
  1268. height: 400rpx;
  1269. }
  1270. /* 详情 */
  1271. .detail {
  1272. width: 100%;
  1273. padding: 3%;
  1274. overflow: hidden;
  1275. position: relative;
  1276. top: -20rpx;
  1277. background-color: #ffffff;
  1278. border-radius: 32rpx 0 0 0;
  1279. }
  1280. .detail_text {
  1281. font-size: 36rpx;
  1282. font-weight: 800;
  1283. color: #333333;
  1284. }
  1285. .detail_biao {
  1286. display: flex;
  1287. padding: 2% 0;
  1288. }
  1289. .detail_biao_sty {
  1290. /* padding: 1% 1.5%; */
  1291. padding: 10rpx 20rpx;
  1292. background: #fcd202;
  1293. opacity: 0.6;
  1294. color: #666666;
  1295. border-radius: 8rpx;
  1296. font-size: 24rpx;
  1297. margin-right: 2%;
  1298. }
  1299. .detail_text2 {
  1300. font-size: 24rpx;
  1301. font-family: PingFang SC;
  1302. color: #333333;
  1303. margin-top: 1%;
  1304. }
  1305. .detail_biao2 {
  1306. display: flex;
  1307. padding: 1% 0;
  1308. font-size: 30rpx;
  1309. }
  1310. .detail_biao2_sty {
  1311. padding: 1% 2.5%;
  1312. /* width: 13%; */
  1313. text-align: center;
  1314. background: rgba(252, 210, 2, 0.2);
  1315. border: 2rpx solid #fcd202;
  1316. opacity: 0.6;
  1317. border-radius: 8rpx;
  1318. margin-right: 2%;
  1319. }
  1320. .detail_biao2_sty2 {
  1321. padding: 1% 2.5%;
  1322. /* width: 13%; */
  1323. text-align: center;
  1324. border: 2rpx solid #999999;
  1325. opacity: 0.6;
  1326. color: #999999;
  1327. border-radius: 8rpx;
  1328. margin-right: 3%;
  1329. }
  1330. /* 产品描述 */
  1331. .detail_describe {
  1332. width: 100%;
  1333. padding: 3% 0;
  1334. /* margin-bottom: 180rpx; */
  1335. position: relative;
  1336. // top: -40rpx;
  1337. top: 30rpx;
  1338. }
  1339. .detail_describe_ce {
  1340. width: 100%;
  1341. background-color: #ffffff;
  1342. padding: 3%;
  1343. font-size: 24rpx;
  1344. padding-bottom: 100upx;
  1345. }
  1346. .detail_describe_text {
  1347. font-size: 30rpx;
  1348. font-weight: 500;
  1349. color: #333333;
  1350. margin-bottom: 20rpx;
  1351. }
  1352. .detail_describe_text2 {
  1353. font-weight: 500;
  1354. margin-top: 2%;
  1355. color: #999999;
  1356. }
  1357. /* 加购 */
  1358. .detail_account {
  1359. width: 100%;
  1360. background-color: #ffffff;
  1361. padding: 3%;
  1362. margin-top: 2%;
  1363. position: fixed;
  1364. bottom: 0;
  1365. box-shadow: 0 -10rpx 20rpx #cccccc;
  1366. }
  1367. .detail_account_text {
  1368. font-size: 35rpx;
  1369. font-weight: bold;
  1370. color: #333333;
  1371. }
  1372. .detail_account_text text {
  1373. font-size: 27rpx;
  1374. }
  1375. .detail_account_top {
  1376. width: 100%;
  1377. display: flex;
  1378. justify-content: space-between;
  1379. align-items: center;
  1380. }
  1381. .detail_account_top_le {
  1382. width: 80%;
  1383. padding-bottom: 32upx;
  1384. padding-top: 32upx;
  1385. }
  1386. .detail_account_top_ri {
  1387. width: 20%;
  1388. display: flex;
  1389. margin-top: 2%;
  1390. }
  1391. .detail_account_top_text {
  1392. padding: 2%;
  1393. line-height: 54rpx;
  1394. }
  1395. .detail_account_top_ri image {
  1396. width: 54rpx;
  1397. height: 54rpx;
  1398. }
  1399. .detail_account_bottom {
  1400. margin-top: 20rpx;
  1401. width: 100%;
  1402. display: flex;
  1403. justify-content: space-between;
  1404. /* margin: 4% 0 3%; */
  1405. }
  1406. .detail_account_bottom_le {
  1407. width: 47.5%;
  1408. /* margin-right: 5%; */
  1409. border-radius: 44rpx;
  1410. text-align: center;
  1411. line-height: 2.8;
  1412. border: 2rpx solid rgba(129, 189, 179, 1);
  1413. background-color: rgba(129, 189, 179, 0.4);
  1414. }
  1415. .detail_account_bottom_ri {
  1416. width: 47.5%;
  1417. border-radius: 44rpx;
  1418. text-align: center;
  1419. line-height: 2.8;
  1420. background-color: rgba(129, 189, 179, 1);
  1421. }
  1422. </style>