mirror of
https://gitee.com/gz-yami/mall4m.git
synced 2026-10-06 14:13:08 +08:00
小程序登录跳转修复
This commit is contained in:
@@ -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: {
|
||||
// 定义全局请求队列
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -9,12 +9,12 @@ Page({
|
||||
},
|
||||
|
||||
onGotUserInfo: function (res) {
|
||||
|
||||
http.updateUserInfo();
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
@@ -70,4 +70,4 @@ Page({
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user