index.vue 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036
  1. <template>
  2. <view class="container">
  3. <up-navbar
  4. class="inde-nav-bar"
  5. :bgColor="navBgColor"
  6. >
  7. <template #left>
  8. <view></view>
  9. </template>
  10. <template #center>
  11. <view class="page-title">我的</view>
  12. </template>
  13. </up-navbar>
  14. <!-- 顶部用户信息 -->
  15. <view class="user-header">
  16. <view class="user-info">
  17. <view class="user-main">
  18. <view>
  19. <image
  20. class="avatar"
  21. :src="isHttpsImage(appStore.$userInfo?.avatar)"
  22. ></image>
  23. </view>
  24. <view class="user-detail">
  25. <view class="name-vip" v-if="appStore.isLogin">
  26. <text class="name">{{ appStore.$userInfo?.nickname }}</text>
  27. <image class="vip-tag" v-if="appStore.$userInfo?.svip && !(appStore?.$wxConfig?.auditModeEnabled)" mode="widthFix" :src="HTTP_REQUEST_URL_IMG+'sviplogo.png'"></image>
  28. </view>
  29. <view
  30. class="name-vip"
  31. v-else
  32. @click="navigateTo('/pages/users/login/index')"
  33. >
  34. <text class="name">未登录</text>
  35. </view>
  36. <text class="vip-expire" v-if="appStore.$userInfo?.svip"
  37. >到期时间:{{ appStore.$userInfo?.svipExpireTime }}</text
  38. >
  39. </view>
  40. </view>
  41. <view class="btn-content" @click="handleEdit()">
  42. <image
  43. class="setting"
  44. :src="HTTP_REQUEST_URL_IMG + 'setting.png'"
  45. mode="widthFix"
  46. ></image>
  47. <text class="btn-text">编辑资料</text>
  48. </view>
  49. </view>
  50. <!-- 会员开通提示 v-if="!userInfo.isVip"-->
  51. <view class="vip-promote" v-if="!(appStore?.$wxConfig?.auditModeEnabled)">
  52. <image class="vipBG" :src="HTTP_REQUEST_URL_IMG+'vipBG.png'" mode="scaleToFill"></image>
  53. <view class="vip-text">
  54. <view class="title">
  55. <image class="vipIcon" :src="HTTP_REQUEST_URL_IMG+'setting/vipIcon.png'" mode="widthFix"></image>
  56. <text v-if="!appStore.$userInfo?.svip">开通<text class="bigText">会员</text>享受更多<text class="bigText">权益</text></text>
  57. <text v-else>前往查看<text class="bigText">权益</text></text>
  58. </view>
  59. <button class="open-vip" @click="goVIP">{{appStore.$userInfo?.svip ? '去查看':'去开通'}}<image class="bofang" :src="HTTP_REQUEST_URL_IMG+'setting/bofang.png'" mode="widthFix"></image></button>
  60. </view>
  61. </view>
  62. </view>
  63. <!-- 钱包余额 -->
  64. <view class="wallet-section">
  65. <view class="wallet-header">
  66. <view>
  67. <view class="wallet-title">钱包余额(元)</view>
  68. <view class="balance">{{ wallet.balance }}</view>
  69. </view>
  70. <view
  71. class="transaction-detail"
  72. @click="viewTransactionDetail"
  73. v-if="!(appStore?.$wxConfig?.auditModeEnabled)"
  74. >
  75. <text style="margin-right: 10rpx">交易明细</text>
  76. <uni-icons type="right" size="16" color="#666666"></uni-icons>
  77. </view>
  78. </view>
  79. <up-line color="#F1F3F8"></up-line>
  80. <view class="assets">
  81. <view
  82. v-for="(asset, index) in wallet.assets"
  83. :key="asset.name"
  84. class="asset-container"
  85. >
  86. <view class="asset-item">
  87. <text class="asset-name">{{ asset.name }}</text>
  88. <text class="asset-amount"
  89. >{{ asset.balance }}{{ asset.unit }}</text
  90. >
  91. </view>
  92. <!-- 在每个资产项后面添加垂直分隔线,除了最后一个 -->
  93. <up-line
  94. v-if="index < wallet.assets.length - 1"
  95. color="#F1F3F8"
  96. direction="col"
  97. length="80rpx"
  98. style="margin: 0 20rpx"
  99. ></up-line>
  100. </view>
  101. </view>
  102. <view
  103. class="wallet-actions"
  104. v-if="tradeList && tradeList.length > 0 && showIcons"
  105. >
  106. <view
  107. class="wallet-btn withdraw"
  108. @click="goDetail(tradeList[0].jumpUrl)"
  109. >{{ tradeList[0].iconName }}</view
  110. >
  111. <view
  112. class="wallet-btn recharge"
  113. @click="goDetail(tradeList[1].jumpUrl)"
  114. >{{ tradeList[1].iconName }}</view
  115. >
  116. </view>
  117. <view class="functions" v-if="useList&&useList.length>0&&showIcons">
  118. <view class="function-item" v-for="item in useList" :key="item.iconName" @click="goDetail(item.jumpUrl)">
  119. <view class="function-icon">
  120. <image class="img" :src="item.src" mode="widthFix"></image>
  121. </view>
  122. <text class="function-name">{{ item.iconName }}</text>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 最近访问 -->
  127. <view class="recent-visit" v-if="recentStores.length > 0">
  128. <view class="section-header">
  129. <text class="section-title">最近访问</text>
  130. <view class="more" @click="handleFunctionClick({pageUrl:'/pages/users/browsing_history/index'})">查看更多<uni-icons style="margin-left: 10rpx;" type="right" size="16" color="#666666"></uni-icons></view>
  131. </view>
  132. <view class="store-list">
  133. <template v-for="(store,storeIndex) in recentStores" :key="store.id">
  134. <view class="store-item" v-if="storeIndex == 0" @click="viewStore(store)">
  135. <view class="store-logo">
  136. <image class="img" :src="store.merchantLogo"></image>
  137. </view>
  138. <view class="store-info">
  139. <text class="store-name">{{ store.merchantName }}</text>
  140. <text class="store-desc">{{ store.merchantDescribe }}</text>
  141. </view>
  142. <uni-icons style="margin-left: auto;" type="right" size="16" color="#666666"></uni-icons>
  143. </view>
  144. </template>
  145. </view>
  146. </view>
  147. <!-- 订单状态 -->
  148. <view class="order-section">
  149. <view class="section-header">
  150. <text class="section-title">我的订单</text>
  151. <view class="more" @click="viewAllOrders"
  152. >全部订单<uni-icons
  153. style="margin-left: 10rpx"
  154. type="right"
  155. size="16"
  156. color="#666666"
  157. ></uni-icons
  158. ></view>
  159. </view>
  160. <view class="order-status">
  161. <view
  162. class="status-item"
  163. v-for="order in orderStatus"
  164. :key="order.name"
  165. @click="viewOrders(order.id)"
  166. >
  167. <view class="status-icon">
  168. <image class="img" :src="order.src" mode="widthFix"></image>
  169. </view>
  170. <text class="status-name">{{ order.name }}</text>
  171. </view>
  172. </view>
  173. </view>
  174. <!-- 常用功能 -->
  175. <view class="common-functions">
  176. <view class="section-header">
  177. <text class="section-title">常用功能</text>
  178. </view>
  179. <view class="functions">
  180. <template v-for="func in commonFunctions" :key="func.name">
  181. <view class="function-item" @click="handleFunctionClick(func)" v-if="func.show">
  182. <view class="function-icon">
  183. <image class="img" :src="func.src" mode="widthFix"></image>
  184. </view>
  185. <text class="function-name">{{ func.name }}</text>
  186. </view>
  187. </template>
  188. </view>
  189. </view>
  190. <!-- 企微客服弹窗 -->
  191. <up-popup
  192. :show="showCallList"
  193. closeOnClickOverlay
  194. mode="bottom"
  195. @close="showCallList = false"
  196. >
  197. <view class="callService">
  198. <view class="list-box">
  199. <view
  200. v-for="(item, index) in callList"
  201. :key="index"
  202. class="list-item"
  203. @click="callService(item)"
  204. >
  205. <view class="item-left">
  206. <view class="item-name">{{ item.serviceName }}</view>
  207. </view>
  208. </view>
  209. </view>
  210. </view>
  211. </up-popup>
  212. <!-- 自定义 tabBar -->
  213. <customTabBar :current="3" :showBackTop="false" />
  214. </view>
  215. </template>
  216. <script setup>
  217. import { ref, reactive, watch, computed } from "vue";
  218. import { onLoad, onShow, onPageScroll } from "@dcloudio/uni-app";
  219. import UniIcons from "../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue";
  220. import { HTTP_REQUEST_URL_IMG } from "@/config/app";
  221. import { isHttpsImage } from "@/utils/util";
  222. import { useAppStore } from "@/stores/app";
  223. import { useToast } from "@/hooks/useToast";
  224. import { getMetalBalance } from "@/api/vault";
  225. import { footprintList } from "@/api/merchant.js";
  226. import { getCustomerServiceList } from "@/api/user";
  227. import { toLogin } from "@/libs/login.js";
  228. import customTabBar from "@/components/customTabBar/index.vue";
  229. const showIcons = ref(false);
  230. const appStore = useAppStore();
  231. const { Toast } = useToast();
  232. const isLogin = appStore.isLogin;
  233. const callList = ref([]);
  234. const showCallList = ref(false);
  235. const navBgColor = ref("rgba(255,255,255,0)");
  236. // 钱包信息
  237. const wallet = ref({
  238. balance: appStore.userInfo?.nowMoney || "0.00",
  239. assets: [
  240. { name: "黄金资产", balance: "0.00", unit: "g", type: 1 },
  241. { name: "铂金资产", balance: "0.00", unit: "g", type: 2 },
  242. { name: "白银资产", balance: "0.00", unit: "g", type: 3 },
  243. ],
  244. });
  245. // 主要功能列表
  246. const mainFunctions = ref([
  247. {
  248. src: `${HTTP_REQUEST_URL_IMG}setting/mailiao.png`,
  249. name: "买料",
  250. pageUrl: "/pages/users/vault/rechargeGold",
  251. },
  252. {
  253. src: `${HTTP_REQUEST_URL_IMG}setting/mailiao2.png`,
  254. name: "卖料",
  255. pageUrl: "/pages/users/vault/storeMetal/index",
  256. },
  257. {
  258. src: `${HTTP_REQUEST_URL_IMG}setting/cunliao.png`,
  259. name: "存料",
  260. pageUrl: "/pages/users/vault/storeMetal/goldBullionStock",
  261. },
  262. {
  263. src: `${HTTP_REQUEST_URL_IMG}setting/tiliao.png`,
  264. name: "提料",
  265. pageUrl: "/pages/users/vault/storeMetal/metalExchange",
  266. },
  267. ]);
  268. // 最近访问的商家
  269. const recentStores = ref([]);
  270. // 订单状态
  271. const orderStatus = ref([
  272. {
  273. src: `${HTTP_REQUEST_URL_IMG}setting/daifukuan.png`,
  274. name: "待付款",
  275. id: 0,
  276. },
  277. { src: `${HTTP_REQUEST_URL_IMG}setting/daifahuo.png`, name: "待发货", id: 1 },
  278. {
  279. src: `${HTTP_REQUEST_URL_IMG}setting/daishouhuo.png`,
  280. name: "待收货",
  281. id: 2,
  282. },
  283. {
  284. src: `${HTTP_REQUEST_URL_IMG}setting/tuikuan.png`,
  285. name: "退款/换货",
  286. id: 5,
  287. },
  288. {
  289. src: `${HTTP_REQUEST_URL_IMG}setting/yiwancheng.png`,
  290. name: "已完成",
  291. id: 4,
  292. },
  293. ]);
  294. const merchantZYShow = ref(false);
  295. const lxsjShow = ref(false);
  296. const logoutShow = ref(false);
  297. // 常用功能
  298. const commonFunctions = computed(() => {
  299. const baseFunctions = [
  300. {
  301. src: `${HTTP_REQUEST_URL_IMG}setting/zuji.png`,
  302. name: "浏览足迹",
  303. pageUrl: "/pages/users/browsing_history/index",
  304. show: true,
  305. },
  306. {
  307. src: `${HTTP_REQUEST_URL_IMG}setting/shoucang.png`,
  308. name: "我的收藏",
  309. pageUrl: "/pages/users/user_goods_collection/index",
  310. show: true,
  311. },
  312. {
  313. src: `${HTTP_REQUEST_URL_IMG}setting/dingwei.png`,
  314. name: "收货地址",
  315. pageUrl: "/pages/users/user_address_list/index",
  316. show: true,
  317. },
  318. {
  319. src: `${HTTP_REQUEST_URL_IMG}setting/dianpu.png`,
  320. name: "联系商家",
  321. pageUrl: "/pages/users/my_merchant/index",
  322. show: lxsjShow.value,
  323. },
  324. {
  325. src: `${HTTP_REQUEST_URL_IMG}setting/dianpu.png`,
  326. name: "门店主页",
  327. pageUrl: "/pages/merchantCenter/index",
  328. show: merchantZYShow.value,
  329. },
  330. // { src: `${HTTP_REQUEST_URL_IMG}setting/xiazaiapp.png`, name: '下载APP', pageUrl: 'download', show: true },
  331. {
  332. src: `${HTTP_REQUEST_URL_IMG}setting/lianxikefu.png`,
  333. name: "平台客服",
  334. show: true,
  335. },
  336. {
  337. src: `${HTTP_REQUEST_URL_IMG}setting/logout.png`,
  338. name: "退出登录",
  339. pageUrl: "logout",
  340. show: logoutShow.value,
  341. },
  342. ];
  343. // 根据 show 值过滤
  344. return baseFunctions.filter((func) => func.show);
  345. });
  346. const params = ref({
  347. page: 1,
  348. limit: 10,
  349. });
  350. // 页面加载
  351. onShow(async () => {
  352. // 隐藏原生 tabBar
  353. uni.hideTabBar();
  354. if (appStore.isLogin) {
  355. await appStore.USERINFO();
  356. logoutShow.value = true;
  357. wallet.value.balance = appStore.userInfo?.nowMoney || "0.00";
  358. if (appStore.userInfo?.merchant?.id) {
  359. merchantZYShow.value = true;
  360. } else {
  361. merchantZYShow.value = false;
  362. }
  363. if (appStore.merchantId || appStore.userInfo?.merchant?.id) {
  364. lxsjShow.value = true;
  365. } else {
  366. lxsjShow.value = false;
  367. }
  368. } else {
  369. logoutShow.value = false;
  370. }
  371. fetchMetalBalance();
  372. getHistoryList();
  373. });
  374. onLoad(async () => {
  375. await getServiceList();
  376. });
  377. onPageScroll((e) => {
  378. if (e.scrollTop > 0) {
  379. navBgColor.value = "#ffe079";
  380. } else {
  381. navBgColor.value = "rgba(252,255,255,0)";
  382. }
  383. });
  384. const wxConfig = ref({});
  385. const tradeList = ref([]);
  386. const useList = ref([]);
  387. watch(
  388. () => appStore.wxConfig,
  389. (newVal) => {
  390. const configDate = newVal || appStore.$wxConfig;
  391. wxConfig.value = configDate;
  392. const list = JSON.parse(configDate.essentialFunctions);
  393. console.log('list',list)
  394. if (list[0].status == false) {
  395. showIcons.value = false;
  396. } else {
  397. showIcons.value = true;
  398. }
  399. tradeList.value = [list[0], list[1]];
  400. useList.value = [
  401. {
  402. ...list[2],
  403. src: `${HTTP_REQUEST_URL_IMG}setting/mailiao.png`,
  404. },
  405. {
  406. ...list[3],
  407. src: `${HTTP_REQUEST_URL_IMG}setting/mailiao2.png`,
  408. },
  409. {
  410. ...list[4],
  411. src: `${HTTP_REQUEST_URL_IMG}setting/cunliao.png`,
  412. iconName: "存料",
  413. },
  414. {
  415. ...list[5],
  416. src: `${HTTP_REQUEST_URL_IMG}setting/tiliao.png`,
  417. },
  418. ];
  419. console.log(tradeList.value);
  420. },
  421. { deep: true, immediate: true }
  422. );
  423. // 编辑资料
  424. const editProfile = () => {
  425. uni.showToast({
  426. title: "编辑资料",
  427. icon: "none",
  428. });
  429. };
  430. // 开通会员
  431. const openVip = () => {
  432. uni.showToast({
  433. title: "开通会员",
  434. icon: "none",
  435. });
  436. };
  437. // 查看会员权益
  438. const goVIP = () => {
  439. // uni.navigateTo({ url: "/pages/users/VIP/VIP" });
  440. goDetail("/pages/VIP/VIP")
  441. };
  442. // 查看交易明细
  443. const viewTransactionDetail = () => {
  444. if (!isLogin) {
  445. toLogin();
  446. } else {
  447. // uni.navigateTo({ url: "/pages/users/vault/index" });
  448. goDetail("/pages/users/vault/index1")
  449. }
  450. };
  451. // 充值
  452. const recharge = () => {
  453. if (!isLogin) {
  454. toLogin();
  455. } else {
  456. uni.navigateTo({
  457. url: `/pages/webview/index?path=${"/pages/users/vault/rechargeRmb"}`,
  458. });
  459. }
  460. };
  461. // 提现
  462. const withdraw = () => {
  463. if (!isLogin) {
  464. toLogin();
  465. } else {
  466. uni.navigateTo({
  467. url: `/pages/webview/index?path=${"/pages/users/vault/withdraw"}`,
  468. });
  469. }
  470. };
  471. const goDetail = (url) => {
  472. console.log(url);
  473. const webviewPageUrl = `/pages/webview/index?path=${url}`;
  474. uni.navigateTo({
  475. url: webviewPageUrl,
  476. fail: (err) => {
  477. console.error("跳转到webview页面失败:", err);
  478. uni.showToast({
  479. title: "跳转失败,请重试",
  480. icon: "none",
  481. duration: 1500,
  482. });
  483. },
  484. });
  485. };
  486. function handleLogOut() {
  487. uni.showModal({
  488. title: "提示",
  489. content: "确认退出登录吗?",
  490. success: function (res) {
  491. if (res.confirm) {
  492. // 清除全局定时器
  493. if (getApp().globalData?.messageTimer) {
  494. clearInterval(getApp().globalData.messageTimer);
  495. getApp().globalData.messageTimer = null;
  496. }
  497. appStore.LOGOUT();
  498. uni.reLaunch({ url: "/pages/users/login/index" });
  499. }
  500. },
  501. });
  502. }
  503. // 功能点击
  504. const handleFunctionClick = (item) => {
  505. const url = item.pageUrl;
  506. console.log(url);
  507. if (item.name === "平台客服") return (showCallList.value = true);
  508. if (!url) return;
  509. // 买料、卖料、消费需要通过webview跳转
  510. if (
  511. [
  512. "/pages/users/vault/rechargeGold",
  513. "/pages/users/vault/storeMetal/index",
  514. "/pages/users/vault/storeMetal/order",
  515. ].includes(url)
  516. ) {
  517. const webviewPageUrl = `/pages/webview/index?path=${url}`;
  518. uni.navigateTo({
  519. url: webviewPageUrl,
  520. fail: (err) => {
  521. console.error("跳转到webview页面失败:", err);
  522. uni.showToast({
  523. title: "跳转失败,请重试",
  524. icon: "none",
  525. duration: 1500,
  526. });
  527. },
  528. });
  529. return; // 阻止继续执行后续跳转逻辑
  530. } else if (url === "download") {
  531. uni.setClipboardData({
  532. data: "https://a.app.qq.com/o/simple.jsp?pkgname=uni.app.UNI9DE338F",
  533. showToast: false,
  534. success: function () {
  535. uni.showToast({
  536. title: "下载链接复制成功,请打开内置手机浏览器访问下载。",
  537. icon: "none",
  538. });
  539. console.log("success");
  540. },
  541. });
  542. return;
  543. } else if (url === "logout") {
  544. handleLogOut();
  545. } else {
  546. console.log(url)
  547. uni.navigateTo({ url });
  548. }
  549. };
  550. // 获取客服列表
  551. const getServiceList = async (url) => {
  552. const res = await getCustomerServiceList();
  553. callList.value = res.data.list;
  554. };
  555. // 跳转企微客服
  556. const callService = async (item) => {
  557. wx.openCustomerServiceChat({
  558. corpId: item.enterpriseId,
  559. extInfo: {
  560. url: item.serviceLink,
  561. },
  562. });
  563. };
  564. // 查看商家
  565. const viewStore = (store) => {
  566. if (!store.merchantId) {
  567. return;
  568. }
  569. uni.navigateTo({
  570. url: "/pages/merchantCenters/merchant?merchantId=" + store.merchantId,
  571. });
  572. };
  573. // 查看全部订单
  574. const viewAllOrders = () => {
  575. uni.navigateTo({ url: "/pages/order_list/index" });
  576. };
  577. // 查看订单
  578. const viewOrders = (status) => {
  579. uni.navigateTo({ url: "/pages/order_list/index?status=" + status });
  580. };
  581. const navigateTo = (url) => {
  582. if (!url) return;
  583. uni.navigateTo({ url });
  584. };
  585. // 用户面板事件处理
  586. function handleEdit() {
  587. // console.log("编辑资料");
  588. uni.navigateTo({ url: "/pages/users/personal_info/personal_info" });
  589. }
  590. async function fetchMetalBalance() {
  591. // 若appStore.uid为空,则请求失败
  592. if (!appStore?.uid) {
  593. // Toast({ title: "未登录,请前往登录后访问" });
  594. return;
  595. }
  596. const params = { userId: appStore.uid };
  597. const { data } = await getMetalBalance(params);
  598. wallet.value.assets = wallet.value.assets.map((metal) => {
  599. const metalValue = data[metal.type];
  600. return metalValue !== undefined ? { ...metal, balance: metalValue } : metal;
  601. });
  602. }
  603. const getHistoryList = async () => {
  604. const { data } = await footprintList(params.value);
  605. recentStores.value = data.records;
  606. };
  607. </script>
  608. <style scoped lang="scss">
  609. .container {
  610. background-color: #f5f5f5;
  611. min-height: 100vh;
  612. padding-bottom: 180rpx;
  613. }
  614. /* 顶部用户信息 */
  615. .user-header {
  616. height: 600rpx;
  617. background-image: linear-gradient(200deg, #fcd965 0%, #ffffff 90%) !important;
  618. background-size: 100% 100%;
  619. padding: 150rpx 20rpx 20rpx;
  620. color: #fff;
  621. border-radius: 0 0 20rpx 20rpx;
  622. box-sizing: border-box;
  623. }
  624. .user-info {
  625. display: flex;
  626. justify-content: space-between;
  627. align-items: center;
  628. margin-bottom: 30rpx;
  629. }
  630. .user-main {
  631. display: flex;
  632. align-items: center;
  633. }
  634. .avatar {
  635. width: 120rpx;
  636. height: 120rpx;
  637. border-radius: 50%;
  638. background-color: #fff;
  639. margin-right: 30rpx;
  640. }
  641. .name-vip {
  642. display: flex;
  643. align-items: center;
  644. margin-bottom: 16rpx;
  645. }
  646. .name {
  647. font-size: 32rpx;
  648. color: #333;
  649. }
  650. .vip-tag {
  651. width: 100rpx;
  652. margin-left: 16rpx;
  653. }
  654. .vip-expire,
  655. .login-tip {
  656. font-size: 28rpx;
  657. color: #666;
  658. }
  659. .btn-content {
  660. display: flex;
  661. flex-direction: column;
  662. align-items: center;
  663. justify-content: center;
  664. .setting {
  665. width: 40rpx;
  666. height: 40rpx;
  667. }
  668. .btn-text {
  669. font-size: 24rpx;
  670. color: #333;
  671. line-height: 1.5;
  672. }
  673. }
  674. /* 会员开通提示 */
  675. .vip-promote {
  676. height: 108rpx;
  677. width: 100%;
  678. height: 108rpx;
  679. padding: 0 30rpx;
  680. box-sizing: border-box;
  681. .vipBG {
  682. width: 100%;
  683. height: 100%;
  684. border-radius: 48rpx 48rpx 0 0;
  685. }
  686. .vip-text {
  687. margin-top: -108rpx;
  688. display: flex;
  689. width: 100%;
  690. justify-content: space-between;
  691. align-items: center;
  692. padding: 20rpx;
  693. box-sizing: border-box;
  694. .title {
  695. font-size: 28rpx;
  696. color: #bdad8e;
  697. display: flex;
  698. justify-content: flex-start;
  699. align-items: center;
  700. .vipIcon {
  701. width: 70rpx;
  702. height: 60rpx;
  703. margin-right: 10rpx;
  704. }
  705. .bigText {
  706. font-size: 32rpx;
  707. color: #facd8d;
  708. margin: 0 10rpx;
  709. }
  710. }
  711. .open-vip {
  712. width: 144rpx;
  713. height: 60rpx;
  714. line-height: 60rpx;
  715. font-size: 24rpx;
  716. color: #5d3d03;
  717. background: linear-gradient(270deg, #fee2a3 0%, #fdebcc 100%);
  718. border-radius: 16rpx 16rpx 16rpx 16rpx;
  719. .bofang {
  720. width: 24rpx;
  721. height: 24rpx;
  722. margin-left: 10rpx;
  723. }
  724. }
  725. }
  726. }
  727. .desc {
  728. font-size: 22rpx;
  729. opacity: 0.9;
  730. }
  731. /* 钱包余额 */
  732. .wallet-section {
  733. background: #fff;
  734. margin: -190rpx 20rpx 20rpx;
  735. border-radius: 24rpx;
  736. padding: 30rpx;
  737. }
  738. .wallet-header {
  739. display: flex;
  740. justify-content: space-between;
  741. align-items: center;
  742. margin-bottom: 20rpx;
  743. }
  744. .wallet-title {
  745. font-size: 28rpx;
  746. color: #333;
  747. }
  748. .transaction-detail {
  749. color: #666;
  750. font-size: 24rpx;
  751. display: flex;
  752. align-items: center;
  753. }
  754. .balance {
  755. font-size: 48rpx;
  756. font-weight: bold;
  757. text-align: center;
  758. margin: 10rpx 0;
  759. color: #333;
  760. }
  761. .assets {
  762. display: flex;
  763. justify-content: space-between;
  764. align-items: center;
  765. margin-top: 40rpx;
  766. flex-wrap: nowrap; /* 确保不换行 */
  767. }
  768. .asset-container {
  769. display: flex;
  770. align-items: center;
  771. flex: 1;
  772. justify-content: center;
  773. position: relative;
  774. }
  775. .asset-item {
  776. display: flex;
  777. flex-direction: column;
  778. align-items: center;
  779. flex: 1;
  780. padding: 0 20rpx;
  781. }
  782. .asset-name {
  783. font-size: 24rpx;
  784. color: #333;
  785. margin-bottom: 16rpx;
  786. text-align: center;
  787. }
  788. .asset-amount {
  789. font-size: 40rpx;
  790. font-weight: bold;
  791. color: #333;
  792. text-align: center;
  793. }
  794. .wallet-actions {
  795. display: flex;
  796. justify-content: space-between;
  797. margin-top: 50rpx;
  798. }
  799. .wallet-btn {
  800. flex: 1;
  801. text-align: center;
  802. height: 88rpx;
  803. line-height: 88rpx;
  804. margin: 0 10rpx;
  805. border-radius: 16rpx;
  806. font-size: 32rpx;
  807. }
  808. .recharge {
  809. background: #f8c008;
  810. color: #333;
  811. }
  812. .withdraw {
  813. background: rgba(248, 192, 8, 0.1);
  814. color: #333;
  815. }
  816. /* 功能入口 */
  817. .function-grid {
  818. background: #fff;
  819. margin: 30rpx;
  820. border-radius: 24rpx;
  821. padding: 40rpx;
  822. }
  823. .functions {
  824. display: grid;
  825. grid-template-columns: repeat(4, 1fr);
  826. gap: 40rpx;
  827. margin-top: 40rpx;
  828. }
  829. .function-item {
  830. text-align: center;
  831. }
  832. .function-icon {
  833. .img {
  834. width: 60rpx;
  835. height: 60rpx;
  836. }
  837. }
  838. .function-name {
  839. font-size: 24rpx;
  840. color: #333;
  841. }
  842. /* 最近访问 */
  843. .recent-visit,
  844. .order-section,
  845. .common-functions {
  846. background: #fff;
  847. margin: 20rpx;
  848. border-radius: 16rpx;
  849. padding: 30rpx;
  850. }
  851. .section-header {
  852. display: flex;
  853. justify-content: space-between;
  854. align-items: center;
  855. margin-bottom: 30rpx;
  856. }
  857. .section-title {
  858. font-size: 32rpx;
  859. color: #333;
  860. }
  861. .more {
  862. font-size: 24rpx;
  863. color: #666;
  864. }
  865. .store-item {
  866. display: flex;
  867. align-items: center;
  868. justify-content: flex-start;
  869. padding: 20rpx;
  870. border-bottom: 2rpx solid #f0f0f0;
  871. background-color: #f9f7f0;
  872. border-radius: 16rpx;
  873. }
  874. .store-item:last-child {
  875. border-bottom: none;
  876. }
  877. .store-logo {
  878. .img {
  879. width: 100rpx;
  880. height: 100rpx;
  881. border-radius: 16rpx;
  882. margin-right: 30rpx;
  883. }
  884. }
  885. .store-name {
  886. font-size: 32rpx;
  887. color: #333;
  888. margin-bottom: 20rpx;
  889. display: block;
  890. }
  891. .store-desc {
  892. font-size: 24rpx;
  893. color: #666;
  894. display: block;
  895. }
  896. /* 订单状态 */
  897. .order-status {
  898. display: flex;
  899. justify-content: space-between;
  900. }
  901. .status-item {
  902. text-align: center;
  903. flex: 1;
  904. }
  905. .status-icon {
  906. .img {
  907. width: 60rpx;
  908. height: 60rpx;
  909. }
  910. }
  911. .status-name {
  912. font-size: 24rpx;
  913. color: #333;
  914. }
  915. /* 常用功能 */
  916. .common-functions .functions {
  917. grid-template-columns: repeat(4, 1fr);
  918. }
  919. .page-title {
  920. font-size: 36rpx;
  921. color: #333;
  922. }
  923. .callService {
  924. padding: 20px 10px 0px;
  925. // background-color: #ddcca3;
  926. display: flex;
  927. justify-content: center;
  928. flex-direction: column;
  929. font-size: 16px;
  930. margin-bottom: 30rpx;
  931. .list-box {
  932. background: #fff;
  933. border-radius: 20px;
  934. .list-item {
  935. width: 100%;
  936. height: 100rpx;
  937. display: flex;
  938. justify-content: center;
  939. align-items: center;
  940. border-bottom: 1px solid #e1e1e1;
  941. }
  942. }
  943. }
  944. </style>