index.vue 57 KB

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