From c3f24860b7a1989cc85ff75753ef62343c7dec96 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Fri, 8 Jan 2021 16:47:22 +0800
Subject: [PATCH 1/6] no message
---
pages/mall/index/index.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pages/mall/index/index.js b/pages/mall/index/index.js
index 3319651..f346225 100644
--- a/pages/mall/index/index.js
+++ b/pages/mall/index/index.js
@@ -139,6 +139,8 @@ Component({
util.navigateTo('/pages/bidding/index/index')
} else if(item.redirectInfo.targetView == 'myShop'){
util.navigateTo('/pages/shop/index/index')
+ } else if(item.redirectInfo.targetView == 'buyerOrderList'){
+ util.navigateTo('/pages/morder/index/index')
}
},
onGridTap: function(e){
From 1e941d6465fc41a00409c7107b06cdc5ba0e02b5 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Fri, 8 Jan 2021 20:31:09 +0800
Subject: [PATCH 2/6] no message
---
pages/html/banner/index.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/pages/html/banner/index.js b/pages/html/banner/index.js
index 6457e88..8408895 100644
--- a/pages/html/banner/index.js
+++ b/pages/html/banner/index.js
@@ -37,6 +37,8 @@ Page({
wx.navigateBack()
},
onClick: function(){
- wx.redirectTo({ url: '/pages/goods/ablility/index' })
+ if(this.data.src == ''){
+ wx.redirectTo({ url: '/pages/goods/ablility/index' })
+ }
}
})
\ No newline at end of file
From 774f21057a72861a5ac5b04078e08ec24a010277 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Fri, 8 Jan 2021 22:12:22 +0800
Subject: [PATCH 3/6] no message
---
app.js | 2 +-
pages/html/banner/index.js | 2 +-
pages/login/index.js | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app.js b/app.js
index 2ebadc9..9f231ee 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
//app.js
App({
//----------------------------------------------globalData--------------------------------------
- release: 0,
+ release: 1,
httpUrl: 'https://api.qniao.cn',
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'oLbv-IyJOia2tenh64_Lc8xeAzwgzu3gh1vFJ1Se-ME'],
diff --git a/pages/html/banner/index.js b/pages/html/banner/index.js
index 8408895..c5ad272 100644
--- a/pages/html/banner/index.js
+++ b/pages/html/banner/index.js
@@ -37,7 +37,7 @@ Page({
wx.navigateBack()
},
onClick: function(){
- if(this.data.src == ''){
+ if(this.data.src == 'http://medou.oss-cn-shenzhen.aliyuncs.com/bird_user/21010821460147259.png'){
wx.redirectTo({ url: '/pages/goods/ablility/index' })
}
}
diff --git a/pages/login/index.js b/pages/login/index.js
index 0f38a1b..87ae249 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -31,6 +31,7 @@ Page({
}
var check = wx.getStorageSync('AgreeCheck')
app.globalData.kg = wx.getStorageSync('ztb-kg')
+ this.checkLogin()
if (check) {
this.setData({check: true})
}
From 2d5862fbd834599b1e9d2191923330eb685c07af Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Mon, 11 Jan 2021 11:21:14 +0800
Subject: [PATCH 4/6] no message
---
app.js | 4 ++--
pages/login/index.js | 20 +++++++++++++++++++-
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/app.js b/app.js
index 9f231ee..6ecce42 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
//app.js
- App({
+App({
//----------------------------------------------globalData--------------------------------------
- release: 1,
+ release: 0,
httpUrl: 'https://api.qniao.cn',
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'oLbv-IyJOia2tenh64_Lc8xeAzwgzu3gh1vFJ1Se-ME'],
diff --git a/pages/login/index.js b/pages/login/index.js
index 87ae249..08c7835 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -148,7 +148,25 @@ Page({
}
app.globalData.userInfo = result.data
event.emit('EventMessage', { what: 888, desc: 'Logined' })
- wx.navigateBack()
+ if(app.globalData.userToken){
+ // 判断该用户是否有订单存在 1存在 2不存在
+ wx.reLaunch({ url: '/pages/paper/index' })
+ } else {
+ wx.navigateBack()
+ }
+ // /receive/v150/get/OrderExists 判断该用户是否有订单存在 1存在 2不存在
+ // request.get('/saas-trade/receive/v150/get/OrderExists').then(result => {
+ // wx.hideLoading()
+ // if (Number(result.data) != 1 || !app.release) {
+ // wx.navigateBack()
+ // } else {
+ // wx.reLaunch({ url: '/pages/paper/index' })
+ // }
+ // }).catch(err => {
+ // //异常回调
+ // wx.hideLoading()
+ // wx.navigateBack()
+ // })
},
changeType: function () {
if (this.data.type == 1) {
From 011a450c4d38ca0038c6006dbfb052f3be7e9907 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Mon, 11 Jan 2021 15:33:08 +0800
Subject: [PATCH 5/6] no message
---
app.js | 2 +-
pages/login/index.js | 29 ++++++++++++++---------------
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/app.js b/app.js
index 6ecce42..733317f 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
//app.js
App({
//----------------------------------------------globalData--------------------------------------
- release: 0,
+ release: 1,
httpUrl: 'https://api.qniao.cn',
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'oLbv-IyJOia2tenh64_Lc8xeAzwgzu3gh1vFJ1Se-ME'],
diff --git a/pages/login/index.js b/pages/login/index.js
index 08c7835..30e7e28 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -149,24 +149,23 @@ Page({
app.globalData.userInfo = result.data
event.emit('EventMessage', { what: 888, desc: 'Logined' })
if(app.globalData.userToken){
- // 判断该用户是否有订单存在 1存在 2不存在
- wx.reLaunch({ url: '/pages/paper/index' })
+ // /receive/v150/get/OrderExists 判断该用户是否有订单存在 1存在 2不存在
+ request.get('/saas-trade/receive/v150/get/OrderExists').then(result => {
+ wx.hideLoading()
+ if (Number(result.data) != 1 || !app.release) {
+ wx.navigateBack()
+ } else {
+ wx.reLaunch({ url: '/pages/paper/index' })
+ }
+ }).catch(err => {
+ //异常回调
+ wx.hideLoading()
+ wx.navigateBack()
+ })
} else {
wx.navigateBack()
}
- // /receive/v150/get/OrderExists 判断该用户是否有订单存在 1存在 2不存在
- // request.get('/saas-trade/receive/v150/get/OrderExists').then(result => {
- // wx.hideLoading()
- // if (Number(result.data) != 1 || !app.release) {
- // wx.navigateBack()
- // } else {
- // wx.reLaunch({ url: '/pages/paper/index' })
- // }
- // }).catch(err => {
- // //异常回调
- // wx.hideLoading()
- // wx.navigateBack()
- // })
+
},
changeType: function () {
if (this.data.type == 1) {
From 745a11a4fb809beb35c8c0a8f17f1b8cda15667e Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Tue, 12 Jan 2021 15:16:09 +0800
Subject: [PATCH 6/6] no message
---
app.js | 2 +-
components/popup/index.wxss | 4 +--
pages/index/index.js | 49 ++++++++++++++++++++++++++++++++-----
pages/index/index.json | 4 ++-
pages/index/index.wxml | 33 +++++++++++++++++++++----
pages/index/index.wxss | 27 ++++++++++++++++++++
utils/request.js | 9 ++++++-
7 files changed, 112 insertions(+), 16 deletions(-)
diff --git a/app.js b/app.js
index 733317f..6ecce42 100644
--- a/app.js
+++ b/app.js
@@ -1,7 +1,7 @@
//app.js
App({
//----------------------------------------------globalData--------------------------------------
- release: 1,
+ release: 0,
httpUrl: 'https://api.qniao.cn',
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'oLbv-IyJOia2tenh64_Lc8xeAzwgzu3gh1vFJ1Se-ME'],
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 2702d83..17b6481 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -13,7 +13,9 @@ Page({
pageIndex: 1,
safeBottom: app.globalData.safeBottom,
inited: false,
- path: null
+ path: null,
+ landInfo: null,
+ visible: false
},
/************************************** 初始化流程 ********************************************/
onLoad: function (options) {
@@ -71,7 +73,7 @@ Page({
this.fetchUserInfo()
} else {
wx.hideLoading()
- this.onResume()
+ this.toIndex()
}
}
})
@@ -92,15 +94,36 @@ Page({
fetchUserInfo:function(){
request.get('/recycle-service/user/get/base-info').then(result => {
app.globalData.userInfo = result.data
- wx.hideLoading()
- this.onResume()
- if(this.data.path){
- wx.navigateTo({ url: this.data.path })
+ var accessToken = wx.getStorageSync('accessToken')
+ if(accessToken){
+ app.globalData.userToken = accessToken
+ request.get('/saas-trade/receive/v150/get/OrderExists').then(result => {
+ wx.hideLoading()
+ if (Number(result.data) != 1 || !app.release) {
+ this.toIndex()
+ } else {
+ wx.reLaunch({ url: '/pages/paper/index' })
+ }
+ }).catch(err => {
+ //异常回调
+ wx.hideLoading()
+ this.toIndex()
+ })
+ } else {
+ wx.hideLoading()
+ this.toIndex()
}
}).catch(err => {
wx.hideLoading()
})
},
+ 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) {
@@ -128,5 +151,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/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
}
}