|
|
@@ -99,14 +99,6 @@ export default function Component(props: any) {
|
|
|
}
|
|
|
|
|
|
function getWeRunData(autoCheck = false) {
|
|
|
- Taro.checkSession({
|
|
|
- success: function () {
|
|
|
- console.log('打卡前获取session_key 未过期')
|
|
|
- },
|
|
|
- fail: function () {
|
|
|
- console.log('打卡前获取session_key 已过期')
|
|
|
- }
|
|
|
- })
|
|
|
|
|
|
// setTitle('打卡');
|
|
|
setAllowRun(true)
|
|
|
@@ -125,7 +117,19 @@ export default function Component(props: any) {
|
|
|
cloudID: res.cloudID,
|
|
|
}
|
|
|
uploadSteps(params).then(res => {
|
|
|
- uploadSuccess(res, autoCheck, time)
|
|
|
+ if ((res as any).error_code=='WX_STEP_PARSE_FAIL'){
|
|
|
+ retry(params, autoCheck, time)
|
|
|
+ if (!autoCheck){
|
|
|
+ Taro.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:(res as any).error_message
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ uploadSuccess(res, autoCheck, time)
|
|
|
+ }
|
|
|
+
|
|
|
}).catch(e => {
|
|
|
retry(params, autoCheck, time)
|
|
|
Taro.checkSession({
|