除了用了一点第三方自定义组件,别的都是原生的
大家觉得小程序哪个框架好用呢?最近都在学习着小程序只是用了原生的mina框架,想尝试下不同的框架,大家有好的推荐吗,或者有大神的经验之谈也不错。
2018-10-16等一会儿就能搜索到了,我第一次发布也是这样
小程序名称在微信端搜索不到你好,我公司目前的小程序的代码发布已经审核成功了,现在的问题是搜索小程序的名称“贵阳新美艺印象”搜索不到呢,只能用小程序的二维码进行访问,请问怎么解决呢? 求大神尽快帮我解决下呢,谢谢!
2018-09-11不是v1.02.1809101吗
为什么今天更新之后没有创建 “云开发 QuickStart 项目”[图片] [图片] ??????说好的 “云开发 QuickStart 项目” 呢????
2018-09-11服务器域名,业务域名添加了吗
小程序有关于引入第三方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-11是在微信公众平台上:https://mp.weixin.qq.com/ 把你要加的人加入开发组,用户身份-》编辑-》添加成员
微信开发者工具上的预览出来的二维码 有什么办法让别人也能扫码就能玩微信开发者工具上的预览出来的二维码 有什么办法让别人也能扫码就能玩
2018-09-11