tanyanfei 3 anni fa
parent
commit
6836c6d49c
4 ha cambiato i file con 30 aggiunte e 1 eliminazioni
  1. 7 0
      pages/index/index.js
  2. 7 0
      pages/rank/rank.js
  3. 7 0
      pages/upload/upload.js
  4. 9 1
      pages/user/user.js

+ 7 - 0
pages/index/index.js

@@ -227,6 +227,13 @@ Page({
     this.getHot()
   },
   onShow: function (e) {
+    $api.getMyStyle().then(res => {
+      if (!res.data.data.init_fund) {
+        wx.navigateTo({
+          url: '../style/style',
+        })
+      }
+    })
     if (app.globalData.follow){
       this.setData({
         page: 1,

+ 7 - 0
pages/rank/rank.js

@@ -60,6 +60,13 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
+    $api.getMyStyle().then(res => {
+      if (!res.data.data.init_fund) {
+        wx.navigateTo({
+          url: '../style/style',
+        })
+      }
+    })
     wx.hideNavigationBarLoading()
     if (!this.data.datas.groups){
       $api.getDate().then(res => {

+ 7 - 0
pages/upload/upload.js

@@ -26,6 +26,13 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onShow(){
+    $api.getMyStyle().then(res => {
+      if (!res.data.data.init_fund) {
+        wx.navigateTo({
+          url: '../style/style',
+        })
+      }
+    })
     if (!this.data.freshen) {
       return;
     }

+ 9 - 1
pages/user/user.js

@@ -41,6 +41,8 @@ Page({
         userinfo: {}
       })
     })
+
+    
   },
   inputchange(e) {
     this.setData({
@@ -144,7 +146,13 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    $api.getMyStyle().then(res => {
+      if (!res.data.data.init_fund) {
+        wx.navigateTo({
+          url: '../style/style',
+        })
+      }
+    })
   },
 
   /**