index.vue 66 KB

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