按照说明来部署腾讯云,但登录时收到了这样的信息。是说mysql的无法授权么?mac版v1.01.170907编译模拟器无法显示&微信小程序教程。
这个比较奇怪, 因为通过浏览器单独访问是没有问题的。
LoginError {type: "ERR_LOGIN_MISSING_SESSION", message: "{"code":-1,"error":"ERR_WHEN_INSERT_TO_DB\nError: …r user 'root'@'localhost' (using password: YES)"}"}message: "{"code":-1,"error":"ERR_WHEN_INSERT_TO_DB\nError: ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'localhost' (using password: YES)"}"type: "ERR_LOGIN_MISSING_SESSION"__proto__: Error
at http://1783067285.appservice.open.weixin.qq.com/vendor/wafer2-client-sdk/lib/login.js:18:28
at http://1783067285.appservice.open.weixin.qq.com/vendor/wafer2-client-sdk/lib/login.js:22:2
at require (http://1783067285.appservice.open.weixin.qq.com/appservice:26:21982)
at http://1783067285.appservice.open.weixin.qq.com/appservice:26:21731
at http://1783067285.appservice.open.weixin.qq.com/vendor/wafer2-client-sdk/index.js:4:13
at require (http://1783067285.appservice.open.weixin.qq.com/appservice:26:21982)
at http://1783067285.appservice.open.weixin.qq.com/appservice:26:21731
at http://1783067285.appservice.open.weixin.qq.com/app.js:7:14
at require (http://1783067285.appservice.open.weixin.qq.com/appservice:26:21982)
at http://1783067285.appservice.open.weixin.qq.com/appservice:37:9
/server/config.js
mysql: {
host: 'localhost',
port: 3306,
user: 'root',
db: 'cAuth',
pass: 'xxxxxxxxxxxxxx',//密码没有问题,已经通过腾讯云验证
char: 'utf8mb4'
},
/client/config.js
var host = 'xxxxxxxxxx';
var config = {
// 下面的地址配合云端 Demo 工作
service: {
host,
// 登录地址,用于建立会话
loginUrl: `https://${host}/weapp/login`,
// 测试的请求地址,用于测试会话
requestUrl: `https://${host}/weapp/user`,
// 测试的信道服务地址
tunnelUrl: `https://${host}/weapp/tunnel`,
// 上传图片接口
uploadUrl: `https://${host}/weapp/upload`
}
};
微信小程序开发问题解答 本文来自微信小程序工厂 http://www.xcxgc.com,转载请保留。
本文网址:http://www.91bianli.com/weixinxiaochengxu/30363.html