|
|
@@ -266,8 +266,42 @@ export default {
|
|
|
},
|
|
|
getData(isShow){
|
|
|
return new Promise((resolve, reject) => {
|
|
|
- req.getRequest('/api/match/detail',{id: this.options.id},res => {
|
|
|
+ req.getRequest('/api/match/detail',{id: this.options.id},async res => {
|
|
|
this.detail = res;
|
|
|
+
|
|
|
+ // 外链活动
|
|
|
+ if(this.detail.type==2 && this.detail.text){
|
|
|
+ let url = this.detail.text
|
|
|
+ // 如果打开的分享的销售员微页
|
|
|
+ if(req.getStorage('shareId')){
|
|
|
+ url = url + '?salesno=' + req.getStorage('shareId')
|
|
|
+ }else{
|
|
|
+ // 如果自己是销售员
|
|
|
+ if(req.getStorage('userInfo').saleNo){
|
|
|
+ url = url + '?salesno=' + req.getStorage('userInfo').saleNo
|
|
|
+ }else{
|
|
|
+ //当前绑定的微页或推荐的微页
|
|
|
+ let salesno = await new Promise((r,j)=>{
|
|
|
+ req.getLocation(res => {
|
|
|
+ const to = {
|
|
|
+ latitude: res.latitude,
|
|
|
+ longitude: res.longitude
|
|
|
+ };
|
|
|
+ req.getRequest('/api/visiting/card/recommendCardInfo', to, res => {
|
|
|
+ r(res.jobNumber?res.jobNumber:'')
|
|
|
+ })
|
|
|
+ });
|
|
|
+ })
|
|
|
+ url = url + '?salesno=' + salesno
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/web/web?url='+encodeURIComponent(url)
|
|
|
+ });
|
|
|
+
|
|
|
+ return false
|
|
|
+ }
|
|
|
+
|
|
|
this.isShow = true;
|
|
|
resolve();
|
|
|
},isShow);
|