|
@@ -5,34 +5,32 @@
|
|
<view class="top">
|
|
<view class="top">
|
|
<view class="userInfo">
|
|
<view class="userInfo">
|
|
<view class="left">
|
|
<view class="left">
|
|
- <navigator url="/pages/my/userInfo/index">
|
|
|
|
- <button class="avatarBox">
|
|
|
|
- <image class="avatar"
|
|
|
|
- :src="userInfo?userInfo.head:picUrl+'/static/other/defaultAvatar.png'"></image>
|
|
|
|
- </button>
|
|
|
|
- </navigator>
|
|
|
|
|
|
+ <button class="avatarBox" @click="toPage('info')">
|
|
|
|
+ <image class="avatar"
|
|
|
|
+ :src="userInfo?userInfo.head:picUrl+'/static/other/defaultAvatar.png'"></image>
|
|
|
|
+ </button>
|
|
<text class="btn" v-if="!token" @click="login">请点击登录</text>
|
|
<text class="btn" v-if="!token" @click="login">请点击登录</text>
|
|
- <text class="btn" v-if="token&&role=='cydg'">XXX电工</text>
|
|
|
|
- <text class="btn" v-if="token&&role=='hy'">XXX会员</text>
|
|
|
|
|
|
+ <text class="btn" v-if="token&&role=='cydg'">{{userInfo.nickname}}</text>
|
|
|
|
+ <text class="btn" v-if="token&&role=='hy'">{{userInfo.nickname}}</text>
|
|
|
|
|
|
<view class="lMember" v-if="token&&role=='lhy'">
|
|
<view class="lMember" v-if="token&&role=='lhy'">
|
|
- <text class="btn1">XXXL会员</text>
|
|
|
|
|
|
+ <text class="btn1">{{userInfo.nickname}}</text>
|
|
<view class="botDes">
|
|
<view class="botDes">
|
|
查看商品会员价,72小时后自动恢复
|
|
查看商品会员价,72小时后自动恢复
|
|
为售价。会员价格还剩 00:05:59
|
|
为售价。会员价格还剩 00:05:59
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="lMember" v-if="token&&role=='dg'">
|
|
|
|
- <text class="btn1">陈冰冰CBb</text>
|
|
|
|
|
|
+ <view class="lMember" v-if="token&&role=='hdhy'">
|
|
|
|
+ <text class="btn1">{{userInfo.nickname}}</text>
|
|
<view class="botDes">
|
|
<view class="botDes">
|
|
- 17820937628
|
|
|
|
|
|
+ {{userInfo.phone}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="lMember" v-if="token&&role=='svip'">
|
|
<view class="lMember" v-if="token&&role=='svip'">
|
|
- <text class="btn1">XXXS-VIP</text>
|
|
|
|
|
|
+ <text class="btn1">{{userInfo.nickname}}</text>
|
|
<view class="botDes">
|
|
<view class="botDes">
|
|
- 17820937628
|
|
|
|
|
|
+ {{userInfo.phone}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="lMember" v-if="token&&role=='yk'">
|
|
<view class="lMember" v-if="token&&role=='yk'">
|
|
@@ -42,23 +40,21 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <text class="btn" v-if="token&&role=='sjkf'">XXX设计客服</text>
|
|
|
|
- <text class="btn" v-if="token&&role=='shkf'">XXX售后客服</text>
|
|
|
|
- <text class="btn" v-if="token&&role=='yw'">XXX业务</text>
|
|
|
|
|
|
+ <text class="btn" v-if="token&&role=='sjkf'">{{userInfo.nickname}}</text>
|
|
|
|
+ <text class="btn" v-if="token&&role=='shkf'">{{userInfo.nickname}}</text>
|
|
|
|
+ <text class="btn" v-if="token&&role=='yw'">{{userInfo.nickname}}</text>
|
|
|
|
|
|
- <text class="btn" v-if="token&&role=='superAdmin'">XXX超级管理员</text>
|
|
|
|
|
|
+ <text class="btn" v-if="token&&role=='superAdmin'">{{userInfo.nickname}}</text>
|
|
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
- <navigator :url="'/pages/my/set/index?role=' + role">
|
|
|
|
- <image :src="picUrl+'/static/my/set2.png'" mode=""
|
|
|
|
- style="width: 37rpx;height: 41rpx;margin-right: 22rpx;">
|
|
|
|
- </image>
|
|
|
|
- </navigator>
|
|
|
|
|
|
+ <image :src="picUrl+'/static/my/set2.png'" mode="" @click="toPage('set')"
|
|
|
|
+ style="width: 37rpx;height: 41rpx;margin-right: 22rpx;">
|
|
|
|
+ </image>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="invite" @click="show=true"
|
|
|
|
- v-if="role=='sjkf'||role=='shkf'||role=='yw'||role=='superAdmin'||role=='yk'||role==''">
|
|
|
|
|
|
+ <view class="invite" @click="token?show=true:$toast('请先登录')"
|
|
|
|
+ v-if="role=='sjkf'||role=='shkf'||role=='yw'||role=='superAdmin'||role=='yk'||!role">
|
|
<view class="left">
|
|
<view class="left">
|
|
<image :src="picUrl+'/static/my/vip.png'" mode="" style="width: 27rpx;height: 30rpx;">
|
|
<image :src="picUrl+'/static/my/vip.png'" mode="" style="width: 27rpx;height: 30rpx;">
|
|
</image>
|
|
</image>
|
|
@@ -77,18 +73,16 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view class="serList">
|
|
<view class="serList">
|
|
- <navigator :url="item.url" v-for="(item,index) in serList">
|
|
|
|
- <view class="item">
|
|
|
|
- <view class="left">
|
|
|
|
- <image :src="item.icon" mode="" style="height: 31rpx;width: 35rpx;"></image>
|
|
|
|
- <text>{{item.name}}</text>
|
|
|
|
- </view>
|
|
|
|
- <view class="right">
|
|
|
|
- <text class="num" v-if="item.phone">{{item.phone}}</text>
|
|
|
|
- <image src="/static/my/arr_r.png" mode="" style="height: 24rpx;width: 14rpx;"></image>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <view class="item" @click="toPage(item)" v-for="(item,index) in serList">
|
|
|
|
+ <view class="left">
|
|
|
|
+ <image :src="item.icon" mode="" style="height: 31rpx;width: 35rpx;"></image>
|
|
|
|
+ <text>{{item.name}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="right">
|
|
|
|
+ <text class="num" v-if="item.phone">{{item.phone}}</text>
|
|
|
|
+ <image src="/static/my/arr_r.png" mode="" style="height: 24rpx;width: 14rpx;"></image>
|
|
</view>
|
|
</view>
|
|
- </navigator>
|
|
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -113,44 +107,61 @@
|
|
picUrl: this.$picUrl,
|
|
picUrl: this.$picUrl,
|
|
|
|
|
|
token: uni.getStorageSync('token'),
|
|
token: uni.getStorageSync('token'),
|
|
- role: uni.getStorageSync('role'),
|
|
|
|
- // token: null,
|
|
|
|
- // role: null,
|
|
|
|
- // role: 'cydg',
|
|
|
|
- // role: 'dg',
|
|
|
|
|
|
+ // role: uni.getStorageSync('role'),
|
|
|
|
+
|
|
|
|
+ role: null,
|
|
|
|
+
|
|
|
|
+ // status==1
|
|
|
|
+ // role: 'cydg',3
|
|
|
|
+ // role: 'hy', 5
|
|
|
|
+ // role: 'lhy',2
|
|
|
|
+ // role: 'svip',type==1
|
|
|
|
+ // role: 'hdyh',type==4
|
|
|
|
+ // role: 'youke',type==0
|
|
|
|
+
|
|
|
|
|
|
- // role: 'hy',
|
|
|
|
- // role: 'lhy',
|
|
|
|
|
|
+ // status==0
|
|
|
|
+ // role: 'yw',
|
|
// role: 'sjkf',
|
|
// role: 'sjkf',
|
|
// role: 'shkf',
|
|
// role: 'shkf',
|
|
- // role: 'yw',
|
|
|
|
- // role: 'svip',
|
|
|
|
// role: 'superAdmin',
|
|
// role: 'superAdmin',
|
|
|
|
|
|
serList: [{
|
|
serList: [{
|
|
icon: this.$picUrl + '/static/my/set.png',
|
|
icon: this.$picUrl + '/static/my/set.png',
|
|
name: '设置',
|
|
name: '设置',
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
- },
|
|
|
|
- {
|
|
|
|
|
|
+ }, {
|
|
icon: this.$picUrl + '/static/my/sh.png',
|
|
icon: this.$picUrl + '/static/my/sh.png',
|
|
name: '售后',
|
|
name: '售后',
|
|
url: '/pages/my/sellAfter/index'
|
|
url: '/pages/my/sellAfter/index'
|
|
- },
|
|
|
|
- {
|
|
|
|
|
|
+ }, {
|
|
icon: this.$picUrl + '/static/my/tg.png',
|
|
icon: this.$picUrl + '/static/my/tg.png',
|
|
name: '团购商品',
|
|
name: '团购商品',
|
|
url: '/pages/my/actGoods/index'
|
|
url: '/pages/my/actGoods/index'
|
|
- },
|
|
|
|
- {
|
|
|
|
|
|
+ }, {
|
|
icon: this.$picUrl + '/static/my/sc.png',
|
|
icon: this.$picUrl + '/static/my/sc.png',
|
|
name: '收藏',
|
|
name: '收藏',
|
|
url: '/pages/my/collect/index'
|
|
url: '/pages/my/collect/index'
|
|
- },
|
|
|
|
- {
|
|
|
|
|
|
+ }, {
|
|
icon: this.$picUrl + '/static/my/qt.png',
|
|
icon: this.$picUrl + '/static/my/qt.png',
|
|
name: '其他信息',
|
|
name: '其他信息',
|
|
url: '/pages/my/otherInfo/index'
|
|
url: '/pages/my/otherInfo/index'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.$picUrl + '/static/my/yjlx.png',
|
|
|
|
+ name: '一键联系',
|
|
|
|
+ phone: '12983098478'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.$picUrl + '/static/my/jiang.png',
|
|
|
|
+ name: '兑奖信息',
|
|
|
|
+ url: '/pages/my/duijiang/index'
|
|
|
|
+ // phone: '12983098478'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.$picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '小程序使用指南',
|
|
|
|
+ url: '/pages/my/useLead/index'
|
|
}
|
|
}
|
|
],
|
|
],
|
|
|
|
|
|
@@ -166,30 +177,57 @@
|
|
user_name: '',
|
|
user_name: '',
|
|
|
|
|
|
show: false,
|
|
show: false,
|
|
- list: [{
|
|
|
|
- name: '邀约VIP'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约L会员'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约会员'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约电工'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约活动用户'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ list: [],
|
|
userInfo: null
|
|
userInfo: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- async onLoad() {
|
|
|
|
|
|
+ async onShow() {
|
|
if (uni.getStorageSync('token')) {
|
|
if (uni.getStorageSync('token')) {
|
|
let res = await getUserInfoReq()
|
|
let res = await getUserInfoReq()
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
this.userInfo = res.data
|
|
this.userInfo = res.data
|
|
|
|
+ console.log('用户信息', this.userInfo);
|
|
|
|
+ // this.role = 'cydg'
|
|
|
|
+ if (res.data.status) {
|
|
|
|
+ switch (res.data.type) {
|
|
|
|
+ case 0:
|
|
|
|
+ this.role = 'yk'
|
|
|
|
+ break
|
|
|
|
+ case 1:
|
|
|
|
+ this.role = 'svip'
|
|
|
|
+ break
|
|
|
|
+ case 2:
|
|
|
|
+ this.role = 'lhy'
|
|
|
|
+ break
|
|
|
|
+ case 3:
|
|
|
|
+ this.role = 'cydg'
|
|
|
|
+ break
|
|
|
|
+ case 4:
|
|
|
|
+ this.role = 'hdyh'
|
|
|
|
+ break
|
|
|
|
+ case 5:
|
|
|
|
+ this.role = 'hy'
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ console.log('当前用户角色', this.role);
|
|
|
|
+ } else {
|
|
|
|
+ switch (res.data.type) {
|
|
|
|
+ case 1:
|
|
|
|
+ this.role = 'superAdmin'
|
|
|
|
+ break
|
|
|
|
+ case 2:
|
|
|
|
+ this.role = 'sjkf'
|
|
|
|
+ break
|
|
|
|
+ case 3:
|
|
|
|
+ this.role = 'shkf'
|
|
|
|
+ break
|
|
|
|
+ case 4:
|
|
|
|
+ this.role = 'yw'
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log('当前员工角色', this.role);
|
|
|
|
+ // this.checkRole()
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: res.message,
|
|
title: res.message,
|
|
@@ -197,8 +235,8 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ async onLoad() {
|
|
wx.onNeedPrivacyAuthorization((resolve, eventInfo) => {
|
|
wx.onNeedPrivacyAuthorization((resolve, eventInfo) => {
|
|
console.log('触发本次事件的接口是:' + eventInfo.referrer)
|
|
console.log('触发本次事件的接口是:' + eventInfo.referrer)
|
|
// 需要用户同意隐私授权时
|
|
// 需要用户同意隐私授权时
|
|
@@ -208,33 +246,136 @@
|
|
this.resolvePrivacyAuthorization = resolve
|
|
this.resolvePrivacyAuthorization = resolve
|
|
})
|
|
})
|
|
|
|
|
|
- if (this.role == 'cydg') {
|
|
|
|
- this.serList = [{
|
|
|
|
- icon: this.picUrl + '/static/my/set.png',
|
|
|
|
- name: '设置',
|
|
|
|
|
|
+ // wx.getUserProfile({
|
|
|
|
+ // success: console.log,
|
|
|
|
+ // fail: console.error
|
|
|
|
+ // })
|
|
|
|
+ },
|
|
|
|
+ computed: {},
|
|
|
|
+ methods: {
|
|
|
|
+ call(phone) {
|
|
|
|
+ uni.makePhoneCall({
|
|
|
|
+ phoneNumber: phone,
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ toPage(page) {
|
|
|
|
+ if (!this.token && page != '/pages/my/otherInfo/index' && !page.phone) {
|
|
|
|
+ return this.$toast('请先登录')
|
|
|
|
+ }
|
|
|
|
+ if (page == 'set') {
|
|
|
|
+ uni.navigateTo({
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
- },
|
|
|
|
- {
|
|
|
|
- icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
- name: '收藏',
|
|
|
|
- url: '/pages/my/collect/index'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
- name: '小程序使用指南',
|
|
|
|
- url: '/pages/my/useLead/index'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
- name: '一键联系',
|
|
|
|
- phone: '12983098478'
|
|
|
|
- },
|
|
|
|
- ]
|
|
|
|
- } else if (this.role == 'hy') {
|
|
|
|
- this.serList = [{
|
|
|
|
|
|
+ })
|
|
|
|
+ } else if (page == 'info') {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/my/userInfo/index'
|
|
|
|
+ })
|
|
|
|
+ } else if (page.phone) {
|
|
|
|
+ this.call(page.phone)
|
|
|
|
+ } else {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: page.url
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ login() {
|
|
|
|
+ let _this = this
|
|
|
|
+ uni.login({
|
|
|
|
+ provider: 'weixin',
|
|
|
|
+ success: async (res) => {
|
|
|
|
+ if (res.errMsg == 'login:ok') {
|
|
|
|
+ let res1 = await wxAuthLoginReq({
|
|
|
|
+ code: res.code
|
|
|
|
+ })
|
|
|
|
+ if (res1.code == 0) {
|
|
|
|
+ uni.setStorageSync('token', res1.data.token)
|
|
|
|
+ // uni.setStorageSync('role', 'yk')
|
|
|
|
+ // uni.setStorageSync('userInfo', res1.data.user_info)
|
|
|
|
+ _this.$toast('登录成功')
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: '/pages/my'
|
|
|
|
+ })
|
|
|
|
+ }, 1500)
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res1.message,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ handleSel(e) {
|
|
|
|
+ console.log('sheet选择参数:', e);
|
|
|
|
+ let type = -1
|
|
|
|
+ if (e.name == '邀约VIP') {
|
|
|
|
+ type = 'vip'
|
|
|
|
+ } else if (e.name == '邀约L会员') {
|
|
|
|
+ type = 'ls'
|
|
|
|
+ } else if (e.name == '邀约会员') {
|
|
|
|
+ type = 'hy'
|
|
|
|
+ } else if (e.name == '邀约活动用户') {
|
|
|
|
+ type = 'yh'
|
|
|
|
+ } else if (e.name == '邀约电工') {
|
|
|
|
+ type = 'dg'
|
|
|
|
+ }
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/my/inviteDetail/index?type=' + type
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ checkRole() {
|
|
|
|
+ if (this.role == 'yk') {
|
|
|
|
+ this.serList = [{
|
|
|
|
+ icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
+ name: '活动商城',
|
|
|
|
+ url: '/pages/my/actGoods/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
+ name: '收藏',
|
|
|
|
+ url: '/pages/my/collect/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '小程序使用指南',
|
|
|
|
+ url: '/pages/my/useLead/index'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.picUrl + '/static/other/aboutMe.png',
|
|
|
|
+ name: '关于我们',
|
|
|
|
+ url: '/pages/my/aboutMe/index'
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ } else if (this.role == 'svip') {
|
|
|
|
+ this.serList = [{
|
|
|
|
+ icon: this.picUrl + '/static/my/set.png',
|
|
|
|
+ name: '设置',
|
|
|
|
+ url: '/pages/my/set/index?role=' + this.role
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
+ name: '收藏',
|
|
|
|
+ url: '/pages/my/collect/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
+ name: '一键联系',
|
|
|
|
+ phone: '12983098478'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '小程序使用指南',
|
|
|
|
+ url: '/pages/my/useLead/index'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.picUrl + '/static/other/aboutMe.png',
|
|
|
|
+ name: '关于我们',
|
|
|
|
+ url: '/pages/my/aboutMe/index'
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ } else if (this.role == 'lhy') {
|
|
|
|
+ this.serList = [{
|
|
icon: this.picUrl + '/static/my/sh.png',
|
|
icon: this.picUrl + '/static/my/sh.png',
|
|
name: '售后',
|
|
name: '售后',
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
|
|
+ url: '/pages/my/sellAfterCon/index'
|
|
}, {
|
|
}, {
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
name: '收藏',
|
|
name: '收藏',
|
|
@@ -243,47 +384,78 @@
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
name: '小程序使用指南',
|
|
name: '小程序使用指南',
|
|
url: '/pages/my/useLead/index'
|
|
url: '/pages/my/useLead/index'
|
|
- },
|
|
|
|
- {
|
|
|
|
- icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
- name: '一键联系',
|
|
|
|
- phone: '12983098478'
|
|
|
|
- },
|
|
|
|
- ]
|
|
|
|
- } else if (this.role == 'lhy') {
|
|
|
|
- this.serList = [{
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfterCon/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
- name: '收藏',
|
|
|
|
- url: '/pages/my/collect/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
- name: '小程序使用指南',
|
|
|
|
- url: '/pages/my/useLead/index'
|
|
|
|
- }, ]
|
|
|
|
- } else if (this.role == 'sjkf' || this.role == 'yw') {
|
|
|
|
- if (this.role == 'sjkf') {
|
|
|
|
|
|
+ }, ]
|
|
|
|
+ } else if (this.role == 'cydg') {
|
|
|
|
+ this.serList = [{
|
|
|
|
+ icon: this.picUrl + '/static/my/set.png',
|
|
|
|
+ name: '设置',
|
|
|
|
+ url: '/pages/my/set/index?role=' + this.role
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
+ name: '收藏',
|
|
|
|
+ url: '/pages/my/collect/index'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
+ name: '一键联系',
|
|
|
|
+ phone: '12983098478'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.picUrl + '/static/my/jiang.png',
|
|
|
|
+ name: '兑奖信息',
|
|
|
|
+ // phone: '12983098478'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '小程序使用指南',
|
|
|
|
+ url: '/pages/my/useLead/index'
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ ]
|
|
|
|
+ } else if (this.role == 'hdhy') {
|
|
this.serList = [{
|
|
this.serList = [{
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
name: '设置',
|
|
name: '设置',
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
}, {
|
|
}, {
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
name: '收藏',
|
|
name: '收藏',
|
|
url: '/pages/my/collect/index'
|
|
url: '/pages/my/collect/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
+ name: '一键联系',
|
|
|
|
+ phone: '12983098478'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/jiang.png',
|
|
|
|
+ name: '兑奖信息',
|
|
|
|
+ url: '/pages/my/chapinShip/index'
|
|
}, {
|
|
}, {
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
name: '小程序使用指南',
|
|
name: '小程序使用指南',
|
|
url: '/pages/my/useLead/index'
|
|
url: '/pages/my/useLead/index'
|
|
}, ]
|
|
}, ]
|
|
- } else {
|
|
|
|
|
|
+ } else if (this.role == 'hy') {
|
|
|
|
+ this.serList = [{
|
|
|
|
+ icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
+ name: '售后',
|
|
|
|
+ url: '/pages/my/sellAfter/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
+ name: '收藏',
|
|
|
|
+ url: '/pages/my/collect/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '小程序使用指南',
|
|
|
|
+ url: '/pages/my/useLead/index'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
+ name: '一键联系',
|
|
|
|
+ phone: '12983098478'
|
|
|
|
+ },
|
|
|
|
+ ]
|
|
|
|
+ } else if (this.role == 'superAdmin') {
|
|
this.serList = [{
|
|
this.serList = [{
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
icon: this.picUrl + '/static/my/set.png',
|
|
name: '设置',
|
|
name: '设置',
|
|
@@ -302,111 +474,91 @@
|
|
url: '/pages/my/collect/index'
|
|
url: '/pages/my/collect/index'
|
|
}, {
|
|
}, {
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
- name: '小程序使用指南',
|
|
|
|
- url: '/pages/my/useLead/index'
|
|
|
|
|
|
+ name: '其他信息',
|
|
|
|
+ url: '/pages/my/otherInfo/index'
|
|
}, ]
|
|
}, ]
|
|
- }
|
|
|
|
|
|
|
|
- this.list = [{
|
|
|
|
- name: '邀约VIP'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约L会员'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约活动用户'
|
|
|
|
|
|
+ this.list = [{
|
|
|
|
+ name: '邀约VIP'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约L会员'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约会员'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约电工'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约活动用户'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ } else if (this.role == 'sjkf' || this.role == 'yw') {
|
|
|
|
+ if (this.role == 'sjkf') {
|
|
|
|
+ this.serList = [{
|
|
|
|
+ icon: this.picUrl + '/static/my/set.png',
|
|
|
|
+ name: '设置',
|
|
|
|
+ url: '/pages/my/set/index?role=' + this.role
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
+ name: '售后',
|
|
|
|
+ url: '/pages/my/sellAfter/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
+ name: '收藏',
|
|
|
|
+ url: '/pages/my/collect/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '小程序使用指南',
|
|
|
|
+ url: '/pages/my/useLead/index'
|
|
|
|
+ }, ]
|
|
|
|
+ } else {
|
|
|
|
+ this.serList = [{
|
|
|
|
+ icon: this.picUrl + '/static/my/set.png',
|
|
|
|
+ name: '设置',
|
|
|
|
+ url: '/pages/my/set/index?role=' + this.role
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
+ name: '售后',
|
|
|
|
+ url: '/pages/my/sellAfter/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
+ name: '团购商品',
|
|
|
|
+ url: '/pages/my/actGoods/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
+ name: '收藏',
|
|
|
|
+ url: '/pages/my/collect/index'
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
+ name: '小程序使用指南',
|
|
|
|
+ url: '/pages/my/useLead/index'
|
|
|
|
+ }, ]
|
|
}
|
|
}
|
|
- ]
|
|
|
|
- } else if (this.role == 'shkf') {
|
|
|
|
- this.serList = [{
|
|
|
|
- icon: this.picUrl + '/static/my/set.png',
|
|
|
|
- name: '设置',
|
|
|
|
- url: '/pages/my/set/index?role=' + this.role
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '团购商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
- name: '收藏',
|
|
|
|
- url: '/pages/my/collect/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
- name: '小程序使用指南',
|
|
|
|
- url: '/pages/my/useLead/index'
|
|
|
|
- }, ]
|
|
|
|
|
|
+ this.list = [{
|
|
|
|
+ name: '邀约VIP'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约L会员'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约活动用户'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
|
|
- this.list = [{
|
|
|
|
- name: '邀约VIP'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约L会员'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约会员'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '邀约活动用户'
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- } else if (this.role == 'dg') {
|
|
|
|
- this.serList = [{
|
|
|
|
- icon: this.picUrl + '/static/my/set.png',
|
|
|
|
- name: '设置',
|
|
|
|
- url: '/pages/my/set/index?role=' + this.role
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
- name: '收藏',
|
|
|
|
- url: '/pages/my/collect/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
- name: '一键联系',
|
|
|
|
- phone: '12983098478'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/jiang.png',
|
|
|
|
- name: '兑奖信息',
|
|
|
|
- url: '/pages/my/chapinShip/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
- name: '小程序使用指南',
|
|
|
|
- url: '/pages/my/useLead/index'
|
|
|
|
- }, ]
|
|
|
|
- } else if (this.role == 'svip') {
|
|
|
|
- this.serList = [{
|
|
|
|
- icon: this.picUrl + '/static/my/set.png',
|
|
|
|
- name: '设置',
|
|
|
|
- url: '/pages/my/set/index?role=' + this.role
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
- name: '收藏',
|
|
|
|
- url: '/pages/my/collect/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/yjlx.png',
|
|
|
|
- name: '一键联系',
|
|
|
|
- phone: '12983098478'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
- name: '小程序使用指南',
|
|
|
|
- url: '/pages/my/useLead/index'
|
|
|
|
- }, ]
|
|
|
|
- } else if (this.role == 'yk') {
|
|
|
|
- this.serList = [{
|
|
|
|
- icon: this.$picUrl + '/static/my/set.png',
|
|
|
|
|
|
+ } else if (this.role == 'shkf') {
|
|
|
|
+ this.serList = [{
|
|
|
|
+ icon: this.picUrl + '/static/my/set.png',
|
|
name: '设置',
|
|
name: '设置',
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
url: '/pages/my/set/index?role=' + this.role
|
|
- },
|
|
|
|
- {
|
|
|
|
- icon: this.$picUrl + '/static/my/sh.png',
|
|
|
|
|
|
+ }, {
|
|
|
|
+ icon: this.picUrl + '/static/my/sh.png',
|
|
name: '售后',
|
|
name: '售后',
|
|
url: '/pages/my/sellAfter/index'
|
|
url: '/pages/my/sellAfter/index'
|
|
- },
|
|
|
|
- {
|
|
|
|
|
|
+ }, {
|
|
icon: this.picUrl + '/static/my/tg.png',
|
|
icon: this.picUrl + '/static/my/tg.png',
|
|
- name: '活动商城',
|
|
|
|
|
|
+ name: '团购商品',
|
|
url: '/pages/my/actGoods/index'
|
|
url: '/pages/my/actGoods/index'
|
|
}, {
|
|
}, {
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
icon: this.picUrl + '/static/my/sc.png',
|
|
@@ -416,94 +568,24 @@
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
icon: this.picUrl + '/static/my/qt.png',
|
|
name: '小程序使用指南',
|
|
name: '小程序使用指南',
|
|
url: '/pages/my/useLead/index'
|
|
url: '/pages/my/useLead/index'
|
|
- },
|
|
|
|
- {
|
|
|
|
- icon: this.$picUrl + '/static/my/qt.png',
|
|
|
|
- name: '其他信息',
|
|
|
|
- url: '/pages/my/otherInfo/index'
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- } else if (this.role == 'superAdmin') {
|
|
|
|
- this.serList = [{
|
|
|
|
- icon: this.picUrl + '/static/my/set.png',
|
|
|
|
- name: '设置',
|
|
|
|
- url: '/pages/my/set/index?role=' + this.role
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sh.png',
|
|
|
|
- name: '售后',
|
|
|
|
- url: '/pages/my/sellAfter/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/tg.png',
|
|
|
|
- name: '团购商品',
|
|
|
|
- url: '/pages/my/actGoods/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/sc.png',
|
|
|
|
- name: '收藏',
|
|
|
|
- url: '/pages/my/collect/index'
|
|
|
|
- }, {
|
|
|
|
- icon: this.picUrl + '/static/my/qt.png',
|
|
|
|
- name: '其他信息',
|
|
|
|
- url: '/pages/my/otherInfo/index'
|
|
|
|
- }, ]
|
|
|
|
- } else {
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // wx.getUserProfile({
|
|
|
|
- // success: console.log,
|
|
|
|
- // fail: console.error
|
|
|
|
- // })
|
|
|
|
- },
|
|
|
|
- computed: {},
|
|
|
|
- methods: {
|
|
|
|
|
|
+ }, ]
|
|
|
|
|
|
- login() {
|
|
|
|
- let _this = this
|
|
|
|
- uni.login({
|
|
|
|
- provider: 'weixin',
|
|
|
|
- success: async (res) => {
|
|
|
|
- if (res.errMsg == 'login:ok') {
|
|
|
|
- let res1 = await wxAuthLoginReq({
|
|
|
|
- code: res.code
|
|
|
|
- })
|
|
|
|
- if (res1.code == 0) {
|
|
|
|
- uni.setStorageSync('token', res1.data.token)
|
|
|
|
- uni.setStorageSync('role', 'yk')
|
|
|
|
- uni.setStorageSync('userInfo', res1.data.user_info)
|
|
|
|
- _this.$toast('登录成功')
|
|
|
|
- setTimeout(() => {
|
|
|
|
- uni.reLaunch({
|
|
|
|
- url: '/pages/my'
|
|
|
|
- })
|
|
|
|
- }, 1500)
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: res1.message,
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ this.list = [{
|
|
|
|
+ name: '邀约VIP'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约L会员'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约会员'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '邀约活动用户'
|
|
}
|
|
}
|
|
- }
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ ]
|
|
|
|
+ } else {
|
|
|
|
|
|
- handleSel(e) {
|
|
|
|
- console.log('sheet选择参数:', e);
|
|
|
|
- let type = -1
|
|
|
|
- if (e.name == '邀约VIP') {
|
|
|
|
- type = 'vip'
|
|
|
|
- } else if (e.name == '邀约L会员') {
|
|
|
|
- type = 'ls'
|
|
|
|
- } else if (e.name == '邀约会员') {
|
|
|
|
- type = 'hy'
|
|
|
|
- } else if (e.name == '邀约活动用户') {
|
|
|
|
- type = 'yh'
|
|
|
|
- } else if (e.name == '邀约电工') {
|
|
|
|
- type = 'dg'
|
|
|
|
}
|
|
}
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/my/inviteDetail/index?type=' + type
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|