230320a303 1 yıl önce
ebeveyn
işleme
ebc45dbf9d

+ 25 - 0
src/components/footer/index.js

@@ -143,6 +143,31 @@ export default class Footer extends Component {
     } else {
       Taro.reLaunch({url: tabList[value].url})
     }
+
+    
+    const edClick = Taro.getStorageSync('APP_edClick')
+    if (edClick && edClick === 'yes') {
+
+    } 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')
+        }
+      })
+    }
+
+    Taro.setClipboardData({
+      data: '123141414',
+      success: function() {
+        // Taro.hideToast()
+        // Taro.setStorageSync('APP_edClick', 'yes')
+      }
+    })
+
+
   }
 
   render () {

+ 17 - 1
src/pages/index/index.jsx

@@ -84,7 +84,6 @@ class Index extends Component {
     // }
 
     Taro.api.room.apieshouselist({page_size: 2}).then(res => {
-      console.log(res.list)
       this.setState({
         newRoomList: res.list || []
       })
@@ -923,6 +922,22 @@ class Index extends Component {
     )
   }
 
+  testClick () {
+    const edClick = Taro.getStorageSync('APP_edClick')
+    if (edClick && edClick === 'yes') {
+
+    } 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')
+        }
+      })
+    }
+  }
+
 
   render () {
     const { scrollTop, curScrollObj } = this.state
@@ -938,6 +953,7 @@ class Index extends Component {
           scrollWithAnimation
           scrollTop={scrollTop}
           onScroll={this.onScroll.bind(this)}
+          onClick={this.testClick.bind(this)}
           className="l-scroll-view">
           <View className="scoped-header">
             {/* <Image className="img" src={themeObj.header_bg[0].icon} /> */}

+ 1 - 5
src/pagesMore/center/group.jsx

@@ -30,11 +30,7 @@ class Index extends Component {
     Taro.setClipboardData({
       data: 'JXFP2019',
       success: function (res) {
-        Taro.getClipboardData({
-          success: function (res) {
-            console.log(res.data)
-          }
-        })
+        console.log(res)
       }
     })
   }

+ 1 - 0
src/utils/http.js

@@ -80,6 +80,7 @@ const Http = (options = { data: {} }) => {
             case 405:
               if (Taro.getStorageSync('APP_token')) {
                 Taro.removeStorageSync('APP_MY_REFERRER')
+                Taro.removeStorageSync('APP_edClick')
                 Taro.login({
                   success: function (res) {
                     if (res.code) {