0414-2
This commit is contained in:
parent
294ab2ace0
commit
83694623ce
@ -164,8 +164,9 @@
|
|||||||
background-color: rgba(255, 239, 229, 1);
|
background-color: rgba(255, 239, 229, 1);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
//height: 36rpx;
|
//height: 36rpx;
|
||||||
width: 52rpx;
|
// width: 52rpx;
|
||||||
//margin: 48rpx 86rpx 0 -138rpx;
|
//margin: 48rpx 86rpx 0 -138rpx;
|
||||||
|
padding: 0 5rpx;
|
||||||
.text_6 {
|
.text_6 {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
.page {
|
.page {
|
||||||
background-color: rgba(242, 244, 248, 1);
|
background-color: rgba(242, 244, 248, 1);
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 750rpx;
|
width: 100%;
|
||||||
height: 1624rpx;
|
max-width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
.block_1 {
|
.block_1 {
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
width: 750rpx;
|
width: 100%;
|
||||||
height: 92rpx;
|
max-width: 100vw;
|
||||||
|
height: 92rpx;
|
||||||
.image_1 {
|
.image_1 {
|
||||||
width: 64rpx;
|
width: 64rpx;
|
||||||
height: 36rpx;
|
height: 36rpx;
|
||||||
@ -32,11 +34,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.block_2 {
|
.block_2 {
|
||||||
width: 750rpx;
|
flex: 1;
|
||||||
height: 1414rpx;
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.scroll-view {
|
||||||
|
flex: 1;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
.box_3 {
|
.box_3 {
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
width: 750rpx;
|
width: 100%;
|
||||||
|
max-width: 100vw;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
justify-content: flex-center;
|
justify-content: flex-center;
|
||||||
.label_1 {
|
.label_1 {
|
||||||
@ -412,7 +423,9 @@
|
|||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
margin-top: -2rpx;
|
margin-top: -2rpx;
|
||||||
width: 750rpx;
|
width: 100%;
|
||||||
|
max-width: 100vw;
|
||||||
|
flex-shrink: 0;
|
||||||
.text-wrapper_8 {
|
.text-wrapper_8 {
|
||||||
background-color: rgba(4, 78, 242, 1);
|
background-color: rgba(4, 78, 242, 1);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
</headers>
|
</headers>
|
||||||
</view>
|
</view>
|
||||||
<view class="block_2 flex-col">
|
<view class="block_2 flex-col">
|
||||||
<view>
|
|
||||||
<scroll-view
|
<scroll-view
|
||||||
class="scroll-view"
|
class="scroll-view"
|
||||||
scroll-y
|
scroll-y
|
||||||
@ -55,7 +54,6 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="block_8 flex-col">
|
<view class="block_8 flex-col">
|
||||||
<view class="text-wrapper_8 flex-col" @click="onEnterScoreClick()">
|
<view class="text-wrapper_8 flex-col" @click="onEnterScoreClick()">
|
||||||
@ -310,7 +308,7 @@ export default {
|
|||||||
// 获取屏幕高度
|
// 获取屏幕高度
|
||||||
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
const screenHeight = uni.getSystemInfoSync().windowHeight;
|
||||||
// 获取顶部区域高度
|
// 获取顶部区域高度
|
||||||
const topHeight = 160;
|
const topHeight = 88;
|
||||||
// 计算滚动区域高度
|
// 计算滚动区域高度
|
||||||
this.scrollHeight = screenHeight - topHeight;
|
this.scrollHeight = screenHeight - topHeight;
|
||||||
},
|
},
|
||||||
|
@ -153,7 +153,8 @@
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
params:{
|
params:{
|
||||||
pageNo:this.pageNo,
|
pageNo:this.pageNo,
|
||||||
pageSize:this.pageSize
|
pageSize:this.pageSize,
|
||||||
|
systemCode: this.systemCode,
|
||||||
},
|
},
|
||||||
tenantIdFlag:false
|
tenantIdFlag:false
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
@ -59,9 +59,18 @@
|
|||||||
import SchoolInfo from './SchoolInfo.vue';
|
import SchoolInfo from './SchoolInfo.vue';
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
import {
|
import {
|
||||||
|
getCoachId,
|
||||||
|
getInviteId,
|
||||||
getLocalUserInfo,
|
getLocalUserInfo,
|
||||||
getToken,
|
getToken,
|
||||||
setLocalUserInfo
|
removeCoachId,
|
||||||
|
removeInviteId,
|
||||||
|
removeTenantId,
|
||||||
|
setCoachId,
|
||||||
|
setInviteId,
|
||||||
|
setLocalUserInfo,
|
||||||
|
setStaffType,
|
||||||
|
setTenantId
|
||||||
} from '@/utils/auth'
|
} from '@/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -97,24 +106,84 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
imageUrl: this.$imagesUrl,
|
imageUrl: this.$imagesUrl,
|
||||||
textList:[]
|
textList:[],
|
||||||
|
qTenantId: null,
|
||||||
|
qCoachId: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(query) {
|
||||||
this.getList()
|
// setInviteId('JLPXF1')
|
||||||
|
// this.getTenantIdByInviteId()
|
||||||
this.getSwiperList()
|
this.getSwiperList()
|
||||||
this.getTextList()
|
this.getTextList()
|
||||||
|
|
||||||
|
const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
|
||||||
|
let theRequest = this.getUrlValue(q)
|
||||||
|
if(theRequest.hasOwnProperty("inviteId")){
|
||||||
|
//扫码邀请过来的,设置邀请者code
|
||||||
|
setInviteId(theRequest['inviteId'])
|
||||||
|
this.getTenantIdByInviteId()
|
||||||
|
//先登录
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
removeInviteId()
|
||||||
|
removeCoachId()
|
||||||
|
removeTenantId()
|
||||||
|
/* uni.reLaunch({
|
||||||
|
url: '/pages-home/home/home'
|
||||||
|
}) */
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getTenantIdByInviteId(){
|
||||||
|
console.log('1122', getInviteId())
|
||||||
|
if(!getInviteId()){
|
||||||
|
console.log(1)
|
||||||
|
this.getList()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/app-api/dl-drive-school-coach-small/getCoachByUniqueCode',
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
uniqueCode: getInviteId()
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
console.log(123)
|
||||||
|
if(res.data != null){
|
||||||
|
this.qTenantId = res.data.tenantId
|
||||||
|
this.qCoachId = res.data.userId
|
||||||
|
setTenantId(res.data.tenantId)
|
||||||
|
this.getList()
|
||||||
|
if(res.data.type == 'jl'){
|
||||||
|
setCoachId(res.data.userId)
|
||||||
|
setStaffType('02')
|
||||||
|
}
|
||||||
|
if(res.data.type == 'yg'){
|
||||||
|
setCoachId(res.data.userId)
|
||||||
|
setStaffType('01')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getList() {
|
getList() {
|
||||||
|
const params = {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
serviceCodes: 'jiaxiao',
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.qTenantId) {
|
||||||
|
params.tenantId = this.qTenantId;
|
||||||
|
}
|
||||||
|
console.log('params', params)
|
||||||
request({
|
request({
|
||||||
url: '/userClient/base/companySmallProgram/pageNoTenantId',
|
url: '/userClient/base/companySmallProgram/pageNoTenantId',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: params,
|
||||||
pageNo: this.pageNo,
|
|
||||||
pageSize: this.pageSize,
|
|
||||||
serviceCodes: 'jiaxiao'
|
|
||||||
},
|
|
||||||
tenantIdFlag: false
|
tenantIdFlag: false
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
res.data.records.forEach(item => {
|
res.data.records.forEach(item => {
|
||||||
@ -123,8 +192,22 @@ export default {
|
|||||||
})
|
})
|
||||||
this.schoolList = this.schoolList.concat(res.data.records)
|
this.schoolList = this.schoolList.concat(res.data.records)
|
||||||
this.isTriggered = false
|
this.isTriggered = false
|
||||||
|
this.total = res.data.total
|
||||||
|
console.log(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getUrlValue(url) {
|
||||||
|
var theRequest = new Object();
|
||||||
|
if (url.indexOf("?") != -1) {
|
||||||
|
//有参数
|
||||||
|
var str = url.split("?")[1];
|
||||||
|
var strs = str.split("&");
|
||||||
|
for (var i = 0; i < strs.length; i++) {
|
||||||
|
theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return theRequest
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 实时讯息
|
* 实时讯息
|
||||||
*/
|
*/
|
||||||
@ -139,6 +222,7 @@ export default {
|
|||||||
})
|
})
|
||||||
// this.textList = res.data.records
|
// this.textList = res.data.records
|
||||||
// 将textList中的title拼接成数组赋值给textList
|
// 将textList中的title拼接成数组赋值给textList
|
||||||
|
this.textList = []
|
||||||
res.data.records.forEach(item => {
|
res.data.records.forEach(item => {
|
||||||
this.textList.push(item.title)
|
this.textList.push(item.title)
|
||||||
})
|
})
|
||||||
|
@ -30,10 +30,11 @@
|
|||||||
<view class="bm-page-info-title">
|
<view class="bm-page-info-title">
|
||||||
选择教练
|
选择教练
|
||||||
</view>
|
</view>
|
||||||
<view class="d-s" @click="showjl = true">
|
<view class="d-s" @click="!jlId && (showjl = true)"
|
||||||
|
:style="{color: jlId ? '#999' : '', pointerEvents: jlId ? 'none' : ''}">
|
||||||
<view class="" v-if="!jlName">请选择</view>
|
<view class="" v-if="!jlName">请选择</view>
|
||||||
<view class="" v-else>{{ jlName }}</view>
|
<view class="" v-else>{{ jlName }}</view>
|
||||||
<u-icon name="arrow-right" size="16"></u-icon>
|
<u-icon name="arrow-right" size="16" :color="jlId ? '#999' : ''"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -154,7 +155,7 @@ import headers from '../../components/header/headers.vue'
|
|||||||
import request from '@/utils/request.js'
|
import request from '@/utils/request.js'
|
||||||
import tabbar from '../../components/tabbar/tabbar.vue'
|
import tabbar from '../../components/tabbar/tabbar.vue'
|
||||||
import upload from '@/utils/upload.js'
|
import upload from '@/utils/upload.js'
|
||||||
import {getLocalUserInfo,getToken} from '../../utils/auth'
|
import {getCoachId, getLocalUserInfo,getStaffType,getToken} from '../../utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -207,6 +208,8 @@ export default {
|
|||||||
payStatus: null,
|
payStatus: null,
|
||||||
oldOrderDetails: [],
|
oldOrderDetails: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
|
localStaffType: null,
|
||||||
|
localCoachId: null,
|
||||||
columns: [
|
columns: [
|
||||||
[{
|
[{
|
||||||
label: '全款',
|
label: '全款',
|
||||||
@ -233,6 +236,8 @@ export default {
|
|||||||
this.userId = option.userId,
|
this.userId = option.userId,
|
||||||
this.tenantId = option.tenantId
|
this.tenantId = option.tenantId
|
||||||
this.userinfo = getLocalUserInfo()
|
this.userinfo = getLocalUserInfo()
|
||||||
|
this.localStaffType = getStaffType()
|
||||||
|
this.localCoachId = getCoachId()
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getListAll()
|
this.getListAll()
|
||||||
@ -281,20 +286,59 @@ export default {
|
|||||||
async getListAll() {
|
async getListAll() {
|
||||||
this.columnjl = []
|
this.columnjl = []
|
||||||
let res = await request({
|
let res = await request({
|
||||||
url: '/app-api/dl-drive-school-coach-small/list',
|
url: '/app-api/dl-drive-school-coach-small/queryCoachByCourseId',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: {
|
||||||
tenantId: this.tenantId,
|
courseId: this.courseId,
|
||||||
},
|
},
|
||||||
tenantIdFlag: false
|
tenantIdFlag: false
|
||||||
})
|
})
|
||||||
|
console.log('data',res.data)
|
||||||
|
|
||||||
|
// 过滤数据,只保留subject为2或3的教练
|
||||||
|
const filteredData = res.data.filter(coach =>
|
||||||
|
coach.subject === '2' || coach.subject === '3'
|
||||||
|
);
|
||||||
|
|
||||||
this.columnjl = [
|
this.columnjl = [
|
||||||
res.data.map(coach => ({
|
filteredData.map(coach => ({
|
||||||
label: coach.name,
|
label: coach.coachName,
|
||||||
value: coach
|
value: coach
|
||||||
}))
|
}))
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (this.localStaffType === '02' && this.localCoachId) {
|
||||||
|
console.log('123123',this.localStaffType)
|
||||||
|
console.log('321321', this.localCoachId)
|
||||||
|
console.log('coach', filteredData)
|
||||||
|
const defaultCoach = filteredData.find(coach =>
|
||||||
|
String(coach.coachId) === String(this.localCoachId)
|
||||||
|
);
|
||||||
|
console.log('111222333', defaultCoach)
|
||||||
|
if (defaultCoach) {
|
||||||
|
this.jlName = defaultCoach.coachName;
|
||||||
|
this.jlId = defaultCoach.coachId;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* async getListAll() {
|
||||||
|
this.columnjl = []
|
||||||
|
let res = await request({
|
||||||
|
url: '/app-api/dl-drive-school-coach-small/list',
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
tenantId: this.tenantId,
|
||||||
|
},
|
||||||
|
tenantIdFlag: false
|
||||||
|
})
|
||||||
|
this.columnjl = [
|
||||||
|
res.data.map(coach => ({
|
||||||
|
label: coach.name,
|
||||||
|
value: coach
|
||||||
|
}))
|
||||||
|
];
|
||||||
|
}, */
|
||||||
getsexindex(index) {
|
getsexindex(index) {
|
||||||
this.sex = index
|
this.sex = index
|
||||||
},
|
},
|
||||||
@ -307,6 +351,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 选择教练
|
// 选择教练
|
||||||
jlconfirm(e) {
|
jlconfirm(e) {
|
||||||
|
console.log('e', e)
|
||||||
this.jlName = e.value[0].label; // 显示名称
|
this.jlName = e.value[0].label; // 显示名称
|
||||||
this.jlId = e.value[0].value.userId; // 获取教练ID
|
this.jlId = e.value[0].value.userId; // 获取教练ID
|
||||||
this.showjl = false;
|
this.showjl = false;
|
||||||
@ -494,8 +539,8 @@ export default {
|
|||||||
money: this.rightInfoList.price,
|
money: this.rightInfoList.price,
|
||||||
indent: this.identity,
|
indent: this.identity,
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
time: this.getCurrentDateTime()
|
time: this.getCurrentDateTime(),
|
||||||
|
endTime: this.getEndTime(),
|
||||||
};
|
};
|
||||||
/* uni.navigateTo({
|
/* uni.navigateTo({
|
||||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
||||||
@ -781,10 +826,10 @@ export default {
|
|||||||
url: '/app-api/small-upload/common/upload',
|
url: '/app-api/small-upload/common/upload',
|
||||||
filePath: e,
|
filePath: e,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.sfzimg = this.baseUrl + '/' + res.data.url
|
this.sfzimg = res.data.url
|
||||||
|
|
||||||
if (this.sfzimg) {
|
if (this.sfzimg) {
|
||||||
this.idOcr(this.sfzimg)
|
this.idOcr(this.baseUrl + '/' + this.sfzimg)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@ -835,9 +880,14 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 如果选择了教练,添加source和sourceUserId
|
// 如果选择了教练,添加source和sourceUserId
|
||||||
if (this.jlId) {
|
if (this.localCoachId && this.localStaffType == '01') {
|
||||||
|
studentData.source = '01';
|
||||||
|
studentData.sourceUserId = getCoachId(); // 设置来源用户ID为员工ID
|
||||||
|
}else if (this.localCoachId && this.localStaffType == '02') {
|
||||||
studentData.source = '02';
|
studentData.source = '02';
|
||||||
studentData.sourceUserId = this.jlId; // 设置来源用户ID为教练ID
|
studentData.sourceUserId = getCoachId(); // 设置来源用户ID为教练ID
|
||||||
|
}else{
|
||||||
|
studentData.source = '03'; // 自来客户
|
||||||
}
|
}
|
||||||
|
|
||||||
request({
|
request({
|
||||||
@ -933,13 +983,29 @@ export default {
|
|||||||
money: this.payPrice,
|
money: this.payPrice,
|
||||||
indent: this.identity,
|
indent: this.identity,
|
||||||
phone: this.phone,
|
phone: this.phone,
|
||||||
time: this.getCurrentDateTime()
|
time: this.getCurrentDateTime(),
|
||||||
|
endTime: this.getEndTime(),
|
||||||
};
|
};
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
url: '/pages/index/contract?data=' + encodeURIComponent(JSON.stringify(contractData))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 获取三年后的时间
|
||||||
|
getEndTime() {
|
||||||
|
const now = new Date();
|
||||||
|
now.setFullYear(now.getFullYear() + 3); // 加三年
|
||||||
|
|
||||||
|
const year = now.getFullYear();
|
||||||
|
const month = String(now.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(now.getDate()).padStart(2, '0');
|
||||||
|
const hours = String(now.getHours()).padStart(2, '0');
|
||||||
|
const minutes = String(now.getMinutes()).padStart(2, '0');
|
||||||
|
const seconds = String(now.getSeconds()).padStart(2, '0');
|
||||||
|
|
||||||
|
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||||
|
},
|
||||||
|
|
||||||
// 获取订单状态
|
// 获取订单状态
|
||||||
async getPayStatus(orderId) {
|
async getPayStatus(orderId) {
|
||||||
const res = await request({
|
const res = await request({
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
import headers from "@/components/header/headers.vue";
|
import headers from "@/components/header/headers.vue";
|
||||||
import SchoolInfo from '../newIndex/SchoolInfo.vue';
|
import SchoolInfo from '../newIndex/SchoolInfo.vue';
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
|
import { getTenantId } from "../../utils/auth";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -43,14 +44,20 @@ export default {
|
|||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
const params = {
|
||||||
|
pageNo: this.pageNo,
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
serviceCodes: 'jiaxiao',
|
||||||
|
};
|
||||||
|
if (getTenantId()) {
|
||||||
|
console.log(getTenantId())
|
||||||
|
params.tenantId = getTenantId();
|
||||||
|
}
|
||||||
|
|
||||||
request({
|
request({
|
||||||
url: '/userClient/base/companySmallProgram/pageNoTenantId',
|
url: '/userClient/base/companySmallProgram/pageNoTenantId',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: {
|
params: params,
|
||||||
pageNo: this.pageNo,
|
|
||||||
pageSize: this.pageSize,
|
|
||||||
serviceCodes: 'jiaxiao'
|
|
||||||
}
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
res.data.records.forEach(item => {
|
res.data.records.forEach(item => {
|
||||||
item.features = ['有接送', '规模大']
|
item.features = ['有接送', '规模大']
|
||||||
|
@ -140,7 +140,7 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/newPages/newIndex/index'
|
url: '/newPages/newIndex/index'
|
||||||
})
|
})
|
||||||
}, 3000); // 3000毫秒即为3秒
|
}, 2600); // 3000毫秒即为3秒
|
||||||
|
|
||||||
// const index = e.lastIndexOf("/")
|
// const index = e.lastIndexOf("/")
|
||||||
// let fileName = e.substring(index + 1, e.length)
|
// let fileName = e.substring(index + 1, e.length)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
const TokenKey = 'App-Token'
|
const TokenKey = 'App-Token'
|
||||||
const TenantIdKey = 'TENANT_ID'
|
const TenantIdKey = 'TENANT_ID'
|
||||||
const userInfo = 'userInfo'
|
const userInfo = 'userInfo'
|
||||||
|
const InviteIdKey = 'INVITE_ID'
|
||||||
|
const CoachIdKey = 'COACH_ID'
|
||||||
|
const StaffTypeKey = 'STAFF_TYPE'
|
||||||
|
|
||||||
export function getToken() {
|
export function getToken() {
|
||||||
return uni.getStorageSync(TokenKey)
|
return uni.getStorageSync(TokenKey)
|
||||||
@ -22,6 +25,10 @@ export function getTenantId(){
|
|||||||
return uni.getStorageSync(TenantIdKey)
|
return uni.getStorageSync(TenantIdKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function removeTenantId(){
|
||||||
|
return uni.removeStorageSync(TenantIdKey)
|
||||||
|
}
|
||||||
|
|
||||||
export function setLocalUserInfo(userinfo){
|
export function setLocalUserInfo(userinfo){
|
||||||
return uni.setStorageSync(userInfo,userinfo)
|
return uni.setStorageSync(userInfo,userinfo)
|
||||||
}
|
}
|
||||||
@ -30,6 +37,36 @@ export function getLocalUserInfo() {
|
|||||||
return uni.getStorageSync(userInfo)
|
return uni.getStorageSync(userInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function setInviteId(InviteId) {
|
||||||
|
return uni.setStorageSync(InviteIdKey, InviteId);
|
||||||
|
}
|
||||||
|
export function getInviteId(){
|
||||||
|
return uni.getStorageSync(InviteIdKey)
|
||||||
|
}
|
||||||
|
export function removeInviteId(){
|
||||||
|
return uni.removeStorageSync(InviteIdKey)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setCoachId(CoachId) {
|
||||||
|
return uni.setStorageSync(CoachIdKey, CoachId);
|
||||||
|
}
|
||||||
|
export function getCoachId(){
|
||||||
|
return uni.getStorageSync(CoachIdKey)
|
||||||
|
}
|
||||||
|
export function removeCoachId(){
|
||||||
|
return uni.removeStorageSync(CoachIdKey)
|
||||||
|
}
|
||||||
|
// 员工为01,教练为02
|
||||||
|
export function setStaffType(StaffType) {
|
||||||
|
return uni.setStorageSync(StaffTypeKey, StaffType);
|
||||||
|
}
|
||||||
|
export function getStaffType(){
|
||||||
|
return uni.getStorageSync(StaffTypeKey)
|
||||||
|
}
|
||||||
|
export function removeStaffType(){
|
||||||
|
return uni.removeStorageSync(StaffTypeKey)
|
||||||
|
}
|
||||||
|
|
||||||
// 设置本地存储,并设置一个过期时间(单位为秒)
|
// 设置本地存储,并设置一个过期时间(单位为秒)
|
||||||
export function setStorageWithExpiry(key, value, ttl) {
|
export function setStorageWithExpiry(key, value, ttl) {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
Loading…
Reference in New Issue
Block a user