/* 小程序配置文件*/var host = "http://192.168.102.117:8080/sg/xcx/";function allrequest(url, data, resp) {  wx.request({    url: host + config[url],    data: data,    header: {      'content-type': 'application/x-www-form-urlencoded'    },    method: 'POST',    success: res = {      if (res.data.success == 0) {        wx.showToast({          title: res.data.errorMsg,          icon: 'none',          duration: 1000        })      } else {        resp(res)      }    }  })}var config = {  host,  // 登录  login: 'member/login.action',};module.exports = {  allrequest}var config = require('../../config.js');var app = getApp();// 调用请求config.allrequest('updateCancelAppoint', {    access_code: app.globalData.access_code}, (res) = {})

 

TAG标签: 微信小程序qqsg论坛

http://www.xiaochengxub.com/read-100392.html