放弃吧 孩子. 我老板的刀也快摁不住了
setData有延迟老板要把我炒了- 需求的场景描述(希望解决的问题) 要做一个左右滑动的刷新动画 开发者工具里还好点,但是手机上调试时 scroll-view的scrolltoupper和scrolltolower里setdata有延迟 view的话touchstart和toucheend里setdata也有延迟 滑动时左右两边弹性框延迟出现 老板说做不出来就要把我炒了 - 希望提供的能力 跟上下拉刷新一样的左右拉刷新
2018-10-23求各位老大帮助. 老板的刀我摁不住了
小程序有关于引入第三方JS问题;(老板的刀已经摁住.问题已经解决参考请有序入场)当第三方接入 第三方接口调度了wx.request的时候. 请注意 一定要添加域名白名单; 在调试中;不需要任何白名单即可调试成功; -----------------------------------------------------------老板的刀块摁不住了.. T.T!!!! - 需求的场景描述(希望解决的问题) 小程序 因为没有业务接口可以直接获取定位地址的.都要选填.我们要实现自动定位的功能. 也就是一进主页就可以完成自动定位.也就实现这个效果. 以下为配图 但是在测试中出现问题了 [图片] 在测试中. 我们小程序上传了体验版 在正常访问的时候 好像调不出来. 授权之后.. 就再也没了反应.. 如果开启了调试模式 又一切正常.. 关闭调试模式又调不到方法;... 场景如下: [图片]打开调试.正常访问..一切正常.... [图片] 关闭调试. [图片] 仿佛调不到接口似得... 我这都不知道出了什么问题..调试都调不出来.. 在此. 把地图反馈那个接口反馈放上来. 该地图接口为腾讯地图.; 我担心如果上传上去正式 地图调不起来.我本地测试没问题; 在体验版打开小程序调试 [代码]/**[代码][代码] [代码][代码]* 微信小程序JavaScriptSDK[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* @version 1.0[代码][代码] [代码][代码]* @date 2017-01-10[代码][代码] [代码][代码]* @author jaysonzhou@tencent.com[代码][代码] [代码][代码]*/[代码] [代码]var[代码] [代码]ERROR_CONF = {[代码][代码] [代码][代码]KEY_ERR: 311,[代码][代码] [代码][代码]KEY_ERR_MSG: [代码][代码]'key格式错误'[代码][代码],[代码][代码] [代码][代码]PARAM_ERR: 310,[代码][代码] [代码][代码]PARAM_ERR_MSG: [代码][代码]'请求参数信息有误'[代码][代码],[代码][代码] [代码][代码]SYSTEM_ERR: 600,[代码][代码] [代码][代码]SYSTEM_ERR_MSG: [代码][代码]'系统错误'[代码][代码],[代码][代码] [代码][代码]WX_ERR_CODE: 1000,[代码][代码] [代码][代码]WX_OK_CODE: 200[代码][代码]};[代码][代码]var[代码] [代码]BASE_URL = [代码][代码]'https://apis.map.qq.com/ws/'[代码][代码];[代码][代码]var[代码] [代码]URL_SEARCH = BASE_URL + [代码][代码]'place/v1/search'[代码][代码];[代码][代码]var[代码] [代码]URL_SUGGESTION = BASE_URL + [代码][代码]'place/v1/suggestion'[代码][代码];[代码][代码]var[代码] [代码]URL_GET_GEOCODER = BASE_URL + [代码][代码]'geocoder/v1/'[代码][代码];[代码][代码]var[代码] [代码]URL_CITY_LIST = BASE_URL + [代码][代码]'district/v1/list'[代码][代码];[代码][代码]var[代码] [代码]URL_AREA_LIST = BASE_URL + [代码][代码]'district/v1/getchildren'[代码][代码];[代码][代码]var[代码] [代码]URL_DISTANCE = BASE_URL + [代码][代码]'distance/v1/'[代码][代码];[代码][代码]var[代码] [代码]Utils = {[代码][代码] [代码][代码]/**[代码][代码] [代码][代码]* 得到终点query字符串[代码][代码] [代码][代码]* @param {Array|String} 检索数据[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]location2query(data) {[代码][代码] [代码][代码]if[代码] [代码]([代码][代码]typeof[代码] [代码]data == [代码][代码]'string'[代码][代码]) {[代码][代码] [代码][代码]return[代码] [代码]data;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]var[代码] [代码]query = [代码][代码]''[代码][代码];[代码][代码] [代码][代码]for[代码] [代码]([代码][代码]var[代码] [代码]i = 0; i < data.length; i++) {[代码][代码] [代码][代码]var[代码] [代码]d = data[i];[代码][代码] [代码][代码]if[代码] [代码](!!query) {[代码][代码] [代码][代码]query += [代码][代码]';'[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]if[代码] [代码](d.location) {[代码][代码] [代码][代码]query = query + d.location.lat + [代码][代码]','[代码] [代码]+ d.location.lng;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]if[代码] [代码](d.latitude && d.longitude) {[代码][代码] [代码][代码]query = query + d.latitude + [代码][代码]','[代码] [代码]+ d.longitude;[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]query;[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 使用微信接口进行定位[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]getWXLocation(success, fail, complete) {[代码][代码] [代码][代码]wx.getLocation({[代码][代码] [代码][代码]type: [代码][代码]'gcj02'[代码][代码],[代码][代码] [代码][代码]success: success,[代码][代码] [代码][代码]fail: fail,[代码][代码] [代码][代码]complete: complete[代码][代码] [代码][代码]});[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 获取location参数[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]getLocationParam(location) {[代码][代码] [代码][代码]if[代码] [代码]([代码][代码]typeof[代码] [代码]location == [代码][代码]'string'[代码][代码]) {[代码][代码] [代码][代码]var[代码] [代码]locationArr = location.split([代码][代码]','[代码][代码]);[代码][代码] [代码][代码]if[代码] [代码](locationArr.length === 2) {[代码][代码] [代码][代码]location = {[代码][代码] [代码][代码]latitude: location.split([代码][代码]','[代码][代码])[0],[代码][代码] [代码][代码]longitude: location.split([代码][代码]','[代码][代码])[1][代码][代码] [代码][代码]};[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]location = {};[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]location;[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 回调函数默认处理[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]polyfillParam(param) {[代码][代码] [代码][代码]param.success = param.success || [代码][代码]function[代码] [代码]() { };[代码][代码] [代码][代码]param.fail = param.fail || [代码][代码]function[代码] [代码]() { };[代码][代码] [代码][代码]param.complete = param.complete || [代码][代码]function[代码] [代码]() { };[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 验证param对应的key值是否为空[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* @param {Object} param 接口参数[代码][代码] [代码][代码]* @param {String} key 对应参数的key[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]checkParamKeyEmpty(param, key) {[代码][代码] [代码][代码]if[代码] [代码](!param[key]) {[代码][代码] [代码][代码]var[代码] [代码]errconf = [代码][代码]this[代码][代码].buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + key +[代码][代码]'参数格式有误'[代码][代码]);[代码][代码] [代码][代码]param.fail(errconf);[代码][代码] [代码][代码]param.complete(errconf);[代码][代码] [代码][代码]return[代码] [代码]true[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]false[代码][代码];[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 验证参数中是否存在检索词keyword[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* @param {Object} param 接口参数[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]checkKeyword(param){[代码][代码] [代码][代码]return[代码] [代码]![代码][代码]this[代码][代码].checkParamKeyEmpty(param, [代码][代码]'keyword'[代码][代码]);[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 验证location值[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* @param {Object} param 接口参数[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]checkLocation(param) {[代码][代码] [代码][代码]var[代码] [代码]location = [代码][代码]this[代码][代码].getLocationParam(param.location);[代码][代码] [代码][代码]if[代码] [代码](!location || !location.latitude || !location.longitude) {[代码][代码] [代码][代码]var[代码] [代码]errconf = [代码][代码]this[代码][代码].buildErrorConfig(ERROR_CONF.PARAM_ERR, ERROR_CONF.PARAM_ERR_MSG + [代码][代码]' location参数格式有误'[代码][代码])[代码][代码] [代码][代码]param.fail(errconf);[代码][代码] [代码][代码]param.complete(errconf);[代码][代码] [代码][代码]return[代码] [代码]false[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]true[代码][代码];[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 构造错误数据结构[代码][代码] [代码][代码]* @param {Number} errCode 错误码[代码][代码] [代码][代码]* @param {Number} errMsg 错误描述[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]buildErrorConfig(errCode, errMsg) {[代码][代码] [代码][代码]return[代码] [代码]{[代码][代码] [代码][代码]status: errCode,[代码][代码] [代码][代码]message: errMsg[代码][代码] [代码][代码]};[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 构造微信请求参数,公共属性处理[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* @param {Object} param 接口参数[代码][代码] [代码][代码]* @param {Object} param 配置项[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]buildWxRequestConfig(param, options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options.header = { [代码][代码]"content-type"[代码][代码]: [代码][代码]"application/json"[代码] [代码]};[代码][代码] [代码][代码]options.method = [代码][代码]'GET'[代码][代码];[代码][代码] [代码][代码]options.success = [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]var[代码] [代码]data = res.data;[代码][代码] [代码][代码]if[代码] [代码](data.status === 0) {[代码][代码] [代码][代码]param.success(data);[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]param.fail(data);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]};[代码][代码] [代码][代码]options.fail = [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]res.statusCode = ERROR_CONF.WX_ERR_CODE;[代码][代码] [代码][代码]param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, result.errMsg));[代码][代码] [代码][代码]};[代码][代码] [代码][代码]options.complete = [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]var[代码] [代码]statusCode = +res.statusCode;[代码][代码] [代码][代码]switch[代码][代码](statusCode) {[代码][代码] [代码][代码]case[代码] [代码]ERROR_CONF.WX_ERR_CODE: {[代码][代码] [代码][代码]param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]case[代码] [代码]ERROR_CONF.WX_OK_CODE: {[代码][代码] [代码][代码]var[代码] [代码]data = res.data;[代码][代码] [代码][代码]if[代码] [代码](data.status === 0) {[代码][代码] [代码][代码]param.complete(data);[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]param.complete(that.buildErrorConfig(data.status, data.message));[代码][代码] [代码][代码]}[代码][代码] [代码][代码]break[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]default[代码][代码]:{[代码][代码] [代码][代码]param.complete(that.buildErrorConfig(ERROR_CONF.SYSTEM_ERR, ERROR_CONF.SYSTEM_ERR_MSG));[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]return[代码] [代码]options;[代码][代码] [代码][代码]},[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 处理用户参数是否传入坐标进行不同的处理[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]locationProcess(param, locationsuccess, locationfail, locationcomplete) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]locationfail = locationfail || [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]res.statusCode = ERROR_CONF.WX_ERR_CODE;[代码][代码] [代码][代码]param.fail(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));[代码][代码] [代码][代码]};[代码][代码] [代码][代码]locationcomplete = locationcomplete || [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]if[代码] [代码](res.statusCode == ERROR_CONF.WX_ERR_CODE) {[代码][代码] [代码][代码]param.complete(that.buildErrorConfig(ERROR_CONF.WX_ERR_CODE, res.errMsg));[代码][代码] [代码][代码]}[代码][代码] [代码][代码]};[代码][代码] [代码][代码]if[代码] [代码](!param.location) {[代码][代码] [代码][代码]that.getWXLocation(locationsuccess, locationfail, locationcomplete);[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]if[代码] [代码](that.checkLocation(param)) {[代码][代码] [代码][代码]var[代码] [代码]location = Utils.getLocationParam(param.location);[代码][代码] [代码][代码]locationsuccess(location);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码]}[代码] [代码]class QQMapWX {[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 构造函数[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* @param {Object} options 接口参数,key 为必选参数[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]constructor(options) {[代码][代码] [代码][代码]if[代码] [代码](!options.key) {[代码][代码] [代码][代码]throw[代码] [代码]Error([代码][代码]'key值不能为空'[代码][代码]);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]this[代码][代码].key = options.key;[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* POI周边检索[代码][代码] [代码][代码]*[代码][代码] [代码][代码]* @param {Object} options 接口参数对象[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* 参数对象结构可以参考[代码][代码] [代码][代码]* @see http://lbs.qq.com/webservice_v1/guide-search.html[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]search(options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options = options || {};[代码] [代码] [代码][代码]Utils.polyfillParam(options);[代码] [代码] [代码][代码]if[代码] [代码](!Utils.checkKeyword(options)) {[代码][代码] [代码][代码]return[代码][代码];[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]requestParam = {[代码][代码] [代码][代码]keyword: options.keyword,[代码][代码] [代码][代码]orderby: options.orderby || [代码][代码]'_distance'[代码][代码],[代码][代码] [代码][代码]page_size: options.page_size || 10,[代码][代码] [代码][代码]page_index: options.page_index || 1,[代码][代码] [代码][代码]output: [代码][代码]'json'[代码][代码],[代码][代码] [代码][代码]key: that.key[代码][代码] [代码][代码]};[代码] [代码] [代码][代码]if[代码] [代码](options.address_format) {[代码][代码] [代码][代码]requestParam.address_format = options.address_format;[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]if[代码] [代码](options.filter) {[代码][代码] [代码][代码]requestParam.filter = options.filter;[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]distance = options.distance || [代码][代码]"1000"[代码][代码];[代码][代码] [代码][代码]var[代码] [代码]auto_extend = options.auto_extend || 1;[代码] [代码] [代码][代码]var[代码] [代码]locationsuccess = [代码][代码]function[代码] [代码](result) {[代码][代码] [代码][代码]requestParam.boundary = [代码][代码]"nearby("[代码] [代码]+ result.latitude + [代码][代码]","[代码] [代码]+ result.longitude + [代码][代码]","[代码] [代码]+ distance + [代码][代码]","[代码] [代码]+ auto_extend +[代码][代码]")"[代码][代码];[代码][代码] [代码][代码]wx.request(Utils.buildWxRequestConfig(options, {[代码][代码] [代码][代码]url: URL_SEARCH,[代码][代码] [代码][代码]data: requestParam[代码][代码] [代码][代码]}));[代码][代码] [代码][代码]}[代码][代码] [代码][代码]Utils.locationProcess(options, locationsuccess);[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* sug模糊检索[代码][代码] [代码][代码]*[代码][代码] [代码][代码]* @param {Object} options 接口参数对象[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* 参数对象结构可以参考[代码][代码] [代码][代码]* http://lbs.qq.com/webservice_v1/guide-suggestion.html[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]getSuggestion(options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options = options || {};[代码][代码] [代码][代码]Utils.polyfillParam(options);[代码] [代码] [代码][代码]if[代码] [代码](!Utils.checkKeyword(options)) {[代码][代码] [代码][代码]return[代码][代码];[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]requestParam = {[代码][代码] [代码][代码]keyword: options.keyword,[代码][代码] [代码][代码]region: options.region || [代码][代码]'全国'[代码][代码],[代码][代码] [代码][代码]region_fix: options.region_fix || 0,[代码][代码] [代码][代码]policy: options.policy || 0,[代码][代码] [代码][代码]output: [代码][代码]'json'[代码][代码],[代码][代码] [代码][代码]key: that.key[代码][代码] [代码][代码]};[代码][代码] [代码][代码]wx.request(Utils.buildWxRequestConfig(options, {[代码][代码] [代码][代码]url: URL_SUGGESTION,[代码][代码] [代码][代码]data: requestParam[代码][代码] [代码][代码]}));[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 逆地址解析[代码][代码] [代码][代码]*[代码][代码] [代码][代码]* @param {Object} options 接口参数对象[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* 请求参数结构可以参考[代码][代码] [代码][代码]* http://lbs.qq.com/webservice_v1/guide-gcoder.html[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]reverseGeocoder(options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options = options || {};[代码][代码] [代码][代码]Utils.polyfillParam(options);[代码][代码] [代码][代码]var[代码] [代码]requestParam = {[代码][代码] [代码][代码]coord_type: options.coord_type || 5,[代码][代码] [代码][代码]get_poi: options.get_poi || 0,[代码][代码] [代码][代码]output: [代码][代码]'json'[代码][代码],[代码][代码] [代码][代码]key: that.key[代码][代码] [代码][代码]};[代码][代码] [代码][代码]if[代码] [代码](options.poi_options) {[代码][代码] [代码][代码]requestParam.poi_options = options.poi_options[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]locationsuccess = [代码][代码]function[代码] [代码](result) {[代码][代码] [代码][代码]requestParam.location = result.latitude + [代码][代码]','[代码] [代码]+ result.longitude;[代码][代码] [代码][代码]wx.request(Utils.buildWxRequestConfig(options, {[代码][代码] [代码][代码]url: URL_GET_GEOCODER,[代码][代码] [代码][代码]data: requestParam[代码][代码] [代码][代码]}));[代码][代码] [代码][代码]};[代码][代码] [代码][代码]Utils.locationProcess(options, locationsuccess);[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 地址解析[代码][代码] [代码][代码]*[代码][代码] [代码][代码]* @param {Object} options 接口参数对象[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* 请求参数结构可以参考[代码][代码] [代码][代码]* http://lbs.qq.com/webservice_v1/guide-geocoder.html[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]geocoder(options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options = options || {};[代码][代码] [代码][代码]Utils.polyfillParam(options);[代码] [代码] [代码][代码]if[代码] [代码](Utils.checkParamKeyEmpty(options, [代码][代码]'address'[代码][代码])) {[代码][代码] [代码][代码]return[代码][代码];[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]requestParam = {[代码][代码] [代码][代码]address: options.address,[代码][代码] [代码][代码]output: [代码][代码]'json'[代码][代码],[代码][代码] [代码][代码]key: that.key[代码][代码] [代码][代码]};[代码] [代码] [代码][代码]wx.request(Utils.buildWxRequestConfig(options, {[代码][代码] [代码][代码]url: URL_GET_GEOCODER,[代码][代码] [代码][代码]data: requestParam[代码][代码] [代码][代码]}));[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 获取城市列表[代码][代码] [代码][代码]*[代码][代码] [代码][代码]* @param {Object} options 接口参数对象[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* 请求参数结构可以参考[代码][代码] [代码][代码]* http://lbs.qq.com/webservice_v1/guide-region.html[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]getCityList(options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options = options || {};[代码][代码] [代码][代码]Utils.polyfillParam(options);[代码][代码] [代码][代码]var[代码] [代码]requestParam = {[代码][代码] [代码][代码]output: [代码][代码]'json'[代码][代码],[代码][代码] [代码][代码]key: that.key[代码][代码] [代码][代码]};[代码] [代码] [代码][代码]wx.request(Utils.buildWxRequestConfig(options, {[代码][代码] [代码][代码]url: URL_CITY_LIST,[代码][代码] [代码][代码]data: requestParam[代码][代码] [代码][代码]}));[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 获取对应城市ID的区县列表[代码][代码] [代码][代码]*[代码][代码] [代码][代码]* @param {Object} options 接口参数对象[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* 请求参数结构可以参考[代码][代码] [代码][代码]* http://lbs.qq.com/webservice_v1/guide-region.html[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]getDistrictByCityId(options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options = options || {};[代码][代码] [代码][代码]Utils.polyfillParam(options);[代码] [代码] [代码][代码]if[代码] [代码](Utils.checkParamKeyEmpty(options, [代码][代码]'id'[代码][代码])) {[代码][代码] [代码][代码]return[代码][代码];[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]requestParam = {[代码][代码] [代码][代码]id: options.id || [代码][代码]''[代码][代码],[代码][代码] [代码][代码]output: [代码][代码]'json'[代码][代码],[代码][代码] [代码][代码]key: that.key[代码][代码] [代码][代码]};[代码] [代码] [代码][代码]wx.request(Utils.buildWxRequestConfig(options, {[代码][代码] [代码][代码]url: URL_AREA_LIST,[代码][代码] [代码][代码]data: requestParam[代码][代码] [代码][代码]}));[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]/**[代码][代码] [代码][代码]* 用于单起点到多终点的路线距离(非直线距离)计算:[代码][代码] [代码][代码]* 支持两种距离计算方式:步行和驾车。[代码][代码] [代码][代码]* 起点到终点最大限制直线距离10公里。[代码][代码] [代码][代码]*[代码][代码] [代码][代码]* @param {Object} options 接口参数对象[代码][代码] [代码][代码]* [代码][代码] [代码][代码]* 请求参数结构可以参考[代码][代码] [代码][代码]* http://lbs.qq.com/webservice_v1/guide-distance.html[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]calculateDistance(options) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]options = options || {};[代码][代码] [代码][代码]Utils.polyfillParam(options);[代码] [代码] [代码][代码]if[代码] [代码](Utils.checkParamKeyEmpty(options, [代码][代码]'to'[代码][代码])) {[代码][代码] [代码][代码]return[代码][代码];[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]var[代码] [代码]requestParam = {[代码][代码] [代码][代码]mode: options.mode || [代码][代码]'walking'[代码][代码],[代码][代码] [代码][代码]to: Utils.location2query(options.to),[代码][代码] [代码][代码]output: [代码][代码]'json'[代码][代码],[代码][代码] [代码][代码]key: that.key[代码][代码] [代码][代码]};[代码] [代码] [代码][代码]var[代码] [代码]locationsuccess = [代码][代码]function[代码] [代码](result) {[代码][代码] [代码][代码]requestParam.from = result.latitude + [代码][代码]','[代码] [代码]+ result.longitude;[代码][代码] [代码][代码]wx.request(Utils.buildWxRequestConfig(options, {[代码][代码] [代码][代码]url: URL_DISTANCE,[代码][代码] [代码][代码]data: requestParam[代码][代码] [代码][代码]}));[代码][代码] [代码][代码]}[代码][代码] [代码][代码]if[代码] [代码](options.from) {[代码][代码] [代码][代码]options.location = options.from;[代码][代码] [代码][代码]}[代码][代码] [代码] [代码] [代码][代码]Utils.locationProcess(options, locationsuccess);[代码][代码] [代码][代码]}[代码][代码]}[代码] [代码]module.exports = QQMapWX;[代码] - 希望提供的能力 出现这情况 .不知道怎么解决了!
2018-09-07我这里出现了一个这种情况 我这边程序生成订单 都是支付后生产的.. 我有发现 一种现象. 用户支付钱之后 并没有生产订单. 好像从来没调度那个方法一样. 导致丢单..
有关于小程序支付的wx.requestPayment({})在wx.requestPayment({})接口当中. 成功是否一定会调度 success
2018-08-17[图片] 现在审核出现这个内容. 说我商品不符合.. 是哪件商品不符合呢?我们卖的都是酒水类的.. 全部由厂家封装好. 我们是快销品行业. 哪件商品不符合. 请说明一下. 我现在就下架..
屯货网再此恳求审核团的大哥大姐们不要卡主我们的审核.<我不是程序员>我们公司自主研发的<屯货网> 请求不要卡主我们的审核.我们是有主体内容的..大哥..大姐. 您们直接搜索 <屯货网>. 是可以看得到的啊... 恳求您们. 我发布了三次 拒绝了我三次.. 为了发布.. 我觉我都没睡.. 我不想老板催我..我想发布.. 谁家没有一个打工仔.. 你能保证一辈子不打工嘛?我不想睡觉,我想通过审核.... 您们看. 还要我怎么修改嘛... 是不是我们的首页有没有东西 我们自己不知道..... 审核团大佬们... 放我们一条活路吧.... 以下附上小程序测试页面.. [图片] [图片] [图片]
2018-08-14看到的兄弟 审核没通过的兄弟 请给我的贴顶一个. 我不是程序员!
屯货网再此恳求审核团的大哥大姐们不要卡主我们的审核.<我不是程序员>我们公司自主研发的<屯货网> 请求不要卡主我们的审核.我们是有主体内容的..大哥..大姐. 您们直接搜索 <屯货网>. 是可以看得到的啊... 恳求您们. 我发布了三次 拒绝了我三次.. 为了发布.. 我觉我都没睡.. 我不想老板催我..我想发布.. 谁家没有一个打工仔.. 你能保证一辈子不打工嘛?我不想睡觉,我想通过审核.... 您们看. 还要我怎么修改嘛... 是不是我们的首页有没有东西 我们自己不知道..... 审核团大佬们... 放我们一条活路吧.... 一下附上小程序测试页面.. [图片] [图片] [图片]
2018-08-14我的也是 很无奈
小程序审核不通过个人小程序用微信赞赏码来打赏的,之前都是可以通过的,而且是只来让用户来打赏自己,为什么现在无法通过了?
2018-08-14