yujialong 1 year ago
parent 19f0e898af
commit 1c95bf74ea
  1. 4
      config/request.js
  2. 4
      order/clientDetail/clientDetail.vue
  3. 4
      order/orderDetail/orderDetail.vue
  4. 3
      pages/index/index.vue
  5. 12
      pages/login/login.vue
  6. 86
      pages/person/person.vue
  7. 25
      pages/reg/reg.vue
  8. 7
      pages/workbench/workbench.vue
  9. 4
      team/qrcode/qrcode.vue

@ -5,9 +5,9 @@
*/
export default {
// baseURL: 'https://huorantech.cn/',
baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.152:9000/',
baseURL: 'http://121.37.12.51/',
// baseURL: 'http://121.37.12.51/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},

@ -107,6 +107,7 @@
return {
isDetail: false,
customerId: '',
shopCart: false,
//
customerTypeList: [{
name: '正式',
@ -164,6 +165,7 @@
const { options } = pages[pages.length - 1]
this.customerId = options.customerId
this.isDetail = !!options.show
this.shopCart = options.shopCart //
options.customerId && this.getInfo()
//
@ -323,7 +325,7 @@
if (res.confirm) {
//
uni.redirectTo({
url: `/order/orderDetail/orderDetail?customerId=${customerId}`
url: `/order/orderDetail/orderDetail?customerId=${customerId}${that.shopCart ? '&shopCart=1' : ''}`
})
} else if (res.cancel) {
uni.navigateBack()

@ -445,8 +445,8 @@
},
//
toClient() {
uni.setStorageSync('courses', this.courseList)
this.$util.to(`/order/clientDetail/clientDetail`)
this.shopCart || uni.setStorageSync('courses', this.courses)
this.$util.to(`/order/clientDetail/clientDetail${this.shopCart ? '?shopCart=1' : ''}`)
},
//
delCourse(c, i) {

@ -138,7 +138,6 @@
title: '加载中'
})
getTeamsByAccountId().then(({ data }) => {
let hasOwnTeam = 0 //
data.map(e => {
const n = e.partnerClassificationList
e.id = n.id
@ -146,9 +145,7 @@
e.teamId = e.isTeam == 1 ? +e.partnerClassificationId : n.id
e.partnerClassificationName = n.partnerClassificationName
delete e.partnerClassificationList
if (e.isTeam == 1) hasOwnTeam = 1
})
uni.setStorageSync('hasOwnTeam', hasOwnTeam)
if (data.length) {
/**
* @description 如果是第一次进则默认选中第一个团队并把该团队的信息存入缓存

@ -9,8 +9,8 @@
</button>
<template v-else>
<view class="btn wechat" @click="login">
<image src="@/static/image/wechat.png" mode="widthFix"></image>
微信授权登录
<!-- <image src="@/static/image/wechat.png" mode="widthFix"></image> -->
快捷登录
</view>
<!-- <view class="reg" @click="toReg">没有账号申请注册</view> -->
</template>
@ -143,9 +143,7 @@
this.submiting = true
const phone = data.phoneNumber
if (this.isReg) { //
uni.redirectTo({
url: `../reg/reg?openid=${this.openid}&phone=${phone}`
})
this.$util.to(`../reg/reg?openid=${this.openid}&phone=${phone}`)
} else { //
userBinding({
openid: this.openid,
@ -163,9 +161,7 @@
}).then(({ sessionKey }) => {
this.sessionKey = sessionKey.session_key
this.openid = sessionKey.openid
uni.redirectTo({
url: `../reg/reg?openid=${this.openid}&phone=${phone}`
})
this.$util.to(`../reg/reg?openid=${this.openid}&phone=${phone}`)
}).catch(e => {})
this.isReg = true
}

@ -97,11 +97,14 @@
<script>
import { my, editProvinceCity } from '@/apis/modules/parner.js'
import { queryProvince, queryCity, updateAvatars } from '@/apis/modules/user.js'
import { queryProvince, queryCity, updateAvatars, getUserRolesPermissionMenu } from '@/apis/modules/user.js'
import { getTeamsByAccountId } from '@/apis/modules/client.js'
export default {
data() {
return {
per: true, //
teamId: uni.getStorageSync('teamId') || '',
teams: [],
my: {
info: {
phone: ''
@ -115,7 +118,7 @@
},
avatar: uni.getStorageSync('avatar') || '@/static/image/avatar.png',
userName: uni.getStorageSync('userName'),
hasOwnTeam: uni.getStorageSync('hasOwnTeam') == 1, //
hasOwnTeam: 0, //
disabled: true,
provinces: [],
cities: [],
@ -137,8 +140,7 @@
},
onShow() {
this.per = true
this.initRole()
this.disabled = uni.getStorageSync('team').isTeam == 0 //
this.getTeam()
},
methods: {
//
@ -149,6 +151,80 @@
this.getInfo()
}
},
//
getAuth() {
uni.showLoading({
title: '加载中'
})
getUserRolesPermissionMenu({
teamId: this.teams.find(e => e.teamId == this.teamId).partnerClassificationId,
platformId: 4
}).then(({ permissionMenu }) => {
uni.hideLoading()
const auth = []
//
const generateAuth = (list, parent) => {
list.map(e => {
const name = `${parent ? parent + ':' : ''}${e.name}`
auth.push(name)
generateAuth(e.children, name)
})
}
generateAuth(permissionMenu[0].children, '')
uni.setStorageSync('auth', auth)
this.initRole()
}).catch(e => {
uni.hideLoading()
uni.setStorageSync('auth', [])
this.initRole()
})
},
//
getTeam() {
uni.showLoading({
title: '加载中'
})
getTeamsByAccountId().then(({ data }) => {
let hasOwnTeam = 0 //
data.map(e => {
const n = e.partnerClassificationList
e.id = n.id
// parnerIdidteamIduni.getStorageSync('team').partnerId使
e.teamId = e.isTeam == 1 ? +e.partnerClassificationId : n.id
e.partnerClassificationName = n.partnerClassificationName
delete e.partnerClassificationList
if (e.isTeam == 1) hasOwnTeam = 1
})
this.hasOwnTeam = hasOwnTeam
const teamId = uni.getStorageSync('teamId')
if (data.length) {
/**
* @description 如果是第一次进则默认选中第一个团队并把该团队的信息存入缓存
* 或者团队列表里没有该id则说明超管已经被转让也需要重新选中团队
*/
const curTeam = data.find(e => e.teamId == teamId)
if (teamId && curTeam) {
uni.setStorageSync('team', curTeam)
} else if (!uni.getStorageSync('team') || !curTeam) {
this.teamId = data[0].teamId
uni.setStorageSync('teamId', data[0].teamId)
uni.setStorageSync('team', data[0])
}
} else {
// 退
uni.hideLoading()
uni.clearStorageSync()
uni.navigateTo({
url: '../login/login'
})
}
this.disabled = uni.getStorageSync('team').isTeam == 0 //
this.teams = data
this.getAuth()
}).catch(e => {
uni.hideLoading()
})
},
//
getInfo() {
const { partnerId, teamId } = uni.getStorageSync('team')
@ -187,7 +263,7 @@
},
//
createTeam() {
this.$util.to(`../reg/reg?openid=${uni.getStorageSync('openid')}&phone=${this.my.info.phone}`)
this.$util.to(`../reg/reg?openid=${uni.getStorageSync('openid')}&phone=${this.my.info.phone}&my=1`)
},
//
toSet() {

@ -2,8 +2,8 @@
<view class="page">
<image class="logo" src="@/static/image/logo.png" mode=""></image>
<view class="wrap">
<view v-if="form.isTeam !== 0" class="hello">
{{ form.isTeam ? '或然科技城市合伙人,欢迎回来!' : '欢迎加入或然城市合伙人计划!请认真填写您的姓名和意向开展业务的区域。注册后,我们将会有区域运营与您联系沟通后续事宜。'}}
<view class="hello">
{{ form.isTeam ? '或然科技城市合伙人,欢迎回来!' : form.isTeam === 0 ? '请认真填写您的姓名和意向开展业务的区域。创建成功后,我们将会有区域运营与您联系沟通后续事宜。' : '欢迎加入或然城市合伙人计划!请认真填写您的姓名和意向开展业务的区域。注册后,我们将会有区域运营与您联系沟通后续事宜。'}}
</view>
<view>
<uni-forms>
@ -35,6 +35,7 @@
return {
openid: '',
phone: '',
my: false,
form: {
userName: '',
provinceId: '',
@ -51,6 +52,7 @@
const { options } = pages[pages.length - 1]
this.openid = options.openid
this.phone = options.phone
this.my = options.my
this.getProvince()
this.checkLogin()
},
@ -69,19 +71,6 @@
} else {
this.form.isTeam = 0
if (team.userName) this.form.userName = team.userName
uni.showModal({
title: '提示',
content: `或然科技城市合伙人,欢迎回来!您已在${team.teamName},是否要创建自己的团队?`,
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
uni.redirectTo({
url: '../login/login'
})
}
}
})
}
} else if (username) { // username
this.form.userName = username
@ -144,14 +133,12 @@
//
toIndex() {
uni.reLaunch({
url: '../index/index'
url: this.my ? '../person/person' : '../index/index'
})
},
//
back() {
uni.redirectTo({
url: '../login/login'
})
uni.navigateBack()
}
}
}

