index.vue 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308
  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="acea-row row-between-wrapper"
  113. style="padding: 0 30rpx; color:#FFF;padding-top: 20rpx;">
  114. <view class="left-box">
  115. <view class="small">团队等级:{{userInfo.group_vip_name}}</view>
  116. </view>
  117. <view class="left-box">
  118. <view class="small">分红额度:{{userInfo.award_range||0.00}}</view>
  119. </view>
  120. <view class="acea-row row-middle">
  121. 分红值:{{userInfo.award_piece||0.00}}
  122. </view>
  123. </view>
  124. <view class="fix-position area_admin_box">
  125. <text v-if="userInfo.area_admin==1">{{userInfo.area_district}}区代</text>
  126. <text v-if="userInfo.area_admin==2">{{userInfo.area_city}}市代</text>
  127. <text v-if="userInfo.area_admin==3">{{userInfo.area_province}}省代</text>
  128. </view>
  129. <!-- <view class="sign" @click="goSignIn">签到</view> -->
  130. <!-- 会员权益 -->
  131. <view class="cardVipA acea-row row-between-wrapper" v-if="member_style==1 && stu && vip_type==2"
  132. :style="{backgroundImage:'url('+imgHost+'/statics/images/member.png'+')'}">
  133. <view class="left-box">
  134. <view v-if="vipStatus == 1" class="small">永久</view>
  135. <view v-else-if="vipStatus == 3" class="small">会员到期
  136. {{ userInfo.overdue_time | dateFormat }}
  137. </view>
  138. <view v-else-if="vipStatus == -1" class="small">已过期</view>
  139. <view v-else-if="vipStatus == 2" class="small">未开通会员</view>
  140. </view>
  141. <view class="acea-row row-middle">
  142. <navigator v-if="vipStatus == 1" url="/pages/annex/vip_paid/index" hover-class="none"
  143. class="btn">查看会员权益
  144. </navigator>
  145. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  146. {{ userInfo.overdue_time ? '立即续费' : '立即激活' }}
  147. </navigator>
  148. <text class="iconfont icon-xiangyou"></text>
  149. </view>
  150. </view>
  151. <view class="cardVipB acea-row row-between" v-if="member_style==3 && stu && vip_type==2">
  152. <view class="left-box acea-row">
  153. <view class="pictrue">
  154. <image src="../../static/images/member01.png"></image>
  155. </view>
  156. <view v-if="vipStatus == 1" class="small">永久</view>
  157. <view v-else-if="vipStatus == 3" class="small">会员到期
  158. {{ userInfo.overdue_time | dateFormat }}
  159. </view>
  160. <view v-else-if="vipStatus == -1" class="small">已过期</view>
  161. <view v-else-if="vipStatus == 2" class="small">未开通会员</view>
  162. </view>
  163. <view class="acea-row">
  164. <navigator v-if="vipStatus == 1" url="/pages/annex/vip_paid/index" hover-class="none"
  165. class="btn">
  166. 会员可享多项权益</navigator>
  167. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  168. {{ userInfo.overdue_time ? '立即续费' : '立即激活' }}
  169. </navigator>
  170. <text class="iconfont icon-xiangyou btn"></text>
  171. </view>
  172. </view>
  173. <view class="cardVipA acea-row row-between-wrapper"
  174. :style="{backgroundImage:'url('+imgHost+'/statics/images/grade.png'+')'}"
  175. v-if="member_style==1 && memberStatus && vip_type==1">
  176. <view class="left-box on">
  177. <view class="small">{{userInfo.level_status==1?userInfo.vip_name:'激活会员卡 解锁更多权益'}}</view>
  178. </view>
  179. <view class="acea-row row-middle">
  180. <!-- 去激活 -->
  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 on"></text>
  186. </view>
  187. </view>
  188. <view class="cardVipB acea-row row-between on"
  189. :style="{backgroundImage:'url('+imgHost+'/statics/images/grade01.png'+')'}"
  190. v-if="member_style==3 && memberStatus && vip_type==1">
  191. <view class="small">{{userInfo.level_status==1?userInfo.vip_name:'激活会员卡 解锁更多权益'}}</view>
  192. <view class="acea-row">
  193. <navigator
  194. :url="userInfo.level_status==1?'/pages/annex/vip_grade/index':'/pages/annex/vip_grade_active/index'"
  195. hover-class="none" class="btn on">{{userInfo.level_status==1?'查看会员卡':'去激活'}}
  196. </navigator>
  197. <text class="iconfont icon-xiangyou"></text>
  198. </view>
  199. </view>
  200. </view>
  201. <view class="card-vip" v-if="member_style==2 && stu && vip_type==2">
  202. <view class="left-box">
  203. <!-- <view class="big">会员可享多项权益</view> -->
  204. <view v-if="vipStatus == 1" class="small">永久</view>
  205. <view v-else-if="vipStatus == 3" class="small">会员到期
  206. {{ userInfo.overdue_time | dateFormat }}
  207. </view>
  208. <view v-else-if="vipStatus == -1" class="small">已过期</view>
  209. <view v-else-if="vipStatus == 2" class="small">未开通会员</view>
  210. </view>
  211. <view class="acea-row">
  212. <navigator v-if="vipStatus == 1" url="/pages/annex/vip_paid/index" hover-class="none"
  213. class="btn">查看会员权益
  214. </navigator>
  215. <navigator v-else url="/pages/annex/vip_paid/index" hover-class="none" class="btn">
  216. {{ userInfo.overdue_time ? '立即续费' : '立即激活' }}
  217. </navigator>
  218. <text class="iconfont icon-xiangyou"></text>
  219. </view>
  220. </view>
  221. <view class="card-vip on" v-if="member_style==2 && memberStatus && vip_type==1"
  222. :style="{backgroundImage:'url('+imgHost+'/statics/images/grade01.png'+')'}">
  223. <view class="left-box">
  224. <view class="small">{{userInfo.level_status==1?userInfo.vip_name:'激活会员卡 解锁更多权益'}}</view>
  225. </view>
  226. <view class="acea-row">
  227. <navigator
  228. :url="userInfo.level_status==1?'/pages/annex/vip_grade/index':'/pages/annex/vip_grade_active/index'"
  229. hover-class="none" class="btn">{{userInfo.level_status==1?'查看会员卡':'去激活'}}</navigator>
  230. <text class="iconfont icon-xiangyou"></text>
  231. </view>
  232. </view>
  233. <view class="num-wrapper"
  234. :class="[member_style==3?'unNum-wrapper':member_style==2?'Tnum-wrapper':'',((vip_type==2 && stu) || (vip_type==1 && memberStatus))?'':'height']"
  235. v-if="userInfo.uid">
  236. <view class="num-item" v-show="userInfo.balance_func_status"
  237. @click="goMenuPage('/pages/users/user_money/index')">
  238. <text class="num">{{userInfo.now_money || 0}}</text>
  239. <view class="txt">余额</view>
  240. </view>
  241. <view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
  242. <text class="num">{{userInfo.couponCount || 0}}</text>
  243. <view class="txt">优惠券</view>
  244. </view>
  245. <view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
  246. <text class="num">{{userInfo.integral || 0}}</text>
  247. <view class="txt">积分</view>
  248. </view>
  249. <view class="num-item" @click="goMenuPage('/pages/users/user_goods_collection/index')">
  250. <text class="num">{{userInfo.collectCount || 0}}</text>
  251. <view class="txt">收藏</view>
  252. </view>
  253. <view class="num-item" @click="goMenuPage('/pages/users/visit_list/index')">
  254. <text class="num">{{userInfo.visit_num || 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. watch: {
  687. userInfo(newValue, oldValue) {
  688. if((+newValue.award_range)<=100){
  689. uni.showModal({
  690. title: '分红额度不足',
  691. content: '请及时补充分红额度',
  692. showCancel: false,
  693. });
  694. }
  695. }
  696. },
  697. created() {
  698. let that = this;
  699. // #ifdef MP
  700. // 小程序静默授权
  701. if (!this.$store.getters.isLogin) {
  702. // Routine.getCode()
  703. // .then(code => {
  704. // Routine.silenceAuth(code).then(res => {
  705. // this.onLoadFun();
  706. // })
  707. // })
  708. // .catch(res => {
  709. // uni.hideLoading();
  710. // });
  711. }
  712. // #endif
  713. if (that.isLogin == false) {
  714. // #ifdef H5 || APP-PLUS
  715. toLogin()
  716. // #endif
  717. // #ifdef MP
  718. this.isShowAuth = true;
  719. // #endif
  720. }
  721. // #ifdef APP-PLUS
  722. that.$set(that, 'pageHeight', app.globalData.windowHeight);
  723. // #endif
  724. },
  725. async onLoad(option) {
  726. if (this.isLogin) {
  727. this.getNewcomerGift();
  728. }
  729. // #ifdef H5
  730. if (this.isLogin && Auth.isWeixin() && option.code) {
  731. try {
  732. let res = await updateWechatInfo({
  733. code: option.code
  734. });
  735. this.userInfo.nickname = res.data.nickname;
  736. this.userInfo.avatar = res.data.avatar;
  737. this.userInfo.is_complete = 1;
  738. } catch (e) {}
  739. }
  740. // #endif
  741. this.colorData();
  742. let giftList = [
  743. this.imgHost + '/statics/images/gift01.png',
  744. this.imgHost + '/statics/images/gift02.png',
  745. this.imgHost + '/statics/images/gift03.png',
  746. this.imgHost + '/statics/images/gift04.png',
  747. this.imgHost + '/statics/images/gift05.png',
  748. this.imgHost + '/statics/images/gift06.png'
  749. ];
  750. let newBg = [
  751. this.imgHost + '/statics/images/blue-bg.png',
  752. this.imgHost + '/statics/images/green-bg.png',
  753. this.imgHost + '/statics/images/red-bg.png',
  754. this.imgHost + '/statics/images/pink-bg.png',
  755. this.imgHost + '/statics/images/orange-bg.png',
  756. this.imgHost + '/statics/images/gold-bg.png'
  757. ]
  758. setTimeout(() => {
  759. switch (this.colorNum) {
  760. case 1:
  761. this.giftPic = giftList[2];
  762. this.newBg = newBg[0];
  763. break;
  764. case 2:
  765. this.giftPic = giftList[1];
  766. this.newBg = newBg[1];
  767. break;
  768. case 3:
  769. this.giftPic = giftList[4];
  770. this.newBg = newBg[2];
  771. break;
  772. case 4:
  773. this.giftPic = giftList[0];
  774. this.newBg = newBg[3];
  775. break;
  776. case 5:
  777. this.giftPic = giftList[3];
  778. this.newBg = newBg[4];
  779. break;
  780. case 6:
  781. this.giftPic = giftList[5];
  782. this.newBg = newBg[5];
  783. break;
  784. default:
  785. this.giftPic = giftList[4];
  786. this.newBg = newBg[2];
  787. break
  788. }
  789. }, 1)
  790. },
  791. onReady() {
  792. let self = this
  793. // #ifdef MP
  794. let info = uni.createSelectorQuery().select(".sys-head");
  795. info.boundingClientRect(function(data) { //data - 各种参数
  796. self.mpHeight = data.height
  797. }).exec()
  798. // #endif
  799. console.log((+this.userInfo.award_range)<=100,this.userInfo.award_range);
  800. },
  801. onShow: function() {
  802. this.getNewList();
  803. if (this.cartNum > 0) {
  804. uni.setTabBarBadge({
  805. index: 3,
  806. text: this.cartNum > 99 ? '99+' : this.cartNum + ''
  807. })
  808. } else {
  809. uni.hideTabBarRedDot({
  810. index: 3
  811. })
  812. }
  813. this.copyRightText = uni.getStorageSync('copyNameInfo');
  814. this.copyRightImg = uni.getStorageSync('copyImageInfo');
  815. uni.removeStorageSync('form_type_cart');
  816. if (!this.copyRightText) {
  817. this.getCopyRight();
  818. }
  819. let that = this;
  820. // #ifdef APP-PLUS
  821. uni.getSystemInfo({
  822. success: function(res) {
  823. that.pageHeight = res.windowHeight + 'px'
  824. }
  825. });
  826. // #endif
  827. if (that.isLogin) {
  828. // #ifdef MP
  829. // this.isShowAuth = false;
  830. // #endif
  831. this.getUserInfo();
  832. this.getMyMenus();
  833. this.setVisit();
  834. };
  835. },
  836. methods: {
  837. // #ifdef MP
  838. editSuccess() {
  839. this.editModal = false;
  840. this.getUserInfo();
  841. },
  842. closeEdit() {
  843. this.editModal = false;
  844. },
  845. // #endif
  846. getCopyRight() {
  847. copyRight().then(res => {
  848. let data = res.data;
  849. if (!data.copyrightContext && !data.copyrightImage) {
  850. data.copyrightImage = '/static/images/support.png'
  851. }
  852. uni.setStorageSync('copyNameInfo', data.copyrightContext);
  853. uni.setStorageSync('copyImageInfo', data.copyrightImage);
  854. this.copyRightText = data.copyrightContext;
  855. this.copyRightImg = data.copyrightImage;
  856. }).catch(err => {
  857. return this.$util.Tips({
  858. title: err.msg
  859. });
  860. });
  861. },
  862. // 查看订单
  863. intoPage(url) {
  864. if (this.isLogin) {
  865. uni.navigateTo({
  866. url: url
  867. })
  868. } else {
  869. // #ifdef H5 || APP-PLUS
  870. toLogin()
  871. // #endif
  872. // #ifdef MP
  873. this.isShowAuth = true;
  874. // #endif
  875. }
  876. },
  877. goDetail(item) {
  878. uni.navigateTo({
  879. url: `/pages/goods_details/index?id=${item.id}&fromPage='newVip'`
  880. });
  881. },
  882. comerPop() {
  883. this.isComerGift = false;
  884. },
  885. getNewcomerGift() {
  886. if (uni.getStorageSync('newcomerGift')) {
  887. return this.isComerGift = false;
  888. }
  889. newcomerGift().then(res => {
  890. this.comerGift = res.data;
  891. if (Object.prototype.toString.call(this.comerGift) == '[object Object]') {
  892. if (res.data.coupon_count || res.data.product_count || res.data.register_give_money || res
  893. .data.first_order_discount || res.data.register_give_integral) {
  894. uni.setStorageSync('newcomerGift', true);
  895. this.isComerGift = true;
  896. }
  897. }
  898. }).catch(err => {
  899. return this.$util.Tips({
  900. title: err
  901. });
  902. })
  903. },
  904. getNewList() {
  905. newcomerList({
  906. page: 1,
  907. limit: 6,
  908. priceOrder: '',
  909. salesOrder: ''
  910. }).then(res => {
  911. this.newList = res.data;
  912. }).catch(err => {
  913. return this.$util.Tips({
  914. title: err
  915. });
  916. })
  917. },
  918. hah() {
  919. let that = this
  920. // #ifdef H5
  921. var canvas = document.getElementById("hah").getElementsByTagName("canvas")
  922. var imgURL = canvas[0].toDataURL("image/png")
  923. var dlLink = document.createElement('a');
  924. dlLink.download = "店员推广码";
  925. dlLink.href = imgURL;
  926. dlLink.dataset.downloadurl = ["image/png", dlLink.download, dlLink.href].join(':');
  927. document.body.appendChild(dlLink);
  928. dlLink.click();
  929. document.body.removeChild(dlLink);
  930. // #endif
  931. // #ifdef MP
  932. // let ctx = uni.createCanvasContext("WQrcode")
  933. // let ctx = uni.createSelectorQuery().in(this).select("canvas")
  934. // uni.canvasToTempFilePath({
  935. // canvasId: "WQrcode",
  936. // fileType: 'image/png',
  937. // success: (res) => {
  938. // // 保存当前绘制推广码
  939. // that.savePic(res.tempFilePath)
  940. // },
  941. // fail: function(err) {
  942. // console.log(err, '推广码生成失败')
  943. // }
  944. // },that)
  945. // ctx.draw(false, uni.canvasToTempFilePath({
  946. // canvasId: 'WQrcode',
  947. // success: function (res) {
  948. // that.savePic(res.tempFilePath)
  949. // },
  950. // fail: function (err) {
  951. // console.log(err, '推广码生成失败')
  952. // }
  953. // },that))
  954. // console.log("222222",ctx)
  955. // #endif
  956. // #ifdef APP-PLUS
  957. uni.canvasToTempFilePath({
  958. canvasId: 'WQrcode',
  959. success: (res) => {
  960. uni.hideLoading()
  961. // 保存当前绘制推广码
  962. that.savePic(res.tempFilePath)
  963. },
  964. fail: function(err) {
  965. console.log(err, '推广码生成失败')
  966. }
  967. })
  968. // #endif
  969. },
  970. //保存推广码到本地
  971. savePic(filePath) {
  972. // #ifdef APP-PLUS
  973. uni.showLoading({
  974. title: '正在保存'
  975. });
  976. uni.saveImageToPhotosAlbum({
  977. filePath: filePath,
  978. success: function() {
  979. uni.showToast({
  980. title: '推广码保存成功~'
  981. });
  982. },
  983. fail: function(e) {
  984. console.log(e, '推广码保存失败')
  985. },
  986. complete: function() {
  987. uni.hideLoading()
  988. }
  989. });
  990. // #endif
  991. },
  992. hello(res) {
  993. // console.log(321,res)
  994. },
  995. // 前往新人专享
  996. goNewcomers() {
  997. uni.navigateTo({
  998. url: '/pages/store/newcomers/index'
  999. })
  1000. },
  1001. getCode() {
  1002. getRandCode().then(res => {
  1003. let code = res.data.code;
  1004. this.config.bar.code = code;
  1005. this.config.qrc.code = code;
  1006. }).catch(err => {
  1007. return this.$util.Tips(err);
  1008. })
  1009. },
  1010. tapQrCode() {
  1011. this.isCode = true;
  1012. this.codeIndex = 0;
  1013. this.$nextTick(function() {
  1014. let code = this.userInfo.bar_code;
  1015. this.config.bar.code = code;
  1016. this.config.qrc.code = code;
  1017. })
  1018. },
  1019. closeCode() {
  1020. this.isCode = false
  1021. this.isextension = false
  1022. },
  1023. tapCode(index) {
  1024. this.codeIndex = index;
  1025. if (index == 1) {
  1026. this.getCode();
  1027. } else {
  1028. let code = this.userInfo.bar_code;
  1029. this.config.bar.code = code;
  1030. this.config.qrc.code = code;
  1031. }
  1032. },
  1033. getWechatuserinfo() {
  1034. //#ifdef H5
  1035. Auth.isWeixin() && Auth.toAuth('snsapi_userinfo', '/pages/user/index');
  1036. //#endif
  1037. },
  1038. getRoutineUserInfo(e) {
  1039. updateUserInfo({
  1040. userInfo: e.detail.userInfo
  1041. }).then(res => {
  1042. this.getUserInfo();
  1043. return this.$util.Tips('更新用户信息成功');
  1044. }).catch(err => {
  1045. return this.$util.Tips(err);
  1046. })
  1047. },
  1048. // 记录会员访问
  1049. setVisit() {
  1050. setVisit({
  1051. url: '/pages/user/index'
  1052. }).then(res => {})
  1053. },
  1054. // 打开授权
  1055. openAuto() {
  1056. //#ifndef MP
  1057. toLogin();
  1058. //#endif
  1059. //#ifdef MP
  1060. this.isShowAuth = true;
  1061. //#endif
  1062. },
  1063. // 授权回调
  1064. onLoadFun(e) {
  1065. this.getUserInfo(e);
  1066. this.getMyMenus();
  1067. this.setVisit();
  1068. this.isShowAuth = false;
  1069. },
  1070. Setting: function() {
  1071. uni.openSetting({
  1072. success: function(res) {}
  1073. });
  1074. },
  1075. // 授权关闭
  1076. authColse: function(e) {
  1077. this.isShowAuth = e
  1078. },
  1079. // 绑定手机
  1080. bindPhone() {
  1081. uni.navigateTo({
  1082. url: '/pages/users/user_phone/index'
  1083. })
  1084. },
  1085. /**
  1086. * 获取个人用户信息
  1087. */
  1088. getUserInfo: function() {
  1089. let that = this;
  1090. getUserInfo().then(res => {
  1091. that.userInfo = res.data;
  1092. that.stu = res.data.svip_open;
  1093. that.memberStatus = parseInt(res.data.member_func_status);
  1094. that.vipStatus = res.data.vip_status;
  1095. that.$store.commit("SETUID", res.data.uid);
  1096. that.$store.commit("UPDATE_USERINFO", res.data);
  1097. that.orderMenu.forEach((item, index) => {
  1098. switch (item.title) {
  1099. case '待付款':
  1100. item.num = res.data.orderStatusNum.unpaid_count
  1101. break
  1102. case '待发货':
  1103. item.num = res.data.orderStatusNum.unshipped_count
  1104. break
  1105. case '待收货':
  1106. item.num = res.data.orderStatusNum.received_count
  1107. break
  1108. case '待评价':
  1109. item.num = res.data.orderStatusNum.evaluated_count
  1110. break
  1111. case '售后/退款':
  1112. item.num = res.data.orderStatusNum.refunding_count
  1113. break
  1114. }
  1115. })
  1116. });
  1117. },
  1118. //小程序授权api替换 getUserInfo
  1119. getUserProfile() {
  1120. uni.showLoading({
  1121. title: '获取中'
  1122. });
  1123. let self = this;
  1124. Routine.getUserProfile()
  1125. .then(res => {
  1126. Routine.getCode()
  1127. .then(code => {
  1128. let userInfo = res.userInfo;
  1129. userInfo.code = code;
  1130. userInfo.spread_spid = app.globalData.spid; //获取推广人ID
  1131. userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
  1132. Routine.authUserInfo(userInfo)
  1133. .then(res => {
  1134. if (res.data.key !== undefined && res.data.key) {
  1135. uni.hideLoading();
  1136. self.authKey = res.data.key;
  1137. self.isPhoneBox = true;
  1138. } else {
  1139. uni.hideLoading();
  1140. let time = res.data.expires_time - self.$Cache.time();
  1141. self.$store.commit('LOGIN', {
  1142. token: res.data.token,
  1143. time: time
  1144. });
  1145. this.getUserInfo()
  1146. }
  1147. })
  1148. .catch(res => {
  1149. uni.hideLoading();
  1150. uni.showToast({
  1151. title: res.msg,
  1152. icon: 'none',
  1153. duration: 2000
  1154. });
  1155. });
  1156. })
  1157. .catch(res => {
  1158. uni.hideLoading();
  1159. });
  1160. })
  1161. .catch(res => {
  1162. uni.hideLoading();
  1163. });
  1164. },
  1165. /**
  1166. *
  1167. * 获取个人中心图标
  1168. */
  1169. switchTab(order) {
  1170. this.orderMenu.forEach((item, index) => {
  1171. switch (item.title) {
  1172. case '待付款':
  1173. item.img = order.dfk
  1174. break
  1175. case '待发货':
  1176. item.img = order.dfh
  1177. break
  1178. case '待收货':
  1179. item.img = order.dsh
  1180. break
  1181. case '待评价':
  1182. item.img = order.dpj
  1183. break
  1184. case '售后/退款':
  1185. item.img = order.sh
  1186. break
  1187. }
  1188. })
  1189. },
  1190. getMyMenus: function() {
  1191. let that = this;
  1192. // if (this.MyMenus.length) return;
  1193. getMenuList().then(res => {
  1194. let storeMenu = []
  1195. let myMenu = []
  1196. res.data.routine_my_menus.forEach((el, index, arr) => {
  1197. if (el.type == '2') {
  1198. storeMenu.push(el)
  1199. } else {
  1200. myMenu.push(el)
  1201. }
  1202. })
  1203. this.member_style = Number(res.data.diy_data.status);
  1204. this.my_banner_status = res.data.diy_data.my_banner_status;
  1205. this.menu_status = res.data.diy_data.menu_status;
  1206. this.service_status = res.data.diy_data.service_status;
  1207. this.vip_type = res.data.diy_data.vip_type;
  1208. this.newcomer_style = res.data.diy_data.newcomer_style;
  1209. this.newcomer_status = res.data.diy_data.newcomer_status;
  1210. let order01 = {
  1211. dfk: 'icon-daifukuan',
  1212. dfh: 'icon-daifahuo',
  1213. dsh: 'icon-daishouhuo',
  1214. dpj: 'icon-daipingjia',
  1215. sh: 'icon-a-shouhoutuikuan'
  1216. };
  1217. let order02 = {
  1218. dfk: 'icon-daifukuan-lan',
  1219. dfh: 'icon-daifahuo-lan',
  1220. dsh: 'icon-daishouhuo-lan',
  1221. dpj: 'icon-daipingjia-lan',
  1222. sh: 'icon-shouhou-tuikuan-lan'
  1223. };
  1224. let order03 = {
  1225. dfk: 'icon-daifukuan-ju',
  1226. dfh: 'icon-daifahuo-ju',
  1227. dsh: 'icon-daishouhuo-ju',
  1228. dpj: 'icon-daipingjia-ju',
  1229. sh: 'icon-shouhou-tuikuan-ju'
  1230. };
  1231. let order04 = {
  1232. dfk: 'icon-daifukuan-fen',
  1233. dfh: 'icon-daifahuo-fen',
  1234. dsh: 'icon-daishouhuo-fen',
  1235. dpj: 'icon-daipingjia-fen',
  1236. sh: 'icon-a-shouhoutuikuan-fen'
  1237. };
  1238. let order05 = {
  1239. dfk: 'icon-daifukuan-lv',
  1240. dfh: 'icon-daifahuo-lv',
  1241. dsh: 'icon-daishouhuo-lv',
  1242. dpj: 'icon-daipingjia-lv',
  1243. sh: 'icon-shouhou-tuikuan-lv'
  1244. };
  1245. switch (res.data.diy_data.order_status) {
  1246. case 1:
  1247. this.switchTab(order01)
  1248. break
  1249. case 2:
  1250. this.switchTab(order02)
  1251. break
  1252. case 3:
  1253. this.switchTab(order03)
  1254. break
  1255. case 4:
  1256. this.switchTab(order04)
  1257. break
  1258. case 5:
  1259. this.switchTab(order05)
  1260. break
  1261. }
  1262. that.$set(that, 'MyMenus', myMenu);
  1263. that.$set(that, 'storeMenu', storeMenu);
  1264. this.imgUrls = res.data.routine_my_banner;
  1265. this.routineContact = Number(res.data.routine_contact_type);
  1266. });
  1267. },
  1268. // 编辑页面
  1269. goEdit() {
  1270. if (this.isLogin == false || !this.userInfo.uid) {
  1271. //#ifndef MP
  1272. toLogin();
  1273. //#endif
  1274. //#ifdef MP
  1275. this.isShowAuth = true;
  1276. //#endif
  1277. } else {
  1278. // #ifdef MP
  1279. if (this.userInfo.is_default_avatar) {
  1280. this.editModal = true;
  1281. return;
  1282. }
  1283. // #endif
  1284. uni.navigateTo({
  1285. url: '/pages/users/user_set/index'
  1286. })
  1287. }
  1288. },
  1289. // 签到
  1290. goSignIn() {
  1291. uni.navigateTo({
  1292. url: '/pages/users/user_sgin/index'
  1293. })
  1294. },
  1295. goMenuPage(url, name) {
  1296. if (this.isLogin) {
  1297. let arr = url.split('@APPID=');
  1298. if (arr.length > 1) {
  1299. //#ifdef MP
  1300. uni.navigateToMiniProgram({
  1301. appId: arr[arr.length - 1], // 此为生活缴费appid
  1302. path: arr[0], // 此为生活缴费首页路径
  1303. envVersion: "release",
  1304. success: res => {
  1305. console.log("打开成功", res);
  1306. },
  1307. fail: err => {
  1308. console.log('sgdhgf', err);
  1309. }
  1310. })
  1311. //#endif
  1312. //#ifndef MP
  1313. this.Tips({
  1314. title: 'h5与app端不支持跳转外部小程序'
  1315. });
  1316. //#endif
  1317. } else {
  1318. if (url == '/pages/extension/customer_list/chat' || url == 'https://chat.crmeb.net/chat/mobile') {
  1319. this.$util.getCustomer(this.userInfo)
  1320. } else {
  1321. if (url.indexOf('http') === -1) {
  1322. // #ifdef H5
  1323. if (name && name === '订单核销') {
  1324. return window.location.href = `${location.origin}${url}`
  1325. }
  1326. // #endif
  1327. // #ifdef MP
  1328. if (url != '#' && url == '/pages/users/user_set/index') {
  1329. uni.openSetting({
  1330. success: function(res) {}
  1331. });
  1332. }
  1333. // #endif
  1334. if (url == '/pages/store_spread/index') {
  1335. storeCardApi().then(res => {
  1336. this.isextension = true
  1337. this.$nextTick(function() {
  1338. this.extension.code = res.data.url
  1339. })
  1340. }).catch(err => {
  1341. uni.hideLoading()
  1342. this.$util.Tips({
  1343. title: err
  1344. })
  1345. })
  1346. }
  1347. if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart',
  1348. '/pages/user/index', '/pages/store_cate/store_cate', '/pages/index/index'
  1349. ]
  1350. .indexOf(url.split('?')[0]) == -1) {
  1351. uni.navigateTo({
  1352. url: url
  1353. })
  1354. } else {
  1355. uni.reLaunch({
  1356. url: url
  1357. })
  1358. }
  1359. } else {
  1360. uni.navigateTo({
  1361. url: `/pages/annex/web_view/index?url=${url}`
  1362. });
  1363. }
  1364. }
  1365. }
  1366. } else {
  1367. this.openAuto();
  1368. }
  1369. }
  1370. }
  1371. }
  1372. </script>
  1373. <style lang="scss">
  1374. .area_admin_box{
  1375. position: absolute;
  1376. top: 100rpx;
  1377. right: 60rpx;
  1378. color: #FFF;
  1379. }
  1380. .style-add {
  1381. flex: 1;
  1382. overflow: hidden;
  1383. }
  1384. .height-add {
  1385. height: 100%;
  1386. }
  1387. .display-add {
  1388. height: 100%;
  1389. display: flex;
  1390. align-items: center;
  1391. }
  1392. page,
  1393. body {
  1394. height: 100%;
  1395. }
  1396. .heg {
  1397. height: 670rpx !important;
  1398. }
  1399. .mark {
  1400. position: fixed;
  1401. top: 0;
  1402. left: 0;
  1403. bottom: 0;
  1404. right: 0;
  1405. background: rgba(0, 0, 0, 0.5);
  1406. z-index: 30;
  1407. }
  1408. .height {
  1409. margin-top: -84rpx !important;
  1410. }
  1411. .menus-list {
  1412. width: 690rpx;
  1413. background-color: #fff;
  1414. border-radius: 14rpx;
  1415. margin: 25rpx auto 0 auto;
  1416. .title {
  1417. font-weight: 600;
  1418. font-size: 30rpx;
  1419. color: #333;
  1420. padding: 30rpx 30rpx 10rpx 30rpx;
  1421. }
  1422. .item {
  1423. margin-left: 30rpx;
  1424. font-size: 30rpx;
  1425. color: #333;
  1426. image {
  1427. width: 42rpx;
  1428. height: 42rpx;
  1429. display: block;
  1430. }
  1431. .text {
  1432. width: 590rpx;
  1433. border-bottom: 1rpx solid #EEEEEE;
  1434. padding: 28rpx 30rpx 28rpx 0;
  1435. .iconfont {
  1436. font-size: 20rpx;
  1437. color: #8A8A8A;
  1438. }
  1439. }
  1440. }
  1441. }
  1442. .num-wrapper {
  1443. background-color: #fff;
  1444. z-index: 29;
  1445. position: relative;
  1446. display: flex;
  1447. align-items: center;
  1448. justify-content: space-between;
  1449. margin-top: 22rpx;
  1450. color: #333;
  1451. margin: 30rpx 30rpx 25rpx 30rpx;
  1452. border-radius: 16rpx;
  1453. height: 160rpx;
  1454. &.on {
  1455. height: 128rpx;
  1456. margin-top: -68rpx;
  1457. .gift {
  1458. color: var(--view-theme);
  1459. margin-left: 10rpx;
  1460. font-weight: bold;
  1461. }
  1462. }
  1463. .img {
  1464. margin-left: 38rpx;
  1465. width: 76rpx;
  1466. height: 68rpx;
  1467. }
  1468. .text {
  1469. font-size: 28rpx;
  1470. font-weight: 400;
  1471. color: #333333;
  1472. margin-left: -60rpx;
  1473. }
  1474. .btn-login {
  1475. width: 144rpx;
  1476. height: 56rpx;
  1477. // background: linear-gradient(270deg, #FF7931 0%, #E93323 100%);
  1478. background-color: var(--view-theme);
  1479. border-radius: 28rpx;
  1480. text-align: center;
  1481. line-height: 56rpx;
  1482. margin-right: 32rpx;
  1483. font-size: 28rpx;
  1484. font-weight: 500;
  1485. color: #FFFFFF;
  1486. }
  1487. .num-item {
  1488. width: 33.33%;
  1489. text-align: center;
  1490. &~.num-item {
  1491. position: relative;
  1492. &:before {
  1493. content: '';
  1494. position: absolute;
  1495. width: 1rpx;
  1496. height: 28rpx;
  1497. top: 50%;
  1498. margin-top: -14rpx;
  1499. background-color: rgba(255, 255, 255, 0.4);
  1500. left: 0;
  1501. }
  1502. }
  1503. .num {
  1504. font-size: 36rpx;
  1505. font-weight: bold;
  1506. }
  1507. .txt {
  1508. margin-top: 8rpx;
  1509. font-size: 26rpx;
  1510. color: #555;
  1511. }
  1512. }
  1513. }
  1514. // 新人专享
  1515. .newcomersCon {
  1516. background-color: var(--view-theme);
  1517. width: 690rpx;
  1518. height: 296rpx;
  1519. margin: 0 30rpx;
  1520. border-radius: 16rpx;
  1521. &.on {
  1522. background-color: #fff;
  1523. .newcomers {
  1524. .title {
  1525. .tl {
  1526. color: #333;
  1527. }
  1528. .tr {
  1529. width: unset;
  1530. color: #666666;
  1531. background: unset;
  1532. }
  1533. }
  1534. .scroll {
  1535. .scroll-item {
  1536. background-color: var(--view-minorColorT);
  1537. }
  1538. }
  1539. }
  1540. }
  1541. .newcomers {
  1542. padding: 24rpx 30rpx;
  1543. width: 100%;
  1544. height: 100%;
  1545. background-repeat: no-repeat;
  1546. background-size: 100% 100%;
  1547. .title {
  1548. display: flex;
  1549. justify-content: space-between;
  1550. .tl {
  1551. font-size: 30rpx;
  1552. font-weight: 600;
  1553. color: #FFFFFF;
  1554. }
  1555. .tr {
  1556. width: 90rpx;
  1557. height: 36rpx;
  1558. background: linear-gradient(135deg, #FFCA52 0%, #FE960F 100%);
  1559. border-radius: 18rpx;
  1560. font-size: 24rpx;
  1561. text-align: center;
  1562. line-height: 36rpx;
  1563. font-weight: 400;
  1564. color: #FFFFFF;
  1565. .icon-xiangyou {
  1566. font-size: 20rpx;
  1567. }
  1568. }
  1569. }
  1570. .scroll {
  1571. // width: 690rpx;
  1572. margin-top: 20rpx;
  1573. white-space: nowrap;
  1574. // padding-right: 60rpx;
  1575. .scroll-item {
  1576. display: inline-block;
  1577. width: 162rpx;
  1578. height: 194rpx;
  1579. background-color: #fff;
  1580. border-radius: 12rpx;
  1581. margin-right: 10rpx;
  1582. padding: 12rpx;
  1583. .pictrue {
  1584. width: 138rpx;
  1585. height: 138rpx;
  1586. position: relative;
  1587. image {
  1588. width: 100%;
  1589. height: 100%;
  1590. }
  1591. .label {
  1592. width: 98rpx;
  1593. height: 32rpx;
  1594. background: var(--view-theme);
  1595. border-radius: 16rpx;
  1596. color: #FFFFFF;
  1597. font-size: 24rpx;
  1598. text-align: center;
  1599. line-height: 32rpx;
  1600. position: absolute;
  1601. bottom: 2rpx;
  1602. left: 50%;
  1603. margin-left: -49rpx;
  1604. }
  1605. }
  1606. .money {
  1607. font-size: 24rpx;
  1608. color: var(--view-priceColor);
  1609. margin-top: 6rpx;
  1610. }
  1611. }
  1612. }
  1613. }
  1614. }
  1615. .Tnum-wrapper {
  1616. margin: -34rpx 30rpx 25rpx 30rpx;
  1617. }
  1618. .unNum-wrapper {
  1619. margin: 0 auto 25rpx auto;
  1620. width: 690rpx;
  1621. }
  1622. .unBg {
  1623. background-color: unset !important;
  1624. .user-info {
  1625. .info {
  1626. .name {
  1627. color: #333333 !important;
  1628. font-weight: 600;
  1629. }
  1630. .num {
  1631. color: #333 !important;
  1632. .num-txt {
  1633. height: 38rpx;
  1634. background-color: rgba(51, 51, 51, 0.13);
  1635. padding: 0 12rpx;
  1636. border-radius: 16rpx;
  1637. }
  1638. }
  1639. }
  1640. }
  1641. .qrCode {
  1642. color: #333 !important;
  1643. }
  1644. .message {
  1645. .iconfont {
  1646. color: #333 !important;
  1647. }
  1648. .num {
  1649. color: #fff !important;
  1650. background-color: var(--view-theme) !important;
  1651. }
  1652. }
  1653. .setting {
  1654. .iconfont {
  1655. color: #333 !important;
  1656. }
  1657. }
  1658. }
  1659. .cardVipB {
  1660. background-color: #343A48;
  1661. width: 100%;
  1662. height: 124rpx;
  1663. border-radius: 16rpx 16rpx 0 0;
  1664. padding: 22rpx 30rpx 0 30rpx;
  1665. margin-top: 16px;
  1666. &.on {
  1667. width: 690rpx;
  1668. height: 130rpx;
  1669. background-repeat: no-repeat;
  1670. background-size: 100% 100%;
  1671. color: #fff;
  1672. margin-left: auto;
  1673. margin-right: auto;
  1674. padding: 26rpx 30rpx 0 90rpx;
  1675. .iconfont {
  1676. font-size: 24rpx;
  1677. margin-left: 6rpx;
  1678. }
  1679. }
  1680. .left-box {
  1681. .small {
  1682. color: #F8D5A8;
  1683. font-size: 28rpx;
  1684. margin-left: 18rpx;
  1685. }
  1686. .pictrue {
  1687. width: 40rpx;
  1688. height: 45rpx;
  1689. image {
  1690. width: 100%;
  1691. height: 100%;
  1692. }
  1693. }
  1694. }
  1695. .btn {
  1696. color: #BBBBBB;
  1697. font-size: 26rpx;
  1698. &.on {
  1699. color: #fff;
  1700. }
  1701. }
  1702. .icon-xiangyou {
  1703. margin-top: 6rpx;
  1704. }
  1705. }
  1706. .cardVipA {
  1707. position: absolute;
  1708. background-repeat: no-repeat;
  1709. background-size: 100% 100%;
  1710. width: 750rpx;
  1711. height: 84rpx;
  1712. bottom: -2rpx;
  1713. left: 0;
  1714. padding: 0 56rpx 0 135rpx;
  1715. .left-box {
  1716. font-size: 26rpx;
  1717. color: #905100;
  1718. font-weight: 400;
  1719. &.on {
  1720. color: #fff;
  1721. }
  1722. }
  1723. .btn {
  1724. color: #905100;
  1725. font-weight: 400;
  1726. font-size: 24rpx;
  1727. &.on {
  1728. color: #fff;
  1729. }
  1730. }
  1731. .iconfont {
  1732. font-size: 20rpx;
  1733. margin: 4rpx 0 0 4rpx;
  1734. &.on {
  1735. color: #fff;
  1736. margin-top: 0;
  1737. }
  1738. }
  1739. }
  1740. .new-users {
  1741. display: flex;
  1742. flex-direction: column;
  1743. height: 100%;
  1744. .sys-head {
  1745. position: relative;
  1746. width: 100%;
  1747. // background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
  1748. .bg {
  1749. position: absolute;
  1750. left: 0;
  1751. top: 0;
  1752. width: 100%;
  1753. height: 100%;
  1754. // background: url("~@/static/images/user-sys.png") no-repeat;
  1755. background: var(--view-theme);
  1756. background-size: 100% auto;
  1757. background-position: left bottom;
  1758. }
  1759. .sys-title {
  1760. z-index: 10;
  1761. position: relative;
  1762. height: 43px;
  1763. text-align: center;
  1764. line-height: 43px;
  1765. font-size: 34rpx;
  1766. color: #FFFFFF;
  1767. }
  1768. }
  1769. .head {
  1770. // background: #fff;
  1771. .user-card {
  1772. position: relative;
  1773. width: 100%;
  1774. // height: 270rpx;
  1775. height: 320rpx;
  1776. margin: 0 auto;
  1777. padding: 35rpx 28rpx;
  1778. background-size: 100% auto;
  1779. background-color: var(--view-theme);
  1780. .user-info {
  1781. z-index: 20;
  1782. position: relative;
  1783. display: flex;
  1784. .headwear {
  1785. position: absolute;
  1786. right: -4rpx;
  1787. top: -14rpx;
  1788. width: 44rpx;
  1789. height: 44rpx;
  1790. image {
  1791. width: 100%;
  1792. height: 100%;
  1793. }
  1794. }
  1795. .live {
  1796. width: 28rpx;
  1797. height: 28rpx;
  1798. margin-left: 14rpx;
  1799. display: block;
  1800. }
  1801. .bntImg {
  1802. width: 120rpx;
  1803. height: 120rpx;
  1804. border-radius: 50%;
  1805. text-align: center;
  1806. line-height: 120rpx;
  1807. background-color: unset;
  1808. position: relative;
  1809. .avatarName {
  1810. font-size: 16rpx;
  1811. color: #fff;
  1812. text-align: center;
  1813. background-color: rgba(0, 0, 0, 0.6);
  1814. height: 37rpx;
  1815. line-height: 37rpx;
  1816. position: absolute;
  1817. bottom: 0;
  1818. left: 0;
  1819. width: 100%;
  1820. }
  1821. }
  1822. .avatar-box {
  1823. position: relative;
  1824. display: flex;
  1825. align-items: center;
  1826. justify-content: center;
  1827. width: 120rpx;
  1828. height: 120rpx;
  1829. border-radius: 50%;
  1830. &.on {
  1831. .avatar {
  1832. border: 2px solid #FFAC65;
  1833. border-radius: 50%;
  1834. box-sizing: border-box;
  1835. }
  1836. }
  1837. }
  1838. .avatar {
  1839. position: relative;
  1840. width: 120rpx;
  1841. height: 120rpx;
  1842. border-radius: 50%;
  1843. }
  1844. .info {
  1845. width: 346rpx;
  1846. flex: 1;
  1847. display: flex;
  1848. flex-direction: column;
  1849. justify-content: space-between;
  1850. margin-left: 20rpx;
  1851. padding: 20rpx 0;
  1852. .name {
  1853. display: flex;
  1854. align-items: center;
  1855. color: #fff;
  1856. font-size: 31rpx;
  1857. width: 346rpx;
  1858. .nickname {
  1859. max-width: 196rpx;
  1860. display: block;
  1861. }
  1862. .vip {
  1863. margin-left: 10rpx;
  1864. width: 78rpx;
  1865. height: 30rpx;
  1866. image {
  1867. width: 100%;
  1868. height: 100%;
  1869. display: block;
  1870. }
  1871. }
  1872. }
  1873. .num {
  1874. display: flex;
  1875. align-items: center;
  1876. font-size: 24rpx;
  1877. color: rgba(255, 255, 255, 0.6);
  1878. image {
  1879. width: 22rpx;
  1880. height: 23rpx;
  1881. margin-left: 20rpx;
  1882. }
  1883. }
  1884. }
  1885. }
  1886. .qrCode {
  1887. color: #fff;
  1888. margin-top: 18rpx !important;
  1889. font-size: 38rpx;
  1890. margin-right: 34rpx !important;
  1891. }
  1892. .message {
  1893. align-self: flex-start;
  1894. position: relative;
  1895. margin-top: 16rpx;
  1896. margin-right: 30rpx;
  1897. .uni-badge-left-margin {
  1898. /deep/.uni-badge--error {
  1899. background-color: #fff !important;
  1900. color: var(--view-theme);
  1901. }
  1902. }
  1903. .num {
  1904. position: absolute;
  1905. top: -8rpx;
  1906. left: 18rpx;
  1907. padding: 0 6rpx;
  1908. height: 28rpx;
  1909. border-radius: 12rpx;
  1910. background-color: #fff;
  1911. font-size: 18rpx;
  1912. line-height: 28rpx;
  1913. text-align: center;
  1914. color: var(--view-theme);
  1915. }
  1916. .iconfont {
  1917. font-size: 40rpx;
  1918. color: #fff;
  1919. }
  1920. }
  1921. .sign {
  1922. z-index: 200;
  1923. position: absolute;
  1924. right: -12rpx;
  1925. top: 80rpx;
  1926. display: flex;
  1927. align-items: center;
  1928. justify-content: center;
  1929. width: 120rpx;
  1930. height: 60rpx;
  1931. background: linear-gradient(90deg, rgba(255, 225, 87, 1) 0%, rgba(238, 193, 15, 1) 100%);
  1932. border-radius: 29rpx 4rpx 4rpx 29rpx;
  1933. color: #282828;
  1934. font-size: 28rpx;
  1935. font-weight: bold;
  1936. }
  1937. }
  1938. .order-wrapper {
  1939. background: #fff;
  1940. margin: 0 30rpx;
  1941. border-radius: 16rpx;
  1942. position: relative;
  1943. .order-hd {
  1944. justify-content: space-between;
  1945. padding: 30rpx 20rpx 10rpx;
  1946. margin-top: 25rpx;
  1947. font-size: 30rpx;
  1948. color: #282828;
  1949. .left {
  1950. font-weight: bold;
  1951. }
  1952. .right {
  1953. align-items: center;
  1954. color: #666666;
  1955. font-size: 26rpx;
  1956. .icon-xiangyou {
  1957. margin-left: 5rpx;
  1958. margin-top: 6rpx;
  1959. font-size: 26rpx;
  1960. }
  1961. }
  1962. }
  1963. .order-bd {
  1964. display: flex;
  1965. padding: 0 0;
  1966. .order-item {
  1967. display: flex;
  1968. flex-direction: column;
  1969. justify-content: center;
  1970. align-items: center;
  1971. width: 20%;
  1972. height: 140rpx;
  1973. .pic {
  1974. position: relative;
  1975. text-align: center;
  1976. .iconfont {
  1977. font-size: 48rpx;
  1978. color: var(--view-theme);
  1979. }
  1980. image {
  1981. width: 58rpx;
  1982. height: 48rpx;
  1983. }
  1984. .uni-badge-left-margin {
  1985. position: absolute;
  1986. // #ifdef MP
  1987. top: -22rpx;
  1988. // #endif
  1989. /deep/.uni-badge--error {
  1990. background-color: #fff !important;
  1991. }
  1992. /deep/.uni-badge {
  1993. color: var(--view-theme);
  1994. border: 1px solid var(--view-theme);
  1995. z-index: 29;
  1996. }
  1997. }
  1998. }
  1999. .txt {
  2000. margin-top: 6rpx;
  2001. font-size: 26rpx;
  2002. color: #454545;
  2003. }
  2004. }
  2005. }
  2006. }
  2007. }
  2008. .slider-wrapper {
  2009. margin: 20rpx 30rpx;
  2010. height: 130rpx;
  2011. swiper,
  2012. swiper-item {
  2013. height: 100%;
  2014. }
  2015. image {
  2016. width: 100%;
  2017. height: 130rpx;
  2018. border-radius: 16rpx;
  2019. }
  2020. }
  2021. .user-menus {
  2022. background-color: #fff;
  2023. margin: 0 30rpx;
  2024. border-radius: 16rpx;
  2025. .menu-title {
  2026. padding: 30rpx 30rpx 40rpx;
  2027. font-size: 30rpx;
  2028. color: #282828;
  2029. font-weight: bold;
  2030. }
  2031. .list-box {
  2032. display: flex;
  2033. flex-wrap: wrap;
  2034. padding: 0;
  2035. }
  2036. .item {
  2037. position: relative;
  2038. display: flex;
  2039. align-items: center;
  2040. justify-content: space-between;
  2041. flex-direction: column;
  2042. width: 25%;
  2043. margin-bottom: 47rpx;
  2044. font-size: 26rpx;
  2045. color: #333333;
  2046. image {
  2047. width: 52rpx;
  2048. height: 52rpx;
  2049. margin-bottom: 18rpx;
  2050. }
  2051. &:last-child::before {
  2052. display: none;
  2053. }
  2054. }
  2055. button {
  2056. font-size: 28rpx;
  2057. }
  2058. }
  2059. .phone {
  2060. color: #fff;
  2061. background-color: #CCC;
  2062. border-radius: 15px;
  2063. width: max-content;
  2064. padding: 2px 10px;
  2065. font-size: 20rpx;
  2066. margin-top: 4px;
  2067. }
  2068. .order-status-num {
  2069. min-width: 12rpx;
  2070. background-color: #fff;
  2071. color: var(--view-theme);
  2072. border-radius: 15px;
  2073. position: absolute;
  2074. right: -14rpx;
  2075. top: -15rpx;
  2076. font-size: 20rpx;
  2077. padding: 0 8rpx;
  2078. border: 1px solid var(--view-theme);
  2079. }
  2080. .support {
  2081. width: 219rpx;
  2082. height: 74rpx;
  2083. margin: 54rpx auto;
  2084. display: block;
  2085. }
  2086. .copyRightImg {
  2087. width: 219rpx;
  2088. height: 74rpx;
  2089. margin: 16rpx auto;
  2090. display: block;
  2091. }
  2092. .copy_right {
  2093. text-align: center;
  2094. color: #ccc;
  2095. font-size: 22rpx;
  2096. margin-top: 40rpx;
  2097. .copyRightText {
  2098. margin-top: 0rpx;
  2099. color: #ccc;
  2100. font-size: 20rpx;
  2101. margin-bottom: 20rpx;
  2102. }
  2103. }
  2104. }
  2105. .card-vip {
  2106. display: flex;
  2107. justify-content: space-between;
  2108. position: relative;
  2109. width: 690rpx;
  2110. height: 125rpx;
  2111. margin: -72rpx auto 0;
  2112. background: url('~@/static/images/user_vip.png');
  2113. background-size: cover;
  2114. padding: 28rpx 30rpx 0 92rpx;
  2115. &.on {
  2116. .left-box {
  2117. color: #fff;
  2118. }
  2119. .btn {
  2120. color: #fff;
  2121. }
  2122. .iconfont {
  2123. color: #fff;
  2124. }
  2125. }
  2126. .left-box {
  2127. font-size: 28rpx;
  2128. color: #AE5A2A;
  2129. .big {
  2130. font-size: 28rpx;
  2131. }
  2132. .small {
  2133. opacity: 0.8;
  2134. }
  2135. }
  2136. .btn {
  2137. color: #AE5A2A;
  2138. font-weight: 400;
  2139. font-size: 26rpx;
  2140. }
  2141. .iconfont {
  2142. font-size: 20rpx;
  2143. margin: 4rpx 0 0 4rpx;
  2144. color: #AE5A2A;
  2145. }
  2146. }
  2147. .setting {
  2148. margin-top: 15rpx;
  2149. margin-left: 15rpx;
  2150. color: #fff;
  2151. .iconfont {
  2152. font-size: 40rpx;
  2153. }
  2154. }
  2155. .new-users {
  2156. padding-bottom: 0;
  2157. padding-bottom: constant(safe-area-inset-bottom);
  2158. padding-bottom: env(safe-area-inset-bottom);
  2159. }
  2160. </style>