index.vue 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655
  1. <template>
  2. <view class="page-container">
  3. <up-navbar class="inde-nav-bar" :bgColor="navBgColor">
  4. <template #left>
  5. <view
  6. class="nav-slot"
  7. v-if="!merchantNameShow() && !!merchantInfo.merchantName"
  8. @click="toBrowsingHistory()"
  9. >
  10. <image
  11. class="dianpu"
  12. src="@/static/images/dianpu.png"
  13. mode="widthFix"
  14. ></image>
  15. <view class="storeName line1">{{ merchantInfo.merchantName }}</view>
  16. <image
  17. class="zhankai"
  18. src="@/static/images/zhankai.png"
  19. mode="widthFix"
  20. ></image>
  21. </view>
  22. </template>
  23. <template #center>
  24. <view class="page-title">首页</view>
  25. </template>
  26. <template #right></template>
  27. </up-navbar>
  28. <!-- 自定义 tabBar -->
  29. <customTabBar
  30. :current="0"
  31. :showBackTop="showBackTop"
  32. @backTop="scrollToTop"
  33. />
  34. <!-- <view class="page-index" :class="{ bgf: navIndex > 0 }"> -->
  35. <view class="page-index">
  36. <view class="top-box jianbianBG">
  37. <view class="header">
  38. <view class="serch-wrapper">
  39. <!-- <view class="logo" @click="goBack">-->
  40. <!-- <image src="@/static/logo1.png" mode=""></image>-->
  41. <!-- </view>-->
  42. <navigator
  43. url="/pages/goods/goods_search/index"
  44. class="input"
  45. hover-class="none"
  46. >
  47. <image class="searchImg" src="@/static/images/search.png"></image>
  48. 搜索商品
  49. </navigator>
  50. </view>
  51. <!-- 轮播图 -->
  52. <up-swiper
  53. class="swiper-box"
  54. :list="list1"
  55. :height="160"
  56. imgMode="scaleFill"
  57. indicator
  58. :radius="10"
  59. indicatorMode="line"
  60. :circular="true"
  61. keyName="url"
  62. @click="clickSwiper"
  63. >
  64. <!-- <template v-slot:default="{item}">
  65. <image class="swiper-banner" :src="item.url" mode="heightFix"></image>
  66. </template> -->
  67. </up-swiper>
  68. </view>
  69. </view>
  70. <!-- 实物金价 -->
  71. <view class="top-bg-box">
  72. <view class="card">
  73. <view class="cardbgLinear">
  74. <view class="title" @click="btnClick">
  75. <view class="title-left">
  76. <image
  77. class="ssjj"
  78. src="https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20260225134946_785_219.png"
  79. mode="widthFix"
  80. >
  81. </image>
  82. <text class="updateTime"
  83. >{{ timeFormat(timestamp, "yyyy-mm-dd hh:MM:ss") }}更新</text
  84. >
  85. </view>
  86. <view class="more">
  87. <text class="txt">更多金价</text>
  88. <image
  89. class="right"
  90. src="@/static/images/right.png"
  91. mode="widthFix"
  92. ></image>
  93. </view>
  94. </view>
  95. <view class="nav-list">
  96. <view class="item">
  97. <view class="price"
  98. >{{ viprealGoldprice }}<text class="unit">/克</text></view
  99. >
  100. <view class="txt">黄金</view>
  101. </view>
  102. <view class="item">
  103. <view class="price"
  104. >{{ viprealPtprice }}<text class="unit">/克</text></view
  105. >
  106. <view class="txt">铂金</view>
  107. </view>
  108. <view class="item">
  109. <view class="price"
  110. >{{ viprealAgprice }}<text class="unit">/克</text></view
  111. >
  112. <view class="txt">白银</view>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. <!-- 分类卡片 -->
  119. <view class="classify-section">
  120. <up-scroll-list
  121. class="classify-scroll"
  122. :indicator="classifyList.length > 4"
  123. :scrollX="true"
  124. indicatorActiveColor="#F8C008"
  125. >
  126. <view class="classify-container">
  127. <view
  128. class="classify-item"
  129. v-for="(item, index) in classifyList"
  130. :key="'item-' + index"
  131. @click="toGoodsCate(item)"
  132. >
  133. <image
  134. class="classify-img"
  135. :src="item.extra"
  136. mode="widthFix"
  137. ></image>
  138. <view class="classify-txt">{{ item.name }}</view>
  139. </view>
  140. </view>
  141. </up-scroll-list>
  142. </view>
  143. <view class="top-bg-box2">
  144. <view class="title"> 精选商品 </view>
  145. </view>
  146. <!-- 首发新品 -->
  147. <view class="index-product-wrapper">
  148. <view class="list-box animated" :class="goodsList.length > 0 ? '' : ''">
  149. <view
  150. class="item"
  151. v-for="(item, index) in calculatedProducts"
  152. :key="index"
  153. @click="goDetail(item)"
  154. >
  155. <view class="pictrue">
  156. <image :src="item.image" mode=""></image>
  157. </view>
  158. <view class="text-info">
  159. <view class="title">
  160. <view class="text line1">{{ item.storeName }}</view>
  161. <view class="weight">{{ item.weight }}g</view>
  162. </view>
  163. <view class="bottom-row">
  164. <!-- <text class="price">工费: {{ item.price }}/克</text> -->
  165. <text class="price">¥ {{ item.totalPrice }}</text>
  166. <text class="sales" style="color: #666">
  167. 销量:{{
  168. Number(item.sales || 0) + Number(item.ficti || 0)
  169. }}件
  170. </text>
  171. <!-- <view class="txt">券</view> -->
  172. </view>
  173. <view class="bottom-row">
  174. <!-- <text class="price">工费: {{ item.price }}/克</text> -->
  175. <text class="sales">工费:¥{{ item.totalLaborCost }}</text>
  176. <text class="sales">
  177. 附加费:¥{{ item.additionalAmount }}
  178. </text>
  179. <!-- <view class="txt">券</view> -->
  180. </view>
  181. <template v-if="item?.merchant?.id && merchantNameShow()">
  182. <view
  183. class="merchantInfo"
  184. @click.stop="toMerchant(item.merchant.id)"
  185. >
  186. <image
  187. class="merchantLogo"
  188. :src="item.merchant.merchantLogo"
  189. mode="scaleToFill"
  190. >
  191. </image>
  192. <text class="merchantName">{{
  193. item.merchant.merchantName
  194. }}</text>
  195. <uni-icons
  196. style="margin-left: 10rpx"
  197. type="right"
  198. size="16"
  199. color="#999999"
  200. ></uni-icons>
  201. </view>
  202. </template>
  203. </view>
  204. </view>
  205. </view>
  206. <view class="loadingicon acea-row row-center-wrapper" v-if="goodScroll">
  207. <text
  208. class="loading iconfont icon-jiazai"
  209. :hidden="loading == false"
  210. ></text>
  211. </view>
  212. <view class="no-data" v-if="isNoDataState">
  213. <image
  214. src="https://my-go-easy-im.oss-cn-shenzhen.aliyuncs.com/goeasy-im-%E6%B0%B4%E8%B4%9D%E5%95%86%E5%9F%8E/zhanwu_20250827104005_1720_6.png"
  215. />
  216. </view>
  217. <view class="mores-txt flex" v-if="!goodScroll && !isNoDataState">
  218. <text>我是有底线的</text>
  219. </view>
  220. </view>
  221. </view>
  222. <!-- 上半部分 -->
  223. </view>
  224. </template>
  225. <script setup>
  226. // 获取实物金价
  227. import useRealGoldPrice from "@/hooks/useRealGoldPrice";
  228. import {
  229. onLoad,
  230. onShow,
  231. onReachBottom,
  232. onPageScroll,
  233. onPullDownRefresh,
  234. } from "@dcloudio/uni-app";
  235. import {
  236. ref,
  237. onMounted,
  238. reactive,
  239. computed,
  240. getCurrentInstance,
  241. watch,
  242. nextTick,
  243. } from "vue";
  244. import {
  245. getIndexData,
  246. getCoupons,
  247. setCouponReceive,
  248. getMerchantBannerList,
  249. } from "@/api/api.js";
  250. import { getSbmerchantInfo } from "@/api/merchant.js";
  251. import { getProductListAPI } from "@/api/factory.js";
  252. import { useStoreRights } from "@/stores/rights";
  253. import { useRealtimeTimestamp } from "@/utils/useRealtimeTimestamp.js";
  254. import { getUserLevelInfo } from "@/api/user";
  255. import { useAppStore } from "@/stores/app";
  256. import { useTabbarStore } from "@/stores/tabbar";
  257. import { goShopDetail } from "@/libs/order.js";
  258. import { HTTP_REQUEST_URL_IMG } from "@/config/app";
  259. import customTabBar from "@/components/customTabBar/index.vue";
  260. // 全局状态和时间
  261. const appStore = useAppStore();
  262. const tabbarStore = useTabbarStore();
  263. const rightsStore = useStoreRights();
  264. import {
  265. getGroomList as getGroomListApi,
  266. getProductByCategoryId,
  267. getCategoryList,
  268. } from "@/api/store.js";
  269. import { timeFormat } from "@/uni_modules/uview-plus";
  270. import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
  271. import { getSceneInfo } from "@/utils/util.js";
  272. import { toLogin } from "@/libs/login.js";
  273. // 获取实物金价
  274. // 实时价格处理
  275. const {
  276. realGoldprice, // 黄金实时销售价(基础)
  277. realPtprice, // 铂金实时销售价(基础)
  278. realAgprice, // 白银实时销售价(基础)
  279. } = useRealGoldPrice({});
  280. const { timestamp } = useRealtimeTimestamp();
  281. const uid = appStore.uidComputed;
  282. console.log(uid);
  283. // 轮播图数据
  284. const list1 = ref([]);
  285. const site_name = ref("");
  286. const loading = ref(false);
  287. const goodScroll = ref(true);
  288. const classifyList = ref([]);
  289. // 用户权益数据
  290. const userBenefits = ref({});
  291. const adjustPtPrice = ref({});
  292. const adjustAgPrice = ref({});
  293. const adjustGoldpriceNew = ref({});
  294. const adjustKgoldPrice = ref({});
  295. const merchantInfo = ref({});
  296. const merchantId = ref("");
  297. const goodsList = ref([]);
  298. const goodType = ref(1);
  299. // Pagination
  300. const params = ref({
  301. page: 1,
  302. limit: 10,
  303. });
  304. const isFirstLoad = ref(true);
  305. const navBgColor = ref("rgba(255,255,255,0)");
  306. // 是否显示回到顶部
  307. const showBackTop = ref(false);
  308. // 滚动阈值
  309. const SCROLL_THRESHOLD = 300;
  310. const calculatedProducts = computed(() => {
  311. // 计算逻辑与原代码一致,但基于响应式数据 products
  312. return goodsList.value.map((product) => {
  313. // 1. 将price字符串转为数字
  314. const price = Number(product.price);
  315. // 2. 计算乘积
  316. const total = (price + product.sales) * realGoldprice.value;
  317. // 3. 向上取整到两位小数(先放大100倍取整,再缩小100倍)
  318. const roundedTotal = Math.ceil(total * 100) / 100;
  319. // 4. 格式化保留两位小数
  320. const formattedTotal = roundedTotal.toFixed(2);
  321. const totalLaborCost = Number(product.totalLaborCost);
  322. const additionalAmount = Number(product.additionalAmount);
  323. const totalPrice = (totalLaborCost + additionalAmount).toFixed(2);
  324. return {
  325. ...product,
  326. calculatedTotal: formattedTotal, // 新增计算结果字段
  327. totalPrice,
  328. };
  329. });
  330. });
  331. onLoad(async (options) => {
  332. const params = await getSceneInfo(options, "index");
  333. // 2. 设置商户ID
  334. const isLogin = appStore.isLogin;
  335. if (appStore.merchantId && appStore.merchantId !== "") {
  336. merchantId.value = appStore.merchantId;
  337. if (!isLogin) {
  338. toLogin();
  339. return; // 登录后页面会刷新,避免继续执行
  340. }
  341. } else if (appStore?.userInfo?.lastVisitedMerchantId) {
  342. merchantId.value = appStore?.userInfo?.lastVisitedMerchantId;
  343. } else if (appStore?.userInfo?.merchant?.id) {
  344. merchantId.value = appStore.userInfo.merchant.id;
  345. } else {
  346. merchantId.value = "";
  347. }
  348. // if(isFirstLoad.value){
  349. await initPageData();
  350. // isFirstLoad.value = false;
  351. // }
  352. });
  353. onShow(async () => {
  354. // 隐藏原生 tabBar,使用自定义 tabBar
  355. uni.hideTabBar();
  356. const isLogin = appStore.isLogin;
  357. if (isLogin) {
  358. rightsStore.getUserBenefits(appStore.userInfo?.userId);
  359. getUserBenefits();
  360. }
  361. console.log(
  362. "appStore.merchantId=>>",
  363. appStore.merchantId,
  364. "appStore.lastVisitedMerchantId=>>",
  365. appStore?.userInfo?.lastVisitedMerchantId,
  366. appStore.indexRefreshFlag
  367. );
  368. if (appStore.merchantId && appStore.merchantId !== "") {
  369. merchantId.value = appStore.merchantId;
  370. if (!isLogin) {
  371. toLogin();
  372. return; // 登录后页面会刷新,避免继续执行
  373. }
  374. } else if (appStore?.userInfo?.lastVisitedMerchantId) {
  375. console.log(merchantId.value, appStore?.userInfo?.lastVisitedMerchantId);
  376. if (
  377. appStore.indexRefreshFlag ||
  378. merchantId.value != appStore?.userInfo?.lastVisitedMerchantId
  379. ) {
  380. merchantId.value = appStore?.userInfo?.lastVisitedMerchantId;
  381. appStore.setIndexRefersh(false);
  382. initPageData();
  383. }
  384. // if (!merchantInfo.value.merchantName) {
  385. // initPageData();
  386. // }
  387. } else if (appStore?.userInfo?.merchant?.id) {
  388. merchantId.value = appStore.userInfo.merchant.id;
  389. if (appStore.indexRefreshFlag) {
  390. appStore.setIndexRefersh(false);
  391. initPageData();
  392. }
  393. // if (!merchantInfo.value.merchantName) {
  394. // initPageData();
  395. // }
  396. } else {
  397. merchantId.value = "";
  398. }
  399. // if(!isFirstLoad.value){
  400. // await initPageData();
  401. // }
  402. uni.setNavigationBarTitle({
  403. title: site_name.value,
  404. });
  405. });
  406. const onRefresh = () => {
  407. refreshing.value = true;
  408. Promise.allSettled([initPageData()]).finally(() => {
  409. // 添加一个短暂延迟,确保 DOM 更新完成
  410. setTimeout(() => {
  411. refreshing.value = false;
  412. uni.hideLoading();
  413. }, 50);
  414. });
  415. };
  416. const initPageData = async () => {
  417. console.log("initPageData!!!!!!!!11");
  418. try {
  419. loading.value = true;
  420. goodScroll.value = true;
  421. goodsList.value = [];
  422. goodType.value = 1;
  423. params.value = {
  424. page: 1,
  425. limit: 10,
  426. };
  427. // 并行执行不依赖的数据获取
  428. const promises = [];
  429. if (merchantId.value && merchantId.value !== "") {
  430. promises.push(getSbmerchantInfoFn());
  431. promises.push(getMerchantBannerListFn());
  432. } else {
  433. promises.push(getIndexConfig());
  434. }
  435. promises.push(getGroomList());
  436. promises.push(getAllCategory());
  437. // 等待所有数据获取完成
  438. await Promise.all(promises);
  439. } catch (error) {
  440. console.error("初始化页面数据失败:", error);
  441. uni.showToast({
  442. title: "数据加载失败",
  443. icon: "none",
  444. });
  445. } finally {
  446. loading.value = false;
  447. }
  448. };
  449. const getMerchantBannerListFn = async () => {
  450. try {
  451. let obj = {
  452. merchantId: merchantId.value,
  453. };
  454. const res = await getMerchantBannerList(obj);
  455. uni.setNavigationBarTitle({
  456. title: "首页",
  457. });
  458. site_name.value = "首页";
  459. list1.value = res.data.map((v) => {
  460. return {
  461. url: v.bannerUrl,
  462. title: "",
  463. type: "image",
  464. navUrl: v.bannerValue,
  465. };
  466. });
  467. } catch (err) {
  468. console.error(err);
  469. }
  470. };
  471. const getSbmerchantInfoFn = async () => {
  472. try {
  473. let obj = {
  474. merchantId: merchantId.value,
  475. };
  476. const res = await getSbmerchantInfo(obj);
  477. merchantInfo.value = res.data;
  478. } catch (err) {
  479. console.error(err);
  480. }
  481. };
  482. const goBack = () => {
  483. uni.switchTab({
  484. url: "/pages/index/index",
  485. });
  486. };
  487. async function clickSwiper(index) {
  488. const imgItem = list1.value[index];
  489. try {
  490. if (imgItem.navUrl !== "#") {
  491. await uni.navigateTo({
  492. url: imgItem.navUrl,
  493. });
  494. } else {
  495. uni.previewImage({
  496. current: index,
  497. urls: list1.value.map((item) => item.url) || [],
  498. });
  499. }
  500. } catch (err) {
  501. uni.previewImage({
  502. current: index,
  503. urls: list1.value.map((item) => item.url) || [],
  504. });
  505. return;
  506. }
  507. }
  508. const getIndexConfig = async () => {
  509. try {
  510. loading.value = true;
  511. const res = await getIndexData();
  512. uni.setNavigationBarTitle({
  513. title: "首页",
  514. });
  515. site_name.value = "首页";
  516. list1.value = res.data.banner.map((v) => {
  517. return {
  518. url: v.pic,
  519. title: "",
  520. type: "image",
  521. navUrl: v.url,
  522. };
  523. });
  524. } catch (err) {
  525. console.error(err);
  526. } finally {
  527. loading.value = false;
  528. }
  529. };
  530. const getUserBenefits = async () => {
  531. try {
  532. const res = await getUserLevelInfo(appStore?.userInfo?.userId || 0);
  533. userBenefits.value = res.data || {
  534. sold: 0,
  535. buy: 0,
  536. }; // 默认权益为0,避免NaN
  537. if (
  538. userBenefits?.value?.nobleMeta &&
  539. userBenefits.value.nobleMeta.length > 0
  540. ) {
  541. const nobleMeta = userBenefits.value.nobleMeta;
  542. nobleMeta.forEach((item) => {
  543. switch (item.name) {
  544. case "黄金":
  545. adjustGoldpriceNew.value = item;
  546. break;
  547. case "K金":
  548. adjustKgoldPrice.value = item;
  549. break;
  550. case "铂金":
  551. adjustPtPrice.value = item;
  552. break;
  553. case "白银":
  554. adjustAgPrice.value = item;
  555. break;
  556. default:
  557. break;
  558. }
  559. });
  560. }
  561. } catch (error) {
  562. console.error("获取用户权益失败:", error);
  563. userBenefits.value = {
  564. sold: 0,
  565. buy: 0,
  566. }; // 出错时默认权益为0
  567. }
  568. };
  569. // 黄金调整价
  570. const viprealGoldprice = computed(() => {
  571. const res =
  572. Number(realGoldprice.value) -
  573. Number(userBenefits.value.buy) +
  574. Number(adjustGoldpriceNew.value.sellPriceAdjust) || 0;
  575. if (appStore.uid) {
  576. return Number(res).toFixed(2);
  577. } else {
  578. return Number(realGoldprice.value).toFixed(2);
  579. }
  580. });
  581. const viprealPtprice = computed(() => {
  582. const res =
  583. Number(realPtprice.value) -
  584. Number(userBenefits.value.buy) +
  585. Number(adjustPtPrice.value.sellPriceAdjust) || 0;
  586. if (appStore.uid) {
  587. return Number(res).toFixed(2);
  588. } else {
  589. return Number(realPtprice.value).toFixed(2);
  590. }
  591. });
  592. const viprealAgprice = computed(() => {
  593. const res =
  594. Number(realAgprice.value) -
  595. Number(userBenefits.value.buy) +
  596. Number(adjustAgPrice.value.sellPriceAdjust) || 0;
  597. if (appStore.uid) {
  598. return Number(res).toFixed(2);
  599. } else {
  600. return Number(realAgprice.value).toFixed(2);
  601. }
  602. });
  603. const btnClick = () => {
  604. uni.navigateTo({
  605. url: "/pages/mall/dapan",
  606. });
  607. };
  608. const isNoDataState = computed(() => {
  609. return goodsList.value.length === 0 && !loading.value;
  610. });
  611. // Product Lists
  612. const getGroomList = async () => {
  613. if (!goodScroll.value) return;
  614. try {
  615. loading.value = true;
  616. merchantId.value != "" ? (params.value.merchantId = merchantId.value) : "";
  617. console.log(goodType.value, params.value);
  618. const param = {
  619. ...params.value,
  620. };
  621. const { data } = await getGroomListApi(goodType.value, param);
  622. if (param.page == 1) {
  623. goodsList.value = [...data.productList.list] || [];
  624. } else {
  625. goodsList.value = [...goodsList.value, ...data.productList.list] || [];
  626. }
  627. goodScroll.value = data.productList.list.length >= params.value.limit;
  628. params.value.page++;
  629. } catch (err) {
  630. console.error(err);
  631. } finally {
  632. loading.value = false;
  633. }
  634. };
  635. onPageScroll((e) => {
  636. if (e.scrollTop > 0) {
  637. navBgColor.value = "#ffe079";
  638. } else {
  639. navBgColor.value = "rgba(252,255,255,0)";
  640. }
  641. // 判断是否显示回到顶部
  642. if (e.scrollTop > SCROLL_THRESHOLD) {
  643. showBackTop.value = true;
  644. } else {
  645. showBackTop.value = false;
  646. }
  647. });
  648. onPullDownRefresh(async () => {
  649. await initPageData();
  650. uni.stopPullDownRefresh();
  651. });
  652. // 回到顶部
  653. const scrollToTop = () => {
  654. uni.pageScrollTo({
  655. scrollTop: 0,
  656. duration: 350,
  657. });
  658. showBackTop.value = false;
  659. };
  660. onReachBottom(() => {
  661. getGroomList();
  662. });
  663. // Product Details
  664. const goDetail = async (item) => {
  665. // await goShopDetail(item, uid);
  666. uni.navigateTo({
  667. url: `/pages/goods/goods_details/index?id=${item.id}`,
  668. });
  669. };
  670. function getAllCategory() {
  671. getCategoryList().then((res) => {
  672. const list = [];
  673. res.data.forEach((item) => {
  674. if (item.name !== "贝币商城") return list.push(item);
  675. });
  676. classifyList.value = list.sort((a, b) => a.sort - b.sort);
  677. });
  678. }
  679. const toBrowsingHistory = () => {
  680. uni.navigateTo({
  681. url: `/pages/users/browsing_history/index?merchantId=${merchantId.value}`,
  682. });
  683. };
  684. const toMerchant = (merchantId) => {
  685. uni.navigateTo({
  686. url: "/pages/merchantCenters/merchant?merchantId=" + merchantId,
  687. });
  688. };
  689. const toGoodsCate = (item) => {
  690. uni.setStorageSync("goods_cate", {
  691. id: item.id,
  692. }); // 存储参数
  693. uni.switchTab({
  694. url: `/pages/goods_cate/goods_cate`,
  695. });
  696. };
  697. const merchantNameShow = () => {
  698. if (
  699. !appStore.userInfo ||
  700. (appStore.userInfo &&
  701. !appStore.userInfo.merchant &&
  702. !appStore.merchantId &&
  703. !appStore.userInfo.lastVisitedMerchantId)
  704. ) {
  705. return true;
  706. } else {
  707. return false;
  708. }
  709. };
  710. </script>
  711. <style>
  712. page {
  713. display: flex;
  714. flex-direction: column;
  715. height: 100%;
  716. }
  717. </style>
  718. <style lang="scss" scoped>
  719. .Hoverball {
  720. display: flex;
  721. justify-content: center;
  722. align-items: center;
  723. flex-direction: column;
  724. background: linear-gradient(180deg, #fefcf9 0%, #fff2df 100%);
  725. // box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(0, 0, 0, 0.16);
  726. width: 105upx;
  727. height: 105upx;
  728. border-radius: 50%; // 圆形按钮
  729. position: fixed; // 固定定位(不随页面滚动)
  730. z-index: 999999; // 最高层级,避免被其他元素遮挡
  731. top: 0%;
  732. right: 0%;
  733. .title {
  734. font-size: 19rpx;
  735. color: #000000;
  736. margin-bottom: 4rpx; // 文本与价格间距
  737. }
  738. .price {
  739. font-size: 26rpx;
  740. color: #cc0000;
  741. font-weight: bold;
  742. }
  743. // 贴边/停止拖拽时的过渡动画
  744. &.transition {
  745. transition: left 0.3s ease, top 0.3s ease;
  746. }
  747. }
  748. .couponIndex {
  749. width: auto;
  750. height: 238rpx;
  751. //background-image: url("~@/static/images/yhjsy.png");
  752. background-size: 100% 100%;
  753. padding-left: 42rpx;
  754. margin-bottom: 30rpx;
  755. .titBox {
  756. padding: 47rpx 0;
  757. text-align: center;
  758. height: 100%;
  759. .tit1 {
  760. color: #ffebd2;
  761. font-size: 34rpx;
  762. font-weight: 600;
  763. }
  764. .tit2 {
  765. color: #ffebd2;
  766. font-size: 22rpx;
  767. margin: 10rpx 0 26rpx 0;
  768. }
  769. .tit3 {
  770. color: #ffdaaf;
  771. font-size: 24rpx;
  772. .iconfont {
  773. font-size: 20rpx;
  774. }
  775. }
  776. }
  777. }
  778. .sticky-box {
  779. // display: flex;
  780. // position: -webkit-sticky;
  781. // position: sticky;
  782. z-index: 99;
  783. flex-direction: row;
  784. // margin: 0px;
  785. // background: #fff;
  786. padding-bottom: 30rpx;
  787. background: #fff;
  788. margin-top: 30rpx;
  789. .active {
  790. color: #000;
  791. }
  792. .nav-bd {
  793. display: flex;
  794. align-items: center;
  795. justify-content: space-between;
  796. padding: 0 20rpx;
  797. .item {
  798. display: flex;
  799. flex-direction: column;
  800. align-items: center;
  801. justify-content: center;
  802. border-bottom: 3rpx solid #e6e6e6;
  803. box-sizing: border-box;
  804. .txt {
  805. font-size: 28rpx;
  806. color: #282828;
  807. }
  808. .label {
  809. display: flex;
  810. align-items: center;
  811. justify-content: center;
  812. width: 124rpx;
  813. height: 32rpx;
  814. margin-top: 5rpx;
  815. font-size: 24rpx;
  816. color: #999;
  817. }
  818. &.active {
  819. color: $theme-color;
  820. border-bottom: 2rpx solid #000;
  821. .txt {
  822. color: $theme-color;
  823. }
  824. .label {
  825. background: linear-gradient(90deg, $bg-star 0%, $bg-end 100%);
  826. border-radius: 16rpx;
  827. color: #fff;
  828. }
  829. }
  830. }
  831. }
  832. .second-nav {
  833. width: 100%;
  834. display: flex;
  835. flex-wrap: nowrap;
  836. overflow-x: auto;
  837. &::-webkit-scrollbar {
  838. display: none;
  839. }
  840. -webkit-overflow-scrolling: touch;
  841. padding: 0 50rpx;
  842. box-sizing: border-box;
  843. .second-nav-item {
  844. font-size: 26rpx;
  845. padding: 15rpx 0;
  846. margin: 0 10rpx 0 0;
  847. color: #000;
  848. white-space: nowrap;
  849. // flex: 1;
  850. width: 33%;
  851. display: flex;
  852. justify-content: center;
  853. align-items: center;
  854. &.active {
  855. color: #ef4800;
  856. }
  857. }
  858. }
  859. }
  860. .swiper-box {
  861. &::v-deep uni-image {
  862. width: 100%;
  863. }
  864. .swiper-banner {
  865. width: 100%;
  866. height: 160px;
  867. }
  868. }
  869. // 活动专区
  870. .active-contanier {
  871. width: 100%;
  872. box-sizing: border-box;
  873. padding: 0 30rpx;
  874. .active-scroll {
  875. width: 100%;
  876. white-space: nowrap;
  877. .active-scroll-content {
  878. margin: 30rpx 0;
  879. display: flex;
  880. flex-direction: row;
  881. white-space: nowrap;
  882. }
  883. }
  884. .active-item {
  885. // width: 335rpx;
  886. width: 48.99%;
  887. background: #ffffff;
  888. height: 180rpx;
  889. // box-shadow: 0rpx 3rpx 13rpx 0rpx rgba(0, 0, 0, 0.13);
  890. border-radius: 20rpx;
  891. padding: 13rpx 20rpx;
  892. box-sizing: border-box;
  893. display: flex;
  894. flex-direction: column;
  895. margin-right: 20rpx;
  896. flex-shrink: 0;
  897. .title-box {
  898. height: 33rpx;
  899. display: flex;
  900. font-size: 22rpx;
  901. align-items: center;
  902. .title {
  903. // width: 50%;
  904. font-weight: bold;
  905. text-align: center;
  906. }
  907. }
  908. .active-box {
  909. flex: 1;
  910. display: flex;
  911. .active-item-left {
  912. flex: 1;
  913. display: flex;
  914. flex-direction: column;
  915. .image-box {
  916. flex: 1;
  917. // width: 115rpx;
  918. display: flex;
  919. align-items: center;
  920. image {
  921. border-radius: 5rpx;
  922. width: 115rpx;
  923. height: 110rpx;
  924. }
  925. .da-jin-tiao {
  926. width: 51rpx;
  927. }
  928. }
  929. }
  930. .active-item-right {
  931. display: flex;
  932. flex-direction: column;
  933. justify-content: space-between;
  934. flex: 1;
  935. min-width: 0;
  936. width: 0;
  937. .ms {
  938. font-size: 16rpx;
  939. color: #000000;
  940. width: 100%;
  941. overflow: hidden;
  942. text-overflow: ellipsis;
  943. white-space: nowrap;
  944. display: block;
  945. max-width: 100%;
  946. box-sizing: border-box;
  947. }
  948. .tag {
  949. display: flex;
  950. .tag-text {
  951. color: #acacac;
  952. background-color: #ebebeb;
  953. border-radius: 5rpx;
  954. font-size: 16rpx;
  955. text-align: center;
  956. padding: 0rpx 5rpx;
  957. }
  958. }
  959. .price-box {
  960. display: flex;
  961. justify-content: space-between;
  962. .price {
  963. font-size: 18rpx;
  964. font-weight: bold;
  965. color: #000000;
  966. margin-right: 10rpx;
  967. }
  968. .btn {
  969. width: 77rpx;
  970. height: 26rpx;
  971. background-image: linear-gradient(270deg, #fc962c 0%, #f0470d 100%);
  972. border-radius: 100rpx;
  973. display: flex;
  974. justify-content: center;
  975. align-items: center;
  976. font-size: 14rpx;
  977. color: #ffffff;
  978. }
  979. }
  980. }
  981. }
  982. }
  983. }
  984. .listAll {
  985. width: 20%;
  986. text-indent: 62rpx;
  987. font-size: 30rpx;
  988. border-left: 1px #eee solid;
  989. margin: 1% 0;
  990. padding: 5rpx;
  991. position: relative;
  992. image {
  993. position: absolute;
  994. left: 20rpx;
  995. top: 8rpx;
  996. }
  997. }
  998. .tab {
  999. position: relative;
  1000. display: flex;
  1001. font-size: 28rpx;
  1002. white-space: nowrap;
  1003. &__item {
  1004. flex: 1;
  1005. padding: 0 20rpx;
  1006. text-align: center;
  1007. height: 60rpx;
  1008. line-height: 60rpx;
  1009. color: #666;
  1010. &.active {
  1011. color: #09c2c9;
  1012. }
  1013. }
  1014. }
  1015. .tab__line {
  1016. display: block;
  1017. height: 6rpx;
  1018. position: absolute;
  1019. bottom: 0;
  1020. left: 0;
  1021. z-index: 1;
  1022. border-radius: 3rpx;
  1023. position: relative;
  1024. background: #2fc6cd;
  1025. }
  1026. .scroll-view_H {
  1027. width: 100%;
  1028. display: flex;
  1029. overflow-x: auto;
  1030. padding: 12rpx 0;
  1031. background-color: #fff;
  1032. box-sizing: border-box;
  1033. &::-webkit-scrollbar {
  1034. display: none;
  1035. }
  1036. -webkit-overflow-scrolling: touch;
  1037. .tab.nav-bd {
  1038. display: flex;
  1039. align-items: center;
  1040. width: 100%;
  1041. }
  1042. #tab_item.item {
  1043. display: flex;
  1044. flex-direction: column;
  1045. align-items: center;
  1046. // margin: 0 24rpx;
  1047. padding: 8rpx 0;
  1048. cursor: pointer;
  1049. flex: 1;
  1050. transition: all 0.3s ease;
  1051. .uni-icons {
  1052. font-size: 44rpx;
  1053. margin-bottom: 6rpx;
  1054. }
  1055. .txt {
  1056. font-size: 26rpx;
  1057. color: #333;
  1058. }
  1059. }
  1060. #tab_list:first-of-type .item.active {
  1061. .uni-icons {
  1062. color: #000;
  1063. }
  1064. .txt {
  1065. color: #000;
  1066. font-weight: bold;
  1067. }
  1068. }
  1069. .privacy-wrapper {
  1070. z-index: 999;
  1071. position: fixed;
  1072. left: 0;
  1073. top: 0;
  1074. width: 100%;
  1075. height: 100%;
  1076. background: #7f7f7f;
  1077. .privacy-box {
  1078. position: absolute;
  1079. left: 50%;
  1080. top: 50%;
  1081. transform: translate(-50%, -50%);
  1082. width: 560rpx;
  1083. padding: 50rpx 45rpx 0;
  1084. background: #fff;
  1085. border-radius: 20rpx;
  1086. .title {
  1087. text-align: center;
  1088. font-size: 32rpx;
  1089. text-align: center;
  1090. color: #333;
  1091. font-weight: 700;
  1092. }
  1093. .content {
  1094. margin-top: 20rpx;
  1095. line-height: 1.5;
  1096. font-size: 26rpx;
  1097. color: #666;
  1098. text-indent: 54rpx;
  1099. i {
  1100. font-style: normal;
  1101. color: $theme-color;
  1102. }
  1103. }
  1104. .btn-box {
  1105. margin-top: 40rpx;
  1106. text-align: center;
  1107. font-size: 30rpx;
  1108. .btn-item {
  1109. height: 82rpx;
  1110. line-height: 82rpx;
  1111. background: linear-gradient(90deg, #f67a38 0%, #f11b09 100%);
  1112. color: #fff;
  1113. border-radius: 41rpx;
  1114. }
  1115. .btn {
  1116. padding: 30rpx 0;
  1117. }
  1118. }
  1119. }
  1120. }
  1121. }
  1122. .page-index {
  1123. position: relative;
  1124. z-index: 1;
  1125. height: 100%;
  1126. padding-bottom: 200rpx;
  1127. box-sizing: border-box;
  1128. .top-box {
  1129. padding-top: 168rpx;
  1130. //background: linear-gradient(180deg, #ffe079 0%, #ffffff 100%);
  1131. //background-image: url("https://sb-admin.oss-cn-shenzhen.aliyuncs.com/shuibei-mini/new-mini/jianbianBG.png");
  1132. background-size: 100% 100%;
  1133. }
  1134. }
  1135. .header {
  1136. //position: sticky;
  1137. //top: 0;
  1138. //z-index: 200000;
  1139. width: 100%;
  1140. padding: 28rpx 20rpx 0;
  1141. .serch-wrapper {
  1142. //margin-top: var(--status-bar-height);
  1143. margin-bottom: 16rpx;
  1144. display: flex;
  1145. justify-content: center;
  1146. align-items: center;
  1147. /* #ifdef MP-WEIXIN */
  1148. width: 100%;
  1149. /* #endif */
  1150. .logo {
  1151. width: 154rpx;
  1152. height: 47rpx;
  1153. margin-right: 24rpx;
  1154. }
  1155. image {
  1156. width: 118rpx;
  1157. height: 42rpx;
  1158. }
  1159. .input {
  1160. display: flex;
  1161. align-items: center;
  1162. width: 100%;
  1163. height: 80rpx;
  1164. background-color: #ffffff;
  1165. border-radius: 16rpx;
  1166. font-size: 28rpx;
  1167. color: #868686;
  1168. .iconfont {
  1169. margin: 0 10rpx;
  1170. font-size: 26rpx;
  1171. color: #666666;
  1172. }
  1173. .searchImg {
  1174. width: 32rpx;
  1175. height: 32rpx;
  1176. margin: 0 20rpx;
  1177. }
  1178. }
  1179. }
  1180. .tabNav {
  1181. padding-top: 24rpx;
  1182. }
  1183. }
  1184. .page_content {
  1185. padding: 0 30rpx;
  1186. }
  1187. .index-product-wrapper {
  1188. padding: 0 16rpx;
  1189. margin-bottom: 200rpx;
  1190. /* 为自定义 tabBar 留出空间 */
  1191. min-height: 700rpx;
  1192. //background: #fff;
  1193. &.on {
  1194. min-height: 1500rpx;
  1195. }
  1196. .list-box {
  1197. display: flex;
  1198. flex-wrap: wrap;
  1199. justify-content: space-between;
  1200. .item {
  1201. width: 48.99%;
  1202. //height: 490rpx;
  1203. background-color: #ffffff;
  1204. // box-shadow: 0rpx 3rpx 13rpx 0rpx rgba(0, 0, 0, 0.13);
  1205. border-radius: 16rpx;
  1206. margin-bottom: 16rpx;
  1207. overflow: hidden;
  1208. display: flex;
  1209. flex-direction: column;
  1210. justify-content: space-between;
  1211. .pictrue {
  1212. position: relative;
  1213. image {
  1214. width: 100%;
  1215. height: 330rpx;
  1216. }
  1217. }
  1218. .text-info {
  1219. padding: 16rpx 8rpx;
  1220. .title {
  1221. color: #333;
  1222. display: flex;
  1223. align-items: center;
  1224. justify-items: space-between;
  1225. .tip {
  1226. width: 61rpx;
  1227. height: auto;
  1228. font-size: 22rpx;
  1229. display: flex;
  1230. justify-content: center;
  1231. align-items: center;
  1232. color: #ffffff;
  1233. position: relative;
  1234. margin-right: 5rpx;
  1235. background-color: #ef4800;
  1236. border-radius: 5rpx;
  1237. }
  1238. .text {
  1239. width: 80%;
  1240. font-weight: bold;
  1241. }
  1242. .weight {
  1243. background-color: rgba(197, 128, 3, 0.1);
  1244. color: #c58003;
  1245. font-size: 24rpx;
  1246. padding: 8rpx 16rpx;
  1247. border-radius: 8rpx;
  1248. float: right;
  1249. }
  1250. }
  1251. .bottom-row {
  1252. color: $theme-color;
  1253. display: flex;
  1254. justify-content: space-between;
  1255. align-items: center;
  1256. font-size: 28rpx;
  1257. margin: 10rpx 0 0;
  1258. .price {
  1259. padding-bottom: 4rpx;
  1260. font-weight: 800;
  1261. white-space: nowrap;
  1262. font-size: 28rpx;
  1263. color: #f16327;
  1264. }
  1265. .sales {
  1266. font-size: 22rpx;
  1267. white-space: nowrap;
  1268. flex-shrink: 0;
  1269. color: #999999;
  1270. }
  1271. }
  1272. .merchantInfo {
  1273. display: flex;
  1274. align-items: center;
  1275. height: 40rpx;
  1276. margin-top: 16rpx;
  1277. }
  1278. .merchantLogo {
  1279. width: 40rpx;
  1280. height: 40rpx;
  1281. border-radius: 50%;
  1282. margin-right: 8rpx;
  1283. }
  1284. .merchantName {
  1285. font-size: 24rpx;
  1286. color: #333;
  1287. }
  1288. }
  1289. }
  1290. &.on {
  1291. display: flex;
  1292. }
  1293. }
  1294. }
  1295. .top-bg-box2 {
  1296. overflow: hidden;
  1297. padding: 16rpx;
  1298. box-sizing: border-box;
  1299. .title {
  1300. font-size: 32rpx;
  1301. color: #333333;
  1302. font-weight: bold;
  1303. line-height: 48rpx;
  1304. }
  1305. }
  1306. .top-bg-box {
  1307. overflow: hidden;
  1308. padding: 16rpx;
  1309. box-sizing: border-box;
  1310. // background-image: linear-gradient(
  1311. // to bottom,
  1312. // $header-color 0%,
  1313. // $header-color 10%,
  1314. // #ffe9a1 50%,
  1315. // transparent 100%
  1316. // );
  1317. .card {
  1318. background-color: #fff;
  1319. padding: 4rpx;
  1320. box-sizing: border-box;
  1321. border-radius: 20rpx;
  1322. .cardbgLinear {
  1323. padding: 20rpx 16rpx;
  1324. box-sizing: border-box;
  1325. border-radius: 20rpx;
  1326. background: linear-gradient(
  1327. to bottom,
  1328. rgba(255, 240, 200, 0.7) 0%,
  1329. rgba(255, 240, 200, 0.4) 8%,
  1330. rgba(255, 255, 255, 1) 20%,
  1331. rgba(255, 255, 255, 1) 100%
  1332. );
  1333. }
  1334. }
  1335. }
  1336. .top-bg-box {
  1337. .title {
  1338. display: flex;
  1339. justify-content: space-between; // 左右两端对齐
  1340. align-items: center; // 垂直居中
  1341. .title-left {
  1342. display: flex;
  1343. align-items: center;
  1344. .ssjj {
  1345. width: 150rpx;
  1346. height: 36rpx;
  1347. vertical-align: middle;
  1348. }
  1349. .updateTime {
  1350. font-size: 20rpx;
  1351. color: #666666;
  1352. padding: 0 20rpx 0 8rpx;
  1353. box-sizing: border-box;
  1354. }
  1355. }
  1356. .more {
  1357. display: flex;
  1358. align-items: center;
  1359. .txt {
  1360. font-size: 24rpx;
  1361. color: #666666;
  1362. }
  1363. .right {
  1364. width: 24rpx;
  1365. height: 24rpx;
  1366. vertical-align: middle;
  1367. // margin-left: 10rpx; // 添加一些间距
  1368. }
  1369. }
  1370. }
  1371. }
  1372. .nav-list {
  1373. width: 100%;
  1374. display: flex;
  1375. justify-content: space-between;
  1376. align-items: center;
  1377. padding: 0 40rpx 0;
  1378. margin-top: 30rpx;
  1379. .item {
  1380. text-align: center;
  1381. .price {
  1382. font-size: 40rpx;
  1383. color: #fd5f3c;
  1384. font-weight: bold;
  1385. .unit {
  1386. font-size: 24rpx;
  1387. }
  1388. }
  1389. .txt {
  1390. font-size: 28rpx;
  1391. color: #666666;
  1392. line-height: 60rpx;
  1393. }
  1394. }
  1395. }
  1396. .no-data {
  1397. margin: 150rpx auto 0;
  1398. text-align: center;
  1399. img {
  1400. width: 65%;
  1401. height: auto;
  1402. }
  1403. }
  1404. .inde-nav-bar {
  1405. .page-title {
  1406. color: #fff;
  1407. }
  1408. }
  1409. // 分类卡片区域样式
  1410. .classify-section {
  1411. background: #fff;
  1412. margin: 0 16rpx;
  1413. border-radius: 16rpx;
  1414. padding: 30rpx 0 10rpx;
  1415. // box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
  1416. }
  1417. .classify-scroll {
  1418. width: 100%;
  1419. white-space: nowrap;
  1420. }
  1421. .classify-container {
  1422. width: 100%;
  1423. display: inline-flex;
  1424. flex-wrap: nowrap;
  1425. min-width: 100%;
  1426. }
  1427. .classify-item {
  1428. display: inline-flex;
  1429. flex-direction: column;
  1430. align-items: center;
  1431. justify-content: center;
  1432. width: 175rpx;
  1433. flex-shrink: 0;
  1434. box-sizing: border-box;
  1435. .classify-img {
  1436. width: 100rpx;
  1437. height: 100rpx;
  1438. }
  1439. .classify-txt {
  1440. font-size: 24rpx;
  1441. color: #333;
  1442. margin-top: 10rpx;
  1443. text-align: center;
  1444. white-space: nowrap;
  1445. overflow: hidden;
  1446. text-overflow: ellipsis;
  1447. max-width: 120rpx;
  1448. }
  1449. }
  1450. .nav-slot {
  1451. //width: 60%;
  1452. display: flex;
  1453. justify-content: space-between;
  1454. align-items: center;
  1455. .dianpu {
  1456. width: 32rpx;
  1457. height: 32rpx;
  1458. }
  1459. .zhankai {
  1460. width: 20rpx;
  1461. height: 20rpx;
  1462. }
  1463. .storeName {
  1464. width: 60%;
  1465. font-size: 28rpx;
  1466. color: #333;
  1467. }
  1468. }
  1469. .no-data {
  1470. margin: 150rpx auto 0;
  1471. text-align: center;
  1472. img {
  1473. width: 65%;
  1474. height: auto;
  1475. }
  1476. }
  1477. .mores-txt {
  1478. width: 100%;
  1479. align-items: center;
  1480. justify-content: center;
  1481. height: 70rpx;
  1482. color: #999;
  1483. font-size: 24rpx;
  1484. .iconfont {
  1485. margin-top: 2rpx;
  1486. font-size: 20rpx;
  1487. }
  1488. }
  1489. :deep(.page-title) {
  1490. font-size: 36rpx;
  1491. }
  1492. </style>