index.vue 68 KB

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