浏览代码

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

# Conflicts:
#	config/index.js
#	pages/task/audit/salecontract.vue
zhongtianhaoyuan 2 年之前
父节点
当前提交
815fad1657
共有 34 个文件被更改,包括 485 次插入73 次删除
  1. 43 20
      App.vue
  2. 1 1
      config/index.js
  3. 32 15
      manifest.json
  4. 二进制
      nativeplugins/DCloud-PushSound/.DS_Store
  5. 二进制
      nativeplugins/DCloud-PushSound/android/.DS_Store
  6. 二进制
      nativeplugins/DCloud-PushSound/android/res/.DS_Store
  7. 二进制
      nativeplugins/DCloud-PushSound/android/res/raw/pushsound.mp3
  8. 二进制
      nativeplugins/DCloud-PushSound/android/res/raw/ring.mp3
  9. 二进制
      nativeplugins/DCloud-PushSound/android/uniplugin_custom_push_channel-release.aar
  10. 二进制
      nativeplugins/DCloud-PushSound/ios/pushsound.caf
  11. 36 0
      nativeplugins/DCloud-PushSound/package.json
  12. 1 8
      pages/erpbusiness/add_quality_testing.vue
  13. 1 2
      pages/reimbursement/get_request_funds.vue
  14. 6 1
      pages/reimbursement/request_funds.vue
  15. 17 12
      pages/reimbursement/selectWarehouse.vue
  16. 4 2
      pages/reimbursement/the_reimbursement.vue
  17. 8 4
      pages/task/audit/acquisitioncontract.vue
  18. 8 4
      pages/task/audit/purchasecontract.vue
  19. 10 4
      pages/task/audit/salecontract.vue
  20. 4 0
      uni_modules/uni-config-center/changelog.md
  21. 80 0
      uni_modules/uni-config-center/package.json
  22. 93 0
      uni_modules/uni-config-center/readme.md
  23. 0 0
      uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js
  24. 9 0
      uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json
  25. 26 0
      uni_modules/uni-id-common/changelog.md
  26. 87 0
      uni_modules/uni-id-common/package.json
  27. 3 0
      uni_modules/uni-id-common/readme.md
  28. 0 0
      uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js
  29. 16 0
      uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json
  30. 二进制
      unpackage/res/drawable-hdpi/push_small.png
  31. 二进制
      unpackage/res/drawable-ldpi/push_small.png
  32. 二进制
      unpackage/res/drawable-mdpi/push_small.png
  33. 二进制
      unpackage/res/drawable-xhdpi/push_small.png
  34. 二进制
      unpackage/res/drawable-xxhdpi/push_small.png

+ 43 - 20
App.vue

@@ -157,31 +157,49 @@
 			gotoBackstageWhiteListAutStart() {
 				pushLive.gotoBackstage_WhiteList_autStart()
 			},
