diff --git a/app.js b/app.js
index 2ebadc9..6ecce42 100644
--- a/app.js
+++ b/app.js
@@ -1,5 +1,5 @@
//app.js
- App({
+App({
//----------------------------------------------globalData--------------------------------------
release: 0,
httpUrl: 'https://api.qniao.cn',
diff --git a/components/popup/index.wxss b/components/popup/index.wxss
index eaba04a..21a68d2 100644
--- a/components/popup/index.wxss
+++ b/components/popup/index.wxss
@@ -1,8 +1,8 @@
.wux-popup {
position: fixed;
z-index: 1000;
- width: 80%;
- max-width: 600rpx
+ width: 100%;
+ max-width: 680rpx
}
.wux-popup-position.wux-popup-position--center .wux-popup {
top: 50%;
diff --git a/pages/index/index.js b/pages/index/index.js
index 1924a75..4c351c9 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -14,7 +14,9 @@ Page({
pageIndex: 1,
safeBottom: app.globalData.safeBottom,
inited: false,
- path: null
+ path: null,
+ landInfo: null,
+ visible: false
},
/************************************** 初始化流程 ********************************************/
onLoad: function (options) {
@@ -72,7 +74,7 @@ Page({
this.fetchUserInfo()
} else {
wx.hideLoading()
- this.onResume()
+ this.toIndex()
}
}
})
@@ -119,6 +121,13 @@ Page({
}
})
},
+ toIndex: function(){
+ this.onResume()
+ if(this.data.path){
+ wx.navigateTo({ url: this.data.path })
+ }
+ // 进行弹窗的dialog显示处理;
+ },
onResume: function(){
var pageView = this.selectComponent('#' + this.data.TabList[this.data.pageIndex].value)
if (pageView && this.data.inited) {
@@ -146,5 +155,19 @@ Page({
},
stopTouchMove: function(e){
return false
+ },
+ // 弹出框的处理;
+ onClose: function(){
+ this.setData({ visible: false, landInfo: null })
+ },
+ onImageLoad: function(){
+ this.setData({ visible: true })
+ },
+ onImageClick: function(){
+ console.log(this.data.landInfo)
+ this.setData({ visible: false, landInfo: null })
+ },
+ toRule: function(){
+ console.log('toRule>>>')
}
})
diff --git a/pages/index/index.json b/pages/index/index.json
index ceb0ef4..4a41061 100644
--- a/pages/index/index.json
+++ b/pages/index/index.json
@@ -2,6 +2,8 @@
"usingComponents": {
"mall": "/pages/mall/index/index",
"article": "/pages/article/index/index",
- "home": "/pages/home/index/index"
+ "home": "/pages/home/index/index",
+ "wux-image": "/components/image/index",
+ "wux-popup": "/components/popup/index"
}
}
\ No newline at end of file
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 1617041..a9c83a8 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,16 +1,39 @@
-
-
-
+
+
+
+
+
+
+
+
+
-
+
{{item.name}}
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+ 活动规则
+
+
\ No newline at end of file
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index e69de29..bd54354 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -0,0 +1,27 @@
+.wux-close {
+ width: 100%;
+ text-align: end;
+ display: inline-block;
+ padding-bottom: 24rpx;
+}
+
+.wux-landscape{
+ width: 100%;
+ max-width: 750rpx;
+}
+
+.wux-landscape__popup {
+ background-color: transparent!important
+}
+
+.wux-landscape__popup-body {
+ padding: 0!important
+}
+.wux-landscape__inner {
+ line-height: 1.5;
+ color: rgba(0,0,0,.65)
+}
+.wux-landscape__inner > image {
+ width: 100%;
+ max-width: 100%
+}
\ No newline at end of file
diff --git a/pages/login/index.js b/pages/login/index.js
index 50fae8f..4ceaba3 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -34,6 +34,7 @@ Page({
this.wxLogin()
var check = wx.getStorageSync('AgreeCheck')
app.globalData.kg = wx.getStorageSync('ztb-kg')
+ this.checkLogin()
if (check) {
this.setData({check: true})
}
diff --git a/utils/request.js b/utils/request.js
index 97a5896..d0accc9 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -21,6 +21,12 @@ function fun(url, method, data, header) {
app.globalData.token = authorization
}
}
+ if(util.isEmpty(app.globalData.userToken)){
+ var userToken = wx.getStorageSync('userToken')
+ if (userToken) {
+ app.globalData.userToken = userToken
+ }
+ }
if(flag){
header = {
'X-APP-ID': app.xAppId,
@@ -29,7 +35,8 @@ function fun(url, method, data, header) {
}
} else {
header = {
- 'user-token': app.globalData.userToken,
+ 'X-APP-ID': app.xAppId,
+ 'user-token': '' + app.globalData.userToken,
appversion: app.version
}
}