index.vue 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310
  1. <template>
  2. <!-- 个人中心模块 -->
  3. <view class="new-users copy-data" :style="{height:pageHeight}">
  4. <!-- 自定义顶部背景颜色 -->
  5. <view class="top" :style="colorStyle">
  6. <!-- #ifdef MP || APP-PLUS -->
  7. <view class="sys-head">
  8. <view class="sys-bar" :style="{height:sysHeight}"></view>
  9. <!-- #ifdef MP -->
  10. <view class="sys-title" :style="member_style==3?'color:#333':''">个人中心</view>
  11. <!-- #endif -->
  12. <view class="bg" :style="member_style==3?'background:#f5f5f5':''"></view>
  13. </view>
  14. <!-- #endif -->
  15. </view>
  16. <!-- 自定义顶部背景颜色 -->
  17. <view class="mid style-add" :style="colorStyle">
  18. <scroll-view scroll-y="true" class="height-add">
  19. <view class="head">
  20. <view class="user-card" :class="member_style==3?'unBg':''"
  21. :style="{backgroundImage:'url('+imgHost+'/statics/images/user01.png'+')'}">
  22. <view class="bg"></view>
  23. <!-- 个人资料展示 -->
  24. <view class="user-info">
  25. <view>
  26. <!-- 公众号未授权时显示 -->
  27. <!-- #ifdef H5 -->
  28. <button class="bntImg" v-if="userInfo.is_complete == 0 && isWeixin && !isLogin"
  29. @click="getWechatuserinfo">
  30. <image class="avatar" src='/static/images/f.png'></image>
  31. <view class="avatarName">获取头像</view>
  32. </button>
  33. <!-- #endif -->
  34. <!-- #ifdef MP -->
  35. <!-- <button class="bntImg" v-if="userInfo.is_complete == 0" @tap="getUserProfile">
  36. <image class="avatar" src='/static/images/f.png'></image>
  37. <view class="avatarName">获取头像</view>
  38. </button> -->
  39. <!-- #endif -->
  40. <!-- #ifndef APP-PLUS -->
  41. <view class="avatar-box" :class="{on:userInfo.is_money_level}">
  42. <image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar"
  43. @click="goEdit()">
  44. </image>
  45. <image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()">
  46. </image>
  47. <view class="headwear" v-if="userInfo.is_money_level && stu">
  48. <image src="/static/images/headwear.png"></image>
  49. </view>
  50. </view>
  51. <!-- #endif -->
  52. <!-- #ifdef APP-PLUS -->
  53. <view class="avatar-box" :class="{on:userInfo.is_money_level}">
  54. <image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar"
  55. @click="goEdit()">
  56. </image>
  57. <image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()">
  58. </image>
  59. <view class="headwear" v-if="userInfo.is_money_level && stu">
  60. <image src="/static/images/headwear.png"></image>
  61. </view>
  62. </view>
  63. <!-- #endif -->
  64. </view>
  65. <view class="info">
  66. <view class="name display-add" v-if="!userInfo.uid" @click="openAuto">
  67. 请点击授权
  68. </view>
  69. <view class="name" v-if="userInfo.uid">
  70. <view class="nickname line1">{{userInfo.nickname}}</view>
  71. <image class="live" :src="userInfo.vip_icon" v-if="parseInt(userInfo.vip_id)">
  72. </image>
  73. <view class="vip" v-if="userInfo.is_money_level> 0 && stu">
  74. <image src="/static/images/svip.png"></image>
  75. </view>
  76. </view>
  77. <view class="num" v-if="userInfo.phone">
  78. <view class="num-txt">{{userInfo.phone}}</view>
  79. <!-- <view class="icon">
  80. <image src="/static/images/edit.png" mode=""></image>
  81. </view> -->
  82. </view>
  83. <view class="phone" v-if="!userInfo.phone && isLogin && userInfo.uid" @tap="bindPhone">
  84. 绑定手机号</view>
  85. </view>
  86. <view v-if="isLogin" class="qrCode message iconfont icon-erweima-xingerenzhongxin"
  87. @click="tapQrCode">
  88. </view>
  89. <view class="message">
  90. <view @click="intoPage('/pages/users/user_set/index')">
  91. <view class="iconfont icon-shezhi"></view>
  92. </view>
  93. </view>
  94. <view class="message">
  95. <view @click="intoPage('/pages/users/message_center/index')">
  96. <!-- <view v-if="userInfo.service_num" class="num">
  97. {{userInfo.service_num >= 100 ? '99+' : userInfo.service_num}}
  98. </view> -->
  99. <uni-badge class="uni-badge-left-margin"
  100. :text="userInfo.service_num >= 100 ? '99+' : userInfo.service_num"
  101. absolute="rightTop">
  102. <view class="iconfont icon-s-kefu"></view>
  103. </uni-badge>
  104. </view>
  105. </view>
  106. <!-- #ifdef MP -->
  107. <!-- <view class="setting" @click="Setting"><text class="iconfont icon-shezhi"></text></view> -->
  108. <!-- #endif -->
  109. </view>
  110. <view class="achsac">
  111. </view>
  112. <!-- <view class="sign" @click="goSignIn">签到</view> -->
  113. <!-- 会员权益 -->
  114. <view class="cardVipA acea-row row-between-wrapper" v-if="member_style==1 && stu && vip_type==2"
  115. :style="{backgroundImage:'url('+imgHost+'/statics/images/member.png'+')'}">
  116. <view class="left-box">
  117. <view v-if="vipStatus == 1" class="small">永久</view>
  118. <view v-else-if="vipStatus == 3" class="small">会员到期
  119. {{ userInfo.overdue_time | dateFormat }}
  120. </view>
  121. <view v-else-if="vipStatus == -1" class="small">已过期</view>
  122. <view v-else-if="vipStatus == 2" class="small">未开通会员</view>
  123. </view>
  124. <view class="acea-row row-middle">
  125. <navigator v-if="vipStatus == 1" url="/pages/annex/vip_paid/index" hover-class="none"
  126. class="btn">查看会员权益
  127. </navigator>
  128. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  129. {{ userInfo.overdue_time ? '立即续费' : '立即激活' }}
  130. </navigator>
  131. <text class="iconfont icon-xiangyou"></text>
  132. </view>
  133. </view>
  134. <view class="cardVipB acea-row row-between" v-if="member_style==3 && stu && vip_type==2">
  135. <view class="left-box acea-row">
  136. <view class="pictrue">
  137. <image src="../../static/images/member01.png"></image>
  138. </view>
  139. <view v-if="vipStatus == 1" class="small">永久</view>
  140. <view v-else-if="vipStatus == 3" class="small">会员到期
  141. {{ userInfo.overdue_time | dateFormat }}
  142. </view>
  143. <view v-else-if="vipStatus == -1" class="small">已过期</view>
  144. <view v-else-if="vipStatus == 2" class="small">未开通会员</view>
  145. </view>
  146. <view class="acea-row">
  147. <navigator v-if="vipStatus == 1" url="/pages/annex/vip_paid/index" hover-class="none"
  148. class="btn">
  149. 会员可享多项权益</navigator>
  150. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  151. {{ userInfo.overdue_time ? '立即续费' : '立即激活' }}
  152. </navigator>
  153. <text class="iconfont icon-xiangyou btn"></text>
  154. </view>
  155. </view>
  156. <view class="cardVipA acea-row row-between-wrapper"
  157. :style="{backgroundImage:'url('+imgHost+'/statics/images/grade.png'+')'}"
  158. v-if="member_style==1 && memberStatus && vip_type==1">
  159. <view class="left-box on">
  160. <view class="small">{{userInfo.level_status==1?userInfo.vip_name:'激活会员卡 解锁更多权益'}}</view>
  161. </view>
  162. <view class="acea-row row-middle">
  163. <!-- 去激活 -->
  164. <navigator
  165. :url="userInfo.level_status==1?'/pages/annex/vip_grade/index':'/pages/annex/vip_grade_active/index'"
  166. hover-class="none" class="btn on">{{userInfo.level_status==1?'查看会员卡':'去激活'}}
  167. </navigator>
  168. <text class="iconfont icon-xiangyou on"></text>
  169. </view>
  170. </view>
  171. <view class="cardVipB acea-row row-between on"
  172. :style="{backgroundImage:'url('+imgHost+'/statics/images/grade01.png'+')'}"
  173. v-if="member_style==3 && memberStatus && vip_type==1">
  174. <view class="small">{{userInfo.level_status==1?userInfo.vip_name:'激活会员卡 解锁更多权益'}}</view>
  175. <view class="acea-row">
  176. <navigator
  177. :url="userInfo.level_status==1?'/pages/annex/vip_grade/index':'/pages/annex/vip_grade_active/index'"
  178. hover-class="none" class="btn on">{{userInfo.level_status==1?'查看会员卡':'去激活'}}
  179. </navigator>
  180. <text class="iconfont icon-xiangyou"></text>
  181. </view>
  182. </view>
  183. </view>
  184. <view class="card-vip" v-if="member_style==2 && stu && vip_type==2">
  185. <view class="left-box">
  186. <!-- <view class="big">会员可享多项权益</view> -->
  187. <view v-if="vipStatus == 1" class="small">永久</view>
  188. <view v-else-if="vipStatus == 3" class="small">会员到期
  189. {{ userInfo.overdue_time | dateFormat }}
  190. </view>
  191. <view v-else-if="vipStatus == -1" class="small">已过期</view>
  192. <view v-else-if="vipStatus == 2" class="small">未开通会员</view>
  193. </view>
  194. <view class="acea-row">
  195. <navigator v-if="vipStatus == 1" url="/pages/annex/vip_paid/index" hover-class="none"
  196. class="btn">查看会员权益
  197. </navigator>
  198. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  199. {{ userInfo.overdue_time ? '立即续费' : '立即激活' }}
  200. </navigator>
  201. <text class="iconfont icon-xiangyou"></text>
  202. </view>
  203. </view>
  204. <view class="card-vip on" v-if="member_style==2 && memberStatus && vip_type==1"
  205. :style="{backgroundImage:'url('+imgHost+'/statics/images/grade01.png'+')'}">
  206. <view class="left-box">
  207. <view class="small">{{userInfo.level_status==1?userInfo.vip_name:'激活会员卡 解锁更多权益'}}</view>
  208. </view>
  209. <view class="acea-row">
  210. <navigator
  211. :url="userInfo.level_status==1?'/pages/annex/vip_grade/index':'/pages/annex/vip_grade_active/index'"
  212. hover-class="none" class="btn">{{userInfo.level_status==1?'查看会员卡':'去激活'}}</navigator>
  213. <text class="iconfont icon-xiangyou"></text>
  214. </view>
  215. </view>
  216. <view class="num-wrapper"
  217. :class="[member_style==3?'unNum-wrapper':member_style==2?'Tnum-wrapper':'',((vip_type==2 && stu) || (vip_type==1 && memberStatus))?'':'height']"
  218. v-if="userInfo.uid">
  219. <view class="num-item" v-show="userInfo.balance_func_status"
  220. @click="goMenuPage('/pages/users/user_money/index')">
  221. <text class="num">{{userInfo.now_money || 0}}</text>
  222. <view class="txt">余额</view>
  223. </view>
  224. <view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
  225. <text class="num">{{userInfo.couponCount || 0}}</text>
  226. <view class="txt">优惠券</view>
  227. </view>
  228. <view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
  229. <text class="num">{{userInfo.integral || 0}}</text>
  230. <view class="txt">积分</view>
  231. </view>
  232. <view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
  233. <text class="num">{{userInfo.collectCount || 0}}</text>
  234. <view class="txt">收藏</view>
  235. </view>
  236. <view class="num-item" @click="goMenuPage('/pages/users/visit_list/index')">
  237. <text class="num">{{userInfo.visit_num || 0}}</text>
  238. <view class="txt">浏览记录</view>
  239. </view>
  240. </view>
  241. <!-- 新人礼物 -->
  242. <view class="num-wrapper on" v-if="!userInfo.uid">
  243. <image :src="giftPic" mode="" class="img"></image>
  244. <view class="text">
  245. 登录即获得<text class="gift">新人大礼包</text>
  246. </view>
  247. <view class="btn-login" @click="openAuto">去登录</view>
  248. </view>
  249. <!-- 新人专享 -->
  250. <view class="newcomersCon" :class="newcomer_style==1?'':'on'"
  251. v-if="newList.length && newcomer_status==1">
  252. <view class="newcomers"
  253. :style="{backgroundImage:'url('+ (newcomer_style==1?imgHost+'/statics/images/new-bg.png':newBg) +')'}">
  254. <view class="title">
  255. <view class="tl">
  256. 新人专享
  257. </view>
  258. <view class="tr acea-row row-center-wrapper" @click="goNewcomers">
  259. 更多 <text class="iconfont icon-xiangyou"></text>
  260. </view>
  261. </view>
  262. <scroll-view scroll-x="true" class="scroll">
  263. <view class="scroll-item" v-for="(item,index) in newList" :key="index"
  264. @click="goDetail(item)">
  265. <view class="pictrue">
  266. <image :src='item.image'></image>
  267. <view class="label">新人价</view>
  268. </view>
  269. <view class="money">¥{{item.price}}</view>
  270. </view>
  271. </scroll-view>
  272. </view>
  273. </view>
  274. <!-- 订单中心 -->
  275. <view class="order-wrapper">
  276. <view class="order-hd flex">
  277. <view class="left">订单中心</view>
  278. <view class="right flex" @click="intoPage('/pages/goods/order_list/index')">
  279. 查看全部
  280. <text class="iconfont icon-xiangyou"></text>
  281. </view>
  282. </view>
  283. <view class="order-bd">
  284. <block v-for="(item,index) in orderMenu" :key="index">
  285. <view class="order-item" @click="intoPage(item.url)">
  286. <view class="pic">
  287. <!-- <image :src="item.img" mode=""></image> -->
  288. <text class="iconfont" :class="item.img"></text>
  289. <uni-badge class="uni-badge-left-margin" v-if="item.num>0" :text="item.num"
  290. absolute="rightTop"></uni-badge>
  291. <!-- <text class="order-status-num" v-if="item.num > 0">{{ item.num }}</text> -->
  292. </view>
  293. <view class="txt">{{item.title}}</view>
  294. </view>
  295. </block>
  296. </view>
  297. </view>
  298. </view>
  299. <!-- 轮播 -->
  300. <view class="slider-wrapper" v-if="imgUrls.length>0 && my_banner_status">
  301. <swiper indicator-dots="true" :autoplay="autoplay" :circular="circular" :interval="interval"
  302. :duration="duration" indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff">
  303. <block v-for="(item,index) in imgUrls" :key="index">
  304. <swiper-item>
  305. <navigator @click="goMenuPage(item.url)"
  306. class='slide-navigator acea-row row-between-wrapper' hover-class='none'>
  307. <image :src="item.pic" class="slide-image"></image>
  308. </navigator>
  309. </swiper-item>
  310. </block>
  311. </swiper>
  312. </view>
  313. <!-- 会员菜单二 -->
  314. <view class="menus-list" v-if="menu_status == 2 && MyMenus.length">
  315. <view class="title">我的服务</view>
  316. <!-- #ifdef APP-PLUS || H5 -->
  317. <block v-for="(item,index) in MyMenus" :key="index">
  318. <view class="item acea-row row-between-wrapper"
  319. v-if="item.url!='#' && item.url!='/pages/service/index'"
  320. @click="goMenuPage(item.url, item.name)">
  321. <image :src="item.pic"></image>
  322. <view class="text acea-row row-between-wrapper">
  323. <view>{{item.name}}</view>
  324. <view class="iconfont icon-xiangyou"></view>
  325. </view>
  326. </view>
  327. </block>
  328. <!-- #endif -->
  329. <!-- #ifdef MP -->
  330. <block v-for="(item,index) in MyMenus" :key="index">
  331. <view class="item acea-row row-between-wrapper" v-if="item.url!='#'
  332. && item.url!='/pages/service/index'
  333. && item.url!='/pages/extension/customer_list/chat'
  334. || (item.url=='/pages/extension/customer_list/chat' && routineContact == 0)"
  335. @click="goMenuPage(item.url, item.name)">
  336. <image :src="item.pic"></image>
  337. <view class="text acea-row row-between-wrapper">
  338. <view>{{item.name}}</view>
  339. <view class="iconfont icon-xiangyou"></view>
  340. </view>
  341. </view>
  342. </block>
  343. <button class="item acea-row row-between-wrapper" open-type='contact' v-if="routineContact == 1">
  344. <image src="/static/images/contact.png"></image>
  345. <view class="text acea-row row-between-wrapper">
  346. <view>联系客服</view>
  347. <view class="iconfont icon-xiangyou"></view>
  348. </view>
  349. </button>
  350. <!-- #endif -->
  351. <!-- #ifdef APP-PLUS -->
  352. <view class="item acea-row row-between-wrapper" hover-class="none"
  353. @click="goMenuPage('/pages/users/privacy/index')">
  354. <image src="/static/images/menu.png"></image>
  355. <view class="text acea-row row-between-wrapper">
  356. <view>隐私协议</view>
  357. <view class="iconfont icon-xiangyou"></view>
  358. </view>
  359. </view>
  360. <!-- #endif -->
  361. </view>
  362. <!-- 会员菜单一 -->
  363. <view class="user-menus" style="margin-top: 25rpx;" v-if="menu_status == 1 && MyMenus.length">
  364. <view class="menu-title">我的服务</view>
  365. <view class="list-box">
  366. <!-- #ifdef APP-PLUS || H5 -->
  367. <block v-for="(item,index) in MyMenus" :key="index">
  368. <view class="item" v-if="item.url!='#' && item.url!='/pages/service/index'"
  369. @click="goMenuPage(item.url, item.name)">
  370. <image :src="item.pic"></image>
  371. <text>{{item.name}}</text>
  372. </view>
  373. </block>
  374. <!-- #endif -->
  375. <!-- #ifdef MP -->
  376. <block v-for="(item,index) in MyMenus" :key="index">
  377. <view class="item" v-if="item.url!='#'
  378. && item.url!='/pages/service/index'
  379. && item.url!='/pages/extension/customer_list/chat'
  380. || (item.url=='/pages/extension/customer_list/chat' && routineContact == 0)"
  381. @click="goMenuPage(item.url, item.name)">
  382. <image :src="item.pic"></image>
  383. <text>{{item.name}}</text>
  384. </view>
  385. </block>
  386. <button class="item" open-type='contact' v-if="routineContact == 1">
  387. <image src="/static/images/contact.png"></image>
  388. <text>联系客服</text>
  389. </button>
  390. <!-- #endif -->
  391. <!-- #ifdef APP-PLUS -->
  392. <view class="item" hover-class="none"
  393. @click="goMenuPage('/pages/users/privacy/index?type=privacy')">
  394. <image src="/static/images/menu.png"></image>
  395. <text>隐私协议</text>
  396. </view>
  397. <!-- #endif -->
  398. </view>
  399. </view>
  400. <view class="user-menus" style="margin-top: 25rpx;" v-if="service_status == 1 && storeMenu.length">
  401. <view class="menu-title">商家管理</view>
  402. <view class="list-box">
  403. <block v-for="(item,index) in storeMenu" :key="index">
  404. <view class="item" :url="item.url" v-if="item.url!='#' && item.url!='/pages/service/index'"
  405. @click="goMenuPage(item.url, item.name)">
  406. <image :src="item.pic"></image>
  407. <text>{{item.name}}</text>
  408. </view>
  409. </block>
  410. </view>
  411. </view>
  412. <view class="menus-list" v-if="service_status == 2 && storeMenu.length">
  413. <view class="title">商家管理</view>
  414. <block v-for="(item,index) in storeMenu" :key="index">
  415. <view class="item acea-row row-between-wrapper" :url="item.url" hover-class="none"
  416. v-if="item.url!='#' && item.url!='/pages/service/index'"
  417. @click="goMenuPage(item.url, item.name)">
  418. <image :src="item.pic"></image>
  419. <view class="text acea-row row-between-wrapper">
  420. <view>{{item.name}}</view>
  421. <view class="iconfont icon-xiangyou"></view>
  422. </view>
  423. </view>
  424. </block>
  425. </view>
  426. <view class="menus-list" v-if="userInfo.adminid ||( service_status == 1 && storeMenu.length)">
  427. <!-- <view class="menus-list"> -->
  428. <view class="title">员工功能</view>
  429. <view class="item acea-row row-between-wrapper" hover-class="none"
  430. @click="goMenuPage('/pages/goods/order_list/ygOrder', '我的订单')">
  431. <image src="/static/images/staffSq.png"></image>
  432. <view class="text acea-row row-between-wrapper">
  433. <view>我的订单</view>
  434. <view class="iconfont icon-xiangyou"></view>
  435. </view>
  436. </view>
  437. <view class="item acea-row row-between-wrapper" hover-class="none"
  438. @click="goMenuPage('/pages/users/user_spread_money/index?type=2', '我的佣金')">
  439. <image src="/static/images/staffOrder.png"></image>
  440. <view class="text acea-row row-between-wrapper">
  441. <view>我的佣金</view>
  442. <view class="iconfont icon-xiangyou"></view>
  443. </view>
  444. </view>
  445. <view class="item acea-row row-between-wrapper" hover-class="none"
  446. @click="goMenuPage('/pages/users/user_spread_money/index?type=5', '我的股权')">
  447. <image src="/static/images/guquan.png"></image>
  448. <view class="text acea-row row-between-wrapper">
  449. <view>我的股权</view>
  450. <view class="iconfont icon-xiangyou"></view>
  451. </view>
  452. </view>
  453. <view class="item acea-row row-between-wrapper" hover-class="none"
  454. @click="goMenuPage('/pages/users/user_spread_money/index?type=6', '我的业绩')">
  455. <image src="/static/images/myyj.png"></image>
  456. <view class="text acea-row row-between-wrapper">
  457. <view>我的业绩</view>
  458. <view class="iconfont icon-xiangyou"></view>
  459. </view>
  460. </view>
  461. <view class="item acea-row row-between-wrapper" hover-class="none"
  462. @click="goMenuPage('/pages/users/user_spread_money/index?type=4', '我的提现')">
  463. <image src="/static/images/staffTarget.png"></image>
  464. <view class="text acea-row row-between-wrapper">
  465. <view>提现记录</view>
  466. <view class="iconfont icon-xiangyou"></view>
  467. </view>
  468. </view>
  469. <view class="item acea-row row-between-wrapper" hover-class="none"
  470. @click="goMenuPage('/pages/users/user_cash/index', '立即提现')">
  471. <image src="/static/images/staffMoney.png"></image>
  472. <view class="text acea-row row-between-wrapper">
  473. <view>立即提现</view>
  474. <view class="iconfont icon-xiangyou"></view>
  475. </view>
  476. </view>
  477. </view>
  478. <view class="copy_right">
  479. <template v-if='copyRightText'>
  480. <image :src="copyRightImg" mode="aspectFill" class="copyRightImg"></image>
  481. <view class="copyRightText">
  482. {{copyRightText}}
  483. </view>
  484. </template>
  485. <image v-else :src="copyRightImg" mode="aspectFill" class='support'></image>
  486. </view>
  487. <view class="uni-p-b-98"></view>
  488. </scroll-view>
  489. </view>
  490. <view class="codePopup" :style="colorStyle" v-show="isCode">
  491. <view class="header acea-row row-between-wrapper">
  492. <view class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
  493. v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
  494. </view>
  495. <view>
  496. <view class="acea-row row-center-wrapper">
  497. <w-barcode :options="config.bar"></w-barcode>
  498. </view>
  499. <view class="acea-row row-center-wrapper" style="margin-top: 35rpx;">
  500. <w-qrcode :options="config.qrc" @generate="hello"></w-qrcode>
  501. </view>
  502. <view class="codeNum">{{config.bar.code}}</view>
  503. <view class="tip">如遇到扫码失败请将屏幕调至最亮重新扫码</view>
  504. </view>
  505. <view class="iconfont icon-guanbi2" @click="closeCode"></view>
  506. </view>
  507. <view class="mark" v-if="isCode"></view>
  508. <pageFooter :style="colorStyle"></pageFooter>
  509. <!-- 店员推广码 extension-->
  510. <view class="codePopup heg" :style="colorStyle" v-show="isextension">
  511. <view class="header">
  512. <view class="title on" style="width: 100%;">店员推广码</view>
  513. </view>
  514. <view>
  515. <view class="acea-row row-center-wrapper" style="margin-top: 25rpx;" @click="hah">
  516. <w-qrcode id="hah" :options="extension"></w-qrcode>
  517. </view>
  518. <view class="tip">如遇到扫码失败请将屏幕调至最亮重新扫码</view>
  519. </view>
  520. <view class="iconfont icon-guanbi2" @click="closeCode"></view>
  521. </view>
  522. <view class="mark" v-show="isextension"></view>
  523. <ewcomerPop v-if="isComerGift" :comerGift="comerGift" @comerPop="comerPop"></ewcomerPop>
  524. <!-- #ifdef MP -->
  525. <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
  526. <editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
  527. <!-- #endif -->
  528. </view>
  529. </template>
  530. <script>
  531. let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  532. import {
  533. storeCardApi
  534. } from '@/api/store.js';
  535. import {
  536. newcomerGift
  537. } from '@/api/new_store.js';
  538. import {
  539. newcomerList,
  540. copyRight
  541. } from '@/api/api.js';
  542. import {
  543. getMenuList,
  544. getUserInfo,
  545. setVisit,
  546. updateUserInfo,
  547. getRandCode,
  548. updateWechatInfo
  549. } from '@/api/user.js';
  550. import {
  551. wechatAuthV2,
  552. silenceAuth
  553. } from '@/api/public.js'
  554. import {
  555. toLogin
  556. } from '@/libs/login.js';
  557. import {
  558. mapState,
  559. mapGetters
  560. } from "vuex";
  561. // #ifdef H5
  562. import Auth from '@/libs/wechat';
  563. // #endif
  564. import {
  565. HTTP_REQUEST_URL
  566. } from '@/config/app';
  567. const app = getApp();
  568. import ewcomerPop from '@/components/ewcomerPop/index.vue'
  569. import pageFooter from '@/components/pageFooter/index.vue'
  570. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  571. import Routine from '@/libs/routine';
  572. import colors from '@/mixins/color';
  573. // #ifdef MP
  574. import editUserModal from '@/components/eidtUserModal/index.vue';
  575. // #endif
  576. export default {
  577. components: {
  578. pageFooter,
  579. ewcomerPop,
  580. // #ifdef MP
  581. editUserModal
  582. // #endif
  583. },
  584. computed: {
  585. ...mapGetters({
  586. cartNum: 'cartNum',
  587. isLogin: 'isLogin'
  588. })
  589. },
  590. filters: {
  591. coundTime(val) {
  592. var setTime = val * 1000
  593. var nowTime = new Date()
  594. var rest = setTime - nowTime.getTime()
  595. var day = parseInt(rest / (60 * 60 * 24 * 1000))
  596. // var hour = parseInt(rest/(60*60*1000)%24) //小时
  597. return day + '天'
  598. },
  599. dateFormat: function(value) {
  600. return dayjs(value * 1000).format('YYYY-MM-DD');
  601. }
  602. },
  603. mixins: [colors],
  604. data() {
  605. return {
  606. vipStatus: 0,
  607. stu: false,
  608. storeMenu: [], // 商家管理
  609. orderMenu: [{
  610. img: 'icon-daifukuan',
  611. title: '待付款',
  612. url: '/pages/goods/order_list/index?status=0'
  613. },
  614. {
  615. img: 'icon-daifahuo',
  616. title: '待发货',
  617. url: '/pages/goods/order_list/index?status=1'
  618. },
  619. {
  620. img: 'icon-daishouhuo',
  621. title: '待收货',
  622. url: '/pages/goods/order_list/index?status=2'
  623. },
  624. {
  625. img: 'icon-daipingjia',
  626. title: '待评价',
  627. url: '/pages/goods/order_list/index?status=3'
  628. },
  629. {
  630. img: 'icon-a-shouhoutuikuan',
  631. title: '售后/退款',
  632. url: '/pages/users/user_return_list/index'
  633. },
  634. ],
  635. imgUrls: [],
  636. autoplay: true,
  637. circular: true,
  638. interval: 3000,
  639. duration: 500,
  640. isAuto: false, //没有授权的不会自动授权
  641. //isShowAuth: false, //是否隐藏授权
  642. orderStatusNum: {},
  643. userInfo: {},
  644. MyMenus: [],
  645. sysHeight: sysHeight,
  646. mpHeight: 0,
  647. showStatus: 1,
  648. // #ifdef H5 || MP
  649. pageHeight: '100%',
  650. routineContact: 0,
  651. // #endif
  652. // #ifdef APP-PLUS
  653. pageHeight: app.globalData.windowHeight,
  654. // #endif
  655. // #ifdef H5
  656. isWeixin: Auth.isWeixin(),
  657. //#endif
  658. footerSee: false,
  659. member_style: 1,
  660. my_banner_status: 1,
  661. menu_status: 1,
  662. service_status: 1,
  663. newcomer_status: 1,
  664. codeList: [{
  665. name: '会员码'
  666. }, {
  667. name: '付款码'
  668. }],
  669. codeIndex: 0,
  670. config: {
  671. bar: {
  672. code: '',
  673. color: ['#000'],
  674. bgColor: '#FFFFFF', // 背景色
  675. width: 480, // 宽度
  676. height: 110 // 高度
  677. },
  678. qrc: {
  679. code: '',
  680. size: 380, // 二维码大小
  681. level: 3, //等级 0~4
  682. bgColor: '#FFFFFF', //二维码背景色 默认白色
  683. border: {
  684. color: ['#eee', '#eee'], //边框颜色支持渐变色
  685. lineWidth: 3, //边框宽度
  686. },
  687. // img: '/static/logo.png', //图片
  688. // iconSize: 40, //二维码图标的大小
  689. color: ['#333', '#333'], //边框颜色支持渐变色
  690. }
  691. },
  692. isCode: false,
  693. isextension: false,
  694. extension: {
  695. code: "",
  696. size: 380, // 二维码大小
  697. level: 3, //等级 0~4
  698. bgColor: '#FFFFFF', //二维码背景色 默认白色
  699. border: {
  700. color: ['#eee', '#eee'], //边框颜色支持渐变色
  701. lineWidth: 3, //边框宽度
  702. },
  703. // img: '/static/logo.png', //图片
  704. // iconSize: 40, //二维码图标的大小
  705. color: ['#333', '#333'], //边框颜色支持渐变色
  706. },
  707. imgHost: HTTP_REQUEST_URL,
  708. copyRightText: "",
  709. copyRightImg: '',
  710. giftPic: '',
  711. vip_type: 1,
  712. newcomer_style: 1,
  713. newList: [],
  714. newBg: '',
  715. comerGift: {},
  716. isComerGift: false,
  717. memberStatus: 0,
  718. editModal: false, // 编辑头像信息
  719. }
  720. },
  721. created() {
  722. let that = this;
  723. // #ifdef MP
  724. // 小程序静默授权
  725. if (!this.$store.getters.isLogin) {
  726. // Routine.getCode()
  727. // .then(code => {
  728. // Routine.silenceAuth(code).then(res => {
  729. // this.onLoadFun();
  730. // })
  731. // })
  732. // .catch(res => {
  733. // uni.hideLoading();
  734. // });
  735. }
  736. // #endif
  737. if (that.isLogin == false) {
  738. // #ifdef H5 || APP-PLUS
  739. toLogin()
  740. // #endif
  741. // #ifdef MP
  742. //this.isShowAuth = true;
  743. // #endif
  744. }
  745. // #ifdef APP-PLUS
  746. that.$set(that, 'pageHeight', app.globalData.windowHeight);
  747. // #endif
  748. },
  749. async onLoad(option) {
  750. if (this.isLogin) {
  751. this.getNewcomerGift();
  752. }
  753. // #ifdef H5
  754. if (this.isLogin && Auth.isWeixin() && option.code) {
  755. try {
  756. let res = await updateWechatInfo({
  757. code: option.code
  758. });
  759. this.userInfo.nickname = res.data.nickname;
  760. this.userInfo.avatar = res.data.avatar;
  761. this.userInfo.is_complete = 1;
  762. } catch (e) {}
  763. }
  764. // #endif
  765. this.colorData();
  766. let giftList = [
  767. this.imgHost + '/statics/images/gift01.png',
  768. this.imgHost + '/statics/images/gift02.png',
  769. this.imgHost + '/statics/images/gift03.png',
  770. this.imgHost + '/statics/images/gift04.png',
  771. this.imgHost + '/statics/images/gift05.png',
  772. this.imgHost + '/statics/images/gift06.png'
  773. ];
  774. let newBg = [
  775. this.imgHost + '/statics/images/blue-bg.png',
  776. this.imgHost + '/statics/images/green-bg.png',
  777. this.imgHost + '/statics/images/red-bg.png',
  778. this.imgHost + '/statics/images/pink-bg.png',
  779. this.imgHost + '/statics/images/orange-bg.png',
  780. this.imgHost + '/statics/images/gold-bg.png'
  781. ]
  782. setTimeout(() => {
  783. switch (this.colorNum) {
  784. case 1:
  785. this.giftPic = giftList[2];
  786. this.newBg = newBg[0];
  787. break;
  788. case 2:
  789. this.giftPic = giftList[1];
  790. this.newBg = newBg[1];
  791. break;
  792. case 3:
  793. this.giftPic = giftList[4];
  794. this.newBg = newBg[2];
  795. break;
  796. case 4:
  797. this.giftPic = giftList[0];
  798. this.newBg = newBg[3];
  799. break;
  800. case 5:
  801. this.giftPic = giftList[3];
  802. this.newBg = newBg[4];
  803. break;
  804. case 6:
  805. this.giftPic = giftList[5];
  806. this.newBg = newBg[5];
  807. break;
  808. default:
  809. this.giftPic = giftList[4];
  810. this.newBg = newBg[2];
  811. break
  812. }
  813. }, 1)
  814. },
  815. onReady() {
  816. let self = this
  817. // #ifdef MP
  818. let info = uni.createSelectorQuery().select(".sys-head");
  819. info.boundingClientRect(function(data) { //data - 各种参数
  820. self.mpHeight = data.height
  821. }).exec()
  822. // #endif
  823. },
  824. onShow: function() {
  825. this.getNewList();
  826. if (this.cartNum > 0) {
  827. uni.setTabBarBadge({
  828. index: 3,
  829. text: this.cartNum > 99 ? '99+' : this.cartNum + ''
  830. })
  831. } else {
  832. uni.hideTabBarRedDot({
  833. index: 3
  834. })
  835. }
  836. this.copyRightText = uni.getStorageSync('copyNameInfo');
  837. this.copyRightImg = uni.getStorageSync('copyImageInfo');
  838. uni.removeStorageSync('form_type_cart');
  839. if (!this.copyRightText) {
  840. this.getCopyRight();
  841. }
  842. let that = this;
  843. // #ifdef APP-PLUS
  844. uni.getSystemInfo({
  845. success: function(res) {
  846. that.pageHeight = res.windowHeight + 'px'
  847. }
  848. });
  849. // #endif
  850. if (that.isLogin) {
  851. // #ifdef MP
  852. // this.isShowAuth = false;
  853. // #endif
  854. this.getUserInfo();
  855. this.getMyMenus();
  856. this.setVisit();
  857. };
  858. },
  859. methods: {
  860. // #ifdef MP
  861. editSuccess() {
  862. this.editModal = false;
  863. this.getUserInfo();
  864. },
  865. closeEdit() {
  866. this.editModal = false;
  867. },
  868. // #endif
  869. getCopyRight() {
  870. copyRight().then(res => {
  871. let data = res.data;
  872. if (!data.copyrightContext && !data.copyrightImage) {
  873. data.copyrightImage = '/static/images/support.png'
  874. }
  875. uni.setStorageSync('copyNameInfo', data.copyrightContext);
  876. uni.setStorageSync('copyImageInfo', data.copyrightImage);
  877. this.copyRightText = data.copyrightContext;
  878. this.copyRightImg = data.copyrightImage;
  879. }).catch(err => {
  880. return this.$util.Tips({
  881. title: err.msg
  882. });
  883. });
  884. },
  885. // 查看订单
  886. intoPage(url) {
  887. if (this.isLogin) {
  888. uni.navigateTo({
  889. url: url
  890. })
  891. } else {
  892. toLogin()
  893. }
  894. },
  895. goDetail(item) {
  896. uni.navigateTo({
  897. url: `/pages/goods_details/index?id=${item.id}&fromPage='newVip'`
  898. });
  899. },
  900. comerPop() {
  901. this.isComerGift = false;
  902. },
  903. getNewcomerGift() {
  904. if (uni.getStorageSync('newcomerGift')) {
  905. return this.isComerGift = false;
  906. }
  907. newcomerGift().then(res => {
  908. this.comerGift = res.data;
  909. if (Object.prototype.toString.call(this.comerGift) == '[object Object]') {
  910. if (res.data.coupon_count || res.data.product_count || res.data.register_give_money || res
  911. .data.first_order_discount || res.data.register_give_integral) {
  912. uni.setStorageSync('newcomerGift', true);
  913. this.isComerGift = true;
  914. }
  915. }
  916. }).catch(err => {
  917. return this.$util.Tips({
  918. title: err
  919. });
  920. })
  921. },
  922. getNewList() {
  923. newcomerList({
  924. page: 1,
  925. limit: 6,
  926. priceOrder: '',
  927. salesOrder: ''
  928. }).then(res => {
  929. this.newList = res.data;
  930. }).catch(err => {
  931. return this.$util.Tips({
  932. title: err
  933. });
  934. })
  935. },
  936. hah() {
  937. let that = this
  938. // #ifdef H5
  939. var canvas = document.getElementById("hah").getElementsByTagName("canvas")
  940. var imgURL = canvas[0].toDataURL("image/png")
  941. var dlLink = document.createElement('a');
  942. dlLink.download = "店员推广码";
  943. dlLink.href = imgURL;
  944. dlLink.dataset.downloadurl = ["image/png", dlLink.download, dlLink.href].join(':');
  945. document.body.appendChild(dlLink);
  946. dlLink.click();
  947. document.body.removeChild(dlLink);
  948. // #endif
  949. // #ifdef MP
  950. // let ctx = uni.createCanvasContext("WQrcode")
  951. // let ctx = uni.createSelectorQuery().in(this).select("canvas")
  952. // uni.canvasToTempFilePath({
  953. // canvasId: "WQrcode",
  954. // fileType: 'image/png',
  955. // success: (res) => {
  956. // // 保存当前绘制推广码
  957. // that.savePic(res.tempFilePath)
  958. // },
  959. // fail: function(err) {
  960. // console.log(err, '推广码生成失败')
  961. // }
  962. // },that)
  963. // ctx.draw(false, uni.canvasToTempFilePath({
  964. // canvasId: 'WQrcode',
  965. // success: function (res) {
  966. // that.savePic(res.tempFilePath)
  967. // },
  968. // fail: function (err) {
  969. // console.log(err, '推广码生成失败')
  970. // }
  971. // },that))
  972. // console.log("222222",ctx)
  973. // #endif
  974. // #ifdef APP-PLUS
  975. uni.canvasToTempFilePath({
  976. canvasId: 'WQrcode',
  977. success: (res) => {
  978. uni.hideLoading()
  979. // 保存当前绘制推广码
  980. that.savePic(res.tempFilePath)
  981. },
  982. fail: function(err) {
  983. console.log(err, '推广码生成失败')
  984. }
  985. })
  986. // #endif
  987. },
  988. //保存推广码到本地
  989. savePic(filePath) {
  990. // #ifdef APP-PLUS
  991. uni.showLoading({
  992. title: '正在保存'
  993. });
  994. uni.saveImageToPhotosAlbum({
  995. filePath: filePath,
  996. success: function() {
  997. uni.showToast({
  998. title: '推广码保存成功~'
  999. });
  1000. },
  1001. fail: function(e) {
  1002. console.log(e, '推广码保存失败')
  1003. },
  1004. complete: function() {
  1005. uni.hideLoading()
  1006. }
  1007. });
  1008. // #endif
  1009. },
  1010. hello(res) {
  1011. // console.log(321,res)
  1012. },
  1013. // 前往新人专享
  1014. goNewcomers() {
  1015. uni.navigateTo({
  1016. url: '/pages/store/newcomers/index'
  1017. })
  1018. },
  1019. getCode() {
  1020. getRandCode().then(res => {
  1021. let code = res.data.code;
  1022. this.config.bar.code = code;
  1023. this.config.qrc.code = code;
  1024. }).catch(err => {
  1025. return this.$util.Tips(err);
  1026. })
  1027. },
  1028. tapQrCode() {
  1029. this.isCode = true;
  1030. this.codeIndex = 0;
  1031. this.$nextTick(function() {
  1032. let code = this.userInfo.bar_code;
  1033. this.config.bar.code = code;
  1034. this.config.qrc.code = code;
  1035. })
  1036. },
  1037. closeCode() {
  1038. this.isCode = false
  1039. this.isextension = false
  1040. },
  1041. tapCode(index) {
  1042. this.codeIndex = index;
  1043. if (index == 1) {
  1044. this.getCode();
  1045. } else {
  1046. let code = this.userInfo.bar_code;
  1047. this.config.bar.code = code;
  1048. this.config.qrc.code = code;
  1049. }
  1050. },
  1051. getWechatuserinfo() {
  1052. //#ifdef H5
  1053. Auth.isWeixin() && Auth.toAuth('snsapi_userinfo', '/pages/user/index');
  1054. //#endif
  1055. },
  1056. getRoutineUserInfo(e) {
  1057. updateUserInfo({
  1058. userInfo: e.detail.userInfo
  1059. }).then(res => {
  1060. this.getUserInfo();
  1061. return this.$util.Tips('更新用户信息成功');
  1062. }).catch(err => {
  1063. return this.$util.Tips(err);
  1064. })
  1065. },
  1066. // 记录会员访问
  1067. setVisit() {
  1068. setVisit({
  1069. url: '/pages/user/index'
  1070. }).then(res => {})
  1071. },
  1072. // 打开授权
  1073. openAuto() {
  1074. toLogin();
  1075. },
  1076. // 授权回调
  1077. onLoadFun(e) {
  1078. this.getUserInfo(e);
  1079. this.getMyMenus();
  1080. this.setVisit();
  1081. this.isShowAuth = false;
  1082. },
  1083. Setting: function() {
  1084. uni.openSetting({
  1085. success: function(res) {}
  1086. });
  1087. },
  1088. // 授权关闭
  1089. authColse: function(e) {
  1090. this.isShowAuth = e
  1091. },
  1092. // 绑定手机
  1093. bindPhone() {
  1094. uni.navigateTo({
  1095. url: '/pages/users/user_phone/index'
  1096. })
  1097. },
  1098. /**
  1099. * 获取个人用户信息
  1100. */
  1101. getUserInfo: function() {
  1102. let that = this;
  1103. getUserInfo().then(res => {
  1104. that.userInfo = res.data
  1105. console.log(that.userInfo, ' that.userInfo');
  1106. that.stu = res.data.svip_open
  1107. that.memberStatus = parseInt(res.data.member_func_status)
  1108. that.vipStatus = res.data.vip_status
  1109. that.$store.commit("SETUID", res.data.uid);
  1110. that.$store.commit("UPDATE_USERINFO", res.data);
  1111. that.orderMenu.forEach((item, index) => {
  1112. switch (item.title) {
  1113. case '待付款':
  1114. item.num = res.data.orderStatusNum.unpaid_count
  1115. break
  1116. case '待发货':
  1117. item.num = res.data.orderStatusNum.unshipped_count
  1118. break
  1119. case '待收货':
  1120. item.num = res.data.orderStatusNum.received_count
  1121. break
  1122. case '待评价':
  1123. item.num = res.data.orderStatusNum.evaluated_count
  1124. break
  1125. case '售后/退款':
  1126. item.num = res.data.orderStatusNum.refunding_count
  1127. break
  1128. }
  1129. })
  1130. });
  1131. },
  1132. //小程序授权api替换 getUserInfo
  1133. getUserProfile() {
  1134. uni.showLoading({
  1135. title: '获取中'
  1136. });
  1137. let self = this;
  1138. Routine.getUserProfile()
  1139. .then(res => {
  1140. Routine.getCode()
  1141. .then(code => {
  1142. let userInfo = res.userInfo;
  1143. userInfo.code = code;
  1144. userInfo.spread_spid = app.globalData.spid; //获取推广人ID
  1145. userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
  1146. Routine.authUserInfo(userInfo)
  1147. .then(res => {
  1148. if (res.data.key !== undefined && res.data.key) {
  1149. uni.hideLoading();
  1150. self.authKey = res.data.key;
  1151. self.isPhoneBox = true;
  1152. } else {
  1153. uni.hideLoading();
  1154. let time = res.data.expires_time - self.$Cache.time();
  1155. self.$store.commit('LOGIN', {
  1156. token: res.data.token,
  1157. time: time
  1158. });
  1159. this.getUserInfo()
  1160. }
  1161. })
  1162. .catch(res => {
  1163. uni.hideLoading();
  1164. uni.showToast({
  1165. title: res.msg,
  1166. icon: 'none',
  1167. duration: 2000
  1168. });
  1169. });
  1170. })
  1171. .catch(res => {
  1172. uni.hideLoading();
  1173. });
  1174. })
  1175. .catch(res => {
  1176. uni.hideLoading();
  1177. });
  1178. },
  1179. /**
  1180. *
  1181. * 获取个人中心图标
  1182. */
  1183. switchTab(order) {
  1184. this.orderMenu.forEach((item, index) => {
  1185. switch (item.title) {
  1186. case '待付款':
  1187. item.img = order.dfk
  1188. break
  1189. case '待发货':
  1190. item.img = order.dfh
  1191. break
  1192. case '待收货':
  1193. item.img = order.dsh
  1194. break
  1195. case '待评价':
  1196. item.img = order.dpj
  1197. break
  1198. case '售后/退款':
  1199. item.img = order.sh
  1200. break
  1201. }
  1202. })
  1203. },
  1204. getMyMenus: function() {
  1205. let that = this;
  1206. // if (this.MyMenus.length) return;
  1207. getMenuList().then(res => {
  1208. let storeMenu = []
  1209. let myMenu = []
  1210. res.data.routine_my_menus.forEach((el, index, arr) => {
  1211. if (el.type == '2') {
  1212. storeMenu.push(el)
  1213. } else {
  1214. myMenu.push(el)
  1215. }
  1216. })
  1217. this.member_style = Number(res.data.diy_data.status)
  1218. this.my_banner_status = res.data.diy_data.my_banner_status
  1219. this.menu_status = res.data.diy_data.menu_status
  1220. this.service_status = res.data.diy_data.service_status
  1221. this.vip_type = res.data.diy_data.vip_type;
  1222. this.newcomer_style = res.data.diy_data.newcomer_style;
  1223. this.newcomer_status = res.data.diy_data.newcomer_status;
  1224. let order01 = {
  1225. dfk: 'icon-daifukuan',
  1226. dfh: 'icon-daifahuo',
  1227. dsh: 'icon-daishouhuo',
  1228. dpj: 'icon-daipingjia',
  1229. sh: 'icon-a-shouhoutuikuan'
  1230. }
  1231. let order02 = {
  1232. dfk: 'icon-daifukuan-lan',
  1233. dfh: 'icon-daifahuo-lan',
  1234. dsh: 'icon-daishouhuo-lan',
  1235. dpj: 'icon-daipingjia-lan',
  1236. sh: 'icon-shouhou-tuikuan-lan'
  1237. }
  1238. let order03 = {
  1239. dfk: 'icon-daifukuan-ju',
  1240. dfh: 'icon-daifahuo-ju',
  1241. dsh: 'icon-daishouhuo-ju',
  1242. dpj: 'icon-daipingjia-ju',
  1243. sh: 'icon-shouhou-tuikuan-ju'
  1244. }
  1245. let order04 = {
  1246. dfk: 'icon-daifukuan-fen',
  1247. dfh: 'icon-daifahuo-fen',
  1248. dsh: 'icon-daishouhuo-fen',
  1249. dpj: 'icon-daipingjia-fen',
  1250. sh: 'icon-a-shouhoutuikuan-fen'
  1251. }
  1252. let order05 = {
  1253. dfk: 'icon-daifukuan-lv',
  1254. dfh: 'icon-daifahuo-lv',
  1255. dsh: 'icon-daishouhuo-lv',
  1256. dpj: 'icon-daipingjia-lv',
  1257. sh: 'icon-shouhou-tuikuan-lv'
  1258. }
  1259. switch (res.data.diy_data.order_status) {
  1260. case 1:
  1261. this.switchTab(order01)
  1262. break
  1263. case 2:
  1264. this.switchTab(order02)
  1265. break
  1266. case 3:
  1267. this.switchTab(order03)
  1268. break
  1269. case 4:
  1270. this.switchTab(order04)
  1271. break
  1272. case 5:
  1273. this.switchTab(order05)
  1274. break
  1275. }
  1276. that.$set(that, 'MyMenus', myMenu);
  1277. that.$set(that, 'storeMenu', storeMenu);
  1278. this.imgUrls = res.data.routine_my_banner
  1279. this.routineContact = Number(res.data.routine_contact_type)
  1280. });
  1281. },
  1282. // 编辑页面
  1283. goEdit() {
  1284. if (this.isLogin == false || !this.userInfo.uid) {
  1285. toLogin();
  1286. } else {
  1287. // #ifdef MP
  1288. if (this.userInfo.is_default_avatar) {
  1289. this.editModal = true;
  1290. return;
  1291. }
  1292. // #endif
  1293. uni.navigateTo({
  1294. url: '/pages/users/user_set/index'
  1295. })
  1296. }
  1297. },
  1298. // 签到
  1299. goSignIn() {
  1300. uni.navigateTo({
  1301. url: '/pages/users/user_sgin/index'
  1302. })
  1303. },
  1304. goMenuPage(url, name) {
  1305. if (this.isLogin) {
  1306. let arr = url.split('@APPID=');
  1307. if (arr.length > 1) {
  1308. //#ifdef MP
  1309. uni.navigateToMiniProgram({
  1310. appId: arr[arr.length - 1], // 此为生活缴费appid
  1311. path: arr[0], // 此为生活缴费首页路径
  1312. envVersion: "release",
  1313. success: res => {
  1314. console.log("打开成功", res);
  1315. },
  1316. fail: err => {
  1317. console.log('sgdhgf', err);
  1318. }
  1319. })
  1320. //#endif
  1321. //#ifndef MP
  1322. this.Tips({
  1323. title: 'h5与app端不支持跳转外部小程序'
  1324. });
  1325. //#endif
  1326. } else {
  1327. if (url == '/pages/extension/customer_list/chat' || url == 'https://chat.crmeb.net/chat/mobile') {
  1328. this.$util.getCustomer(this.userInfo)
  1329. } else {
  1330. if (url.indexOf('http') === -1) {
  1331. // #ifdef H5
  1332. if (name && name === '订单核销') {
  1333. return window.location.href = `${location.origin}${url}`
  1334. }
  1335. // #endif
  1336. // #ifdef MP
  1337. if (url != '#' && url == '/pages/users/user_set/index') {
  1338. uni.openSetting({
  1339. success: function(res) {}
  1340. });
  1341. }
  1342. // #endif
  1343. if (url == '/pages/store_spread/index') {
  1344. storeCardApi().then(res => {
  1345. this.isextension = true
  1346. this.$nextTick(function() {
  1347. this.extension.code = res.data.url
  1348. })
  1349. }).catch(err => {
  1350. uni.hideLoading()
  1351. this.$util.Tips({
  1352. title: err
  1353. })
  1354. })
  1355. }
  1356. if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart',
  1357. '/pages/user/index', '/pages/store_cate/store_cate', '/pages/index/index'
  1358. ]
  1359. .indexOf(url.split('?')[0]) == -1) {
  1360. uni.navigateTo({
  1361. url: url
  1362. })
  1363. } else {
  1364. uni.reLaunch({
  1365. url: url
  1366. })
  1367. }
  1368. } else {
  1369. uni.navigateTo({
  1370. url: `/pages/annex/web_view/index?url=${url}`
  1371. });
  1372. }
  1373. }
  1374. }
  1375. } else {
  1376. this.openAuto();
  1377. }
  1378. }
  1379. }
  1380. }
  1381. </script>
  1382. <style lang="scss">
  1383. .style-add {
  1384. flex: 1;
  1385. overflow: hidden;
  1386. }
  1387. .height-add {
  1388. height: 100%;
  1389. }
  1390. .display-add {
  1391. height: 100%;
  1392. display: flex;
  1393. align-items: center;
  1394. }
  1395. page,
  1396. body {
  1397. height: 100%;
  1398. }
  1399. .heg {
  1400. height: 670rpx !important;
  1401. }
  1402. .mark {
  1403. position: fixed;
  1404. top: 0;
  1405. left: 0;
  1406. bottom: 0;
  1407. right: 0;
  1408. background: rgba(0, 0, 0, 0.5);
  1409. z-index: 30;
  1410. }
  1411. .height {
  1412. margin-top: -84rpx !important;
  1413. }
  1414. .menus-list {
  1415. width: 690rpx;
  1416. background-color: #fff;
  1417. border-radius: 14rpx;
  1418. margin: 25rpx auto 0 auto;
  1419. .title {
  1420. font-weight: 600;
  1421. font-size: 30rpx;
  1422. color: #333;
  1423. padding: 30rpx 30rpx 10rpx 30rpx;
  1424. }
  1425. .item {
  1426. margin-left: 30rpx;
  1427. font-size: 30rpx;
  1428. color: #333;
  1429. image {
  1430. width: 42rpx;
  1431. height: 42rpx;
  1432. display: block;
  1433. }
  1434. .text {
  1435. width: 590rpx;
  1436. border-bottom: 1rpx solid #EEEEEE;
  1437. padding: 28rpx 30rpx 28rpx 0;
  1438. .iconfont {
  1439. font-size: 20rpx;
  1440. color: #8A8A8A;
  1441. }
  1442. }
  1443. }
  1444. }
  1445. .num-wrapper {
  1446. background-color: #fff;
  1447. z-index: 29;
  1448. position: relative;
  1449. display: flex;
  1450. align-items: center;
  1451. justify-content: space-between;
  1452. margin-top: 22rpx;
  1453. color: #333;
  1454. margin: 30rpx 30rpx 25rpx 30rpx;
  1455. border-radius: 16rpx;
  1456. height: 160rpx;
  1457. &.on {
  1458. height: 128rpx;
  1459. margin-top: -68rpx;
  1460. .gift {
  1461. color: var(--view-theme);
  1462. margin-left: 10rpx;
  1463. font-weight: bold;
  1464. }
  1465. }
  1466. .img {
  1467. margin-left: 38rpx;
  1468. width: 76rpx;
  1469. height: 68rpx;
  1470. }
  1471. .text {
  1472. font-size: 28rpx;
  1473. font-weight: 400;
  1474. color: #333333;
  1475. margin-left: -60rpx;
  1476. }
  1477. .btn-login {
  1478. width: 144rpx;
  1479. height: 56rpx;
  1480. // background: linear-gradient(270deg, #FF7931 0%, #E93323 100%);
  1481. background-color: var(--view-theme);
  1482. border-radius: 28rpx;
  1483. text-align: center;
  1484. line-height: 56rpx;
  1485. margin-right: 32rpx;
  1486. font-size: 28rpx;
  1487. font-weight: 500;
  1488. color: #FFFFFF;
  1489. }
  1490. .num-item {
  1491. width: 33.33%;
  1492. text-align: center;
  1493. &~.num-item {
  1494. position: relative;
  1495. &:before {
  1496. content: '';
  1497. position: absolute;
  1498. width: 1rpx;
  1499. height: 28rpx;
  1500. top: 50%;
  1501. margin-top: -14rpx;
  1502. background-color: rgba(255, 255, 255, 0.4);
  1503. left: 0;
  1504. }
  1505. }
  1506. .num {
  1507. font-size: 36rpx;
  1508. font-weight: bold;
  1509. }
  1510. .txt {
  1511. margin-top: 8rpx;
  1512. font-size: 26rpx;
  1513. color: #555;
  1514. }
  1515. }
  1516. }
  1517. // 新人专享
  1518. .newcomersCon {
  1519. background-color: var(--view-theme);
  1520. width: 690rpx;
  1521. height: 296rpx;
  1522. margin: 0 30rpx;
  1523. border-radius: 16rpx;
  1524. &.on {
  1525. background-color: #fff;
  1526. .newcomers {
  1527. .title {
  1528. .tl {
  1529. color: #333;
  1530. }
  1531. .tr {
  1532. width: unset;
  1533. color: #666666;
  1534. background: unset;
  1535. }
  1536. }
  1537. .scroll {
  1538. .scroll-item {
  1539. background-color: var(--view-minorColorT);
  1540. }
  1541. }
  1542. }
  1543. }
  1544. .newcomers {
  1545. padding: 24rpx 30rpx;
  1546. width: 100%;
  1547. height: 100%;
  1548. background-repeat: no-repeat;
  1549. background-size: 100% 100%;
  1550. .title {
  1551. display: flex;
  1552. justify-content: space-between;
  1553. .tl {
  1554. font-size: 30rpx;
  1555. font-weight: 600;
  1556. color: #FFFFFF;
  1557. }
  1558. .tr {
  1559. width: 90rpx;
  1560. height: 36rpx;
  1561. background: linear-gradient(135deg, #FFCA52 0%, #FE960F 100%);
  1562. border-radius: 18rpx;
  1563. font-size: 24rpx;
  1564. text-align: center;
  1565. line-height: 36rpx;
  1566. font-weight: 400;
  1567. color: #FFFFFF;
  1568. .icon-xiangyou {
  1569. font-size: 20rpx;
  1570. }
  1571. }
  1572. }
  1573. .scroll {
  1574. // width: 690rpx;
  1575. margin-top: 20rpx;
  1576. white-space: nowrap;
  1577. // padding-right: 60rpx;
  1578. .scroll-item {
  1579. display: inline-block;
  1580. width: 162rpx;
  1581. height: 194rpx;
  1582. background-color: #fff;
  1583. border-radius: 12rpx;
  1584. margin-right: 10rpx;
  1585. padding: 12rpx;
  1586. .pictrue {
  1587. width: 138rpx;
  1588. height: 138rpx;
  1589. position: relative;
  1590. image {
  1591. width: 100%;
  1592. height: 100%;
  1593. }
  1594. .label {
  1595. width: 98rpx;
  1596. height: 32rpx;
  1597. background: var(--view-theme);
  1598. border-radius: 16rpx;
  1599. color: #FFFFFF;
  1600. font-size: 24rpx;
  1601. text-align: center;
  1602. line-height: 32rpx;
  1603. position: absolute;
  1604. bottom: 2rpx;
  1605. left: 50%;
  1606. margin-left: -49rpx;
  1607. }
  1608. }
  1609. .money {
  1610. font-size: 24rpx;
  1611. color: var(--view-priceColor);
  1612. margin-top: 6rpx;
  1613. }
  1614. }
  1615. }
  1616. }
  1617. }
  1618. .Tnum-wrapper {
  1619. margin: -34rpx 30rpx 25rpx 30rpx;
  1620. }
  1621. .unNum-wrapper {
  1622. margin: 0 auto 25rpx auto;
  1623. width: 690rpx;
  1624. }
  1625. .unBg {
  1626. background-color: unset !important;
  1627. .user-info {
  1628. .info {
  1629. .name {
  1630. color: #333333 !important;
  1631. font-weight: 600;
  1632. }
  1633. .num {
  1634. color: #333 !important;
  1635. .num-txt {
  1636. height: 38rpx;
  1637. background-color: rgba(51, 51, 51, 0.13);
  1638. padding: 0 12rpx;
  1639. border-radius: 16rpx;
  1640. }
  1641. }
  1642. }
  1643. }
  1644. .qrCode {
  1645. color: #333 !important;
  1646. }
  1647. .message {
  1648. .iconfont {
  1649. color: #333 !important;
  1650. }
  1651. .num {
  1652. color: #fff !important;
  1653. background-color: var(--view-theme) !important;
  1654. }
  1655. }
  1656. .setting {
  1657. .iconfont {
  1658. color: #333 !important;
  1659. }
  1660. }
  1661. }
  1662. .cardVipB {
  1663. background-color: #343A48;
  1664. width: 100%;
  1665. height: 124rpx;
  1666. border-radius: 16rpx 16rpx 0 0;
  1667. padding: 22rpx 30rpx 0 30rpx;
  1668. margin-top: 16px;
  1669. &.on {
  1670. width: 690rpx;
  1671. height: 130rpx;
  1672. background-repeat: no-repeat;
  1673. background-size: 100% 100%;
  1674. color: #fff;
  1675. margin-left: auto;
  1676. margin-right: auto;
  1677. padding: 26rpx 30rpx 0 90rpx;
  1678. .iconfont {
  1679. font-size: 24rpx;
  1680. margin-left: 6rpx;
  1681. }
  1682. }
  1683. .left-box {
  1684. .small {
  1685. color: #F8D5A8;
  1686. font-size: 28rpx;
  1687. margin-left: 18rpx;
  1688. }
  1689. .pictrue {
  1690. width: 40rpx;
  1691. height: 45rpx;
  1692. image {
  1693. width: 100%;
  1694. height: 100%;
  1695. }
  1696. }
  1697. }
  1698. .btn {
  1699. color: #BBBBBB;
  1700. font-size: 26rpx;
  1701. &.on {
  1702. color: #fff;
  1703. }
  1704. }
  1705. .icon-xiangyou {
  1706. margin-top: 6rpx;
  1707. }
  1708. }
  1709. .cardVipA {
  1710. position: absolute;
  1711. background-repeat: no-repeat;
  1712. background-size: 100% 100%;
  1713. width: 750rpx;
  1714. height: 84rpx;
  1715. bottom: -2rpx;
  1716. left: 0;
  1717. padding: 0 56rpx 0 135rpx;
  1718. .left-box {
  1719. font-size: 26rpx;
  1720. color: #905100;
  1721. font-weight: 400;
  1722. &.on {
  1723. color: #fff;
  1724. }
  1725. }
  1726. .btn {
  1727. color: #905100;
  1728. font-weight: 400;
  1729. font-size: 24rpx;
  1730. &.on {
  1731. color: #fff;
  1732. }
  1733. }
  1734. .iconfont {
  1735. font-size: 20rpx;
  1736. margin: 4rpx 0 0 4rpx;
  1737. &.on {
  1738. color: #fff;
  1739. margin-top: 0;
  1740. }
  1741. }
  1742. }
  1743. .new-users {
  1744. display: flex;
  1745. flex-direction: column;
  1746. height: 100%;
  1747. .sys-head {
  1748. position: relative;
  1749. width: 100%;
  1750. // background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
  1751. .bg {
  1752. position: absolute;
  1753. left: 0;
  1754. top: 0;
  1755. width: 100%;
  1756. height: 100%;
  1757. // background: url("~@/static/images/user-sys.png") no-repeat;
  1758. background: var(--view-theme);
  1759. background-size: 100% auto;
  1760. background-position: left bottom;
  1761. }
  1762. .sys-title {
  1763. z-index: 10;
  1764. position: relative;
  1765. height: 43px;
  1766. text-align: center;
  1767. line-height: 43px;
  1768. font-size: 34rpx;
  1769. color: #FFFFFF;
  1770. }
  1771. }
  1772. .head {
  1773. // background: #fff;
  1774. .user-card {
  1775. position: relative;
  1776. width: 100%;
  1777. height: 270rpx;
  1778. margin: 0 auto;
  1779. padding: 35rpx 28rpx;
  1780. background-size: 100% auto;
  1781. background-color: var(--view-theme);
  1782. .user-info {
  1783. z-index: 20;
  1784. position: relative;
  1785. display: flex;
  1786. .headwear {
  1787. position: absolute;
  1788. right: -4rpx;
  1789. top: -14rpx;
  1790. width: 44rpx;
  1791. height: 44rpx;
  1792. image {
  1793. width: 100%;
  1794. height: 100%;
  1795. }
  1796. }
  1797. .live {
  1798. width: 28rpx;
  1799. height: 28rpx;
  1800. margin-left: 14rpx;
  1801. display: block;
  1802. }
  1803. .bntImg {
  1804. width: 120rpx;
  1805. height: 120rpx;
  1806. border-radius: 50%;
  1807. text-align: center;
  1808. line-height: 120rpx;
  1809. background-color: unset;
  1810. position: relative;
  1811. .avatarName {
  1812. font-size: 16rpx;
  1813. color: #fff;
  1814. text-align: center;
  1815. background-color: rgba(0, 0, 0, 0.6);
  1816. height: 37rpx;
  1817. line-height: 37rpx;
  1818. position: absolute;
  1819. bottom: 0;
  1820. left: 0;
  1821. width: 100%;
  1822. }
  1823. }
  1824. .avatar-box {
  1825. position: relative;
  1826. display: flex;
  1827. align-items: center;
  1828. justify-content: center;
  1829. width: 120rpx;
  1830. height: 120rpx;
  1831. border-radius: 50%;
  1832. &.on {
  1833. .avatar {
  1834. border: 2px solid #FFAC65;
  1835. border-radius: 50%;
  1836. box-sizing: border-box;
  1837. }
  1838. }
  1839. }
  1840. .avatar {
  1841. position: relative;
  1842. width: 120rpx;
  1843. height: 120rpx;
  1844. border-radius: 50%;
  1845. }
  1846. .info {
  1847. width: 346rpx;
  1848. flex: 1;
  1849. display: flex;
  1850. flex-direction: column;
  1851. justify-content: space-between;
  1852. margin-left: 20rpx;
  1853. padding: 20rpx 0;
  1854. .name {
  1855. display: flex;
  1856. align-items: center;
  1857. color: #fff;
  1858. font-size: 31rpx;
  1859. width: 346rpx;
  1860. .nickname {
  1861. max-width: 196rpx;
  1862. display: block;
  1863. }
  1864. .vip {
  1865. margin-left: 10rpx;
  1866. width: 78rpx;
  1867. height: 30rpx;
  1868. image {
  1869. width: 100%;
  1870. height: 100%;
  1871. display: block;
  1872. }
  1873. }
  1874. }
  1875. .num {
  1876. display: flex;
  1877. align-items: center;
  1878. font-size: 24rpx;
  1879. color: rgba(255, 255, 255, 0.6);
  1880. image {
  1881. width: 22rpx;
  1882. height: 23rpx;
  1883. margin-left: 20rpx;
  1884. }
  1885. }
  1886. }
  1887. }
  1888. .qrCode {
  1889. color: #fff;
  1890. margin-top: 18rpx !important;
  1891. font-size: 38rpx;
  1892. margin-right: 34rpx !important;
  1893. }
  1894. .message {
  1895. align-self: flex-start;
  1896. position: relative;
  1897. margin-top: 16rpx;
  1898. margin-right: 30rpx;
  1899. .uni-badge-left-margin {
  1900. /deep/.uni-badge--error {
  1901. background-color: #fff !important;
  1902. color: var(--view-theme);
  1903. }
  1904. }
  1905. .num {
  1906. position: absolute;
  1907. top: -8rpx;
  1908. left: 18rpx;
  1909. padding: 0 6rpx;
  1910. height: 28rpx;
  1911. border-radius: 12rpx;
  1912. background-color: #fff;
  1913. font-size: 18rpx;
  1914. line-height: 28rpx;
  1915. text-align: center;
  1916. color: var(--view-theme);
  1917. }
  1918. .iconfont {
  1919. font-size: 40rpx;
  1920. color: #fff;
  1921. }
  1922. }
  1923. .sign {
  1924. z-index: 200;
  1925. position: absolute;
  1926. right: -12rpx;
  1927. top: 80rpx;
  1928. display: flex;
  1929. align-items: center;
  1930. justify-content: center;
  1931. width: 120rpx;
  1932. height: 60rpx;
  1933. background: linear-gradient(90deg, rgba(255, 225, 87, 1) 0%, rgba(238, 193, 15, 1) 100%);
  1934. border-radius: 29rpx 4rpx 4rpx 29rpx;
  1935. color: #282828;
  1936. font-size: 28rpx;
  1937. font-weight: bold;
  1938. }
  1939. }
  1940. .order-wrapper {
  1941. background: #fff;
  1942. margin: 0 30rpx;
  1943. border-radius: 16rpx;
  1944. position: relative;
  1945. .order-hd {
  1946. justify-content: space-between;
  1947. padding: 30rpx 20rpx 10rpx;
  1948. margin-top: 25rpx;
  1949. font-size: 30rpx;
  1950. color: #282828;
  1951. .left {
  1952. font-weight: bold;
  1953. }
  1954. .right {
  1955. align-items: center;
  1956. color: #666666;
  1957. font-size: 26rpx;
  1958. .icon-xiangyou {
  1959. margin-left: 5rpx;
  1960. margin-top: 6rpx;
  1961. font-size: 26rpx;
  1962. }
  1963. }
  1964. }
  1965. .order-bd {
  1966. display: flex;
  1967. padding: 0 0;
  1968. .order-item {
  1969. display: flex;
  1970. flex-direction: column;
  1971. justify-content: center;
  1972. align-items: center;
  1973. width: 20%;
  1974. height: 140rpx;
  1975. .pic {
  1976. position: relative;
  1977. text-align: center;
  1978. .iconfont {
  1979. font-size: 48rpx;
  1980. color: var(--view-theme);
  1981. }
  1982. image {
  1983. width: 58rpx;
  1984. height: 48rpx;
  1985. }
  1986. .uni-badge-left-margin {
  1987. position: absolute;
  1988. // #ifdef MP
  1989. top: -22rpx;
  1990. // #endif
  1991. /deep/.uni-badge--error {
  1992. background-color: #fff !important;
  1993. }
  1994. /deep/.uni-badge {
  1995. color: var(--view-theme);
  1996. border: 1px solid var(--view-theme);
  1997. z-index: 29;
  1998. }
  1999. }
  2000. }
  2001. .txt {
  2002. margin-top: 6rpx;
  2003. font-size: 26rpx;
  2004. color: #454545;
  2005. }
  2006. }
  2007. }
  2008. }
  2009. }
  2010. .slider-wrapper {
  2011. margin: 20rpx 30rpx;
  2012. height: 130rpx;
  2013. swiper,
  2014. swiper-item {
  2015. height: 100%;
  2016. }
  2017. image {
  2018. width: 100%;
  2019. height: 130rpx;
  2020. border-radius: 16rpx;
  2021. }
  2022. }
  2023. .user-menus {
  2024. background-color: #fff;
  2025. margin: 0 30rpx;
  2026. border-radius: 16rpx;
  2027. .menu-title {
  2028. padding: 30rpx 30rpx 40rpx;
  2029. font-size: 30rpx;
  2030. color: #282828;
  2031. font-weight: bold;
  2032. }
  2033. .list-box {
  2034. display: flex;
  2035. flex-wrap: wrap;
  2036. padding: 0;
  2037. }
  2038. .item {
  2039. position: relative;
  2040. display: flex;
  2041. align-items: center;
  2042. justify-content: space-between;
  2043. flex-direction: column;
  2044. width: 25%;
  2045. margin-bottom: 47rpx;
  2046. font-size: 26rpx;
  2047. color: #333333;
  2048. image {
  2049. width: 52rpx;
  2050. height: 52rpx;
  2051. margin-bottom: 18rpx;
  2052. }
  2053. &:last-child::before {
  2054. display: none;
  2055. }
  2056. }
  2057. button {
  2058. font-size: 28rpx;
  2059. }
  2060. }
  2061. .phone {
  2062. color: #fff;
  2063. background-color: #CCC;
  2064. border-radius: 15px;
  2065. width: max-content;
  2066. padding: 2px 10px;
  2067. font-size: 20rpx;
  2068. margin-top: 4px;
  2069. }
  2070. .order-status-num {
  2071. min-width: 12rpx;
  2072. background-color: #fff;
  2073. color: var(--view-theme);
  2074. border-radius: 15px;
  2075. position: absolute;
  2076. right: -14rpx;
  2077. top: -15rpx;
  2078. font-size: 20rpx;
  2079. padding: 0 8rpx;
  2080. border: 1px solid var(--view-theme);
  2081. }
  2082. .support {
  2083. width: 219rpx;
  2084. height: 74rpx;
  2085. margin: 54rpx auto;
  2086. display: block;
  2087. }
  2088. .copyRightImg {
  2089. width: 219rpx;
  2090. height: 74rpx;
  2091. margin: 16rpx auto;
  2092. display: block;
  2093. }
  2094. .copy_right {
  2095. text-align: center;
  2096. color: #ccc;
  2097. font-size: 22rpx;
  2098. margin-top: 40rpx;
  2099. .copyRightText {
  2100. margin-top: 0rpx;
  2101. color: #ccc;
  2102. font-size: 20rpx;
  2103. margin-bottom: 20rpx;
  2104. }
  2105. }
  2106. }
  2107. .card-vip {
  2108. display: flex;
  2109. justify-content: space-between;
  2110. position: relative;
  2111. width: 690rpx;
  2112. height: 125rpx;
  2113. margin: -72rpx auto 0;
  2114. background: url('~@/static/images/user_vip.png');
  2115. background-size: cover;
  2116. padding: 28rpx 30rpx 0 92rpx;
  2117. &.on {
  2118. .left-box {
  2119. color: #fff;
  2120. }
  2121. .btn {
  2122. color: #fff;
  2123. }
  2124. .iconfont {
  2125. color: #fff;
  2126. }
  2127. }
  2128. .left-box {
  2129. font-size: 28rpx;
  2130. color: #AE5A2A;
  2131. .big {
  2132. font-size: 28rpx;
  2133. }
  2134. .small {
  2135. opacity: 0.8;
  2136. }
  2137. }
  2138. .btn {
  2139. color: #AE5A2A;
  2140. font-weight: 400;
  2141. font-size: 26rpx;
  2142. }
  2143. .iconfont {
  2144. font-size: 20rpx;
  2145. margin: 4rpx 0 0 4rpx;
  2146. color: #AE5A2A;
  2147. }
  2148. }
  2149. .setting {
  2150. margin-top: 15rpx;
  2151. margin-left: 15rpx;
  2152. color: #fff;
  2153. .iconfont {
  2154. font-size: 40rpx;
  2155. }
  2156. }
  2157. .new-users {
  2158. padding-bottom: 0;
  2159. padding-bottom: constant(safe-area-inset-bottom);
  2160. padding-bottom: env(safe-area-inset-bottom);
  2161. }
  2162. </style>