goodDetails.vue 22 KB

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