index.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193
  1. <template>
  2. <view class="app-page">
  3. <view class="top-bar-view">
  4. <view class="top-bg" :style="{background: bgImg ? null : 'linear-gradient(138deg, #ffecaf 0%, #fbf5e3 59%, #f5f6f8 100%)',
  5. opacity: '0.8'}">
  6. <image v-if="bgImg" style="width: 100%;display: block;" mode="widthFix" :src="bgImg"></image>
  7. </view>
  8. <view class="top-box">
  9. <view class="top-bar" :style="
  10. 'height:' +
  11. topData.height +
  12. 'px;' +
  13. 'padding-top:' +
  14. topData.top +
  15. 'px;padding-bottom:20rpx'
  16. ">
  17. </view>
  18. <view class="display-flex-between">
  19. <view class="login-box" @click="checkShowUserRegister()">
  20. <view class="avatar-wrap">
  21. <u--image width="126rpx" height="126rpx" radius="100%" shape="circle" bgColor="#d3c6b5"
  22. customStyle="border-radius:100%;" :src="
  23. avatarUrl != defaultAvatarUrl
  24. ? avatarUrl
  25. : `/static/defaultAvatar.png`
  26. " :fade="true" duration="450"></u--image>
  27. </view>
  28. <view class="user-info-wrap">
  29. <view class="userName-wrap">
  30. <text class="userName display-flex-content-center">{{
  31. userName ? userName : "登录/注册"
  32. }}
  33. </text>
  34. <u-icon
  35. name="edit-pen"
  36. size="20"
  37. ></u-icon>
  38. </view>
  39. <view class="vip-tag"
  40. :style="{background: `url(${user_grade_bg}) no-repeat center left`,marginTop:'8rpx',width:'96rpx',height:'32rpx', backgroundSize: '96rpx 32rpx',}">
  41. <!-- <view class="vip-text">{{userInfo.vip_name}}</view>-->
  42. </view>
  43. <text class="user-phone">{{ userInfo.phone }}</text>
  44. </view>
  45. </view>
  46. <view class="login-box pdt0">
  47. <view @click="JumpSetting()">
  48. <view class="mb5 display-flex-end">
  49. <u-icon
  50. name="setting"
  51. size="26"
  52. ></u-icon>
  53. </view>
  54. <view class="info-list" style="color: #999"
  55. v-if="userInfo.pid &&userInfo.agent && userInfo.agent.username ">
  56. <text>推荐人:{{ userInfo.agent.username }}</text>
  57. </view>
  58. <view class="info-list">
  59. <text>积分:
  60. <text class="info-list-rebate_total">{{ userInfo.integral_total - userInfo.integral_used }}</text>
  61. </text>
  62. </view>
  63. <view class="info-list">
  64. <text>余额:
  65. <text class="info-list-rebate_total">{{ userInfo.rebate_total - userInfo.rebate_used }}</text>
  66. </text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <view class="jion-vip-wrap" @click="checkShowUserRegister()"
  72. :style="{backgroundImage: `url(${jion_vip_bg})`}">
  73. <view class="title">
  74. 开通服务专享产品权益
  75. </view>
  76. <view class="title">
  77. 开通会员
  78. </view>
  79. </view>
  80. <view class="orders-info-card">
  81. <view class="orders-card">
  82. <view class="card-title">
  83. <text>商城订单</text>
  84. <view class="right" @click="toOrderList(0)">查看全部订单
  85. <view class="ml5">
  86. <u-icon name="arrow-right" size="13"
  87. color="#858585"></u-icon>
  88. </view>
  89. </view>
  90. </view>
  91. <u-line color="#F4F4F4"></u-line>
  92. <view class="menu-box">
  93. <view class="menu-item" @click="toOrderList(item.index)" v-for="(item, index) in shopList">
  94. <view style="position: relative;">
  95. <image :src="item.url" mode="heightFix"></image>
  96. <u-badge :absolute="true" :offset="[-5,-10]" :value="orderNumber[item.numKey]">
  97. </u-badge>
  98. </view>
  99. <text>{{ item.name }}</text>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="member-other-card">
  105. <view v-for="(item, index) in otherList" :key="index"
  106. @click="goToPath(item)">
  107. <u-line color="#E8E8E8"></u-line>
  108. <view class="display-flex-between">
  109. <view class="mt15 mb15 display-flex-content-center" :style="[getKefuStyle(item)]">
  110. <image :src="item.url" class="mr12" mode="heightFix" style="width: 36rpx;height: 36rpx"></image>
  111. <text class="member-other-card-name">{{ item.name }}</text>
  112. <button style="position: absolute;width: 690rpx;height:108rpx;z-index: 999;opacity: 0;;left: 10px"
  113. v-if="item.value == 'concat'" open-type="contact" @contact="contact"></button>
  114. </view>
  115. <view>
  116. <u-icon name="arrow-right" bold color="#333333" size="14"></u-icon>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. <!-- <view class="member-info-card">-->
  122. <!-- <view class="member-card">-->
  123. <!-- <text class="card-title">分销商</text>-->
  124. <!-- <u-line color="#F4F4F4"></u-line>-->
  125. <!-- <view class="menu-box">-->
  126. <!-- <view class="menu-item" @click="goToPath(item)" v-for="(item, index) in menuList">-->
  127. <!-- <view class="menu-item-bgColor">-->
  128. <!-- <image :src="item.url" mode="heightFix"></image>-->
  129. <!-- <text>{{ item.name }}</text>-->
  130. <!-- </view>-->
  131. <!-- </view>-->
  132. <!-- </view>-->
  133. <!-- </view>-->
  134. <!-- </view>-->
  135. </view>
  136. </view>
  137. <u-popup :show="showUserRegister" @close="showUserRegister = false" round="18rpx">
  138. <form v-if="!isUserRegister" @submit="saveUserData">
  139. <view class="m-content-view">
  140. <text class="top-view"> {{ shopName }}</text>
  141. <text class="tips">请您授权头像昵称信息,您授权的信息将受到严格保护,请放心使用。</text>
  142. <button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"
  143. style="border: 0">
  144. <u--image v-if="avatarUrl !== defaultAvatarUrl" width="149rpx" height="149rpx" radius="100%"
  145. shape="circle" :src="avatarUrl" :fade="true" duration="450" mode="heightFix"></u--image>
  146. <view class="v1" v-else>
  147. <u--image width="80rpx" height="80rpx" radius="100%" shape="circle" :src="avatarUrl"
  148. :fade="true" duration="450" mode="heightFix"></u--image>
  149. <text v-if="avatarUrl === defaultAvatarUrl">获取头像</text>
  150. </view>
  151. </button>
  152. <input name="nickname" v-model="userName" type="nickname" class="m-input" placeholder="请输入昵称"/>
  153. <button class="red-btn" form-type="submit">确认授权</button>
  154. </view>
  155. </form>
  156. </u-popup>
  157. <tabbarCom current="4"></tabbarCom>
  158. </view>
  159. </template>
  160. <script>
  161. import tabbarCom from "@/components/tabbar/tabbar.vue"
  162. import {
  163. uploadBase64File,
  164. getNewRemindCnt,
  165. addAddress,
  166. } from "@/common/api/common.js";
  167. import {
  168. getOrderList
  169. } from "@/common/api/order.js";
  170. import {
  171. updateUserInfo,
  172. getUserInfo,
  173. userBindNickname
  174. } from "@/common/api/user.js";
  175. const defaultAvatarUrl =
  176. "https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0";
  177. import $C from "@/common/utils/config.js";
  178. export default {
  179. components: {
  180. tabbarCom
  181. },
  182. data() {
  183. return {
  184. topData: {
  185. top: 0,
  186. height: 0,
  187. },
  188. shopName: "六感熟眠商城",
  189. bgImg: null,
  190. jion_vip_bg: 'https://work.hkmop.com/static/imgs/jion_vip_bg.png',
  191. user_grade_bg: '', //#f4c530
  192. tips: "登录/注册",
  193. defaultAvatarUrl,
  194. avatarUrl: defaultAvatarUrl,
  195. isUserRegister: false,
  196. showUserRegister: false,
  197. userName: "",
  198. userInfo: undefined,
  199. badgeValue: 0,
  200. userData: {},
  201. newRemindCnt: 0,
  202. orderNumber: {},
  203. menuList: [{
  204. name: "推广海报",
  205. url: require("@/static/ic-menu-a.png"),
  206. path: "/subPages/poster/poster",
  207. isVip: true
  208. },
  209. {
  210. name: "我的团队",
  211. url: require("@/static/ic-menu-b.png"),
  212. path: "/subPages/myTeam/myTeam",
  213. isVip: true
  214. },
  215. {
  216. name: "分销订单",
  217. url: require("@/static/ic-menu-c.png"),
  218. path: "/subPages/distribution/distribution",
  219. isVip: true
  220. },
  221. {
  222. name: "提现记录",
  223. url: require("@/static/ic-menu-d.png"),
  224. path: "/subPages/withdrawalManagement/withdrawalManagement",
  225. isVip: true
  226. },
  227. {
  228. name: "提现",
  229. url: require("@/static/ic-menu-e.png"),
  230. path: "/subPages/applyWithdrawal/applyWithdrawal",
  231. isVip: true
  232. },
  233. ],
  234. shopList: [{
  235. name: "待付款",
  236. url: require("@/static/ic-shop-a.png"),
  237. value: '1,2',
  238. index: 1,
  239. numKey: 'toPay'
  240. },
  241. {
  242. name: "待发货",
  243. url: require("@/static/ic-shop-b.png"),
  244. value: '3',
  245. index: 2,
  246. numKey: 'toSend'
  247. },
  248. {
  249. name: "待收货",
  250. url: require("@/static/ic-shop-c.png"),
  251. value: '4',
  252. index: 3,
  253. numKey: 'toConfirm'
  254. },
  255. {
  256. name: "已完成",
  257. url: require("@/static/ic-shop-d.png"),
  258. value: '6,9',
  259. index: 4,
  260. numKey: 'complate'
  261. },
  262. {
  263. name: "退款/售后",
  264. url: require("@/static/ic-shop-e.png"),
  265. index: 5,
  266. numKey: 'afterSales'
  267. },
  268. ],
  269. otherList: [
  270. {
  271. name: "我的活动",
  272. url: require("@/static/ic-other-h.png"),
  273. path: "/subPages/myOrder/myActivityOrder",
  274. isVip: true
  275. },
  276. {
  277. name: "线下消费记录",
  278. url: require("@/static/ic-other-i.png"),
  279. path: "/subPages/storeConsumption/storeConsumptionOrder",
  280. isVip: true
  281. },
  282. // {
  283. // name: "线下消费记录",
  284. // url: require("@/static/ic-other-i.png"),
  285. // path: "/subPages/storeConsumption/storeConsumption?orderNo=SP2025051517460011",
  286. // isVip: true
  287. // },
  288. {
  289. name: "课程订单",
  290. url: require("@/static/ic-other-f.png"),
  291. path: "/subPages/myOrder/myCourseOrder",
  292. isVip: true
  293. },
  294. {
  295. name: "服务预约",
  296. url: require("@/static/ic-other-g.png"),
  297. path: "/subPages/myOrder/myServerOrder",
  298. isVip: true
  299. },
  300. {
  301. name: "优惠券",
  302. url: require("@/static/ic-other-a.png"),
  303. path: "/subPages/coupon/coupon",
  304. isVip: true
  305. },
  306. {
  307. name: "地址管理",
  308. url: require("@/static/ic-other-b.png"),
  309. path: "/subPages/addressMg/addressMg",
  310. isVip: true
  311. },
  312. {
  313. name: "我的收藏",
  314. url: require("@/static/ic-other-cooprule.png"),
  315. path: "/subPages/collectList/collectList",
  316. isVip: true
  317. },
  318. {
  319. name: "帮助中心",
  320. url: require("@/static/ic-other-c.png"),
  321. path: "/subPages/helpCenter/helpCenter",
  322. },
  323. {
  324. name: "关于我们",
  325. url: require("@/static/ic-other-d.png"),
  326. path: "/pages/singlePage/index?name=3",
  327. },
  328. {
  329. name: "在线客服",
  330. url: require("@/static/ic-other-e.png"),
  331. value: 'concat'
  332. },
  333. ],
  334. };
  335. },
  336. computed: {
  337. displayBalance() {
  338. const {
  339. balance_total,
  340. balance_used
  341. } = this.userInfo || {};
  342. return balance_total - balance_used;
  343. },
  344. },
  345. created() {
  346. const configs = uni.getStorageSync("configs");
  347. if (configs) {
  348. this.shopName = configs.shop_name
  349. this.bgImg = configs.ucenter_bg
  350. this.jion_vip_bg = configs.user_in_bg
  351. this.user_grade_bg = configs.user_grade_bg
  352. }
  353. },
  354. mounted() {
  355. },
  356. //发送给朋友
  357. onShareAppMessage(res) {
  358. let configs = uni.getStorageSync('configs') || {}
  359. return {
  360. title: configs.shop_share_title,
  361. imageUrl: configs.shop_share_img,
  362. path: `/pages/home/dashboard/index?id=${
  363. JSON.parse(uni.getStorageSync("userInfo")).id
  364. }`,
  365. };
  366. },
  367. // 分享到朋友圈
  368. onShareTimeline() {
  369. let configs = uni.getStorageSync('configs') || {}
  370. return {
  371. title: configs.shop_share_title,
  372. imageUrl: configs.shop_share_img,
  373. path: `/pages/home/dashboard/index?id=${
  374. JSON.parse(uni.getStorageSync("userInfo")).id
  375. }`
  376. };
  377. },
  378. onShow() {
  379. const topData = uni.getMenuButtonBoundingClientRect();
  380. this.topData.top = topData.top;
  381. this.topData.height = topData.height;
  382. this.reUserInfo();
  383. this.getUserInfo();
  384. // this.getOrderListCount()
  385. },
  386. methods: {
  387. contact(res) {
  388. console.log(345555, res)
  389. },
  390. getOrderStatics() {
  391. this.$api.getOrderStatics({goods_kind:'线上商品'}).then(res => {
  392. const {
  393. t1 = 0, t2 = 0, t3 = 0, t4 = 0, t6 = 0, t9 = 0
  394. } = res.data
  395. this.orderNumber = {
  396. toPay: t1 + t2,
  397. toSend: t3,
  398. toConfirm: t4,
  399. complate: t6 + t9,
  400. afterSales: res.data.t - 1 + res.data.t - 2,
  401. }
  402. })
  403. },
  404. getKefuStyle(item){
  405. if(item.value == 'concat'){
  406. return {
  407. display: "relative",
  408. }
  409. }
  410. },
  411. checkShowUserRegister() {
  412. if (!this.isUserRegister) {
  413. this.showUserRegister = true;
  414. return true;
  415. } else {
  416. // if (this.userInfo.vip_code && this.userInfo.vip_code != "0") {
  417. // this.toSubPages("personalDataManagement");
  418. // } else {
  419. // this.toSubPages("register");
  420. //
  421. // }
  422. this.toSubPages("personalDataManagement");
  423. return false;
  424. }
  425. },
  426. JumpSetting() {
  427. this.toSubPages("setting");
  428. },
  429. reUserInfo() {
  430. const userInfo = uni.getStorageSync("userInfo");
  431. if (
  432. userInfo &&
  433. JSON.parse(userInfo).nickname != "" &&
  434. JSON.parse(userInfo).headimg != ""
  435. ) {
  436. this.userInfo = JSON.parse(userInfo);
  437. this.avatarUrl = this.userInfo.headimg;
  438. this.userName = this.userInfo.nickname;
  439. this.isUserRegister = true;
  440. this.getOrderStatics()
  441. } else {
  442. this.isUserRegister = false;
  443. }
  444. },
  445. toOrderList(str = 0) {
  446. if (!this.isUserRegister) {
  447. this.showUserRegister = true;
  448. return true;
  449. }
  450. uni.setStorageSync("orderIndex", str);
  451. uni.navigateTo({
  452. url: "/subPages/myOrder/myOrder",
  453. });
  454. },
  455. goToPath(item) {
  456. if (item.isVip) {
  457. if (!this.isUserRegister) {
  458. this.showUserRegister = true;
  459. return true;
  460. }
  461. }
  462. if (!item.path) {
  463. return;
  464. }
  465. uni.navigateTo({
  466. url: item.path,
  467. });
  468. },
  469. toSubPages(index) {
  470. uni.navigateTo({
  471. url: `/subPages/${index}/index`,
  472. });
  473. },
  474. // 获取未支付数量
  475. getOrderListCount() {
  476. uni.showLoading();
  477. const data = {
  478. status: 2,
  479. page: this.page,
  480. limit: this.limit,
  481. };
  482. getOrderList(data)
  483. .then((res) => {
  484. uni.hideLoading();
  485. console.log("getOrderList==>", res.data.list);
  486. if (res.data) {
  487. this.badgeValue = res.data.page.total;
  488. }
  489. })
  490. .catch(() => {
  491. uni.hideLoading();
  492. });
  493. },
  494. bindNickname(url) {
  495. this.isUserRegister = true;
  496. this.showUserRegister = false;
  497. const data = {
  498. nickname: this.userName,
  499. username: this.userName,
  500. headimg: url,
  501. };
  502. userBindNickname(data).then((res) => {
  503. console.log("绑定昵称等==>", res.data);
  504. if (res.data) {
  505. uni.setStorageSync("token", res.data.token.token);
  506. if (!res.data.headimg) {
  507. res.data.headimg = url;
  508. }
  509. uni.setStorageSync("userInfo", JSON.stringify(res.data));
  510. this.isUserRegister = true;
  511. this.showUserRegister = false;
  512. this.toSubPages("register");
  513. }
  514. });
  515. },
  516. addAddress(addressData) {
  517. this.isUserRegister = true;
  518. this.showUserRegister = false;
  519. const data = {
  520. type: 1,
  521. name: addressData.userName,
  522. phone: addressData.telNumber,
  523. province: addressData.provinceName,
  524. city: addressData.cityName,
  525. area: addressData.countyName,
  526. address: addressData.detailInfo,
  527. };
  528. addAddress(data).then((res) => {
  529. console.log("addAddress==>", res.data);
  530. if (res.data) {
  531. uni.showToast({
  532. title: "添加成功",
  533. success: (res) => {
  534. },
  535. });
  536. }
  537. });
  538. },
  539. async getUserInfo() {
  540. const data = {};
  541. await getUserInfo(data)
  542. .then((res) => {
  543. if (res.data) {
  544. // uni.clearStorageSync()
  545. uni.setStorageSync("token", res.data.token.token);
  546. uni.setStorageSync("userInfo", JSON.stringify(res.data));
  547. this.userInfo = res.data;
  548. console.log("getUserInfo==>", this.userInfo);
  549. }
  550. })
  551. .catch(() => {
  552. uni.hideLoading();
  553. });
  554. await this.reUserInfo();
  555. },
  556. getNewRemindCnt() {
  557. const data = {};
  558. getNewRemindCnt(data)
  559. .then((res) => {
  560. console.log("getNewRemindCnt==>", res.data);
  561. // if (res.data) {
  562. this.newRemindCnt = res.data || 0;
  563. // }
  564. })
  565. .catch(() => {
  566. uni.hideLoading();
  567. });
  568. },
  569. onChooseAvatar(e) {
  570. const {
  571. avatarUrl
  572. } = e.detail;
  573. console.log("成功授权", avatarUrl);
  574. this.avatarUrl = avatarUrl;
  575. },
  576. saveUserData(e) {
  577. console.log(e.detail.value.nickname);
  578. if (
  579. this.avatarUrl === this.defaultAvatarUrl ||
  580. !e.detail.value.nickname
  581. ) {
  582. uni.showToast({
  583. icon: "none",
  584. title: "请先授权完善信息",
  585. });
  586. return;
  587. }
  588. this.userName = e.detail.value.nickname;
  589. this.showUserRegister = false;
  590. this.getImageInfo();
  591. },
  592. getImageInfo() {
  593. // 获取当前图片信息
  594. uni.getImageInfo({
  595. src: this.avatarUrl,
  596. success: (image) => {
  597. // 做png/jpeg的类型判断————对不同类型的图像添加不同的转换头信息
  598. if (image.type == "png" || image.type == "jpeg") {
  599. // 对符合类型的图片转换为base64类型
  600. uni.getFileSystemManager().readFile({
  601. // 【重点来啦】人家自提供的转码API
  602. filePath: image.path, // 所需转码图像路径
  603. encoding: "base64", // 转码类型
  604. success: (res) => {
  605. // 生成base64
  606. let imageBase64 =
  607. "data:image/" + image.type + ";base64," + res.data;
  608. console.log("转base64后:", imageBase64);
  609. this.uploadBase64File(imageBase64);
  610. },
  611. });
  612. } else {
  613. // 友好一点,不是以上类型做出提醒
  614. uni.showToast({
  615. title: "当前只支持png/jpeg格式",
  616. duration: 2500,
  617. icon: "none",
  618. });
  619. }
  620. },
  621. });
  622. },
  623. uploadBase64File(imageBase64) {
  624. uploadBase64File({
  625. base64: imageBase64,
  626. }, {
  627. "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
  628. })
  629. .then((res) => {
  630. console.log("uploadFile==>", res.data.url);
  631. this.avatarUrl = res.data.url;
  632. this.bindNickname(res.data.url);
  633. })
  634. .catch(() => {
  635. uni.hideLoading();
  636. });
  637. },
  638. },
  639. };
  640. </script>
  641. <style lang="scss" scoped>
  642. .app-page {
  643. width: 100%;
  644. display: flex;
  645. flex-direction: column;
  646. }
  647. .top-bg {
  648. width: 750rpx;
  649. height: 634rpx;
  650. overflow: hidden;
  651. }
  652. .not-regis-box,
  653. .regis-box {
  654. margin-left: 20rpx;
  655. margin-top: 7rpx;
  656. height: 36rpx;
  657. line-height: 36rpx;
  658. padding: 0 10rpx;
  659. font-size: 22rpx;
  660. font-weight: bold;
  661. color: #9a9a9a;
  662. background: #e3e3e3;
  663. border-radius: 7rpx;
  664. display: inline-flex;
  665. align-items: center;
  666. .user-name-text {
  667. margin-left: 6rpx;
  668. }
  669. }
  670. .regis-box {
  671. background: rgba(231, 224, 255, 0.85);
  672. color: #815bff;
  673. }
  674. .top-bar-view {
  675. width: 100%;
  676. position: relative;
  677. display: flex;
  678. align-items: center;
  679. flex-direction: column;
  680. }
  681. .top-box {
  682. position: absolute;
  683. left: 0;
  684. top: 0;
  685. right: 0;
  686. display: flex;
  687. flex-direction: column;
  688. }
  689. .top-bar {
  690. width: 100%;
  691. display: flex;
  692. justify-content: center;
  693. align-items: center;
  694. flex-direction: row;
  695. }
  696. .m-content-view {
  697. width: 100%;
  698. display: flex;
  699. align-items: center;
  700. flex-direction: column;
  701. background-color: #f7f7f7;
  702. border-radius: 24rpx 24rpx 0 0;
  703. }
  704. .top-view {
  705. font-size: 32rpx;
  706. font-family: PingFangSC-Medium, PingFang SC;
  707. font-weight: 500;
  708. color: #1d161f;
  709. line-height: 34rpx;
  710. text-align: left;
  711. margin: 55rpx 49rpx 0;
  712. width: calc(100% - 98rpx);
  713. }
  714. .tips {
  715. font-size: 26rpx;
  716. font-weight: 400;
  717. color: #858585;
  718. line-height: 34rpx;
  719. margin: 21rpx 49rpx 0;
  720. }
  721. .red-btn {
  722. color: white;
  723. background: #f39800;
  724. width: calc(100% - 98rpx);
  725. margin-top: 52rpx;
  726. margin-bottom: 52rpx;
  727. font-size: 32rpx;
  728. line-height: 84rpx;
  729. border-radius: 40rpx;
  730. text-align: center;
  731. }
  732. .red-btn:active {
  733. opacity: 0.7;
  734. }
  735. .v1 {
  736. height: 149rpx;
  737. width: 149rpx;
  738. display: flex;
  739. flex-direction: column;
  740. background: rgba(244, 244, 246, 1);
  741. border-radius: 100%;
  742. align-items: center;
  743. justify-content: center;
  744. }
  745. .avatar-wrapper {
  746. margin-top: 26rpx;
  747. }
  748. .avatar-wrapper button::before {
  749. padding: 0;
  750. border-radius: 20rpx;
  751. border: 0;
  752. }
  753. .avatar {
  754. height: 100rpx;
  755. width: 100rpx;
  756. }
  757. .v1 text {
  758. font-size: 22rpx;
  759. margin-top: -16rpx;
  760. }
  761. // 去掉烦人的边框
  762. button::after {
  763. border: 0; // 或者 border: none;
  764. }
  765. .m-input {
  766. width: calc(100% - 138rpx);
  767. line-height: 117rpx;
  768. padding: 0 20rpx;
  769. margin-top: 44rpx;
  770. background: #ffffff;
  771. border-radius: 15rpx;
  772. height: 117rpx;
  773. }
  774. .mine-box {
  775. width: 100%;
  776. display: flex;
  777. flex-direction: column;
  778. position: relative;
  779. }
  780. .mine-bg {
  781. width: 100%;
  782. display: block;
  783. height: 1334rpx;
  784. }
  785. .mine-view {
  786. left: 0;
  787. top: 0;
  788. right: 0;
  789. width: 100%;
  790. display: flex;
  791. flex-direction: column;
  792. position: absolute;
  793. }
  794. .top-title-view {
  795. display: flex;
  796. width: 100%;
  797. flex-direction: row;
  798. align-items: center;
  799. }
  800. .login-box {
  801. display: flex;
  802. flex-direction: row;
  803. align-items: center;
  804. padding: 10px 30rpx 0;
  805. }
  806. .avatar-wrap {
  807. position: relative;
  808. .vip-tag {
  809. display: flex;
  810. align-items: center;
  811. margin-top: 8rpx;
  812. .vip-text {
  813. font-size: 20rpx;
  814. font-weight: 500;
  815. margin-left: 34rpx;
  816. color: #632400;
  817. width: 122rpx;
  818. line-height: 38rpx;
  819. text-align: center;
  820. border-radius: 0rpx 20rpx 20rpx 0rpx;
  821. }
  822. }
  823. }
  824. .user-info-wrap {
  825. flex: 1;
  826. margin-left: 28rpx;
  827. .userName-wrap {
  828. display: flex;
  829. align-items: center;
  830. font-weight: 400;
  831. font-size: 28rpx;
  832. color: #333333;
  833. line-height: 44rpx;
  834. text-align: left;
  835. font-style: normal;
  836. text-transform: none;
  837. }
  838. }
  839. .userName-box {
  840. display: flex;
  841. flex-direction: row;
  842. align-items: center;
  843. justify-content: flex-start;
  844. }
  845. .userName {
  846. font-size: 28rpx;
  847. // margin-left: 26rpx;
  848. font-family: PingFang;
  849. font-weight: 600;
  850. color: #333333;
  851. line-height: 44rpx;
  852. text-align: left;
  853. font-style: normal;
  854. text-transform: none;
  855. }
  856. .info-list text {
  857. margin-top: 10rpx;
  858. font-size: 22rpx;
  859. // margin-left: 26rpx;
  860. font-family: PingFang;
  861. font-weight: 400;
  862. color: #333333;
  863. line-height: 40rpx;
  864. text-align: left;
  865. font-style: normal;
  866. text-transform: none;
  867. }
  868. .info-list-rebate_total {
  869. //font-family: Aoboshi One, Aoboshi One!important;
  870. //color: #512C19!important;
  871. //line-height: 40rpx!important;
  872. //text-align: left!important;
  873. //font-style: normal!important;
  874. //text-transform: none!important;
  875. //font-weight: 700!important;
  876. //font-size: 40rpx!important;
  877. }
  878. .user-phone {
  879. margin-top: 8rpx;
  880. font-size: 22rpx;
  881. // margin-left: 26rpx;
  882. font-family: PingFang;
  883. font-weight: 400;
  884. color: #333333;
  885. line-height: 28rpx;
  886. text-align: left;
  887. font-style: normal;
  888. text-transform: none;
  889. }
  890. .right-box {
  891. padding-right: 56rpx;
  892. position: relative;
  893. }
  894. .jion-vip-wrap {
  895. background-size: 100% 100%;
  896. display: flex;
  897. justify-content: space-between;
  898. align-items: center;
  899. height: 128rpx;
  900. margin: 40rpx 30rpx 0rpx;
  901. padding: 0 96rpx 0 84rpx;
  902. .title {
  903. font-family: 苹方-Regular, 苹方;
  904. font-weight: 700;
  905. font-size: 28rpx;
  906. color: #512C19;
  907. line-height: 40rpx;
  908. text-align: left;
  909. font-style: normal;
  910. text-transform: none;
  911. }
  912. .docs {
  913. font-family: PingFang SC-Medium, PingFang SC;
  914. font-weight: 400;
  915. font-size: 24rpx;
  916. color: #512C19;
  917. line-height: 36rpx;
  918. text-align: right;
  919. font-style: normal;
  920. text-transform: none;
  921. }
  922. }
  923. .kthy {
  924. flex: 1;
  925. font-size: 26rpx;
  926. font-family: PingFang;
  927. font-weight: 400;
  928. color: #000000;
  929. }
  930. .kthy-btn {
  931. width: 106rpx;
  932. height: 40rpx;
  933. border: 1rpx solid #000000;
  934. border-radius: 4rpx;
  935. font-size: 22rpx;
  936. font-family: PingFang;
  937. font-weight: 400;
  938. color: #010101;
  939. text-align: center;
  940. margin-right: 20rpx;
  941. line-height: 40rpx;
  942. }
  943. .card-box {
  944. width: 690rpx;
  945. margin: 20rpx auto 0 auto;
  946. background: #ffffff;
  947. border-radius: 21rpx;
  948. display: flex;
  949. flex-direction: column;
  950. }
  951. .bottom-item {
  952. width: 100%;
  953. display: flex;
  954. flex-direction: column;
  955. position: relative;
  956. .bottom-item-h {
  957. width: 100%;
  958. display: flex;
  959. flex-direction: row;
  960. text {
  961. flex: 1;
  962. font-size: 26rpx;
  963. margin: 30rpx 40rpx;
  964. font-family: PingFang;
  965. font-weight: 400;
  966. color: #333333;
  967. line-height: 28rpx;
  968. }
  969. }
  970. }
  971. .orders-info-card {
  972. width: 650rpx;
  973. padding: 0 20rpx;
  974. margin: 25rpx auto 0;
  975. border-radius: 18rpx;
  976. overflow: hidden;
  977. display: flex;
  978. flex-direction: column;
  979. background-color: #FFFFFF;
  980. .orders-card {
  981. width: 650rpx;
  982. height: 273rpx;
  983. background: #ffffff;
  984. display: flex;
  985. flex-direction: column;
  986. border-radius: 18rpx 18rpx 18rpx 18rpx;
  987. .card-title {
  988. display: flex;
  989. align-items: center;
  990. justify-content: space-between;
  991. .right {
  992. display: flex;
  993. align-items: center;
  994. font-size: 24rpx;
  995. font-weight: 400;
  996. color: #858585;
  997. line-height: 1;
  998. }
  999. }
  1000. .menu-box {
  1001. flex: 1;
  1002. width: 100%;
  1003. display: flex;
  1004. flex-direction: row;
  1005. align-items: center;
  1006. .menu-item {
  1007. flex: 1;
  1008. height: 100%;
  1009. display: flex;
  1010. flex-direction: column;
  1011. align-items: center;
  1012. justify-content: center;
  1013. position: relative;
  1014. image {
  1015. width: 46rpx;
  1016. margin-bottom: 14rpx;
  1017. height: 46rpx;
  1018. }
  1019. text {
  1020. font-size: 26rpx;
  1021. font-family: PingFang SC-Medium, PingFang SC;
  1022. font-weight: 500;
  1023. color: #1d161f;
  1024. }
  1025. }
  1026. }
  1027. }
  1028. }
  1029. .member-info-card {
  1030. width: 650rpx;
  1031. padding: 0 20rpx;
  1032. margin: 0rpx auto 180rpx;
  1033. // height: 349rpx;
  1034. border-radius: 18rpx 18rpx 18rpx 18rpx;
  1035. overflow: hidden;
  1036. display: flex;
  1037. flex-direction: column;
  1038. background-color: #FFFFFF;
  1039. .member-card {
  1040. width: 650rpx;
  1041. height: 273rpx;
  1042. background: #ffffff;
  1043. display: flex;
  1044. flex-direction: column;
  1045. border-radius: 18rpx 18rpx 18rpx 18rpx;
  1046. .menu-box {
  1047. flex: 1;
  1048. width: 100%;
  1049. display: flex;
  1050. flex-direction: row;
  1051. align-items: center;
  1052. .menu-item {
  1053. flex: 1;
  1054. height: 100%;
  1055. display: flex;
  1056. flex-direction: column;
  1057. align-items: center;
  1058. justify-content: center;
  1059. position: relative;
  1060. &-bgColor{
  1061. height: 65%;
  1062. width: 85%;
  1063. background: #F6F7F9;
  1064. border-radius: 4rpx 4rpx 4rpx 4rpx;
  1065. display: flex;
  1066. flex-direction: column;
  1067. align-items: center;
  1068. justify-content: center;
  1069. image {
  1070. width: 36rpx;
  1071. margin-bottom: 14rpx;
  1072. height: 36rpx;
  1073. }
  1074. text {
  1075. font-family: PingFang SC, PingFang SC;
  1076. font-weight: 400;
  1077. font-size: 22rpx;
  1078. color: #333333;
  1079. line-height: 32rpx;
  1080. text-align: right;
  1081. font-style: normal;
  1082. text-transform: none;
  1083. }
  1084. }
  1085. }
  1086. }
  1087. }
  1088. }
  1089. .card-title {
  1090. font-size: 28rpx;
  1091. font-family: PingFang SC-Bold, PingFang SC;
  1092. font-weight: bold;
  1093. color: #1d161f;
  1094. padding-left: 10rpx;
  1095. line-height: 91rpx;
  1096. }
  1097. .member-other-card {
  1098. width: 650rpx;
  1099. // height: 273rpx;
  1100. margin: 20rpx auto 20rpx auto;
  1101. padding: 0 20rpx;
  1102. background: #ffffff;
  1103. display: flex;
  1104. flex-direction: column;
  1105. border-radius: 18rpx 18rpx 18rpx 18rpx;
  1106. &-name{
  1107. font-family: PingFang SC, PingFang SC;
  1108. font-weight: 400;
  1109. font-size: 28rpx;
  1110. color: #333333;
  1111. line-height: 48rpx;
  1112. text-align: left;
  1113. font-style: normal;
  1114. text-transform: none;
  1115. }
  1116. }
  1117. </style>