index.vue 67 KB

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