@ -163,7 +163,7 @@
},
//
getAuth() {
uni.getStorageSync('token') && getUserRolesPermissionMenu({
getUserRolesPermissionMenu({
teamId: this.list.find(e => e.teamId == this.teamId).partnerClassificationId,
platformId: 4
}).then(({ permissionMenu }) => {
@ -208,6 +208,7 @@
*/
if (!uni.getStorageSync('team') || !data.find(e => e.teamId == this.teamId)) {
this.teamId = data[0].teamId
uni.setStorageSync('teamId', data[0].teamId)
uni.setStorageSync('team', data[0])
}
} else {
@ -220,7 +221,7 @@
}
this.list = data
this.initRole()
this.getAuth()
}).catch(e => {
uni.hideLoading()
})
@ -272,7 +273,9 @@
teamChange() {
const { teamId } = this
const e = this.list.find(e => e.teamId == teamId)
console.log(333,teamId ,e)
uni.setStorageSync('team', e)
uni.setStorageSync('teamId', teamId)
this.getAuth()
},
//

@ -63,8 +63,8 @@
generateInvitationCode(uni.getStorageSync('team').accountId).then(({ expireTime }) => {
const date = new Date(Date.now() + expireTime * 1000) // *1000
this.expireTime = `${date.getFullYear()}-${this.$util.preZero(date.getMonth() + 1)}-${this.$util.preZero(date.getDate())} ${this.$util.preZero(date.getHours())}:${this.$util.preZero(date.getMinutes())}:${this.$util.preZero(date.getMinutes())}`
// this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
this.link = `http://121.37.12.51/backstage/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
// this.link = `http://121.37.12.51/backstage/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
}).catch(e => {})
},
// imageimage

Loading…
Cancel
Save