index.vue 68 KB

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