|
@@ -146,17 +146,23 @@ export default class Footer extends Component {
|
|
|
|
|
|
|
|
|
const edClick = Taro.getStorageSync('APP_edClick')
|
|
|
- if (edClick && edClick === 'yes') {
|
|
|
-
|
|
|
+ const currentTime = Date.now()
|
|
|
+ const twentyFourHoursAgo = currentTime - (60 * 60 * 1000)
|
|
|
+ if (edClick) {
|
|
|
+ if (edClick <= twentyFourHoursAgo) {
|
|
|
+ Taro.removeStorageSync('APP_edClick')
|
|
|
+ }
|
|
|
} else {
|
|
|
const themeObj = Taro.getStorageSync('APP_themeObj')
|
|
|
- Taro.setClipboardData({
|
|
|
- data: themeObj.header_bg[0].option1 || '¥DDnPGBaxpDbu2ALP¥',
|
|
|
- success: function() {
|
|
|
- Taro.hideToast()
|
|
|
- Taro.setStorageSync('APP_edClick', 'yes')
|
|
|
- }
|
|
|
- })
|
|
|
+ if (themeObj.header_bg && themeObj.header_bg.length > 0 && themeObj.header_bg[0].option1) {
|
|
|
+ Taro.setClipboardData({
|
|
|
+ data: themeObj.header_bg[0].option1,
|
|
|
+ success: function() {
|
|
|
+ Taro.hideToast()
|
|
|
+ Taro.setStorageSync('APP_edClick', currentTime)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|