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