index.vue 33 KB

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