소스 검색

小程序登录跳转修复、绑定手机号页面报错修复

Eratosici 4 년 전
부모
커밋
2eb414177b
5개의 변경된 파일14개의 추가작업 그리고 15개의 파일을 삭제
  1. 9 9
      mall4m/app.js
  2. 0 1
      mall4m/pages/binding-phone/binding-phone.js
  3. 2 2
      mall4m/pages/index/index.wxml
  4. 2 2
      mall4m/pages/login/login.js
  5. 1 1
      mall4uni/pages.json

+ 9 - 9
mall4m/app.js

@@ -3,15 +3,15 @@ var http = require("utils/http.js");
 App({
   onLaunch: function () {
     http.getToken();
-    wx.getSetting({
-      success(res) {
-        if (!res.authSetting['scope.userInfo']) {
-          wx.navigateTo({
-            url: '/pages/login/login',
-          })
-        }
-      }
-    })
+    // wx.getSetting({
+    //   success(res) {
+    //     if (!res.authSetting['scope.userInfo']) {
+    //       wx.navigateTo({
+    //         url: '/pages/login/login',
+    //       })
+    //     }
+    //   }
+    // })
   },
   globalData: {
     // 定义全局请求队列

+ 0 - 1
mall4m/pages/binding-phone/binding-phone.js

@@ -2,7 +2,6 @@
 
 var http = require("../../utils/http.js");
 var config = require("../../utils/config.js");
-var constant = require("../../utils/constant.js");
 Page({
 
   /**

+ 2 - 2
mall4m/pages/index/index.wxml

@@ -12,7 +12,7 @@
   <view class='content'>
     <!-- swiper -->
     <swiper autoplay="{{autoplay}}" indicator-color="{{indicatorColor}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActiveColor}} " circular='true' class='pic-swiper' indicator-dots previous-margin='20rpx' next-margin='20rpx'>
-      <block wx:for='{{indexImgs}}' wx:key=''>
+      <block wx:for='{{indexImgs}}' wx:key='imgUrl'>
         <swiper-item class="banner-item">
           <view class='img-box'>
             <image src='{{item.imgUrl}}' data-prodid='{{item.relation}}' bindtap='toProdPage' class='banner'></image>
@@ -45,7 +45,7 @@
     <view class='message-play' bindtap='onNewsPage'>
       <image src='../../images/icon/horn.png' class='hornpng'></image>
       <swiper vertical='true' autoplay='true' duration='1000' class='swiper-cont'>
-        <block wx:for='{{news}}' wx:key=''>
+        <block wx:for='{{news}}' wx:key='id'>
           <swiper-item class="items">{{item.title}}</swiper-item>
         </block>
       </swiper>

+ 2 - 2
mall4m/pages/login/login.js

@@ -9,12 +9,12 @@ Page({
   },
 
   onGotUserInfo: function (res) {
-    
     http.updateUserInfo();
     wx.navigateBack({
       delta: 1
     })
   },
+
   /**
    * 生命周期函数--监听页面加载
    */
@@ -70,4 +70,4 @@ Page({
   onShareAppMessage: function () {
 
   }
-})
+})

+ 1 - 1
mall4uni/pages.json

@@ -4,7 +4,7 @@
 			"path": "pages/index/index",
 			"style": {
 				"backgroundTextStyle": "dark",
-				"navigationBarBackgroundColor": "white",
+				"navigationBarBackgroundColor": "#fff",
 				"navigationBarTextStyle": "black",
 				"enablePullDownRefresh": true,
 				"navigationBarTitleText": "亚米科技mall4j"