index.vue 24 KB

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