index.vue 68 KB

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