goodDetails.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985
  1. <template>
  2. <view class="container">
  3. <view v-if="goodData.productType == 2">
  4. <view class="auction-title" @click="isOpen = !isOpen">拍卖规则
  5. <u-icon :name="isOpen?'arrow-up-fill':'arrow-down-fill'" color="#ffffff" style="margin-left:5px"></u-icon>
  6. </view>
  7. <view v-if="isOpen" class="auction-explain">
  8. <span>特别注意:</span>
  9. <p>本商城拍卖采用竞拍即付款的拍卖方式,每名会员每次拍卖仅能购买一件拍卖商品,同时根据拍卖商品的数量也可能会有多个会员竞拍成功。</p>
  10. <span>关于退款:</span>
  11. <p>会员出价如果已经不具有竞拍成功资质(也就是出价已经不是最高出价的几名会员之一时),则会立刻退还费用。同一会员多次出价会立刻退还上次出价的费用。</p>
  12. <span>关于竞拍结果:</span>
  13. <p>拍卖结束时,出价最高的几名会员竞拍成功,至多有"拍卖商品数量"个竞拍成功的会员。</p>
  14. </view>
  15. </view>
  16. <!-- <u-collapse v-if="goodType == 2" :head-style="auctiontitle">
  17. <u-collapse-item>
  18. <view slot="title-all" class="auction-title" @click="isOpen = !isOpen">拍卖规则
  19. <u-icon :name="isOpen?'arrow-up-fill':'arrow-down-fill'" color="#ffffff" style="margin-left:5px"></u-icon>
  20. </view>
  21. <view class="auction-main">
  22. <view class="auction-explain">
  23. <span>特别注意:</span>
  24. <p>本商城拍卖采用竞拍即付款的拍卖方式,每名会员每次拍卖仅能购买一件拍卖商品,同时根据拍卖商品的数量也可能会有多个会员竞拍成功。</p>
  25. <span>关于退款:</span>
  26. <p>会员出价如果已经不具有竞拍成功资质(也就是出价已经不是最高出价的几名会员之一时),则会立刻退还费用。同一会员多次出价会立刻退还上次出价的费用。</p>
  27. <span>关于竞拍结果:</span>
  28. <p>拍卖结束时,出价最高的几名会员竞拍成功,至多有"拍卖商品数量"个竞拍成功的会员。</p>
  29. </view>
  30. </view>
  31. </u-collapse-item>
  32. </u-collapse> -->
  33. <swiper class="swiper" :style="{width: swiperHeight+'px', height: swiperHeight+'px'}" :indicator-dots="true" indicator-color="#9A9A9A" indicator-active-color="#52A63A" :autoplay="true"
  34. :interval="3000" :duration="500">
  35. <swiper-item v-for="(item,index) in goodData.imgs" :key="index">
  36. <image :src="item.imgPath" mode="aspectFill" style="width: 100%;height: 100%;"></image>
  37. </swiper-item>
  38. </swiper>
  39. <view class="good-info">
  40. <view class="auction-date" v-if="goodData.productType == 2">
  41. <text class="iconfont iconshijian"></text>
  42. {{goodData.auctionEndTime}}结束
  43. </view>
  44. <view class="good-price">
  45. <view class="auction-unit" v-if="goodData.productType == 2 || goodData.productType == 4">
  46. <view class="unit-type">RMB</view>
  47. <view class="unit-text">当前价</view>
  48. </view>
  49. <text class="sale-icon">¥</text>
  50. <text class="sale-price">{{ goodData.productType == 2 ? currentPrice : goodData.bizPrice }}</text>
  51. <text class="price" v-if="goodData.productType != 2">原价:{{goodData.originalPrice}}</text>
  52. <text class="seller-count" v-if="goodData.productType != 2 && goodData.productType != 4">{{goodData.sellCount}}人付款</text>
  53. <text class="good-stock" v-if="goodData.productType == 2">仅限{{goodData.stock}}份</text>
  54. </view>
  55. <view class="good-name">{{goodData.productName}}</view>
  56. <view class="good-plant" v-if="goodData.productType == 4">时长:{{goodData.term}}天&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;面积:{{goodData.areaSize}}平米</view>
  57. <view class="good-detail">{{goodData.productDescribe ? goodData.productDescribe : '暂无描述'}}</view>
  58. </view>
  59. <view class="good-data" v-if="goodData.productType != 2 && goodData.productType != 4">
  60. <text class="good-select">商品规格</text>
  61. <!-- <text class="good-unit">{{number}}&nbsp;{{goodData.unit ? goodData.unit : ''}}</text> -->
  62. <text class="good-unit">{{goodData.unit ? goodData.unit : ''}}</text>
  63. <!-- <text class="iconfont iconfangxiang"></text>
  64. -->
  65. </view>
  66. <view class="buy-num" v-if="goodData.productType != 2 && !minePlant">
  67. <view class="buy-num1">
  68. <view class="buy-text">库存:</view>
  69. <view class="buy-select">{{goodData.stock}}</view>
  70. </view>
  71. <view class="buy-line"></view>
  72. <view class="buy-num1">
  73. <view class="buy-text">购买数量:</view>
  74. <!-- <view style="display: flex;">
  75. <uni-icons type="minus-filled" size="20" color="#A67A54" @click="number>1?number--:''"></uni-icons>
  76. <text class="buy-select">{{number}}</text>
  77. <u-input
  78. v-model="number"
  79. type="number"
  80. height="40"
  81. placeholder=" "
  82. :clearable="false"
  83. input-align="center"
  84. :custom-style="{width:'40px'}"/>
  85. <uni-icons type="plus-filled" size="20" color="#A67A54" @click="number++"></uni-icons>
  86. </view> -->
  87. <view>
  88. <CnumberBox @getNum="getNum" :isDisabled="true" minNum="1"></CnumberBox>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="tab-box">
  93. <view class="tab-col" :class="tabIndex == 1 ? 'tab-col-active' :''" @click="tabIndex = 1">产品介绍</view>
  94. <view class="tab-col" :class="tabIndex == 2 ? 'tab-col-active' :''" v-if="goodData.productType != 2"
  95. @click="tabIndex = 2">用户评价</view>
  96. </view>
  97. <rich-text :nodes="goodData.sellDesc" v-if="tabIndex == 1"></rich-text>
  98. <view class="good-assess" v-else>
  99. <view class="assess-row" v-for="(item,index) in assessList" :key="index">
  100. <image class="assess-head" :src="item.headimg"></image>
  101. <view class="assess-info">
  102. <view class="assess-name">{{item.nickname}}</view>
  103. <view class="assess-date">{{item.evaluateTime}}</view>
  104. <view class="assess-sore-box">
  105. <u-rate v-model="item.score" active-color="#FFAE21" disabled></u-rate>
  106. </view>
  107. <view class="assess-text">{{item.evaluateContent}}</view>
  108. <view class="assess-img-box">
  109. <image class="img-col" v-for="site in item.evaluateImgs" :key="site" :src="site.imgUrl" @tap="_previewImage(site.imgUrl,i)"></image>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="assess-more" @click="goToEvaluate()">显示全部</view>
  114. </view>
  115. <view class="good-recommend">
  116. <view class="recommend-title">为您推荐</view>
  117. <scroll-view class="recommend-box" scroll-x="true">
  118. <view class="good-col" v-for="(item, index) in goodsList" :key="index" @click="goToGoodDetails(item)">
  119. <image class="good-img" :src="item.imgPath" mode="aspectFill"></image>
  120. <view class="good-name">{{item.productName}}</view>
  121. <view class="good-price">¥{{item.bizPrice}}</view>
  122. </view>
  123. </scroll-view>
  124. </view>
  125. <uni-goods-nav :fill="true" :options="goodData.productType == 4 ? [] : options" @click="goToShop" @buttonClick="showPopup"
  126. style="width: 100%; position: fixed; bottom: 0px;z-index: 2;" :buttonGroup="goodData.productType == 2 ? buttonGroup2 : (goodData.productType == 4 ? (minePlant ? buttonGroup4 : buttonGroup3) : buttonGroup1)" />
  127. <!-- <uni-popup ref="popup" type="bottom">
  128. <view class="popup-box">
  129. <view class="popup-good-info-box">
  130. <image mode="aspectFill" class="popup-good-img" v-if="goodData.imgs.length" :src="goodData.imgs[0].imgPath"></image>
  131. <view class="popup-good-data">
  132. <view class="popup-good-price"><text style="font-size: 14px;">¥</text>{{goodData.bizPrice}}</view>
  133. <view class="popup-good-number">库存{{goodData.stock}}件</view>
  134. <view class="popup-good-type">单位:{{goodData.unit}}</view>
  135. </view>
  136. <view class="popup-good-close"></view>
  137. </view>
  138. <view class="popup-good-info">数量</view>
  139. <view class="popup-good-number-box">
  140. <uni-icons type="minus-filled" size="20" color="#A67A54" @click="number>1?number--:''"></uni-icons>
  141. <text class="good-select">{{number}}</text>
  142. <uni-icons type="plus-filled" size="20" color="#A67A54" @click="number++"></uni-icons>
  143. </view>
  144. <uni-goods-nav :fill="true" :options="[]" :buttonGroup="buttonGroup1" @buttonClick="submitData" style="width: 100%; position: absolute; bottom: 0px;left:0px" />
  145. </view>
  146. </uni-popup> -->
  147. <u-top-tips ref="uTips"></u-top-tips>
  148. </view>
  149. </template>
  150. <script>
  151. const NET = require('@/utils/request')
  152. const API = require('@/config/api')
  153. import CnumberBox from '@/components/CnumberBox.vue'
  154. export default {
  155. components: {
  156. CnumberBox
  157. },
  158. data() {
  159. return {
  160. // 从我的种植进入minePlant为true
  161. swiperHeight: 375,
  162. minePlant: false,
  163. goodId: '',
  164. goodData: {
  165. bizPrice: '',
  166. auctionStartPrice: '',
  167. originalPrice: '',
  168. productType: '',
  169. sellCount: '',
  170. productName: '',
  171. productDescribe: '',
  172. unit: '',
  173. sellDesc: '',
  174. stock: '',
  175. auctionEndTime: '',
  176. term: '',
  177. areaSize: '',
  178. imgs: [],
  179. },
  180. orderId: '',
  181. currentPrice: '',
  182. assessList: [],
  183. goodsList: [],
  184. number: 1,
  185. tabIndex: 1,
  186. options: [{
  187. icon: 'shop',
  188. text: '店铺',
  189. },{
  190. icon: 'cart',
  191. text: '购物车',
  192. info: 0,
  193. infoBackgroundColor: '#52A63A',
  194. infoColor:""
  195. }],
  196. buttonGroup1: [{
  197. text: '加入购物车',
  198. backgroundColor: '#75BD60',
  199. color: '#fff'
  200. },
  201. {
  202. text: '立即购买',
  203. backgroundColor: '#52A63A',
  204. color: '#fff'
  205. }
  206. ],
  207. buttonGroup2: [{
  208. text: '立即参拍',
  209. backgroundColor: '#52A63A',
  210. color: '#fff'
  211. }],
  212. buttonGroup3: [{
  213. text: '立即购买',
  214. backgroundColor: '#52A63A',
  215. color: '#fff'
  216. }],
  217. buttonGroup4: [{
  218. text: '视察',
  219. backgroundColor: '#75BD60',
  220. color: '#fff'
  221. }, {
  222. text: '委托',
  223. backgroundColor: '#52A63A',
  224. color: '#fff'
  225. }],
  226. isOpen: false,
  227. }
  228. },
  229. onLoad(options) {
  230. this.goodId = options.goodId ? options.goodId : ''
  231. this.minePlant = options.minePlant ? options.minePlant : false
  232. this.orderId = options.orderId ? options.orderId : ''
  233. uni.getSystemInfo({
  234. success: (res) => {
  235. this.swiperHeight = res.windowWidth
  236. }
  237. })
  238. if (this.minePlant) {
  239. uni.setNavigationBarTitle({
  240. title:'我的种植'
  241. })
  242. } else {
  243. uni.setNavigationBarTitle({
  244. title:'商品详情'
  245. })
  246. }
  247. },
  248. onReady() {
  249. this.getGoodsList()
  250. this.getGoodDetail()
  251. },
  252. methods: {
  253. // 获取商品详情获取商品评价
  254. getGoodDetail() {
  255. if (this.goodId) {
  256. NET.request(API.getCommonGoodDetail + '/' + this.goodId, {}, 'GET').then(res => {
  257. this.goodData = res.data
  258. if (this.goodData.cartNum > 0) {
  259. this.options[1].info = this.goodData.cartNum
  260. }
  261. if(this.goodData.sellDesc) this.goodData.sellDesc = this.goodData.sellDesc.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
  262. if (this.goodData.productType == 2) {
  263. this.getAuctionData()
  264. }
  265. }).catch(res => {
  266. this.$refs.uTips.show({
  267. title: '获取商品详情失败',
  268. type: 'warning',
  269. })
  270. })
  271. NET.request(API.getAssessList + this.goodId + '/1/3', {}, 'GET').then(res => {
  272. this.assessList = res.data.list
  273. }).catch(res => {
  274. this.$refs.uTips.show({
  275. title: '获取商品评价失败',
  276. type: 'warning',
  277. })
  278. })
  279. }
  280. },
  281. // 获取子组件的购买数量
  282. getNum(num) {
  283. this.number = num
  284. },
  285. // 获取拍卖详情
  286. getAuctionData() {
  287. NET.request(API.getAuctionDetail + this.goodId, {}, 'GET').then(res => {
  288. this.currentPrice = res.data.auctionStartPrice
  289. }).catch(error => {
  290. this.$refs.uTips.show({
  291. title: error.data.msg,
  292. type: 'warning',
  293. })
  294. })
  295. },
  296. // 跳转商铺页
  297. goToShop(e) {
  298. if (e.index == 0) {
  299. uni.navigateTo({
  300. url: '/pagesGood/shopDetails?goodId=' + this.goodId
  301. });
  302. } else {
  303. uni.switchTab({
  304. url: '/pages/cart/cart'
  305. });
  306. }
  307. },
  308. // 图片预览
  309. _previewImage(image,index) {
  310. var imgArr = [];
  311. imgArr.push(image);
  312. //预览图片
  313. uni.previewImage({
  314. urls: imgArr,
  315. current: imgArr[index]
  316. });
  317. },
  318. // 跳转评价页
  319. goToEvaluate() {
  320. uni.navigateTo({
  321. url: '/pagesGood/evaluateList?goodId=' + this.goodId
  322. });
  323. },
  324. // 获取为你推荐
  325. getGoodsList() {
  326. NET.request(API.getPreferGoods, {}, 'GET').then(res => {
  327. this.goodsList = res.data
  328. }).catch(error => {
  329. this.$refs.uTips.show({
  330. title: '获取为您推荐列表失败',
  331. type: 'warning',
  332. })
  333. })
  334. },
  335. // 跳转为你推荐商品详情
  336. goToGoodDetails(item) {
  337. uni.navigateTo({
  338. url: '/pagesGood/goodDetails?goodId=' + item.productId + '&goodType=' + item.productType
  339. });
  340. },
  341. // 弹出购物弹窗->需求变更,不需要购物车弹窗,直接加入购物车
  342. showPopup(e) {
  343. uni.removeStorageSync('defaultAddress');
  344. this.setGoodStorage()
  345. if (this.goodData.productType == 2) {
  346. //拍卖商品
  347. uni.navigateTo({
  348. url: '/pagesGood/auctionDetail?goodId=' + this.goodId
  349. });
  350. } else if (this.goodData.productType == 4) {
  351. //共享种植商品
  352. if (this.minePlant) {
  353. // 如果是已买到的共享种植
  354. if (e.index == 0) {
  355. // 去视察
  356. uni.navigateTo({
  357. url: '/pagesGood/plantVideo?productId=' + this.goodId
  358. });
  359. } else {
  360. // 去委托种植
  361. uni.navigateTo({
  362. url: '/pagesMain/entrustList?productId=' + this.goodData.productId + '&tenantCode=' + this.goodData.tenantCode +
  363. '&productName=' + this.goodData.productName + '&areaSize=' + this.orderId + '&orderId=' + this.orderId
  364. });
  365. }
  366. } else {
  367. // if (e.index == 0) {
  368. // this.$refs.popup.open()
  369. // } else if (e.index == 1) {
  370. uni.navigateTo({
  371. url: '/pagesGood/orderPay?flag=2&orderType=3&paySum=' + this.goodData.bizPrice
  372. });
  373. // }
  374. }
  375. } else {
  376. // 需求变更,不需要购物车弹窗,直接加入购物车
  377. // this.$refs.popup.open()
  378. if (e.index == 0) {
  379. NET.request(API.addCart, {
  380. productId: this.goodId,
  381. productName: this.goodData.productName,
  382. imgUrl: this.goodData.imgs.length ? this.goodData.imgs[0].imgPath : '',
  383. bizPrice: this.goodData.bizPrice,
  384. originalPrice: this.goodData.originalPrice,
  385. productType: this.goodData.productType,
  386. tenantCode: this.goodData.tenantCode,
  387. buyNum: this.number
  388. }, 'POST').then(res => {
  389. this.$refs.uTips.show({
  390. title: '加入购物车成功',
  391. type: 'success',
  392. })
  393. // this.$refs.popup.close()
  394. this.getGoodDetail()
  395. }).catch(error => {
  396. console.log(error)
  397. this.$refs.uTips.show({
  398. title: '加入购物车失败',
  399. type: 'warning',
  400. })
  401. })
  402. } else {
  403. // 立即购买
  404. this.setGoodStorage()
  405. uni.navigateTo({
  406. url: '/pagesGood/orderPay?flag=2&orderType=1'
  407. });
  408. }
  409. }
  410. },
  411. // 存入商品信息缓存
  412. setGoodStorage() {
  413. uni.setStorage({
  414. key: 'orderData',
  415. data: {
  416. tenantCode: this.goodData.tenantCode,
  417. supplierName: this.goodData.supplierName,
  418. areaSize: this.goodData.productType == 4 ? this.goodData.areaSize : '',
  419. term: this.goodData.productType == 4 ? this.goodData.term : '',
  420. goodsList: [{
  421. bizPrice: this.goodData.bizPrice,
  422. buyNum: this.number,
  423. imgUrl: this.goodData.imgs.length ? this.goodData.imgs[0].imgPath : '',
  424. originalPrice: this.goodData.productType == 2 ? this.goodData.auctionStartPrice : this.goodData.originalPrice,
  425. productId: this.goodId,
  426. productName: this.goodData.productName,
  427. productType: this.goodData.productType,
  428. shoppingcartId: '',
  429. }]
  430. }
  431. });
  432. },
  433. // 提交操作
  434. submitData(e) {
  435. // if (e.index) {
  436. // // 立即购买
  437. // this.setGoodStorage()
  438. // uni.navigateTo({
  439. // url: '/pagesGood/orderPay?flag=2&orderType=1'
  440. // });
  441. // } else {
  442. // // 加入购物车
  443. // NET.request(API.addCart, {
  444. // productId: this.goodId,
  445. // productName: this.goodData.productName,
  446. // imgUrl: this.goodData.imgs.length ? this.goodData.imgs[0].imgPath : '',
  447. // bizPrice: this.goodData.bizPrice,
  448. // originalPrice: this.goodData.originalPrice,
  449. // productType: this.goodData.productType,
  450. // tenantCode: this.goodData.tenantCode,
  451. // buyNum: this.number
  452. // }, 'POST').then(res => {
  453. // this.$refs.uTips.show({
  454. // title: '加入购物车成功',
  455. // type: 'success',
  456. // })
  457. // this.$refs.popup.close()
  458. // }).catch(error => {
  459. // this.$refs.uTips.show({
  460. // title: '加入购物车失败',
  461. // type: 'warning',
  462. // })
  463. // })
  464. // }
  465. },
  466. },
  467. }
  468. </script>
  469. <style lang="less">
  470. .swiper {
  471. /deep/.uni-swiper-dot-active {
  472. width: 16px !important;
  473. border-radius: 8px;
  474. }
  475. }
  476. </style>
  477. <style lang="less" scoped>
  478. .container {
  479. background-color: #f7f7f7;
  480. padding-bottom: 50px;
  481. .swiper {
  482. // height: 375px;
  483. /deep/.uni-swiper-dot-active {
  484. width: 16px !important;
  485. border-radius: 8px;
  486. }
  487. }
  488. .auction-title {
  489. height: 35px;
  490. background:#52A63A;
  491. color: #FFFFFF;
  492. text-align: center;
  493. padding: 5px;
  494. line-height: 25px;
  495. }
  496. .auction-explain {
  497. background:#52A63A;
  498. color: #FFFFFF;
  499. border-radius: 0 0 8px 8px;
  500. // text-align: center;
  501. padding: 10px;
  502. p {
  503. margin-bottom: 5px;
  504. text-indent:25px;
  505. }
  506. }
  507. .good-info {
  508. box-sizing: border-box;
  509. padding: 0px 16px 22px 16px;
  510. background-color: #FFFFFF;
  511. .auction-date {
  512. width: calc(100% + 32px);
  513. height: 32px;
  514. box-sizing: border-box;
  515. padding: 0 16px;
  516. margin-left: -16px;
  517. background: #999999;
  518. line-height: 32px;
  519. font-size: 12px;
  520. font-family: PingFang SC;
  521. color: #FFFFFF;
  522. .iconshijian {
  523. font-size: 16px;
  524. margin-right: 8px;
  525. }
  526. }
  527. .good-price {
  528. height: 26px;
  529. padding-top: 22px;
  530. box-sizing: content-box;
  531. line-height: 26px;
  532. font-family: PingFang SC;
  533. white-space: nowrap;
  534. .auction-unit {
  535. width: 40px;
  536. height: 26px;
  537. float: left;
  538. .unit-type {
  539. height: 12px;
  540. font-size: 9px;
  541. font-family: PingFang SC;
  542. color: #666666;
  543. line-height: 9px;
  544. }
  545. .unit-text {
  546. height: 12px;
  547. font-size: 9px;
  548. font-family: PingFang SC;
  549. color: #52A63A;
  550. line-height: 12px;
  551. }
  552. }
  553. .sale-icon {
  554. font-size: 16px;
  555. color: #52A63A;
  556. margin-left: -2px;
  557. }
  558. .sale-price {
  559. font-size: 24px;
  560. color: #52A63A;
  561. }
  562. .price {
  563. font-size: 12px;
  564. text-decoration: line-through;
  565. color: #A67A54;
  566. margin-left: 6px;
  567. }
  568. .seller-count {
  569. float: right;
  570. font-size: 12px;
  571. color: #666666;
  572. }
  573. .good-stock {
  574. float: right;
  575. font-size: 12px;
  576. color: #A67954;
  577. }
  578. }
  579. .good-name {
  580. line-height: 20px;
  581. font-size: 16px;
  582. color: #343434;
  583. font-family: PingFang SC;
  584. margin: 12px 0 8px 0;
  585. }
  586. .good-plant {
  587. line-height: 14px;
  588. font-size: 12px;
  589. color: #000000;
  590. font-family: PingFang SC;
  591. margin-bottom: 4px;
  592. }
  593. .good-detail {
  594. line-height: 16px;
  595. font-size: 12px;
  596. color: #666666;
  597. font-family: PingFang SC;
  598. }
  599. }
  600. .good-data {
  601. display: flex;
  602. justify-content: space-between;
  603. height: 46px;
  604. margin-top: 10px;
  605. box-sizing: border-box;
  606. background-color: #FFFFFF;
  607. padding: 14px 16px;
  608. font-family: PingFang SC;
  609. font-size: 12px;
  610. line-height: 14px;
  611. .good-select {
  612. color: #666666;
  613. margin-right: 12px;
  614. }
  615. .good-unit {
  616. color: #343434;
  617. }
  618. .iconfont {
  619. float: right;
  620. font-size: 16px;
  621. color: #999999;
  622. }
  623. }
  624. .buy-num {
  625. height: 90px;
  626. box-sizing: border-box;
  627. background-color: #FFFFFF;
  628. padding: 14px 16px;
  629. font-family: PingFang SC;
  630. margin-top: 10px;
  631. // font-size: 12px;
  632. // line-height: 14px;
  633. .buy-num1 {
  634. display: flex;
  635. justify-content: space-between;
  636. margin-bottom: 10px;
  637. font-size: 14px;
  638. .buy-text {
  639. margin-right: 10px;
  640. font-size: 14px;
  641. }
  642. .buy-select {
  643. font-size: 14px;
  644. font-family: PingFang SC;
  645. color: #343434;
  646. // margin: 0 12px;
  647. line-height: 20px;
  648. // margin-right: 10px;
  649. }
  650. }
  651. .buy-line {
  652. width:100%;
  653. height: 1px;
  654. //border: 1px solid #e2e2e2;
  655. margin-bottom: 10px;
  656. }
  657. .buy-num2 {
  658. }
  659. }
  660. .tab-box {
  661. height: 50px;
  662. background-color: #FFFFFF;
  663. box-sizing: border-box;
  664. padding: 0 16px;
  665. display: flex;
  666. justify-content: space-around;
  667. margin-top: 10px;
  668. .tab-col {
  669. height: 49px;
  670. font-size: 13px;
  671. font-family: PingFang SC;
  672. color: #666666;
  673. line-height: 50px;
  674. }
  675. .tab-col-active {
  676. font-size: 15px;
  677. color: #343434;
  678. border-bottom: 2px solid #52A63A;
  679. }
  680. }
  681. .good-assess {
  682. width: 100%;
  683. box-sizing: border-box;
  684. background-color: #FFFFFF;
  685. padding: 12px 16px 18px 16px;
  686. .assess-row {
  687. border-top: 1px solid #F6F6F6;
  688. padding: 12px 0;
  689. display: flex;
  690. .assess-head {
  691. width: 50px;
  692. height: 50px;
  693. object-fit: cover;
  694. border-radius: 50%;
  695. }
  696. .assess-info {
  697. width: calc(100% - 62px);
  698. margin-left: 12px;
  699. .assess-name {
  700. height: 18px;
  701. float: left;
  702. line-height: 18px;
  703. font-size: 15px;
  704. font-family: PingFang SC;
  705. font-weight: bold;
  706. color: #343434;
  707. }
  708. .assess-date {
  709. height: 18px;
  710. float: right;
  711. line-height: 18px;
  712. font-size: 12px;
  713. font-family: PingFang SC;
  714. font-weight: bold;
  715. color: #666666;
  716. }
  717. .assess-sore-box {
  718. width: 100%;
  719. height: 16px;
  720. float: left;
  721. margin: 6px 0;
  722. }
  723. .assess-text {
  724. width: 100%;
  725. float: left;
  726. font-size: 12px;
  727. font-family: PingFang SC;
  728. font-weight: bold;
  729. color: #666666;
  730. line-height: 16px;
  731. margin: 8px 0 10px 0;
  732. overflow: hidden;
  733. text-overflow: ellipsis;
  734. display: -webkit-box;
  735. -webkit-line-clamp: 2;
  736. -webkit-box-orient: vertical;
  737. word-wrap: break-word;
  738. }
  739. .assess-img-box {
  740. width: 100%;
  741. float: left;
  742. display: flex;
  743. .img-col {
  744. height: 60px;
  745. width: 60px;
  746. object-fit: cover;
  747. margin: 0 10px 10px 0;
  748. }
  749. }
  750. }
  751. }
  752. .assess-row:first-child {
  753. border-top: none;
  754. padding-top: 0;
  755. }
  756. .assess-more {
  757. width: 220px;
  758. height: 32px;
  759. position: relative;
  760. left: 50%;
  761. transform: translateX(-50%);
  762. border: 1px solid #52A63A;
  763. border-radius: 16px;
  764. text-align: center;
  765. font-size: 12px;
  766. font-family: PingFang SC;
  767. color: #53A63A;
  768. line-height: 32px;
  769. }
  770. }
  771. .good-recommend {
  772. height: 192px;
  773. background-color: #FFFFFF;
  774. margin: 10px 0;
  775. .recommend-title {
  776. height: 24px;
  777. padding-left: 16px;
  778. font-size: 14px;
  779. font-family: PingFang SC;
  780. color: #343434;
  781. line-height: 32px;
  782. }
  783. .recommend-box {
  784. width: 100%;
  785. height: 168px;
  786. white-space: nowrap;
  787. .good-col {
  788. width: 108px;
  789. height: 158px;
  790. margin: 10px 12px 10px 0px;
  791. border-radius: 5px;
  792. overflow: hidden;
  793. background: #FFFFFF;
  794. box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.15);
  795. display: inline-block;
  796. .good-img {
  797. width: 108px;
  798. height: 108px;
  799. object-fit: cover;
  800. }
  801. .good-name {
  802. width: 100%;
  803. height: 14px;
  804. float: left;
  805. box-sizing: border-box;
  806. padding: 0 5px;
  807. font-size: 10px;
  808. font-family: PingFang SC;
  809. color: #343434;
  810. line-height: 14px;
  811. margin: 4px 0;
  812. white-space: nowrap;
  813. overflow: hidden;
  814. text-overflow: ellipsis;
  815. }
  816. .good-price {
  817. width: 100%;
  818. height: 16px;
  819. float: left;
  820. box-sizing: border-box;
  821. padding: 0 3px;
  822. font-size: 14px;
  823. font-family: PingFang SC;
  824. color: #56a83a;
  825. line-height: 16px;
  826. margin-bottom: 10px
  827. }
  828. }
  829. .good-col:first-child {
  830. margin-left: 16px;
  831. }
  832. .good-col:last-child {
  833. margin-right: 16px;
  834. }
  835. }
  836. }
  837. .popup-box {
  838. width: 100vw;
  839. height: 362px;
  840. background-color: #FFFFFF;
  841. border-radius: 15px 15px 0px 0px;
  842. box-sizing: border-box;
  843. padding: 16px 16px 0 16px;
  844. .popup-good-info-box {
  845. height: 90px;
  846. margin-bottom: 4px;
  847. display: flex;
  848. .popup-good-img {
  849. width: 90px;
  850. height: 90px;
  851. object-fit: cover;
  852. border-radius: 5px;
  853. overflow: hidden;
  854. }
  855. .popup-good-data {
  856. width: calc(100% - 136px);
  857. height: 90px;
  858. margin-left: 22px;
  859. .popup-good-price {
  860. margin-top: 10px;
  861. height: 20px;
  862. line-height: 20px;
  863. font-size: 20px;
  864. font-family: PingFang SC;
  865. color: #52A63A;
  866. }
  867. .popup-good-number {
  868. height: 16px;
  869. font-size: 13px;
  870. font-family: PingFang SC;
  871. color: #9A9A9A;
  872. line-height: 16px;
  873. margin: 12px 0 10px 0;
  874. }
  875. .popup-good-type {
  876. height: 16px;
  877. font-size: 13px;
  878. font-family: PingFang SC;
  879. color: #343434;
  880. line-height: 16px;
  881. }
  882. }
  883. .popup-good-close {
  884. width: 24px;
  885. height: 24px;
  886. }
  887. }
  888. .popup-good-info {
  889. height: 33px;
  890. box-sizing: border-box;
  891. padding-top: 16px;
  892. margin-top: 16px;
  893. border-top: 1px solid #ECECEC;
  894. font-size: 14px;
  895. font-family: PingFang SC;
  896. color: #9A9A9A;
  897. line-height: 16px;
  898. }
  899. .popup-good-unit {
  900. height: 28px;
  901. display: inline-block;
  902. padding: 0 22px;
  903. margin-top: 14px;
  904. background: #52A63A;
  905. border-radius: 14px;
  906. font-size: 14px;
  907. font-family: PingFang SC;
  908. color: #FFFFFF;
  909. line-height: 28px;
  910. }
  911. .popup-good-number-box {
  912. height: 20px;
  913. float: right;
  914. margin-top: -20px;
  915. .good-select {
  916. font-size: 16px;
  917. font-family: PingFang SC;
  918. color: #343434;
  919. margin: 0 12px;
  920. line-height: 20px;
  921. }
  922. }
  923. }
  924. }
  925. </style>