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 @@
-