• 微信小程序 对接口常用


    @import '../expert/expert.wxss';
     
    FZ._get('https://didu2.didu86.com/issun/index.php/Home/goodstype/selectGoodsTypeAll')
    .then(function (data) {console.log(data)})
    .catch(function (data) { console.log(data)});
     
    wx.navigateTo({
    url: '/pages/detail/detailv?items=' + JSON.stringify(items) +"&&mypic=" +mypic
    })
    <image class='image-full' src='../../../imgs/index/t_icon.png'></image>
     
    <image mode='widthFix' class='img-w' src='../../imgs/wl/wl1.png'></image>
     
    setTimeout(function () {console.log() }, 1500)
     
    let items = e.currentTarget.dataset.items;
    let item = JSON.parse(opt.items);
    let myDate = new Date();
     
    let val = e.detail.value;
    this.setData({})
    
    that.setData({
    user: wx.getStorageSync('user')
    });
     
     
    wx:if="{{==1}}"
     
     
    chargeInto: function () {
    wx.navigateTo({
    url: "/pages/user/chargeintopay/chargeintopay"
    })
    },
    FZ._back({ linkobj: encodeURIComponent(JSON.stringify(linkobj)), type: 1 })
     
    let pData= FZ._pdata();
    if (pData){
    console.log(pData)
    console.log(JSON.parse(decodeURIComponent(pData.linkobj)))

    if (pData.type == 1) {
    nailItem.link.push(JSON.parse(decodeURIComponent(pData.linkobj)))
    console.log(nailItem)
    this.setData({ nailItem })
    } else {

    }
    }
     
    wx.switchTab({
    url: "/pages/user/index"
    })
     
    wx.showToast({
    title: '登录成功',
    icon: 'success',
    duration: 1000
    })
     
    setTimeout(function () {
     
    }, 1000);
     
    post请求-----------------------------------------
    wx.setStorageSync('user', result)
     
    let user = wx.getStorageSync('user');
     
    let that = this;
     
    post请求-----------------------------------------
    wx.request({
    header: {
    "Content-Type": "application/x-www-form-urlencoded"
    },
    method: "POST",
    url: app.globalData.hpUrl + 'User/userAllRegister',
    data: {
    typenum: selectArr[selectIndex],
    phone: loveChe.hphone,
    password: loveChe.hpwd
    },
    success: function (res) {
    var result = res.data;
    
    console.log(res)
     
    }
    }
    });
     
     
    updateUser:function(){
    // 更新数据
    wx.request({
    url: app.globalData.hpUrl + 'User/userFind', //仅为示例,并非真实的接口地址
    header: {
    "Content-Type": "application/x-www-form-urlencoded"
    },
    method: "POST",
    data: {
    id: result,
    },
    success: function (res) {
    let result = res.data;
    // console.log(res)
    if (result) {
    wx.setStorageSync('user', result)
    wx.showToast({
    title: '注册成功',
    icon: 'success',
    duration: 1000
    })
    setTimeout(function () {
    wx.switchTab({
    url: "/pages/user/user"
    })
    }, 1000);
    }
    
    }
    })
    },
     
     
  • 相关阅读:
    server域名与IIS的目录安全性
    机械臂生成URDF文件操作过程
    ROS2 学习参考链接
    solidworks 导入urdf 到ubuntu 在rviz 和 gazebo 显示
    vscode koroFileHeader插件配置
    python 获取当前类中非私有方法
    solidworks 导出urdf 在python ikpy库 使用注意点
    solidworks 打开step 文件并导出文件
    ikpy joint和 link区别
    python 导入包错误
  • 原文地址:https://www.cnblogs.com/dianzan/p/8359505.html
Copyright © 2020-2023  润新知