main
parent
72d7f19b2f
commit
5855dd35d4
|
|
@ -120,7 +120,7 @@ const position = ref({})
|
||||||
const newTime = ref('')
|
const newTime = ref('')
|
||||||
const detail = ref({})
|
const detail = ref({})
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
time: 1,
|
time: null,
|
||||||
type: 1,
|
type: 1,
|
||||||
remarks: '',
|
remarks: '',
|
||||||
sign_time: '',
|
sign_time: '',
|
||||||
|
|
@ -178,8 +178,8 @@ const initLo = async () => {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
detail.value = resdata
|
detail.value = resdata
|
||||||
// form.type = resdata.type
|
form.time = resdata.time || 1
|
||||||
form.sign_time = timeList.value[0].find((e) => e.value == resdata.time)?.name
|
form.sign_time = timeList.value[0].find((e) => e.value == form.time)?.name
|
||||||
}
|
}
|
||||||
|
|
||||||
const openPicker = () => {
|
const openPicker = () => {
|
||||||
|
|
@ -187,11 +187,16 @@ const openPicker = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const clockIn = async () => {
|
const clockIn = async () => {
|
||||||
|
if (!form.time) {
|
||||||
|
return uni.showToast({ title: '请选择打卡时间', icon: 'none' })
|
||||||
|
}
|
||||||
if (form.type == 2 && !form.remarks) {
|
if (form.type == 2 && !form.remarks) {
|
||||||
return uni.showToast({ title: '请填写外勤事由', icon: 'none' })
|
return uni.showToast({ title: '请填写外勤事由', icon: 'none' })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loading.value) return
|
if (loading.value) return
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await http.post('/hr/sign', {
|
await http.post('/hr/sign', {
|
||||||
time: form.time,
|
time: form.time,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<CuNavbar title="培训考试"></CuNavbar>
|
<CuNavbar title="培训考试"></CuNavbar>
|
||||||
<MescrollItem :top="88" :i="0" apiUrl="/train/examinations">
|
<MescrollItem ref="mescrollItem" :top="88" :i="0" apiUrl="/train/examinations">
|
||||||
<template v-slot="{ list }">
|
<template v-slot="{ list }">
|
||||||
<view class="space-y-15rpx p-base">
|
<view class="space-y-15rpx p-base">
|
||||||
<template v-for="item in list" :key="item.id">
|
<template v-for="item in list" :key="item.id">
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
:i="0"
|
:i="0"
|
||||||
:index="tabIndex"
|
:index="tabIndex"
|
||||||
:apiUrl="tabList[0].apiUrl"
|
:apiUrl="tabList[0].apiUrl"
|
||||||
|
:params="tabList[0].params"
|
||||||
>
|
>
|
||||||
<template v-slot="{ list }">
|
<template v-slot="{ list }">
|
||||||
<view class="space-y-15rpx p-base">
|
<view class="space-y-15rpx p-base">
|
||||||
|
|
|
||||||
|
|
@ -16,32 +16,7 @@ export default function () {
|
||||||
appVersion: appVersion,
|
appVersion: appVersion,
|
||||||
wgtVersion: widgetInfo.version
|
wgtVersion: widgetInfo.version
|
||||||
};
|
};
|
||||||
http.get('/latest-app-versions').then(res => {
|
http.get('/latest-app-versions').then(resData => {
|
||||||
// console.log(res);
|
|
||||||
const resData = {
|
|
||||||
"android": {
|
|
||||||
"name": "v1.0.2",
|
|
||||||
"version": 102,
|
|
||||||
"title": "v.1.0.2",
|
|
||||||
"description": "1.xxx\n2.bbb",
|
|
||||||
"update_strategy": "wgt",
|
|
||||||
"is_force": true,
|
|
||||||
"apk_url": "http://localhost/storage/app-versions/v1.0.2_1714479188.apk",
|
|
||||||
"wgt_url": "http://localhost/storage/app-versions/v1.0.2_1714479188.wgt",
|
|
||||||
"release_at": 1714479289
|
|
||||||
},
|
|
||||||
"ios": {
|
|
||||||
"name": "v2.0.0",
|
|
||||||
"version": 200,
|
|
||||||
"title": "v2.0.0",
|
|
||||||
"description": "1.xxx\n2.bbb\n3.ccc",
|
|
||||||
"update_strategy": "apk",
|
|
||||||
"is_force": true,
|
|
||||||
"apk_url": "http://baidu.com",
|
|
||||||
"wgt_url": "http://localhost/storage/app-versions/v1.0.0_100_ios.wgt",
|
|
||||||
"release_at": 1714479106
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// _id : string
|
// _id : string
|
||||||
// appid : string
|
// appid : string
|
||||||
|
|
@ -65,26 +40,29 @@ export default function () {
|
||||||
// min_uni_version : string | null // 升级 wgt 的最低 uni-app 版本
|
// min_uni_version : string | null // 升级 wgt 的最低 uni-app 版本
|
||||||
|
|
||||||
const info = resData[systemInfo.platform];
|
const info = resData[systemInfo.platform];
|
||||||
console.log(info);
|
let resInfo = null
|
||||||
const resInfo = {
|
if (info == null) {
|
||||||
name: info.name,
|
resInfo = {
|
||||||
title: info.title,
|
code: 0
|
||||||
contents: info.description,
|
}
|
||||||
url: info.apk_url || info.wgt_url,
|
} else {
|
||||||
platform: systemInfo.platform,
|
resInfo = {
|
||||||
version: info.version,
|
name: info.name,
|
||||||
uni_platform: systemInfo.platform,
|
title: info.title,
|
||||||
stable_publish: true,
|
contents: info.description,
|
||||||
is_mandatory: info.is_force,
|
url: info.update_strategy === 'wgt' ? info.wgt_url : info.apk_url,
|
||||||
//静默更新
|
platform: systemInfo.platform,
|
||||||
is_silently: false,
|
version: info.version,
|
||||||
//101 wgt更新
|
uni_platform: systemInfo.platform,
|
||||||
//102 apk更新
|
stable_publish: true,
|
||||||
// 0 无更新
|
is_mandatory: info.is_force,
|
||||||
type: info.update_strategy,
|
is_silently: false,
|
||||||
// code: info.update_strategy === 'wgt' ? 101 : 102
|
type: info.update_strategy,
|
||||||
code: 0
|
code: info.update_strategy === 'wgt' ? 101 : 102
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
resolve(resInfo);
|
resolve(resInfo);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ export default function () {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
callCheckVersion().then(async (uniUpgradeCenterResult) => {
|
callCheckVersion().then(async (uniUpgradeCenterResult) => {
|
||||||
console.log('uniUpgradeCenterResult', uniUpgradeCenterResult);
|
|
||||||
|
|
||||||
const code = uniUpgradeCenterResult.code;
|
const code = uniUpgradeCenterResult.code;
|
||||||
const message = uniUpgradeCenterResult.message;
|
const message = uniUpgradeCenterResult.message;
|
||||||
const url = uniUpgradeCenterResult.url;
|
const url = uniUpgradeCenterResult.url;
|
||||||
|
|
@ -43,7 +41,6 @@ export default function () {
|
||||||
|
|
||||||
return resolve(uniUpgradeCenterResult);
|
return resolve(uniUpgradeCenterResult);
|
||||||
} else if (code < 0) {
|
} else if (code < 0) {
|
||||||
console.error(message);
|
|
||||||
return reject(uniUpgradeCenterResult);
|
return reject(uniUpgradeCenterResult);
|
||||||
}
|
}
|
||||||
return resolve(uniUpgradeCenterResult);
|
return resolve(uniUpgradeCenterResult);
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 44 KiB |
|
|
@ -53,3 +53,6 @@ $uv-info-light: #f4f4f5;
|
||||||
.uv-modal__content__text{
|
.uv-modal__content__text{
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
}
|
}
|
||||||
|
.uv-textarea__field{
|
||||||
|
font-size: 14px !important;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue