提交 285236c9 编写于 作者: DCloud_JSON's avatar DCloud_JSON

- 修复微信小程序绑定手机号失败的问题

上级 0ceaaaa4
## 1.2.7(2022-08-10)
- 修复微信小程序绑定手机号失败的问题
## 1.2.6(2022-06-29)
- 支持 ios 安全区
## 1.2.5(2022-05-29)
......
......@@ -71,7 +71,7 @@
},
bindMobileByMpWeixin(e) {
console.log(e.detail);
if(e.errMsg == "getPhoneNumber:ok"){
if(e.detail.errMsg == "getPhoneNumber:ok"){
uniCloud.callFunction({
name: "uni-id-cf",
data: {
......
{
"name" : "uni-starter",
"appid" : "__UNI__EC87F46",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
"name": "uni-starter",
"appid": "请点击重新获取",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"app-plus": {
"usingComponents": true,
"nvueStyleCompiler": "uni-app",
"compilerVersion": 3,
"splashscreen": {
"alwaysShowBeforeRender": true,
"waiting": true,
"autoclose": true,
"delay": 0
},
/* 模块配置 */
"modules" : {},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
"android" : {
"permissions" : [
"modules": {
},
"distribute": {
"android": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
......@@ -40,33 +37,38 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {}
"ios": {
},
"sdkConfigs": {
}
}
},
/* 快应用特有相关 */
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
"quickapp": {
},
"usingComponents" : true
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
},
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "用于提供应用算法支持"
}
}
},
"mp-alipay" : {
"usingComponents" : true
"mp-alipay": {
"usingComponents": true
},
"mp-baidu" : {
"usingComponents" : true
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao" : {
"usingComponents" : true
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics" : {
"enable" : false
"uniStatistics": {
"enable": false
},
"vueVersion" : "2"
"vueVersion": "2",
"_spaceID": ""
}
\ No newline at end of file
{
"id": "uni-starter",
"displayName": "uni-starter",
"version": "1.2.6",
"version": "1.2.7",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"login",
......@@ -15,10 +15,6 @@
"HBuilderX": "^3.2.6"
},
"dcloudext": {
"category": [
"uniCloud",
"云端一体项目模板"
],
"sale": {
"regular": {
"price": "0.00"
......@@ -35,7 +31,8 @@
"data": "无",
"permissions": "无"
},
"npmurl": ""
"npmurl": "",
"type": "unicloud-template-project"
},
"uni_modules": {
"dependencies": [
......
// "文件路径" : {"键名":"改成什么"}
{
"/manifest.json": {
"appid": "请点击重新获取" ,//清空appid
"appid": "请点击重新获取",
"mp-weixin" : {
"appid" : ""
},
......
//脚本文件目录 __dirname
//运行脚本的目录,即:项目的目录 process.cwd()
//配置文件
const fs = require('fs'),
Hjson = require('hjson'),
config = Hjson.rt.parse(fs.readFileSync(__dirname+'/config.js', 'utf-8'))
const change_after = require('./change_after')
const change_after = require('./change_after')
if(process.argv[2] == 'change'){
change(config,()=>{
console.log('脚本change已经执行成功');
......@@ -26,7 +26,7 @@ function change(config,callback){
//保持原文件名先备份一份到/uni_modules_tools/copy目录下,然后再覆盖
writeFileRecursive(copyPath, fileText, function(err) { //创建目录并写入文件
if (err) {
return console.log(err);
return console.log({err});
}
//改写
let HfileObj = Hjson.rt.parse(fileText)
......@@ -56,11 +56,9 @@ function change(config,callback){
function recovery(){
let paths = Object.keys(config)
console.log(paths);
paths.forEach(path=>{
console.log(__dirname + '/copy' + path);
let oldFile = fs.readFileSync(__dirname + '/copy' + path)
console.log(process.cwd() + path);
fs.writeFile(process.cwd() + path, oldFile, function(err) {
if (err) {
console.log(err);
......@@ -94,9 +92,15 @@ function writeFileRecursive(path, buffer, callback) {
function mergeJSON(minor, main) {
for (var key in main) {
if (typeof(main[key]) != 'object' ) {
console.log({key,main});
minor[key] = main[key];
}else{
console.log(9999,{minor,key,main});
if(minor){
mergeJSON(minor[key], main[key]);
}else{
console.log(minor,'不存在:'+key);
}
}
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册