|
|
@@ -9,6 +9,7 @@ import { activityCards, uploadSteps } from "@/services/trackSomething";
|
|
|
import { TimeFormatter } from "@/utils/time_format";
|
|
|
import MetricItem from "./MetricItem";
|
|
|
import { checkFail, checkStart, checkSuccess, setResult } from "@/store/action_results";
|
|
|
+import { uploadSessionKey } from "@/services/common";
|
|
|
|
|
|
export default function Component(props: any) {
|
|
|
const user = useSelector((state: any) => state.user);
|
|
|
@@ -124,11 +125,20 @@ export default function Component(props: any) {
|
|
|
getCards();
|
|
|
}).catch(e => {
|
|
|
dispatch(setResult({ isSuccess: false }) as any);
|
|
|
+ updateSessionKey();
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ function updateSessionKey(){
|
|
|
+ Taro.login().then(res => {
|
|
|
+ // code = res.code;
|
|
|
+ uploadSessionKey({ type: 'WX_MP', code: res.code });
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
function refuseAuth() {
|
|
|
// setTitle('开启');
|
|
|
setIsChecking(false)
|