sales_detail.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239
  1. <!--销售详情-->
  2. <template>
  3. <view class="container">
  4. <view>
  5. <view class="back-btn cuIcon-back" @click="navBack"></view>
  6. <view class='title1'>销售详情</view>
  7. </view>
  8. <image style='width:100%;' src='../../static/img/jiaoyi/bg@3x.png'></image>
  9. <view class="introduce-section">
  10. <view style='height:70px;'>
  11. <view class="title">{{goods.title}}</view>
  12. <view class='flex justify-between'>
  13. <view style='flex:1.5;color:#878C9C;'>
  14. {{goods.sendPrivate}}{{goods.sendCity}}{{goods.sendArea}}{{goods.sendWarehouse}}
  15. </view>
  16. <view v-if='goods.salePlanType=="现货"' class="title-tip">
  17. {{goods.salePrice}}
  18. </view>
  19. <view style='text-align:right;' v-else class="title-tip">
  20. +{{goods.basisPrice}}
  21. </view>
  22. </view>
  23. <view style='text-align:right;' v-if='goods.salePlanType=="现货"'>销售价格</view>
  24. <view style='text-align:right;' v-if='goods.salePlanType=="期货"'>今日基差</view>
  25. </view>
  26. </view>
  27. <view v-if="goods.storeImg" class="carousel-section">
  28. <swiper autoplay="true" interval="3000" duration="500" class="carousel" circular @change="swiperChange">
  29. <swiper-item key="0" class="carousel-item">
  30. <image :src="goods.storeImg" @tap="ViewImage(goods.storeImg)" />
  31. </swiper-item>
  32. <swiper-item key="1" class="carousel-item">
  33. <image :src="goods.foodsImg" @tap="ViewImage(goods.foodsImg)" />
  34. </swiper-item>
  35. <swiper-item key="2" class="carousel-item">
  36. <image :src="goods.carImg" @tap="ViewImage(goods.carImg)" />
  37. </swiper-item>
  38. </swiper>
  39. <view class="swiper-dots">
  40. <text class="num">{{swiperCurrent+1}}</text>
  41. <text class="sign">/</text>
  42. <text class="num">{{swiperLength}}</text>
  43. </view>
  44. </view>
  45. <view class="detail-desc">
  46. <view class="d-header">
  47. <text>基本信息</text>
  48. </view>
  49. <view class="c-list">
  50. <view class="c-row">
  51. <text class="tit">货名</text>
  52. <view class="con-list">
  53. <text>{{goods.goodsName}}</text>
  54. </view>
  55. </view>
  56. <view class="c-row">
  57. <text class="tit">销售量(吨)</text>
  58. <view class="con-list">
  59. <text>{{goods.plannedSaleVolume}}</text>
  60. </view>
  61. </view>
  62. <view class="c-row">
  63. <text class="tit">最小成交量(吨)</text>
  64. <view class="con-list">
  65. <text>{{goods.minimumVolume}}</text>
  66. </view>
  67. </view>
  68. <view class="c-row">
  69. <text class="tit">类型</text>
  70. <view class="con-list">
  71. <text>{{goods.salePlanType}}</text>
  72. </view>
  73. </view>
  74. <view class="c-row">
  75. <text class="tit">价格类型</text>
  76. <view class="con-list">
  77. <text>{{goods.priceType}}</text>
  78. </view>
  79. </view>
  80. <view class="c-row" v-if="goods.salePlanType == '期货'">
  81. <text class="tit">基差(元/吨)</text>
  82. <view class="con-list">
  83. <text>{{goods.basisPrice}}</text>
  84. </view>
  85. </view>
  86. <view class="c-row" v-if="goods.salePlanType == '现货'">
  87. <text class="tit">销售价格(元/吨)</text>
  88. <view class="con-list">
  89. <text>{{goods.salePrice}}</text>
  90. </view>
  91. </view>
  92. <view class="c-row">
  93. <text class="tit">出货地区</text>
  94. <view class="con-list">
  95. <text>{{goods.sendPrivate}}{{goods.sendCity}}{{goods.sendArea}}</text>
  96. </view>
  97. </view>
  98. <view class="c-row">
  99. <text class="tit">运费承担方</text>
  100. <view class="con-list">
  101. <text>{{goods.freightPayer}}</text>
  102. </view>
  103. </view>
  104. <view class="c-row">
  105. <text class="tit">包装方式</text>
  106. <view class="con-list">
  107. <text>{{goods.packingType}}</text>
  108. </view>
  109. </view>
  110. <view class="c-row" v-if="goods.packingType == '大袋' || goods.packingType == '小袋'">
  111. <text class="tit">袋装备注</text>
  112. <view class="con-list">
  113. <text>{{goods.baggingNotes}}</text>
  114. </view>
  115. </view>
  116. <view class="c-row">
  117. <text class="tit">卖方</text>
  118. <view class="con-list">
  119. <text>{{goods.seller}}</text>
  120. </view>
  121. </view>
  122. <view class="c-row" @click="contactUs">
  123. <text class="tit">卖方电话</text>
  124. <view class="con-list">
  125. <view>{{goods.sellerPhone}}
  126. <image style='width:11px;height:11px;' src='../../static/img/jiaoyi/gengduo1@3x.png'>
  127. </image>
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. </view>
  133. <view class="detail-desc">
  134. <view class="d-header">
  135. <text>货物要求</text>
  136. </view>
  137. <view class="c-list">
  138. <view class="c-row" v-if="goods.waterContent">
  139. <text class="tit">水分(%){{'<='}} </text>
  140. <view class="con-list">
  141. <text>{{goods.waterContent}}</text>
  142. </view>
  143. </view>
  144. <view class="c-row" v-if="goods.bulkDensity">
  145. <text class="tit">容重(g/L){{'>='}}</text>
  146. <view class="con-list">
  147. <text>{{goods.bulkDensity}}</text>
  148. </view>
  149. </view>
  150. <view class="c-row" v-if="goods.jiaorenli">
  151. <text class="tit">热损伤(%){{'<='}}</text>
  152. <view class="con-list">
  153. <text>{{goods.jiaorenli}}</text>
  154. </view>
  155. </view>
  156. <view class="c-row" v-if="goods.impurity">
  157. <text class="tit">杂质(%){{'<='}}</text>
  158. <view class="con-list">
  159. <text>{{goods.impurity}}</text>
  160. </view>
  161. </view>
  162. <view class="c-row" v-if="goods.mildewGrain">
  163. <text class="tit">霉变粒(%){{'<='}}</text>
  164. <view class="con-list">
  165. <text>{{goods.mildewGrain}}</text>
  166. </view>
  167. </view>
  168. <view class="c-row" v-if="goods.imperfectGrain">
  169. <text class="tit">不完善粒(%){{'<='}}</text>
  170. <view class="con-list">
  171. <text>{{goods.imperfectGrain}}</text>
  172. </view>
  173. </view>
  174. <view class="c-row" v-if="goods.protein">
  175. <text class="tit">蛋白(%){{'>='}} </text>
  176. <view class="con-list">
  177. <text>{{goods.protein}}</text>
  178. </view>
  179. </view>
  180. <view class="c-row" v-if="goods.grain">
  181. <text class="tit">粒型</text>
  182. <view class="con-list">
  183. <text>{{goods.grain}}</text>
  184. </view>
  185. </view>
  186. <view class="c-row" v-if="goods.grade">
  187. <text class="tit">品级</text>
  188. <view class="con-list">
  189. <text>{{goods.grade}}</text>
  190. </view>
  191. </view>
  192. <view class="c-row" v-if="goods.outputPrivate&&goods.outputCity">
  193. <text class="tit">产地</text>
  194. <view class="con-list">
  195. <text>{{goods.outputPrivate}}{{goods.outputCity}}</text>
  196. </view>
  197. </view>
  198. <view class="c-row" v-if="goods.outputYear">
  199. <text class="tit">产出年份</text>
  200. <view class="con-list">
  201. <text>{{goods.outputYear}}</text>
  202. </view>
  203. </view>
  204. </view>
  205. </view>
  206. <view v-if='status' class='shade'>
  207. <view class='shade-content'>
  208. <view class='shade-content-item'>
  209. 您的粮商身份正在审核中,请耐心等待认证状态可在<text>我的-身份认证</text>中查看
  210. </view>
  211. <image @click='status=false' style='width:30px;height:30px;margin-top:10px;'
  212. src='../../static/img/jiaoyi/guanbi-2@3x.png'></image>
  213. </view>
  214. </view>
  215. <!-- 底部操作菜单 -->
  216. <view class="page-bottom1">
  217. <view>
  218. <button type="primary" @click="contactUs">立即沟通</button>
  219. <button @click="salegrain" v-if="goods.pcFlag == 1" type="primary"
  220. class=" action-btn no-border add-cart-btn">立即买粮</button>
  221. <button v-else type="primary" class=" action-btn no-border add-cart-btn" @click="tradeNow">立即发车</button>
  222. </view>
  223. </view>
  224. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  225. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  226. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  227. </view>
  228. </template>
  229. <script>
  230. import uniNumberBox from '@/components/uni-number-box.vue';
  231. import {
  232. mapState
  233. } from 'vuex';
  234. export default {
  235. components: {
  236. uniNumberBox
  237. },
  238. data() {
  239. return {
  240. isShowAlert: false,
  241. content: '您尚未登录,是否立即登录?',
  242. swiperCurrent: 0,
  243. titleNViewBackground: '',
  244. swiperLength: 0,
  245. goods: {
  246. id: undefined,
  247. title: undefined,
  248. soldCount: 0,
  249. total: 0,
  250. price: 0,
  251. origin: undefined,
  252. stock: undefined,
  253. level: undefined,
  254. goodsName: undefined,
  255. smell: undefined,
  256. priceType: undefined,
  257. packing: undefined,
  258. year: undefined,
  259. waterContent: 0,
  260. bulkDensity: 0,
  261. moldy: 0,
  262. impurity: 0,
  263. overFlow: 0,
  264. buyer: '',
  265. buyerPhone: '',
  266. minSale: 0,
  267. status: 0
  268. },
  269. status: false,
  270. share: {
  271. title: '',
  272. imageUrl: 'https://taohaoliang.oss-cn-beijing.aliyuncs.com/shareLogo.png',
  273. },
  274. reason: "",
  275. price: undefined,
  276. };
  277. },
  278. onShow() {},
  279. onLoad(options) {
  280. this.goods.compId = options.compId
  281. const that = this
  282. uni.showLoading({
  283. title: '正在加载',
  284. mask: true
  285. })
  286. this.$api.doRequest('get', '/salePlanInfo/getSalePlanInfo', {
  287. id: options.id
  288. }).then(res => {
  289. uni.hideLoading()
  290. this.goods = res.data.data
  291. })
  292. },
  293. computed: {
  294. ...mapState(['hasLogin', 'userInfo'])
  295. },
  296. methods: {
  297. alertBtn() {
  298. uni.navigateTo({
  299. url: '/pages/public/login'
  300. })
  301. },
  302. cancelClick() {
  303. this.isShowAlert = false
  304. },
  305. numFilter(value) {
  306. if (!value) {
  307. return 0
  308. }
  309. // 截取当前数据到小数点后两位
  310. let realVal = parseFloat(value).toFixed(2)
  311. return realVal
  312. },
  313. swiperChange(e) {
  314. const index = e.detail.current;
  315. this.swiperCurrent = index;
  316. },
  317. contactUs() {
  318. const that = this
  319. uni.makePhoneCall({
  320. // 手机号
  321. phoneNumber: that.goods.sellerPhone,
  322. // 成功回调
  323. success: (res) => {
  324. console.log('调用成功!')
  325. },
  326. // 失败回调
  327. fail: (res) => {
  328. console.log('调用失败!')
  329. that.contactUs()
  330. }
  331. });
  332. },
  333. ViewImage(e) {
  334. var img = [];
  335. img.push(e)
  336. uni.previewImage({
  337. current: 0,
  338. urls: img
  339. });
  340. },
  341. priceInput(e) {
  342. this.price = e.detail.value
  343. },
  344. reasonInput(e) {
  345. this.reason = e.detail.value
  346. },
  347. navToDetailPage() {
  348. const that = this
  349. uni.navigateTo({
  350. url: `/pageA/product/detail_upload?id=${that.goods.id}`
  351. })
  352. },
  353. changePrice(options) {
  354. const that = this
  355. uni.showLoading({
  356. title: '正在加载'
  357. })
  358. if (!that.price) {
  359. that.$api.msg('请输入修改价格')
  360. return
  361. }
  362. that.$api.request('sale', 'changePrice', {
  363. id: that.goods.id,
  364. price: that.price
  365. }, failres => {
  366. if (failres.errmsg) {
  367. uni.showToast({
  368. title: failres.errmsg,
  369. icon: 'none',
  370. duration: 2000
  371. })
  372. } else {
  373. uni.showToast({
  374. title: "系统异常,请联系管理员",
  375. icon: 'none',
  376. duration: 2000
  377. })
  378. }
  379. uni.hideLoading()
  380. }).then(res => {
  381. that.$api.msg('修改成功')
  382. uni.hideLoading()
  383. setTimeout(() => {
  384. uni.navigateBack()
  385. }, 1000);
  386. })
  387. },
  388. salegrain() {
  389. // uni.navigateTo({
  390. // url: `/pageA/product/business_buy?id=${this.goods.id}&receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}
  391. // &goodsName=${this.goods.goodsName}&receiveCity=${this.goods.receiveCity}&receivePrivate=${this.goods.receivePrivate}&buyer=${this.goods.buyer}
  392. // `
  393. // })
  394. // var that=this
  395. if (!this.hasLogin) {
  396. this.isShowAlert = true;
  397. // uni.showModal({
  398. // title: '提示',
  399. // content: '您尚未登录,是否立即登录?',
  400. // showCancel: true,
  401. // confirmText: '登录',
  402. // success: (e) => {
  403. // if (e.confirm) {
  404. // uni.navigateTo({
  405. // url: '/pages/public/login'
  406. // })
  407. // }
  408. // },
  409. // fail: () => {},
  410. // complete: () => {}
  411. // })
  412. } else {
  413. this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo', {
  414. commonId: this.userInfo.id
  415. }).then(res => {
  416. if (res.data.code == 200) {
  417. uni.navigateTo({
  418. url: `/pageA/product/business_sale?id=${this.goods.id}&sendArea=${this.goods.sendArea}&minimumVolume=${this.goods.minimumVolume}&goodsName=${this.goods.goodsName}&sendCity=${this.goods.sendCity}&sendPrivate=${this.goods.sendPrivate}&seller=${this.goods.seller}&basisPrice=${this.goods.basisPrice}&salePrice=${this.goods.salePrice}&sendWarehouse=${this.goods.sendWarehouse}&salePlanType=${this.goods.salePlanType}&salePlan=${this.goods.salePlanNo}&baggingNotes=${this.goods.baggingNotes}&compId=${this.goods.compId}&invoiceFeeCompany=${this.goods.invoiceFeeCompany}&invoiceFeePerson=${this.goods.invoiceFeePerson}`
  419. // url: `/pageA/product/business_buy?id=${this.goods.id}&packing=${this.goods.packing}}&province=${this.goods.province}
  420. // &city=${this.goods.city}&area=${this.goods.area}&storeName=${this.goods.storeName}&seller=${this.goods.seller}
  421. // &companyId=${this.goods.companyId}&sellerPhone=${this.goods.sellerPhone}&minSale=${this.goods.minSale}
  422. // &exsitCount=${this.goods.total}&isFutures=${this.goods.isFutures}
  423. // &basis=${this.goods.basis}&basisSmall=${this.goods.basisSmall}&basisBig=${this.goods.basisBig}
  424. // &unloadingFee=${this.goods.unloadingFee}&goodsName=${this.goods.goodsName}&receivePrivate=${this.goods.receivePrivate}&receiveCity=${that.goods.receiveCity}
  425. // &receiveArea=${this.goods.receiveArea}&minimumVolume=${this.goods.minimumVolume}&buyer=${this.goods.buyer}`
  426. })
  427. } else if (res.data.code == 11016) {
  428. uni.showModal({
  429. title: '温馨提示',
  430. content: '您还未认证粮商身份, 下单前请先完善您的身份信息。',
  431. confirmText: "去认证",
  432. confirmColor: '#22C572',
  433. success: function(res) {
  434. if (res.confirm) {
  435. uni.navigateTo({ //跳转页面
  436. url: '/pages/attestation/index'
  437. })
  438. } else if (res.cancel) {}
  439. }
  440. });
  441. } else if (res.data.code == 11017) {
  442. this.status = true
  443. }
  444. })
  445. // uni.showModal({
  446. // title: '温馨提示',
  447. // content: '请在发车前认真核实买方身份,并在签订正规的交易合同后发起发车操作,是否继续发车?',
  448. // confirmText: "发车",
  449. // confirmColor: '#22C572',
  450. // success: function (res) {
  451. // if (res.confirm) {
  452. // uni.navigateTo({//跳转页面
  453. // url:"../index/index"
  454. // })
  455. // } else if (res.cancel) {
  456. // }
  457. // }
  458. // });
  459. // const that = this
  460. // uni.navigateTo({
  461. // url: `/pageA/product/trade?id=${that.goods.id}&packing=${that.goods.packing}}&province=${that.goods.province}
  462. // &city=${that.goods.city}&area=${that.goods.area}&storeName=${that.goods.storeName}&seller=${that.goods.seller}
  463. // &companyId=${that.goods.companyId}&sellerPhone=${that.goods.sellerPhone}&minSale=${that.goods.minSale}
  464. // &exsitCount=${that.goods.total}&isFutures=${that.goods.isFutures}
  465. // &basis=${that.goods.basis}&basisSmall=${that.goods.basisSmall}&basisBig=${that.goods.basisBig}
  466. // &unloadingFee=${that.goods.unloadingFee}`
  467. // })
  468. }
  469. },
  470. endSale() {
  471. const that = this
  472. uni.showLoading({
  473. title: '正在加载',
  474. mask: true
  475. })
  476. that.$api.request('sale', 'endSale', {
  477. id: that.goods.id,
  478. reason: that.reason
  479. }, failres => {
  480. if (failres.errmsg) {
  481. uni.showToast({
  482. title: failres.errmsg,
  483. icon: 'none',
  484. duration: 2000
  485. })
  486. } else {
  487. uni.showToast({
  488. title: "系统异常,请联系管理员",
  489. icon: 'none',
  490. duration: 2000
  491. })
  492. }
  493. uni.hideLoading()
  494. }).then(res => {
  495. that.$api.msg('终止成功')
  496. uni.hideLoading()
  497. setTimeout(() => {
  498. uni.navigateBack()
  499. }, 1000);
  500. })
  501. },
  502. navBack() {
  503. uni.navigateBack();
  504. },
  505. tradeNow() {
  506. // this.$api.doRequest('get', '/identityAuthenticationInfo/getInfo',{commonId:options.id}).then(res => {
  507. // uni.hideLoading()
  508. // this.goods=res.data.data
  509. // })
  510. if (!this.hasLogin) {
  511. this.isShowAlert = true;
  512. // uni.showModal({
  513. // title: '提示',
  514. // content: '您尚未登录,是否立即登录?',
  515. // showCancel: true,
  516. // confirmText: '登录',
  517. // success: (e) => {
  518. // if (e.confirm) {
  519. // uni.navigateTo({
  520. // url: '/pages/public/login'
  521. // })
  522. // }
  523. // },
  524. // fail: () => {},
  525. // complete: () => {}
  526. // })
  527. } else {
  528. uni.showModal({
  529. title: '温馨提示',
  530. content: '请在发车前认真核实买方身份,并在签订正规的交易合同后发起发车操作,是否继续发车?',
  531. confirmText: "发车",
  532. confirmColor: '#22C572',
  533. success: function(res) {
  534. if (res.confirm) {
  535. uni.navigateTo({ //跳转页面
  536. url: "../index/index"
  537. })
  538. } else if (res.cancel) {}
  539. }
  540. });
  541. const that = this
  542. uni.navigateTo({
  543. // url: `/pageA/product/business_sale?id=${that.goods.id}&packing=${that.goods.packing}}&province=${that.goods.province}
  544. // &city=${that.goods.city}&area=${that.goods.area}&storeName=${that.goods.storeName}&seller=${that.goods.seller}
  545. // &companyId=${that.goods.companyId}&sellerPhone=${that.goods.sellerPhone}&minSale=${that.goods.minSale}
  546. // &exsitCount=${that.goods.total}&isFutures=${that.goods.isFutures}
  547. // &basis=${that.goods.basis}&basisSmall=${that.goods.basisSmall}&basisBig=${that.goods.basisBig}
  548. // &unloadingFee=${that.goods.unloadingFee}`
  549. url: `/pageA/product/business_sale?id=${that.goods.id}&buyer=${that.goods.buyer}&seller=${that.goods.seller}&sendPrivate=${that.goods.sendPrivate}
  550. &sendCity=${that.goods.sendCity}&sendArea=${that.goods.sendArea}&sendWarehouse=${that.goods.sendWarehouse}&goodsName=${that.goods.goodsName}
  551. &minimumVolume=${that.goods.minimumVolume}&unitPrice=${that.goods.unitPrice}&basisPrice=${that.goods.basisPrice}&salePlanType=${that.goods.salePlanType}`
  552. })
  553. }
  554. }
  555. },
  556. }
  557. </script>
  558. <style scoped lang='scss'>
  559. .title1 {
  560. position: absolute;
  561. left: 50%;
  562. transform: translateX(-50%);
  563. top: 40upx;
  564. padding-top: var(--status-bar-height);
  565. z-index: 9999;
  566. color: #fff;
  567. font-size: 36rpx;
  568. }
  569. page {
  570. background: #F5F6FA;
  571. /* padding-bottom: 160upx; */
  572. }
  573. .container {
  574. padding-bottom: 160upx;
  575. }
  576. .icon-you {
  577. font-size: $font-base + 2upx;
  578. color: #888;
  579. }
  580. .carousel {
  581. width: 100%;
  582. height: 350upx;
  583. .carousel-item {
  584. width: 100%;
  585. height: 100%;
  586. padding: 0 28upx;
  587. overflow: hidden;
  588. }
  589. image {
  590. width: 100%;
  591. height: 100%;
  592. border-radius: 10upx;
  593. }
  594. }
  595. .carousel-section {
  596. padding: 0;
  597. .titleNview-placing {
  598. padding-top: 0;
  599. height: 0;
  600. }
  601. .carousel {
  602. .carousel-item {
  603. padding: 0;
  604. }
  605. }
  606. .swiper-dots {
  607. left: 45upx;
  608. bottom: 40upx;
  609. }
  610. }
  611. /* 分享 */
  612. .share-section {
  613. display: flex;
  614. align-items: center;
  615. color: $font-color-base;
  616. background: linear-gradient(left, #fdf5f6, #fbebf6);
  617. padding: 12upx 30upx;
  618. .share-icon {
  619. display: flex;
  620. align-items: center;
  621. width: 70upx;
  622. height: 30upx;
  623. line-height: 1;
  624. border: 1px solid $uni-color-primary;
  625. border-radius: 4upx;
  626. position: relative;
  627. overflow: hidden;
  628. font-size: 22upx;
  629. color: $uni-color-primary;
  630. &:after {
  631. content: '';
  632. width: 50upx;
  633. height: 50upx;
  634. border-radius: 50%;
  635. left: -20upx;
  636. top: -12upx;
  637. position: absolute;
  638. background: $uni-color-primary;
  639. }
  640. }
  641. .icon-xingxing {
  642. position: relative;
  643. z-index: 1;
  644. font-size: 24upx;
  645. margin-left: 2upx;
  646. margin-right: 10upx;
  647. color: #fff;
  648. line-height: 1;
  649. }
  650. .tit {
  651. font-size: $font-base;
  652. margin-left: 10upx;
  653. }
  654. .icon-bangzhu1 {
  655. padding: 10upx;
  656. font-size: 30upx;
  657. line-height: 1;
  658. }
  659. .share-btn {
  660. flex: 1;
  661. text-align: right;
  662. font-size: $font-sm;
  663. color: $uni-color-primary;
  664. }
  665. .icon-you {
  666. font-size: $font-sm;
  667. margin-left: 4upx;
  668. color: $uni-color-primary;
  669. }
  670. }
  671. .c-list {
  672. font-size: $font-sm + 2upx;
  673. color: $font-color-base;
  674. background: #fff;
  675. .c-row {
  676. display: flex;
  677. align-items: center;
  678. padding: 20upx 30upx;
  679. position: relative;
  680. }
  681. .tit {
  682. width: 220upx;
  683. }
  684. .con {
  685. flex: 1;
  686. color: $font-color-dark;
  687. .selected-text {
  688. margin-right: 10upx;
  689. }
  690. }
  691. .bz-list {
  692. height: 40upx;
  693. font-size: $font-sm+2upx;
  694. color: $font-color-dark;
  695. text {
  696. display: inline-block;
  697. margin-right: 30upx;
  698. }
  699. }
  700. .con-list {
  701. flex: 1;
  702. display: flex;
  703. flex-direction: column;
  704. color: $font-color-dark;
  705. line-height: 40upx;
  706. text-align: right;
  707. padding-right: 20upx;
  708. }
  709. .red {
  710. color: $uni-color-primary;
  711. }
  712. }
  713. /* 评价 */
  714. .eva-section {
  715. display: flex;
  716. flex-direction: column;
  717. padding: 20upx 30upx;
  718. background: #fff;
  719. margin-top: 16upx;
  720. .e-header {
  721. display: flex;
  722. align-items: center;
  723. height: 70upx;
  724. font-size: $font-sm + 2upx;
  725. color: $font-color-light;
  726. .tit {
  727. font-size: $font-base + 2upx;
  728. color: $font-color-dark;
  729. margin-right: 4upx;
  730. }
  731. .tip {
  732. flex: 1;
  733. text-align: right;
  734. }
  735. .icon-you {
  736. margin-left: 10upx;
  737. }
  738. }
  739. }
  740. .eva-box {
  741. display: flex;
  742. padding: 20upx 0;
  743. .portrait {
  744. flex-shrink: 0;
  745. width: 80upx;
  746. height: 80upx;
  747. border-radius: 100px;
  748. }
  749. .right {
  750. flex: 1;
  751. display: flex;
  752. flex-direction: column;
  753. font-size: $font-base;
  754. color: $font-color-base;
  755. padding-left: 26upx;
  756. .con {
  757. font-size: $font-base;
  758. color: $font-color-dark;
  759. padding: 20upx 0;
  760. }
  761. .bot {
  762. display: flex;
  763. justify-content: space-between;
  764. font-size: $font-sm;
  765. color: $font-color-light;
  766. }
  767. }
  768. }
  769. /* 详情 */
  770. .detail-desc {
  771. background: #fff;
  772. margin-top: 16upx;
  773. margin: 10px;
  774. position: relative;
  775. z-index: 4;
  776. border-radius: 5px;
  777. .d-header {
  778. display: flex;
  779. padding: 10px;
  780. font-size: $font-base + 2upx;
  781. color: $font-color-dark;
  782. position: relative;
  783. border-bottom: 1px solid #EEEEEE;
  784. text {
  785. padding: 0 20upx;
  786. position: relative;
  787. z-index: 1;
  788. }
  789. }
  790. }
  791. /* 规格选择弹窗 */
  792. .attr-content {
  793. padding: 10upx 30upx;
  794. .a-t {
  795. display: flex;
  796. image {
  797. width: 170upx;
  798. height: 170upx;
  799. flex-shrink: 0;
  800. margin-top: -40upx;
  801. border-radius: 8upx;
  802. ;
  803. }
  804. .right {
  805. display: flex;
  806. flex-direction: column;
  807. padding-left: 24upx;
  808. font-size: $font-sm + 2upx;
  809. color: $font-color-base;
  810. line-height: 42upx;
  811. .price {
  812. font-size: $font-lg;
  813. color: $uni-color-primary;
  814. margin-bottom: 10upx;
  815. }
  816. .selected-text {
  817. margin-right: 10upx;
  818. }
  819. }
  820. }
  821. .attr-list {
  822. display: flex;
  823. flex-direction: column;
  824. font-size: $font-base + 2upx;
  825. color: $font-color-base;
  826. padding-top: 30upx;
  827. padding-left: 10upx;
  828. }
  829. .item-list {
  830. padding: 30upx 0 0;
  831. display: flex;
  832. flex-wrap: wrap;
  833. text {
  834. display: flex;
  835. align-items: center;
  836. justify-content: center;
  837. background: #eee;
  838. margin-right: 20upx;
  839. margin-bottom: 20upx;
  840. border-radius: 100upx;
  841. min-width: 60upx;
  842. height: 60upx;
  843. padding: 0 20upx;
  844. font-size: $font-base;
  845. color: $font-color-dark;
  846. }
  847. .selected {
  848. background: #fbebee;
  849. color: $uni-color-primary;
  850. }
  851. }
  852. }
  853. /* 弹出层 */
  854. .popup {
  855. position: fixed;
  856. left: 0;
  857. top: 0;
  858. right: 0;
  859. bottom: 0;
  860. z-index: 99;
  861. &.show {
  862. display: block;
  863. .mask {
  864. animation: showPopup 0.2s linear both;
  865. }
  866. .layer {
  867. animation: showLayer 0.2s linear both;
  868. }
  869. }
  870. &.hide {
  871. .mask {
  872. animation: hidePopup 0.2s linear both;
  873. }
  874. .layer {
  875. animation: hideLayer 0.2s linear both;
  876. }
  877. }
  878. &.none {
  879. display: none;
  880. }
  881. .mask {
  882. position: fixed;
  883. top: 0;
  884. width: 100%;
  885. height: 100%;
  886. z-index: 1;
  887. background-color: rgba(0, 0, 0, 0.4);
  888. }
  889. .layer {
  890. position: fixed;
  891. z-index: 99;
  892. bottom: 0;
  893. width: 100%;
  894. min-height: 40vh;
  895. border-radius: 10upx 10upx 0 0;
  896. background-color: #fff;
  897. .btn {
  898. height: 66upx;
  899. line-height: 66upx;
  900. border-radius: 100upx;
  901. background: $uni-color-primary;
  902. font-size: $font-base + 2upx;
  903. color: #fff;
  904. margin: 30upx auto 20upx;
  905. }
  906. }
  907. @keyframes showPopup {
  908. 0% {
  909. opacity: 0;
  910. }
  911. 100% {
  912. opacity: 1;
  913. }
  914. }
  915. @keyframes hidePopup {
  916. 0% {
  917. opacity: 1;
  918. }
  919. 100% {
  920. opacity: 0;
  921. }
  922. }
  923. @keyframes showLayer {
  924. 0% {
  925. transform: translateY(120%);
  926. }
  927. 100% {
  928. transform: translateY(0%);
  929. }
  930. }
  931. @keyframes hideLayer {
  932. 0% {
  933. transform: translateY(0);
  934. }
  935. 100% {
  936. transform: translateY(120%);
  937. }
  938. }
  939. }
  940. .swiper-dots {
  941. display: flex;
  942. position: absolute;
  943. left: 60upx;
  944. bottom: 15upx;
  945. width: 72upx;
  946. height: 36upx;
  947. 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==);
  948. background-size: 100% 100%;
  949. .num {
  950. width: 36upx;
  951. height: 36upx;
  952. border-radius: 50px;
  953. font-size: 24upx;
  954. color: #fff;
  955. text-align: center;
  956. line-height: 36upx;
  957. }
  958. .sign {
  959. position: absolute;
  960. top: 0;
  961. left: 50%;
  962. line-height: 36upx;
  963. font-size: 12upx;
  964. color: #fff;
  965. transform: translateX(-50%);
  966. }
  967. }
  968. /* 底部操作菜单 */
  969. .page-bottom1 {
  970. position: fixed;
  971. left: 0;
  972. bottom: 0;
  973. z-index: 95;
  974. width: 100%;
  975. height: 70px;
  976. background: rgba(255, 255, 255, .9);
  977. padding: 15px;
  978. border-radius: 0;
  979. text-align: right;
  980. button {
  981. display: inline-block;
  982. border-radius: 18px;
  983. margin: 0 10px;
  984. font-size: 14px;
  985. background: #fff;
  986. color: #333;
  987. border: 1px solid #333;
  988. }
  989. .action-btn {
  990. background: #22C572;
  991. color: #fff;
  992. border: 1px solid #22C572;
  993. }
  994. .p-b-btn {
  995. display: flex;
  996. flex-direction: column;
  997. align-items: center;
  998. justify-content: center;
  999. font-size: $font-sm;
  1000. color: $font-color-base;
  1001. width: 96upx;
  1002. height: 80upx;
  1003. .yticon {
  1004. font-size: 40upx;
  1005. line-height: 48upx;
  1006. color: $font-color-light;
  1007. }
  1008. &.active,
  1009. &.active .yticon {
  1010. color: $uni-color-primary;
  1011. }
  1012. .icon-fenxiang2 {
  1013. font-size: 42upx;
  1014. transform: translateY(-2upx);
  1015. }
  1016. .icon-shoucang {
  1017. font-size: 46upx;
  1018. }
  1019. }
  1020. }
  1021. .rich-img {
  1022. width: 100%;
  1023. height: auto;
  1024. margin: 0;
  1025. padding: 0;
  1026. line-height: 0px;
  1027. }
  1028. button::after {
  1029. border: none;
  1030. }
  1031. /* 销售信息 */
  1032. .introduce-section {
  1033. background: #fff;
  1034. padding: 30upx 30upx;
  1035. position: relative;
  1036. margin: 10px;
  1037. padding-bottom: 25px;
  1038. margin-top: -148px;
  1039. border-radius: 5px;
  1040. z-index: 4;
  1041. .guess-item {
  1042. padding-bottom: 20upx;
  1043. border-bottom: 1px solid #ccc;
  1044. }
  1045. .title {
  1046. font-size: 16px;
  1047. color: $font-color-dark;
  1048. font-weight: bold;
  1049. height: 50upx;
  1050. line-height: 50upx;
  1051. flex: 2.5;
  1052. }
  1053. .title-tip {
  1054. flex: 1.5;
  1055. color: #FD714F;
  1056. font-size: 30px;
  1057. text-align: right;
  1058. }
  1059. .price-box {
  1060. display: flex;
  1061. align-items: baseline;
  1062. height: 120rpx;
  1063. padding: 10upx 0;
  1064. font-size: 26upx;
  1065. color: $uni-color-primary;
  1066. }
  1067. .price {
  1068. font-size: $font-lg + 2upx;
  1069. }
  1070. .m-price {
  1071. margin: 0 12upx;
  1072. color: $font-color-light;
  1073. text-decoration: line-through;
  1074. }
  1075. .coupon-tip {
  1076. align-items: center;
  1077. padding: 4upx 10upx;
  1078. background: $uni-color-primary;
  1079. font-size: $font-sm;
  1080. color: #fff;
  1081. border-radius: 6upx;
  1082. line-height: 1;
  1083. transform: translateY(-4upx);
  1084. }
  1085. .bot-row {
  1086. display: flex;
  1087. align-items: center;
  1088. height: 50upx;
  1089. font-size: $font-sm;
  1090. color: $font-color-light;
  1091. view {
  1092. flex: 1;
  1093. }
  1094. }
  1095. }
  1096. .back-btn {
  1097. position: absolute;
  1098. left: 40upx;
  1099. z-index: 9999;
  1100. padding-top: var(--status-bar-height);
  1101. top: 40upx;
  1102. font-size: 40upx;
  1103. color: #fff;
  1104. }
  1105. .shade {
  1106. position: fixed;
  1107. top: 0;
  1108. left: 0;
  1109. width: 100%;
  1110. background: rgba(0, 0, 0, 0.5);
  1111. height: 100%;
  1112. z-index: 999999;
  1113. }
  1114. .shade-content {
  1115. position: absolute;
  1116. top: 50%;
  1117. left: 50%;
  1118. transform: translateX(-50%) translateY(-50%);
  1119. z-index: 999999;
  1120. text-align: center;
  1121. }
  1122. .shade-content-item {
  1123. background: #fff;
  1124. width: 277px;
  1125. text-align: center;
  1126. height: 121px;
  1127. padding: 35px 10px;
  1128. border-radius: 15px;
  1129. }
  1130. </style>