personal.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565
  1. <template>
  2. <view class="container-mine">
  3. <view class="navbar">
  4. <navbar ref="navbar" :config="config" backColor="#666"></navbar>
  5. </view>
  6. <view class="mine-top">
  7. <view class="mine-left">
  8. <image class="mine-left-img" v-if="user.headPhoto" :src="$getImgPath(user.headPhoto)">
  9. </image>
  10. <image class="mine-left-img" v-else src="/static/default-avatar.png" mode=""></image>
  11. <view class="name-info">
  12. <text class="name-text">{{user.certification?user.realName:user.nickname}}</text>
  13. <text class="name-tag">{{user.mobile}}</text>
  14. </view>
  15. </view>
  16. <view class="mine-right">
  17. <u-icon name="arrow-right"></u-icon>
  18. </view>
  19. </view>
  20. <view class="maxBox">
  21. <!-- <view class="pointsBox" @click="goMypoints()">
  22. <view class="pointsBox_l">
  23. <image src="/static/czd/myPoint.png" mode=""></image>
  24. 我的积分
  25. </view>
  26. <view class="pointsBox_r">
  27. {{userInformation.integral_able}}积分
  28. <text class="iconfont_yige">&#xe65f;</text>
  29. </view>
  30. </view> -->
  31. <view class="shopOrderList">
  32. <view class="shopOrderList_title">
  33. <view class="shopOrderList_title_l">商城订单</view>
  34. <view class="shopOrderList_title_r" @click="toShopOrderList({value:-1})">查看更多<text class="iconfont_yige">&#xe65f;</text></view>
  35. </view>
  36. <view class="shopOrderList_b">
  37. <view class="shopOrderList_item" v-for="(item, index) in orderTab" :key="index" @click="toShopOrderList(item)">
  38. <view class="anglenum" v-if="item.count=='0'?false:item.count">
  39. {{item.count}}
  40. </view>
  41. <view class="shopOrderList_item_img">
  42. <image :src="item.icon" mode=""></image>
  43. </view>
  44. <view class="shopOrderList_item_lab">{{item.label}} </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="list">
  49. <view class="list_item" v-for="(item, index) in toolsList" :key="index" @click="goSublevelPage(item.url)">
  50. <view class="list_item_l">
  51. <image :src="item.icon" mode=""></image>
  52. {{item.label}}
  53. </view>
  54. <view class="list_item_r">
  55. <image src="/static/czd/tiaozhuan.png" mode=""></image>
  56. </view>
  57. </view>
  58. </view>
  59. <view class="list" v-if="shopInfo.union_business" >
  60. <view class="list_title">商城订单</view>
  61. <view class="list_item" @click.stop="goWorkTablePage('/pages/workbench/shop/index')">
  62. <view class="list_item_l">
  63. <image src="/static/czd/personal_4.png" mode=""></image>
  64. 店铺管理
  65. </view>
  66. <view class="list_item_r">
  67. <image src="/static/czd/tiaozhuan.png" mode=""></image>
  68. </view>
  69. </view>
  70. <view class="list_item" @click="goWorkTablePage('/pages/workbench/goods/index')">
  71. <view class="list_item_l">
  72. <image src="/static/czd/personal_4.png" mode=""></image>
  73. 商品管理
  74. </view>
  75. <view class="list_item_r">
  76. <image src="/static/czd/tiaozhuan.png" mode=""></image>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <!-- <view class="bgImg">
  82. <view class="position-ab">
  83. <view class="other">
  84. <view class="other-top">
  85. <view class="left">
  86. 其他工具
  87. </view>
  88. </view>
  89. <view class="option">
  90. <view class="list" @click.stop="goSublevelPage('/pages/order/gbOrder/gbOrderList')">
  91. <image class="my-icon" src="./../../static/personal/tool1.png" mode="aspectFit"></image>
  92. <view class="name-one">我的拼团</view>
  93. </view>
  94. <view class="list" @click="goSublevelPage('/pages/user/address/addressList')">
  95. <image class="my-icon" src="./../../static/personal/tool2.png" mode="aspectFit"></image>
  96. <view class="name-one">收货地址</view>
  97. </view>
  98. <view class="list" @click="goSublevelPage('/pages/research/setup/edit')">
  99. <image class="my-icon" src="./../../static/personal/tool3.png" mode="aspectFit"></image>
  100. <view class="name-one">个人信息</view>
  101. </view>
  102. <view class="list" @click="goSublevelPage('/pages/research/community/collection')">
  103. <image class="my-icon" src="./../../static/personal/tool4.png" mode="aspectFit"></image>
  104. <view class="name-one">我的收藏</view>
  105. </view>
  106. </view>
  107. <view class="option">
  108. <view class="list" v-if="platform == 'android' || (platform == 'ios' && openProxy == true)"
  109. @click="goSublevelPage('/pages/user/regional-agency/index')">
  110. <image class="my-icon" src="./../../static/personal/tool5.png" mode="aspectFit"></image>
  111. <view class="name-one">区域代理</view>
  112. </view>
  113. <view class="list" @click="goToRegisterAndAudit()">
  114. <image class="my-icon" src="./../../static/personal/tool6.png" mode="aspectFit"></image>
  115. <view class="name-one">商家入驻</view>
  116. </view>
  117. <view class="list" @click="goPhone()">
  118. <image class="my-icon" src="./../../static/personal/tool7.png" mode="aspectFit"></image>
  119. <view class="name-one">官方客服</view>
  120. </view>
  121. <view class="list" @click="goTocommonproblem()">
  122. <image class="my-icon" src="./../../static/personal/tool8.png" mode="aspectFit"></image>
  123. <view class="name-one">常见问题</view>
  124. </view>
  125. </view>
  126. <view class="option">
  127. <view class="list" @click="tabPage('/pages/couponCenter/index')">
  128. <image class="my-icon" src="./../../static/personal/tool8.png" mode="aspectFit"></image>
  129. <view class="name-one">领券中心</view>
  130. </view>
  131. </view>
  132. </view>
  133. <view class="other tools" v-if="shopInfo.union_business">
  134. <view class="other-top">
  135. <view class="left">
  136. 工作台
  137. </view>
  138. </view>
  139. <view class="option">
  140. <view class="list" @click.stop="goWorkTablePage('/pages/workbench/shop/index')">
  141. <image class="my-icon" src="./../../static/personal/shop-icon.png" mode="aspectFit"></image>
  142. <view class="name-one">店铺管理</view>
  143. </view>
  144. <view class="list" @click="goWorkTablePage('/pages/workbench/goods/index')">
  145. <image class="my-icon" src="./../../static/personal/goods-icon.png" mode="aspectFit">
  146. </image>
  147. <view class="name-one">商品管理</view>
  148. </view>
  149. <view class="list" @click="goWorkTablePage('/pages/workbench/order/index')">
  150. <image class="my-icon" src="./../../static/personal/order-icon.png" mode="aspectFit">
  151. </image>
  152. <view class="name-one">订单上报</view>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. </view> -->
  158. <!-- <div @click="goToMyWallet">aaa</div> -->
  159. <entrepreneurship-zone-tabbar :current="3"></entrepreneurship-zone-tabbar>
  160. </view>
  161. </view>
  162. </template>
  163. <!-- grade: 0 普通会员 , 1:店长 -->
  164. <!-- activating: 是否激活 -->
  165. <!-- auth_success: 是否认证 -->
  166. <!-- balance:余额 -->
  167. <!-- commission_able: 贡献值 -->
  168. <!-- integral_able: 积分值 -->
  169. <script>
  170. import {
  171. getAccountInfo
  172. } from "@/api/login.js"
  173. import {
  174. myStatistics,
  175. unreadNum
  176. } from "@/api/userInfo.js"
  177. import {
  178. myUserInfo
  179. } from "@/api/government.js"
  180. let app = getApp()
  181. export default {
  182. data() {
  183. return {
  184. config: {
  185. back: true, //false是tolbar页面 是则不写
  186. title: '个人中心',
  187. color: '#1A1A1A',
  188. //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
  189. backgroundColor: [1, '#fff'],
  190. rightSlot: true,
  191. },
  192. imgUrl: this.$mConfig.staticUrl,
  193. //微信小程序用户信息
  194. userInfo: {
  195. head_photo: "",
  196. nickname: "登录/注册"
  197. },
  198. hiddenLink: true,
  199. loginNo: false, //判断显示邀请码
  200. storage: true,
  201. isLogin: false, //判断是否登录
  202. userInformation: {}, //用户信息
  203. myCommunity: {}, //我的社区
  204. myMsg: null,
  205. ispay: app.globalData.openPay,
  206. numObj: {},
  207. //value对应订单列表接口的area_feature参数。传0或不传是排除了申购的订单列表(商品订单),传3是申购订单列表
  208. isSign: false, // 是否签到
  209. shopInfo: {},
  210. openProxy: false, // 是否开启区域代理
  211. platform: 'android',
  212. careerInfo: {},
  213. user: {},
  214. orderTab: [
  215. {
  216. label: '待付款',
  217. icon: '/static/order/order-icon1.png',
  218. value: 0,
  219. count: 0,
  220. },
  221. {
  222. label: '待发货',
  223. icon: '/static/order/order-icon2.png',
  224. value: 1,
  225. count: 0,
  226. },
  227. {
  228. label: '待收货',
  229. icon: '/static/order/order-icon3.png',
  230. value: 3,
  231. count: 0,
  232. },
  233. {
  234. label: '待评价',
  235. icon: '/static/order/order-icon4.png',
  236. value: 5,
  237. count: 0,
  238. },
  239. {
  240. label: '退换/售后',
  241. icon: '/static/order/order-icon5.png',
  242. value: 6,
  243. count: 0,
  244. }
  245. ],
  246. // 订单数量
  247. generalOrder: {
  248. waitPayNum: "0", //待支付数量
  249. waitCommentNum: "0", //待评论数量
  250. waitUseNum: "0", //待使用数量
  251. waitShipNum: "0", //待发货数量
  252. waitReceivingNum: "0" //待收货数量
  253. },
  254. toolsList: [
  255. {
  256. label: '我的拼团',
  257. icon: '/static/czd/personal_1.png',
  258. url: '/pages/order/gbOrder/gbOrderList',
  259. },
  260. {
  261. label: '收货地址',
  262. icon: '/static/czd/personal_2.png',
  263. url: '/pages/user/address/addressList',
  264. },
  265. {
  266. label: '商家入驻',
  267. icon: '/static/czd/personal_3.png',
  268. url: '/pages/user/merchant/settleIn?type=tenants_agreement',
  269. },
  270. {
  271. label: '个人信息',
  272. icon: '/static/czd/personal_4.png',
  273. url: '/pages/government/personalData',
  274. },
  275. {
  276. label: '我的收藏',
  277. icon: '/static/czd/personal_5.png',
  278. url: '/pages/research/community/collection',
  279. },
  280. // {
  281. // label: '推送设置',
  282. // icon: '/static/czd/personal_6.png',
  283. // url: '/pages/index/push',
  284. // }
  285. ]
  286. }
  287. },
  288. created() {
  289. let userInfo = uni.getStorageSync("apiToken")
  290. let shop = uni.getStorageSync("shop")
  291. },
  292. onPageScroll(e) {
  293. let maxHeight = uni.upx2px(300);
  294. if (e.scrollTop > maxHeight) {
  295. // this.$set(this.config, 'backgroundColor', [1, '#2cba28']);
  296. } else {
  297. // this.$set(this.config, 'backgroundColor', [e.scrollTop / maxHeight.toFixed(1), '#2cba28']);
  298. }
  299. this.$refs.navbar.init();
  300. },
  301. //清空数据
  302. //显示弹出框
  303. async onShow() {
  304. var that = this
  305. let token = uni.getStorageSync("apiToken")
  306. let shop = uni.getStorageSync("shop")
  307. this.isOpenProxy()
  308. this.platform = uni.getSystemInfoSync().platform;
  309. // let personal = uni.getStorageSync("personal")
  310. await this.judgeLogin().then(res => {
  311. // console.log('this.judgeLogin = res', res)
  312. })
  313. .catch(err => {
  314. /**
  315. * @description 重置数据
  316. */
  317. this.isLogin = false;
  318. this.userInformation = {}; //用户信息
  319. this.isSign = false;
  320. })
  321. // let getWxUserInfo = uni.getStorageSync("wxUserInfo")
  322. // if(getWxUserInfo !=''){
  323. // that.userInfo = JSON.parse(getWxUserInfo)
  324. // }
  325. // if (this.isLogin) {
  326. // if (token) {
  327. // this.hiddenLink = false
  328. // this.loginNo = true
  329. // this.getuserInfo()
  330. // }
  331. // await this.getMyStatistics()
  332. // 获取信息条数
  333. await this.getGeneralOrderCount()
  334. await this.getUnreadNum()
  335. await this.getcareerInfo()
  336. // this.$forceUpdate();
  337. // }
  338. this.getUserData()
  339. },
  340. onPullDownRefresh() {
  341. let token = uni.getStorageSync("apiToken")
  342. this.isOpenProxy()
  343. if (!token) {
  344. uni.stopPullDownRefresh();
  345. } else {
  346. this.getAll()
  347. }
  348. },
  349. methods: {
  350. getUserData() {
  351. myUserInfo().then(res => {
  352. this.user = res.data;
  353. uni.stopPullDownRefresh();
  354. }).catch(() => {
  355. uni.stopPullDownRefresh();
  356. })
  357. },
  358. // 获取店铺信息
  359. getShopInfo() {
  360. this.$http.get('/yxt/shop/my-shop', {
  361. union_business: true
  362. }).then(res => {
  363. if (res.code == 200 && res.data) {
  364. this.shopInfo = res.data
  365. } else {
  366. this.shopInfo.union_business = false
  367. }
  368. })
  369. },
  370. // 跳转我的积分
  371. goMypoints(){
  372. uni.navigateTo({
  373. url:"/pages/research/community/mypoints"
  374. })
  375. },
  376. isOpenProxy() {
  377. this.$http.get('/saleconfig/openPayment').then(res => {
  378. if (res && res.code == 200) {
  379. this.openProxy = res.openPayment;
  380. }
  381. });
  382. }, // 上部切换
  383. topDataChange(e) {
  384. let token = uni.getStorageSync("apiToken")
  385. if (!token) {
  386. uni.navigateTo({
  387. url: "../research/register/login"
  388. })
  389. return;
  390. }
  391. if (e.title == '我的爱心' || e.title == '今日爱心') {
  392. // 跳转 我的爱心
  393. uni.navigateTo({
  394. url: "/pages/research/myLove/index"
  395. })
  396. } else if (e.title == '公益积分') {
  397. // 跳转 我的公益积分
  398. uni.navigateTo({
  399. url: "/pages/research/myPublicWelfare/index"
  400. })
  401. } else if (e.title == '优惠券') {
  402. uni.navigateTo({
  403. url: "/pages/couponCenter/index?isMyCoupon=true"
  404. })
  405. }
  406. },
  407. toolClick(funName) {
  408. if (!funName) {
  409. uni.showToast({
  410. icon: 'none',
  411. title: '暂无功能'
  412. })
  413. return false;
  414. }
  415. this[funName]();
  416. },
  417. rest() {
  418. this.userInformation = {}
  419. this.myCommunity = {}
  420. },
  421. async getAll() {
  422. this.rest() //清空消息
  423. await this.judgeLogin() //判断是否登录
  424. if (this.isLogin) {
  425. // await this.getUnreadNum() //未读消息
  426. await this.getMyStatistics() //登录消息
  427. await this.getuserInfo() //用户消息
  428. await this.getGeneralOrderCount()
  429. this.$forceUpdate();
  430. }
  431. },
  432. goaAdress() {
  433. let token = uni.getStorageSync("apiToken")
  434. if (!token) {
  435. uni.navigateTo({
  436. url: "../research/register/login"
  437. })
  438. return;
  439. }
  440. uni.navigateTo({
  441. url: '/pages/user/address/addressList'
  442. })
  443. },
  444. goUnserInfo() {
  445. let token = uni.getStorageSync("apiToken")
  446. if (!token) {
  447. uni.navigateTo({
  448. url: "../research/register/login"
  449. })
  450. return;
  451. }
  452. uni.navigateTo({
  453. url: '/pages/research/setup/edit'
  454. })
  455. },
  456. //获取未读消息
  457. getUnreadNum() {
  458. this.$http.get(unreadNum).then(res => {
  459. uni.stopPullDownRefresh();
  460. if (res && res.code == 200) {
  461. this.myMsg = res.data
  462. } else {
  463. this.myMsg = 0
  464. }
  465. }).catch(err => {
  466. this.myMsg = 0
  467. })
  468. },
  469. //跳转我的消息
  470. goToMsg() {
  471. let token = uni.getStorageSync("apiToken")
  472. if (!token) {
  473. uni.navigateTo({
  474. url: "../research/register/login"
  475. })
  476. return;
  477. }
  478. uni.navigateTo({
  479. url: "../research/setup/myMsg"
  480. })
  481. },
  482. //前往我的二维码
  483. jumpcode() {
  484. uni.navigateTo({
  485. url: "../user/invitationCode/invitationCode"
  486. })
  487. },
  488. //前往我的钱包
  489. goToMyWallet() {
  490. let token = uni.getStorageSync("apiToken")
  491. if (!token) {
  492. uni.navigateTo({
  493. url: "../research/register/login"
  494. })
  495. } else {
  496. uni.navigateTo({
  497. url: "../user/wallet/myWallet"
  498. })
  499. }
  500. },
  501. //前往我的积分
  502. goToMyPoints() {
  503. let token = uni.getStorageSync("apiToken")
  504. if (!token) {
  505. uni.navigateTo({
  506. url: "../research/register/login"
  507. })
  508. } else {
  509. uni.navigateTo({
  510. url: "../research/community/mypoints"
  511. })
  512. }
  513. },
  514. getMyStatistics() {
  515. //获取主页数据
  516. this.$http.get(myStatistics)
  517. .then(res => {
  518. uni.stopPullDownRefresh();
  519. if (res && res.code == 200) {
  520. this.myCommunity = res.data
  521. }
  522. })
  523. },
  524. //判断是否登录
  525. async judgeLogin() {
  526. let shop = uni.getStorageSync("shop")
  527. // if (shop) {
  528. await this.$http.get(getAccountInfo).then(res => {
  529. uni.stopPullDownRefresh();
  530. if (res && res.code == 200) {
  531. this.isLogin = true
  532. this.userInformation = res.data;
  533. this.isSign = res.data.sign_in;
  534. uni.setStorageSync("personal", res.data)
  535. this.getShopInfo()
  536. } else {
  537. this.isLogin = false
  538. }
  539. })
  540. // } else {
  541. // this.isLogin = false
  542. // }
  543. },
  544. //跳转成为商家
  545. goToRegisterAndAudit() {
  546. let token = uni.getStorageSync("apiToken")
  547. if (!token) {
  548. uni.navigateTo({
  549. url: "../research/register/login"
  550. })
  551. } else {
  552. uni.navigateTo({
  553. url: "/pages/user/merchant/settleIn"
  554. })
  555. // this.$http.get("/yxt/shopapply/shopApplyInfo").then(res => {
  556. // if (res && res.code == 200) {
  557. // if (res.data == null) {
  558. // uni.navigateTo({
  559. // url: "/pages/user/merchant/settleIn"
  560. // // url: "../user/merchant/registerAndAudit"
  561. // })
  562. // } else {
  563. // if (res.data.audit_status == 2) {
  564. // uni.navigateTo({
  565. // url: "/pages/user/merchant/settleIn"
  566. // })
  567. // } else {
  568. // uni.navigateTo({
  569. // url: "../user/merchant/audit"
  570. // })
  571. // }
  572. // }
  573. // }
  574. // })
  575. // let personal = uni.getStorageSync("personal")
  576. // let isShop = personal.is_shop
  577. // if(isShop==true){
  578. // uni.navigateTo({
  579. // url:"../research/setup/toBusiness"
  580. // })}else{
  581. // uni.navigateTo({
  582. // url:"../user/merchant/registerAndAudit"
  583. // })
  584. // }
  585. }
  586. },
  587. //成为网红
  588. goTobecomeANerStar() {
  589. let token = uni.getStorageSync("apiToken")
  590. if (!token) {
  591. uni.navigateTo({
  592. url: "../research/register/login"
  593. })
  594. } else {
  595. //获取申请信息
  596. this.$http.get("/celebrity/info").then(res => {
  597. if (res && res.code == 200) {
  598. if (res.data !== null) {
  599. uni.navigateTo({
  600. // url:"./toExamine"
  601. url: "../research/setup/toExamine"
  602. })
  603. } else {
  604. uni.navigateTo({
  605. url: "../research/setup/becomeANetStar"
  606. })
  607. }
  608. }
  609. })
  610. }
  611. },
  612. //常见问题
  613. goTocommonproblem() {
  614. uni.navigateTo({
  615. url: "../research/community/commonproblem"
  616. })
  617. },
  618. //跳转我的收藏
  619. goToCollection() {
  620. let token = uni.getStorageSync("apiToken")
  621. if (!token) {
  622. uni.navigateTo({
  623. url: "../research/register/login"
  624. })
  625. } else {
  626. uni.navigateTo({
  627. url: "/pages/research/community/collection"
  628. })
  629. }
  630. },
  631. // 区域代理
  632. goAreaAgency() {
  633. uni.navigateTo({
  634. url: '/pages/user/regional-agency/index'
  635. })
  636. },
  637. goMerchantCheck() {
  638. uni.showToast({
  639. title: "商家入住",
  640. icon: 'none'
  641. })
  642. },
  643. //跳转我的银行卡
  644. goToBankCardList() {
  645. let token = uni.getStorageSync("apiToken")
  646. if (!token) {
  647. uni.navigateTo({
  648. url: "../research/register/login"
  649. })
  650. } else {
  651. uni.navigateTo({
  652. url: "../user/bankCard/bankCardList"
  653. })
  654. }
  655. },
  656. //跳转分销中心
  657. goToDistributionCentre() {
  658. let token = uni.getStorageSync("apiToken")
  659. if (!token) {
  660. uni.navigateTo({
  661. url: "../research/register/login"
  662. })
  663. } else {
  664. uni.navigateTo({
  665. url: "../user/distribution/distributionCentre"
  666. })
  667. }
  668. },
  669. // 跳转子级页面
  670. goSublevelPage(page) {
  671. if (this.isLogin) {
  672. uni.navigateTo({
  673. url: page
  674. })
  675. } else {
  676. this.$mUtil.toast("请先登录")
  677. }
  678. },
  679. //跳转我的拼团
  680. goToGbOrderList() {
  681. let token = uni.getStorageSync("apiToken")
  682. if (!token) {
  683. uni.navigateTo({
  684. url: "../research/register/login"
  685. })
  686. } else {
  687. uni.navigateTo({
  688. url: "../order/gbOrder/gbOrderList"
  689. })
  690. }
  691. },
  692. //跳转我的评论
  693. goToMyComment() {
  694. let token = uni.getStorageSync("apiToken")
  695. if (!token) {
  696. uni.navigateTo({
  697. url: "../research/register/login"
  698. })
  699. } else {
  700. uni.navigateTo({
  701. url: "../research/community/mycomment?user_id=" + this.userInfo.id
  702. })
  703. }
  704. },
  705. //跳转我的点赞
  706. goToMyFabulous() {
  707. let token = uni.getStorageSync("apiToken")
  708. if (!token) {
  709. uni.navigateTo({
  710. url: "../research/register/login"
  711. })
  712. } else {
  713. uni.navigateTo({
  714. url: "../research/community/myfabulous?user_id=" + this.userInfo.id
  715. })
  716. }
  717. },
  718. //跳转我的关注
  719. goToMyFollow() {
  720. let token = uni.getStorageSync("apiToken")
  721. if (!token) {
  722. uni.navigateTo({
  723. url: "../research/register/login"
  724. })
  725. } else {
  726. uni.navigateTo({
  727. url: "../research/community/myfollow?user_id=" + this.userInfo.id
  728. })
  729. }
  730. },
  731. //跳转我的发布
  732. goToMyRelease() {
  733. let token = uni.getStorageSync("apiToken")
  734. if (!token) {
  735. uni.navigateTo({
  736. url: "../research/register/login"
  737. })
  738. } else {
  739. uni.navigateTo({
  740. url: "../research/community/myrelease?user_id=" + this.userInfo.id
  741. })
  742. }
  743. },
  744. //跳转我的主页
  745. goToHomepage() {
  746. let token = uni.getStorageSync("apiToken")
  747. if (!token) {
  748. uni.navigateTo({
  749. url: "../research/register/login"
  750. })
  751. } else {
  752. let id = this.userInfo.id
  753. uni.navigateTo({
  754. url: "../research/community/homepage?user_id=" + id
  755. })
  756. }
  757. },
  758. //跳转订单列表
  759. goToEdit() {
  760. let token = uni.getStorageSync("apiToken")
  761. if (!token) {
  762. uni.navigateTo({
  763. url: "../research/register/login"
  764. })
  765. } else if (token) {
  766. uni.navigateTo({
  767. url: "../research/setup/management"
  768. })
  769. }
  770. },
  771. //跳转我的粉丝
  772. gotoFans() {
  773. let token = uni.getStorageSync("apiToken")
  774. if (!token) {
  775. uni.navigateTo({
  776. url: "/pages/login/index"
  777. })
  778. } else {
  779. uni.navigateTo({
  780. url: "../research/community/myfans?user_id=" + this.userInfo.id
  781. })
  782. }
  783. },
  784. //跳转注册
  785. goToRegister() {
  786. uni.navigateTo({
  787. url: "/pages/login/index"
  788. })
  789. },
  790. //跳转登录
  791. goToLogin() {
  792. uni.navigateTo({
  793. url: "../research/register/login"
  794. })
  795. },
  796. // 实名认证
  797. goAuthentication() {
  798. uni.navigateTo({
  799. url: "/pages/user/authentication"
  800. })
  801. },
  802. getuserInfo() {
  803. let shop = uni.getStorageSync('shop')
  804. this.$http.get('/account/getAccountInfo/' + shop.id).then(async res => {
  805. uni.stopPullDownRefresh();
  806. if (res && res.code == 200) {
  807. this.userInfo = res.data
  808. }
  809. })
  810. },
  811. //跳到登录页面
  812. // goLogin(url){
  813. // let token = uni.getStorageSync("apiToken")
  814. // //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
  815. // if(!token){
  816. // uni.navigateTo({
  817. // url:"./wx-login"
  818. // })
  819. // }else if(token){
  820. // this.hiddenLink =false
  821. // uni.navigateTo({
  822. // url:url
  823. // })
  824. // }
  825. // },
  826. //跳到商家页
  827. goMerchant() {
  828. let token = uni.getStorageSync("apiToken")
  829. //判断是否微信授权登录(没有授权登录进wx-login,授权了但没有注册进login)
  830. if (!token) {
  831. uni.navigateTo({
  832. url: "./wx-login"
  833. })
  834. } else if (token) {
  835. this.hiddenLink = false
  836. this.$http.get('/yxt/shopapply/shopApplyInfo', {}).then(async res => {
  837. if (res && res.code == 200) {
  838. if (!res.data) {
  839. uni.navigateTo({
  840. url: "../user/merchant/registerAndAudit"
  841. })
  842. } else {
  843. uni.navigateTo({
  844. url: '../user/merchant/audit'
  845. })
  846. }
  847. }
  848. })
  849. }
  850. },
  851. //跳到拼团订单
  852. goGbOrder() {
  853. uni.navigateTo({
  854. url: "../order/gbOrder/gbOrderList"
  855. })
  856. },
  857. //常见问题
  858. goFaq() {
  859. uni.navigateTo({
  860. url: "../user/faq"
  861. })
  862. },
  863. //联系客服
  864. goPhone() {
  865. this.$http.get('/system/info/info', {}).then(res => {
  866. if (res && res.code == 200) {
  867. if (res.data.hotline) {
  868. uni.makePhoneCall({
  869. phoneNumber: res.data.hotline
  870. });
  871. }
  872. }
  873. })
  874. },
  875. tabPage(url, needLogin = false) {
  876. let token = uni.getStorageSync("apiToken")
  877. if (needLogin && !token) {
  878. uni.navigateTo({
  879. url: "../research/register/login"
  880. })
  881. return;
  882. }
  883. uni.navigateTo({
  884. url
  885. })
  886. },
  887. // 跳转工作台页面
  888. goWorkTablePage(page) {
  889. if (this.isLogin) {
  890. uni.navigateTo({
  891. url: page
  892. })
  893. } else {
  894. this.$mUtil.toast("请先登录")
  895. }
  896. },
  897. getcareerInfo() {
  898. this.$http.get('/account/operating/center/info').then(res => {
  899. if (res && res.code == 200) {
  900. this.careerInfo = res.data;
  901. }
  902. })
  903. },
  904. //获取普通订单统计
  905. getGeneralOrderCount() {
  906. this.$http.get('/order/general-order-count', {})
  907. .then(async res => {
  908. if (res && res.code == 200) {
  909. if (res.data) {
  910. this.orderTab[0].count = res.data.wait_pay_num //待支付
  911. this.orderTab[1].count = res.data.wait_ship_num //待发货
  912. this.orderTab[2].count = res.data.wait_receiving_num //待收货
  913. this.orderTab[3].count = res.data.wait_comment_num //待评论
  914. // this.generalOrder.waitPayNum = res.data.wait_pay_num //待支付
  915. // this.generalOrder.waitCommentNum = res.data.wait_comment_num //待评论
  916. // this.generalOrder.waitUseNum = res.data.wait_use_num //待使用
  917. // this.generalOrder.waitReceivingNum = res.data.wait_receiving_num //待收货
  918. // this.generalOrder.waitShipNum = res.data.wait_ship_num //待发货
  919. }
  920. }
  921. })
  922. },
  923. // 跳转商城订单列表页
  924. toShopOrderList(item) {
  925. if (this.isLogin) {
  926. uni.navigateTo({
  927. url: `/pages/order/orderList/orderList?keys=${item.value}&orderType=0`
  928. })
  929. } else {
  930. this.$mUtil.toast("请先登录")
  931. }
  932. }
  933. }
  934. }
  935. </script>
  936. <style>
  937. page {
  938. background-color: #F5F5F5;
  939. }
  940. </style>
  941. <style lang="scss" scoped>
  942. .top {
  943. // position: relative;
  944. width: 100%;
  945. height: 296rpx;
  946. display: flex;
  947. align-items: center;
  948. padding-bottom: 86rpx;
  949. background-color: #fff;
  950. border-radius: 0 0 70rpx 70rpx;
  951. // overflow: hidden;
  952. .head-login {
  953. width: 100%;
  954. .login {
  955. display: flex;
  956. background-color: #ffffff;
  957. // align-items: center;
  958. .message {
  959. color: #ffffff;
  960. width: 176rpx;
  961. height: 70rpx;
  962. // background: linear-gradient(90deg, #20a635 7%, #108a49);
  963. background-color: #FA6138;
  964. border-radius: 35rpx 0 0 35rpx;
  965. display: flex;
  966. align-items: center;
  967. padding-left: 36rpx;
  968. box-sizing: border-box;
  969. margin-top: 53rpx;
  970. transform: translateY(-50%);
  971. .setup {
  972. margin-right: 30rpx;
  973. font-size: 50rpx;
  974. }
  975. .setup-one {
  976. margin-right: 22rpx;
  977. font-size: 50rpx;
  978. }
  979. .iconfont2 {
  980. font-size: 33rpx;
  981. }
  982. .tip {
  983. font-size: 28rpx;
  984. font-family: PingFang SC, PingFang SC-Regular;
  985. font-weight: 400;
  986. color: #ffffff;
  987. margin-left: 8rpx;
  988. }
  989. }
  990. }
  991. .name {
  992. // color: rgba(255, 255, 255, 1);
  993. color: #1A1A1A;
  994. font-size: 36rpx;
  995. margin-left: 22rpx;
  996. line-height: 100rpx;
  997. flex: 1;
  998. font-family: PingFang SC, PingFang SC-Bold;
  999. font-weight: 700;
  1000. text {
  1001. line-height: 30rpx;
  1002. }
  1003. .right {
  1004. margin-left: 16rpx;
  1005. }
  1006. }
  1007. image {
  1008. width: 115rpx;
  1009. height: 115rpx;
  1010. border-radius: 999rpx;
  1011. margin-left: 30rpx;
  1012. }
  1013. .top-title {
  1014. height: 88rpx;
  1015. line-height: 88rpx;
  1016. }
  1017. .head image {
  1018. width: 106rpx;
  1019. height: 106rpx;
  1020. }
  1021. .login {
  1022. line-height: 106rpx;
  1023. }
  1024. }
  1025. }
  1026. .bgImg {
  1027. position: relative;
  1028. width: 100%;
  1029. }
  1030. .position-ab {
  1031. .other {
  1032. margin: 30rpx;
  1033. background-color: #ffffff;
  1034. padding: 45rpx 28rpx 40rpx 28rpx;
  1035. border-radius: 20rpx;
  1036. &:first-child {
  1037. margin-top: 0;
  1038. }
  1039. .option {
  1040. display: flex;
  1041. // justify-content: space-between;
  1042. &:nth-child(n + 1) {
  1043. margin-top: 54rpx;
  1044. }
  1045. // flex-wrap: wrap;
  1046. .list {
  1047. margin-right: 72rpx;
  1048. text-align: center;
  1049. // width: 25%;
  1050. // flex-shrink: 0;
  1051. // &:nth-child(n + 5){
  1052. //
  1053. // }
  1054. .my-icon {
  1055. width: 48rpx;
  1056. height: 46rpx;
  1057. }
  1058. .name-one {
  1059. font-size: 26rpx;
  1060. color: #1a1a1a;
  1061. font-weight: 400;
  1062. margin-top: 18rpx;
  1063. }
  1064. .othernum {
  1065. // position: absolute;
  1066. margin-left: 65rpx;
  1067. margin-top: -10rpx;
  1068. background-color: #ff0000;
  1069. padding: 0px 11rpx;
  1070. border-radius: 100rpx;
  1071. font-weight: 400;
  1072. color: #ffffff;
  1073. font-size: 23rpx;
  1074. }
  1075. .one {
  1076. font-size: 52rpx;
  1077. background: linear-gradient(180deg, #78df6a, #11d688);
  1078. -webkit-background-clip: text;
  1079. color: transparent;
  1080. }
  1081. .two {
  1082. font-size: 50rpx;
  1083. background: linear-gradient(180deg, #dc9c56, #ff7303);
  1084. -webkit-background-clip: text;
  1085. color: transparent;
  1086. }
  1087. .four {
  1088. font-size: 52rpx;
  1089. background: linear-gradient(180deg, #ff5475, #fd4303);
  1090. -webkit-background-clip: text;
  1091. color: transparent;
  1092. }
  1093. .five {
  1094. font-size: 52rpx;
  1095. background: linear-gradient(180deg, #b175f0, #3db3fd);
  1096. -webkit-background-clip: text;
  1097. color: transparent;
  1098. }
  1099. &:last-child {
  1100. margin-right: 0;
  1101. }
  1102. }
  1103. }
  1104. .other-top {
  1105. display: flex;
  1106. padding-bottom: 18rpx;
  1107. align-items: center;
  1108. margin-bottom: 32rpx;
  1109. border-bottom: 1rpx solid #e6e6e6;
  1110. .left {
  1111. flex: 1;
  1112. font-size: 30rpx;
  1113. font-weight: 700;
  1114. color: #1A1A1A;
  1115. line-height: 30rpx;
  1116. }
  1117. .right {
  1118. color: #999999;
  1119. font-size: 28rpx;
  1120. line-height: 30rpx;
  1121. font-weight: 400;
  1122. display: flex;
  1123. align-items: center;
  1124. .other-icon {
  1125. color: #999999;
  1126. margin-left: 16rpx;
  1127. font-size: 15rpx;
  1128. }
  1129. }
  1130. }
  1131. }
  1132. .tools {
  1133. .option {
  1134. justify-content: flex-start;
  1135. .list {
  1136. margin-right: 72rpx;
  1137. &:last-child {
  1138. margin-right: 0;
  1139. }
  1140. }
  1141. }
  1142. }
  1143. .community {
  1144. margin-bottom: 100rpx;
  1145. .community-item {
  1146. display: flex;
  1147. .num-and-item {
  1148. width: 25%;
  1149. text-align: center;
  1150. .num {
  1151. font-size: 36rpx;
  1152. font-weight: 700;
  1153. line-height: 30rpx;
  1154. color: #FF0000;
  1155. padding: 32rpx 0 16rpx 0;
  1156. }
  1157. .and-item {
  1158. font-size: 26rpx;
  1159. font-weight: 400;
  1160. color: #1A1A1A;
  1161. line-height: 30rpx;
  1162. padding-bottom: 40rpx;
  1163. }
  1164. }
  1165. }
  1166. padding: 18rpx 30rpx;
  1167. margin: 30rpx 30rpx;
  1168. background-color: #ffffff;
  1169. border-radius: 20rpx;
  1170. .community-top {
  1171. display: flex;
  1172. padding-bottom: 18rpx;
  1173. background-color: #ffffff;
  1174. border-bottom: 1rpx solid #e6e6e6;
  1175. .my-community {
  1176. flex: 1;
  1177. font-size: 30rpx;
  1178. font-weight: 700;
  1179. color: #1a1a1a;
  1180. }
  1181. .community-right {
  1182. font-size: 28rpx;
  1183. font-weight: 400;
  1184. display: flex;
  1185. align-items: center;
  1186. color: #999999;
  1187. .community-right-top {
  1188. color: #999999;
  1189. }
  1190. .community-top {
  1191. font-size: 24rpx;
  1192. font-weight: 400;
  1193. }
  1194. .community-icon {
  1195. // margin-top: 4rpx;
  1196. margin-left: 16rpx;
  1197. font-size: 35rpx;
  1198. }
  1199. }
  1200. }
  1201. }
  1202. .wallet image {
  1203. width: 32rpx;
  1204. height: 34rpx;
  1205. }
  1206. }
  1207. .career {
  1208. display: flex;
  1209. justify-content: space-between;
  1210. align-items: center;
  1211. width: 690rpx;
  1212. // height: 200rpx;
  1213. margin: 0 auto 30rpx;
  1214. padding: 30rpx;
  1215. padding-left: 35rpx;
  1216. background: #FA6138;
  1217. border-radius: 20rpx;
  1218. font-size: 24rpx;
  1219. font-family: PingFang SC, PingFang SC-Bold;
  1220. font-weight: 400;
  1221. color: #ffffff;
  1222. .label {
  1223. display: flex;
  1224. align-items: center;
  1225. margin-bottom: 6rpx;
  1226. font-size: 30rpx;
  1227. font-weight: 700;
  1228. color: #f5f5f5;
  1229. margin-left: -8rpx;
  1230. }
  1231. .career-icon {
  1232. font-size: 36rpx;
  1233. }
  1234. .status {
  1235. margin-bottom: 10rpx;
  1236. }
  1237. .look-career {
  1238. width: 195rpx;
  1239. height: 80rpx;
  1240. background: #FA6138;
  1241. border: 2rpx solid #ffffff;
  1242. font-size: 28rpx;
  1243. border-radius: 41rpx;
  1244. text-align: center;
  1245. line-height: 80rpx;
  1246. }
  1247. }
  1248. // czd
  1249. .mine-top {
  1250. display: flex;
  1251. justify-content: space-between;
  1252. align-items: stretch;
  1253. padding: 20rpx 20rpx 70rpx 20rpx;
  1254. background: #fff;
  1255. .mine-left {
  1256. display: flex;
  1257. align-items: center;
  1258. .mine-left-img {
  1259. width: 120rpx;
  1260. height: 120rpx;
  1261. border-radius: 50%;
  1262. border: 4rpx solid #fff;
  1263. }
  1264. .name-info {
  1265. padding: 0 20rpx;
  1266. .name-text {
  1267. display: block;
  1268. font-size: 32rpx;
  1269. color: #fff;
  1270. font-weight: 700;
  1271. color: #1A1A1A;
  1272. }
  1273. .name-tag {
  1274. display: block;
  1275. font-size: 28rpx;
  1276. margin-top: 6rpx;
  1277. color: #fff;
  1278. color: #808080;
  1279. }
  1280. }
  1281. }
  1282. .mine-right {
  1283. display: flex;
  1284. align-items: center;
  1285. font-size: 32rpx;
  1286. color: #fff;
  1287. margin-right: 40rpx;
  1288. }
  1289. }
  1290. .maxBox {
  1291. width: 100%;
  1292. background: #fff url("@/static/czd/person_bg.png");
  1293. background-size: 100%;
  1294. .pointsBox{
  1295. width: 690rpx;
  1296. height: 100rpx;
  1297. // background: linear-gradient(127deg,#3cb7d2 6%, #46c8d5 93%);
  1298. background: #FA6138;
  1299. border-radius: 20rpx;
  1300. margin: auto;
  1301. position: relative;
  1302. top: -30rpx;
  1303. display: flex;
  1304. justify-content: space-between;
  1305. align-items: center;
  1306. font-size: 28rpx;
  1307. color: #FFFFFF;
  1308. padding: 0 30rpx;
  1309. .pointsBox_l{
  1310. font-weight: 700;
  1311. image{
  1312. width: 37rpx;
  1313. height: 37rpx;
  1314. vertical-align: middle;
  1315. margin-right: 10rpx;
  1316. }
  1317. }
  1318. .pointsBox_r{
  1319. }
  1320. }
  1321. .shopOrderList {
  1322. margin: 0 30rpx 30rpx;
  1323. background: #fff;
  1324. padding: 30rpx 30rpx 0 30rpx;
  1325. border-radius: 20rpx;
  1326. box-shadow: 0 2rpx 12rpx 0 rgba(0, 0, 0, 0.1);
  1327. .shopOrderList_title {
  1328. display: flex;
  1329. justify-content: space-between;
  1330. border-bottom: 2rpx solid #DEDEDE;
  1331. padding-bottom: 30rpx;
  1332. .shopOrderList_title_l {
  1333. font-size: 30rpx;
  1334. color: #1A1A1A;
  1335. font-weight: 700;
  1336. }
  1337. .shopOrderList_title_r {
  1338. font-size: 24rpx;
  1339. color: #999999;
  1340. .iconfont_yige {
  1341. font-weight: 700;
  1342. }
  1343. }
  1344. }
  1345. .shopOrderList_b {
  1346. display: flex;
  1347. justify-content: space-between;
  1348. padding: 30rpx 10rpx;
  1349. .shopOrderList_item {
  1350. position: relative;
  1351. text-align: center;
  1352. .anglenum {
  1353. position: absolute;
  1354. // margin-left: 75rpx;
  1355. // margin-top: -20rpx;
  1356. background-color: #ff0000;
  1357. padding: 0px 11rpx;
  1358. border-radius: 100rpx;
  1359. font-weight: 400;
  1360. font-size: 23rpx;
  1361. color: #ffffff;
  1362. right: -12rpx;
  1363. top: -20rpx;
  1364. }
  1365. .shopOrderList_item_img {
  1366. image {
  1367. width: 44rpx;
  1368. height: 44rpx;
  1369. }
  1370. }
  1371. .shopOrderList_item_lab {
  1372. font-size: 26rpx;
  1373. color: #1A1A1A;
  1374. }
  1375. }
  1376. }
  1377. }
  1378. }
  1379. .list {
  1380. margin: 0 30rpx;
  1381. padding: 30rpx;
  1382. background: #fff;
  1383. border-radius: 20rpx;
  1384. margin-bottom: 30rpx;
  1385. .list_title{
  1386. font-size: 15px;
  1387. color: #1A1A1A;
  1388. font-weight: 700;
  1389. border-bottom: 1px solid #DEDEDE;
  1390. padding-bottom: 15px;
  1391. }
  1392. .list_item {
  1393. display: flex;
  1394. justify-content: space-between;
  1395. align-items: center;
  1396. padding: 30rpx 0;
  1397. border-bottom: 2rpx solid #DEDEDE;
  1398. &:last-child {
  1399. border-bottom: none;
  1400. }
  1401. .list_item_l {
  1402. font-size: 28rpx;
  1403. color: #1A1A1A;
  1404. display: flex;
  1405. align-items: center;
  1406. image {
  1407. width: 37rpx;
  1408. height: 37rpx;
  1409. margin-right: 16rpx;
  1410. }
  1411. }
  1412. .list_item_r {
  1413. image {
  1414. width: 14rpx;
  1415. height: 22rpx;
  1416. }
  1417. }
  1418. }
  1419. }
  1420. </style>