|
@@ -258,6 +258,7 @@
|
|
|
getwxLoing:false,
|
|
|
shareID:'',
|
|
|
discount:'',
|
|
|
+ bizUserId:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(opt) {
|
|
@@ -277,7 +278,9 @@
|
|
|
this.shareID = shareID
|
|
|
//this.$store.commit('mutationsshareID', shareID)
|
|
|
}
|
|
|
- this.shareID='5788B15EAEE94EE78D3AA3FCE079B68D'
|
|
|
+ //this.shareID='5788B15EAEE94EE78D3AA3FCE079B68D'
|
|
|
+ this.shareID='1BF04FAEC8844ECE9C40E880C3B13721'
|
|
|
+
|
|
|
//this.unionId="26A1039A-DB10-4D0E-BBA2-541C06274EED";
|
|
|
//this.ext.appId="wxffd2502e67d37908"
|
|
|
// uni.setStorage({
|
|
@@ -351,13 +354,13 @@
|
|
|
})
|
|
|
},
|
|
|
changeCar(){
|
|
|
- // uni.scanCode({
|
|
|
- // success: function (res) {
|
|
|
- // console.log('条码类型:' + res.scanType);
|
|
|
- // console.log( res);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // return false;
|
|
|
+ uni.scanCode({
|
|
|
+ success: function (res) {
|
|
|
+ console.log('条码类型:' + res.scanType);
|
|
|
+ console.log( res);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
uni.navigateTo({
|
|
|
url:'../user/addCar/cailist'
|
|
|
})
|
|
@@ -566,13 +569,32 @@
|
|
|
unionId:this.unionId,
|
|
|
shareId:this.shareID
|
|
|
},'GET').then(res => {
|
|
|
+ console.log(res.code);
|
|
|
+ console.log("授权信息")
|
|
|
+ console.log(res)
|
|
|
+ uni.hideLoading();
|
|
|
if(res.code!=0){
|
|
|
- uni.hideLoading();
|
|
|
- uni.showToast({
|
|
|
- title: res.msg,
|
|
|
- icon: 'none',
|
|
|
- duration: 3000
|
|
|
- });
|
|
|
+ //uni.hideLoading();
|
|
|
+ var msg=res.msg
|
|
|
+ if(!msg){
|
|
|
+ msg='授权失败'
|
|
|
+ }
|
|
|
+ console.log(msg);
|
|
|
+ // uni.showModal({
|
|
|
+ // title: '提示',
|
|
|
+ // content: msg,
|
|
|
+ // success: function(resTK) {
|
|
|
+ // if (resTK.confirm) {
|
|
|
+
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // uni.showToast({
|
|
|
+ // title:msg,
|
|
|
+ // icon: 'none',
|
|
|
+ // duration: 3000
|
|
|
+ // });
|
|
|
+ //return false
|
|
|
}
|
|
|
this.wxOpenData=res.data;
|
|
|
this.themeColor=res.data.themeColor
|
|
@@ -635,24 +657,18 @@
|
|
|
}else{
|
|
|
this.authorizShow=true;
|
|
|
}
|
|
|
- uni.hideLoading();
|
|
|
+ if(res.data.loginInfo.discount){
|
|
|
+ that.discount=res.data.loginInfo.discount;
|
|
|
+ if(that.discount==2){
|
|
|
+ that.bizUserId=res.data.loginInfo.bizUserId;
|
|
|
+ }
|
|
|
+ if(that.shareID){
|
|
|
+ that.getCouponList()
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//console.log("优惠券")
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: '您有优惠券待领取',
|
|
|
- cancelText:'回到首页',
|
|
|
- confirmText:'查看',
|
|
|
- success: function(resTK) {
|
|
|
- if (resTK.confirm) {
|
|
|
- uni.navigateTo({
|
|
|
- url:'discountDlq'
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
- });
|
|
|
|
|
|
|
|
|
|
|
@@ -671,21 +687,66 @@
|
|
|
var data = res.data;
|
|
|
if(data.loginInfo){
|
|
|
this.userInfo=data.loginInfo.openUser;
|
|
|
+
|
|
|
this.$store.commit('mutationsuserInfo', this.userInfo);
|
|
|
- this.$store.commit('mutationswxOpenData', data.loginInfo)
|
|
|
+ this.$store.commit('mutationswxOpenData', data);
|
|
|
+
|
|
|
uni.setStorage({
|
|
|
key: 'userInfo',
|
|
|
data: data.loginInfo.openUser,
|
|
|
success: function () {
|
|
|
that.getCarList()
|
|
|
that.queryHomeCardList()
|
|
|
- that.queryManagerInfo()
|
|
|
+ that.queryManagerInfo();
|
|
|
+ if(data.loginInfo.discount){
|
|
|
+ that.discount=data.loginInfo.discount;
|
|
|
+ if(that.discount==2){
|
|
|
+ that.bizUserId=data.loginInfo.bizUserId;
|
|
|
+ }
|
|
|
+ if(that.shareID&&that.discount==2){
|
|
|
+ that.getCouponList()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ getCouponList(){
|
|
|
+ if(this.discount!=2){
|
|
|
+ var params={
|
|
|
+ discount:this.discount
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ var params={
|
|
|
+ discount:this.discount,
|
|
|
+ bizId:this.bizUserId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var that=this;
|
|
|
+ this.$http('opencoupon/getCouponList', params, 'GET').then(res => {
|
|
|
+ var list = res.data;
|
|
|
+ if(list.length>0){
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '您有优惠券待领取',
|
|
|
+ cancelText:'回到首页',
|
|
|
+ confirmText:'查看',
|
|
|
+ success: function(resTK) {
|
|
|
+ if (resTK.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'discountDlq?bizUserId='+that.bizUserId+'&discount='+that.discount
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
getCarList(){
|
|
|
this.$http('opencarOwnerHome/queryCarInfoList', {
|
|
|
|