Browse Source

登录修改

master
unknown 1 year ago
parent
commit
9f1fdfacd4
  1. 1
      common/js/mixins.js
  2. 130
      components/UserTab/UserTab - 副本.vue
  3. 1
      config/api.js
  4. 52
      config/request - 副本.js
  5. 8
      config/site.config.js
  6. 5
      manifest.json
  7. 88
      pages/login/login.vue
  8. 194
      pages/login/loginByPhone.vue
  9. 17
      pages/tabbar/appointmenRecord/index.vue
  10. 5
      pages/tabbar/examSimulation/index.vue
  11. 5
      pages/tabbar/statistics/index.vue
  12. 70
      pages/userCenter/teachingData/teachingData.vue
  13. BIN
      static/images/bigImg/indexTopBanner.png
  14. BIN
      static/images/bigImg/topPageBg.png
  15. BIN
      static/images/logo.png
  16. BIN
      static/images/userCenter/loginTopBg.png
  17. BIN
      static/images/登录流程切图/__MACOSX/登录流程切图/._.DS_Store
  18. BIN
      static/images/登录流程切图/__MACOSX/登录流程切图/._btn_1.png
  19. BIN
      static/images/登录流程切图/登录流程切图/.DS_Store
  20. BIN
      static/images/登录流程切图/登录流程切图/bg_1.png
  21. BIN
      static/images/登录流程切图/登录流程切图/btn_1.png
  22. BIN
      static/images/登录流程切图/登录流程切图/btn_2.png
  23. BIN
      static/images/登录流程切图/登录流程切图/title_1.png
  24. BIN
      static/logo.png
  25. 2
      store/index.js
  26. 91
      store/modules/add.js
  27. 4
      store/modules/user.js

1
common/js/mixins.js

