|
|
@@ -48,14 +48,24 @@ export default function Component(props: { type?: string, data?: any, delSuccess
|
|
|
return item.code == 'follow_wx_pub'
|
|
|
})
|
|
|
|
|
|
+ const title = permission.wxPubFollow ?t('feature.track_time_duration.follow_wx_pub.h5_followed_title'):
|
|
|
+ t('feature.track_time_duration.follow_wx_pub.h5_unfollowed_title')
|
|
|
+
|
|
|
Taro.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '关注公众号后可接收提醒\n点击确定,前往关注',
|
|
|
+ title: permission.wxPubFollow ? t('feature.track_time_duration.follow_wx_pub.modal_followed_title') :
|
|
|
+ t('feature.track_time_duration.follow_wx_pub.modal_unfollowed_title'),
|
|
|
+ content: permission.wxPubFollow ? t('feature.track_time_duration.follow_wx_pub.modal_followed_content') :
|
|
|
+ t('feature.track_time_duration.follow_wx_pub.modal_unfollowed_content'),
|
|
|
showCancel: true,
|
|
|
+ cancelText: permission.wxPubFollow ? t('feature.track_time_duration.follow_wx_pub.modal_followed_cancel_btn') :
|
|
|
+ t('feature.track_time_duration.follow_wx_pub.modal_unfollowed_cancel_btn'),
|
|
|
+ confirmText: permission.wxPubFollow ? t('feature.track_time_duration.follow_wx_pub.modal_followed_confirm_btn') :
|
|
|
+ t('feature.track_time_duration.follow_wx_pub.modal_unfollowed_confirm_btn'),
|
|
|
success(result) {
|
|
|
if (result.confirm) {
|
|
|
+ global.forceRefreshWXPub = true
|
|
|
Taro.navigateTo({
|
|
|
- url: '/pages/common/H5?title=fast16cc 关注服务号&url=' + resource[0].url,
|
|
|
+ url: '/pages/common/H5?title=' + title + '&url=' + resource[0].url,
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -160,11 +170,11 @@ export default function Component(props: { type?: string, data?: any, delSuccess
|
|
|
}
|
|
|
|
|
|
function detailCenter() {
|
|
|
- if (!permission.wxPubFollow) {
|
|
|
- return <View className="tip_bg2">
|
|
|
- <Text className="tip_text2">{t('feature.track_time_duration.schedule.follow_tip')}</Text>
|
|
|
- </View>
|
|
|
- }
|
|
|
+ // if (!permission.wxPubFollow) {
|
|
|
+ // return <View className="tip_bg2">
|
|
|
+ // <Text className="tip_text2">{t('feature.track_time_duration.schedule.follow_tip')}</Text>
|
|
|
+ // </View>
|
|
|
+ // }
|
|
|
|
|
|
var nextCheckTimestamp = 0;
|
|
|
if (time.status != 'WAIT_FOR_START') {
|
|
|
@@ -242,23 +252,17 @@ export default function Component(props: { type?: string, data?: any, delSuccess
|
|
|
|
|
|
}
|
|
|
|
|
|
- if (!permission.wxPubFollow) {
|
|
|
- return <View className="schedule_box">
|
|
|
- <Text className="box_title">{t('feature.track_time_duration.schedule.section_title')}</Text>
|
|
|
- <Text className="box_subtitle">{TimeFormatter.getDateAndWeek(new Date().getTime(), true)}</Text>
|
|
|
- <View className="schedule_line" />
|
|
|
- <View className="schedule_row">
|
|
|
- <Text>{t('feature.track_time_duration.schedule.follow_tip')}</Text>
|
|
|
- <Switch isOn={permission.wxPubFollow} onClick={() => followWxPub()} />
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- // return <TableCell title={t('feature.track_time_duration.schedule.follow_tip')} showMarginBottom={true}>
|
|
|
- // <Switch isOn={permission.wxPubFollow} onClick={() => followWxPub()} />
|
|
|
- // </TableCell>
|
|
|
- // <View className="tip_bg2">
|
|
|
- // <Text className="tip_text2">{t('feature.track_time_duration.schedule.follow_tip')}</Text>
|
|
|
- // </View>
|
|
|
- }
|
|
|
+ // if (!permission.wxPubFollow) {
|
|
|
+ // return <View className="schedule_box">
|
|
|
+ // <Text className="box_title">{t('feature.track_time_duration.schedule.section_title')}</Text>
|
|
|
+ // <Text className="box_subtitle">{TimeFormatter.getDateAndWeek(new Date().getTime(), true)}</Text>
|
|
|
+ // <View className="schedule_line" />
|
|
|
+ // <View className="schedule_row">
|
|
|
+ // <Text>{t('feature.track_time_duration.schedule.follow_tip')}</Text>
|
|
|
+ // <Switch isOn={permission.wxPubFollow} onClick={() => followWxPub()} />
|
|
|
+ // </View>
|
|
|
+ // </View>
|
|
|
+ // }
|
|
|
|
|
|
var nextCheckTimestamp = 0;
|
|
|
if (time.status != 'WAIT_FOR_START') {
|
|
|
@@ -288,7 +292,12 @@ export default function Component(props: { type?: string, data?: any, delSuccess
|
|
|
|
|
|
if (nextCheckTimestamp != 0 && today.getTime() > nextCheckTimestamp) {
|
|
|
return <View className="schedule_box">
|
|
|
- <Text className="box_title">{t('feature.track_time_duration.schedule.section_title')}</Text>
|
|
|
+ <View className="box_header" style={{ marginRight: 20, backgroundColor: global.isDebug ? 'red' : 'transparent' }}>
|
|
|
+ <Text className="box_title">{t('feature.track_time_duration.schedule.section_title')}</Text>
|
|
|
+ <Switch isOn={permission.wxPubFollow} onClick={() => followWxPub()} />
|
|
|
+
|
|
|
+ </View>
|
|
|
+
|
|
|
<Text className="box_subtitle">{TimeFormatter.getDateAndWeek(new Date().getTime(), true)}</Text>
|
|
|
<View className="schedule_line" />
|
|
|
<View className="schedule_row">
|