detail.vue 23 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="one">
  5. <scroll-view scroll-y="true" class="scroll-view">
  6. <view class="list-scroll-view">
  7. <view class="one_1">
  8. <banner :goodsInfo="info.goods" :goodsColect="goodsColect" @toGoodscolect="toGoodscolect">
  9. </banner>
  10. </view>
  11. <view class="one_2">
  12. <text class="money_1"
  13. v-if="infospecs.leader_price"><text>团长价¥</text>{{infospecs.leader_price||0}}</text>
  14. <text class="money" v-if="infospecs.price"><text>特价¥</text>{{infospecs.price||0}}</text>
  15. <text class="money"
  16. v-if="!infospecs.price&&!infospecs.leader_price"><text>¥</text>{{infospecs.sell_money||0}}</text>
  17. <text class="money"><text>¥</text>{{infospecs.flow_money||0}}</text>
  18. </view>
  19. <view class="one_3" v-if="discount">
  20. <text v-if="discount.full_decrement&&discount.full_decrement.length>0" class="act"
  21. v-for="(item,index) in discount.full_decrement" :key="index">{{item}}</text>
  22. <text v-if="discount.full_fold&&discount.full_decrement.length>0" class="act"
  23. v-for="(item,index) in discount.full_fold" :key="index">{{item}}</text>
  24. </view>
  25. <view class="one_4">
  26. <text class="num">已售{{info.goods&&info.goods.sell_num||0}}件</text>
  27. </view>
  28. <view class="one_5">
  29. <view class="name">
  30. {{info.goods&&info.goods.name}}
  31. </view>
  32. <view class="brief">
  33. {{info.goods&&info.goods.shot_brief||''}}
  34. </view>
  35. <view class="money">
  36. <!-- <text>运费{{infospecs.freight||'包邮'}}元</text> -->
  37. <text>{{info.goods&&info.goods.send_time}}内发货</text>
  38. </view>
  39. </view>
  40. <view class="one_6" @tap="toActivity">
  41. <view class="l">
  42. <text>{{info.act&&info.act.length>0?`活动`:`暂无活动`}}</text>
  43. </view>
  44. <view class="r">
  45. <text class="iconfont icon-jiantouyou"></text>
  46. </view>
  47. </view>
  48. <view class="one_6" @tap="toSpec">
  49. <view class="l">
  50. 选择规格
  51. </view>
  52. <view class="r">
  53. <text class="iconfont icon-jiantouyou"></text>
  54. </view>
  55. </view>
  56. <view class="one_6" @tap="toEvaluate">
  57. <view class="l">
  58. <text>{{evaluate_num>0?`商品评价(${evaluate_num})`:`暂无评价`}}</text>
  59. </view>
  60. <view class="r">
  61. <text class="iconfont icon-jiantouyou"></text>
  62. </view>
  63. </view>
  64. <view class="one_7" v-if="info.sets&&info.sets.length>0" @tap="toSets">
  65. <view class="one_7_1">
  66. 优惠套装<text>({{info.sets.length||0}})</text>
  67. </view>
  68. <view class="one_7_2">
  69. <view class="image" v-for="(set,index) in info.sets[0].set" :key="index">
  70. <image class="image" :src="set.file&&set.file.length>0?set.file[0].url:''"
  71. mode="aspectFit">
  72. </image>
  73. </view>
  74. <view class="money">
  75. <view class="money_1">共{{info.sets[0].goods_total}}件</view>
  76. <view class="money_2">¥{{info.sets[0].sell_money}}</view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="one_8">
  81. <view class="one_8_1">
  82. <view class="shop_1">
  83. <image class="image"
  84. :src="info.shop&&info.shop.logo&&info.shop.logo.length>0?info.shop.logo[0].url:''"
  85. mode="aspectFit"></image>
  86. </view>
  87. <view class="shop_2">
  88. <view class="name">{{info.shop&&info.shop.name}}</view>
  89. <view class="num"><text>宝贝数:</text>{{info.shop&&info.shop.goods_num||0}}</view>
  90. </view>
  91. </view>
  92. <view class="one_8_2">
  93. <view class="score_1">
  94. <text>商品:</text>
  95. <text>{{info.shop&&info.shop.goods_score||5}}</text>
  96. <text>|</text>
  97. </view>
  98. <view class="score_1">
  99. <text>发货:</text>
  100. <text>{{info.shop&&info.shop.send_score||5}}</text>
  101. <text>|</text>
  102. </view>
  103. <view class="score_1">
  104. <text>服务:</text>
  105. <text>{{info.shop&&info.shop.service_score||5}}</text>
  106. </view>
  107. </view>
  108. <view class="one_8_3">
  109. <view class="btn">
  110. <button size="mini" @tap="toShop">进入店铺</button>
  111. </view>
  112. <view class="btn">
  113. <button size="mini" @tap="toShopcolect">{{shopColect==true?'已关注':'关注'}}</button>
  114. </view>
  115. </view>
  116. </view>
  117. <view class="one_9">
  118. <rich-text :nodes="info.goods&&info.goods.brief"></rich-text>
  119. </view>
  120. </view>
  121. </scroll-view>
  122. </view>
  123. <view class="two">
  124. <uni-goods-nav :options="options" :button-group="buttonGroup" @click="toNavleft"
  125. @buttonClick="toNavright" />
  126. </view>
  127. </view>
  128. <!-- 跳转菜单 -->
  129. <view class="bar_1">
  130. <text @tap="toMenubar" class="iconfont icon-gengduo"></text>
  131. </view>
  132. <view class="bar_2" v-if="is_menu">
  133. <view class="list" v-for="(item,index) in barList" :key="index" v-if="item.is_use=='0'"
  134. @click="toPath(item)">
  135. <image class="image" :src="item.normal&&item.normal.length>0?item.normal[0].url:''"></image>
  136. <text class="name"> {{item.name}}</text>
  137. </view>
  138. </view>
  139. <!-- 规格 -->
  140. <uni-popup ref="specShow" background-color="#fff" type="bottom" :is-mask-click="false">
  141. <view class="popup">
  142. <view class="close">
  143. <text @click="toClose" class="iconfont icon-shanchu"></text>
  144. </view>
  145. <specs_1 :info="info" :goodsInfo="info.goods" :specsInfo="specsInfo" :btn_type="btn_type"
  146. :dialog="dialog" :is_zero="is_zero" :buy_num="buy_num" :popupShow="popupShow" :is_specs="is_specs"
  147. @diaView="diaView" @toSpecs="toSpecs" @toCount="toCount" @toMarket="toMarket" @toBuy="toBuy"
  148. @toGroup="toGroup" @dialogClose="dialogClose" @diaSpecs="diaSpecs">
  149. </specs_1>
  150. </view>
  151. </uni-popup>
  152. </mobile-frame>
  153. </template>
  154. <script>
  155. import banner from './components/banner_1.vue';
  156. import specs_1 from './components/specs_1.vue';
  157. export default {
  158. components: {
  159. banner,
  160. specs_1,
  161. },
  162. data() {
  163. return {
  164. // 系统设置
  165. config: {},
  166. // 商品id
  167. id: '',
  168. // 分享人id
  169. inviter: '',
  170. // 当前用户信息
  171. user: {},
  172. // 是否关注商品
  173. goodsColect: false,
  174. // 是否关注店铺
  175. shopColect: false,
  176. // 评价数
  177. evaluate_num: 0,
  178. // 商品详情
  179. info: {},
  180. // 规格
  181. infospecs: {},
  182. // 优惠
  183. discount: {},
  184. // 底部菜单
  185. options: [{
  186. icon: 'shop',
  187. text: '店铺',
  188. type: 'shop',
  189. route: 'pagesHome/shop/index',
  190. },
  191. {
  192. icon: 'cart',
  193. text: '购物车',
  194. type: 'market',
  195. route: 'pages/market/index',
  196. },
  197. ],
  198. buttonGroup: [{
  199. text: '加入购物车',
  200. backgroundColor: 'linear-gradient(90deg, #FFCD1E, #FF8A18)',
  201. color: '#fff',
  202. type: '0'
  203. },
  204. {
  205. text: '立即购买',
  206. backgroundColor: 'linear-gradient(90deg, #FE6035, #EF1224)',
  207. color: '#fff',
  208. type: '1'
  209. }
  210. ],
  211. // 系统菜单
  212. barList: [],
  213. is_menu: false,
  214. // 规格弹框
  215. popupShow: '1',
  216. // 规格信息
  217. is_specs: 0,
  218. btn_type: '1',
  219. specsInfo: {},
  220. // 是否零库存
  221. is_zero: false,
  222. // 商品设置
  223. group_config: [],
  224. // 限制说明
  225. buyList: [],
  226. // 购买数量
  227. buy_num: 1,
  228. // 规格弹出框
  229. dialog: {
  230. show: false,
  231. type: '1'
  232. },
  233. };
  234. },
  235. onLoad: async function(e) {
  236. const that = this;
  237. that.$set(that, `id`, e.id || '');
  238. that.$set(that, `inviter`, e.inviter || '');
  239. await that.searchConfig();
  240. await that.search();
  241. await that.configShare();
  242. },
  243. onShow: async function() {
  244. const that = this;
  245. await that.watchLogin();
  246. },
  247. onUnload: function() {
  248. // 页面卸载,重新部署分享内容
  249. const that = this;
  250. if (that.config) {
  251. // 赋值默认值
  252. that.$config.share = {
  253. title: that.config.title,
  254. path: '/pages/index/index',
  255. imageUrl: that.config.config.share[0].url
  256. }
  257. }
  258. },
  259. methods: {
  260. // 查询系统设置
  261. searchConfig() {
  262. const that = this;
  263. uni.getStorage({
  264. key: 'config',
  265. success: function(res) {
  266. let data = res.data;
  267. that.$set(that, `config`, data);
  268. if (data.bottom_menu && data.bottom_menu.list.length > 0) {
  269. let list = data.bottom_menu.list.sort((a, b) => {
  270. return a.sort - b.sort
  271. });
  272. that.$set(that, `barList`, list)
  273. }
  274. }
  275. })
  276. },
  277. // 查询用户信息
  278. watchLogin() {
  279. const that = this;
  280. uni.getStorage({
  281. key: 'token',
  282. success: async function(res) {
  283. let user = that.$jwt(res.data);
  284. if (user) that.$set(that, `user`, user);
  285. },
  286. fail: function(err) {
  287. console.log('暂无用户信息');
  288. }
  289. })
  290. },
  291. // 查询其他信息
  292. async searchOther() {
  293. const that = this;
  294. let user = that.user;
  295. let res;
  296. // 是否关注商品
  297. res = await that.$api(`/storeGoods/check`, `GET`, {
  298. customer: user._id,
  299. goods: that.id
  300. });
  301. if (res.errcode == '0') that.$set(that, `goodsColect`, res.data);
  302. // 是否关注店铺
  303. res = await that.$api(`/storeShop/check`, `GET`, {
  304. customer: user._id,
  305. shop: that.info?.shop?._id
  306. });
  307. if (res.errcode == '0') that.$set(that, `shopColect`, res.data);
  308. // 商品设置
  309. res = await that.$api(`/goodsConfig`, `GET`, {
  310. goods: that.id,
  311. shop: that.info?.shop?._id
  312. }, 'group');
  313. if (res.errcode == '0' && res.total > 0) that.$set(that, `group_config`, res.data);
  314. // 限制说明
  315. res = await that.$api(`/dictData`, 'GET', {
  316. code: "buy_limit"
  317. });
  318. if (res.errcode == '0') that.$set(that, `buyList`, res.data)
  319. },
  320. // 查询商品信息
  321. async search() {
  322. const that = this;
  323. let id = that.id;
  324. if (id) {
  325. let res;
  326. res = await that.$api(`/viewGoods/goodsDetail`, `POST`, {
  327. id: id
  328. });
  329. if (res.errcode == '0') {
  330. let data = res.data;
  331. if (data.goods.brief) data.goods.brief = data.goods.brief.replace(/\<img/gi,
  332. '<img class="rich-img"');
  333. // 特价
  334. let act;
  335. act = data.act.find(i => i.type == '3')
  336. if (act) {
  337. for (let val of act.list) {
  338. for (let [index, arr] of data.specs.entries()) {
  339. if (val.spec == arr._id) arr.price = val.price
  340. }
  341. }
  342. }
  343. // 显示最低价格的规格信息,不考虑库存问题
  344. if (data.specs && data.specs.length > 0) {
  345. // 规格排序
  346. let indexSpecs = data.specs.sort(function(a, b) {
  347. let i, j;
  348. if (a.price) i = 'price'
  349. else i = 'sell_money'
  350. if (b.price) j = 'price'
  351. else j = 'sell_money'
  352. return a[i] - b[j];
  353. })
  354. that.$set(that, `infospecs`, indexSpecs[0])
  355. }
  356. that.$set(that, `info`, data);
  357. // 优惠
  358. act = data.act.find(i => i.type == '5')
  359. if (act) that.$set(that.discount, `full_decrement`, act.text.split(';'));
  360. act = data.act.find(i => i.type == '6')
  361. if (act) that.$set(that.discount, `full_fold`, act.text.split(';'));
  362. await that.searchOther();
  363. // 查询规格
  364. await that.searchSpecs(data.specs);
  365. // 查询评价数
  366. await that.searchRate(data);
  367. }
  368. } else {
  369. uni.showToast({
  370. title: '暂无商品信息',
  371. icon: 'none'
  372. })
  373. }
  374. },
  375. // 查询规格
  376. searchSpecs(e) {
  377. const that = this;
  378. if (e.length > 0) {
  379. let data = e.find(i => i.num > 0);
  380. let dataIndex = e.findIndex(i => i._id == data._id);
  381. if (data) {
  382. let specsInfo = that.group_config.find(i => i.spec._id == data._id)
  383. if (specsInfo?._id && that.user.is_leader == '0') data.can_group = '0'
  384. else data.can_group = '1'
  385. let limit = that.buyList.find((i) => i.value == data.buy_limit);
  386. if (limit) data.buy_name = limit.label
  387. that.$set(that, `specsInfo`, data);
  388. that.$set(that, `is_specs`, dataIndex);
  389. }
  390. }
  391. },
  392. // 查询评价数
  393. async searchRate(e) {
  394. const that = this;
  395. let res = await that.$api(`/goodsRate`, `GET`, {
  396. limit: 1,
  397. goods: e.goods._id
  398. })
  399. if (res.errcode == '0') that.$set(that, `evaluate_num`, res.total);
  400. },
  401. // 关注商品
  402. async toGoodscolect() {
  403. const that = this;
  404. let user = that.user;
  405. if (user && user._id) {
  406. let res = await that.$api(`/storeGoods`, `POST`, {
  407. customer: user._id,
  408. goods: that.id
  409. });
  410. if (res.errcode == '0') {
  411. uni.showToast({
  412. title: res.data.msg,
  413. icon: 'none'
  414. })
  415. that.$set(that, `goodsColect`, res.data.result)
  416. }
  417. } else {
  418. uni.showToast({
  419. title: '暂无账号,无法收藏商品',
  420. icon: 'none'
  421. })
  422. }
  423. },
  424. // 活动说明
  425. toActivity() {
  426. const that = this;
  427. if (that.info.act.length > 0) {
  428. that.$set(that, `popupShow`, '2')
  429. that.$refs.specShow.open();
  430. }
  431. },
  432. // 活动说明
  433. toActivity() {
  434. const that = this;
  435. if (that.info.act.length > 0) {
  436. that.$set(that, `popupShow`, '2')
  437. that.$refs.specShow.open();
  438. }
  439. },
  440. // 选择规格
  441. toSpec() {
  442. const that = this;
  443. this.$set(that, `popupShow`, '1')
  444. that.$refs.specShow.open();
  445. },
  446. // 选择规格
  447. toSpecs(e) {
  448. const that = this;
  449. let specs = that.info.specs;
  450. let dataIndex = specs.findIndex(i => i._id == e._id);
  451. that.$set(that, `is_specs`, dataIndex);
  452. let specsInfo = that.group_config.find(i => i.spec._id == e._id)
  453. if (specsInfo?._id && that.user.is_leader == '0') e.can_group = '0'
  454. else e.can_group = '1'
  455. let limit = that.buyList.find((i) => i.value == e.buy_limit);
  456. if (limit) e.buy_name = limit.label
  457. that.$set(that, `specsInfo`, e)
  458. that.$set(that, `buy_num`, 1);
  459. if (e.num <= 0) that.$set(that, `is_zero`, true)
  460. else that.$set(that, `is_zero`, false)
  461. },
  462. // 评价
  463. toEvaluate() {
  464. const that = this;
  465. uni.navigateTo({
  466. url: `/pagesHome/order/appraise?id=${that.info.goods._id}`
  467. })
  468. },
  469. // 查看套装
  470. toSets() {
  471. const that = this;
  472. if (that.info.sets.length > 0) {
  473. that.$set(that, `popupShow`, '3')
  474. that.$refs.specShow.open();
  475. }
  476. },
  477. // 套装详情
  478. toDeatil(e) {
  479. const that = this;
  480. uni.navigateTo({
  481. url: `/pagesHome/order/detail?id=${e.goods}`
  482. })
  483. },
  484. // 进入店铺
  485. toShop() {
  486. const that = this;
  487. let info = that.info;
  488. uni.navigateTo({
  489. url: `/pagesHome/shop/index?id=${info.shop._id}`
  490. })
  491. },
  492. // 关注店铺
  493. async toShopcolect() {
  494. const that = this;
  495. let user = that.user;
  496. if (user && user._id) {
  497. let res = await that.$api(`/storeShop`, `POST`, {
  498. customer: user._id,
  499. shop: that.info.shop._id
  500. });
  501. if (res.errcode == '0') {
  502. uni.showToast({
  503. title: res.data.msg,
  504. icon: 'none'
  505. })
  506. that.$set(that, `shopColect`, res.data.result)
  507. }
  508. } else {
  509. uni.showToast({
  510. title: '暂无账号,无法关注商铺',
  511. icon: 'none'
  512. })
  513. }
  514. },
  515. // 关闭弹框
  516. toClose() {
  517. const that = this;
  518. that.$set(that, `btn_type`, '1');
  519. that.$refs.specShow.close();
  520. },
  521. // 规格预览
  522. diaView() {
  523. const that = this;
  524. that.$set(that, `dialog`, {
  525. show: true,
  526. type: '1'
  527. })
  528. },
  529. // 计数器
  530. toCount(e) {
  531. const that = this;
  532. that.$set(that, `buy_num`, e)
  533. },
  534. // 立即购买
  535. async toBuy() {
  536. const that = this;
  537. let user = that.user;
  538. let info = that.info;
  539. let specsInfo = that.specsInfo;
  540. let act = that.info.act.map(item => {
  541. return item._id
  542. })
  543. if (user && user._id) {
  544. let obj = [{
  545. customer: user._id,
  546. shop: info.shop._id,
  547. goods: info.goods._id,
  548. goodsSpec: specsInfo._id,
  549. num: that.buy_num,
  550. inviter: that.inviter,
  551. act
  552. }]
  553. let res = await that.$api(`/util/checkCanBuy`, 'POST', obj)
  554. if (res.errcode == '0') {
  555. if (res.data.result == true) {
  556. uni.navigateTo({
  557. url: `/pagesHome/order/order?key=${res.data.key}`
  558. })
  559. } else {
  560. uni.showToast({
  561. title: res.data.msg,
  562. icon: 'none',
  563. duration: 5000
  564. })
  565. }
  566. } else {
  567. uni.showToast({
  568. title: res.errmsg,
  569. icon: 'none'
  570. })
  571. }
  572. } else {
  573. uni.navigateTo({
  574. url: `/pages/login/index`
  575. })
  576. }
  577. },
  578. // 加入购物车
  579. async toMarket() {
  580. const that = this;
  581. let user = that.user;
  582. let info = that.info;
  583. let specsInfo = that.specsInfo;
  584. if (user && user._id) {
  585. let obj = {
  586. customer: user._id,
  587. shop: info.shop._id,
  588. goods: info.goods._id,
  589. goodsSpec: specsInfo._id,
  590. num: that.buy_num,
  591. inviter: that.inviter
  592. }
  593. let res = await that.$api(`/cart`, 'POST', obj)
  594. if (res.errcode == '0') {
  595. uni.showToast({
  596. title: `加入购物车成功`,
  597. icon: 'none'
  598. })
  599. that.toClose();
  600. } else {
  601. uni.showToast({
  602. title: res.errmsg,
  603. icon: 'none'
  604. })
  605. }
  606. } else {
  607. uni.navigateTo({
  608. url: `/pages/login/index`
  609. })
  610. }
  611. },
  612. // 开团
  613. toGroup() {
  614. const that = this;
  615. uni.navigateTo({
  616. url: `/pagesHome/group/index?shop=${that.info?.shop?._id}&goods=${that.id}`
  617. })
  618. },
  619. // 店铺,购物车
  620. toNavleft(e) {
  621. const that = this;
  622. if (e.content.type == 'shop') {
  623. that.toShop();
  624. } else if (e.content.type == 'market') {
  625. let obj = {
  626. route: e.content.route
  627. }
  628. that.toPath(obj)
  629. }
  630. },
  631. // 关闭弹框
  632. dialogClose() {
  633. const that = this;
  634. that.$set(that, `dialog`, {
  635. show: false,
  636. type: '1'
  637. })
  638. },
  639. // 弹框选择规格
  640. diaSpecs(e) {
  641. const that = this;
  642. let specs = that.info.specs;
  643. let index = e.detail.current;
  644. let data = specs[index];
  645. that.$set(that, `is_specs`, index);
  646. that.$set(that, `specsInfo`, data);
  647. that.$set(that, `buy_num`, 1);
  648. if (data.num <= 0) that.$set(that, `is_zero`, true)
  649. else that.$set(that, `is_zero`, false)
  650. },
  651. // 加入购物车,立即购买
  652. toNavright(e) {
  653. const that = this;
  654. that.$set(that, `popupShow`, '1');
  655. that.$set(that, `btn_type`, e.content.type);
  656. that.$refs.specShow.open();
  657. },
  658. // 配置分享内容
  659. configShare() {
  660. const that = this;
  661. let id = that.id;
  662. let inviter = that.user && that.user._id ? that.user._id : '';
  663. let title = that.info && that.info.goods ? that.info.goods.name : '';
  664. let imageUrl = that.info && that.info.goods ? that.info.goods.file[0].url : '';
  665. that.$config.share = {
  666. title: title,
  667. path: `/pagesHome/order/detail?id=${id}&inviter=${inviter}`,
  668. imageUrl: imageUrl
  669. }
  670. },
  671. // 右侧菜单
  672. toMenubar() {
  673. const that = this;
  674. that.$set(that, `is_menu`, that.is_menu ? false : true)
  675. },
  676. toPath(e) {
  677. let url = `/${e.route}`;
  678. uni.reLaunch({
  679. url
  680. })
  681. },
  682. }
  683. }
  684. </script>
  685. <style lang="scss">
  686. .main {
  687. display: flex;
  688. flex-direction: column;
  689. width: 100vw;
  690. height: 100vh;
  691. .one {
  692. position: relative;
  693. flex-grow: 1;
  694. .one_2 {
  695. border-bottom: 0.5vw solid var(--f9Color);
  696. padding: 2vw;
  697. .money_1 {
  698. color: #23B67A;
  699. font-size: 20px;
  700. padding: 0 1vw 0 0;
  701. font-weight: bold;
  702. text {
  703. font-size: 14px;
  704. }
  705. }
  706. .money {
  707. font-size: 20px;
  708. padding: 0 1vw 0 0;
  709. color: #ff0000;
  710. font-weight: bold;
  711. text {
  712. font-size: 14px;
  713. }
  714. }
  715. .money:last-child {
  716. font-size: 16px;
  717. color: #858585;
  718. text-decoration: line-through;
  719. }
  720. }
  721. .one_3 {
  722. display: flex;
  723. flex-wrap: wrap;
  724. padding: 1vw;
  725. border-bottom: 0.5vw solid var(--f9Color);
  726. .act {
  727. font-size: 12px;
  728. border: 1px solid var(--fFB1Color);
  729. margin: 0 1vw 1vw 0;
  730. color: var(--fFB1Color);
  731. border-radius: 6px;
  732. padding: 0 1vw;
  733. }
  734. .num {
  735. font-size: 12px;
  736. color: #858585;
  737. }
  738. }
  739. .one_4 {
  740. display: flex;
  741. flex-wrap: wrap;
  742. padding: 1vw;
  743. border-bottom: 0.5vw solid var(--f9Color);
  744. .num {
  745. font-size: 12px;
  746. color: #858585;
  747. }
  748. }
  749. .one_5 {
  750. border-bottom: 0.5vw solid var(--f9Color);
  751. padding: 2vw;
  752. .name {
  753. font-size: 17px;
  754. font-weight: bold;
  755. margin: 0 0 2vw 0;
  756. }
  757. .brief {
  758. font-size: 14px;
  759. color: #858585;
  760. margin: 0 0 1vw 0;
  761. }
  762. .money {
  763. font-size: 13px;
  764. color: #858585;
  765. text {
  766. padding: 0 2vw 0 0;
  767. }
  768. }
  769. }
  770. .one_6 {
  771. display: flex;
  772. justify-content: space-between;
  773. padding: 2vw;
  774. border-bottom: 0.5vw solid var(--f9Color);
  775. font-size: 14px;
  776. }
  777. .one_7 {
  778. padding: 2vw;
  779. border-bottom: 2vw solid var(--f9Color);
  780. border-top: 1vw solid var(--f9Color);
  781. .one_7_1 {
  782. padding: 2vw 0;
  783. font-size: 14px;
  784. text {
  785. padding: 0 0 0 1vw;
  786. font-size: 12px;
  787. color: #858585;
  788. }
  789. }
  790. .one_7_2 {
  791. display: flex;
  792. justify-content: space-between;
  793. align-items: center;
  794. padding: 2vw;
  795. border-radius: 5px;
  796. background-color: var(--f9Color);
  797. .image {
  798. width: 20vw;
  799. height: 20vw;
  800. .image {
  801. width: 100%;
  802. height: 100%;
  803. border-radius: 5px;
  804. background-color: #fff;
  805. }
  806. }
  807. .money {
  808. text-align: center;
  809. .money_1 {
  810. font-size: 12px;
  811. color: #858585;
  812. }
  813. .money_2 {
  814. font-size: 12px;
  815. color: #ff0000;
  816. }
  817. }
  818. }
  819. }
  820. .one_8 {
  821. padding: 2vw;
  822. border-bottom: 0.5vw solid var(--f9Color);
  823. .one_8_1 {
  824. margin: 0 0 1vw 0;
  825. display: flex;
  826. .shop_1 {
  827. width: 15vw;
  828. height: 15vw;
  829. border: 1px solid #f1f1f1;
  830. .image {
  831. width: 100%;
  832. height: 100%;
  833. }
  834. }
  835. .shop_2 {
  836. width: 78vw;
  837. padding: 0 0 0 2vw;
  838. .name {
  839. font-size: 14px;
  840. margin: 0 0 1vw 0;
  841. }
  842. .num {
  843. font-size: 12px;
  844. color: #858585;
  845. text:last-child {
  846. color: #000;
  847. }
  848. }
  849. }
  850. }
  851. .one_8_2 {
  852. margin: 0 0 2vw 0;
  853. display: flex;
  854. justify-content: space-between;
  855. padding: 2vw 0;
  856. .score_1 {
  857. width: 33vw;
  858. text-align: center;
  859. font-size: 14px;
  860. color: #858585;
  861. text:nth-child(2) {
  862. color: #ff0000;
  863. }
  864. text:nth-child(3) {
  865. float: right;
  866. }
  867. }
  868. }
  869. .one_8_3 {
  870. display: flex;
  871. justify-content: space-around;
  872. .btn {
  873. width: 40vw;
  874. button {
  875. width: 100%;
  876. font-size: 15px;
  877. }
  878. }
  879. }
  880. }
  881. .one_9 {
  882. padding: 2vw;
  883. .rich-img {
  884. width: 100% !important;
  885. display: block;
  886. }
  887. }
  888. }
  889. .two {
  890. width: 100vw;
  891. height: 8vh;
  892. overflow: hidden;
  893. }
  894. }
  895. .scroll-view {
  896. position: absolute;
  897. top: 0;
  898. left: 0;
  899. right: 0;
  900. bottom: 0;
  901. .list-scroll-view {
  902. display: flex;
  903. flex-direction: column;
  904. }
  905. }
  906. .bar_1 {
  907. position: fixed;
  908. right: 2vw;
  909. bottom: 20vw;
  910. text {
  911. background-color: #858585;
  912. border-radius: 90px;
  913. font-size: 30px;
  914. }
  915. }
  916. .bar_2 {
  917. position: fixed;
  918. right: 2vw;
  919. bottom: 28vw;
  920. width: 27vw;
  921. background: #ffffff;
  922. padding: 0 2vw;
  923. box-shadow: 0 0 5px #858585;
  924. .list {
  925. display: flex;
  926. border-bottom: 1px solid #f1f1f1;
  927. padding: 1vw 0;
  928. .image {
  929. width: 8vw;
  930. height: 8vw;
  931. }
  932. .name {
  933. font-size: 14px;
  934. position: relative;
  935. top: 2vw;
  936. left: 2vw;
  937. }
  938. }
  939. .list:last-child {
  940. border-bottom: none;
  941. }
  942. }
  943. .uni-popup {
  944. z-index: 9999 !important;
  945. }
  946. .popup {
  947. display: flex;
  948. flex-direction: column;
  949. width: 100vw;
  950. height: 60vh;
  951. .close {
  952. text-align: right;
  953. padding: 2vw;
  954. }
  955. }
  956. </style>