-			addLocation() {
-				let dst = setInterval(function() {
-					uni.request({
-						header: {
-							'Content-Type': 'application/x-www-form-urlencoded'
-						},
-						url: 'http://123.*******/location',
-						data: {
-							longitude: 114.1598,
-							latitude: 32.145380,
-							user_id: 1812
-						},
-						method: 'POST',
-						success: (res) => {
-							console.log(res)
-						}
-					})
-				}, 1000 * 60)
-			},
+			// addLocation() {
+			// 	let dst = setInterval(function() {
+			// 		uni.request({
+			// 			header: {
+			// 				'Content-Type': 'application/x-www-form-urlencoded'
+			// 			},
+			// 			url: 'http://123.*******/location',
+			// 			data: {
+			// 				longitude: 114.1598,
+			// 				latitude: 32.145380,
+			// 				user_id: 1812
+			// 			},
+			// 			method: 'POST',
+			// 			success: (res) => {
+			// 				console.log(res)
+			// 			}
+			// 		})
+			// 	}, 1000 * 60)
+			// },
 		},
 		onLaunch: function() {
 			// #ifdef APP-PLUS
 			let type = uni.getSystemInfoSync().platform
 			console.log(type)
 			if (type == "android") {
+				const plugin = uni.requireNativePlugin("DCloud-PushSound");
+				plugin.setCustomPushChannel({
+					soundName: "ring",
+					channelId: "task1",
+					channelDesc:"工作事项提醒",
+					enableLights:true,
+					enableVibration:true,
+					importance:3,
+					lockscreenVisibility:0
+				}); 
+				plugin.getAllChannels((p) => {
+					console.log("channels :" + JSON.stringify(p));//返回数组
+					// plugin.deleteChannel("taskNotice");
+					// plugin.deleteChannel("taskNew");
+				});
+				// plugin.testNotification({
+				// 	channelId: "task1" //渠道id
+				// });
 				//注意:开启服务之后,配置后台运行,白名单,自启动,即可实现长时间保活,黑屏传数据
 				this.goStartService();
 				// !!!如果在设置后台运行的情况下,黑屏不发送数据,请使用setInterval代替 定时任务回调
@@ -209,9 +227,12 @@
 			}, err => {});
 			// 监听在线消息事件  
 			plus.push.addEventListener("receive", function(msg) {
+					console.log("收到推送消息:",msg)
 				var title = msg.content.split(':')[0]
 				var content = msg.content.split(':')[1]
-
+				// var title = msg.title
+				// var content = msg.content
+				
 				let params = {
 					inApp: true, // app内横幅提醒
 					voice: true, // 声音提醒
@@ -287,6 +308,8 @@
 		},
 		onShow: function() {
 			// #ifdef APP-PLUS
+			
+			plus.runtime.setBadgeNumber(0);
 			getCurrentNo(res => {
 				// 进页面获取当前APP版本号(用于页面显示)
 				this.version = res.versionName;

+ 1 - 1
config/index.js

@@ -9,7 +9,7 @@ const dev = {
 	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	// baseUrlNew: 'https://api2.eliangeyun.com/',
+	baseUrlNew: 'https://api2.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
 	debug: false
 }

+ 32 - 15
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "2.1.113",
-    "versionCode" : 21113,
+    "versionName" : "2.1.116",
+    "versionCode" : 21116,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},
@@ -70,21 +70,19 @@
                     "unipush" : {
                         "icons" : {
                             "push" : {
-                                // push图标,规格与应用图片一致,不配置则默认使用push图标  
-                                "ldpi" : "unpackage/res/icon/48x48.png",
-                                "mdpi" : "unpackage/res/icon/48x48.png",
-                                "hdpi" : "unpackage/res/icon/72x72.png",
-                                "xhdpi" : "unpackage/res/icon/96x96.png",
-                                "xxhdpi" : "unpackage/res/icon/144x144.png",
-                                "xxxhdpi" : "unpackage/res/icon/192x192.png"
-                            },
-                            "small" : {
-                                //  左上角小图标
+                                "hdpi" : "unpackage/res/icon/36x36.png",
                                 "ldpi" : "unpackage/res/icon/18x18.png",
                                 "mdpi" : "unpackage/res/icon/24x24.png",
-                                "hdpi" : "unpackage/res/icon/36x36.png",
                                 "xhdpi" : "unpackage/res/icon/48x48.png",
                                 "xxhdpi" : "unpackage/res/icon/72x72.png"
+                            },
+                            "small" : {
+                                //  左上角小图标
+                                "ldpi" : "unpackage/res/drawable-ldpi/push_small.png",
+                                "mdpi" : "unpackage/res/drawable-mdpi/push_small.png",
+                                "hdpi" : "unpackage/res/drawable-hdpi/push_small.png",
+                                "xhdpi" : "unpackage/res/drawable-xhdpi/push_small.png",
+                                "xxhdpi" : "unpackage/res/drawable-xxhdpi/push_small.png"
                             }
                         }
                     }
@@ -119,14 +117,19 @@
                 "permissions" : [
                     "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.FORCE_BACK\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
                     "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
                     "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.INSTALL_PACKAGES\"/>  ",
-                    "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>"
+                    "<uses-permission android:name=\"android.permission.REORDER_TASKS\"/>",
+                    "<uses-permission android:name=\"android.permission.REQUEST_INSTALL_PACKAGES\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
                 ]
             },
             "icons" : {
@@ -232,6 +235,20 @@
                     "pid" : "3422",
                     "parameters" : {}
                 }
+            },
+            "DCloud-PushSound" : {
+                "__plugin_info__" : {
+                    "name" : "DCloud-PushSound",
+                    "description" : "自定义推送铃声",
+                    "platforms" : "Android,iOS",
+                    "url" : "",
+                    "android_package_name" : "",
+                    "ios_bundle_id" : "",
+                    "isCloud" : false,
+                    "bought" : -1,
+                    "pid" : "",
+                    "parameters" : {}
+                }
             }
         }
     }

