230320a303 1 年之前
父节点
当前提交
d13035e08e
共有 4 个文件被更改,包括 44 次插入19 次删除
  1. 15 9
      src/components/footer/index.js
  2. 15 9
      src/pages/index/index.jsx
  3. 10 1
      src/pagesHouse/produceType.jsx
  4. 4 0
      src/pagesHouse/produceType.scss

+ 15 - 9
src/components/footer/index.js

@@ -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)
+          }
+        })
+      }
     }
 
 

+ 15 - 9
src/pages/index/index.jsx

@@ -924,17 +924,23 @@ class Index extends Component {
 
   testClick () {
     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)
+          }
+        })
+      }
     }
   }
 

+ 10 - 1
src/pagesHouse/produceType.jsx

@@ -49,7 +49,6 @@ class Index extends Component {
   getDtl = () => {
     const { curId } = this.state
     Taro.api.house.admestatedetail({id: curId}).then(res => {
-      // console.log(res.area_data)
       this.setState({
         curObj: res || {}
       }, () => {
@@ -136,7 +135,17 @@ class Index extends Component {
                                     <View  onClick={this.previewImageHandle.bind(this, three.img_url, two.area_list)} className="tips">
                                       <View className="bg"></View>
                                       <View className="t">查看大图</View>
+                                      <View className="t2">{three.remark}</View>
                                     </View>
+                                    {
+                                      three.remark
+                                      ?
+                                        <View  onClick={this.previewImageHandle.bind(this, three.img_url, two.area_list)} className="tips t2">
+                                          <View className="bg"></View>
+                                          <View className="t">{three.remark}</View>
+                                        </View>
+                                      : ''
+                                    }
                                     {
                                       three.vr_key
                                       ? <Image onClick={this.linkVrHandle.bind(this, three)} className="vr-icon" src={vrIcon}/>

+ 4 - 0
src/pagesHouse/produceType.scss

@@ -83,6 +83,10 @@
       left: 0;
       height: 40px;
       width: 100%;
+      &.t2 {
+        top: 0;
+        bottom: auto;
+      }
       .bg {
         position: absolute;
         width: 100%;