index.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587
  1. <template>
  2. <view class="new-users copy-data" :style="{height:pageHeight}">
  3. <view class="top" :style="colorStyle">
  4. <!-- #ifdef MP || APP-PLUS -->
  5. <view class="sys-head">
  6. <view class="sys-bar" :style="{height:sysHeight}"></view>
  7. <!-- #ifdef MP -->
  8. <view class="sys-title" :style="member_style==3?'color:#333':''">{{$t('个人中心')}}</view>
  9. <!-- #endif -->
  10. <view class="bg" :style="member_style==3?'background:#f5f5f5':''"></view>
  11. </view>
  12. <!-- #endif -->
  13. </view>
  14. <view class="mid" style="flex:1;overflow: hidden;" :style="colorStyle">
  15. <scroll-view scroll-y="true" style="height: 100%;">
  16. <view class="head">
  17. <view class="user-card" :class="member_style==3?'unBg':''">
  18. <view class="bg"></view>
  19. <view class="user-info">
  20. <view>
  21. <!-- 注释这个是加的bnt -->
  22. <!-- #ifdef H5 -->
  23. <button class="bntImg" v-if="userInfo.is_complete == 0 && isWeixin"
  24. @click="getWechatuserinfo">
  25. <image class="avatar" src='/static/images/f.png'></image>
  26. <view class="avatarName">{{$t('获取头像')}}</view>
  27. </button>
  28. <!-- #endif -->
  29. <!-- #ifdef MP -->
  30. <button class="bntImg" v-if="userInfo.is_complete == 0" @tap="getUserProfile">
  31. <image class="avatar" src='/static/images/f.png'></image>
  32. <view class="avatarName">{{$t('获取头像')}}</view>
  33. </button>
  34. <!-- #endif -->
  35. <!-- #ifndef APP-PLUS -->
  36. <view v-else class="avatar-box" :class="{on:userInfo.is_money_level}">
  37. <image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar"
  38. @click="goEdit()">
  39. </image>
  40. <image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()">
  41. </image>
  42. <view class="headwear" v-if="userInfo.is_money_level && userInfo.svip_open">
  43. <image src="/static/images/headwear.png"></image>
  44. </view>
  45. </view>
  46. <!-- #endif -->
  47. <!-- #ifdef APP-PLUS -->
  48. <view class="avatar-box" :class="{on:userInfo.is_money_level}">
  49. <image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar"
  50. @click="goEdit()">
  51. </image>
  52. <image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()">
  53. </image>
  54. <view class="headwear" v-if="userInfo.is_money_level && userInfo.svip_open">
  55. <image src="/static/images/headwear.png"></image>
  56. </view>
  57. </view>
  58. <!-- #endif -->
  59. </view>
  60. <view class="info">
  61. <!-- #ifdef MP -->
  62. <view class="name" v-if="!userInfo.uid" @click="openAuto"
  63. style="height: 100%; display: flex; align-items: center;">
  64. {{$t('请点击授权')}}
  65. </view>
  66. <!-- #endif -->
  67. <!-- #ifdef H5 -->
  68. <view class="name" v-if="!userInfo.uid && isWeixin" @click="openAuto"
  69. style="height: 100%; display: flex; align-items: center;">
  70. {{$t('请点击授权')}}
  71. </view>
  72. <!-- #endif -->
  73. <view class="name" v-if="userInfo.uid">
  74. {{userInfo.nickname}}
  75. <image class="live" :src="userInfo.vip_icon" v-if="userInfo.vip_icon"></image>
  76. <view class="vip" v-if="userInfo.is_money_level> 0 && userInfo.svip_open">
  77. <image src="/static/images/svip.png"></image>
  78. </view>
  79. </view>
  80. <view class="num" v-if="userInfo.phone" @click="goEdit()">
  81. <view class="num-txt">ID:{{userInfo.uid}}</view>
  82. <!-- <view class="icon">
  83. <image src="/static/images/edit.png" mode=""></image>
  84. </view> -->
  85. </view>
  86. <view class="phone" v-if="!userInfo.phone && isLogin" @tap="bindPhone">
  87. {{$t('绑定手机号')}}</view>
  88. </view>
  89. <view class="message">
  90. <navigator url="/pages/users/user_info/index" hover-class="none">
  91. <view class="iconfont icon-shezhi"></view>
  92. </navigator>
  93. </view>
  94. <view class="message">
  95. <navigator url="/pages/users/message_center/index" hover-class="none">
  96. <view v-if="userInfo.service_num" class="num">
  97. {{userInfo.service_num >= 100 ? '99+' : userInfo.service_num}}
  98. </view>
  99. <view class="iconfont icon-s-kefu"></view>
  100. </navigator>
  101. </view>
  102. <!-- #ifdef MP -->
  103. <!-- <view class="setting" @click="Setting"><text class="iconfont icon-shezhi"></text></view> -->
  104. <!-- #endif -->
  105. </view>
  106. <view class="num-wrapper">
  107. <view class="num-item" v-if="userInfo.balance_func_status"
  108. @click="goMenuPage('/pages/users/user_money/index')">
  109. <text class="num">{{userInfo.now_money || 0}}</text>
  110. <view class="txt">{{$t('余额')}}</view>
  111. </view>
  112. <view class="num-item" v-else
  113. @click="goMenuPage('/pages/users/user_goods_collection/index')">
  114. <text class="num">{{userInfo.collectCount || 0}}</text>
  115. <view class="txt">{{$t('收藏')}}</view>
  116. </view>
  117. <view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
  118. <text class="num">{{userInfo.couponCount || 0}}</text>
  119. <view class="txt">{{$t('优惠券')}}</view>
  120. </view>
  121. <view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
  122. <text class="num">{{userInfo.integral || 0}}</text>
  123. <view class="txt">{{$t('积分')}}</view>
  124. </view>
  125. </view>
  126. <!-- <view class="sign" @click="goSignIn">签到</view> -->
  127. <view class="cardVipA acea-row row-between-wrapper"
  128. v-if="userInfo.svip_open && member_style==1">
  129. <view class="left-box">
  130. <view v-if="userInfo.vip_status == 1" class="small">{{$t('永久')}}</view>
  131. <view v-else-if="userInfo.vip_status == 3" class="small">{{$t('会员到期')}}
  132. {{ userInfo.overdue_time | dateFormat }}
  133. </view>
  134. <view v-else-if="userInfo.vip_status == -1" class="small">{{$t('已过期')}}</view>
  135. <view v-else-if="userInfo.vip_status == 2" class="small">{{$t('未开通会员')}}
  136. </view>
  137. </view>
  138. <view class="acea-row row-middle">
  139. <navigator v-if="userInfo.vip_status == 1" url="/pages/annex/vip_paid/index"
  140. hover-class="none" class="btn">{{$t('查看会员权益')}}</navigator>
  141. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  142. {{ userInfo.overdue_time ? $t('立即续费') : $t('立即激活') }}
  143. </navigator>
  144. <text class="iconfont icon-xiangyou"></text>
  145. </view>
  146. </view>
  147. <view class="cardVipB acea-row row-between" v-if="userInfo.svip_open && member_style==3">
  148. <view class="left-box acea-row">
  149. <view class="pictrue">
  150. <image src="../../static/images/member01.png"></image>
  151. </view>
  152. <view v-if="userInfo.vip_status == 1" class="small">{{$t('永久')}}</view>
  153. <view v-else-if="userInfo.vip_status == 3" class="small">{{$t('会员到期')}}
  154. {{ userInfo.overdue_time | dateFormat }}
  155. </view>
  156. <view v-else-if="userInfo.vip_status == -1" class="small">{{$t('已过期')}}</view>
  157. <view v-else-if="userInfo.vip_status == 2" class="small">{{$t('未开通会员')}}
  158. </view>
  159. </view>
  160. <view class="acea-row">
  161. <navigator v-if="userInfo.vip_status == 1" url="/pages/annex/vip_paid/index"
  162. hover-class="none" class="btn">{{$t('会员可享多项权益')}}</navigator>
  163. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  164. {{ userInfo.overdue_time ? $t('立即续费') : $t('立即激活') }}
  165. </navigator>
  166. <text class="iconfont icon-xiangyou btn"></text>
  167. </view>
  168. </view>
  169. </view>
  170. <view class="card-vip" v-if="userInfo.svip_open && member_style==2">
  171. <view class="left-box">
  172. <view class="big">{{$t('会员可享多项权益')}}</view>
  173. <view v-if="userInfo.vip_status == 1" class="small">{{$t('永久')}}</view>
  174. <view v-else-if="userInfo.vip_status == 3" class="small">{{$t('会员到期')}}
  175. {{ userInfo.overdue_time | dateFormat }}
  176. </view>
  177. <view v-else-if="userInfo.vip_status == -1" class="small">{{$t('已过期')}}</view>
  178. <view v-else-if="userInfo.vip_status == 2" class="small">{{$t('未开通会员')}}
  179. </view>
  180. </view>
  181. <navigator v-if="userInfo.vip_status == 1" url="/pages/annex/vip_paid/index" hover-class="none"
  182. class="btn">{{$t('查看会员权益')}}</navigator>
  183. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  184. {{ userInfo.overdue_time ? $t('立即续费') : $t('立即激活') }}
  185. </navigator>
  186. </view>
  187. <view class="order-wrapper" :class="userInfo.svip_open?'':'height'">
  188. <view class="order-hd flex">
  189. <view class="left">{{$t('订单中心')}}</view>
  190. <navigator class="right flex" hover-class="none" url="/pages/goods/order_list/index"
  191. open-type="navigate">
  192. {{$t('查看全部')}}
  193. <text class="iconfont icon-xiangyou"></text>
  194. </navigator>
  195. </view>
  196. <view class="order-bd">
  197. <block v-for="(item,index) in orderMenu" :key="index">
  198. <navigator class="order-item" hover-class="none" :url="item.url">
  199. <view class="pic">
  200. <!-- <image :src="item.img" mode=""></image> -->
  201. <text class="iconfont" :class="item.img"></text>
  202. <text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text>
  203. </view>
  204. <view class="txt">{{$t(item.title)}}</view>
  205. </navigator>
  206. </block>
  207. </view>
  208. </view>
  209. </view>
  210. <!-- 轮播 -->
  211. <view class="slider-wrapper" v-if="imgUrls.length>0 && my_banner_status">
  212. <swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
  213. :duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
  214. <block v-for="(item,index) in imgUrls" :key="index">
  215. <swiper-item>
  216. <view @click="goMenuPage(item.url)" class='slide-navigator acea-row row-between-wrapper'
  217. hover-class='none'>
  218. <image :src="item.pic" class="slide-image"></image>
  219. </view>
  220. </swiper-item>
  221. </block>
  222. </swiper>
  223. </view>
  224. <!-- 会员菜单 -->
  225. <view class="user-menus" style="margin-top: 20rpx;">
  226. <view class="menu-title">{{$t('我的服务')}}</view>
  227. <view class="list-box">
  228. <!-- #ifdef APP-PLUS || H5 -->
  229. <block v-for="(item,index) in MyMenus" :key="index">
  230. <view class="item" v-if="item.url!='#' && item.url!='/pages/service/index'"
  231. @click="goMenuPage(item.url, item.name)">
  232. <image :src="item.pic"></image>
  233. <text>{{$t(item.name)}}</text>
  234. </view>
  235. </block>
  236. <!-- #endif -->
  237. <!-- #ifdef MP -->
  238. <block v-for="(item,index) in MyMenus" :key="index">
  239. <view class="item" v-if="item.url!='#'
  240. && item.url!='/pages/service/index'
  241. && item.url!='/pages/extension/customer_list/chat'
  242. || (item.url=='/pages/extension/customer_list/chat' && routineContact == 0)"
  243. @click="goMenuPage(item.url, item.name)">
  244. <image :src="item.pic"></image>
  245. <text>{{$t(item.name)}}</text>
  246. </view>
  247. </block>
  248. <button class="item" open-type='contact' v-if="routineContact == 1">
  249. <image src="/static/images/contact.png"></image>
  250. <text>{{$t('联系客服')}}</text>
  251. </button>
  252. <!-- #endif -->
  253. <!-- #ifdef APP-PLUS -->
  254. <view class="item" hover-class="none" @click="goMenuPage('/pages/users/privacy/index?type=3')">
  255. <image src="/static/images/menu.png"></image>
  256. <text>{{$t('隐私协议')}}</text>
  257. </view>
  258. <!-- #endif -->
  259. </view>
  260. </view>
  261. <view class="user-menus" style="margin-top: 20rpx;" v-if="storeMenu.length">
  262. <view class="menu-title">{{$t('商家管理')}}</view>
  263. <view class="list-box">
  264. <block v-for="(item,index) in storeMenu" :key="index">
  265. <view class="item" :url="item.url" hover-class="none"
  266. v-if="item.url!='#' && item.url!='/pages/service/index'"
  267. @click="goMenuPage(item.url, item.name)">
  268. <image :src="item.pic"></image>
  269. <text>{{$t(item.name)}}</text>
  270. </view>
  271. </block>
  272. </view>
  273. </view>
  274. <!-- <image :src="copyRightPic" alt="" class='support'></image> -->
  275. <view class="uni-p-b-98"></view>
  276. </scroll-view>
  277. </view>
  278. <view class="foot" v-if="is_diy && newData.status && newData.status.status">
  279. <view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
  280. <view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
  281. <block v-if="item.link == activeRouter">
  282. <image :src="item.imgList[0]"></image>
  283. <view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{$t(item.name)}}</view>
  284. </block>
  285. <block v-else>
  286. <image :src="item.imgList[1]"></image>
  287. <view class="txt" :style="{color:newData.txtColor.color[0].item}">{{$t(item.name)}}</view>
  288. </block>
  289. <div class="count-num" v-if="item.link === '/pages/order_addcart/order_addcart' && cartNum > 0">
  290. {{cartNum}}
  291. </div>
  292. </view>
  293. </view>
  294. </view>
  295. </view>
  296. </template>
  297. <script>
  298. let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  299. import {
  300. getMenuList,
  301. getUserInfo,
  302. setVisit,
  303. updateUserInfo
  304. } from '@/api/user.js';
  305. import {
  306. wechatAuthV2,
  307. getNavigation,
  308. silenceAuth
  309. } from '@/api/public.js'
  310. import {
  311. toLogin
  312. } from '@/libs/login.js';
  313. import {
  314. mapState,
  315. mapGetters
  316. } from "vuex";
  317. // #ifdef H5
  318. import Auth from '@/libs/wechat';
  319. // #endif
  320. const app = getApp();
  321. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  322. import Routine from '@/libs/routine';
  323. import colors from '@/mixins/color';
  324. import {
  325. getCustomer
  326. } from '@/utils/index.js'
  327. export default {
  328. components: {
  329. },
  330. // computed: mapGetters(['isLogin','cartNum']),
  331. computed: {
  332. ...mapGetters({
  333. cartNum: 'cartNum',
  334. isLogin: 'isLogin'
  335. })
  336. },
  337. filters: {
  338. coundTime(val) {
  339. var setTime = val * 1000
  340. var nowTime = new Date()
  341. var rest = setTime - nowTime.getTime()
  342. var day = parseInt(rest / (60 * 60 * 24 * 1000))
  343. // var hour = parseInt(rest/(60*60*1000)%24) //小时
  344. return day + this.$t('day')
  345. },
  346. dateFormat: function (value) {
  347. return dayjs(value * 1000).format('YYYY-MM-DD');
  348. }
  349. },
  350. mixins: [colors],
  351. data() {
  352. return {
  353. storeMenu: [], // 商家管理
  354. orderMenu: [{
  355. img: 'icon-daifukuan',
  356. title: '待付款',
  357. url: '/pages/goods/order_list/index?status=0'
  358. },
  359. {
  360. img: 'icon-daifahuo',
  361. title: '待发货',
  362. url: '/pages/goods/order_list/index?status=1'
  363. },
  364. {
  365. img: 'icon-daishouhuo',
  366. title: '待收货',
  367. url: '/pages/goods/order_list/index?status=2'
  368. },
  369. {
  370. img: 'icon-daipingjia',
  371. title: '待评价',
  372. url: '/pages/goods/order_list/index?status=3'
  373. },
  374. {
  375. img: 'icon-a-shouhoutuikuan',
  376. title: '售后/退款',
  377. url: '/pages/users/user_return_list/index'
  378. },
  379. ],
  380. imgUrls: [],
  381. autoplay: true,
  382. circular: true,
  383. interval: 3000,
  384. duration: 500,
  385. isAuto: false, //没有授权的不会自动授权
  386. isShowAuth: false, //是否隐藏授权
  387. orderStatusNum: {},
  388. userInfo: {},
  389. MyMenus: [],
  390. sysHeight: sysHeight,
  391. mpHeight: 0,
  392. showStatus: 1,
  393. newData: {},
  394. activeRouter: '',
  395. // #ifdef H5 || MP
  396. pageHeight: '100%',
  397. routineContact: 0,
  398. // #endif
  399. // #ifdef APP-PLUS
  400. pageHeight: app.globalData.windowHeight,
  401. // #endif
  402. // #ifdef H5
  403. isWeixin: Auth.isWeixin(),
  404. //#endif
  405. footerSee: false,
  406. member_style: 1,
  407. my_banner_status: 1,
  408. is_diy: uni.getStorageSync('is_diy'),
  409. copyRightPic: '/static/images/support.png', //版权图片
  410. }
  411. },
  412. onLoad(option) {
  413. // uni.hideTabBar()
  414. let that = this;
  415. if (this.is_diy) {
  416. if (uni.getStorageSync('FOOTER_BAR')) {
  417. uni.hideTabBar()
  418. }
  419. let res = {
  420. "name": "pageFoot",
  421. "setUp": {
  422. "tabVal": 0
  423. },
  424. "status": {
  425. "title": "是否自定义",
  426. "name": "status",
  427. "status": true
  428. },
  429. "txtColor": {
  430. "title": "文字颜色",
  431. "name": "txtColor",
  432. "default": [
  433. {
  434. "item": "#282828"
  435. }
  436. ],
  437. "color": [
  438. {
  439. "item": "rgba(51,51,51,1)"
  440. }
  441. ]
  442. },
  443. "activeTxtColor": {
  444. "title": "选中文字颜色",
  445. "name": "txtColor",
  446. "default": [
  447. {
  448. "item": "#F62C2C"
  449. }
  450. ],
  451. "color": [
  452. {
  453. "item": "rgba(29,176,252,1)"
  454. }
  455. ]
  456. },
  457. "bgColor": {
  458. "title": "背景颜色",
  459. "name": "bgColor",
  460. "default": [
  461. {
  462. "item": "#fff"
  463. }
  464. ],
  465. "color": [
  466. {
  467. "item": "#fff"
  468. }
  469. ]
  470. },
  471. "menuList": [
  472. {
  473. "imgList": [
  474. "https://qiniu.crmeb.net/attach/2021/11/bdf25202111181452426458.png",
  475. "https://qiniu.crmeb.net/attach/2021/11/aaf1b202111181452576658.png"
  476. ],
  477. "name": "首页",
  478. "link": "/pages/index/index"
  479. },
  480. {
  481. "imgList": [
  482. "https://demo26.crmeb.net/uploads/attach/2022/09/20220923/14367a2fecd502f51978ed6ea09afe19.png",
  483. "https://qiniu.crmeb.net/attach/2021/11/59d4a202111181453208678.png"
  484. ],
  485. "name": "分类",
  486. "link": "/pages/goods_cate/goods_cate"
  487. },
  488. {
  489. "imgList": [
  490. "https://qiniu.crmeb.net/attach/2021/11/076ac202111181453294517.png",
  491. "https://qiniu.crmeb.net/attach/2021/11/201c9202111181453378599.png"
  492. ],
  493. "name": "购物车",
  494. "link": "/pages/order_addcart/order_addcart"
  495. },
  496. {
  497. "imgList": [
  498. "https://qiniu.crmeb.net/attach/2021/11/f04cf20211118145343755.png",
  499. "https://qiniu.crmeb.net/attach/2021/11/3a141202111181453495771.png"
  500. ],
  501. "name": "我的",
  502. "link": "/pages/user/index"
  503. }
  504. ],
  505. "id": "idundefined"
  506. }
  507. // getNavigation().then(res => {
  508. this.newData = res
  509. if (this.newData.status && this.newData.status.status) {
  510. uni.hideTabBar()
  511. } else {
  512. uni.showTabBar()
  513. }
  514. // })
  515. }
  516. // #ifdef MP
  517. // 小程序静默授权
  518. if (!this.$store.getters.isLogin) {
  519. // Routine.getCode()
  520. // .then(code => {
  521. // Routine.silenceAuth(code).then(res => {
  522. // this.onLoadFun();
  523. // })
  524. // })
  525. // .catch(res => {
  526. // uni.hideLoading();
  527. // });
  528. }
  529. // #endif
  530. // #ifdef H5 || APP-PLUS
  531. if (that.isLogin == false) {
  532. toLogin()
  533. }
  534. //获取用户信息回来后授权
  535. let cacheCode = this.$Cache.get('snsapi_userinfo_code');
  536. let res1 = cacheCode ? option.code != cacheCode : true;
  537. if (this.isWeixin && option.code && res1 && option.scope === 'snsapi_userinfo') {
  538. this.$Cache.set('snsapi_userinfo_code', option.code);
  539. Auth.auth(option.code).then(res => {
  540. this.getUserInfo();
  541. }).catch(err => { })
  542. }
  543. // #endif
  544. // #ifdef APP-PLUS
  545. that.$set(that, 'pageHeight', app.globalData.windowHeight);
  546. // #endif
  547. let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
  548. let curRoute = routes[routes.length - 1].route //获取当前页面路由
  549. this.activeRouter = '/' + curRoute
  550. this.getCopyRight();
  551. },
  552. onReady() {
  553. let self = this
  554. // #ifdef MP
  555. let info = uni.createSelectorQuery().select(".sys-head");
  556. info.boundingClientRect(function (data) { //data - 各种参数
  557. self.mpHeight = data.height
  558. }).exec()
  559. // #endif
  560. },
  561. onShow: function () {
  562. let that = this;
  563. // #ifdef APP-PLUS
  564. uni.getSystemInfo({
  565. success: function (res) {
  566. that.pageHeight = res.windowHeight + 'px'
  567. }
  568. });
  569. // #endif
  570. if (that.isLogin) {
  571. this.getUserInfo();
  572. this.getMyMenus();
  573. this.setVisit();
  574. };
  575. this.getCopyRight();
  576. },
  577. onPullDownRefresh() {
  578. this.onLoadFun();
  579. },
  580. methods: {
  581. getWechatuserinfo() {
  582. //#ifdef H5
  583. Auth.isWeixin() && Auth.toAuth('snsapi_userinfo', '/pages/user/index');
  584. //#endif
  585. },
  586. getRoutineUserInfo(e) {
  587. updateUserInfo({
  588. userInfo: e.detail.userInfo
  589. }).then(res => {
  590. this.getUserInfo();
  591. return this.$util.Tips(this.$t('更新用户信息成功'));
  592. }).catch(res => {
  593. })
  594. },
  595. // 记录会员访问
  596. setVisit() {
  597. setVisit({
  598. url: '/pages/user/index'
  599. }).then(res => { })
  600. },
  601. // 打开授权
  602. openAuto() {
  603. toLogin();
  604. },
  605. // 授权回调
  606. onLoadFun() {
  607. this.getUserInfo();
  608. this.getMyMenus();
  609. this.setVisit();
  610. },
  611. Setting: function () {
  612. uni.openSetting({
  613. success: function (res) { }
  614. });
  615. },
  616. // 授权关闭
  617. authColse: function (e) {
  618. this.isShowAuth = e
  619. },
  620. // 绑定手机
  621. bindPhone() {
  622. uni.navigateTo({
  623. url: '/pages/users/user_phone/index'
  624. })
  625. },
  626. /**
  627. * 获取个人用户信息
  628. */
  629. getUserInfo: function () {
  630. let that = this;
  631. getUserInfo().then(res => {
  632. that.userInfo = res.data
  633. that.$store.commit("SETUID", res.data.uid);
  634. that.orderMenu.forEach((item, index) => {
  635. switch (item.title) {
  636. case '待付款':
  637. item.num = res.data.orderStatusNum.unpaid_count
  638. break
  639. case '待发货':
  640. item.num = res.data.orderStatusNum.unshipped_count
  641. break
  642. case '待收货':
  643. item.num = res.data.orderStatusNum.received_count
  644. break
  645. case '待评价':
  646. item.num = res.data.orderStatusNum.evaluated_count
  647. break
  648. case '售后/退款':
  649. item.num = res.data.orderStatusNum.refunding_count
  650. break
  651. }
  652. })
  653. uni.stopPullDownRefresh();
  654. });
  655. },
  656. //小程序授权api替换 getUserInfo
  657. getUserProfile() {
  658. toLogin();
  659. },
  660. /**
  661. *
  662. * 获取个人中心图标
  663. */
  664. switchTab(order) {
  665. this.orderMenu.forEach((item, index) => {
  666. switch (item.title) {
  667. case '待付款':
  668. item.img = order.dfk
  669. break
  670. case '待发货':
  671. item.img = order.dfh
  672. break
  673. case '待收货':
  674. item.img = order.dsh
  675. break
  676. case '待评价':
  677. item.img = order.dpj
  678. break
  679. case '售后/退款':
  680. item.img = order.sh
  681. break
  682. }
  683. })
  684. },
  685. getMyMenus: function () {
  686. let that = this;
  687. // if (this.MyMenus.length) return;
  688. let res = {
  689. data: {
  690. "routine_my_menus": [
  691. {
  692. "id": 1157,
  693. "name": "付费会员",
  694. "pic": "https://demo26.crmeb.net/statics/system_images/menu_vip.png",
  695. "url": "/pages/annex/vip_paid/index"
  696. },
  697. {
  698. "id": 1158,
  699. "name": "发票管理",
  700. "pic": "https://demo26.crmeb.net/statics/system_images/menu_invoice.png",
  701. "url": "/pages/users/user_invoice_list/index"
  702. },
  703. {
  704. "id": 1159,
  705. "name": "积分中心",
  706. "pic": "https://demo26.crmeb.net/statics/system_images/menu_integral.png",
  707. "url": "/pages/users/user_integral/index"
  708. },
  709. {
  710. "id": 1160,
  711. "name": "联系客服",
  712. "pic": "https://demo26.crmeb.net/statics/system_images/menu_customer.png",
  713. "url": "/pages/extension/customer_list/chat"
  714. },
  715. {
  716. "id": 1161,
  717. "name": "我的收藏",
  718. "pic": "https://demo26.crmeb.net/statics/system_images/menu_collection.png",
  719. "url": "/pages/users/user_goods_collection/index"
  720. },
  721. {
  722. "id": 1162,
  723. "name": "地址信息",
  724. "pic": "https://demo26.crmeb.net/statics/system_images/menu_address.png",
  725. "url": "/pages/users/user_address_list/index"
  726. },
  727. {
  728. "id": 1163,
  729. "name": "我的余额",
  730. "pic": "https://demo26.crmeb.net/statics/system_images/menu_money.png",
  731. "url": "/pages/users/user_money/index"
  732. },
  733. {
  734. "id": 1164,
  735. "name": "我的推广",
  736. "pic": "https://demo26.crmeb.net/statics/system_images/menu_spread.png",
  737. "url": "/pages/users/user_spread_user/index"
  738. },
  739. {
  740. "id": 1165,
  741. "name": "砍价记录",
  742. "pic": "https://demo26.crmeb.net/statics/system_images/menu_bargain.png",
  743. "url": "/pages/activity/bargain/index"
  744. },
  745. {
  746. "id": 1166,
  747. "name": "浏览记录",
  748. "pic": "https://demo26.crmeb.net/statics/system_images/menu_log.png",
  749. "url": "/pages/users/visit_list/index"
  750. },
  751. {
  752. "id": 1167,
  753. "name": "我的等级",
  754. "pic": "https://demo26.crmeb.net/statics/system_images/menu_level.png",
  755. "url": "/pages/users/user_vip/index"
  756. },
  757. {
  758. "id": 1168,
  759. "name": "抽奖记录",
  760. "pic": "https://demo26.crmeb.net/uploads/attach/2022/09/20220909/0792fc1da45d6621fcd9a0bb941911f4.png",
  761. "url": "/pages/goods/lottery/grids/record"
  762. }
  763. ],
  764. "routine_my_banner": [],
  765. "routine_spread_banner": [
  766. "https://demo26.crmeb.net/statics/system_images/spread_1.jpeg",
  767. "https://demo26.crmeb.net/statics/system_images/spread_2.jpeg"
  768. ],
  769. "routine_contact_type": "0",
  770. "diy_data": {
  771. "value": "1",
  772. "order_status": 4,
  773. "my_banner_status": 0
  774. }
  775. }
  776. }
  777. // getMenuList().then(res => {
  778. let storeMenu = []
  779. let myMenu = []
  780. res.data.routine_my_menus.forEach((el, index, arr) => {
  781. if (el.url == '/pages/admin/order/index' || el.url ==
  782. '/pages/admin/order_cancellation/index' || el.name ==
  783. this.$t(`客服接待`)) {
  784. storeMenu.push(el)
  785. } else {
  786. myMenu.push(el)
  787. }
  788. })
  789. this.member_style = Number(res.data.diy_data.value)
  790. this.my_banner_status = res.data.diy_data.my_banner_status
  791. let order01 = {
  792. dfk: 'icon-daifukuan',
  793. dfh: 'icon-daifahuo',
  794. dsh: 'icon-daishouhuo',
  795. dpj: 'icon-daipingjia',
  796. sh: 'icon-a-shouhoutuikuan'
  797. }
  798. let order02 = {
  799. dfk: 'icon-daifukuan-lan',
  800. dfh: 'icon-daifahuo-lan',
  801. dsh: 'icon-daishouhuo-lan',
  802. dpj: 'icon-daipingjia-lan',
  803. sh: 'icon-shouhou-tuikuan-lan'
  804. }
  805. let order03 = {
  806. dfk: 'icon-daifukuan-ju',
  807. dfh: 'icon-daifahuo-ju',
  808. dsh: 'icon-daishouhuo-ju',
  809. dpj: 'icon-daipingjia-ju',
  810. sh: 'icon-shouhou-tuikuan-ju'
  811. }
  812. let order04 = {
  813. dfk: 'icon-daifukuan-fen',
  814. dfh: 'icon-daifahuo-fen',
  815. dsh: 'icon-daishouhuo-fen',
  816. dpj: 'icon-daipingjia-fen',
  817. sh: 'icon-a-shouhoutuikuan-fen'
  818. }
  819. let order05 = {
  820. dfk: 'icon-daifukuan-lv',
  821. dfh: 'icon-daifahuo-lv',
  822. dsh: 'icon-daishouhuo-lv',
  823. dpj: 'icon-daipingjia-lv',
  824. sh: 'icon-shouhou-tuikuan-lv'
  825. }
  826. switch (res.data.diy_data.order_status) {
  827. case 1:
  828. this.switchTab(order01)
  829. break
  830. case 2:
  831. this.switchTab(order02)
  832. break
  833. case 3:
  834. this.switchTab(order03)
  835. break
  836. case 4:
  837. this.switchTab(order04)
  838. break
  839. case 5:
  840. this.switchTab(order05)
  841. break
  842. }
  843. that.$set(that, 'MyMenus', myMenu);
  844. that.$set(that, 'storeMenu', storeMenu);
  845. this.imgUrls = res.data.routine_my_banner
  846. this.routineContact = Number(res.data.routine_contact_type)
  847. // });
  848. },
  849. // 编辑页面
  850. goEdit() {
  851. if (this.isLogin == false) {
  852. toLogin();
  853. } else {
  854. uni.navigateTo({
  855. url: '/pages/users/user_info/index'
  856. })
  857. }
  858. },
  859. // 签到
  860. goSignIn() {
  861. uni.navigateTo({
  862. url: '/pages/users/user_sgin/index'
  863. })
  864. },
  865. // goMenuPage
  866. goMenuPage(url, name) {
  867. if (this.isLogin) {
  868. if (url.indexOf('http') === -1) {
  869. // #ifdef H5 || APP-PLUS
  870. if (name && name === this.$t(`service_reception`)) {
  871. // return window.location.href = `${location.origin}${url}`
  872. return uni.navigateTo({
  873. url: `/pages/annex/web_view/index?url=${location.origin}${url}`
  874. });
  875. } else if (name && name === this.$t(`contact_customer`)) {
  876. return getCustomer(url)
  877. } else if (name === this.$t(`order_write_off`)) {
  878. console.log(`${url}`)
  879. return uni.navigateTo({
  880. url: url
  881. });
  882. // return window.location.href = `${location.origin}${url}`
  883. }
  884. // #endif
  885. // #ifdef MP
  886. if (name && name === this.$t(`contact_customer`)) {
  887. return getCustomer(url)
  888. }
  889. if (url != '#' && url == '/pages/users/user_info/index') {
  890. uni.openSetting({
  891. success: function (res) { }
  892. });
  893. }
  894. // #endif
  895. uni.navigateTo({
  896. url: url,
  897. fail(err) {
  898. uni.switchTab({
  899. url: url
  900. })
  901. }
  902. })
  903. } else {
  904. uni.navigateTo({
  905. url: `/pages/annex/web_view/index?url=${url}`
  906. });
  907. }
  908. } else {
  909. // #ifdef MP
  910. this.openAuto()
  911. // #endif
  912. }
  913. },
  914. goRouter(item) {
  915. var pages = getCurrentPages();
  916. var page = (pages[pages.length - 1]).$page.fullPath;
  917. if (item.link == page) return
  918. uni.switchTab({
  919. url: item.link,
  920. fail(err) {
  921. uni.redirectTo({
  922. url: item.link
  923. })
  924. }
  925. })
  926. },
  927. getCopyRight() {
  928. const copyRight = uni.getStorageSync('copyRight')
  929. if (copyRight.copyrightImage) {
  930. this.copyRightPic = copyRight.copyrightImage
  931. }
  932. }
  933. }
  934. }
  935. </script>
  936. <style lang="scss">
  937. page,
  938. body {
  939. height: 100%;
  940. }
  941. .height {
  942. margin-top: -100rpx !important;
  943. }
  944. .unBg {
  945. background-color: unset !important;
  946. .user-info {
  947. .info {
  948. .name {
  949. color: #333333 !important;
  950. font-weight: 600;
  951. }
  952. .num {
  953. color: #333 !important;
  954. .num-txt {
  955. height: 38rpx;
  956. background-color: rgba(51, 51, 51, 0.13);
  957. padding: 0 12rpx;
  958. border-radius: 16rpx;
  959. }
  960. }
  961. }
  962. }
  963. .num-wrapper {
  964. color: #333 !important;
  965. font-weight: 600;
  966. .num-item {
  967. .txt {
  968. color: rgba(51, 51, 51, 0.7) !important;
  969. }
  970. }
  971. }
  972. .message {
  973. .iconfont {
  974. color: #333 !important;
  975. }
  976. .num {
  977. color: #fff !important;
  978. background-color: var(--view-theme) !important;
  979. }
  980. }
  981. .setting {
  982. .iconfont {
  983. color: #333 !important;
  984. }
  985. }
  986. }
  987. .cardVipB {
  988. background-color: #343A48;
  989. width: 100%;
  990. height: 124rpx;
  991. border-radius: 16rpx 16rpx 0 0;
  992. padding: 22rpx 30rpx 0 30rpx;
  993. margin-top: 16px;
  994. .left-box {
  995. .small {
  996. color: #F8D5A8;
  997. font-size: 28rpx;
  998. margin-left: 18rpx;
  999. }
  1000. .pictrue {
  1001. width: 40rpx;
  1002. height: 45rpx;
  1003. image {
  1004. width: 100%;
  1005. height: 100%;
  1006. }
  1007. }
  1008. }
  1009. .btn {
  1010. color: #BBBBBB;
  1011. font-size: 26rpx;
  1012. }
  1013. .icon-xiangyou {
  1014. margin-top: 6rpx;
  1015. }
  1016. }
  1017. .cardVipA {
  1018. position: absolute;
  1019. background: url('~@/static/images/member.png') no-repeat;
  1020. background-size: 100% 100%;
  1021. width: 750rpx;
  1022. height: 84rpx;
  1023. bottom: -2rpx;
  1024. left: 0;
  1025. padding: 0 56rpx 0 135rpx;
  1026. .left-box {
  1027. font-size: 26rpx;
  1028. color: #905100;
  1029. font-weight: 400;
  1030. }
  1031. .btn {
  1032. color: #905100;
  1033. font-weight: 400;
  1034. font-size: 24rpx;
  1035. }
  1036. .iconfont {
  1037. font-size: 20rpx;
  1038. margin: 4rpx 0 0 4rpx;
  1039. }
  1040. }
  1041. .new-users {
  1042. display: flex;
  1043. flex-direction: column;
  1044. height: 100%;
  1045. .sys-head {
  1046. position: relative;
  1047. width: 100%;
  1048. // background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
  1049. .bg {
  1050. position: absolute;
  1051. left: 0;
  1052. top: 0;
  1053. width: 100%;
  1054. height: 100%;
  1055. background: var(--view-theme);
  1056. background-size: 100% auto;
  1057. background-position: left bottom;
  1058. }
  1059. .sys-title {
  1060. z-index: 10;
  1061. position: relative;
  1062. height: 43px;
  1063. text-align: center;
  1064. line-height: 43px;
  1065. font-size: 36rpx;
  1066. color: #FFFFFF;
  1067. }
  1068. }
  1069. .head {
  1070. // background: #fff;
  1071. .user-card {
  1072. position: relative;
  1073. width: 100%;
  1074. height: 380rpx;
  1075. margin: 0 auto;
  1076. padding: 35rpx 28rpx;
  1077. background-image: url("~@/static/images/user01.png");
  1078. background-size: 100% auto;
  1079. background-color: var(--view-theme);
  1080. .user-info {
  1081. z-index: 20;
  1082. position: relative;
  1083. display: flex;
  1084. .headwear {
  1085. position: absolute;
  1086. right: -4rpx;
  1087. top: -14rpx;
  1088. width: 44rpx;
  1089. height: 44rpx;
  1090. image {
  1091. width: 100%;
  1092. height: 100%;
  1093. }
  1094. }
  1095. .live {
  1096. width: 28rpx;
  1097. height: 28rpx;
  1098. margin-left: 20rpx;
  1099. }
  1100. .bntImg {
  1101. width: 120rpx;
  1102. height: 120rpx;
  1103. border-radius: 50%;
  1104. text-align: center;
  1105. line-height: 120rpx;
  1106. background-color: unset;
  1107. position: relative;
  1108. .avatarName {
  1109. font-size: 16rpx;
  1110. color: #fff;
  1111. text-align: center;
  1112. background-color: rgba(0, 0, 0, 0.6);
  1113. height: 37rpx;
  1114. line-height: 37rpx;
  1115. position: absolute;
  1116. bottom: 0;
  1117. left: 0;
  1118. width: 100%;
  1119. }
  1120. }
  1121. .avatar-box {
  1122. position: relative;
  1123. display: flex;
  1124. align-items: center;
  1125. justify-content: center;
  1126. width: 120rpx;
  1127. height: 120rpx;
  1128. border-radius: 50%;
  1129. &.on {
  1130. .avatar {
  1131. border: 2px solid #FFAC65;
  1132. border-radius: 50%;
  1133. box-sizing: border-box;
  1134. }
  1135. }
  1136. }
  1137. .avatar {
  1138. position: relative;
  1139. width: 120rpx;
  1140. height: 120rpx;
  1141. border-radius: 50%;
  1142. }
  1143. .info {
  1144. flex: 1;
  1145. display: flex;
  1146. flex-direction: column;
  1147. justify-content: space-between;
  1148. margin-left: 20rpx;
  1149. padding: 15rpx 0;
  1150. .name {
  1151. display: flex;
  1152. align-items: center;
  1153. color: #fff;
  1154. font-size: 31rpx;
  1155. .vip {
  1156. margin-left: 10rpx;
  1157. image {
  1158. width: 78rpx;
  1159. height: 30rpx;
  1160. display: block;
  1161. }
  1162. }
  1163. }
  1164. .num {
  1165. display: flex;
  1166. align-items: center;
  1167. font-size: 26rpx;
  1168. color: rgba(255, 255, 255, 0.6);
  1169. image {
  1170. width: 22rpx;
  1171. height: 23rpx;
  1172. margin-left: 20rpx;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. .message {
  1178. align-self: flex-start;
  1179. position: relative;
  1180. margin-top: 15rpx;
  1181. margin-right: 20rpx;
  1182. .num {
  1183. position: absolute;
  1184. top: -8rpx;
  1185. left: 18rpx;
  1186. padding: 0 6rpx;
  1187. height: 28rpx;
  1188. border-radius: 12rpx;
  1189. background-color: #fff;
  1190. font-size: 18rpx;
  1191. line-height: 28rpx;
  1192. text-align: center;
  1193. color: var(--view-theme);
  1194. }
  1195. .iconfont {
  1196. font-size: 40rpx;
  1197. color: #fff;
  1198. }
  1199. }
  1200. .num-wrapper {
  1201. z-index: 30;
  1202. position: relative;
  1203. display: flex;
  1204. align-items: center;
  1205. justify-content: space-between;
  1206. margin-top: 22rpx;
  1207. // padding: 0 47rpx;
  1208. color: #fff;
  1209. .num-item {
  1210. width: 33.33%;
  1211. text-align: center;
  1212. &~.num-item {
  1213. position: relative;
  1214. &:before {
  1215. content: '';
  1216. position: absolute;
  1217. width: 1rpx;
  1218. height: 28rpx;
  1219. top: 50%;
  1220. margin-top: -14rpx;
  1221. background-color: rgba(255, 255, 255, 0.4);
  1222. left: 0;
  1223. }
  1224. }
  1225. .num {
  1226. font-size: 42rpx;
  1227. font-weight: bold;
  1228. }
  1229. .txt {
  1230. margin-top: 8rpx;
  1231. font-size: 26rpx;
  1232. color: rgba(255, 255, 255, 0.6);
  1233. }
  1234. }
  1235. }
  1236. .sign {
  1237. z-index: 200;
  1238. position: absolute;
  1239. right: -12rpx;
  1240. top: 80rpx;
  1241. display: flex;
  1242. align-items: center;
  1243. justify-content: center;
  1244. width: 120rpx;
  1245. height: 60rpx;
  1246. background: linear-gradient(90deg, rgba(255, 225, 87, 1) 0%, rgba(238, 193, 15, 1) 100%);
  1247. border-radius: 29rpx 4rpx 4rpx 29rpx;
  1248. color: #282828;
  1249. font-size: 28rpx;
  1250. font-weight: bold;
  1251. }
  1252. }
  1253. .order-wrapper {
  1254. background: #fff;
  1255. margin: 0 30rpx;
  1256. border-radius: 16rpx;
  1257. position: relative;
  1258. margin-top: -10rpx;
  1259. .order-hd {
  1260. justify-content: space-between;
  1261. padding: 30rpx 20rpx 10rpx 30rpx;
  1262. margin-top: 25rpx;
  1263. font-size: 30rpx;
  1264. color: #282828;
  1265. .left {
  1266. font-weight: bold;
  1267. }
  1268. .right {
  1269. display: flex;
  1270. align-items: center;
  1271. color: #666666;
  1272. font-size: 26rpx;
  1273. .icon-xiangyou {
  1274. margin-left: 5rpx;
  1275. font-size: 26rpx;
  1276. }
  1277. }
  1278. }
  1279. .order-bd {
  1280. display: flex;
  1281. padding: 0 0;
  1282. .order-item {
  1283. display: flex;
  1284. flex-direction: column;
  1285. justify-content: center;
  1286. align-items: center;
  1287. width: 20%;
  1288. height: 140rpx;
  1289. .pic {
  1290. position: relative;
  1291. text-align: center;
  1292. .iconfont {
  1293. font-size: 48rpx;
  1294. color: var(--view-theme);
  1295. }
  1296. image {
  1297. width: 58rpx;
  1298. height: 48rpx;
  1299. }
  1300. }
  1301. .txt {
  1302. margin-top: 6rpx;
  1303. font-size: 26rpx;
  1304. color: #333;
  1305. }
  1306. }
  1307. }
  1308. }
  1309. }
  1310. .slider-wrapper {
  1311. margin: 20rpx 30rpx;
  1312. height: 130rpx;
  1313. swiper,
  1314. swiper-item {
  1315. height: 100%;
  1316. }
  1317. image {
  1318. width: 100%;
  1319. height: 130rpx;
  1320. border-radius: 16rpx;
  1321. }
  1322. }
  1323. .user-menus {
  1324. background-color: #fff;
  1325. margin: 0 30rpx;
  1326. border-radius: 16rpx;
  1327. .menu-title {
  1328. padding: 30rpx 30rpx 40rpx;
  1329. font-size: 30rpx;
  1330. color: #282828;
  1331. font-weight: bold;
  1332. }
  1333. .list-box {
  1334. display: flex;
  1335. flex-wrap: wrap;
  1336. padding: 0;
  1337. }
  1338. .item {
  1339. position: relative;
  1340. display: flex;
  1341. align-items: center;
  1342. justify-content: space-between;
  1343. flex-direction: column;
  1344. width: 25%;
  1345. margin-bottom: 47rpx;
  1346. font-size: 26rpx;
  1347. color: #333333;
  1348. image {
  1349. width: 52rpx;
  1350. height: 52rpx;
  1351. margin-bottom: 18rpx;
  1352. }
  1353. &:last-child::before {
  1354. display: none;
  1355. }
  1356. }
  1357. button {
  1358. font-size: 28rpx;
  1359. }
  1360. }
  1361. .phone {
  1362. color: #fff;
  1363. background-color: #CCC;
  1364. border-radius: 15px;
  1365. width: max-content;
  1366. padding: 0 10px;
  1367. }
  1368. .order-status-num {
  1369. min-width: 12rpx;
  1370. background-color: #fff;
  1371. color: var(--view-theme);
  1372. border-radius: 15px;
  1373. position: absolute;
  1374. right: -14rpx;
  1375. top: -15rpx;
  1376. font-size: 20rpx;
  1377. padding: 0 8rpx;
  1378. border: 1px solid var(--view-theme);
  1379. }
  1380. .support {
  1381. width: 219rpx;
  1382. height: 74rpx;
  1383. margin: 54rpx auto;
  1384. display: block;
  1385. }
  1386. }
  1387. .card-vip {
  1388. display: flex;
  1389. align-items: center;
  1390. justify-content: space-between;
  1391. position: relative;
  1392. width: 690rpx;
  1393. height: 134rpx;
  1394. margin: -72rpx auto 0;
  1395. background: url('~@/static/images/user_vip.png');
  1396. background-size: cover;
  1397. padding-left: 118rpx;
  1398. padding-right: 34rpx;
  1399. .left-box {
  1400. font-size: 24rpx;
  1401. color: #AE5A2A;
  1402. .big {
  1403. font-size: 28rpx;
  1404. }
  1405. .small {
  1406. opacity: 0.8;
  1407. margin-top: 10rpx;
  1408. }
  1409. }
  1410. .btn {
  1411. height: 52rpx;
  1412. line-height: 52rpx;
  1413. padding: 0 10rpx;
  1414. text-align: center;
  1415. background: #fff;
  1416. border-radius: 28rpx;
  1417. font-size: 26rpx;
  1418. color: #AE5A2A;
  1419. }
  1420. }
  1421. .setting {
  1422. margin-top: 15rpx;
  1423. margin-left: 15rpx;
  1424. color: #fff;
  1425. .iconfont {
  1426. font-size: 40rpx;
  1427. }
  1428. }
  1429. .page-footer {
  1430. position: fixed;
  1431. bottom: 0;
  1432. z-index: 30;
  1433. display: flex;
  1434. align-items: center;
  1435. justify-content: space-around;
  1436. width: 100%;
  1437. height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
  1438. height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
  1439. box-sizing: border-box;
  1440. border-top: solid 1rpx #F3F3F3;
  1441. background-color: #fff;
  1442. box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
  1443. padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
  1444. padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
  1445. .foot-item {
  1446. display: flex;
  1447. width: max-content;
  1448. align-items: center;
  1449. justify-content: center;
  1450. flex-direction: column;
  1451. position: relative;
  1452. .count-num {
  1453. position: absolute;
  1454. display: flex;
  1455. justify-content: center;
  1456. align-items: center;
  1457. width: 40rpx;
  1458. height: 40rpx;
  1459. top: 0rpx;
  1460. right: -15rpx;
  1461. color: #fff;
  1462. font-size: 20rpx;
  1463. background-color: #FD502F;
  1464. border-radius: 50%;
  1465. padding: 4rpx;
  1466. }
  1467. }
  1468. .foot-item image {
  1469. height: 50rpx;
  1470. width: 50rpx;
  1471. text-align: center;
  1472. margin: 0 auto;
  1473. }
  1474. .foot-item .txt {
  1475. font-size: 24rpx;
  1476. &.active {}
  1477. }
  1478. }
  1479. .new-users {
  1480. padding-bottom: 0;
  1481. padding-bottom: constant(safe-area-inset-bottom);
  1482. padding-bottom: env(safe-area-inset-bottom);
  1483. }
  1484. </style>