index.vue 58 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="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="user-menus" style="margin-top: 25rpx;"
  462. v-if="userInfo.is_shareholder==1">
  463. <!-- <view class="menus-list"> -->
  464. <view class="menu-title">股东功能</view>
  465. <view class="list-box">
  466. <view class="item" @click="goMenuPage('/pages/shareholder/certificate/red', '股权记录')">
  467. <image src="/static/images/user-1.png"></image>
  468. <text>股权记录</text>
  469. </view>
  470. <view class="item" @click="goMenuPage('/pages/shareholder/certificate/init', '分红记录')">
  471. <image src="/static/images/user-2.png"></image>
  472. <view>分红记录</view>
  473. </view>
  474. </view>
  475. </view>
  476. <view class="copy_right">
  477. <template v-if='copyRightText'>
  478. <image :src="copyRightImg" mode="aspectFill" class="copyRightImg"></image>
  479. <view class="copyRightText">
  480. {{copyRightText}}
  481. </view>
  482. </template>
  483. <image v-else :src="copyRightImg" mode="aspectFill" class='support'></image>
  484. </view>
  485. <view class="uni-p-b-98"></view>
  486. </scroll-view>
  487. </view>
  488. <view class="codePopup" :style="colorStyle" v-show="isCode">
  489. <view class="header acea-row row-between-wrapper">
  490. <view class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
  491. v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
  492. </view>
  493. <view>
  494. <view class="acea-row row-center-wrapper">
  495. <w-barcode :options="config.bar"></w-barcode>
  496. </view>
  497. <view class="acea-row row-center-wrapper" style="margin-top: 35rpx;">
  498. <w-qrcode :options="config.qrc" @generate="hello"></w-qrcode>
  499. </view>
  500. <view class="codeNum">{{config.bar.code}}</view>
  501. <view class="tip">如遇到扫码失败请将屏幕调至最亮重新扫码</view>
  502. </view>
  503. <view class="iconfont icon-guanbi2" @click="closeCode"></view>
  504. </view>
  505. <view class="mark" v-if="isCode"></view>
  506. <pageFooter :style="colorStyle"></pageFooter>
  507. <!-- 店员推广码 extension-->
  508. <view class="codePopup heg" :style="colorStyle" v-show="isextension">
  509. <view class="header">
  510. <view class="title on" style="width: 100%;">店员推广码</view>
  511. </view>
  512. <view>
  513. <view class="acea-row row-center-wrapper" style="margin-top: 25rpx;" @click="hah">
  514. <w-qrcode id="hah" :options="extension"></w-qrcode>
  515. </view>
  516. <view class="tip">如遇到扫码失败请将屏幕调至最亮重新扫码</view>
  517. </view>
  518. <view class="iconfont icon-guanbi2" @click="closeCode"></view>
  519. </view>
  520. <view class="mark" v-show="isextension"></view>
  521. <ewcomerPop v-if="isComerGift" :comerGift="comerGift" @comerPop="comerPop"></ewcomerPop>
  522. <!-- #ifdef MP -->
  523. <!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
  524. <editUserModal :isShow="editModal" @closeEdit="closeEdit" @editSuccess="editSuccess"></editUserModal>
  525. <!-- #endif -->
  526. </view>
  527. </template>
  528. <script>
  529. let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
  530. import {
  531. storeCardApi
  532. } from '@/api/store.js';
  533. import {
  534. newcomerGift
  535. } from '@/api/new_store.js';
  536. import {
  537. newcomerList,
  538. copyRight
  539. } from '@/api/api.js';
  540. import {
  541. getMenuList,
  542. getUserInfo,
  543. setVisit,
  544. updateUserInfo,
  545. getRandCode,
  546. updateWechatInfo
  547. } from '@/api/user.js';
  548. import {
  549. wechatAuthV2,
  550. silenceAuth
  551. } from '@/api/public.js'
  552. import {
  553. toLogin
  554. } from '@/libs/login.js';
  555. import {
  556. mapState,
  557. mapGetters
  558. } from "vuex";
  559. // #ifdef H5
  560. import Auth from '@/libs/wechat';
  561. // #endif
  562. import {
  563. HTTP_REQUEST_URL
  564. } from '@/config/app';
  565. const app = getApp();
  566. import ewcomerPop from '@/components/ewcomerPop/index.vue'
  567. import pageFooter from '@/components/pageFooter/index.vue'
  568. import dayjs from '@/plugin/dayjs/dayjs.min.js';
  569. import Routine from '@/libs/routine';
  570. import colors from '@/mixins/color';
  571. // #ifdef MP
  572. import editUserModal from '@/components/eidtUserModal/index.vue';
  573. // #endif
  574. export default {
  575. components: {
  576. pageFooter,
  577. ewcomerPop,
  578. // #ifdef MP
  579. editUserModal
  580. // #endif
  581. },
  582. computed: {
  583. ...mapGetters({
  584. cartNum: 'cartNum',
  585. isLogin: 'isLogin'
  586. })
  587. },
  588. filters: {
  589. coundTime(val) {
  590. var setTime = val * 1000
  591. var nowTime = new Date()
  592. var rest = setTime - nowTime.getTime()
  593. var day = parseInt(rest / (60 * 60 * 24 * 1000))
  594. // var hour = parseInt(rest/(60*60*1000)%24) //小时
  595. return day + '天'
  596. },
  597. dateFormat: function(value) {
  598. return dayjs(value * 1000).format('YYYY-MM-DD');
  599. }
  600. },
  601. mixins: [colors],
  602. data() {
  603. return {
  604. vipStatus: 0,
  605. stu: false,
  606. storeMenu: [], // 商家管理
  607. orderMenu: [{
  608. img: 'icon-daifukuan',
  609. title: '待付款',
  610. url: '/pages/goods/order_list/index?status=0'
  611. },
  612. {
  613. img: 'icon-daifahuo',
  614. title: '待发货',
  615. url: '/pages/goods/order_list/index?status=1'
  616. },
  617. {
  618. img: 'icon-daishouhuo',
  619. title: '待收货',
  620. url: '/pages/goods/order_list/index?status=2'
  621. },
  622. {
  623. img: 'icon-daipingjia',
  624. title: '待评价',
  625. url: '/pages/goods/order_list/index?status=3'
  626. },
  627. {
  628. img: 'icon-a-shouhoutuikuan',
  629. title: '售后/退款',
  630. url: '/pages/users/user_return_list/index'
  631. },
  632. ],
  633. imgUrls: [],
  634. autoplay: true,
  635. circular: true,
  636. interval: 3000,
  637. duration: 500,
  638. isAuto: false, //没有授权的不会自动授权
  639. //isShowAuth: false, //是否隐藏授权
  640. orderStatusNum: {},
  641. userInfo: {},
  642. MyMenus: [],
  643. sysHeight: sysHeight,
  644. mpHeight: 0,
  645. showStatus: 1,
  646. // #ifdef H5 || MP
  647. pageHeight: '100%',
  648. routineContact: 0,
  649. // #endif
  650. // #ifdef APP-PLUS
  651. pageHeight: app.globalData.windowHeight,
  652. // #endif
  653. // #ifdef H5
  654. isWeixin: Auth.isWeixin(),
  655. //#endif
  656. footerSee: false,
  657. member_style: 1,
  658. my_banner_status: 1,
  659. menu_status: 1,
  660. service_status: 1,
  661. newcomer_status: 1,
  662. codeList: [{
  663. name: '会员码'
  664. }, {
  665. name: '付款码'
  666. }],
  667. codeIndex: 0,
  668. config: {
  669. bar: {
  670. code: '',
  671. color: ['#000'],
  672. bgColor: '#FFFFFF', // 背景色
  673. width: 480, // 宽度
  674. height: 110 // 高度
  675. },
  676. qrc: {
  677. code: '',
  678. size: 380, // 二维码大小
  679. level: 3, //等级 0~4
  680. bgColor: '#FFFFFF', //二维码背景色 默认白色
  681. border: {
  682. color: ['#eee', '#eee'], //边框颜色支持渐变色
  683. lineWidth: 3, //边框宽度
  684. },
  685. // img: '/static/logo.png', //图片
  686. // iconSize: 40, //二维码图标的大小
  687. color: ['#333', '#333'], //边框颜色支持渐变色
  688. }
  689. },
  690. isCode: false,
  691. isextension: false,
  692. extension: {
  693. code: "",
  694. size: 380, // 二维码大小
  695. level: 3, //等级 0~4
  696. bgColor: '#FFFFFF', //二维码背景色 默认白色
  697. border: {
  698. color: ['#eee', '#eee'], //边框颜色支持渐变色
  699. lineWidth: 3, //边框宽度
  700. },
  701. // img: '/static/logo.png', //图片
  702. // iconSize: 40, //二维码图标的大小
  703. color: ['#333', '#333'], //边框颜色支持渐变色
  704. },
  705. imgHost: HTTP_REQUEST_URL,
  706. copyRightText: "",
  707. copyRightImg: '',
  708. giftPic: '',
  709. vip_type: 1,
  710. newcomer_style: 1,
  711. newList: [],
  712. newBg: '',
  713. comerGift: {},
  714. isComerGift: false,
  715. memberStatus: 0,
  716. editModal: false, // 编辑头像信息
  717. }
  718. },
  719. created() {
  720. let that = this;
  721. // #ifdef MP
  722. // 小程序静默授权
  723. if (!this.$store.getters.isLogin) {
  724. // Routine.getCode()
  725. // .then(code => {
  726. // Routine.silenceAuth(code).then(res => {
  727. // this.onLoadFun();
  728. // })
  729. // })
  730. // .catch(res => {
  731. // uni.hideLoading();
  732. // });
  733. }
  734. // #endif
  735. if (that.isLogin == false) {
  736. // #ifdef H5 || APP-PLUS
  737. toLogin()
  738. // #endif
  739. // #ifdef MP
  740. //this.isShowAuth = true;
  741. // #endif
  742. }
  743. // #ifdef APP-PLUS
  744. that.$set(that, 'pageHeight', app.globalData.windowHeight);
  745. // #endif
  746. },
  747. async onLoad(option) {
  748. if (this.isLogin) {
  749. this.getNewcomerGift();
  750. }
  751. // #ifdef H5
  752. if (this.isLogin && Auth.isWeixin() && option.code) {
  753. try {
  754. let res = await updateWechatInfo({
  755. code: option.code
  756. });
  757. this.userInfo.nickname = res.data.nickname;
  758. this.userInfo.avatar = res.data.avatar;
  759. this.userInfo.is_complete = 1;
  760. } catch (e) {}
  761. }
  762. // #endif
  763. this.colorData();
  764. let giftList = [
  765. this.imgHost + '/statics/images/gift01.png',
  766. this.imgHost + '/statics/images/gift02.png',
  767. this.imgHost + '/statics/images/gift03.png',
  768. this.imgHost + '/statics/images/gift04.png',
  769. this.imgHost + '/statics/images/gift05.png',
  770. this.imgHost + '/statics/images/gift06.png'
  771. ];
  772. let newBg = [
  773. this.imgHost + '/statics/images/blue-bg.png',
  774. this.imgHost + '/statics/images/green-bg.png',
  775. this.imgHost + '/statics/images/red-bg.png',
  776. this.imgHost + '/statics/images/pink-bg.png',
  777. this.imgHost + '/statics/images/orange-bg.png',
  778. this.imgHost + '/statics/images/gold-bg.png'
  779. ]
  780. setTimeout(() => {
  781. switch (this.colorNum) {
  782. case 1:
  783. this.giftPic = giftList[2];
  784. this.newBg = newBg[0];
  785. break;
  786. case 2:
  787. this.giftPic = giftList[1];
  788. this.newBg = newBg[1];
  789. break;
  790. case 3:
  791. this.giftPic = giftList[4];
  792. this.newBg = newBg[2];
  793. break;
  794. case 4:
  795. this.giftPic = giftList[0];
  796. this.newBg = newBg[3];
  797. break;
  798. case 5:
  799. this.giftPic = giftList[3];
  800. this.newBg = newBg[4];
  801. break;
  802. case 6:
  803. this.giftPic = giftList[5];
  804. this.newBg = newBg[5];
  805. break;
  806. default:
  807. this.giftPic = giftList[4];
  808. this.newBg = newBg[2];
  809. break
  810. }
  811. }, 1)
  812. },
  813. onReady() {
  814. let self = this
  815. // #ifdef MP
  816. let info = uni.createSelectorQuery().select(".sys-head");
  817. info.boundingClientRect(function(data) { //data - 各种参数
  818. self.mpHeight = data.height
  819. }).exec()
  820. // #endif
  821. },
  822. onShow: function() {
  823. this.getNewList();
  824. if (this.cartNum > 0) {
  825. uni.setTabBarBadge({
  826. index: 3,
  827. text: this.cartNum > 99 ? '99+' : this.cartNum + ''
  828. })
  829. } else {
  830. uni.hideTabBarRedDot({
  831. index: 3
  832. })
  833. }
  834. this.copyRightText = uni.getStorageSync('copyNameInfo');
  835. this.copyRightImg = uni.getStorageSync('copyImageInfo');
  836. uni.removeStorageSync('form_type_cart');
  837. if (!this.copyRightText) {
  838. this.getCopyRight();
  839. }
  840. let that = this;
  841. // #ifdef APP-PLUS
  842. uni.getSystemInfo({
  843. success: function(res) {
  844. that.pageHeight = res.windowHeight + 'px'
  845. }
  846. });
  847. // #endif
  848. if (that.isLogin) {
  849. // #ifdef MP
  850. // this.isShowAuth = false;
  851. // #endif
  852. this.getUserInfo();
  853. this.getMyMenus();
  854. this.setVisit();
  855. };
  856. },
  857. methods: {
  858. // #ifdef MP
  859. editSuccess() {
  860. this.editModal = false;
  861. this.getUserInfo();
  862. },
  863. closeEdit() {
  864. this.editModal = false;
  865. },
  866. // #endif
  867. getCopyRight() {
  868. copyRight().then(res => {
  869. let data = res.data;
  870. if (!data.copyrightContext && !data.copyrightImage) {
  871. data.copyrightImage = '/static/images/support.png'
  872. }
  873. uni.setStorageSync('copyNameInfo', data.copyrightContext);
  874. uni.setStorageSync('copyImageInfo', data.copyrightImage);
  875. this.copyRightText = data.copyrightContext;
  876. this.copyRightImg = data.copyrightImage;
  877. }).catch(err => {
  878. return this.$util.Tips({
  879. title: err.msg
  880. });
  881. });
  882. },
  883. // 查看订单
  884. intoPage(url) {
  885. if (this.isLogin) {
  886. uni.navigateTo({
  887. url: url
  888. })
  889. } else {
  890. toLogin()
  891. }
  892. },
  893. goDetail(item) {
  894. uni.navigateTo({
  895. url: `/pages/goods_details/index?id=${item.id}&fromPage='newVip'`
  896. });
  897. },
  898. comerPop() {
  899. this.isComerGift = false;
  900. },
  901. getNewcomerGift() {
  902. if (uni.getStorageSync('newcomerGift')) {
  903. return this.isComerGift = false;
  904. }
  905. newcomerGift().then(res => {
  906. this.comerGift = res.data;
  907. if (Object.prototype.toString.call(this.comerGift) == '[object Object]') {
  908. if (res.data.coupon_count || res.data.product_count || res.data.register_give_money || res
  909. .data.first_order_discount || res.data.register_give_integral) {
  910. uni.setStorageSync('newcomerGift', true);
  911. this.isComerGift = true;
  912. }
  913. }
  914. }).catch(err => {
  915. return this.$util.Tips({
  916. title: err
  917. });
  918. })
  919. },
  920. getNewList() {
  921. newcomerList({
  922. page: 1,
  923. limit: 6,
  924. priceOrder: '',
  925. salesOrder: ''
  926. }).then(res => {
  927. this.newList = res.data;
  928. }).catch(err => {
  929. return this.$util.Tips({
  930. title: err
  931. });
  932. })
  933. },
  934. hah() {
  935. let that = this
  936. // #ifdef H5
  937. var canvas = document.getElementById("hah").getElementsByTagName("canvas")
  938. var imgURL = canvas[0].toDataURL("image/png")
  939. var dlLink = document.createElement('a');
  940. dlLink.download = "店员推广码";
  941. dlLink.href = imgURL;
  942. dlLink.dataset.downloadurl = ["image/png", dlLink.download, dlLink.href].join(':');
  943. document.body.appendChild(dlLink);
  944. dlLink.click();
  945. document.body.removeChild(dlLink);
  946. // #endif
  947. // #ifdef MP
  948. // let ctx = uni.createCanvasContext("WQrcode")
  949. // let ctx = uni.createSelectorQuery().in(this).select("canvas")
  950. // uni.canvasToTempFilePath({
  951. // canvasId: "WQrcode",
  952. // fileType: 'image/png',
  953. // success: (res) => {
  954. // // 保存当前绘制推广码
  955. // that.savePic(res.tempFilePath)
  956. // },
  957. // fail: function(err) {
  958. // console.log(err, '推广码生成失败')
  959. // }
  960. // },that)
  961. // ctx.draw(false, uni.canvasToTempFilePath({
  962. // canvasId: 'WQrcode',
  963. // success: function (res) {
  964. // that.savePic(res.tempFilePath)
  965. // },
  966. // fail: function (err) {
  967. // console.log(err, '推广码生成失败')
  968. // }
  969. // },that))
  970. // console.log("222222",ctx)
  971. // #endif
  972. // #ifdef APP-PLUS
  973. uni.canvasToTempFilePath({
  974. canvasId: 'WQrcode',
  975. success: (res) => {
  976. uni.hideLoading()
  977. // 保存当前绘制推广码
  978. that.savePic(res.tempFilePath)
  979. },
  980. fail: function(err) {
  981. console.log(err, '推广码生成失败')
  982. }
  983. })
  984. // #endif
  985. },
  986. //保存推广码到本地
  987. savePic(filePath) {
  988. // #ifdef APP-PLUS
  989. uni.showLoading({
  990. title: '正在保存'
  991. });
  992. uni.saveImageToPhotosAlbum({
  993. filePath: filePath,
  994. success: function() {
  995. uni.showToast({
  996. title: '推广码保存成功~'
  997. });
  998. },
  999. fail: function(e) {
  1000. console.log(e, '推广码保存失败')
  1001. },
  1002. complete: function() {
  1003. uni.hideLoading()
  1004. }
  1005. });
  1006. // #endif
  1007. },
  1008. hello(res) {
  1009. // console.log(321,res)
  1010. },
  1011. // 前往新人专享
  1012. goNewcomers() {
  1013. uni.navigateTo({
  1014. url: '/pages/store/newcomers/index'
  1015. })
  1016. },
  1017. getCode() {
  1018. getRandCode().then(res => {
  1019. let code = res.data.code;
  1020. this.config.bar.code = code;
  1021. this.config.qrc.code = code;
  1022. }).catch(err => {
  1023. return this.$util.Tips(err);
  1024. })
  1025. },
  1026. tapQrCode() {
  1027. this.isCode = true;
  1028. this.codeIndex = 0;
  1029. this.$nextTick(function() {
  1030. let code = this.userInfo.bar_code;
  1031. this.config.bar.code = code;
  1032. this.config.qrc.code = code;
  1033. })
  1034. },
  1035. closeCode() {
  1036. this.isCode = false
  1037. this.isextension = false
  1038. },
  1039. tapCode(index) {
  1040. this.codeIndex = index;
  1041. if (index == 1) {
  1042. this.getCode();
  1043. } else {
  1044. let code = this.userInfo.bar_code;
  1045. this.config.bar.code = code;
  1046. this.config.qrc.code = code;
  1047. }
  1048. },
  1049. getWechatuserinfo() {
  1050. //#ifdef H5
  1051. Auth.isWeixin() && Auth.toAuth('snsapi_userinfo', '/pages/user/index');
  1052. //#endif
  1053. },
  1054. getRoutineUserInfo(e) {
  1055. updateUserInfo({
  1056. userInfo: e.detail.userInfo
  1057. }).then(res => {
  1058. this.getUserInfo();
  1059. return this.$util.Tips('更新用户信息成功');
  1060. }).catch(err => {
  1061. return this.$util.Tips(err);
  1062. })
  1063. },
  1064. // 记录会员访问
  1065. setVisit() {
  1066. setVisit({
  1067. url: '/pages/user/index'
  1068. }).then(res => {})
  1069. },
  1070. // 打开授权
  1071. openAuto() {
  1072. toLogin();
  1073. },
  1074. // 授权回调
  1075. onLoadFun(e) {
  1076. this.getUserInfo(e);
  1077. this.getMyMenus();
  1078. this.setVisit();
  1079. this.isShowAuth = false;
  1080. },
  1081. Setting: function() {
  1082. uni.openSetting({
  1083. success: function(res) {}
  1084. });
  1085. },
  1086. // 授权关闭
  1087. authColse: function(e) {
  1088. this.isShowAuth = e
  1089. },
  1090. // 绑定手机
  1091. bindPhone() {
  1092. uni.navigateTo({
  1093. url: '/pages/users/user_phone/index'
  1094. })
  1095. },
  1096. /**
  1097. * 获取个人用户信息
  1098. */
  1099. getUserInfo: function() {
  1100. let that = this;
  1101. getUserInfo().then(res => {
  1102. that.userInfo = res.data
  1103. console.log(that.userInfo, ' that.userInfo');
  1104. that.stu = res.data.svip_open
  1105. that.memberStatus = parseInt(res.data.member_func_status)
  1106. that.vipStatus = res.data.vip_status
  1107. that.$store.commit("SETUID", res.data.uid);
  1108. that.$store.commit("UPDATE_USERINFO", res.data);
  1109. that.orderMenu.forEach((item, index) => {
  1110. switch (item.title) {
  1111. case '待付款':
  1112. item.num = res.data.orderStatusNum.unpaid_count
  1113. break
  1114. case '待发货':
  1115. item.num = res.data.orderStatusNum.unshipped_count
  1116. break
  1117. case '待收货':
  1118. item.num = res.data.orderStatusNum.received_count
  1119. break
  1120. case '待评价':
  1121. item.num = res.data.orderStatusNum.evaluated_count
  1122. break
  1123. case '售后/退款':
  1124. item.num = res.data.orderStatusNum.refunding_count
  1125. break
  1126. }
  1127. })
  1128. });
  1129. },
  1130. //小程序授权api替换 getUserInfo
  1131. getUserProfile() {
  1132. uni.showLoading({
  1133. title: '获取中'
  1134. });
  1135. let self = this;
  1136. Routine.getUserProfile()
  1137. .then(res => {
  1138. Routine.getCode()
  1139. .then(code => {
  1140. let userInfo = res.userInfo;
  1141. userInfo.code = code;
  1142. userInfo.spread_spid = app.globalData.spid; //获取推广人ID
  1143. userInfo.spread_code = app.globalData.code; //获取推广人分享二维码ID
  1144. Routine.authUserInfo(userInfo)
  1145. .then(res => {
  1146. if (res.data.key !== undefined && res.data.key) {
  1147. uni.hideLoading();
  1148. self.authKey = res.data.key;
  1149. self.isPhoneBox = true;
  1150. } else {
  1151. uni.hideLoading();
  1152. let time = res.data.expires_time - self.$Cache.time();
  1153. self.$store.commit('LOGIN', {
  1154. token: res.data.token,
  1155. time: time
  1156. });
  1157. this.getUserInfo()
  1158. }
  1159. })
  1160. .catch(res => {
  1161. uni.hideLoading();
  1162. uni.showToast({
  1163. title: res.msg,
  1164. icon: 'none',
  1165. duration: 2000
  1166. });
  1167. });
  1168. })
  1169. .catch(res => {
  1170. uni.hideLoading();
  1171. });
  1172. })
  1173. .catch(res => {
  1174. uni.hideLoading();
  1175. });
  1176. },
  1177. /**
  1178. *
  1179. * 获取个人中心图标
  1180. */
  1181. switchTab(order) {
  1182. this.orderMenu.forEach((item, index) => {
  1183. switch (item.title) {
  1184. case '待付款':
  1185. item.img = order.dfk
  1186. break
  1187. case '待发货':
  1188. item.img = order.dfh
  1189. break
  1190. case '待收货':
  1191. item.img = order.dsh
  1192. break
  1193. case '待评价':
  1194. item.img = order.dpj
  1195. break
  1196. case '售后/退款':
  1197. item.img = order.sh
  1198. break
  1199. }
  1200. })
  1201. },
  1202. getMyMenus: function() {
  1203. let that = this;
  1204. // if (this.MyMenus.length) return;
  1205. getMenuList().then(res => {
  1206. let storeMenu = []
  1207. let myMenu = []
  1208. res.data.routine_my_menus.forEach((el, index, arr) => {
  1209. if (el.type == '2') {
  1210. storeMenu.push(el)
  1211. } else {
  1212. myMenu.push(el)
  1213. }
  1214. })
  1215. this.member_style = Number(res.data.diy_data.status)
  1216. this.my_banner_status = res.data.diy_data.my_banner_status
  1217. this.menu_status = res.data.diy_data.menu_status
  1218. this.service_status = res.data.diy_data.service_status
  1219. this.vip_type = res.data.diy_data.vip_type;
  1220. this.newcomer_style = res.data.diy_data.newcomer_style;
  1221. this.newcomer_status = res.data.diy_data.newcomer_status;
  1222. let order01 = {
  1223. dfk: 'icon-daifukuan',
  1224. dfh: 'icon-daifahuo',
  1225. dsh: 'icon-daishouhuo',
  1226. dpj: 'icon-daipingjia',
  1227. sh: 'icon-a-shouhoutuikuan'
  1228. }
  1229. let order02 = {
  1230. dfk: 'icon-daifukuan-lan',
  1231. dfh: 'icon-daifahuo-lan',
  1232. dsh: 'icon-daishouhuo-lan',
  1233. dpj: 'icon-daipingjia-lan',
  1234. sh: 'icon-shouhou-tuikuan-lan'
  1235. }
  1236. let order03 = {
  1237. dfk: 'icon-daifukuan-ju',
  1238. dfh: 'icon-daifahuo-ju',
  1239. dsh: 'icon-daishouhuo-ju',
  1240. dpj: 'icon-daipingjia-ju',
  1241. sh: 'icon-shouhou-tuikuan-ju'
  1242. }
  1243. let order04 = {
  1244. dfk: 'icon-daifukuan-fen',
  1245. dfh: 'icon-daifahuo-fen',
  1246. dsh: 'icon-daishouhuo-fen',
  1247. dpj: 'icon-daipingjia-fen',
  1248. sh: 'icon-a-shouhoutuikuan-fen'
  1249. }
  1250. let order05 = {
  1251. dfk: 'icon-daifukuan-lv',
  1252. dfh: 'icon-daifahuo-lv',
  1253. dsh: 'icon-daishouhuo-lv',
  1254. dpj: 'icon-daipingjia-lv',
  1255. sh: 'icon-shouhou-tuikuan-lv'
  1256. }
  1257. switch (res.data.diy_data.order_status) {
  1258. case 1:
  1259. this.switchTab(order01)
  1260. break
  1261. case 2:
  1262. this.switchTab(order02)
  1263. break
  1264. case 3:
  1265. this.switchTab(order03)
  1266. break
  1267. case 4:
  1268. this.switchTab(order04)
  1269. break
  1270. case 5:
  1271. this.switchTab(order05)
  1272. break
  1273. }
  1274. that.$set(that, 'MyMenus', myMenu);
  1275. that.$set(that, 'storeMenu', storeMenu);
  1276. this.imgUrls = res.data.routine_my_banner
  1277. this.routineContact = Number(res.data.routine_contact_type)
  1278. });
  1279. },
  1280. // 编辑页面
  1281. goEdit() {
  1282. if (this.isLogin == false || !this.userInfo.uid) {
  1283. toLogin();
  1284. } else {
  1285. // #ifdef MP
  1286. if (this.userInfo.is_default_avatar) {
  1287. this.editModal = true;
  1288. return;
  1289. }
  1290. // #endif
  1291. uni.navigateTo({
  1292. url: '/pages/users/user_set/index'
  1293. })
  1294. }
  1295. },
  1296. // 签到
  1297. goSignIn() {
  1298. uni.navigateTo({
  1299. url: '/pages/users/user_sgin/index'
  1300. })
  1301. },
  1302. goMenuPage(url, name) {
  1303. if (this.isLogin) {
  1304. let arr = url.split('@APPID=');
  1305. if (arr.length > 1) {
  1306. //#ifdef MP
  1307. uni.navigateToMiniProgram({
  1308. appId: arr[arr.length - 1], // 此为生活缴费appid
  1309. path: arr[0], // 此为生活缴费首页路径
  1310. envVersion: "release",
  1311. success: res => {
  1312. console.log("打开成功", res);
  1313. },
  1314. fail: err => {
  1315. console.log('sgdhgf', err);
  1316. }
  1317. })
  1318. //#endif
  1319. //#ifndef MP
  1320. this.Tips({
  1321. title: 'h5与app端不支持跳转外部小程序'
  1322. });
  1323. //#endif
  1324. } else {
  1325. if (url == '/pages/extension/customer_list/chat' || url == 'https://chat.crmeb.net/chat/mobile') {
  1326. this.$util.getCustomer(this.userInfo)
  1327. } else {
  1328. if (url.indexOf('http') === -1) {
  1329. // #ifdef H5
  1330. if (name && name === '订单核销') {
  1331. return window.location.href = `${location.origin}${url}`
  1332. }
  1333. // #endif
  1334. // #ifdef MP
  1335. if (url != '#' && url == '/pages/users/user_set/index') {
  1336. uni.openSetting({
  1337. success: function(res) {}
  1338. });
  1339. }
  1340. // #endif
  1341. if (url == '/pages/store_spread/index') {
  1342. storeCardApi().then(res => {
  1343. this.isextension = true
  1344. this.$nextTick(function() {
  1345. this.extension.code = res.data.url
  1346. })
  1347. }).catch(err => {
  1348. uni.hideLoading()
  1349. this.$util.Tips({
  1350. title: err
  1351. })
  1352. })
  1353. }
  1354. if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart',
  1355. '/pages/user/index', '/pages/store_cate/store_cate', '/pages/index/index'
  1356. ]
  1357. .indexOf(url.split('?')[0]) == -1) {
  1358. uni.navigateTo({
  1359. url: url
  1360. })
  1361. } else {
  1362. uni.reLaunch({
  1363. url: url
  1364. })
  1365. }
  1366. } else {
  1367. uni.navigateTo({
  1368. url: `/pages/annex/web_view/index?url=${url}`
  1369. });
  1370. }
  1371. }
  1372. }
  1373. } else {
  1374. this.openAuto();
  1375. }
  1376. }
  1377. }
  1378. }
  1379. </script>
  1380. <style lang="scss">
  1381. .style-add {
  1382. flex: 1;
  1383. overflow: hidden;
  1384. }
  1385. .height-add {
  1386. height: 100%;
  1387. }
  1388. .display-add {
  1389. height: 100%;
  1390. display: flex;
  1391. align-items: center;
  1392. }
  1393. page,
  1394. body {
  1395. height: 100%;
  1396. }
  1397. .heg {
  1398. height: 670rpx !important;
  1399. }
  1400. .mark {
  1401. position: fixed;
  1402. top: 0;
  1403. left: 0;
  1404. bottom: 0;
  1405. right: 0;
  1406. background: rgba(0, 0, 0, 0.5);
  1407. z-index: 30;
  1408. }
  1409. .height {
  1410. margin-top: -84rpx !important;
  1411. }
  1412. .menus-list {
  1413. width: 690rpx;
  1414. background-color: #fff;
  1415. border-radius: 14rpx;
  1416. margin: 25rpx auto 0 auto;
  1417. .title {
  1418. font-weight: 600;
  1419. font-size: 30rpx;
  1420. color: #333;
  1421. padding: 30rpx 30rpx 10rpx 30rpx;
  1422. }
  1423. .item {
  1424. margin-left: 30rpx;
  1425. font-size: 30rpx;
  1426. color: #333;
  1427. image {
  1428. width: 42rpx;
  1429. height: 42rpx;
  1430. display: block;
  1431. }
  1432. .text {
  1433. width: 590rpx;
  1434. border-bottom: 1rpx solid #EEEEEE;
  1435. padding: 28rpx 30rpx 28rpx 0;
  1436. .iconfont {
  1437. font-size: 20rpx;
  1438. color: #8A8A8A;
  1439. }
  1440. }
  1441. }
  1442. }
  1443. .num-wrapper {
  1444. background-color: #fff;
  1445. z-index: 29;
  1446. position: relative;
  1447. display: flex;
  1448. align-items: center;
  1449. justify-content: space-between;
  1450. margin-top: 22rpx;
  1451. color: #333;
  1452. margin: 30rpx 30rpx 25rpx 30rpx;
  1453. border-radius: 16rpx;
  1454. height: 160rpx;
  1455. &.on {
  1456. height: 128rpx;
  1457. margin-top: -68rpx;
  1458. .gift {
  1459. color: var(--view-theme);
  1460. margin-left: 10rpx;
  1461. font-weight: bold;
  1462. }
  1463. }
  1464. .img {
  1465. margin-left: 38rpx;
  1466. width: 76rpx;
  1467. height: 68rpx;
  1468. }
  1469. .text {
  1470. font-size: 28rpx;
  1471. font-weight: 400;
  1472. color: #333333;
  1473. margin-left: -60rpx;
  1474. }
  1475. .btn-login {
  1476. width: 144rpx;
  1477. height: 56rpx;
  1478. // background: linear-gradient(270deg, #FF7931 0%, #E93323 100%);
  1479. background-color: var(--view-theme);
  1480. border-radius: 28rpx;
  1481. text-align: center;
  1482. line-height: 56rpx;
  1483. margin-right: 32rpx;
  1484. font-size: 28rpx;
  1485. font-weight: 500;
  1486. color: #FFFFFF;
  1487. }
  1488. .num-item {
  1489. width: 33.33%;
  1490. text-align: center;
  1491. &~.num-item {
  1492. position: relative;
  1493. &:before {
  1494. content: '';
  1495. position: absolute;
  1496. width: 1rpx;
  1497. height: 28rpx;
  1498. top: 50%;
  1499. margin-top: -14rpx;
  1500. background-color: rgba(255, 255, 255, 0.4);
  1501. left: 0;
  1502. }
  1503. }
  1504. .num {
  1505. font-size: 36rpx;
  1506. font-weight: bold;
  1507. }
  1508. .txt {
  1509. margin-top: 8rpx;
  1510. font-size: 26rpx;
  1511. color: #555;
  1512. }
  1513. }
  1514. }
  1515. // 新人专享
  1516. .newcomersCon {
  1517. background-color: var(--view-theme);
  1518. width: 690rpx;
  1519. height: 296rpx;
  1520. margin: 0 30rpx;
  1521. border-radius: 16rpx;
  1522. &.on {
  1523. background-color: #fff;
  1524. .newcomers {
  1525. .title {
  1526. .tl {
  1527. color: #333;
  1528. }
  1529. .tr {
  1530. width: unset;
  1531. color: #666666;
  1532. background: unset;
  1533. }
  1534. }
  1535. .scroll {
  1536. .scroll-item {
  1537. background-color: var(--view-minorColorT);
  1538. }
  1539. }
  1540. }
  1541. }
  1542. .newcomers {
  1543. padding: 24rpx 30rpx;
  1544. width: 100%;
  1545. height: 100%;
  1546. background-repeat: no-repeat;
  1547. background-size: 100% 100%;
  1548. .title {
  1549. display: flex;
  1550. justify-content: space-between;
  1551. .tl {
  1552. font-size: 30rpx;
  1553. font-weight: 600;
  1554. color: #FFFFFF;
  1555. }
  1556. .tr {
  1557. width: 90rpx;
  1558. height: 36rpx;
  1559. background: linear-gradient(135deg, #FFCA52 0%, #FE960F 100%);
  1560. border-radius: 18rpx;
  1561. font-size: 24rpx;
  1562. text-align: center;
  1563. line-height: 36rpx;
  1564. font-weight: 400;
  1565. color: #FFFFFF;
  1566. .icon-xiangyou {
  1567. font-size: 20rpx;
  1568. }
  1569. }
  1570. }
  1571. .scroll {
  1572. // width: 690rpx;
  1573. margin-top: 20rpx;
  1574. white-space: nowrap;
  1575. // padding-right: 60rpx;
  1576. .scroll-item {
  1577. display: inline-block;
  1578. width: 162rpx;
  1579. height: 194rpx;
  1580. background-color: #fff;
  1581. border-radius: 12rpx;
  1582. margin-right: 10rpx;
  1583. padding: 12rpx;
  1584. .pictrue {
  1585. width: 138rpx;
  1586. height: 138rpx;
  1587. position: relative;
  1588. image {
  1589. width: 100%;
  1590. height: 100%;
  1591. }
  1592. .label {
  1593. width: 98rpx;
  1594. height: 32rpx;
  1595. background: var(--view-theme);
  1596. border-radius: 16rpx;
  1597. color: #FFFFFF;
  1598. font-size: 24rpx;
  1599. text-align: center;
  1600. line-height: 32rpx;
  1601. position: absolute;
  1602. bottom: 2rpx;
  1603. left: 50%;
  1604. margin-left: -49rpx;
  1605. }
  1606. }
  1607. .money {
  1608. font-size: 24rpx;
  1609. color: var(--view-priceColor);
  1610. margin-top: 6rpx;
  1611. }
  1612. }
  1613. }
  1614. }
  1615. }
  1616. .Tnum-wrapper {
  1617. margin: -34rpx 30rpx 25rpx 30rpx;
  1618. }
  1619. .unNum-wrapper {
  1620. margin: 0 auto 25rpx auto;
  1621. width: 690rpx;
  1622. }
  1623. .unBg {
  1624. background-color: unset !important;
  1625. .user-info {
  1626. .info {
  1627. .name {
  1628. color: #333333 !important;
  1629. font-weight: 600;
  1630. }
  1631. .num {
  1632. color: #333 !important;
  1633. .num-txt {
  1634. height: 38rpx;
  1635. background-color: rgba(51, 51, 51, 0.13);
  1636. padding: 0 12rpx;
  1637. border-radius: 16rpx;
  1638. }
  1639. }
  1640. }
  1641. }
  1642. .qrCode {
  1643. color: #333 !important;
  1644. }
  1645. .message {
  1646. .iconfont {
  1647. color: #333 !important;
  1648. }
  1649. .num {
  1650. color: #fff !important;
  1651. background-color: var(--view-theme) !important;
  1652. }
  1653. }
  1654. .setting {
  1655. .iconfont {
  1656. color: #333 !important;
  1657. }
  1658. }
  1659. }
  1660. .cardVipB {
  1661. background-color: #343A48;
  1662. width: 100%;
  1663. height: 124rpx;
  1664. border-radius: 16rpx 16rpx 0 0;
  1665. padding: 22rpx 30rpx 0 30rpx;
  1666. margin-top: 16px;
  1667. &.on {
  1668. width: 690rpx;
  1669. height: 130rpx;
  1670. background-repeat: no-repeat;
  1671. background-size: 100% 100%;
  1672. color: #fff;
  1673. margin-left: auto;
  1674. margin-right: auto;
  1675. padding: 26rpx 30rpx 0 90rpx;
  1676. .iconfont {
  1677. font-size: 24rpx;
  1678. margin-left: 6rpx;
  1679. }
  1680. }
  1681. .left-box {
  1682. .small {
  1683. color: #F8D5A8;
  1684. font-size: 28rpx;
  1685. margin-left: 18rpx;
  1686. }
  1687. .pictrue {
  1688. width: 40rpx;
  1689. height: 45rpx;
  1690. image {
  1691. width: 100%;
  1692. height: 100%;
  1693. }
  1694. }
  1695. }
  1696. .btn {
  1697. color: #BBBBBB;
  1698. font-size: 26rpx;
  1699. &.on {
  1700. color: #fff;
  1701. }
  1702. }
  1703. .icon-xiangyou {
  1704. margin-top: 6rpx;
  1705. }
  1706. }
  1707. .cardVipA {
  1708. position: absolute;
  1709. background-repeat: no-repeat;
  1710. background-size: 100% 100%;
  1711. width: 750rpx;
  1712. height: 84rpx;
  1713. bottom: -2rpx;
  1714. left: 0;
  1715. padding: 0 56rpx 0 135rpx;
  1716. .left-box {
  1717. font-size: 26rpx;
  1718. color: #905100;
  1719. font-weight: 400;
  1720. &.on {
  1721. color: #fff;
  1722. }
  1723. }
  1724. .btn {
  1725. color: #905100;
  1726. font-weight: 400;
  1727. font-size: 24rpx;
  1728. &.on {
  1729. color: #fff;
  1730. }
  1731. }
  1732. .iconfont {
  1733. font-size: 20rpx;
  1734. margin: 4rpx 0 0 4rpx;
  1735. &.on {
  1736. color: #fff;
  1737. margin-top: 0;
  1738. }
  1739. }
  1740. }
  1741. .new-users {
  1742. display: flex;
  1743. flex-direction: column;
  1744. height: 100%;
  1745. .sys-head {
  1746. position: relative;
  1747. width: 100%;
  1748. // background: linear-gradient(90deg, $bg-star1 0%, $bg-end1 100%);
  1749. .bg {
  1750. position: absolute;
  1751. left: 0;
  1752. top: 0;
  1753. width: 100%;
  1754. height: 100%;
  1755. // background: url("~@/static/images/user-sys.png") no-repeat;
  1756. background: var(--view-theme);
  1757. background-size: 100% auto;
  1758. background-position: left bottom;
  1759. }
  1760. .sys-title {
  1761. z-index: 10;
  1762. position: relative;
  1763. height: 43px;
  1764. text-align: center;
  1765. line-height: 43px;
  1766. font-size: 34rpx;
  1767. color: #FFFFFF;
  1768. }
  1769. }
  1770. .head {
  1771. // background: #fff;
  1772. .user-card {
  1773. position: relative;
  1774. width: 100%;
  1775. height: 270rpx;
  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>