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