二进制
nativeplugins/DCloud-PushSound/.DS_Store


二进制
nativeplugins/DCloud-PushSound/android/.DS_Store


二进制
nativeplugins/DCloud-PushSound/android/res/.DS_Store


二进制
nativeplugins/DCloud-PushSound/android/res/raw/pushsound.mp3


二进制
nativeplugins/DCloud-PushSound/android/res/raw/ring.mp3


二进制
nativeplugins/DCloud-PushSound/android/uniplugin_custom_push_channel-release.aar


二进制
nativeplugins/DCloud-PushSound/ios/pushsound.caf


+ 36 - 0
nativeplugins/DCloud-PushSound/package.json

@@ -0,0 +1,36 @@
+{
+	"name": "DCloud-PushSound",
+	"id": "DCloud-PushSound",
+	"version": "1.0.1",
+	"description": "自定义推送铃声",
+	"_dp_type": "nativeplugin",
+	"_dp_nativeplugin": {
+		"ios": {
+			"plugins": [{
+				"type": "module",
+				"name": "DCloud-PushSound",
+				"class": "DCPushSound"
+			}],
+			"deploymentTarget": "9.0",
+			"integrateType": "library",
+			"resources": [
+				"pushsound.caf"
+			]
+		},
+		"android": {
+		    "plugins": [
+		        {
+		            "type": "module",
+		            "name": "DCloud-PushSound",
+		            "class": "io.dcloud.uniplugin.custom_push_channel.CustomNotificationChannel"
+		        }
+		    ],
+		    "integrateType": "aar",
+		    "compileOptions": {
+		        "sourceCompatibility": "1.8",
+		        "targetCompatibility": "1.8"
+		    },
+		    "minSdkVersion": "19"
+		}
+	}
+}

+ 1 - 8
pages/erpbusiness/add_quality_testing.vue

