goodsDet.vue 37 KB

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