|
@@ -13,7 +13,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
url: '',
|
|
|
-
|
|
|
+ shopId:'',
|
|
|
wxOpendata:'',
|
|
|
logindata:'',
|
|
|
id:'',
|
|
@@ -23,13 +23,52 @@
|
|
|
var that=this;
|
|
|
this.wxOpendata=uni.getStorageSync("wxOpendata");
|
|
|
this.logindata=uni.getStorageSync("logindata");
|
|
|
+ //this.wxOpendata.code='39C455DB5CAF4FD4AE5F3F52EBA8ABD6'
|
|
|
+ //opt.scene='E37BB2965A084534859DB351BA611AF9' //连锁二号
|
|
|
+ //opt.scene='1B43BADDB6704B27B6C1604523287EAF' //连锁一号
|
|
|
+ if(opt.scene){
|
|
|
+ this.shopId=opt.scene;
|
|
|
+ that.shopId=that.insertStr(that.shopId,8,"-");
|
|
|
+ that.shopId=that.insertStr(that.shopId,13,"-");
|
|
|
+ that.shopId=that.insertStr(that.shopId,18,"-");
|
|
|
+ that.shopId=that.insertStr(that.shopId,23,"-");
|
|
|
+ uni.setStorage({
|
|
|
+ key: 'shopId',
|
|
|
+ data: that.shopId,
|
|
|
+ success: function () {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(this.shopId!=this.wxOpendata.shopID){
|
|
|
+ uni.removeStorageSync('wxOpendata');
|
|
|
+ this.wxOpendata=''
|
|
|
+ }
|
|
|
+ }
|
|
|
if (opt.path) {
|
|
|
//this.url = `${this.url}${options.path}`
|
|
|
//this.url = opt.path
|
|
|
console.log('options', opt)
|
|
|
//console.log(opt)
|
|
|
var url=opt.path.replace('$', '?')
|
|
|
-
|
|
|
+ this.shopId=opt.shopId;
|
|
|
+ if(this.shopId!=this.wxOpendata.shopID){
|
|
|
+ if(opt.shareID){
|
|
|
+ var webviewurl=url+'&shareID='+opt.shareID+'&type='+opt.type
|
|
|
+ }else{
|
|
|
+ var webviewurl=url+'&type='+opt.type
|
|
|
+ }
|
|
|
+ var testshopid='1B43BADD-B670-4B27-B6C1-604523287EAF'
|
|
|
+ uni.setStorage({
|
|
|
+ key: 'webviewurl',
|
|
|
+ data: webviewurl,
|
|
|
+ success: function () {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'../login/empower?shopId='+that.shopId
|
|
|
+ })
|
|
|
+ uni.removeStorageSync('wxOpendata');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
if(that.wxOpendata.code){
|
|
|
if(opt.shareID){
|
|
|
var webviewurl=url+"&codeapp="+that.wxOpendata.code+'&shareID='+opt.shareID+'&type='+opt.type+'&isDmsOpen='+that.wxOpendata.isDmsOpen+'&isMarketingOpen='+that.wxOpendata.isMarketingOpen
|
|
@@ -80,7 +119,12 @@
|
|
|
console.log('当前位置的经度是:' + res.longitude);
|
|
|
console.log('当前位置的纬度:' + res.latitude);
|
|
|
if(opt.id){
|
|
|
- that.url=that.$webURL+'paySuccess?orderId='+opt.id+'&hideHeader=true&codeapp='+that.wxOpendata.code+'&lat='+res.latitude+'&lng='+res.longitude+'&isDmsOpen='+that.wxOpendata.isDmsOpen+'&isMarketingOpen='+that.wxOpendata.isMarketingOpen
|
|
|
+ if(opt.type==6){
|
|
|
+ that.url=that.$webURL+'paySuccessPinTuan?id='+opt.id+'&hideHeader=true&codeapp='+that.wxOpendata.code+'&lat='+res.latitude+'&lng='+res.longitude+'&isDmsOpen='+that.wxOpendata.isDmsOpen+'&isMarketingOpen='+that.wxOpendata.isMarketingOpen
|
|
|
+ }else{
|
|
|
+ that.url=that.$webURL+'paySuccess?orderId='+opt.id+'&hideHeader=true&codeapp='+that.wxOpendata.code+'&lat='+res.latitude+'&lng='+res.longitude+'&isDmsOpen='+that.wxOpendata.isDmsOpen+'&isMarketingOpen='+that.wxOpendata.isMarketingOpen
|
|
|
+ }
|
|
|
+
|
|
|
}else{
|
|
|
/* if(!that.wxOpendata.shopID||!that.logindata){
|
|
|
uni.navigateTo({
|
|
@@ -99,7 +143,11 @@
|
|
|
fail(err) {
|
|
|
console.log(err)
|
|
|
if(opt.id){
|
|
|
- that.url=that.$webURL+'paySuccess?orderId='+opt.id+'&hideHeader=true&codeapp='+that.wxOpendata.code+'&lat=""&lng=""'
|
|
|
+ if(opt.type==6){
|
|
|
+ that.url=that.$webURL+'paySuccessPinTuan?id='+opt.id+'&hideHeader=true&codeapp='+that.wxOpendata.code+'&lat=&lng=&isDmsOpen='+that.wxOpendata.isDmsOpen+'&isMarketingOpen='+that.wxOpendata.isMarketingOpen
|
|
|
+ }else{
|
|
|
+ that.url=that.$webURL+'paySuccess?orderId='+opt.id+'&hideHeader=true&codeapp='+that.wxOpendata.code+'&lat=&lng=&isDmsOpen='+that.wxOpendata.isDmsOpen+'&isMarketingOpen='+that.wxOpendata.isMarketingOpen
|
|
|
+ }
|
|
|
}else{
|
|
|
if(!that.wxOpendata.shopID){
|
|
|
uni.navigateTo({
|
|
@@ -108,7 +156,7 @@
|
|
|
}
|
|
|
if(that.wxOpendata.code){
|
|
|
//this.url='http://dms.32che.cn/#/carOwner/index?codeapp='+this.wxOpendata.code+ '&shopId='+this.wxOpendata.shopID
|
|
|
- that.url=that.$webURL+'carOwner/index?codeapp='+that.wxOpendata.code+ '&shopId='+that.wxOpendata.shopID+'&lat=""&lng=""'
|
|
|
+ that.url=that.$webURL+'carOwner/index?codeapp='+that.wxOpendata.code+ '&shopId='+that.wxOpendata.shopID+'&lat=""&lng=""'+'&isDmsOpen='+that.wxOpendata.isDmsOpen+'&isMarketingOpen='+that.wxOpendata.isMarketingOpen
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -137,6 +185,9 @@
|
|
|
goUrl(){
|
|
|
|
|
|
},
|
|
|
+ insertStr(soure, start, newStr){
|
|
|
+ return soure.slice(0, start) + newStr + soure.slice(start);
|
|
|
+ },
|
|
|
message(event){
|
|
|
console.log(event);
|
|
|
let { data } = event.mp.detail
|
|
@@ -153,6 +204,7 @@
|
|
|
}
|
|
|
var obj=JSON.stringify(share) */
|
|
|
var newUrl=this.shareData.path.replace('?', '$')
|
|
|
+ newUrl=newUrl+'&shopId='+this.wxOpendata.shopID
|
|
|
console.log(newUrl)
|
|
|
/*
|
|
|
if (this.shareData) {
|