@@ -908,14 +908,7 @@
 						} else if (this.contractNolist[i].inOutType == '贸易服务入库') {
 							this.gridList.inOutTypeKey = 5
 						} else if (this.contractNolist[i].inOutType == '退库') {
-// <<<<<<< HEAD
-// 						  if (this.contractNolist[i].contractNo) {
-// 							this.gridList.tips = '买方' + this.contractNolist[i].buyer
-// 						  } else {
-// 							this.gridList.tips = '出货库' + data.sendWarehouse
-// 						  }
-// 						  this.gridList.inOutTypeKey = 6
-// =======
+
 							this.warehouseTradeCount = '000' + this.warehouseTradeCount
 							// this.gridList.qualityNo = 'CGRK' + this.getdate() + this.commonWarehouseNo + this
 								// .warehouseTradeCount.substring(this.warehouseTradeCount.length - 4)

+ 1 - 2
pages/reimbursement/get_request_funds.vue

@@ -121,7 +121,6 @@
 					this.$api.doRequest('get', 'appendix/query/getFileList', {
 						appendixIds: this.imglist.toString()
 					}).then(res => {
-						debugger
 						this.imglist2 = res.data.data
 						for (let i = 0; i < this.imglist2.length; i++) {
 							if (this.imglist2[i].appendixName) {
@@ -157,7 +156,7 @@
 			},
 			//获取信息
 			getList() {
-				this.$api.doRequest('get', '/expenseInfo/getInfo', {
+				this.$api.doRequest('get', '/expenseInfo/ExpenseInfo', {
 					id: this.id,
 				}).then(res => {
 					if (res.data.code == 200) {

+ 6 - 1
pages/reimbursement/request_funds.vue

@@ -280,9 +280,14 @@
 							if (that.imglist.length > 0) {
 								that.detailData.addressUrl = that.imglist.toString()
 							}
+							uni.showLoading({
+								title: "加载中",
+								mask: true
+							})
 							that.$api.doRequest('post', theInterface, that.detailData)
 								.then(res => {
 									if (res.data.code == 200) {
+										uni.hideLoading()
 										that.$api.msg('提交成功')
 										uni.navigateTo({
 											url: '/pages/reimbursement/the_reimbursement'
@@ -297,7 +302,7 @@
 			},
 			//获取信息
 			getRequest() {
-				this.$api.doRequest('get', '/expenseInfo/getInfo', {
+				this.$api.doRequest('get', '/expenseInfo/ExpenseInfo', {
 					id: this.id,
 				}).then(res => {
 					if (res.data.code == 200) {

+ 17 - 12
pages/reimbursement/selectWarehouse.vue

@@ -28,21 +28,21 @@
 </template>
 
 <script>
-	import helper from '@/common/helper.js'; 
+	import helper from '@/common/helper.js';
 	export default {
 		data() {
 			return {
 				inputKeyword: '',
 				newList: [],
-				newSelectList:[],
+				newSelectList: [],
 				filterNewList: [],
-				moreList:[],
+				moreList: [],
 				compId: '',
-				warehouseType:"",
+				warehouseType: "",
 			}
 		},
 		onShow() {
-			this.newSelectList =  uni.getStorageSync('theWarehouseList');
+			this.newSelectList = uni.getStorageSync('theWarehouseList');
 		},
 		onLoad(options) {
 			this.warehouseType = options.warehouseType
@@ -59,19 +59,19 @@
 			}
 		},
 		methods: {
-			confirm(item){
+			confirm(item) {
 				let _list = uni.getStorageSync('theWarehouseList');
-				if(_list==''){
-					_list=[]
+				if (_list == '') {
+					_list = []
 				}
-				if(_list.length<=20){
+				if (_list.length <= 20) {
 					_list = _list.filter(function(val) {
-						if (val.warehouseName!=item.warehouseName) {
+						if (val.warehouseName != item.warehouseName) {
 							return val
 						}
 					})
 					_list.unshift(item)
-				}else{
+				} else {
 					_list.unshift(item).pop(item)
 				}
 				uni.setStorageSync('theWarehouseList', _list);
@@ -81,15 +81,20 @@
 				})
 			},
 			getWarehouse() {
+				uni.showLoading({
+					title: '查询仓库',
+					mask: true
+				})
 				var that = this
 				this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouse', {
 					compId: uni.getStorageSync("pcUserInfo").compId,
 					warehouseType: '1'
 				}).then(res => {
+					uni.hideLoading()
 					if (res.data.data.length != 0) {
 						that.newList = res.data.data
 						that.moreList = res.data.data
-						
+
 					}
 				})
 			},

+ 4 - 2
pages/reimbursement/the_reimbursement.vue

@@ -38,8 +38,10 @@
 				<view style="display: flex;justify-content: flex-end;margin-top: 30rpx;">
 					<!-- v-if="item.status == '已驳回'" -->
 					<!-- v-if="item.status == '已驳回'" -->
-					<view class="wenzi1 audit" @click="deleExpense(item)">删除</view>
-					<view class="wenzi1 audit" @click="requestFunds(3,item)">编辑</view>
+					<view class="wenzi1 audit" @click="deleExpense(item)"
+						v-if="!item.approveStatus||item.status=='已完成'">删除</view>
+					<view class="wenzi1 audit" @click="requestFunds(3,item)"
+						v-if="item.approveStatus=='待内勤审核'&&item.status!='已完成'&&item.status!='已付款'">编辑</view>
 					<view class="wenzi1 audit" @click="getRequestFunds(1,item)">查看</view>
 				</view>
 			</view>

+ 8 - 4
pages/task/audit/acquisitioncontract.vue

@@ -252,10 +252,11 @@
 				</view>
 				<view class="u-textarea-style">
 					<view class="right-bottom">
-						{{auditMind.length}}/100个字
+						{{auditMind.length}}/500个字
 					</view>
-					<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
-						maxlength="100" />
+					<!-- <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
+						maxlength="100" /> -->
+						<textarea maxlength="500" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30" rows="11"></textarea>
 				</view>
 				<view @click='close()' class="cancel">取消</view>
 				<view @click='passSubmit()' class="confirm">确定</view>
@@ -817,7 +818,10 @@
 		border: 1px solid #EEEEEE;
 		padding: 10rpx 20rpx;
 		position: relative;
-
+		height:240px;
+		/deep/.uni-textarea-textarea{
+			width: 80%;
+		}
 		.right-bottom {
 			position: absolute;
 			right: 20rpx;

+ 8 - 4
pages/task/audit/purchasecontract.vue

@@ -298,10 +298,11 @@
 				</view>
 				<view class="u-textarea-style">
 					<view class="right-bottom">
-						{{auditMind.length}}/300个字
+						{{auditMind.length}}/500个字
 					</view>
-					<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
-						maxlength="300" />
+					<textarea maxlength="500" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30" rows="11"></textarea>
+					<!-- <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
+						maxlength="300" /> -->
 				</view>
 				<view @click='close()' class="cancel">取消</view>
 				<view @click='passSubmit()' class="confirm">确定</view>
@@ -824,7 +825,10 @@
 		border: 1px solid #EEEEEE;
 		padding: 10rpx 20rpx;
 		position: relative;
-
+		height:240px;
+		/deep/.uni-textarea-textarea{
+			width: 80%;
+		}
 		.right-bottom {
 			position: absolute;
 			right: 20rpx;

+ 10 - 4
pages/task/audit/salecontract.vue

@@ -301,10 +301,10 @@
 				</view>
 				<view class="u-textarea-style">
 					<view class="right-bottom">
-						{{auditMind.length}}/300个字
+						{{auditMind.length}}/500个字
 					</view>
-					<u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
-						maxlength="300" />
+					<textarea maxlength="500" v-model='auditMind' placeholder="请在此输入审核意见" name="" id="" cols="30" rows="11"></textarea>
+		
 				</view>
 				<view @click='close()' class="cancel">取消</view>
 				<view @click='passSubmit()' class="confirm">确定</view>
@@ -876,6 +876,10 @@
 		padding: 10rpx 20rpx;
 		position: relative;
 
+		height:240px;
+		/deep/.uni-textarea-textarea{
+			width: 80%;
+		}
 		.right-bottom {
 			position: absolute;
 			right: 20rpx;
@@ -1040,5 +1044,7 @@
 	.input_css{
 		font-size: 20rpx;
 	}
-	
+	/deep/.uni-textarea-wrapper{
+		height:200px;
+	}
 </style>

+ 4 - 0
uni_modules/uni-config-center/changelog.md

@@ -0,0 +1,4 @@
+## 0.0.2(2021-04-16)
+- 修改插件package信息
+## 0.0.1(2021-03-15)
+- 初始化项目

+ 80 - 0
uni_modules/uni-config-center/package.json

@@ -0,0 +1,80 @@
+{
+  "id": "uni-config-center",
+  "displayName": "uni-config-center",
+  "version": "0.0.2",
+  "description": "uniCloud 配置中心",
+  "keywords": [
+    "配置",
+    "配置中心"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+      "uniCloud",
+      "云函数模板"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": ""
+  },
+  "directories": {
+    "example": "../../../scripts/dist"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "u",
+          "app-nvue": "u"
+        },
+        "H5-mobile": {
+          "Safari": "u",
+          "Android Browser": "u",
+          "微信浏览器(Android)": "u",
+          "QQ浏览器(Android)": "u"
+        },
+        "H5-pc": {
+          "Chrome": "u",
+          "IE": "u",
+          "Edge": "u",
+          "Firefox": "u",
+          "Safari": "u"
+        },
+        "小程序": {
+          "微信": "u",
+          "阿里": "u",
+          "百度": "u",
+          "字节跳动": "u",
+          "QQ": "u"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        }
+      }
+    }
+  }
+}

+ 93 - 0
uni_modules/uni-config-center/readme.md

@@ -0,0 +1,93 @@
+# 为什么使用uni-config-center
+
+实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构
+
+```bash
+cloudfunctions
+└─────common 公共模块
+        ├─plugin-a // 插件A对应的目录
+        │  ├─index.js
+        │  ├─config.json // plugin-a对应的配置文件
+        │  └─other-file.cert  // plugin-a依赖的其他文件
+        └─plugin-b // plugin-b对应的目录
+           ├─index.js
+           └─config.json // plugin-b对应的配置文件
+```
+
+假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。
+
+uni-config-center就是用了统一管理这些配置文件的,使用uni-config-center后的目录结构如下
+
+```bash
+cloudfunctions
+└─────common 公共模块
+        ├─plugin-a // 插件A对应的目录
+        │  └─index.js
+        ├─plugin-b // plugin-b对应的目录
+        │  └─index.js
+        └─uni-config-center
+           ├─index.js // config-center入口文件
+           ├─plugin-a
+           │  ├─config.json  // plugin-a对应的配置文件
+           │  └─other-file.cert  // plugin-a依赖的其他文件
+           └─plugin-b
+              └─config.json  // plugin-b对应的配置文件
+```
+
+使用uni-config-center后的优势
+
+- 配置文件统一管理,分离插件主体和配置信息,更新插件更方便
+- 支持对config.json设置schema,插件使用者在HBuilderX内编写config.json文件时会有更好的提示(后续HBuilderX会提供支持)
+
+# 用法
+
+在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖,请参考:[使用公共模块](https://uniapp.dcloud.net.cn/uniCloud/cf-common)
+
+```js
+const createConfig = require('uni-config-center')
+
+const uniIdConfig = createConfig({
+    pluginId: 'uni-id', // 插件id
+    defaultConfig: { // 默认配置
+        tokenExpiresIn: 7200,
+        tokenExpiresThreshold: 600,
+    },
+    customMerge: function(defaultConfig, userConfig) { // 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并
+        // defaudltConfig 默认配置
+        // userConfig 用户配置
+        return Object.assign(defaultConfig, userConfig)
+    }
+})
+
+
+// 以如下配置为例
+// {
+//   "tokenExpiresIn": 7200,
+//   "passwordErrorLimit": 6,
+//   "bindTokenToDevice": false,
+//   "passwordErrorRetryTime": 3600,
+//   "app-plus": {
+//     "tokenExpiresIn": 2592000
+//   },
+//   "service": {
+//     "sms": {
+//       "codeExpiresIn": 300
+//     }
+//   }
+// }
+
+// 获取配置
+uniIdConfig.config() // 获取全部配置,注意:uni-config-center内不存在对应插件目录时会返回空对象
+uniIdConfig.config('tokenExpiresIn') // 指定键值获取配置,返回:7200
+uniIdConfig.config('service.sms.codeExpiresIn') // 指定键值获取配置,返回:300
+uniIdConfig.config('tokenExpiresThreshold', 600) // 指定键值获取配置,如果不存在则取传入的默认值,返回:600
+
+// 获取文件绝对路径
+uniIdConfig.resolve('custom-token.js') // 获取uni-config-center/uni-id/custom-token.js文件的路径
+
+// 引用文件(require)
+uniIDConfig.requireFile('custom-token.js') // 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined,文件内有其他错误导致require失败时会抛出错误。
+
+// 判断是否包含某文件
+uniIDConfig.hasFile('custom-token.js') // 配置目录是否包含某文件,true: 文件存在,false: 文件不存在
+```

文件差异内容过多而无法显示
+ 0 - 0
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js


+ 9 - 0
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json

@@ -0,0 +1,9 @@
+{
+  "name": "uni-config-center",
+  "version": "0.0.2",
+  "description": "配置中心",
+  "main": "index.js",
+  "keywords": [],
+  "author": "DCloud",
+  "license": "Apache-2.0"
+}

+ 26 - 0
uni_modules/uni-id-common/changelog.md

@@ -0,0 +1,26 @@
+## 1.0.13(2022-07-21)
+- 修复 创建token时未传角色权限信息生成的token不正确的bug
+## 1.0.12(2022-07-15)
+- 提升与旧版本uni-id的兼容性(补充读取配置文件时回退平台app-plus、h5),但是仍推荐使用新平台名进行配置(app、web)
+## 1.0.11(2022-07-14)
+- 修复 部分情况下报`read property 'reduce' of undefined`的错误
+## 1.0.10(2022-07-11)
+- 将token存储在用户表的token字段内,与旧版本uni-id保持一致
+## 1.0.9(2022-07-01)
+- checkToken兼容token内未缓存角色权限的情况,此时将查库获取角色权限
+## 1.0.8(2022-07-01)
+- 修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug
+## 1.0.7(2022-06-30)
+- 修复config文件不合法时未抛出具体错误的Bug
+## 1.0.6(2022-06-28)
+- 移除插件内的数据表schema
+## 1.0.5(2022-06-27)
+- 修复使用多应用配置时报`Cannot read property 'appId' of undefined`的Bug
+## 1.0.4(2022-06-27)
+- 修复使用自定义token内容功能报错的Bug [详情](https://ask.dcloud.net.cn/question/147945)
+## 1.0.2(2022-06-23)
+- 对齐旧版本uni-id默认配置
+## 1.0.1(2022-06-22)
+- 补充对uni-config-center的依赖
+## 1.0.0(2022-06-21)
+- 提供uni-id token创建、校验、刷新接口,简化旧版uni-id公共模块

+ 87 - 0
uni_modules/uni-id-common/package.json

@@ -0,0 +1,87 @@
+{
+	"id": "uni-id-common",
+	"displayName": "uni-id-common",
+	"version": "1.0.13",
+	"description": "包含uni-id token生成、校验、刷新功能的云函数公共模块",
+	"keywords": [
+        "uni-id-common",
+        "uniCloud",
+        "token",
+        "权限"
+    ],
+	"repository": "https://gitcode.net/dcloud/uni-id-common",
+	"engines": {
+		"HBuilderX": "^3.1.0"
+	},
+	"dcloudext": {
+		"category": [
+			"uniCloud",
+			"云函数模板"
+		],
+		"sale": {
+			"regular": {
+				"price": "0.00"
+			},
+			"sourcecode": {
+				"price": "0.00"
+			}
+		},
+		"contact": {
+			"qq": ""
+		},
+		"declaration": {
+			"ads": "无",
+			"data": "无",
+			"permissions": "无"
+		},
+		"npmurl": ""
+	},
+	"uni_modules": {
+		"dependencies": ["uni-config-center"],
+		"encrypt": [],
+		"platforms": {
+			"cloud": {
+				"tcb": "y",
+				"aliyun": "y"
+			},
+			"client": {
+				"Vue": {
+					"vue2": "u",
+					"vue3": "u"
+				},
+				"App": {
+					"app-vue": "u",
+					"app-nvue": "u"
+				},
+				"H5-mobile": {
+					"Safari": "u",
+					"Android Browser": "u",
+					"微信浏览器(Android)": "u",
+					"QQ浏览器(Android)": "u"
+				},
+				"H5-pc": {
+					"Chrome": "u",
+					"IE": "u",
+					"Edge": "u",
+					"Firefox": "u",
+					"Safari": "u"
+				},
+				"小程序": {
+					"微信": "u",
+					"阿里": "u",
+					"百度": "u",
+					"字节跳动": "u",
+					"QQ": "u",
+					"钉钉": "u",
+					"快手": "u",
+					"飞书": "u",
+                    "京东": "u"
+				},
+				"快应用": {
+					"华为": "u",
+					"联盟": "u"
+				}
+			}
+		}
+	}
+}

+ 3 - 0
uni_modules/uni-id-common/readme.md

@@ -0,0 +1,3 @@
+# uni-id-common
+
+文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)

文件差异内容过多而无法显示
+ 0 - 0
uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js


+ 16 - 0
uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json

@@ -0,0 +1,16 @@
+{
+  "name": "uni-id-common",
+  "version": "1.0.13",
+  "description": "uni-id token生成、校验、刷新",
+  "main": "index.js",
+  "homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html",
+  "repository": {
+    "type": "git",
+    "url": "git+https://gitee.com/dcloud/uni-id-common.git"
+  },
+  "author": "DCloud",
+  "license": "Apache-2.0",
+  "dependencies": {
+    "uni-config-center": "file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
+  }
+}

二进制
unpackage/res/drawable-hdpi/push_small.png


二进制
unpackage/res/drawable-ldpi/push_small.png


二进制
unpackage/res/drawable-mdpi/push_small.png


二进制
unpackage/res/drawable-xhdpi/push_small.png


二进制
unpackage/res/drawable-xxhdpi/push_small.png


部分文件因为文件数量过多而无法显示