store_details.vue 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228
  1. <template>
  2. <view class="container">
  3. <view class="tui-header">
  4. <view class="tui-shop__info">
  5. <image :src="storeDetail.store_logo" class="tui-logo"></image>
  6. <view class="tui-shop__desc">
  7. <view class="tui-shop__name">
  8. <text>{{storeDetail.title}}</text>
  9. </view>
  10. <view class="tui-shoprate" @tap="storeopenLocation">
  11. <!--<view class="tui-rate__box"><tui-rate :current="5" :score="0.6" disabled :size="12"></tui-rate></view>-->
  12. <view class="tui-shop__address">{{storeDetail.address}}
  13. <image src="/static/images/map.png" class="map-img"> </image><text
  14. style="color: #fff;">导航到这里</text>
  15. </view>
  16. </view>
  17. </view>
  18. <!--
  19. <view class="tui-btn__follow">
  20. <tui-button :size="24" width="116rpx" height="48rpx" shape="circle" type="danger">
  21. <tui-icon name="like" color="#fff" :size="24" unit="rpx"></tui-icon>
  22. <text class="tui-follow__text">关注</text>
  23. </tui-button>
  24. <tui-button :size="24" width="116rpx" height="48rpx" shape="circle" type="white" disabled>已关注</tui-button>
  25. </view>-->
  26. </view>
  27. <tui-tabs @change="change" :currentTab="current" :tabs="tabs" itemWidth="33%" backgroundColor="#5796fd"
  28. color="rgba(255,255,255,.7)" selectedColor="#fff" sliderBgColor="#fff" bottom="8rpx" unlined :size="30"
  29. :sliderWidth="60"></tui-tabs>
  30. </view>
  31. <view class="tui-body">
  32. <view class="tui-items__1 tui-padding" v-if="current == 0">
  33. <!--=======猜你喜欢 start=======-->
  34. <block v-if="is_recommendgoods==1 && Category.length<1">
  35. <view class="tui-ranking__header">
  36. <view class="tui-ranking__title">猜你喜欢</view>
  37. </view>
  38. <view class="tui-ranking__list">
  39. <view class="tui-ranking__item" @tap="toDetailsTap" v-for="(item, index) in recommendgoods"
  40. :data-id="item.id" v-if="index<3" :key="index">
  41. <image :src="item.pic"></image>
  42. <view class="tui-ranking__gtitle">{{ item.name }}</view>
  43. <view class="tui-sale-price">¥{{ item.price }}</view>
  44. </view>
  45. </view>
  46. </block>
  47. <!--=======猜你喜欢 end=======-->
  48. <block v-if="Category.length>0">
  49. <scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-into-view="scrollViewId"
  50. :style="{ height: height + 'px', top: top + 'px' }">
  51. <view :id="`id_${index}`" v-for="(item, index) in Category" :key="item.id" class="tab-bar-item"
  52. :class="[currentTab == index ? 'active' : '']" :data-current="index"
  53. @tap="swichNav(item.id,index)">
  54. <text>{{ item.title }}</text>
  55. </view>
  56. </scroll-view>
  57. <scroll-view @scrolltolower="tolower" scroll-y class="right-box" :scroll-into-view="floorNum"
  58. :style="{ height: height + 'px', top: top + 'px' }" @scroll="mainScroll">
  59. <view class="page-view" id="scroll-panel">
  60. <view class="class-box">
  61. <view class="class-item main-item" :id="'b'+item.id" v-if="Category.length>0"
  62. v-for="(item, index) in Category" :key="index">
  63. <view class="class-name">{{ item.title }}</view>
  64. <view class="g-container">
  65. <view class="g-box" v-for="(goods, i1) in item.goodslist" :key="i2"
  66. @tap="toDetailsTap" :data-id="goods.id">
  67. <image :src="goods.image" class="g-image" mode="widthFix" />
  68. <view class="g-title">{{ goods.name }}</view>
  69. <view class="price" style="color:red;">¥{{goods.price}}
  70. <block v-if="goods.ptype==2 && goods.quantity_unit">
  71. <text v-if="goods.time_amount > 0"
  72. class="f-24">/{{goods.time_amount}}{{goods.quantity_unit}}</text>
  73. <text v-else class="f-24"><text
  74. v-if="goods.is_times && goods.timesmum">/{{goods.timesmum}}</text>{{goods.quantity_unit}}</text>
  75. </block>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="fill-last" :style="{ 'height':fillHeight + 'px' }"></view>
  81. </view>
  82. </view>
  83. <view :style='"height:"+(height-300)+"rpx;"' v-if="number<15"></view>
  84. </scroll-view>
  85. </block>
  86. </view>
  87. <!--=======用户评价 start=======-->
  88. <view class="tui-items__3 tui-padding" v-if="current == 1">
  89. <view class="tui-activity__box">
  90. <view class="tui-activity__title">用户评价</view>
  91. <!--
  92. <view class="tui-activity__item" @tap="detail" v-for="(item, index) in 12" :key="index">
  93. <image :src="`/static/images/product/${index % 2 == 0 ? 4 : 3}.jpg`"></image>
  94. <view class="tui-activity__right">
  95. <view class="tui-ag__title">水星家纺 豪华大床四件套豪华大床四件套豪华大床四件套</view>
  96. <view class="tui-flex tui-ag__tag"><tui-tag plain type="danger" padding="8rpx 12rpx" size="24rpx" margin="0 8rpx 0 0">优惠促销</tui-tag></view>
  97. <view class="tui-ag__bottom">
  98. <view class="tui-flex">
  99. <view class="tui-ag__discount">
  100. <text>4.5</text>
  101. </view>
  102. <view class="tui-ag__original">¥10</view>
  103. </view>
  104. <view class="tui-ag__btn">
  105. <view>已低至4.5折</view>
  106. <view class="tui-btn__text">立即抢购</view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>-->
  111. </view>
  112. </view>
  113. <!--=======用户评价 end=======-->
  114. <!--=======店铺 start=======-->
  115. <view class="tui-items__4" v-if="current == 2">
  116. <view class="tui-score__bg"></view>
  117. <view class="tui-info__box">
  118. <view class="tui-score__box tui-common__box">
  119. <view class="tui-flex__center">
  120. <text>店铺星级</text>
  121. <view class="tui-rate__box">
  122. <tui-rate :current="5" :score="0.6" disabled :size="12"></tui-rate>
  123. </view>
  124. </view>
  125. <view class="tui-flex__center">
  126. <text>用户评价</text>
  127. <view class="tui-score tui-color__red">
  128. <text>9.90分</text>
  129. <text>高</text>
  130. </view>
  131. </view>
  132. <view class="tui-flex__center">
  133. <text>专业程度</text>
  134. <view class="tui-score tui-color__red">
  135. <text>9.99分</text>
  136. <text>高</text>
  137. </view>
  138. </view>
  139. <view class="tui-flex__center">
  140. <text>服务态度</text>
  141. <view class="tui-score tui-color__green">
  142. <text>8.95分</text>
  143. <text>低</text>
  144. </view>
  145. </view>
  146. </view>
  147. <view class="tui-common__box tui-top__20">
  148. <!--<tui-list-cell arrow>证照信息</tui-list-cell>-->
  149. <tui-list-cell arrow unlined @click="qrcode">店铺二维码</tui-list-cell>
  150. </view>
  151. <view class="tui-common__box tui-top__20">
  152. <tui-list-cell :hover="false">
  153. <view class="tui-flex">
  154. <text class="tui-text__shrink">店铺简介</text>
  155. <text class="tui-sub__info">{{storeDetail.content}}</text>
  156. </view>
  157. </tui-list-cell>
  158. <tui-list-cell :hover="false">
  159. <view class="tui-flex">
  160. <text class="tui-text__shrink">地址</text>
  161. <text
  162. class="tui-sub__info">{{storeDetail.province_name}}{{storeDetail.city_name}}{{storeDetail.district_name}}<br />{{storeDetail.address}}</text>
  163. </view>
  164. </tui-list-cell>
  165. <tui-list-cell :hover="false" unlined>
  166. <view class="tui-flex">
  167. <text class="tui-text__shrink">开店时间</text>
  168. <text class="tui-sub__info">{{storeDetail.create_time}}</text>
  169. </view>
  170. </tui-list-cell>
  171. </view>
  172. </view>
  173. </view>
  174. <!--=======店铺 end=======-->
  175. <!--=======二维码 start=======-->
  176. <tui-modal custom :show="modalShow" backgroundColor="transparent" padding="0" @cancel="hideModal">
  177. <view class="tui-poster__box" :style="{marginTop:height+'px'}">
  178. <image src="/static/images/mall/icon_popup_closed.png" class="tui-close__img" @tap.stop="hideModal">
  179. </image>
  180. <image :src="qrcodeImg" v-if="qrcodeImg" class="tui-poster__img"></image>
  181. <tui-button type="danger" width="460rpx" height="80rpx" shape="circle" @click="savePic">保存图片
  182. </tui-button>
  183. <view class="tui-share__tips">保存二维图片到手机相册后,分享到您的圈子</view>
  184. </view>
  185. </tui-modal>
  186. <!--=======二维码 end=======-->
  187. </view>
  188. </view>
  189. </template>
  190. <script>
  191. export default {
  192. components: {},
  193. data() {
  194. return {
  195. uid: '',
  196. modalShow: false,
  197. qrcodeImg: '',
  198. statusBarHeight: 20,
  199. tabs: [{
  200. name: '服务/商品'
  201. },
  202. {
  203. name: '评价'
  204. },
  205. {
  206. name: '商家简介'
  207. }
  208. ],
  209. is_recommendgoods: '',
  210. storeDetail: {},
  211. current: 0,
  212. recommendgoods: [],
  213. rankingTab: 0,
  214. scrollViewId: "id_0",
  215. height: 0, //scroll-view高度
  216. top: 0,
  217. Category: [],
  218. currentTab: 0, //预设当前项的值
  219. floorNum: '',
  220. number: "",
  221. scrollViewId: "id_0",
  222. scrollHeight: 400,
  223. scrollTopSize: 0,
  224. fillHeight: 0, // 填充高度,用于最后一项低于滚动区域时使用
  225. topArr: [], // 左侧列表元素
  226. };
  227. },
  228. onLoad: function(e) {
  229. const _this = this;
  230. setTimeout(() => {
  231. uni.getSystemInfo({
  232. success: res => {
  233. let header = 182;
  234. let top = 0;
  235. console.log(res.windowHeight);
  236. this.height = res.windowHeight - uni.upx2px(header);
  237. this.top = top + uni.upx2px(header);
  238. }
  239. });
  240. }, 50);
  241. if (e && e.scene) {
  242. const scene = decodeURIComponent(e.scene) // 处理扫码进商品详情页面的逻辑
  243. if (scene) {
  244. e.id = scene.split(',')[0]
  245. if (scene.split(',')[1]) {
  246. e.reid = scene.split(',')[1];
  247. }
  248. }
  249. }
  250. if (e.reid) {
  251. uni.setStorageSync('reid', e.reid)
  252. }
  253. _this.sam.login().then(res => {
  254. if (res.uid > 0) {
  255. _this.uid = res.uid;
  256. if (uni.getStorageSync('reid')) {
  257. _this.$request.get('member.bindpid', {
  258. samkey: (new Date()).valueOf(),
  259. pid: uni.getStorageSync('reid')
  260. }).then(res => {
  261. if (res.errno == 0) {
  262. console.log('pid绑定成功');
  263. }
  264. })
  265. }
  266. }
  267. });
  268. this.getCategoryall(e.id);
  269. this.getStoreDetail(e.id);
  270. _this.$request.get('Goods.recommend').then(res => {
  271. if (res.errno == 0) {
  272. _this.recommendgoods = res.data;
  273. }
  274. });
  275. },
  276. methods: {
  277. getStoreDetail(sId) {
  278. const _this = this;
  279. _this.$request.get('store.detail', {
  280. id: sId
  281. }).then(res => {
  282. if (res.errno == 0) {
  283. _this.storeDetail = res.data
  284. if (_this.storeDetail.storeconfig) {
  285. _this.is_recommendgoods = _this.storeDetail.storeconfig.is_recommendgoods
  286. }
  287. }
  288. });
  289. },
  290. storeopenLocation: function() {
  291. uni.openLocation({
  292. latitude: Number(this.storeDetail.latitude), //要去的纬度-地址
  293. longitude: Number(this.storeDetail.longitude), //要去的经度-地址
  294. address: this.storeDetail.region_name,
  295. success: function() {
  296. console.log('success');
  297. },
  298. fail: function() {
  299. console.log('fail');
  300. }
  301. })
  302. },
  303. getCategoryall: function(sId) {
  304. let _this = this;
  305. this.$request.get('store.goodslist', {
  306. sid: sId,
  307. showLoading: true
  308. }).then(res => {
  309. if (res.errno == 0) {
  310. _this.Category = res.data;
  311. _this.categoryId = _this.Category[0].id;
  312. setTimeout(function() {
  313. _this.infoScroll();
  314. _this.getElementTop();
  315. }, 500)
  316. console.info("services---request---getsonList--右侧二级三级分类成功")
  317. }
  318. })
  319. },
  320. initHeader(e) {
  321. this.width = Number(e.left);
  322. this.height = Number(e.height);
  323. this.statusBarHeight = Number(e.statusBarHeight);
  324. this.bubbleTop = this.height + 6 + 'px';
  325. },
  326. change(e) {
  327. this.current = e.index;
  328. },
  329. detail(id) {
  330. this.tui.href('/pages/goodsDetail/goodsDetail?id=' + id);
  331. },
  332. toDetailsTap: function(e) {
  333. uni.navigateTo({
  334. url: "/pages/goodsDetail/goodsDetail?id=" + e.currentTarget.dataset.id
  335. });
  336. },
  337. async qrcode() {
  338. const _this = this;
  339. if (this.qrcodeImg) {
  340. this.modalShow = true;
  341. return;
  342. }
  343. uni.showLoading({
  344. mask: true,
  345. title: '二维生成中...'
  346. });
  347. let qrdata = await _this.$request.post('qrcode.store', {
  348. sid: _this.storeDetail.id,
  349. page: '',
  350. is_hyaline: true,
  351. expireHours: 1
  352. })
  353. //console.log(qrdata);
  354. if (qrdata.errno == 0) {
  355. uni.hideLoading();
  356. this.qrcodeImg = qrdata.data;
  357. setTimeout(() => {
  358. this.modalShow = true;
  359. }, 60);
  360. } else {
  361. uni.hideLoading();
  362. this.tui.toast('生成二维图片失败,请稍后再试');
  363. }
  364. },
  365. hideModal() {
  366. this.modalShow = false;
  367. },
  368. savePic() {
  369. if (this.qrcodeImg) {
  370. // #ifdef H5
  371. uni.previewImage({
  372. urls: [this.qrcodeImg]
  373. });
  374. // #endif
  375. // #ifndef H5
  376. this.sam.saveImage(this.qrcodeImg);
  377. //console.log(this.qrcodeImg);
  378. // #endif
  379. this.hideModal();
  380. }
  381. },
  382. // 点击标题切换当前页时改变样式
  383. swichNav: function(Categoryid, e) {
  384. let cur = e;
  385. if (this.currentTab == cur) {
  386. return false;
  387. } else {
  388. this.currentTab = cur;
  389. this.checkCor();
  390. }
  391. this.floorNum = 'b' + Categoryid;
  392. },
  393. /* 获取元素顶部信息 */
  394. getElementTop() {
  395. new Promise((resolve, reject) => {
  396. let view = uni.createSelectorQuery().selectAll('.main-item');
  397. view.boundingClientRect(data => {
  398. resolve(data);
  399. }).exec();
  400. }).then((res) => {
  401. console.log('res', res);
  402. let topArr = res.map((item) => {
  403. return item.top - this.scrollTopSize; /* 减去滚动容器距离顶部的距离 */
  404. });
  405. this.topArr = topArr;
  406. /* 获取最后一项的高度,设置填充高度。判断和填充时做了 +-20 的操作,是为了滚动时更好的定位 */
  407. let last = res[res.length - 1].height;
  408. if (last - 20 < this.scrollHeight) {
  409. this.fillHeight = this.scrollHeight - last + 20;
  410. }
  411. });
  412. },
  413. /* 主区域滚动监听 */
  414. mainScroll(e) {
  415. // 节流方法
  416. clearTimeout(this.mainThrottle);
  417. this.mainThrottle = setTimeout(() => {
  418. scrollFn();
  419. }, 10);
  420. let scrollFn = () => {
  421. let top = e.detail.scrollTop;
  422. let index = 0;
  423. /* 查找当前滚动距离 */
  424. this.topArr.forEach((item, id) => {
  425. /*
  426. console.log('------------**');
  427. console.log(top);
  428. console.log('------------');
  429. console.log(item);
  430. console.log('------------+++');
  431. console.log(id);
  432. */
  433. if ((top + 100) >= item) {
  434. index = id;
  435. this.currentTab = (index < 0 ? 0 : index);
  436. //console.log(index);
  437. }
  438. })
  439. }
  440. },
  441. //判断当前滚动超过一屏时,设置tab标题滚动条。
  442. checkCor: function() {
  443. if (this.currentTab > 6) {
  444. this.scrollViewId = `id_${this.currentTab - 2}`;
  445. } else {
  446. this.scrollViewId = `id_0`;
  447. }
  448. },
  449. infoScroll: function() {
  450. let _this = this;
  451. let len = _this.Category.length;
  452. if (_this.Category[len - 1].son) {
  453. this.number = _this.Category[len - 1].son.length;
  454. }
  455. },
  456. /* 初始化滚动区域 */
  457. initScrollView() {
  458. return new Promise((resolve, reject) => {
  459. let view = uni.createSelectorQuery().select('#scroll-panel');
  460. view.boundingClientRect(res => {
  461. this.scrollTopSize = res.top;
  462. this.scrollHeight = res.height;
  463. this.$nextTick(() => {
  464. resolve();
  465. });
  466. }).exec();
  467. });
  468. },
  469. tolower: function() {
  470. }
  471. },
  472. /**
  473. * 页面相关事件处理函数--监听用户下拉动作
  474. */
  475. onPullDownRefresh: function() {
  476. setTimeout(() => {
  477. uni.stopPullDownRefresh()
  478. }, 200);
  479. },
  480. //发送给朋友
  481. onShareAppMessage: function() {
  482. let _this = this;
  483. //console.log(_this.uid);
  484. return {
  485. title: _this.storeDetail.title || "",
  486. path: "/pages/store_details/store_details?id=" + _this.storeDetail.id + "&reid=" + _this.uid,
  487. };
  488. },
  489. onShareTimeline(res) { //分享到朋友圈
  490. return {}
  491. },
  492. };
  493. </script>
  494. <style>
  495. .tui-header {
  496. width: 100%;
  497. height: 182rpx;
  498. background-color: #5796fd;
  499. align-items: center;
  500. padding: 0;
  501. box-sizing: border-box;
  502. position: fixed;
  503. overflow: hidden;
  504. left: 0;
  505. top: 0;
  506. z-index: 999;
  507. }
  508. .tui-body {
  509. }
  510. .tui-back__box {
  511. padding-right: 12rpx;
  512. padding-left: 4rpx;
  513. flex-shrink: 0;
  514. }
  515. .tui-menu__box {
  516. padding-right: 26rpx;
  517. padding-left: 24rpx;
  518. flex-shrink: 0;
  519. }
  520. .tui-flex__center {
  521. display: flex;
  522. align-items: center;
  523. }
  524. .tui-shop__info {
  525. width: 100%;
  526. height: 103rpx;
  527. overflow: hidden;
  528. background-color: #5796fd;
  529. padding-top: 0;
  530. padding-left: 25rpx;
  531. padding-right: 25rpx;
  532. padding-bottom: 0;
  533. box-sizing: border-box;
  534. display: flex;
  535. align-items: center;
  536. color: #fff;
  537. }
  538. .tui-logo {
  539. width: 80rpx;
  540. height: 80rpx;
  541. border-radius: 6rpx;
  542. display: block;
  543. margin-right: 12rpx;
  544. flex-shrink: 0;
  545. }
  546. .tui-shop__name {
  547. font-size: 30rpx;
  548. font-weight: 500;
  549. white-space: nowrap;
  550. overflow: hidden;
  551. text-overflow: ellipsis;
  552. }
  553. .tui-shoprate {
  554. padding: 0;
  555. margin: 0;
  556. display: flex;
  557. align-items: center;
  558. }
  559. .tui-rate__box {
  560. background-color: rgba(255, 255, 255, 0.3);
  561. display: flex;
  562. align-items: center;
  563. border-radius: 20px;
  564. padding: 0 6rpx;
  565. margin-right: 12rpx;
  566. line-height: 13px;
  567. }
  568. .tui-shop__address {
  569. font-size: 24rpx;
  570. }
  571. .tui-shop__follow {
  572. font-size: 25rpx;
  573. transform: scale(0.8);
  574. transform-origin: 0 center;
  575. }
  576. .tui-btn__follow {
  577. margin-left: auto;
  578. }
  579. .tui-follow__text {
  580. padding-left: 6rpx;
  581. }
  582. .tui-padding {
  583. width: 100%;
  584. padding: 0 25rpx 30rpx;
  585. box-sizing: border-box;
  586. }
  587. .tui-flex {
  588. display: flex;
  589. align-items: center;
  590. }
  591. /*========推荐 start=========*/
  592. .tui-ranking__header {
  593. width: 100%;
  594. padding: 30rpx 4rpx 24rpx;
  595. display: flex;
  596. align-items: center;
  597. justify-content: space-between;
  598. box-sizing: border-box;
  599. }
  600. .tui-ranking__title {
  601. font-size: 30rpx;
  602. }
  603. .tui-ranking__tabs {
  604. display: flex;
  605. align-items: center;
  606. justify-content: space-between;
  607. font-size: 26rpx;
  608. color: #999;
  609. }
  610. .tui-ranking__tabs view {
  611. margin-left: 40rpx;
  612. }
  613. .tui-ranking__active {
  614. color: #000;
  615. position: relative;
  616. transition: all 0.1s;
  617. }
  618. .tui-ranking__active::after {
  619. content: ' ';
  620. width: 60%;
  621. position: absolute;
  622. border-bottom: 2px solid #eb0909;
  623. border-radius: 4px;
  624. left: 20%;
  625. bottom: -10rpx;
  626. }
  627. .tui-ranking__list {
  628. width: 100%;
  629. display: flex;
  630. align-items: center;
  631. justify-content: space-between;
  632. }
  633. .tui-justify__start {
  634. justify-content: flex-start !important;
  635. }
  636. .tui-item-mr__16 {
  637. margin-right: 16rpx;
  638. }
  639. .tui-ranking__item {
  640. width: 224rpx;
  641. border-radius: 12rpx;
  642. overflow: hidden;
  643. background-color: #fff;
  644. padding-bottom: 20rpx;
  645. box-shadow: 0 3rpx 20rpx rgba(183, 183, 183, 0.1);
  646. }
  647. .tui-ranking__item image {
  648. width: 224rpx;
  649. height: 224rpx;
  650. display: block;
  651. }
  652. .tui-ranking__gtitle {
  653. font-size: 24rpx;
  654. line-height: 24rpx;
  655. padding: 24rpx 12rpx 8rpx;
  656. box-sizing: border-box;
  657. white-space: nowrap;
  658. overflow: hidden;
  659. text-overflow: ellipsis;
  660. }
  661. .tui-ranking__sub {
  662. font-size: 25rpx;
  663. line-height: 25rpx;
  664. padding: 8rpx 18rpx 8rpx;
  665. transform: scale(0.8);
  666. transform-origin: 0 center;
  667. color: #999;
  668. }
  669. .tui-recommend__title {
  670. padding: 30rpx 4rpx 24rpx;
  671. font-size: 30rpx;
  672. box-sizing: border-box;
  673. }
  674. .tui-recommend__item {
  675. width: 100%;
  676. border-radius: 24rpx;
  677. background-color: #ffffff;
  678. padding: 25rpx;
  679. box-sizing: border-box;
  680. display: flex;
  681. margin-bottom: 20rpx;
  682. box-shadow: 0 3rpx 20rpx rgba(183, 183, 183, 0.1);
  683. }
  684. .tui-recommend__right {
  685. width: 60%;
  686. position: relative;
  687. }
  688. .tui-rg__img {
  689. width: 240rpx;
  690. height: 240rpx;
  691. border-radius: 12rpx;
  692. flex-shrink: 0;
  693. margin-right: 20rpx;
  694. }
  695. .tui-rg__title {
  696. width: 98%;
  697. font-size: 26rpx;
  698. overflow: hidden;
  699. text-overflow: ellipsis;
  700. }
  701. .tui-sale-price {
  702. font-size: 34rpx;
  703. margin-top: 12rpx;
  704. font-weight: 500;
  705. color: #e41f19;
  706. }
  707. .tui-rg__attr {
  708. font-size: 24rpx;
  709. color: #999;
  710. background-color: #f5f5f5;
  711. display: inline-flex;
  712. align-items: center;
  713. justify-content: center;
  714. padding: 6rpx 16rpx;
  715. border-radius: 20px;
  716. transform: scale(0.8);
  717. transform-origin: 0 center;
  718. margin-top: 12rpx;
  719. }
  720. .tui-rg__interested {
  721. font-size: 24rpx;
  722. margin-top: 12rpx;
  723. }
  724. .tui-interested__num {
  725. padding-left: 8rpx;
  726. color: #999;
  727. }
  728. .tui-rg__imgbox {
  729. display: flex;
  730. align-items: center;
  731. position: absolute;
  732. bottom: 2rpx;
  733. left: 0;
  734. }
  735. .tui-rg__imgbox image {
  736. width: 84rpx;
  737. height: 84rpx;
  738. border-radius: 12rpx;
  739. margin-right: 20rpx;
  740. flex-shrink: 0;
  741. }
  742. /*=======推荐 end=======*/
  743. /*====活动========= start*/
  744. .tui-activity__box {
  745. width: 100%;
  746. padding: 25rpx;
  747. box-sizing: border-box;
  748. border-radius: 24rpx;
  749. background-color: #fff;
  750. margin-top: 20rpx;
  751. box-shadow: 0 3rpx 20rpx rgba(183, 183, 183, 0.1);
  752. }
  753. .tui-activity__title {
  754. font-size: 32rpx;
  755. line-height: 32rpx;
  756. padding-bottom: 25rpx;
  757. }
  758. .tui-activity__item {
  759. width: 100%;
  760. display: flex;
  761. margin-bottom: 32rpx;
  762. }
  763. .tui-activity__item image {
  764. width: 180rpx;
  765. height: 180rpx;
  766. border-radius: 8rpx;
  767. margin-right: 20rpx;
  768. flex-shrink: 0;
  769. }
  770. .tui-activity__right {
  771. flex: 1;
  772. overflow: hidden;
  773. position: relative;
  774. }
  775. .tui-ag__title {
  776. width: 100%;
  777. white-space: nowrap;
  778. overflow: hidden;
  779. text-overflow: ellipsis;
  780. font-size: 28rpx;
  781. }
  782. .tui-ag__bottom {
  783. width: 100%;
  784. display: flex;
  785. align-items: flex-end;
  786. justify-content: space-between;
  787. position: absolute;
  788. left: 0;
  789. bottom: 0;
  790. }
  791. .tui-ag__discount {
  792. color: #eb0909;
  793. font-size: 24rpx;
  794. }
  795. .tui-ag__discount text {
  796. font-size: 32rpx;
  797. line-height: 32rpx;
  798. }
  799. .tui-ag__original {
  800. color: #999;
  801. font-size: 24rpx;
  802. line-height: 24rpx;
  803. text-decoration: line-through;
  804. padding-left: 10rpx;
  805. }
  806. .tui-ag__tag {
  807. padding: 12rpx 0;
  808. }
  809. .tui-ag__btn {
  810. display: flex;
  811. flex-direction: column;
  812. justify-content: center;
  813. align-items: center;
  814. font-size: 24rpx;
  815. line-height: 24rpx;
  816. color: #fff;
  817. background: linear-gradient(90deg, rgb(255, 89, 38), rgb(240, 14, 44));
  818. padding: 8rpx 24rpx;
  819. border-radius: 8rpx;
  820. }
  821. .tui-btn__text {
  822. font-size: 28rpx;
  823. line-height: 28rpx;
  824. padding-top: 8rpx;
  825. }
  826. /*=====活动======== end*/
  827. /*=====新品===== start*/
  828. .tui-ptop__0 {
  829. padding-top: 0 !important;
  830. }
  831. /*======新品======= end*/
  832. .tui-score__bg {
  833. width: 100%;
  834. height: 100rpx;
  835. }
  836. .tui-score__box {
  837. width: 100%;
  838. padding: 10rpx 30rpx 30rpx;
  839. }
  840. .tui-rate__box {
  841. display: flex;
  842. align-items: center;
  843. border-radius: 20px;
  844. padding: 0 6rpx;
  845. margin-right: 12rpx;
  846. background-color: rgba(83, 83, 83, .1);
  847. line-height: 13px;
  848. }
  849. .tui-flex__center {
  850. display: flex;
  851. align-items: center;
  852. margin-top: 20rpx;
  853. }
  854. .tui-flex__center text {
  855. font-size: 24rpx;
  856. color: #999;
  857. padding-right: 50rpx;
  858. }
  859. .tui-score text {
  860. padding-right: 25rpx;
  861. }
  862. .tui-color__red text {
  863. color: #EB0909;
  864. }
  865. .tui-color__green text {
  866. color: #19be6b;
  867. }
  868. .tui-info__box {
  869. width: 100%;
  870. padding: 0 25rpx 100rpx;
  871. box-sizing: border-box;
  872. margin-top: -100rpx;
  873. }
  874. .tui-top__20 {
  875. margin-top: 20rpx;
  876. }
  877. .tui-flex {
  878. display: flex;
  879. }
  880. .tui-text__shrink {
  881. flex-shrink: 0;
  882. }
  883. .tui-sub__info {
  884. color: #999;
  885. padding-left: 40rpx;
  886. word-break: break-all;
  887. }
  888. .map-img {
  889. width: 50rpx;
  890. height: 50rpx;
  891. margin-left: 10rpx;
  892. margin-right: 10rpx;
  893. margin-top: -30rpx;
  894. margin-bottom: -10rpx;
  895. }
  896. /*二维码modal弹层*/
  897. .tui-poster__box {
  898. width: 100%;
  899. position: relative;
  900. display: flex;
  901. justify-content: center;
  902. align-items: center;
  903. flex-direction: column;
  904. }
  905. .tui-close__img {
  906. width: 48rpx;
  907. height: 48rpx;
  908. position: absolute;
  909. right: 0;
  910. top: -60rpx;
  911. }
  912. .tui-poster__img {
  913. width: 560rpx;
  914. height: 560rpx;
  915. border-radius: 20rpx;
  916. margin-bottom: 40rpx;
  917. }
  918. .tui-share__tips {
  919. font-size: 24rpx;
  920. transform: scale(0.8);
  921. transform-origin: center center;
  922. color: #ffffff;
  923. padding-top: 12rpx;
  924. }
  925. /* 左侧导航布局 start*/
  926. /* 隐藏scroll-view滚动条*/
  927. ::-webkit-scrollbar {
  928. width: 0;
  929. height: 0;
  930. color: transparent;
  931. }
  932. .tui-searchbox {
  933. width: 100%;
  934. height: 92rpx;
  935. padding: 0 30rpx;
  936. box-sizing: border-box;
  937. background: #fff;
  938. display: flex;
  939. align-items: center;
  940. justify-content: center;
  941. position: fixed;
  942. left: 0;
  943. top: 0;
  944. z-index: 100;
  945. }
  946. .tui-searchbox::after {
  947. content: '';
  948. position: absolute;
  949. border-bottom: 1rpx solid #d2d2d2;
  950. -webkit-transform: scaleY(0.5);
  951. transform: scaleY(0.5);
  952. bottom: 0;
  953. right: 0;
  954. left: 0;
  955. }
  956. .tui-search-input {
  957. width: 100%;
  958. height: 60rpx;
  959. background: #f1f1f1;
  960. border-radius: 30rpx;
  961. font-size: 26rpx;
  962. color: #999;
  963. display: flex;
  964. align-items: center;
  965. justify-content: center;
  966. }
  967. .tui-search-text {
  968. padding-left: 16rpx;
  969. }
  970. .tab-view {
  971. /* height: 100%; */
  972. background: #f6f6f6;
  973. width: 200rpx;
  974. position: fixed;
  975. left: 0;
  976. z-index: 10;
  977. padding-bottom: 100rpx;
  978. }
  979. .tab-bar-item {
  980. width: 200rpx;
  981. height: 110rpx;
  982. background: #f6f6f6;
  983. box-sizing: border-box;
  984. display: flex;
  985. align-items: center;
  986. justify-content: center;
  987. font-size: 26rpx;
  988. color: #444;
  989. font-weight: 400;
  990. }
  991. .active {
  992. position: relative;
  993. color: #000;
  994. font-size: 30rpx;
  995. font-weight: 600;
  996. background: #fcfcfc;
  997. }
  998. .active::before {
  999. content: '';
  1000. position: absolute;
  1001. border-left: 8rpx solid #e41f19;
  1002. height: 30rpx;
  1003. left: 0;
  1004. }
  1005. /* 左侧导航布局 end*/
  1006. .right-box {
  1007. width: 100%;
  1008. position: fixed;
  1009. padding-left: 220rpx;
  1010. box-sizing: border-box;
  1011. left: 0;
  1012. }
  1013. .page-view {
  1014. width: 100%;
  1015. overflow: hidden;
  1016. padding-top: 20rpx;
  1017. padding-right: 20rpx;
  1018. box-sizing: border-box;
  1019. padding-bottom: env(safe-area-inset-bottom);
  1020. }
  1021. .class-box {
  1022. padding-top: 10rpx;
  1023. }
  1024. .class-item {
  1025. background: #fff;
  1026. width: 100%;
  1027. box-sizing: border-box;
  1028. padding: 20rpx;
  1029. margin-bottom: 20rpx;
  1030. border-radius: 12rpx;
  1031. }
  1032. .class-name {
  1033. font-size: 26rpx;
  1034. }
  1035. .g-container {
  1036. /* padding-top: 20rpx; */
  1037. display: flex;
  1038. display: -webkit-flex;
  1039. justify-content: flex-start;
  1040. flex-direction: row;
  1041. flex-wrap: wrap;
  1042. }
  1043. .g-box {
  1044. width: 48%;
  1045. margin-left: 1%;
  1046. margin-right: 1%;
  1047. text-align: center;
  1048. padding-top: 40rpx;
  1049. }
  1050. .price {
  1051. font-weight: normal;
  1052. font-size: 36rpx;
  1053. }
  1054. .c-image {
  1055. width: 120rpx;
  1056. height: 120rpx;
  1057. border-radius: 12rpx;
  1058. }
  1059. .g-image {
  1060. width: 100%;
  1061. }
  1062. .g-title {
  1063. font-size: 22rpx;
  1064. padding-right: 8rpx;
  1065. padding-left: 8rpx;
  1066. word-break: break-all;
  1067. overflow: hidden;
  1068. text-overflow: ellipsis;
  1069. display: -webkit-box;
  1070. -webkit-box-orient: vertical;
  1071. -webkit-line-clamp: 2;
  1072. }
  1073. .goods-item {
  1074. width: 96%;
  1075. height: 150rpx;
  1076. display: flex;
  1077. padding-left: 5px;
  1078. padding-right: 5px;
  1079. padding-top: 12px;
  1080. padding-bottom: 12px;
  1081. flex-direction: row;
  1082. margin-left: 20rpx;
  1083. align-items: center;
  1084. justify-content: flex-start;
  1085. border-bottom: 1rpx dotted #f2f2f2;
  1086. }
  1087. .goods-pic {
  1088. width: 80px;
  1089. height: 80px;
  1090. flex-shrink: 0;
  1091. }
  1092. .goods-info {
  1093. display: flex;
  1094. font-weight: bold;
  1095. flex-direction: column;
  1096. padding: 6px 5px 0px 5px;
  1097. height: 70px;
  1098. font-size: 28rpx;
  1099. justify-content: space-between;
  1100. }
  1101. .fill-last {
  1102. height: 0;
  1103. width: 100%;
  1104. background: none;
  1105. }
  1106. </style>