index.vue 57 KB

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