|
|
@@ -18,7 +18,7 @@ import { bigRingRadius, getBgRing, getCommon, getDot, getSchedule, ringWidth, sm
|
|
|
import { RealRing, CurrentDot } from "@/features/trackTimeDuration/components/Rings";
|
|
|
import IndexConsole from "@/features/trackTimeDuration/components/IndexConsole";
|
|
|
import Modal from '@/components/layout/Modal'
|
|
|
-import { rpxToPx } from "@/utils/tools";
|
|
|
+import { compareVersion, rpxToPx } from "@/utils/tools";
|
|
|
import RecordFastSleep from "@/features/trackTimeDuration/components/RecordFastSleep";
|
|
|
import DayLight from "@/features/trackTimeDuration/components/DayLight";
|
|
|
import { getInfo, latestLocation } from "@/services/user";
|
|
|
@@ -176,16 +176,21 @@ export default function Page() {
|
|
|
}
|
|
|
|
|
|
function checkAddToMini() {
|
|
|
- process.env.TARO_ENV == 'weapp' &&
|
|
|
- wx.checkIsAddedToMyMiniProgram({
|
|
|
- success: (res) => {
|
|
|
- if (!res.added) {
|
|
|
- setNeedShowAddTip(true)
|
|
|
+ if (process.env.TARO_ENV == 'weapp') {
|
|
|
+ const version = Taro.getAppBaseInfo().SDKVersion
|
|
|
+ if (compareVersion(version, '2.30.3') >= 0) {
|
|
|
+ wx.checkIsAddedToMyMiniProgram({
|
|
|
+ success: (res) => {
|
|
|
+ if (!res.added) {
|
|
|
+ setNeedShowAddTip(true)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: (e) => {
|
|
|
}
|
|
|
- },
|
|
|
- fail: (e) => {
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
useDidShow(() => {
|
|
|
@@ -664,7 +669,7 @@ export default function Page() {
|
|
|
}
|
|
|
|
|
|
{
|
|
|
- user.isLogin && !showErrorPage && <View style={{ marginTop: rpxToPx(60), display: 'flex', flexDirection: 'column' }}>
|
|
|
+ user.isLogin && !showErrorPage && <View style={{ marginTop: rpxToPx(60), display: 'flex', flexDirection: 'column' }}>
|
|
|
<Text className="discovery1" >周统计</Text>
|
|
|
<WeekCalendar />
|
|
|
</View>
|