s_handover.js 1.19 KB
var util = require('../../utils/util.js')
var uri=require('../../utils/uri.js')
Page({
    data:{

    },
    onLoad:function(){
       wx.setNavigationBarTitle({
           title:'转交店铺'
       })
       this.setData({
           sellerid:util.cache('sellerid'),
           openid:util.cache('openid')
       })
    },
    onShow:function(){
        this.getseller();
    },
    getseller:function(){
        var that=this;
        wx.request({
            url: "https://xt.colorcun.com/WechatApi/WechatApi/CreateDcSubQrcode/appid/wx28fa5be22ae0ad55/sellerid/"+that.data.sellerid
            +"/transfer/1",
            header: {
                'content-type': 'application/json'
            },
            success: function(res) {
                if(res.data.data){
                    that.setData({
                        dc_adduser_code:res.data.data
                    })
                }
            }
        })
    },
    // onUnload:function(){
    //     this.getInfo();
    // },
    // getInfo:function(){
    //     util.post(uri.CGI__USER_GETSYSTEMBYOPENID,{openid:this.data.openid},uri.CGI__USER_GETSYSTEMBYOPENID__CODE)
    // },
    netchange:function () {
        this.onShow()
    }
})