From c4ca15b17401978df35880243f86837a68111e56 Mon Sep 17 00:00:00 2001
From: chenshengle <954534408@qq.com>
Date: Fri, 24 Sep 2021 18:35:15 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E5=88=86=E4=BA=AB?=
=?UTF-8?q?=E6=96=B0=E8=80=81=E4=BC=9A=E5=91=98=E8=BF=9B=E5=85=A5=E6=8E=88?=
=?UTF-8?q?=E6=9D=83=E9=97=AE=E9=A2=98=E3=80=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 3 +-
pages/bargain/bargainDatail/bargainDatail.js | 125 +++++++++++------
.../bargain/bargainDatail/bargainDatail.wxml | 2 -
pages/coupon/detail/index.js | 5 +-
pages/coupon/detail/index.wxml | 2 +-
pages/fillIndent/fillIndent.js | 117 +++++++++++++++-
pages/fillIndent/fillIndent.wxml | 128 ++++--------------
pages/fillIndent/fillIndent.wxss | 11 +-
pages/getuserinfo/index.js | 32 +++--
pages/index/index.js | 20 +--
pages/index/index.wxml | 2 -
pages/index/index.wxss | 7 +-
pages/siteUser/siteUser.js | 2 +-
project.config.json | 13 +-
14 files changed, 282 insertions(+), 187 deletions(-)
diff --git a/app.json b/app.json
index 93b5729..73830d2 100644
--- a/app.json
+++ b/app.json
@@ -1,11 +1,12 @@
{
"pages": [
+
"pages/index/index",
"pages/main/index",
- "index/index",
"index/searchbar",
"index/passCar",
"index/user",
+ "index/index",
"pages/searchbar/searchbar",
"pages/integralmall/integraHistory/index",
"pages/integralmall/payIntegcouponStatus/index",
diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js
index 868cb35..43a2c5f 100644
--- a/pages/bargain/bargainDatail/bargainDatail.js
+++ b/pages/bargain/bargainDatail/bargainDatail.js
@@ -10,7 +10,6 @@ Page({
* 页面的初始数据
*/
data: {
- url:"",
navigationBarHeight,
bannerUrl: imgurl.banner.url,
wmhome: imgurl.wmhome.url,
@@ -34,46 +33,96 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
- Http.get({
- url: config.api.checkUserStatus,
- data: {
- token: app.globalData.token
- }
- }).then(res => {
+ if(app.globalData.token) {
Http.get({
- url: config.api.checkPhoneStatus,
- data: {}
+ url: config.api.checkUserStatus,
+ data: {
+ token: app.globalData.token
+ }
}).then(res => {
- let that = this;
- if (options.orderId || options.orderId && options.from == 'discount') {
- console.log(options, "options")
- if (options.from) {
-
- that.setData({
- orderId: options.orderId,
- composeOrderType: options.composeOrderType,
- from: "discount"
- })
- } else {
- that.setData({
- orderId: options.orderId,
- composeOrderType: options.composeOrderType,
- })
+ Http.get({
+ url: config.api.checkPhoneStatus,
+ data: {}
+ }).then(res => {
+ let that = this;
+ if (options.orderId || options.orderId && options.from == 'discount') {
+ console.log(options, "options")
+ if (options.from) {
+
+ that.setData({
+ orderId: options.orderId,
+ composeOrderType: options.composeOrderType,
+ from: "discount"
+ })
+ } else {
+ that.setData({
+ orderId: options.orderId,
+ composeOrderType: options.composeOrderType,
+ })
+ }
+ app.globalData.wmorder = options.orderId
+ that.pressOrderDetail(options.orderId);
}
- app.globalData.wmorder = options.orderId
- that.pressOrderDetail(options.orderId);
- }
- this.getUserInfo()
- }).catch(res=>{
+ this.getUserInfo()
+ }).catch(res => {
+ wx.redirectTo({
+ url: `/pages/getphoneInfo/index`
+ });
+ })
+ }).catch(res => {
wx.redirectTo({
- url: `/pages/getphoneInfo/index`
- });
- })
- }).catch(res => {
- wx.redirectTo({
- url: `/pages/getuserinfo/index`
+ url: `/pages/getuserinfo/index`
+ })
})
- })
+ }else{
+ app.tokenCallback = token =>{
+ Http.get({
+ url: config.api.checkUserStatus,
+ data: {
+ token: app.globalData.token
+ }
+ }).then(res => {
+ Http.get({
+ url: config.api.checkPhoneStatus,
+ data: {}
+ }).then(res => {
+ let that = this;
+ if (options.orderId || options.orderId && options.from == 'discount') {
+ console.log(options, "options")
+ if (options.from) {
+
+ that.setData({
+ orderId: options.orderId,
+ composeOrderType: options.composeOrderType,
+ from: "discount"
+ })
+ } else {
+ that.setData({
+ orderId: options.orderId,
+ composeOrderType: options.composeOrderType,
+ })
+ }
+ app.globalData.wmorder = options.orderId
+ that.pressOrderDetail(options.orderId);
+ }
+ this.getUserInfo()
+ }).catch(res => {
+
+ app.globalData.type = "bg"
+ wx.redirectTo({
+ url: `/pages/getuserinfo/index?orderId=${options.orderId}&composeOrderType=${options.composeOrderType}`
+ });
+ })
+ }).catch(res => {
+
+ app.globalData.type = "bg"
+ wx.redirectTo({
+ url: `/pages/getuserinfo/index?orderId=${options.orderId}&composeOrderType=${options.composeOrderType}`
+ })
+ })
+ }
+ }
+
},
getUserInfo: function() {
@@ -800,9 +849,7 @@ Page({
// var orderId = options.target.dataset.orderid;
shareObj.path = `/pages/index/index?orderId=${that.data.orderId}&from=${"discount"}&composeOrderType=${that.data.composeOrderType}`;
}
- this.setData({
- url: shareObj.path
- })
+
console.log(shareObj)
// 返回shareObj
// return shareObj;
diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml
index 7a72f25..98b8664 100644
--- a/pages/bargain/bargainDatail/bargainDatail.wxml
+++ b/pages/bargain/bargainDatail/bargainDatail.wxml
@@ -68,8 +68,6 @@
-