goodsDet.vue 36 KB

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