goodsDet.vue 37 KB

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