index.vue 58 KB

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