index.vue 57 KB

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