Browse Source

调整properties写法 适配调试库版本低的问题

xiaohaizhao 1 year ago
parent
commit
a1369e2b33

+ 20 - 1
app.js

@@ -21,7 +21,8 @@ App({
     initSocket() {
         let that = this;
         this.globalData.SocketTask = wx.connectSocket({
-            url: 'wss://meida.cnyunl.com/yos/webSocket/' + wx.getStorageSync('userMsg').token,
+            // url: 'wss://meida.cnyunl.com/yos/webSocket/' + wx.getStorageSync('userMsg').token,
+            url: 'ws://192.168.3.111:8100/yos/webSocket/' + wx.getStorageSync('userMsg').token,
             complete: (res) => {
                 console.log(res)
             }
@@ -31,6 +32,24 @@ App({
         })
         this.globalData.SocketTask.onMessage(function (res) {
             that.globalData.socket.callback(res)
+            let data = JSON.parse(res.data);
+            if (data.message.type == 'pay') {
+                that.globalData.http.basic({
+                    "classname": "system.payorder.payorder",
+                    "method": "query_userauth",
+                    content: {
+                        nocache: true
+                    }
+                }).then(res => {
+                    console.log('更新付费信息', res)
+                    wx.setStorageSync('userauth', res.data);
+                    wx.showToast({
+                        title: '应用付费信息已更新',
+                        icon: "none"
+                    })
+                    getCurrentPages().find(v => v.__route__ == 'pages/tabbar/home/index').refreshData();
+                });
+            }
         })
         this.globalData.SocketTask.onError(function (res) {
             that.globalData.socketEstablish = false;

+ 9 - 3
components/My_accessory/index.js

@@ -12,9 +12,15 @@ Component({
             type: Array,
             value: []
         },
-        callBack: Function,
-        deleteFile: Function,
-        downLoadRecord: Function
+        callBack: {
+            type: Function
+        },
+        deleteFile: {
+            type: Function
+        },
+        downLoadRecord: {
+            type: Function
+        }
     },
     options: {
         addGlobalClass: true

+ 0 - 14
components/My_card/index.js

@@ -19,18 +19,4 @@ Component({
             value: false
         }
     },
-
-    /**
-     * 组件的初始数据
-     */
-    data: {
-
-    },
-
-    /**
-     * 组件的方法列表
-     */
-    methods: {
-
-    }
 })

+ 3 - 1
components/My_form/index.js

@@ -9,7 +9,9 @@ Component({
             type: Array,
             value: []
         },
-        CompletedOrNot: Function, //完成与否回调
+        CompletedOrNot: {
+            type:Function
+        }, //完成与否回调
     },
     options: {
         multipleSlots: true

+ 35 - 31
components/Yl_FloatingButton/index.js

@@ -1,35 +1,39 @@
 Component({
-  properties: {
-    radius: Number, //半径 单位px
-    useSlot: Boolean
-  },
-  data: {
-    top: "550px",
-    left: "345px",
-    viewHeight: null
-  },
-  lifetimes: {
-    attached: function () {
-      let that = this;
-      wx.getSystemInfo({
-        success: (res => that.setData({
-          viewHeight: res.windowHeight
-        }))
-      });
+    properties: {
+        radius: {
+            type: Number
+        }, //半径 单位px
+        useSlot: {
+            type: Boolean
+        }
     },
-  },
-  methods: {
-    viewTouchMove(e) {
-      let left = e.touches[0].pageX;
-      if (left > (375 - this.data.radius)) left = 375 - (this.data.radius / 2);
-      if (left < 0 + this.data.radius) left = 0 + this.data.radius;
-      let top = e.touches[0].pageY;
-      if (top < 0 + this.data.radius) top = 0 + this.data.radius;
-      if (top > this.data.viewHeight - this.data.radius) top = this.data.viewHeight - this.data.radius;
-      this.setData({
-        left: left + 'px',
-        top: top + 'px'
-      })
+    data: {
+        top: "550px",
+        left: "345px",
+        viewHeight: null
+    },
+    lifetimes: {
+        attached: function () {
+            let that = this;
+            wx.getSystemInfo({
+                success: (res => that.setData({
+                    viewHeight: res.windowHeight
+                }))
+            });
+        },
+    },
+    methods: {
+        viewTouchMove(e) {
+            let left = e.touches[0].pageX;
+            if (left > (375 - this.data.radius)) left = 375 - (this.data.radius / 2);
+            if (left < 0 + this.data.radius) left = 0 + this.data.radius;
+            let top = e.touches[0].pageY;
+            if (top < 0 + this.data.radius) top = 0 + this.data.radius;
+            if (top > this.data.viewHeight - this.data.radius) top = this.data.viewHeight - this.data.radius;
+            this.setData({
+                left: left + 'px',
+                top: top + 'px'
+            })
+        }
     }
-  }
 })

+ 1 - 7
pages/tabbar/message/index.wxml

@@ -1,10 +1,4 @@
-<!-- <My_tabs id='tabs' bind:onChange='tabChange' /> -->
-<!-- <van-tabs id='tabs' active="{{ content.type }}" color='var(--assist)' tab-active-class='tab-active-class' bind:change="tabChange">
-    <van-tab title="应用消息" name='应用' />
-    <van-tab title="系统消息" name='系统' />
-</van-tabs>
- -->
- <view class="head"></view>
+<view class="head"></view>
 <My_listBox id="ListBox" height="{{height}}" bind:getlist='getlist'>
     <view class="unread">总共{{total}}条</view>
     <navigator url="#" class='list' wx:for="{{list}}" data-item="{{item}}" bindtap="toDetails">

+ 6 - 2
pages/threadedTree/details/modules/follow/index.js

@@ -6,8 +6,12 @@ Component({
      * 组件的属性列表
      */
     properties: {
-        endChange: Function,
-        sat_orderclueid: Number
+        endChange: {
+            type: Function
+        },
+        sat_orderclueid: {
+            type: Number
+        }
     },
 
     /**

+ 9 - 3
pages/threadedTree/details/modules/handOver/index.js

@@ -5,9 +5,15 @@ Component({
      * 组件的属性列表
      */
     properties: {
-        sat_orderclueid: Number,
-        list: Array,
-        endChange: Function
+        sat_orderclueid: {
+            type: Number
+        },
+        list: {
+            type: Array
+        },
+        endChange: {
+            type: Function
+        }
     },
 
     /**

+ 3 - 1
pages/threadedTree/details/modules/record/index.js

@@ -1,5 +1,7 @@
 Component({
     properties: {
-        followList: Array
+        followList: {
+            type: Array
+        }
     }
 })

+ 6 - 2
pages/threadedTree/modules/insert/insert.js

@@ -3,8 +3,12 @@ const deleteMark = require("../../../../utils/deleteMark"),
 let count = null;
 Component({
     properties: {
-        endInsert: Function,
-        type: String,
+        endInsert: {
+            type:Function
+        },
+        type: {
+            type:String
+        },
         content: {
             type: Object,
             value: {

+ 3 - 1
pages/threadedTree/modules/list/list.js

@@ -4,7 +4,9 @@ Component({
      * 组件的属性列表
      */
     properties: {
-        list: Array,
+        list: {
+            type: Array
+        },
         tagColor: {
             type: String,
             value: "#FA8C16"

+ 3 - 1
pages/threadedTree/modules/popup/index.js

@@ -4,7 +4,9 @@ Component({
      * 组件的属性列表
      */
     properties: {
-        sheetTitle: String
+        sheetTitle: {
+            type: String
+        }
     },
 
     lifetimes: {

+ 3 - 1
pages/threadedTree/modules/search/search.js

@@ -7,7 +7,9 @@ Component({
         selectSort: {
             type: Function
         },
-        isReverse: Boolean
+        isReverse: {
+            type: Boolean
+        }
     },
     data: {
         isClear: false

+ 1 - 1
project.private.config.json

@@ -130,5 +130,5 @@
             ]
         }
     },
-    "libVersion": "2.25.1"
+    "libVersion": "2.25.2"
 }