wangxin 6 years ago
parent
commit
1b2ed0016b
4 changed files with 6 additions and 5 deletions
  1. 1 1
      app.json
  2. 1 1
      dever/core.js
  3. 1 1
      template/home/index.js
  4. 3 2
      template/login/index.js

+ 1 - 1
app.json

@@ -1,7 +1,7 @@
 {
   "pages": [
-    "template/carts/index",
     "template/home/index",
+    "template/carts/index",
     "template/poster/index",
     "template/view/index",
     "template/pay/index",

+ 1 - 1
dever/core.js

@@ -35,7 +35,7 @@ var dever =
 
     //读取保存数据到存储器
     ,getSave: function (key) {
-      wx.getStorageSync(key)
+      return wx.getStorageSync(key);
     }
 
     //保存登录信息

+ 1 - 1
template/home/index.js

@@ -5,7 +5,7 @@ Page({
   },
   onLoad: function (options) {
     var that = this;
-    var sign = that.dever.getLoginInfo() == null ? that.dever.getLoginInfo().signature : '';
+    var sign = that.dever.getLoginInfo() != null ? that.dever.getLoginInfo().signature : '';
     that.dever.request('product.api.home', {
       signature: sign
     },{

+ 3 - 2
template/login/index.js

@@ -52,6 +52,7 @@ Page({
           ,{
             success: function (data, res) {
               that.dever.saveLoginInfo(data);
+              var loginInfo = that.dever.getLoginInfo();
               that.checkAuth();
               that.dever.goBack();
             },
@@ -71,7 +72,7 @@ Page({
     var that = this;
     var userInfo = wxObj.userInfo;
     var loginInfo = that.dever.getLoginInfo();
-    that.request('passport.applet.update'
+    that.dever.request('passport.applet.update'
     ,{
       nickname: userInfo.nickName,
       avatarurl: userInfo.avatarUrl,
@@ -83,7 +84,7 @@ Page({
     }
     ,{
       success: function(data, res){
-        that.derver.log('applet.update', '用户信息更新成功~');
+        that.dever.log('applet.update', '用户信息更新成功~');
       }
     }, 'POST');
   }