@ -5,6 +5,7 @@ export default {
computed: { computed: {
...mapState({ ...mapState({
identity: state=> state.user.identity, identity: state=> state.user.identity,
role: state=>state.user.vuex_userInfo.roles
}), }),
}, },
data() { data() {

130
components/UserTab/UserTab - 副本.vue

@ -1,130 +0,0 @@
<template>
<view class="">
<!-- 学生端 -->
<u-tabbar v-if="showWho=='student'" :value="student" @change="studentChange" :fixed="true" :placeholder="true"
:safeAreaInsetBottom="true" activeColor="#31aef1">
<u-tabbar-item v-for="i in studentList" :key='i.id' :text="i.name" :name="i.name">
<image class="u-page__item__slot-icon" slot="active-icon" :src="i.active" mode="widthFix"></image>
<image class="u-page__item__slot-icon" slot="inactive-icon" :src="i.inactive" mode="widthFix"></image>
</u-tabbar-item>
</u-tabbar>
<!-- 教师端 -->
<u-tabbar :value="teacher" @change="teacherChange" :fixed="true" :placeholder="true"
:safeAreaInsetBottom="true" activeColor="#31aef1">
<u-tabbar-item v-for="i in teacherList" :key='i.id' :text="i.name" :name="i.name">
<image class="u-page__item__slot-icon" slot="active-icon" :src="i.active" mode="widthFix"></image>
<image class="u-page__item__slot-icon" slot="inactive-icon" :src="i.inactive" mode="widthFix"></image>
</u-tabbar-item>
</u-tabbar>
</view>
</template>
<script>
export default {
props: ['tabNumber'],
data() {
return {
teacher: '课堂',
student: '',
showWho: 'teacher',
teacherList: [{
id: 1,
name: '课堂',
active: '../../static/images/tabbar/syActive.png',
inactive: '../../static/images/tabbar/sy.png'
},
{
id: 2,
name: '兴趣小组',
active: '../../static/images/tabbar/tkActive.png',
inactive: '../../static/images/tabbar/tk.png'
},
{
id: 3,
name: '我的',
active: '../../static/images/tabbar/zxActive.png',
inactive: '../../static/images/tabbar/zx.png'
}
],
studentList: [{
id: 1,
name: '学员课堂',
active: '../../static/images/tabbar/syActive.png',
inactive: '../../static/images/tabbar/sy.png'
},
{
id: 2,
name: '学员兴趣小组',
active: '../../static/images/tabbar/tkActive.png',
inactive: '../../static/images/tabbar/tk.png'
},
{
id: 3,
name: '学员我的',
active: '../../static/images/tabbar/zxActive.png',
inactive: '../../static/images/tabbar/zx.png'
}
],
}
},
mounted() {
// if (uni.getStorageSync('status') == 'teacher') {
// this.showWho = 'student'
// } else {
// this.showWho = 'teacher'
// }
this.student = this.tabNumber
this.teacher = this.tabNumber
},
methods: {
teacherChange(e) {
this.teacher = e
if (e == '课堂') {
uni.reLaunch({
url: "/pages/tabbar/index/index"
})
// uni.hideHomeButton() //
} else if (e == "兴趣小组") {
uni.reLaunch({
url: "/pages/tabbar/question/index"
})
// uni.hideHomeButton()
} else if (e == "我的") {
uni.reLaunch({
url: "/pages/tabbar/mine/index"
})
// uni.hideHomeButton()
}
},
studentChange(e) {
this.student = e
uni.hideHomeButton()
// if (e == '') {
// uni.reLaunch({
// url: "/pages/index/CourseTeacherIndex"
// })
// uni.hideHomeButton() //
// } else if (e == "") {
// uni.reLaunch({
// url: "/pages/interestGroup/interestGroup"
// })
// uni.hideHomeButton()
// } else if (e == "") {
// uni.reLaunch({
// url: "/pages/mine/mine"
// })
// uni.hideHomeButton()
// }
}
}
}
</script>
<style lang="scss" scoped>
.u-page__item__slot-icon {
display: block;
width: 56rpx;
height: 56rpx;
}
</style>

1
config/api.js

@ -19,3 +19,4 @@ export const tenantPage = (params) => http.get('system/tenant/pages', {params: p

52
config/request - 副本.js

@ -1,52 +0,0 @@
// 此vm参数为页面的实例,可以通过它引用vuex中的变量
module.exports = (vm) => {
// 初始化请求配置
uni.$u.http.setConfig((config) => {
/* config 为默认全局配置*/
config.baseURL = 'http://121.41.97.244:8090'; /* 根域名 */
config.header['content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
return config
})
// 请求拦截
uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
config.data = config.data || {}
// 根据custom参数中配置的是否需要token,添加对应的请求头
if(config?.custom?.auth) {
// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
config.header.token = vm.$store.state.userInfo.token
}
return config
}, config => { // 可使用async await 做异步操作
return Promise.reject(config)
})
// 响应拦截
uni.$u.http.interceptors.response.use((response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/
const data = response.data
console.log('response')
console.log(data)
// 自定义参数
const custom = response.config?.custom
if (data.code !== 0) {
// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
if (custom.toast !== false) {
uni.$u.toast(data.message)
}
// 如果需要catch返回,则进行reject
if (custom?.catch) {
return Promise.reject(data)
} else {
// 否则返回一个pending中的promise,请求不会进入catch中
return new Promise(() => { })
}
}
return data === undefined ? {} : data
}, (response) => {
// 对响应错误做点什么 (statusCode !== 200)
return Promise.reject(response)
})
}

8
config/site.config.js

@ -1,8 +1,8 @@
const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM; const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false // localIp = false
module.exports = { module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/',//非代理地址
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/',
httpPrefix: '/admin-api/'
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api/' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',//非代理地址
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',
httpPrefix: 'admin-api/'
}; };

5
manifest.json

@ -53,7 +53,8 @@
"appid" : "wx2d71605af3b620e6", "appid" : "wx2d71605af3b620e6",
"setting" : { "setting" : {
"urlCheck" : false, "urlCheck" : false,
"es6" : true
"es6" : true,
"minified" : true
}, },
"usingComponents" : true, "usingComponents" : true,
"permission" : { "permission" : {
@ -81,7 +82,7 @@
"disableHostCheck" : true, "disableHostCheck" : true,
"proxy" : { "proxy" : {
"/api" : { "/api" : {
"target" : "http://192.168.1.26:48080/",
"target" : "http://192.168.1.26:48082/",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : true, "secure" : true,
"pathRewrite" : { "pathRewrite" : {

88
pages/login/login.vue

@ -34,6 +34,7 @@
</view> --> </view> -->
</view> </view>
<u-picker :show="show" :columns="columnsArea" keyName="name" @confirm="confirmArea" @close="show=false"></u-picker> <u-picker :show="show" :columns="columnsArea" keyName="name" @confirm="confirmArea" @close="show=false"></u-picker>
<u-action-sheet :actions="list" :title="title" :show="showRole" @select="selectClick" ></u-action-sheet>
</view> </view>
</template> </template>
@ -51,7 +52,14 @@
}, },
codeOn: false, codeOn: false,
show: false, show: false,
columnsArea: []
columnsArea: [],
list: [],
title: '请选择您要登录的角色',
showRole: false,
roleObj: {
app_school_principal: '校长',
xinghuiSchoolManager: '实操教练'
}
} }
}, },
onLoad() { onLoad() {
@ -65,6 +73,48 @@
} }
}, },
methods: { methods: {
selectClick(item) {
this.showRole = false
this.chooseIdentity(item.name)
},
chooseIdentity(name) {
// let val = ''
// if(this.FormData.username=='18267103167') {
// val = ''
// }else if(this.FormData.username=='18267103168') {
// val = ''
// }else if (this.FormData.username=='18267103169'){
// val = ''
// }else {
// val = ''
// this.$store.commit('upDateIdentity', val)
// uni.reLaunch({
// url: '/pages/tabbar/examSimulation/index'
// })
// return false
// }
// if(this.FormData.username=='18267103167') {
// val = ''
// }else if(this.FormData.username=='18267103168') {
// val = ''
// }else if (this.FormData.username=='18267103169'){
// val = ''
// }else {
// val = ''
// }
if(name=='模拟器老师') {
this.$store.commit('upDateIdentity', val)
uni.reLaunch({
url: '/pages/tabbar/examSimulation/index'
})
return false
}
this.$store.commit('upDateIdentity', name)
uni.reLaunch({
url: '/pages/tabbar/statistics/index'
})
},
confirmArea(val) { confirmArea(val) {
let item = val.value[0] let item = val.value[0]
this.FormData.tenantName =item.name this.FormData.tenantName =item.name
@ -112,30 +162,26 @@
} }
}, 1000); }, 1000);
}, },
async submitFn() { async submitFn() {
if(!this.btnHighlight) return if(!this.btnHighlight) return
const {data: res} = await loginPwd(this.FormData) const {data: res} = await loginPwd(this.FormData)
this.$store.commit('update_vuex_loginInfo')
this.$store.dispatch('getUserInfo')
let val = ''
if(this.FormData.phone=='18267103167') {
val = '实操教练'
}else if(this.FormData.phone=='18267103168') {
val = '校长'
}else if (this.FormData.phone=='18267103169'){
val = '考场模拟教练'
}else {
val = '模拟器老师'
this.$store.commit('upDateIdentity', val)
uni.reLaunch({
url: '/pages/tabbar/examSimulation/index'
})
return false
this.$store.commit('update_vuex_loginInfo', res)
await this.$store.dispatch('getUserInfo')
console.log(this.role)
this.role.forEach((item)=>{
let obj = {
name: this.roleObj[item]
} }
this.$store.commit('upDateIdentity', val)
uni.reLaunch({
url: '/pages/tabbar/statistics/index'
this.list.push(obj)
}) })
if(this.list.length>1) {
this.showRole = true
}
console.log(this.list)
return
} }
} }
} }
@ -146,7 +192,7 @@
.main { .main {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background: url('../../static/images/userCenter/loginTopBg.png') no-repeat;
background: url('http://192.168.1.20:81/zhili/image/20230922/f5e2cfaf05f441c1b9f897e7dc284f1d.png') no-repeat;
background-size: 100% 360rpx; background-size: 100% 360rpx;
.u-back-top { .u-back-top {
padding: 32rpx 0 0 0; padding: 32rpx 0 0 0;

194
pages/login/loginByPhone.vue

@ -1,194 +0,0 @@
<template>
<view class="main">
<view class="u-back-top">
<view class="backBox">
<u-icon name="arrow-left" color="#333" size="28"></u-icon>
</view>
</view>
<view class="title">
<image src="@/static/images/userCenter/loginTitle.png" mode=""></image>
</view>
<view class="form">
<view class="form-item">
<view class="inputBox my">
<u--input placeholder="请输入登录账号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input>
</view>
</view>
<view class="form-item">
<view class="inputBox my">
<u--input placeholder="请输入密码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.password"></u--input>
</view>
</view>
<view class="forgetTps" @click="$u.toast('请联系管理员重置密码!')">忘记密码</view>
<view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn"> </view>
<!-- <view class="radioWrap">
<u-checkbox-group >
<u-checkbox v-model="isCheck" shape="circle" label="已阅读并同意" :labelSize="12" ></u-checkbox>
</u-checkbox-group>
<view class="privacyText">
<text>用户协议</text> <text>隐私协议</text>
</view>
</view> -->
</view>
</view>
</template>
<script>
import { getLoginCode } from '@/config/api.js'
export default {
data() {
return {
isCheck: false,
codeText: '获取验证码',
FormData: {},
codeOn: false
}
},
onLoad() {
},
computed: {
isPhone() {
return uni.$u.test.mobile(this.FormData.phone)
},
btnHighlight() {
return this.isPhone&&this.FormData.password
}
},
methods: {
//
groupChangeEnvnt(e) {
this.isCheck = e.value
console.log('是否选择协议', this.isCheck)
},
//
async goSms() {
const {
FormData
} = this
if (!FormData.phone) return this.$u.toast('请输入手机号');
if (!this.isPhone) return this.$u.toast('手机号格式有误');
if (this.codeOn) return
const data = await getLoginCode({
codeType: 1,
phone: FormData.phone,
})
console.log(data)
//
var time = 60;
var timer = setInterval(() => {
time--;
this.codeText = time + "秒后重新发送"
this.codeOn = true;
if (time == 0) {
clearInterval(timer);
this.codeText = "获取验证码";
this.codeOn = false;
}
}, 1000);
},
submitFn() {
let val = 1
if(this.FormData.phone=='18267103167') {
val = 1
}else if(this.FormData.phone=='18267103168') {
val = 2
}else {
val = 3
}
this.$store.commit('upDateIdentity', val)
uni.reLaunch({
url: '/pages/tabbar/statistics/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.main {
width: 100%;
min-height: 100vh;
background: url('../../../static/images/userCenter/loginTopBg.png') no-repeat;
background-size: 100% 360rpx;
.u-back-top {
padding: 32rpx 0 0 0;
.backBox {
padding: 24rpx;
}
}
.title {
width: 658rpx;
height: 94rpx;
margin: 130rpx auto 114rpx auto;
}
.form {
padding: 0 46rpx;
.form-item {
height: 112rpx;
background: #F4F7FF;
border-radius: 16rpx;
width: 100%;
line-height: 112rpx;
display: flex;
margin-bottom: 40rpx;
padding: 0 40rpx;
.prefix {
display: flex;
align-items: center;
font-size: 32rpx;
color: #333;
font-weight: 600;
}
.inputBox {
flex: 1;
}
.code {
color: #BBBBBB;
margin-left: 30rpx;
&.active {
color: $themC
}
}
}
.forgetTps {
font-size: 28rpx;
color: $themC;
margin-top: -20rpx;
text-align: right;
}
.loginBtn {
width: 100%;
height: 112rpx;
background: rgba(25,137,250,0.3);
border-radius: 16rpx;
text-align: center;
line-height: 112rpx;
font-size: 32rpx;
font-weight: 600;
color: #fff;
margin-top: 100rpx;
&.active {
background: rgba(25,137,250,1);
}
}
.radioWrap {
display: flex;
align-items: center;
margin-top: 40rpx;
.privacyText {
font-size: 24rpx;
color: #888E94;
text {
color: $themC;
}
}
}
}
}
</style>

17
pages/tabbar/appointmenRecord/index.vue

@ -1,17 +0,0 @@
<template>
<view class="pageBgImg">
预约记录
<UserTab name ='预约记录'></UserTab>
</view>
</template>
<script>
export default {
onShow() {
uni.hideTabBar()
}
}
</script>
<style>
</style>

5
pages/tabbar/examSimulation/index.vue

@ -19,7 +19,10 @@
return { return {
} }
}
},
onShow() {
uni.hideTabBar();
},
} }
</script> </script>

5
pages/tabbar/statistics/index.vue

@ -21,7 +21,10 @@
return { return {
} }
}
},
onShow() {
uni.hideTabBar();
},
} }
</script> </script>

