detail.vue 22 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012
  1. <template>
  2. <view class="container">
  3. <view class="introduce-section">
  4. <view class="price-box">
  5. <view class="title">{{goods.title}}</view>
  6. <view v-if='goods.isFutures==0' class="title-tip">
  7. <text class="price-tip">¥</text>
  8. <text class="price">{{goods.price}}</text>
  9. <text class="price-tip">元/吨</text>
  10. </view>
  11. <view v-else class="title-tip">
  12. <text class="price-tip">今日基差</text>
  13. <text class="price-tip">¥</text>
  14. <text class="price-tip">{{goods.basis}}</text>
  15. <text class="price-tip">元/吨</text>
  16. </view>
  17. </view>
  18. <view class="bot-row">
  19. <view v-if='goods.companyId==2' class='cu-tag radius line-orange'>佳屹农</view>
  20. <view v-else class='cu-tag radius line-orange'>易粮易运</view>
  21. <view v-if='goods.sellerPhone && goods.companyId!=2' class='cu-tag radius line-orange' >{{goods.sellerPhone}}</view>
  22. <!-- <view class='cu-tag radius line-orange'>{{goods.basis}}元/吨</view> -->
  23. </view>
  24. <!-- <view v-if='goods.companyId==2' class="bot-row">
  25. <view class='cu-tag radius line-orange'>大袋{{goods.basisBig}}</view>
  26. <view class='cu-tag radius line-orange'>小袋装{{goods.basisSmall}}</view>
  27. </view> -->
  28. <view v-if='goods.companyId!=2' class="bot-row">
  29. <view class='cu-tag radius line-orange'>剩余量: {{goods.total - goods.soldCount}}吨</view>
  30. <view class='cu-tag radius line-orange'>总量: {{goods.total}}吨</view>
  31. </view>
  32. </view>
  33. <view v-if="goods.storeImg" class="carousel-section">
  34. <swiper autoplay="true" interval="3000" duration="500" class="carousel" circular @change="swiperChange">
  35. <swiper-item key="0" class="carousel-item">
  36. <image :src="goods.storeImg" @tap="ViewImage(goods.storeImg)"/>
  37. </swiper-item>
  38. <swiper-item key="1" class="carousel-item">
  39. <image :src="goods.foodsImg" @tap="ViewImage(goods.foodsImg)"/>
  40. </swiper-item>
  41. <swiper-item key="2" class="carousel-item">
  42. <image :src="goods.carImg" @tap="ViewImage(goods.carImg)"/>
  43. </swiper-item>
  44. </swiper>
  45. <view class="swiper-dots">
  46. <text class="num">{{swiperCurrent+1}}</text>
  47. <text class="sign">/</text>
  48. <text class="num">{{swiperLength}}</text>
  49. </view>
  50. </view>
  51. <view class="detail-desc">
  52. <view class="d-header">
  53. <text>基本信息</text>
  54. </view>
  55. <view class="c-list">
  56. <view class="c-row b-b">
  57. <text class="tit">品种</text>
  58. <view class="con-list">
  59. <text>{{goods.goodsName}}</text>
  60. </view>
  61. </view>
  62. <view v-if='goods.companyId!=2' class="c-row b-b">
  63. <text class="tit">产地</text>
  64. <view class="con-list">
  65. <text>{{goods.origin}}</text>
  66. </view>
  67. </view>
  68. <view v-if='goods.companyId!=2' class="c-row b-b">
  69. <text class="tit">国标等级</text>
  70. <view class="con-list">
  71. <text>{{goods.level}}</text>
  72. </view>
  73. </view>
  74. <view v-if='goods.companyId!=2' class="c-row b-b">
  75. <text class="tit">年份</text>
  76. <view class="con-list">
  77. <text>{{goods.year}}</text>
  78. </view>
  79. </view>
  80. <view v-if='goods.companyId!=2' class="c-row b-b">
  81. <text class="tit">包装方式</text>
  82. <view class="con-list">
  83. <text>{{goods.packing}}</text>
  84. </view>
  85. </view>
  86. <view class="c-row b-b">
  87. <text class="tit">最小成交量</text>
  88. <view class="con-list">
  89. <text>{{goods.minSale}}(吨)</text>
  90. </view>
  91. </view>
  92. <view v-if='goods.isFutures==0' class="c-row b-b">
  93. <text class="tit">剩余量</text>
  94. <view class="con-list">
  95. <text>{{numFilter(goods.total-goods.soldCount)}}</text>
  96. </view>
  97. </view>
  98. <view class="c-row b-b">
  99. <text class="tit">价格类型</text>
  100. <view class="con-list">
  101. <text>{{goods.priceType}}</text>
  102. </view>
  103. </view>
  104. <view class="c-row b-b">
  105. <text class="tit">库存地</text>
  106. <view class="con-list">
  107. <text>{{goods.stock}}</text>
  108. </view>
  109. </view>
  110. </view>
  111. <view class="d-header">
  112. <text>粮食指标</text>
  113. </view>
  114. <view class="c-list">
  115. <view v-if='goods.goodsName=="玉米"' class="c-row b-b">
  116. <text class="tit">杂质(%){{'<='}}</text>
  117. <view class="con-list">
  118. <text>{{goods.impurity}}</text>
  119. </view>
  120. </view>
  121. <view v-if='goods.goodsName=="玉米"' class="c-row b-b">
  122. <text class="tit">生霉粒(%){{'<='}}</text>
  123. <view class="con-list">
  124. <text>{{goods.moldy}}</text>
  125. </view>
  126. </view>
  127. <view v-if='goods.goodsName=="玉米"' class="c-row b-b">
  128. <text class="tit">容重(g/L){{'<='}}</text>
  129. <view class="con-list">
  130. <text>{{goods.bulkDensity}}</text>
  131. </view>
  132. </view>
  133. <view v-if='goods.goodsName=="玉米"' class="c-row b-b">
  134. <text class="tit">气味、色泽</text>
  135. <view class="con-list">
  136. <text>{{goods.smell}}</text>
  137. </view>
  138. </view>
  139. <!-- <view v-if='goods.goodsName=="玉米"' class="c-row b-b">
  140. <text class="tit">热损(%){{'<='}}</text>
  141. <view class="con-list">
  142. <text>{{goods.heatLoss}}</text>
  143. </view>
  144. </view> -->
  145. <view class="c-row b-b">
  146. <text class="tit">水分(%){{'<='}} </text>
  147. <view class="con-list">
  148. <text>{{goods.waterContent}}</text>
  149. </view>
  150. </view>
  151. <view v-if='goods.goodsName=="大豆"' class="c-row b-b">
  152. <text class="tit">蛋白(%){{'>='}} </text>
  153. <view class="con-list">
  154. <text>{{goods.protein}}</text>
  155. </view>
  156. </view>
  157. <view v-if='goods.goodsName=="大豆"' class="c-row b-b">
  158. <text class="tit">粒型</text>
  159. <view class="con-list">
  160. <text>{{goods.grainType}}</text>
  161. </view>
  162. </view>
  163. <view v-if="goods.userName1" class="c-row b-b">
  164. <text class="tit">价格</text>
  165. <view class="con-list">
  166. <input placeholder="请填写" name="input" v-model="price" @input="priceInput"></input>
  167. </view>
  168. <button class='cu-btn bg-green shadow' @click="changePrice">修改价格</button>
  169. </view>
  170. <view v-if="goods.userName1" class="c-row b-b">
  171. <text class="tit">备注</text>
  172. <view class="con-list">
  173. <input placeholder="请填写" name="input" v-model="reason" @input="reasonInput"></input>
  174. </view>
  175. <button class='cu-btn bg-red shadow' @click="endSale">终止销售</button>
  176. </view>
  177. </view>
  178. <view v-if="goods.userName" class="padding-xl" @click="navToDetailPage()">
  179. <button class="cu-btn block line-orange lg">
  180. <text class="cuIcon-upload"></text> 上传图片</button>
  181. </view>
  182. </view>
  183. <!-- 底部操作菜单 -->
  184. <view class="page-bottom">
  185. <view class="action-btn-group">
  186. <button type="primary" class=" action-btn no-border buy-now-btn" @click="contactUs">联系我们</button>
  187. <button v-if="goods.status == 1" type="primary" class=" action-btn no-border add-cart-btn" >交易结束</button>
  188. <button v-else type="primary" class=" action-btn no-border add-cart-btn" @click="tradeNow">我要买粮</button>
  189. </view>
  190. </view>
  191. </view>
  192. </template>
  193. <script>
  194. import uniNumberBox from '@/components/uni-number-box.vue';
  195. import {
  196. mapState
  197. } from 'vuex';
  198. export default {
  199. components: {
  200. uniNumberBox
  201. },
  202. data() {
  203. return {
  204. swiperCurrent: 0,
  205. titleNViewBackground: '',
  206. swiperLength: 0,
  207. goods: {
  208. id: undefined,
  209. title: undefined,
  210. soldCount: 0,
  211. total: 0,
  212. price: 0,
  213. origin: undefined,
  214. stock: undefined,
  215. level: undefined,
  216. goodsName: undefined,
  217. smell: undefined,
  218. priceType: undefined,
  219. packing: undefined,
  220. year: undefined,
  221. waterContent: 0,
  222. bulkDensity: 0,
  223. moldy: 0,
  224. impurity: 0,
  225. overFlow: 0,
  226. seller:'',
  227. sellerPhone:'',
  228. minSale: 0,
  229. status:0
  230. },
  231. share:{
  232. title: '',
  233. imageUrl:'https://taohaoliang.oss-cn-beijing.aliyuncs.com/shareLogo.png',
  234. },
  235. reason:"",
  236. price:undefined
  237. };
  238. },
  239. onShow() {
  240. },
  241. onLoad(options) {
  242. const that = this
  243. uni.showLoading({
  244. title: '正在加载',
  245. mask:true
  246. })
  247. that.$api.request('goods', 'getSaleDetailInfo', {
  248. id: options.id
  249. }, failres => {
  250. that.$api.msg(failres.errmsg)
  251. uni.hideLoading()
  252. }).then(res => {
  253. console.log(res.data)
  254. that.goods = res.data
  255. that.swiperLength = 3
  256. if(that.goods.soldCount >= that.goods.total){
  257. that.goods.status = 1
  258. }
  259. that.share.title = that.goods.title
  260. uni.hideLoading()
  261. })
  262. },
  263. computed: {
  264. ...mapState(['hasLogin','userInfo'])
  265. },
  266. methods: {
  267. numFilter (value) {
  268. if(!value){
  269. return 0
  270. }
  271. // 截取当前数据到小数点后两位
  272. let realVal = parseFloat(value).toFixed(2)
  273. return realVal
  274. },
  275. swiperChange(e) {
  276. const index = e.detail.current;
  277. this.swiperCurrent = index;
  278. },
  279. contactUs() {
  280. const that = this
  281. if(that.goods.liangxinId)
  282. {
  283. let chat = {
  284. chatId: that.goods.liangxinId,
  285. chatType:0,
  286. chatName:'易粮易运'
  287. }
  288. this.$u.vuex('chatObj',chat);
  289. this.$u.route({
  290. url:"pageC/chat/chat"
  291. });
  292. }
  293. else{
  294. uni.makePhoneCall({
  295. // 手机号
  296. phoneNumber: that.goods.sellerPhone,
  297. // 成功回调
  298. success: (res) => {
  299. console.log('调用成功!')
  300. },
  301. // 失败回调
  302. fail: (res) => {
  303. console.log('调用失败!')
  304. }
  305. });
  306. }
  307. },
  308. ViewImage(e) {
  309. var img = [];
  310. img.push(e)
  311. uni.previewImage({
  312. current:0,
  313. urls: img
  314. });
  315. },
  316. priceInput(e) {
  317. this.price = e.detail.value
  318. },
  319. reasonInput(e) {
  320. this.reason = e.detail.value
  321. },
  322. navToDetailPage() {
  323. const that = this
  324. uni.navigateTo({
  325. url: `/pageA/product/detail_upload?id=${that.goods.id}`
  326. })
  327. },
  328. changePrice(options){
  329. const that = this
  330. uni.showLoading({
  331. title: '正在加载'
  332. })
  333. if(!that.price){
  334. that.$api.msg('请输入修改价格')
  335. return
  336. }
  337. that.$api.request('sale', 'changePrice', {
  338. id: that.goods.id,
  339. price:that.price
  340. }, failres => {
  341. that.$api.msg(failres.errmsg)
  342. uni.hideLoading()
  343. }).then(res => {
  344. that.$api.msg('修改成功')
  345. uni.hideLoading()
  346. setTimeout(()=>{uni.navigateBack()},1000);
  347. })
  348. },
  349. endSale(){
  350. const that = this
  351. uni.showLoading({
  352. title: '正在加载',
  353. mask:true
  354. })
  355. that.$api.request('sale', 'endSale', {
  356. id: that.goods.id,
  357. reason:that.reason
  358. }, failres => {
  359. that.$api.msg(failres.errmsg)
  360. uni.hideLoading()
  361. }).then(res => {
  362. that.$api.msg('终止成功')
  363. uni.hideLoading()
  364. setTimeout(()=>{uni.navigateBack()},1000);
  365. })
  366. },
  367. tradeNow(){
  368. if (!this.hasLogin) {
  369. uni.showModal({
  370. title: '登录提示',
  371. content: '您尚未登录,是否立即登录?',
  372. showCancel: true,
  373. confirmText: '登录',
  374. success: (e) => {
  375. if (e.confirm) {
  376. uni.navigateTo({
  377. url: '/pages/public/login'
  378. })
  379. }
  380. },
  381. fail: () => {},
  382. complete: () => {}
  383. })
  384. }
  385. else{
  386. const that = this
  387. uni.navigateTo({
  388. url: `/pageA/product/trade?id=${that.goods.id}&packing=${that.goods.packing}}&province=${that.goods.province}
  389. &city=${that.goods.city}&area=${that.goods.area}&storeName=${that.goods.storeName}&seller=${that.goods.seller}
  390. &companyId=${that.goods.companyId}&sellerPhone=${that.goods.sellerPhone}&minSale=${that.goods.minSale}
  391. &exsitCount=${that.goods.total}&isFutures=${that.goods.isFutures}
  392. &basis=${that.goods.basis}&basisSmall=${that.goods.basisSmall}&basisBig=${that.goods.basisBig}
  393. &unloadingFee=${that.goods.unloadingFee}`
  394. })
  395. }
  396. }
  397. },
  398. }
  399. </script>
  400. <style lang='scss'>
  401. page {
  402. background: $page-color-base;
  403. /* padding-bottom: 160upx; */
  404. }
  405. .container{
  406. padding-bottom: 160upx;
  407. }
  408. .icon-you {
  409. font-size: $font-base + 2upx;
  410. color: #888;
  411. }
  412. .carousel {
  413. width: 100%;
  414. height: 350upx;
  415. .carousel-item {
  416. width: 100%;
  417. height: 100%;
  418. padding: 0 28upx;
  419. overflow: hidden;
  420. }
  421. image {
  422. width: 100%;
  423. height: 100%;
  424. border-radius: 10upx;
  425. }
  426. }
  427. .carousel-section {
  428. padding: 0;
  429. .titleNview-placing {
  430. padding-top: 0;
  431. height: 0;
  432. }
  433. .carousel {
  434. .carousel-item {
  435. padding: 0;
  436. }
  437. }
  438. .swiper-dots {
  439. left: 45upx;
  440. bottom: 40upx;
  441. }
  442. }
  443. /* 分享 */
  444. .share-section {
  445. display: flex;
  446. align-items: center;
  447. color: $font-color-base;
  448. background: linear-gradient(left, #fdf5f6, #fbebf6);
  449. padding: 12upx 30upx;
  450. .share-icon {
  451. display: flex;
  452. align-items: center;
  453. width: 70upx;
  454. height: 30upx;
  455. line-height: 1;
  456. border: 1px solid $uni-color-primary;
  457. border-radius: 4upx;
  458. position: relative;
  459. overflow: hidden;
  460. font-size: 22upx;
  461. color: $uni-color-primary;
  462. &:after {
  463. content: '';
  464. width: 50upx;
  465. height: 50upx;
  466. border-radius: 50%;
  467. left: -20upx;
  468. top: -12upx;
  469. position: absolute;
  470. background: $uni-color-primary;
  471. }
  472. }
  473. .icon-xingxing {
  474. position: relative;
  475. z-index: 1;
  476. font-size: 24upx;
  477. margin-left: 2upx;
  478. margin-right: 10upx;
  479. color: #fff;
  480. line-height: 1;
  481. }
  482. .tit {
  483. font-size: $font-base;
  484. margin-left: 10upx;
  485. }
  486. .icon-bangzhu1 {
  487. padding: 10upx;
  488. font-size: 30upx;
  489. line-height: 1;
  490. }
  491. .share-btn {
  492. flex: 1;
  493. text-align: right;
  494. font-size: $font-sm;
  495. color: $uni-color-primary;
  496. }
  497. .icon-you {
  498. font-size: $font-sm;
  499. margin-left: 4upx;
  500. color: $uni-color-primary;
  501. }
  502. }
  503. .c-list {
  504. font-size: $font-sm + 2upx;
  505. color: $font-color-base;
  506. background: #fff;
  507. .c-row {
  508. display: flex;
  509. align-items: center;
  510. padding: 20upx 30upx;
  511. position: relative;
  512. }
  513. .tit {
  514. width: 220upx;
  515. }
  516. .con {
  517. flex: 1;
  518. color: $font-color-dark;
  519. .selected-text {
  520. margin-right: 10upx;
  521. }
  522. }
  523. .bz-list {
  524. height: 40upx;
  525. font-size: $font-sm+2upx;
  526. color: $font-color-dark;
  527. text {
  528. display: inline-block;
  529. margin-right: 30upx;
  530. }
  531. }
  532. .con-list {
  533. flex: 1;
  534. display: flex;
  535. flex-direction: column;
  536. color: $font-color-dark;
  537. line-height: 40upx;
  538. text-align: right;
  539. padding-right: 20upx;
  540. }
  541. .red {
  542. color: $uni-color-primary;
  543. }
  544. }
  545. /* 评价 */
  546. .eva-section {
  547. display: flex;
  548. flex-direction: column;
  549. padding: 20upx 30upx;
  550. background: #fff;
  551. margin-top: 16upx;
  552. .e-header {
  553. display: flex;
  554. align-items: center;
  555. height: 70upx;
  556. font-size: $font-sm + 2upx;
  557. color: $font-color-light;
  558. .tit {
  559. font-size: $font-base + 2upx;
  560. color: $font-color-dark;
  561. margin-right: 4upx;
  562. }
  563. .tip {
  564. flex: 1;
  565. text-align: right;
  566. }
  567. .icon-you {
  568. margin-left: 10upx;
  569. }
  570. }
  571. }
  572. .eva-box {
  573. display: flex;
  574. padding: 20upx 0;
  575. .portrait {
  576. flex-shrink: 0;
  577. width: 80upx;
  578. height: 80upx;
  579. border-radius: 100px;
  580. }
  581. .right {
  582. flex: 1;
  583. display: flex;
  584. flex-direction: column;
  585. font-size: $font-base;
  586. color: $font-color-base;
  587. padding-left: 26upx;
  588. .con {
  589. font-size: $font-base;
  590. color: $font-color-dark;
  591. padding: 20upx 0;
  592. }
  593. .bot {
  594. display: flex;
  595. justify-content: space-between;
  596. font-size: $font-sm;
  597. color: $font-color-light;
  598. }
  599. }
  600. }
  601. /* 详情 */
  602. .detail-desc {
  603. background: #fff;
  604. margin-top: 16upx;
  605. width: 750upx;
  606. .d-header {
  607. display: flex;
  608. justify-content: center;
  609. align-items: center;
  610. height: 80upx;
  611. font-size: $font-base + 2upx;
  612. color: $font-color-dark;
  613. position: relative;
  614. text {
  615. padding: 0 20upx;
  616. background: #fff;
  617. position: relative;
  618. z-index: 1;
  619. }
  620. &:after {
  621. position: absolute;
  622. left: 50%;
  623. top: 50%;
  624. transform: translateX(-50%);
  625. width: 300upx;
  626. height: 0;
  627. content: '';
  628. border-bottom: 1px solid #ccc;
  629. }
  630. }
  631. }
  632. /* 规格选择弹窗 */
  633. .attr-content {
  634. padding: 10upx 30upx;
  635. .a-t {
  636. display: flex;
  637. image {
  638. width: 170upx;
  639. height: 170upx;
  640. flex-shrink: 0;
  641. margin-top: -40upx;
  642. border-radius: 8upx;
  643. ;
  644. }
  645. .right {
  646. display: flex;
  647. flex-direction: column;
  648. padding-left: 24upx;
  649. font-size: $font-sm + 2upx;
  650. color: $font-color-base;
  651. line-height: 42upx;
  652. .price {
  653. font-size: $font-lg;
  654. color: $uni-color-primary;
  655. margin-bottom: 10upx;
  656. }
  657. .selected-text {
  658. margin-right: 10upx;
  659. }
  660. }
  661. }
  662. .attr-list {
  663. display: flex;
  664. flex-direction: column;
  665. font-size: $font-base + 2upx;
  666. color: $font-color-base;
  667. padding-top: 30upx;
  668. padding-left: 10upx;
  669. }
  670. .item-list {
  671. padding: 30upx 0 0;
  672. display: flex;
  673. flex-wrap: wrap;
  674. text {
  675. display: flex;
  676. align-items: center;
  677. justify-content: center;
  678. background: #eee;
  679. margin-right: 20upx;
  680. margin-bottom: 20upx;
  681. border-radius: 100upx;
  682. min-width: 60upx;
  683. height: 60upx;
  684. padding: 0 20upx;
  685. font-size: $font-base;
  686. color: $font-color-dark;
  687. }
  688. .selected {
  689. background: #fbebee;
  690. color: $uni-color-primary;
  691. }
  692. }
  693. }
  694. /* 弹出层 */
  695. .popup {
  696. position: fixed;
  697. left: 0;
  698. top: 0;
  699. right: 0;
  700. bottom: 0;
  701. z-index: 99;
  702. &.show {
  703. display: block;
  704. .mask {
  705. animation: showPopup 0.2s linear both;
  706. }
  707. .layer {
  708. animation: showLayer 0.2s linear both;
  709. }
  710. }
  711. &.hide {
  712. .mask {
  713. animation: hidePopup 0.2s linear both;
  714. }
  715. .layer {
  716. animation: hideLayer 0.2s linear both;
  717. }
  718. }
  719. &.none {
  720. display: none;
  721. }
  722. .mask {
  723. position: fixed;
  724. top: 0;
  725. width: 100%;
  726. height: 100%;
  727. z-index: 1;
  728. background-color: rgba(0, 0, 0, 0.4);
  729. }
  730. .layer {
  731. position: fixed;
  732. z-index: 99;
  733. bottom: 0;
  734. width: 100%;
  735. min-height: 40vh;
  736. border-radius: 10upx 10upx 0 0;
  737. background-color: #fff;
  738. .btn {
  739. height: 66upx;
  740. line-height: 66upx;
  741. border-radius: 100upx;
  742. background: $uni-color-primary;
  743. font-size: $font-base + 2upx;
  744. color: #fff;
  745. margin: 30upx auto 20upx;
  746. }
  747. }
  748. @keyframes showPopup {
  749. 0% {
  750. opacity: 0;
  751. }
  752. 100% {
  753. opacity: 1;
  754. }
  755. }
  756. @keyframes hidePopup {
  757. 0% {
  758. opacity: 1;
  759. }
  760. 100% {
  761. opacity: 0;
  762. }
  763. }
  764. @keyframes showLayer {
  765. 0% {
  766. transform: translateY(120%);
  767. }
  768. 100% {
  769. transform: translateY(0%);
  770. }
  771. }
  772. @keyframes hideLayer {
  773. 0% {
  774. transform: translateY(0);
  775. }
  776. 100% {
  777. transform: translateY(120%);
  778. }
  779. }
  780. }
  781. .swiper-dots {
  782. display: flex;
  783. position: absolute;
  784. left: 60upx;
  785. bottom: 15upx;
  786. width: 72upx;
  787. height: 36upx;
  788. background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABkCAYAAADDhn8LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTk4MzlBNjE0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTk4MzlBNjA0NjU1MTFFOUExNjRFQ0I3RTQ0NEExQjMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6Q0E3RUNERkE0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6Q0E3RUNERkI0NjExMTFFOTg5NzI4MTM2Rjg0OUQwOEUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4Gh5BPAAACTUlEQVR42uzcQW7jQAwFUdN306l1uWwNww5kqdsmm6/2MwtVCp8CosQtP9vg/2+/gY+DRAMBgqnjIp2PaCxCLLldpPARRIiFj1yBbMV+cHZh9PURRLQNhY8kgWyL/WDtwujjI8hoE8rKLqb5CDJaRMJHokC6yKgSCR9JAukmokIknCQJpLOIrJFwMsBJELFcKHwM9BFkLBMKFxNcBCHlQ+FhoocgpVwwnv0Xn30QBJGMC0QcaBVJiAMiec/dcwKuL4j1QMsVCXFAJE4s4NQA3K/8Y6DzO4g40P7UcmIBJxbEesCKWBDg8wWxHrAiFgT4fEGsB/CwIhYE+AeBAAdPLOcV8HRmWRDAiQVcO7GcV8CLM8uCAE4sQCDAlHcQ7x+ABQEEAggEEAggEEAggEAAgQACASAQQCCAQACBAAIBBAIIBBAIIBBAIABe4e9iAe/xd7EAJxYgEGDeO4j3EODp/cOCAE4sYMyJ5cwCHs4rCwI4sYBxJ5YzC84rCwKcXxArAuthQYDzC2JF0H49LAhwYUGsCFqvx5EF2T07dMaJBetx4cRyaqFtHJ8EIhK0i8OJBQxcECuCVutxJhCRoE0cZwMRyRcFefa/ffZBVPogePihhyCnbBhcfMFFEFM+DD4m+ghSlgmDkwlOgpAl4+BkkJMgZdk4+EgaSCcpVX7bmY9kgXQQU+1TgE0c+QJZUUz1b2T4SBbIKmJW+3iMj2SBVBWz+leVfCQLpIqYbp8b85EskIxyfIOfK5Sf+wiCRJEsllQ+oqEkQfBxmD8BBgA5hVjXyrBNUQAAAABJRU5ErkJggg==);
  789. background-size: 100% 100%;
  790. .num {
  791. width: 36upx;
  792. height: 36upx;
  793. border-radius: 50px;
  794. font-size: 24upx;
  795. color: #fff;
  796. text-align: center;
  797. line-height: 36upx;
  798. }
  799. .sign {
  800. position: absolute;
  801. top: 0;
  802. left: 50%;
  803. line-height: 36upx;
  804. font-size: 12upx;
  805. color: #fff;
  806. transform: translateX(-50%);
  807. }
  808. }
  809. /* 底部操作菜单 */
  810. .page-bottom {
  811. position: fixed;
  812. left: 30upx;
  813. bottom: 30upx;
  814. z-index: 95;
  815. display: flex;
  816. justify-content: center;
  817. align-items: center;
  818. width: 690upx;
  819. height: 100upx;
  820. background: rgba(255, 255, 255, .9);
  821. box-shadow: 0 0 20upx 0 rgba(0, 0, 0, .5);
  822. border-radius: 16upx;
  823. .p-b-btn {
  824. display: flex;
  825. flex-direction: column;
  826. align-items: center;
  827. justify-content: center;
  828. font-size: $font-sm;
  829. color: $font-color-base;
  830. width: 96upx;
  831. height: 80upx;
  832. .yticon {
  833. font-size: 40upx;
  834. line-height: 48upx;
  835. color: $font-color-light;
  836. }
  837. &.active,
  838. &.active .yticon {
  839. color: $uni-color-primary;
  840. }
  841. .icon-fenxiang2 {
  842. font-size: 42upx;
  843. transform: translateY(-2upx);
  844. }
  845. .icon-shoucang {
  846. font-size: 46upx;
  847. }
  848. }
  849. }
  850. .rich-img {
  851. width: 100%;
  852. height: auto;
  853. margin: 0;
  854. padding: 0;
  855. line-height: 0px;
  856. }
  857. button::after {
  858. border: none;
  859. }
  860. /* 销售信息 */
  861. .introduce-section {
  862. background: #fff;
  863. padding: 20upx 30upx;
  864. padding-bottom: 100upx;
  865. .guess-item {
  866. padding-bottom: 20upx;
  867. border-bottom: 1px solid #ccc;
  868. }
  869. .title {
  870. font-size: 28upx;
  871. color: $font-color-dark;
  872. font-weight:bold;
  873. height: 50upx;
  874. line-height: 50upx;
  875. flex:2.5;
  876. }
  877. .title-tip {
  878. flex:1.5;
  879. }
  880. .price-box {
  881. display: flex;
  882. align-items: baseline;
  883. height: 120rpx;
  884. padding: 10upx 0;
  885. font-size: 26upx;
  886. color: $uni-color-primary;
  887. }
  888. .price {
  889. font-size: $font-lg + 2upx;
  890. }
  891. .m-price {
  892. margin: 0 12upx;
  893. color: $font-color-light;
  894. text-decoration: line-through;
  895. }
  896. .coupon-tip {
  897. align-items: center;
  898. padding: 4upx 10upx;
  899. background: $uni-color-primary;
  900. font-size: $font-sm;
  901. color: #fff;
  902. border-radius: 6upx;
  903. line-height: 1;
  904. transform: translateY(-4upx);
  905. }
  906. .bot-row {
  907. display: flex;
  908. align-items: center;
  909. height: 50upx;
  910. font-size: $font-sm;
  911. color: $font-color-light;
  912. view {
  913. flex: 1;
  914. }
  915. }
  916. }
  917. </style>