index.vue 65 KB

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