70
pages/userCenter/teachingData/teachingData.vue

@ -5,7 +5,7 @@
<view class="h3">专属您的</view> <view class="h3">专属您的</view>
<view class="h4">教学数据</view> <view class="h4">教学数据</view>
</view> </view>
<view class="pad">
<view class="pad" id="app">
<view class="card"> <view class="card">
<view class="top_row"> <view class="top_row">
<view class="topItem"> <view class="topItem">
@ -50,11 +50,77 @@
<view class="txt">平均拿证时间</view> <view class="txt">平均拿证时间</view>
<view class="num">47</view> <view class="num">47</view>
</view> </view>
<view class="btnBorder">立即分享</view>
<!-- <view class="btnBorder" @click="shareClick">立即分享</view>
<canvas canvas-id="canvas" style="width: 300px; height: 300px;opacity: 0;" class="canvas">3333</canvas>
<view class="img" style="width: 300px; height: 300px;">
<image :src="shareImageUrl" mode=""></image>
</view> -->
</view> </view>
</template> </template>
<script> <script>
export default {
data() {
return {
shareImageUrl: ''
}
},
mounted() {
this.$nextTick(()=>{
setTimeout(()=>{
this.getCanvas()
},2000)
})
},
methods: {
shareClick() {
},
getCanvas() {
let _this = this
// Canvas
const canvas = uni.createCanvasContext('canvas', this);
//
canvas.setFontSize(20);
canvas.fillText('Hello, Canvas!', 50, 50);
//
canvas.draw(true, () => {
uni.canvasToTempFilePath({
canvasId: 'canvas',
fileType: 'png',
success: (res) => {
console.log('截屏成功', res.tempFilePath);
_this.shareImageUrl = res.tempFilePath
// uni.previewImage({
// urls: [res.tempFilePath]
// })
uni.showShareMenu({
withShareTicket: true,
success: () => {
uni.showShareImageMenu({
path: _this.shareImageUrl,
success: (res) => {
console.log('分享成功', res)
},
fail: (error) => {
console.log('分享失败', error)
}
})
}
})
},
fail: (err) => {
console.log('截屏失败', err);
}
}, this);
});
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

BIN
static/images/bigImg/indexTopBanner.png

Before

Width: 750  |  Height: 492  |  Size: 394 KiB

BIN
static/images/bigImg/topPageBg.png

Before

Width: 750  |  Height: 324  |  Size: 5.0 KiB

BIN
static/images/logo.png

Before

Width: 100  |  Height: 100  |  Size: 10 KiB

After

Width: 72  |  Height: 72  |  Size: 3.9 KiB

BIN
static/images/userCenter/loginTopBg.png

Before

Width: 375  |  Height: 180  |  Size: 36 KiB

BIN
static/images/登录流程切图/__MACOSX/登录流程切图/._.DS_Store

BIN
static/images/登录流程切图/__MACOSX/登录流程切图/._btn_1.png

BIN
static/images/登录流程切图/登录流程切图/.DS_Store

BIN
static/images/登录流程切图/登录流程切图/bg_1.png

Before

Width: 375  |  Height: 180  |  Size: 36 KiB

BIN
static/images/登录流程切图/登录流程切图/btn_1.png

Before

Width: 16  |  Height: 16  |  Size: 461 B

BIN
static/images/登录流程切图/登录流程切图/btn_2.png

Before

Width: 16  |  Height: 16  |  Size: 567 B

BIN
static/images/登录流程切图/登录流程切图/title_1.png

Before

Width: 329  |  Height: 47  |  Size: 8.8 KiB

BIN
static/logo.png

Before

Width: 72  |  Height: 72  |  Size: 3.9 KiB

2
store/index.js

@ -1,6 +1,5 @@
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import add from './modules/add';
import user from './modules/user'; import user from './modules/user';
import getters from './getters'; import getters from './getters';
@ -82,7 +81,6 @@ const store = new Vuex.Store({
}, },
modules: { modules: {
add,
user, user,
}, },
}); });

