Commit cb7a88028feea421fe6b88aae2faa5814dc84296

Authored by vking
1 parent 3454ba2f

taocan-share

@@ -93,10 +93,19 @@ Page({ @@ -93,10 +93,19 @@ Page({
93 async taocanInitScene(){ 93 async taocanInitScene(){
94 if(this.options.scene){ 94 if(this.options.scene){
95 //解析scene追加到options 95 //解析scene追加到options
  96 + let res=await App.Customer.GetWxLiteCodeInfo({str_code:this.options.scene})
  97 + let scene=JSON.parse(res.data.scene)
  98 + this.options={...this.options,...scene}
  99 + console.log('this.options',this.options)
96 } 100 }
97 //fromid存在则设置推荐关系 101 //fromid存在则设置推荐关系
98 - if(this.options.fromid){  
99 - 102 + if(this.options.fromid) {
  103 + App.Customer.SetShareRel({
  104 + sid:this.options.sid,
  105 + fid:this.options.pid,
  106 + openid_main:this.options.fromid,
  107 + openid_cover:await getApp().getOpenid(),
  108 + })
100 } 109 }
101 }, 110 },
102 async taocanInit(){ 111 async taocanInit(){
@@ -67,12 +67,12 @@ Page({ @@ -67,12 +67,12 @@ Page({
67 this.qrcode=await util.http_build_query({ 67 this.qrcode=await util.http_build_query({
68 page:'pages/taocan/index', 68 page:'pages/taocan/index',
69 path:'pages/taocan/index', 69 path:'pages/taocan/index',
70 - param:JSON.stringify({ 70 + scene:JSON.stringify({
71 sid:options.sid, 71 sid:options.sid,
72 pid:options.pid, 72 pid:options.pid,
73 fromid:openid, 73 fromid:openid,
74 }) 74 })
75 - },util.cgi('App.System.GetWxLiteCode')) 75 + },util.cgi('App.Customer.GetWxLiteCodeByShare'))
76 this.initImage() 76 this.initImage()
77 }, 77 },
78 initImage(){ 78 initImage(){
@@ -515,6 +515,12 @@ export default { @@ -515,6 +515,12 @@ export default {
515 //根据账单ID获取账单详情 515 //根据账单ID获取账单详情
516 'App.Foodset.GetFoodOrdersDetail':null, 516 'App.Foodset.GetFoodOrdersDetail':null,
517 517
  518 + //根据唯一code获取相关参数
  519 + 'App.Customer.GetWxLiteCodeInfo':null,
  520 +
  521 + //分享关系记录
  522 + 'App.Customer.SetShareRel':null,
  523 +
518 //获取商家优惠对接人信息 524 //获取商家优惠对接人信息
519 'App.Customer.GetSellerPreferentialDocking':null, 525 'App.Customer.GetSellerPreferentialDocking':null,
520 //接单人,获得商家设置的接单人列表 526 //接单人,获得商家设置的接单人列表