index.vue 59 KB

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