my.vue 24 KB

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