my.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885
  1. <template>
  2. <!-- <view class="container" v-if="!loading" style="position: relative;z-index: 0;"> -->
  3. <view class="container" style="position: relative;z-index: 0;">
  4. <navBar title="GIGESI 吉格斯" :back="false" color="black"
  5. background="linear-gradient(to bottom,#FDEDD2,#FEF9ED)" />
  6. <view class="content">
  7. <!-- <view class="top" :style="{'background-image':`url(${picUrl}/static/other/myW.png)`}"> -->
  8. <view class="top">
  9. <!-- <image class="myW" :src="picUrl+'/static/other/myW.png'" mode=""></image> -->
  10. <view class="userInfo">
  11. <view class="left">
  12. <view class="avatarBox" @click="toPage('info')">
  13. <image class="avatar"
  14. :src="userInfo&&userInfo.head?userInfo.head:picUrl+'/static/other/defaultAvatar.png'">
  15. </image>
  16. </view>
  17. <text class="btn" v-if="!token" @click="login">请点击登录</text>
  18. <text class="btn" v-if="token&&role=='cydg'"
  19. @click="toPage('info')">{{userInfo.nickname?userInfo.nickname+'(产业电工)':'默认用户(产业电工)'}}</text>
  20. <text class="btn" v-if="token&&role=='hy'"
  21. @click="toPage('info')">{{userInfo.nickname?userInfo.nickname+'(会员)':'默认用户(会员)'}}</text>
  22. <view class="lMember" v-if="token&&role=='lhy'" style="" @click="toPage('info')">
  23. <text class="btn1">{{userInfo.nickname?userInfo.nickname+'(L会员)':'默认用户(L会员)'}}</text>
  24. <view class="botDes" style="width: 450rpx;">
  25. 查看商品会员价,{{hours}}小时后自动恢复为售价。会员价格还剩
  26. <view class="" style="display: inline-block;margin-left: 10rpx;">
  27. <u-count-down @change="cutDownChange" style="display: inline-block;"
  28. :time="remainTime" format="HH:mm:ss"></u-count-down>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="lMember" v-if="token&&role=='hdyh'" @click="toPage('info')">
  33. <text class="btn1">{{userInfo.nickname?userInfo.nickname+'(活动会员)':'默认用户(活动会员)'}}</text>
  34. <view class="botDes" v-if="userInfo.phone">
  35. {{userInfo.phone}}
  36. </view>
  37. </view>
  38. <view class="lMember" v-if="token&&role=='svip'" @click="toPage('info')">
  39. <text class="btn1">{{userInfo.nickname?userInfo.nickname+'(S-VIP)':'默认用户(S-VIP)'}}</text>
  40. <view class="botDes" v-if="userInfo.phone">
  41. {{userInfo.phone}}
  42. </view>
  43. </view>
  44. <view class="lMember" v-if="token&&role=='gvip'" @click="toPage('info')">
  45. <text class="btn1">{{userInfo.nickname?userInfo.nickname+'(G-VIP)':'默认用户(G-VIP)'}}</text>
  46. <view class="botDes" v-if="userInfo.phone">
  47. {{userInfo.phone}}
  48. </view>
  49. </view>
  50. <view class="lMember" v-if="token&&role=='yk'" @click="toPage('info')">
  51. <text class="btn1">{{userInfo.nickname?userInfo.nickname+'(游客)':'默认用户(游客)'}}</text>
  52. <view class="botDes" v-if="userInfo.phone">
  53. {{userInfo.phone}}
  54. </view>
  55. </view>
  56. <text class="btn" v-if="token&&role=='sjkf'"
  57. @click="toPage('info')">{{userInfo.nickname?userInfo.nickname+'(设计客服)':'默认用户(设计客服)'}}</text>
  58. <text class="btn" v-if="token&&role=='shkf'"
  59. @click="toPage('info')">{{userInfo.nickname?userInfo.nickname+'(售后客服)':'默认用户(售后客服)'}}</text>
  60. <text class="btn" v-if="token&&role=='yw'"
  61. @click="toPage('info')">{{userInfo.nickname?userInfo.nickname+'(业务客服)':'默认用户(业务客服)'}}</text>
  62. <text class="btn" v-if="token&&role=='superAdmin'"
  63. @click="toPage('info')">{{userInfo.nickname?userInfo.nickname+'(超级管理员)':'默认用户(超级管理员)'}}</text>
  64. <text class="btn" v-if="token&&role=='nomal'"
  65. @click="toPage('info')">{{userInfo.nickname?userInfo.nickname+'(普通员工)':'默认用户(普通员工)'}}</text>
  66. </view>
  67. <image :src="picUrl+'/static/my/set2.png'" mode="" @click="toPage('info')"
  68. style="width: 37rpx;height: 41rpx;margin-right: 22rpx;">
  69. </image>
  70. </view>
  71. <view class="invite" @click="token?show=true:$toast('请先登录')"
  72. v-if="role=='sjkf'||role=='shkf'||role=='yw'||role=='superAdmin'">
  73. <view class="left">
  74. <image :src="picUrl+'/static/my/vip.png'" mode="" style="width: 27rpx;height: 30rpx;">
  75. </image>
  76. <text>邀约用户</text>
  77. </view>
  78. <view class="right">
  79. <text class="price">尊享专属价</text>
  80. <image :src="picUrl+'/static/my/yellowR.png'" mode=""
  81. style="width: 12rpx;height: 20rpx;margin-left: 8rpx;"></image>
  82. </view>
  83. <image :src="picUrl+'/static/my/diwen.png'" mode=""
  84. style="width: 136rpx;height: 80rpx;position: absolute;z-index: 0;right: 0;right: 32rpx;border-radius: 0rpx 24rpx 8rpx 0rpx;">
  85. </image>
  86. </view>
  87. </view>
  88. <view class="serList">
  89. <view class="item" @click="toPage(item)" v-for="(item,index) in serList">
  90. <view class="left">
  91. <!-- <image :src="item.icon" mode="heightFix" style="height: 31rpx;width: 36rpx;" ></image> -->
  92. <image :src="item.icon" :mode="item.name!='关于我们'?'heightFix':'widthFix'" style="width: 36rpx;"
  93. :style="{height:item.name=='关于我们'?'36rpx':'31rpx'}"></image>
  94. <text>{{item.name}}</text>
  95. </view>
  96. <view class="right">
  97. <text class="num" v-if="item.phone">{{item.phone}}</text>
  98. <image src="/static/my/arr_r.png" mode="" style="height: 24rpx;width: 14rpx;"></image>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. <u-action-sheet :actions="list" :title="title" :show="show" cancelText="取消" @close="show=false"
  104. @select="handleSel"></u-action-sheet>
  105. </view>
  106. <!-- <u-loading-page v-else :loading="loading" image="/static/index/logo.png" loading-text="页面加载中..."></u-loading-page> -->
  107. </template>
  108. <script>
  109. import uploadUrl from '@/common/config.js'
  110. import {
  111. wxAuthLoginReq,
  112. getUserInfoReq,
  113. updateUserInfoReq,
  114. addInviteReq
  115. } from '@/api/test/index.js'
  116. import moment from 'moment'
  117. export default {
  118. // components: {
  119. // navBar
  120. // },
  121. data() {
  122. return {
  123. picUrl: this.$picUrl,
  124. token: uni.getStorageSync('token'),
  125. role: null,
  126. // status==1
  127. // role: 'cydg',3
  128. // role: 'hy', 5
  129. // role: 'lhy',2
  130. // role: 'svip',type==1
  131. // role: 'hdyh',type==4
  132. // role: 'youke',type==0
  133. // status==0
  134. // role: 'yw',
  135. // role: 'sjkf',
  136. // role: 'shkf',
  137. // role: 'superAdmin',
  138. serList: [{
  139. icon: this.$picUrl + '/static/my/sc.png',
  140. name: '收藏',
  141. url: '/pages/my/collect/index'
  142. },
  143. {
  144. icon: this.$picUrl + '/static/my/qt.png',
  145. name: '小程序使用指南',
  146. url: '/pages/my/useLead/index'
  147. },
  148. // {
  149. // icon: this.$picUrl + '/static/other/aboutMe.png',
  150. // name: '关于我们',
  151. // url: '/pages/my/aboutMe/index',
  152. // },
  153. {
  154. icon: this.$picUrl + '/static/my/qt.png',
  155. name: '其他信息',
  156. url: '/pages/my/otherInfo/index'
  157. },
  158. ],
  159. showPrivacy: true,
  160. avatarUrl: '',
  161. nickName: '',
  162. PhoneCode: '',
  163. imgUrl: '',
  164. isPhone: false,
  165. user_img: '', //微信头像
  166. user_name: '',
  167. show: false,
  168. list: [],
  169. userInfo: null,
  170. hours: 0,
  171. remainTime: 0,
  172. watchTimeObj: {
  173. days: 0,
  174. hours: 0,
  175. minutes: 0,
  176. seconds: 0,
  177. milliseconds: 0
  178. },
  179. loading: true
  180. }
  181. },
  182. async onShow() {
  183. if (uni.getStorageSync('token')) {
  184. let res = await getUserInfoReq()
  185. if (res.code == 0) {
  186. this.userInfo = res.data
  187. // this.userInfo = {
  188. // head: null,
  189. // name: null,
  190. // nickname: null,
  191. // birthday: null,
  192. // phone: null,
  193. // sex: null,
  194. // }
  195. console.log('用户信息', this.userInfo, new Date(this.userInfo.ls_expire_time), moment(this.userInfo
  196. .ls_expire_time).format("YYYY-MM-DD HH:mm:ss"), );
  197. let ms = this.userInfo.ls_expire_time - Date.now();
  198. if (ms > 0) {
  199. this.hours = (ms / 1000 / 60 / 60).toFixed(1)
  200. this.remainTime = ms
  201. }
  202. this.role = 'superAdmin'
  203. this.checkRole()
  204. return
  205. if (res.data.status) {
  206. switch (res.data.type) {
  207. case 0:
  208. this.role = 'yk'
  209. break
  210. case 1:
  211. this.role = 'svip'
  212. break
  213. case 2:
  214. this.role = 'lhy'
  215. uni.setStorageSync('switchs', [0, 1, 0])
  216. break
  217. case 3:
  218. this.role = 'cydg'
  219. break
  220. case 4:
  221. this.role = 'hdyh'
  222. break
  223. case 5:
  224. this.role = 'hy'
  225. uni.setStorageSync('switchs', [0, 1, 0])
  226. break
  227. case 6:
  228. this.role = 'gvip'
  229. break
  230. }
  231. console.log('当前用户角色', this.role);
  232. } else {
  233. switch (res.data.type) {
  234. case 0:
  235. this.role = 'nomal'
  236. break
  237. case 1:
  238. this.role = 'superAdmin'
  239. break
  240. case 2:
  241. this.role = 'sjkf'
  242. break
  243. case 3:
  244. this.role = 'shkf'
  245. break
  246. case 4:
  247. this.role = 'yw'
  248. break
  249. }
  250. }
  251. console.log('当前员工角色', this.role);
  252. this.checkRole()
  253. this.loading = false
  254. } else {
  255. uni.showToast({
  256. title: res.message,
  257. icon: 'none'
  258. })
  259. }
  260. }
  261. },
  262. async onLoad() {
  263. wx.onNeedPrivacyAuthorization((resolve, eventInfo) => {
  264. console.log('触发本次事件的接口是:' + eventInfo.referrer)
  265. // 需要用户同意隐私授权时
  266. // 弹出开发者自定义的隐私授权弹窗
  267. this.showPrivacy = true
  268. this.resolvePrivacyAuthorization = resolve
  269. })
  270. // wx.getUserProfile({
  271. // success: console.log,
  272. // fail: console.error
  273. // })
  274. },
  275. computed: {},
  276. watch: {
  277. watchTimeObj: {
  278. handler(n, o) {
  279. console.log('handler(n, o)', n, this.role);
  280. if (n.days == 0 && n.hours == 0 && n.minutes == 0 && n.seconds == 1) {
  281. setTimeout(() => {
  282. uni.reLaunch({
  283. url: '/pages/my'
  284. })
  285. console.log('L会员到期-----------------------------------------', n, this.role);
  286. }, 1000)
  287. }
  288. },
  289. deep: true
  290. }
  291. },
  292. methods: {
  293. cutDownChange(e) {
  294. this.watchTimeObj = {
  295. ...e
  296. }
  297. console.log('e-------------', this.watchTimeObj);
  298. },
  299. call(phone) {
  300. uni.makePhoneCall({
  301. phoneNumber: phone,
  302. })
  303. },
  304. toPage(page) {
  305. console.log('page----------------', page);
  306. if (page == 'info' && !this.token) {
  307. return this.$toast('请先登录')
  308. }
  309. if (page.url == '/pages/my/collect/index' && !this.token) {
  310. return this.$toast('请先登录')
  311. }
  312. if (page == 'set') {
  313. uni.navigateTo({
  314. url: '/pages/my/set/index?role=' + this.role
  315. })
  316. } else if (page == 'info') {
  317. uni.navigateTo({
  318. url: '/pages/my/userInfo/index'
  319. })
  320. } else if (page.phone) {
  321. this.call(page.phone)
  322. } else {
  323. uni.navigateTo({
  324. url: page.url
  325. })
  326. }
  327. },
  328. login() {
  329. let _this = this
  330. uni.showLoading({
  331. title: '登录中...'
  332. })
  333. uni.login({
  334. provider: 'weixin',
  335. success: async (res) => {
  336. if (res.errMsg == 'login:ok') {
  337. let parmas = {
  338. code: res.code,
  339. }
  340. if (uni.getStorageSync('inviteId')) {
  341. parmas['inviteId'] = uni.getStorageSync('inviteId')
  342. }
  343. if (uni.getStorageSync('afterSaleId')) {
  344. parmas['afterSaleId'] = uni.getStorageSync('afterSaleId')
  345. }
  346. console.log('登录所传的parmas参数:', parmas);
  347. let res1 = await wxAuthLoginReq(parmas)
  348. if (res1.code == 0) {
  349. uni.hideLoading()
  350. uni.setStorageSync('token', res1.data.token)
  351. _this.$toast('登录成功')
  352. uni.removeStorageSync('inviteId')
  353. uni.removeStorageSync('afterSaleId')
  354. setTimeout(() => {
  355. uni.reLaunch({
  356. url: '/pages/my'
  357. })
  358. }, 1500)
  359. } else {
  360. uni.showToast({
  361. title: res1.message,
  362. icon: 'none'
  363. })
  364. }
  365. }
  366. }
  367. });
  368. },
  369. handleSel(e) {
  370. console.log('sheet选择参数:', e);
  371. let type = -1
  372. if (e.name == '邀约VIP') {
  373. type = 'vip'
  374. } else if (e.name == '邀约L会员') {
  375. type = 'ls'
  376. } else if (e.name == '邀约会员') {
  377. type = 'hy'
  378. } else if (e.name == '邀约活动用户') {
  379. type = 'yh'
  380. } else if (e.name == '邀约电工') {
  381. type = 'dg'
  382. }
  383. uni.navigateTo({
  384. url: '/pages/my/inviteDetail/index?type=' + type
  385. })
  386. },
  387. checkRole() {
  388. if (this.role == 'yk') {
  389. this.serList = [{
  390. icon: this.picUrl + '/static/my/sc.png',
  391. name: '收藏',
  392. url: '/pages/my/collect/index'
  393. },
  394. {
  395. icon: this.picUrl + '/static/my/qt.png',
  396. name: '小程序使用指南',
  397. url: '/pages/my/useLead/index'
  398. },
  399. // {
  400. // icon: this.picUrl + '/static/other/aboutMe.png',
  401. // name: '关于我们',
  402. // url: '/pages/my/aboutMe/index'
  403. // },
  404. {
  405. icon: this.$picUrl + '/static/my/qt.png',
  406. name: '其他信息',
  407. url: '/pages/my/otherInfo/index'
  408. },
  409. ]
  410. if (this.userInfo.role == 1) {
  411. this.serList.push({
  412. icon: this.picUrl + '/static/my/tg.png',
  413. name: '活动商品',
  414. url: '/pages/my/actGoods/index'
  415. })
  416. } else if (this.userInfo.role == 2) {
  417. this.serList.push({
  418. icon: this.picUrl + '/static/my/sh.png',
  419. name: '售后',
  420. url: '/pages/my/sellAfter/index'
  421. })
  422. }
  423. } else if (this.role == 'svip') {
  424. this.serList = [{
  425. icon: this.picUrl + '/static/my/set.png',
  426. name: '设置',
  427. url: '/pages/my/set/index?role=' + this.role
  428. }, {
  429. icon: this.picUrl + '/static/my/sc.png',
  430. name: '收藏',
  431. url: '/pages/my/collect/index'
  432. }, {
  433. icon: this.picUrl + '/static/my/yjlx.png',
  434. name: '一键联系',
  435. phone: this.userInfo.invitePhone
  436. }, {
  437. icon: this.picUrl + '/static/my/qt.png',
  438. name: '小程序使用指南',
  439. url: '/pages/my/useLead/index'
  440. },
  441. // {
  442. // icon: this.picUrl + '/static/other/aboutMe.png',
  443. // name: '关于我们',
  444. // url: '/pages/my/aboutMe/index'
  445. // },
  446. {
  447. icon: this.$picUrl + '/static/my/qt.png',
  448. name: '其他信息',
  449. url: '/pages/my/otherInfo/index'
  450. },
  451. ]
  452. if (this.userInfo.role == 1) {
  453. this.serList.push({
  454. icon: this.picUrl + '/static/my/tg.png',
  455. name: '活动商品',
  456. url: '/pages/my/actGoods/index'
  457. })
  458. } else if (this.userInfo.role == 2) {
  459. this.serList.push({
  460. icon: this.picUrl + '/static/my/sh.png',
  461. name: '售后',
  462. url: '/pages/my/sellAfter/index'
  463. })
  464. }
  465. } else if (this.role == 'gvip') {
  466. this.serList = [{
  467. icon: this.picUrl + '/static/my/set.png',
  468. name: '设置',
  469. url: '/pages/my/set/index?role=' + this.role
  470. }, {
  471. icon: this.picUrl + '/static/my/sc.png',
  472. name: '收藏',
  473. url: '/pages/my/collect/index'
  474. }, {
  475. icon: this.picUrl + '/static/my/yjlx.png',
  476. name: '一键联系',
  477. phone: this.userInfo.invitePhone
  478. }, {
  479. icon: this.picUrl + '/static/my/qt.png',
  480. name: '小程序使用指南',
  481. url: '/pages/my/useLead/index'
  482. },
  483. // {
  484. // icon: this.picUrl + '/static/other/aboutMe.png',
  485. // name: '关于我们',
  486. // url: '/pages/my/aboutMe/index'
  487. // },
  488. {
  489. icon: this.$picUrl + '/static/my/qt.png',
  490. name: '其他信息',
  491. url: '/pages/my/otherInfo/index'
  492. },
  493. ]
  494. if (this.userInfo.role == 1) {
  495. this.serList.push({
  496. icon: this.picUrl + '/static/my/tg.png',
  497. name: '活动商品',
  498. url: '/pages/my/actGoods/index'
  499. })
  500. } else if (this.userInfo.role == 2) {
  501. this.serList.push({
  502. icon: this.picUrl + '/static/my/sh.png',
  503. name: '售后',
  504. url: '/pages/my/sellAfter/index'
  505. })
  506. }
  507. } else if (this.role == 'lhy') {
  508. this.serList = [{
  509. icon: this.picUrl + '/static/my/sc.png',
  510. name: '收藏',
  511. url: '/pages/my/collect/index'
  512. },
  513. {
  514. icon: this.picUrl + '/static/my/yjlx.png',
  515. name: '一键联系',
  516. phone: this.userInfo.invitePhone
  517. },
  518. {
  519. icon: this.picUrl + '/static/my/qt.png',
  520. name: '小程序使用指南',
  521. url: '/pages/my/useLead/index'
  522. },
  523. // {
  524. // icon: this.picUrl + '/static/other/aboutMe.png',
  525. // name: '关于我们',
  526. // url: '/pages/my/aboutMe/index'
  527. // },
  528. {
  529. icon: this.$picUrl + '/static/my/qt.png',
  530. name: '其他信息',
  531. url: '/pages/my/otherInfo/index'
  532. },
  533. ]
  534. if (this.userInfo.role == 1) {
  535. this.serList.push({
  536. icon: this.picUrl + '/static/my/tg.png',
  537. name: '活动商品',
  538. url: '/pages/my/actGoods/index'
  539. })
  540. } else if (this.userInfo.role == 2) {
  541. this.serList.push({
  542. icon: this.picUrl + '/static/my/sh.png',
  543. name: '售后',
  544. url: '/pages/my/sellAfter/index'
  545. })
  546. }
  547. } else if (this.role == 'hy') {
  548. this.serList = [{
  549. icon: this.picUrl + '/static/my/sc.png',
  550. name: '收藏',
  551. url: '/pages/my/collect/index'
  552. },
  553. {
  554. icon: this.picUrl + '/static/my/yjlx.png',
  555. name: '一键联系',
  556. phone: this.userInfo.invitePhone
  557. },
  558. {
  559. icon: this.picUrl + '/static/my/qt.png',
  560. name: '小程序使用指南',
  561. url: '/pages/my/useLead/index'
  562. },
  563. // {
  564. // icon: this.picUrl + '/static/other/aboutMe.png',
  565. // name: '关于我们',
  566. // url: '/pages/my/aboutMe/index'
  567. // },
  568. {
  569. icon: this.$picUrl + '/static/my/qt.png',
  570. name: '其他信息',
  571. url: '/pages/my/otherInfo/index'
  572. },
  573. ]
  574. if (this.userInfo.role == 1) {
  575. this.serList.push({
  576. icon: this.picUrl + '/static/my/tg.png',
  577. name: '活动商品',
  578. url: '/pages/my/actGoods/index'
  579. })
  580. } else if (this.userInfo.role == 2) {
  581. this.serList.push({
  582. icon: this.picUrl + '/static/my/sh.png',
  583. name: '售后',
  584. url: '/pages/my/sellAfter/index'
  585. })
  586. }
  587. } else if (this.role == 'cydg') {
  588. this.serList = [{
  589. icon: this.picUrl + '/static/my/set.png',
  590. name: '设置',
  591. url: '/pages/my/set/index?role=' + this.role
  592. },
  593. {
  594. icon: this.picUrl + '/static/my/sc.png',
  595. name: '收藏',
  596. url: '/pages/my/collect/index'
  597. },
  598. {
  599. icon: this.picUrl + '/static/my/yjlx.png',
  600. name: '一键联系',
  601. phone: this.userInfo.invitePhone
  602. },
  603. {
  604. icon: this.picUrl + '/static/my/qt.png',
  605. name: '小程序使用指南',
  606. url: '/pages/my/useLead/index'
  607. },
  608. {
  609. icon: this.picUrl + '/static/my/jiang.png',
  610. name: '兑奖记录',
  611. url: '/pages/my/duijiang/index?from=1'
  612. },
  613. // {
  614. // icon: this.picUrl + '/static/my/qt.png',
  615. // name: '兑奖记录',
  616. // url: '/pages/my/recordCydg/index'
  617. // },
  618. // {
  619. // icon: this.picUrl + '/static/other/aboutMe.png',
  620. // name: '关于我们',
  621. // url: '/pages/my/aboutMe/index'
  622. // },
  623. {
  624. icon: this.$picUrl + '/static/my/qt.png',
  625. name: '其他信息',
  626. url: '/pages/my/otherInfo/index'
  627. },
  628. ]
  629. if (this.userInfo.role == 1) {
  630. this.serList.push({
  631. icon: this.picUrl + '/static/my/tg.png',
  632. name: '活动商品',
  633. url: '/pages/my/actGoods/index'
  634. })
  635. } else if (this.userInfo.role == 2) {
  636. this.serList.push({
  637. icon: this.picUrl + '/static/my/sh.png',
  638. name: '售后',
  639. url: '/pages/my/sellAfter/index'
  640. })
  641. }
  642. // 活动用户附加于其他用户角色之上,不是一种角色,而是一种查看功能
  643. } else if (this.role == 'hdyh') {
  644. if (this.userInfo.role == 1) {
  645. this.serList.push({
  646. icon: this.picUrl + '/static/my/tg.png',
  647. name: '活动商品',
  648. url: '/pages/my/actGoods/index'
  649. })
  650. } else if (this.userInfo.role == 2) {
  651. this.serList.push({
  652. icon: this.picUrl + '/static/my/sh.png',
  653. name: '售后',
  654. url: '/pages/my/sellAfter/index'
  655. })
  656. }
  657. return
  658. this.serList = [
  659. // {
  660. // icon: this.picUrl + '/static/my/set.png',
  661. // name: '设置',
  662. // url: '/pages/my/set/index?role=' + this.role
  663. // }, {
  664. // icon: this.picUrl + '/static/my/sc.png',
  665. // name: '收藏',
  666. // url: '/pages/my/collect/index'
  667. // }, {
  668. // icon: this.picUrl + '/static/my/yjlx.png',
  669. // name: '一键联系',
  670. // phone: '12983098478'
  671. // }, {
  672. // icon: this.picUrl + '/static/my/jiang.png',
  673. // name: '兑奖信息',
  674. // url: '/pages/my/duijiang/index'
  675. // }, {
  676. // icon: this.picUrl + '/static/my/qt.png',
  677. // name: '小程序使用指南',
  678. // url: '/pages/my/useLead/index'
  679. // },
  680. ]
  681. } else if (this.role == 'superAdmin') {
  682. this.serList = [{
  683. icon: this.picUrl + '/static/my/set.png',
  684. name: '设置',
  685. url: '/pages/my/set/index?role=' + this.role
  686. },
  687. {
  688. icon: this.picUrl + '/static/my/sh.png',
  689. name: '售后',
  690. url: '/pages/my/sellAfter/index'
  691. },
  692. {
  693. icon: this.picUrl + '/static/my/jiang.png',
  694. name: '兑奖信息',
  695. url: '/pages/my/duijiang/index'
  696. },
  697. {
  698. icon: this.picUrl + '/static/my/tg.png',
  699. name: '活动商品',
  700. url: '/pages/my/actGoods/index'
  701. },
  702. {
  703. icon: this.picUrl + '/static/my/sc.png',
  704. name: '收藏',
  705. url: '/pages/my/collect/index'
  706. },
  707. {
  708. icon: this.picUrl + '/static/my/qt.png',
  709. name: '添加售后',
  710. url: '/pages/my/inviteSellAfter/index'
  711. },
  712. {
  713. icon: this.picUrl + '/static/my/qt.png',
  714. name: '其他信息',
  715. url: '/pages/my/otherInfo/index'
  716. },
  717. ]
  718. this.list = [{
  719. name: '邀约VIP'
  720. },
  721. {
  722. name: '邀约L会员'
  723. },
  724. {
  725. name: '邀约会员'
  726. },
  727. {
  728. name: '邀约电工'
  729. },
  730. {
  731. name: '邀约活动用户'
  732. }
  733. ]
  734. } else if (this.role == 'sjkf' || this.role == 'yw') {
  735. if (this.role == 'sjkf') {
  736. this.serList = [{
  737. icon: this.picUrl + '/static/my/sh.png',
  738. name: '售后',
  739. url: '/pages/my/sellAfter/index'
  740. },
  741. {
  742. icon: this.picUrl + '/static/my/tg.png',
  743. name: '活动商品',
  744. url: '/pages/my/actGoods/index'
  745. },
  746. {
  747. icon: this.picUrl + '/static/my/sc.png',
  748. name: '收藏',
  749. url: '/pages/my/collect/index'
  750. },
  751. {
  752. icon: this.picUrl + '/static/my/qt.png',
  753. name: '其他信息',
  754. url: '/pages/my/otherInfo/index'
  755. },
  756. ]
  757. } else {
  758. this.serList = [{
  759. icon: this.picUrl + '/static/my/sh.png',
  760. name: '售后',
  761. url: '/pages/my/sellAfter/index'
  762. }, {
  763. icon: this.picUrl + '/static/my/tg.png',
  764. name: '活动商品',
  765. url: '/pages/my/actGoods/index'
  766. }, {
  767. icon: this.picUrl + '/static/my/sc.png',
  768. name: '收藏',
  769. url: '/pages/my/collect/index'
  770. },
  771. {
  772. icon: this.picUrl + '/static/my/qt.png',
  773. name: '其他信息',
  774. url: '/pages/my/otherInfo/index'
  775. },
  776. ]
  777. }
  778. this.list = [{
  779. name: '邀约VIP'
  780. },
  781. {
  782. name: '邀约L会员'
  783. },
  784. {
  785. name: '邀约活动用户'
  786. }
  787. ]
  788. } else if (this.role == 'shkf') {
  789. this.serList = [{
  790. icon: this.picUrl + '/static/my/sh.png',
  791. name: '售后',
  792. url: '/pages/my/sellAfter/index'
  793. }, {
  794. icon: this.picUrl + '/static/my/tg.png',
  795. name: '活动商品',
  796. url: '/pages/my/actGoods/index'
  797. }, {
  798. icon: this.picUrl + '/static/my/sc.png',
  799. name: '收藏',
  800. url: '/pages/my/collect/index'
  801. },
  802. {
  803. icon: this.picUrl + '/static/my/qt.png',
  804. name: '其他信息',
  805. url: '/pages/my/otherInfo/index'
  806. },
  807. ]
  808. this.list = [{
  809. name: '邀约VIP'
  810. },
  811. {
  812. name: '邀约L会员'
  813. },
  814. {
  815. name: '邀约会员'
  816. },
  817. {
  818. name: '邀约活动用户'
  819. }
  820. ]
  821. } else if (this.role == 'nomal') {
  822. return
  823. this.serList = []
  824. }
  825. }
  826. }
  827. }
  828. </script>
  829. <style lang="scss" scoped>
  830. @import "./my.scss";
  831. ::v-deep .u-loading-page {
  832. position: relative !important;
  833. z-index: 999999999 !important;
  834. // background: red;
  835. }
  836. ::v-deep .u-loading-page__warpper__loading-icon__img {
  837. width: 150rpx !important;
  838. height: 150rpx !important;
  839. }
  840. </style>