my.vue 22 KB

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