91
store/modules/add.js

@ -1,91 +0,0 @@
// import addApi from '@/api/add.js'; // 引入
const add = {
state: {
addList: []
},
mutations: {
// 更新广告列表
upDateAddList(state, list) {
state.addList = list
},
// 更新当前广告点击量
upDateViews(state, id) {
let add = state.addList.find(item=>item.id==id)
add.clicks ++
},
},
actions: {
// 点击广告
async addClick({commit, dispatch}, curAdd) {
// await dispatch('updateStatistics')
curAdd.clicks ++
if(!curAdd.adBannerDO.jumpUrl) {
return false
}
commit('updateWebVeiwUrl', curAdd.adBannerDO.jumpUrl)
uni.navigateTo({
url:'/pages/commeWebView/addWebView'
})
},
// 获取当前广告
getCurrentAdd({state},id) {
console.log(id)
console.log(state.addList)
let curAdd = state.addList.find(item=>item.id==id)
if(curAdd) {
curAdd.views ++
return curAdd
}else {
return {}
}
},
// // 广告
// async addPageFn({commit,state, dispatch}) {
// await dispatch('updateStatistics')
// let obj = {
// pageNo: 1,
// pageSize: 30,
// adClient: 1
// }
// const [err, res] = await addApi.addPage(obj)
// let list = res.data.records.map(item=>{
// item.views = 0
// item.clicks = 0
// return item
// })
// commit('upDateAddList', list)
// console.log('广告列表')
// console.log(list)
// },
// 更新广告点击量
async updateStatistics({ dispatch,state, commit }) {
let statistics = state.addList.filter(item=>item.views)
console.log('调用更新广告接口')
if(statistics.length) {
let stcsList = statistics.map(add=>{
let obj = {
"adPositionId": add.id,
"adId": add.adId,
"views": add.views,
"clicks": add.clicks
}
return obj
})
const [err, res] = await addApi.batchUpdate(stcsList)
console.log('更新广告点击量请求结果')
console.log(res)
}
}
}
}
export default add

4
store/modules/user.js

@ -50,7 +50,7 @@ const user = {
async getUserInfo({commit}) { async getUserInfo({commit}) {
const http = uni.$u.http const http = uni.$u.http
let config = { custom: { auth: false }, header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'} } let config = { custom: { auth: false }, header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'} }
const res = await http.get('system/user/profile/get',config)
const res = await http.get('system/auth/get-permission-info-app',config)
commit('update_vuex_userInfo',res.data) commit('update_vuex_userInfo',res.data)
}, },
// 刷新token // 刷新token
@ -58,7 +58,7 @@ const user = {
const http = uni.$u.http const http = uni.$u.http
let config = { header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}, custom: { noToken: true } } let config = { header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}, custom: { noToken: true } }
let refreshToken = state.vuex_loginInfo.refreshToken let refreshToken = state.vuex_loginInfo.refreshToken
const res = await http.post('member/auth/refresh-token',{refreshToken}, config)
const res = await http.post('system/auth/refresh-token',{refreshToken}, config)
console.log('刷新token结果') console.log('刷新token结果')
console.log(res) console.log(res)
commit('update_vuex_loginInfo',res.data) commit('update_vuex_loginInfo',res.data)

Loading…
Cancel
Save