my-shop.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949
  1. <template>
  2. <view class="container shop clearfix" :style="{ paddingTop: CustomBar + 'px' }">
  3. <!-- 主页内容 -->
  4. <tui-skeleton
  5. v-if="skeletonShow"
  6. backgroundColor="#fafafa"
  7. borderRadius="10rpx"
  8. :isLoading="true"
  9. :loadingType="5"
  10. ></tui-skeleton>
  11. <template v-else>
  12. <view class="shop-search-main">
  13. <view class="shop-search">
  14. <text class="iconfont icon-sousuo"></text>
  15. <input
  16. class="input"
  17. maxlength="20"
  18. type="text"
  19. value=""
  20. @focus="onFocus"
  21. @input="onShowClose"
  22. v-model.trim="listQuery.keyword"
  23. confirm-type="search"
  24. @confirm="SubMitSearch()"
  25. placeholder="搜索本店铺商品"
  26. />
  27. <text class="iconfont icon-shanchu1" v-if="isShowClose" @click.stop="delInputText()"></text>
  28. </view>
  29. </view>
  30. <view class="container-shop tui-skeleton">
  31. <!-- 轮播 -->
  32. <view class="product-supplier" @click="goSupplier">
  33. <view class="logo"
  34. ><img
  35. :src="shopLogo ? shopLogo : 'https://static.caimei365.com/app/img/icon/icon-shoplogo.png'"
  36. alt=""
  37. /></view>
  38. <view class="main">
  39. <view class="name">{{ shopName }}</view>
  40. <view class="massgs">
  41. <view class="label">满意度:</view>
  42. <view class="p-stars">
  43. <uni-stars
  44. :stars="6"
  45. :iconClass="iconClass"
  46. :iconColor="iconColor"
  47. :fontSize="36"
  48. :widthInfo="176"
  49. ></uni-stars>
  50. </view>
  51. <view class="acount">
  52. <text> {{ normalNum }} </text>件商品
  53. </view>
  54. </view>
  55. </view>
  56. <view class="right"><text class="iconfont icon-xiayibu"></text></view>
  57. </view>
  58. <banner :list="bannerImageList"></banner>
  59. </view>
  60. <view class="container-section tui-skeleton" v-if="!isEmpty">
  61. <view class="tab-title">主推商品</view>
  62. <view class="section-product clearfix">
  63. <view class="floor-item-none" v-if="isHomeProduct">
  64. <image class="none-image" :src="iconNoneData" mode=""></image>
  65. <view class="none-text">暂无主推商品~</view>
  66. </view>
  67. <view
  68. v-else
  69. class="floor-item"
  70. v-for="(prop, index) in recommendList"
  71. :key="index"
  72. @click.stop="navToDetailPage(prop.productId)"
  73. >
  74. <image class="item-img tui-skeleton-fillet" :src="prop.image" mode="aspectFill"></image>
  75. <view class="floor-item-content">
  76. <view class="title tui-skeleton-rect">
  77. <text class="mclap-tag" v-if="prop.beautyActFlag == '1'">美博会</text>
  78. <text class="mclap" :class="prop.beautyActFlag == '1' ? 'indent' : ''">{{
  79. prop.name
  80. }}</text>
  81. </view>
  82. <view class="floor-item-act">
  83. <template v-if="userIdentity === 3">
  84. <view class="coupon-tags" v-if="prop.couponsLogo">优惠券</view>
  85. <template v-if="prop.actStatus === 1">
  86. <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
  87. {{ prop.promotions.name }}
  88. <text v-if="hasLogin && prop.priceFlag != 1 && prop.shopId == shopId"
  89. >:¥{{ prop.price | NumFormat }}</text
  90. >
  91. </view>
  92. <view class="floor-tags" v-else>{{ prop.promotions.name }}</view>
  93. </template>
  94. <template v-if="prop.actStatus === 0 && prop.ladderPriceFlag === 1">
  95. <view class="floor-tags">阶梯价格</view>
  96. </template>
  97. </template>
  98. <template v-else>
  99. <view class="coupon-tags" v-if="prop.couponsLogo">优惠券</view>
  100. <template v-if="prop.actStatus === 1">
  101. <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
  102. {{ prop.promotions.name }}
  103. <text v-if="hasLogin && prop.priceFlag != 1"
  104. >:¥{{ prop.price | NumFormat }}</text
  105. >
  106. </view>
  107. <view class="floor-tags" v-else>{{ prop.promotions.name }}</view>
  108. </template>
  109. <template v-if="prop.actStatus === 0 && prop.ladderPriceFlag === 1">
  110. <view class="floor-tags">阶梯价格</view>
  111. </template>
  112. </template>
  113. </view>
  114. <view class="" v-if="hasLogin">
  115. <template v-if="userIdentity == 3">
  116. <template v-if="prop.shopId == shopId">
  117. <view class="title-none" v-if="prop.priceFlag === 1">
  118. <text class="p big">¥未公开价格</text>
  119. </view>
  120. <view
  121. class="price tui-skeleton-rect"
  122. v-else
  123. :class="PromotionsFormat(prop.promotions) ? 'none' : ''"
  124. >
  125. <text class="p sm">¥</text>
  126. <text class="p big">{{
  127. (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price)
  128. | NumFormat
  129. }}</text>
  130. </view>
  131. </template>
  132. <template v-else>
  133. <view class="no-price">
  134. <view class="p-stars">
  135. <text class="p-no">¥</text>
  136. <uni-grader :grade="Number(prop.priceGrade)" :margin="14"></uni-grader>
  137. </view>
  138. </view>
  139. </template>
  140. </template>
  141. <template v-else-if="userIdentity === 4">
  142. <view class="title-none" v-if="prop.priceFlag === 1">
  143. <text class="p big">¥未公开价格</text>
  144. </view>
  145. <view class="title-none" v-if="prop.priceFlag === 2">
  146. <text class="p big">¥价格仅会员可见</text>
  147. </view>
  148. <view
  149. class="price tui-skeleton-rect"
  150. v-if="prop.priceFlag === 0"
  151. :class="PromotionsFormat(prop.promotions) ? 'none' : ''"
  152. >
  153. <text class="p sm">¥</text>
  154. <text class="p big">{{
  155. (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price)
  156. | NumFormat
  157. }}</text>
  158. </view>
  159. </template>
  160. <template v-else>
  161. <view class="title-none" v-if="prop.priceFlag === 1">
  162. <text class="p big">¥未公开价格</text>
  163. </view>
  164. <view
  165. class="price tui-skeleton-rect"
  166. v-else
  167. :class="PromotionsFormat(prop.promotions) ? 'none' : ''"
  168. >
  169. <text class="p sm">¥</text>
  170. <text class="p big">{{
  171. (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price)
  172. | NumFormat
  173. }}</text>
  174. </view>
  175. </template>
  176. </view>
  177. <view v-else class="no-price">
  178. <view class="p-stars">
  179. <text class="p-no">¥</text>
  180. <uni-grader :grade="Number(prop.priceGrade)"></uni-grader>
  181. <template v-if="prop.actStatus == 1">
  182. <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
  183. {{ prop.promotions.name
  184. }}<text v-if="hasLogin && prop.priceFlag != 1"
  185. >:¥{{ prop.price | NumFormat }}</text
  186. >
  187. </view>
  188. <view class="floor-tags" v-else>{{ prop.promotions.name }}</view>
  189. </template>
  190. <template v-if="prop.actStatus == 0 && prop.ladderPriceFlag == 1">
  191. <view class="floor-tags">阶梯价格</view>
  192. </template>
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. </view>
  199. <view class="container-section tui-skeleton">
  200. <view class="tab-title" v-if="!isEmpty">全部商品</view>
  201. <view class="section-product clearfix">
  202. <view class="floor-item-none" v-if="isEmpty">
  203. <image class="none-image" :src="iconNoneData1" mode=""></image>
  204. <view class="none-text">暂未发布任何商品~</view>
  205. </view>
  206. <view
  207. v-else
  208. class="floor-item"
  209. v-for="(prop, index) in productList"
  210. :key="index"
  211. @click.stop="navToDetailPage(prop.productId)"
  212. >
  213. <image class="item-img tui-skeleton-fillet" :src="prop.image" mode="aspectFill"></image>
  214. <view class="floor-item-content">
  215. <view class="title tui-skeleton-rect">
  216. <text class="mclap-tag" v-if="prop.priceFlag == '1'">美博会</text>
  217. <text class="mclap" :class="prop.priceFlag == '1' ? 'indent' : ''">{{
  218. isInterceptHtmlFn(prop.name)
  219. }}</text>
  220. </view>
  221. <view class="floor-item-act">
  222. <template v-if="userIdentity === 3">
  223. <view class="coupon-tags" v-if="prop.couponsLogo">优惠券</view>
  224. <template v-if="prop.actStatus === 1">
  225. <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
  226. {{ prop.promotions.name }}
  227. <text v-if="hasLogin && prop.priceFlag != 1 && prop.shopId == shopId"
  228. >:¥{{ prop.price | NumFormat }}</text
  229. >
  230. </view>
  231. <view class="floor-tags" v-else>{{ prop.promotions.name }}</view>
  232. </template>
  233. <template v-if="prop.actStatus === 0 && prop.ladderPriceFlag === 1">
  234. <view class="floor-tags">阶梯价格</view>
  235. </template>
  236. </template>
  237. <template v-else>
  238. <view class="coupon-tags" v-if="prop.couponsLogo">优惠券</view>
  239. <template v-if="prop.actStatus === 1">
  240. <view class="floor-tags" v-if="PromotionsFormat(prop.promotions)">
  241. {{ prop.promotions.name }}
  242. <text v-if="hasLogin && prop.priceFlag != 1"
  243. >:¥{{ prop.price | NumFormat }}</text
  244. >
  245. </view>
  246. <view class="floor-tags" v-else>{{ prop.promotions.name }}</view>
  247. </template>
  248. <template v-if="prop.actStatus === 0 && prop.ladderPriceFlag === 1">
  249. <view class="floor-tags">阶梯价格</view>
  250. </template>
  251. </template>
  252. </view>
  253. <view class="" v-if="hasLogin">
  254. <template v-if="userIdentity == 3">
  255. <template v-if="prop.shopId == shopId">
  256. <view class="title-none" v-if="prop.priceFlag === 1">
  257. <text class="p big">¥未公开价格</text>
  258. </view>
  259. <view
  260. class="price tui-skeleton-rect"
  261. v-else
  262. :class="PromotionsFormat(prop.promotions) ? 'none' : ''"
  263. >
  264. <text class="p sm">¥</text>
  265. <text class="p big">{{
  266. (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price)
  267. | NumFormat
  268. }}</text>
  269. </view>
  270. </template>
  271. <template v-else>
  272. <view class="no-price">
  273. <view class="p-stars">
  274. <text class="p-no">¥</text>
  275. <uni-grader :grade="Number(prop.priceGrade)" :margin="14"></uni-grader>
  276. </view>
  277. </view>
  278. </template>
  279. </template>
  280. <template v-else-if="userIdentity === 4">
  281. <view class="title-none" v-if="prop.priceFlag === 1">
  282. <text class="p big">¥未公开价格</text>
  283. </view>
  284. <view class="title-none" v-if="prop.priceFlag === 2">
  285. <text class="p big">¥价格仅会员可见</text>
  286. </view>
  287. <view
  288. class="price tui-skeleton-rect"
  289. v-if="prop.priceFlag === 0"
  290. :class="PromotionsFormat(prop.promotions) ? 'none' : ''"
  291. >
  292. <text class="p sm">¥</text>
  293. <text class="p big">{{
  294. (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price)
  295. | NumFormat
  296. }}</text>
  297. </view>
  298. </template>
  299. <template v-else>
  300. <view class="title-none" v-if="prop.priceFlag === 1">
  301. <text class="p big">¥未公开价格</text>
  302. </view>
  303. <view
  304. class="price tui-skeleton-rect"
  305. v-else
  306. :class="PromotionsFormat(prop.promotions) ? 'none' : ''"
  307. >
  308. <text class="p sm">¥</text>
  309. <text class="p big">{{
  310. (PromotionsFormat(prop.promotions) ? prop.originalPrice : prop.price)
  311. | NumFormat
  312. }}</text>
  313. </view>
  314. </template>
  315. </view>
  316. <view v-else class="no-price">
  317. <view class="p-stars">
  318. <text class="p-no">¥</text>
  319. <uni-grader :grade="Number(prop.priceGrade)"></uni-grader>
  320. </view>
  321. </view>
  322. </view>
  323. </view>
  324. </view>
  325. </view>
  326. </template>
  327. <!-- 侧边 -->
  328. <scroll-top :isScrollTop="isScrollTop" :bottom="200"></scroll-top>
  329. </view>
  330. </template>
  331. <script>
  332. import { mapState, mapMutations } from 'vuex'
  333. import banner from '@/components/cm-module/supplier/banner.vue'
  334. import uniGrader from '@/components/uni-grade/uni-grade.vue'
  335. import authorize from '@/common/config/authorize.js'
  336. import wxLogin from '@/common/config/wxLogin.js'
  337. export default {
  338. components: {
  339. banner,
  340. uniGrader
  341. },
  342. data() {
  343. return {
  344. userID: 0,
  345. supplierId: 0,
  346. shopId: 0,
  347. iconClass: 'icon-aixin',
  348. iconColor: '#ff9100',
  349. iconNoneData: 'https://static.caimei365.com/app/img/icon/icon-prnone.png',
  350. iconNoneData1: 'https://static.caimei365.com/app/img/icon/icon-pbnone.png',
  351. isScrollTop: false,
  352. shopName: '',
  353. shopLogo: '',
  354. normalNum: 0,
  355. isFocus: false,
  356. isEmpty: false,
  357. isShowClose: false, //是否显示清空输入框图标
  358. skeletonShow: true,
  359. bannerImageList: [],
  360. recommendList: [],
  361. productList: [],
  362. userIdentity: '',
  363. listQuery: {
  364. keyword: '',
  365. pageSize: 10,
  366. pageNum: 1,
  367. id: 0
  368. },
  369. isHomeProduct: false,
  370. total: 0
  371. }
  372. },
  373. computed: {
  374. ...mapState(['hasLogin', 'userInfo', 'isActivity', 'identity', 'isWxAuthorize'])
  375. },
  376. onLoad(option) {
  377. if (option.type == 'share') {
  378. wxLogin.wxLoginAuthorize()
  379. }
  380. this.listQuery.id = this.supplierId = option.shopId
  381. this.$api
  382. .getStorage()
  383. .then(resolve => {
  384. this.shopId = resolve.shopId ? resolve.shopId : 0
  385. this.userID = resolve.userId ? resolve.userId : 0
  386. this.userIdentity = resolve.userIdentity
  387. this.InitShopDataInfo()
  388. })
  389. .catch(error => {
  390. this.InitShopDataInfo()
  391. })
  392. },
  393. filters: {
  394. NumFormat: function(text) {
  395. //处理金额
  396. return Number(text).toFixed(2)
  397. }
  398. },
  399. methods: {
  400. ...mapMutations(['login', 'logout']),
  401. InitShopDataInfo() {
  402. //初始化请求数据
  403. this.GetSupplierHomeBanner()
  404. this.GetSupplierHomeDeatils()
  405. this.GetSupplierHomeProduct()
  406. this.GetSupplierHomeProductList()
  407. this.skeletonShow = false
  408. },
  409. GetSupplierHomeBanner() {
  410. //轮播图
  411. this.ShopService.GetSupplierHomeBanner({ supplierId: this.supplierId })
  412. .then(response => {
  413. this.bannerImageList = response.data
  414. })
  415. .catch(error => {
  416. this.$util.msg(error.msg, 2000)
  417. })
  418. },
  419. GetSupplierHomeDeatils() {
  420. //商铺详情
  421. this.ShopService.GetSupplierHomeDeatils({ supplierId: this.supplierId })
  422. .then(response => {
  423. let data = response.data
  424. this.normalNum = data.normalNum
  425. this.shopName = data.name
  426. this.shopLogo = data.logo
  427. })
  428. .catch(error => {
  429. this.$util.msg(error.msg, 2000)
  430. })
  431. },
  432. GetSupplierHomeProduct() {
  433. //主推商品
  434. this.ShopService.GetSupplierHomeProduct({ shopId: this.supplierId, identity: this.identity })
  435. .then(response => {
  436. let data = response.data
  437. console.log('主推商品', data)
  438. if (data.length > 0) {
  439. this.isHomeProduct = false
  440. this.QueryProductPrice(data)
  441. } else {
  442. this.isHomeProduct = true
  443. }
  444. })
  445. .catch(error => {
  446. this.$util.msg(error.msg, 2000)
  447. })
  448. },
  449. GetSupplierHomeProductList() {
  450. //全部商品
  451. this.ShopService.GetSupplierHomeProductList(this.listQuery)
  452. .then(response => {
  453. let data = JSON.parse(response.data)
  454. console.log('全部商品', data)
  455. let dataList = data.items
  456. this.total = data.total
  457. if (this.total > 0) {
  458. this.isEmpty = false
  459. this.productList = dataList
  460. this.QueryProductPrice1(this.productList)
  461. } else {
  462. this.isEmpty = true
  463. }
  464. })
  465. .catch(error => {
  466. this.$util.msg(error.msg, 2000)
  467. })
  468. },
  469. GetMoreSupplierHomeProductList() {
  470. //加载分页
  471. this.listQuery.pageNum += 1
  472. this.ShopService.GetSupplierHomeProductList(this.listQuery)
  473. .then(response => {
  474. let data = JSON.parse(response.data)
  475. this.total = data.total
  476. this.productList = this.productList.concat(data.items)
  477. this.QueryProductPrice1(this.productList)
  478. })
  479. .catch(error => {
  480. this.$util.msg(error.msg, 2000)
  481. })
  482. },
  483. QueryProductPrice(data) {
  484. //处理主推商品商品或者活动价格
  485. let productIdArr = []
  486. let productIds = ''
  487. data.map(item => {
  488. // 0公开价格 1不公开价格 2仅对资质机构公开
  489. productIdArr.push(item.productId)
  490. })
  491. productIds = productIdArr.join(',')
  492. this.ProductService.querySearchProductPrice({
  493. userId: this.userID,
  494. productIds: productIds,
  495. source: 2
  496. })
  497. .then(response => {
  498. this.recommendList = this.ReturnNewProducts(data, response.data)
  499. })
  500. .catch(error => {
  501. this.$util.msg(error.msg, 2000)
  502. })
  503. },
  504. QueryProductPrice1(data) {
  505. //获取商品或者活动价格
  506. let productIdArr = []
  507. let productIds = ''
  508. data.map(item => {
  509. // 0公开价格 1不公开价格 2仅对资质机构公开
  510. productIdArr.push(item.productId)
  511. })
  512. productIds = productIdArr.join(',')
  513. this.ProductService.querySearchProductPrice({
  514. userId: this.userID,
  515. productIds: productIds,
  516. source: 2
  517. })
  518. .then(response => {
  519. this.productList = this.ReturnNewProducts(data, response.data)
  520. console.log('合并价格后', this.productList)
  521. })
  522. .catch(error => {
  523. this.$util.msg(error.msg, 2000)
  524. })
  525. },
  526. ReturnNewProducts(listA, listB) {
  527. let NewArray = []
  528. listA.map(item => {
  529. for (let i = 0; i < listB.length; i++) {
  530. if (item.productId == listB[i].productId) {
  531. NewArray.push(Object.assign(item, listB[i]))
  532. }
  533. }
  534. })
  535. return NewArray
  536. },
  537. SubMitSearch() {
  538. //搜索
  539. this.listQuery.pageNum = 1
  540. this.GetSupplierHomeProductList()
  541. },
  542. PromotionsFormat(promo) {
  543. //促销活动类型数据处理
  544. if (promo != null) {
  545. if (promo.type == 1 && promo.mode == 1) {
  546. return true
  547. } else {
  548. return false
  549. }
  550. }
  551. return false
  552. },
  553. onShowClose() {
  554. //输入框输入时触发
  555. this.inputEmpty(this.listQuery.keyword)
  556. },
  557. onFocus() {
  558. //输入框获取焦点时触发
  559. this.inputEmpty(this.listQuery.keyword)
  560. },
  561. delInputText() {
  562. //清除输入框内容
  563. this.listQuery.keyword = ''
  564. this.isShowClose = false
  565. this.isShowWrapper = false
  566. this.inputEmpty(this.listQuery.keyword)
  567. this.initGetSerachRecord()
  568. },
  569. inputEmpty(val) {
  570. if (val != '') {
  571. this.isShowClose = true
  572. this.isFocus = true
  573. } else {
  574. this.isShowClose = false
  575. this.isFocus = true
  576. }
  577. },
  578. isInterceptHtmlFn(text) {
  579. let name = this.$reg.interceptHtmlFn(text)
  580. return name
  581. },
  582. goSupplier() {
  583. //跳供应商资料页
  584. this.$api.navigateTo('/pages/supplier/user/supplier?shopId=' + this.supplierId)
  585. },
  586. navToDetailPage(id) {
  587. //跳转商品详情页
  588. this.$api.navigateTo(`/pages/goods/product?id=${id}`)
  589. }
  590. },
  591. onPageScroll(e) {
  592. //实时获取到滚动的值
  593. if (e.scrollTop > 400) {
  594. this.isScrollTop = true
  595. } else {
  596. this.isScrollTop = false
  597. }
  598. },
  599. onPullDownRefresh() {
  600. //下拉刷新
  601. this.listQuery.pageNum = 1
  602. this.productList = []
  603. this.InitShopDataInfo()
  604. uni.stopPullDownRefresh()
  605. },
  606. onReachBottom() {
  607. //上滑加载分页
  608. if (this.total > this.productList.length) {
  609. this.loadding = true
  610. this.pullUpOn = true
  611. this.GetMoreSupplierHomeProductList()
  612. }
  613. },
  614. onShareAppMessage(res) {
  615. //分享转发
  616. if (res.from === 'button') {
  617. // 来自页面内转发按钮
  618. }
  619. return {
  620. title: '进入店铺,发现惊喜',
  621. path: `pages/supplier/user/my-shop?type=share&shopId=${this.listQuery.id}`
  622. }
  623. },
  624. onShow() {}
  625. }
  626. </script>
  627. <style lang="scss">
  628. page {
  629. background-color: #f7f7f7;
  630. }
  631. .shop {
  632. width: 100%;
  633. height: auto;
  634. }
  635. .shop-search-main {
  636. width: 100%;
  637. height: 86rpx;
  638. background-color: #ffffff;
  639. box-sizing: border-box;
  640. padding: 10rpx 24rpx;
  641. position: fixed;
  642. top: 0;
  643. left: 0;
  644. z-index: 999;
  645. .shop-search {
  646. width: 100%;
  647. height: 66rpx;
  648. border-radius: 33rpx;
  649. background-color: #f7f7f7;
  650. box-sizing: border-box;
  651. position: relative;
  652. .icon-sousuo {
  653. width: 80rpx;
  654. height: 66rpx;
  655. display: block;
  656. float: left;
  657. color: #707070;
  658. line-height: 66rpx;
  659. text-align: center;
  660. font-size: 36rpx;
  661. }
  662. .icon-shanchu1 {
  663. width: 80rpx;
  664. height: 66rpx;
  665. display: block;
  666. color: #8a8a8a;
  667. line-height: 66rpx;
  668. text-align: center;
  669. font-size: 36rpx;
  670. position: absolute;
  671. right: 0;
  672. top: 0;
  673. z-index: 100;
  674. }
  675. .input {
  676. width: 580rpx;
  677. height: 66rpx;
  678. box-sizing: border-box;
  679. color: #666666;
  680. overflow: hidden;
  681. font-size: $font-size-24;
  682. }
  683. }
  684. }
  685. .container-shop {
  686. width: 100%;
  687. height: auto;
  688. padding: 24rpx;
  689. box-sizing: border-box;
  690. background-color: #ffffff;
  691. margin-top: 96rpx;
  692. }
  693. .product-supplier {
  694. width: 100%;
  695. height: 140rpx;
  696. padding: 30rpx 0 10rpx 0;
  697. box-sizing: border-box;
  698. background-color: #ffffff;
  699. position: relative;
  700. box-sizing: border-box;
  701. .logo {
  702. width: 128rpx;
  703. height: 92rpx;
  704. float: left;
  705. border: 1px solid #efefef;
  706. border-radius: 6rpx;
  707. image {
  708. width: 100%;
  709. height: 100%;
  710. display: block;
  711. border-radius: 6rpx;
  712. }
  713. }
  714. .main {
  715. width: 470rpx;
  716. height: 92rpx;
  717. float: left;
  718. margin-left: 20rpx;
  719. .name {
  720. width: 100%;
  721. line-height: 46rpx;
  722. float: left;
  723. font-size: $font-size-28;
  724. color: $text-color;
  725. float: right;
  726. overflow: hidden;
  727. text-overflow: ellipsis;
  728. white-space: nowrap;
  729. text-align: left;
  730. }
  731. .massgs {
  732. width: 100%;
  733. line-height: 46rpx;
  734. float: left;
  735. font-size: $font-size-24;
  736. color: #999999;
  737. .label {
  738. float: left;
  739. }
  740. .p-stars {
  741. float: left;
  742. margin-left: 20rpx;
  743. }
  744. .acount {
  745. float: right;
  746. text {
  747. color: $color-system;
  748. }
  749. }
  750. }
  751. }
  752. .icon-xiayibu {
  753. line-height: 154rpx;
  754. display: inline-block;
  755. position: absolute;
  756. width: 48rpx;
  757. top: 0;
  758. right: 0;
  759. color: #b2b2b2;
  760. }
  761. }
  762. .container-section {
  763. width: 100%;
  764. height: auto;
  765. background-color: #f7f7f7;
  766. box-sizing: border-box;
  767. padding: 0 24rpx;
  768. .tab-title {
  769. width: 100%;
  770. height: 88rpx;
  771. line-height: 88rpx;
  772. font-size: $font-size-30;
  773. font-weight: bold;
  774. }
  775. .section-product {
  776. width: 100%;
  777. height: auto;
  778. .floor-item-none {
  779. min-height: 300rpx;
  780. display: flex;
  781. flex-direction: column;
  782. align-items: center;
  783. .none-image {
  784. width: 260rpx;
  785. height: 260rpx;
  786. }
  787. .none-text {
  788. text-align: center;
  789. font-size: $font-size-28;
  790. color: #999999;
  791. line-height: 40rpx;
  792. }
  793. }
  794. .floor-item {
  795. width: 341rpx;
  796. height: auto;
  797. margin-right: 20rpx;
  798. font-size: $font-size-24;
  799. color: $text-color;
  800. background: #ffffff;
  801. line-height: 36rpx;
  802. border-radius: 20rpx;
  803. margin-bottom: 20rpx;
  804. float: left;
  805. box-sizing: border-box;
  806. padding-bottom: 10rpx;
  807. &:nth-child(2n) {
  808. margin-right: 0;
  809. }
  810. .item-img {
  811. width: 341rpx;
  812. height: 341rpx;
  813. border-radius: 20rpx 20rpx 0 0;
  814. display: block;
  815. margin-bottom: 20rpx;
  816. }
  817. .floor-item-content {
  818. width: 311rpx;
  819. padding: 0 15rpx;
  820. }
  821. .floor-item-act {
  822. display: block;
  823. width: 100%;
  824. height: 68rpx;
  825. text-align: center;
  826. box-sizing: border-box;
  827. padding: 16rpx 0;
  828. margin-top: 8rpx;
  829. .coupon-tags {
  830. height: 32rpx;
  831. box-sizing: border-box;
  832. border-radius: 8rpx;
  833. background-color: #fff1eb;
  834. line-height: 28rpx;
  835. color: #f94b4b;
  836. text-align: center;
  837. display: inline-block;
  838. padding: 0 10rpx;
  839. font-size: $font-size-20;
  840. border: 1px solid #f94b4b;
  841. float: left;
  842. margin-right: 12rpx;
  843. }
  844. .floor-tags {
  845. height: 32rpx;
  846. box-sizing: border-box;
  847. border-radius: 8rpx;
  848. background-color: #ffffff;
  849. line-height: 28rpx;
  850. color: $color-system;
  851. text-align: center;
  852. display: inline-block;
  853. padding: 0 16rpx;
  854. font-size: $font-size-20;
  855. border: 1px solid #e15616;
  856. float: left;
  857. }
  858. }
  859. .title-none {
  860. font-size: $font-size-26;
  861. color: #ff2a2a;
  862. line-height: 54rpx;
  863. .btn {
  864. display: inline-block;
  865. float: right;
  866. width: 112rpx;
  867. height: 44rpx;
  868. background: $btn-confirm;
  869. line-height: 44rpx;
  870. font-size: $font-size-24;
  871. color: #ffffff;
  872. text-align: center;
  873. border-radius: 22rpx;
  874. margin-top: 17rpx;
  875. }
  876. }
  877. .title {
  878. width: 100%;
  879. height: 72rpx;
  880. display: flex;
  881. flex-direction: column;
  882. margin-bottom: 15rpx;
  883. padding: 0;
  884. position: relative;
  885. .mclap {
  886. width: 100%;
  887. line-height: 40rpx;
  888. text-overflow: ellipsis;
  889. display: -webkit-box;
  890. word-break: break-all;
  891. -webkit-box-orient: vertical;
  892. -webkit-line-clamp: 2;
  893. overflow: hidden;
  894. font-size: 26rpx;
  895. &.indent {
  896. text-indent: 95rpx;
  897. }
  898. }
  899. .mclap-tag {
  900. display: block;
  901. width: 84rpx;
  902. height: 32rpx;
  903. background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
  904. border-radius: 4rpx 48rpx 4px 4px;
  905. line-height: 32rpx;
  906. font-size: $font-size-22;
  907. color: #ffffff;
  908. text-align: center;
  909. position: absolute;
  910. left: 0;
  911. top: 0;
  912. }
  913. }
  914. .no-price {
  915. height: 54rpx;
  916. line-height: 54rpx;
  917. display: flex;
  918. box-sizing: border-box;
  919. .p-no {
  920. font-size: $font-size-30;
  921. color: $text-color;
  922. display: block;
  923. float: left;
  924. }
  925. .p-stars {
  926. float: left;
  927. }
  928. }
  929. .price {
  930. color: #ff2a2a;
  931. line-height: 54rpx;
  932. &.none {
  933. text-decoration: line-through;
  934. color: #999999;
  935. }
  936. .sm {
  937. font-size: $font-size-24;
  938. }
  939. .big {
  940. font-size: $font-size-28;
  941. }
  942. }
  943. }
  944. }
  945. }
  946. </style>