index.vue 59 KB

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