goodsDet.vue 39 KB

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