index.vue 69 KB

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