ソースを参照

引入电话监听

chenyidong 4 ヶ月 前
コミット
6930f2a439

+ 4 - 4
manifest.json

@@ -2,8 +2,8 @@
2 2
     "name" : "时与",
3 3
     "appid" : "__UNI__0C0EF72",
4 4
     "description" : "",
5
-    "versionName" : "1.1.7",
6
-    "versionCode" : 117,
5
+    "versionName" : "1.1.8",
6
+    "versionCode" : 118,
7 7
     "transformPx" : false,
8 8
     /* 5+App特有相关 */
9 9
     "app-plus" : {
@@ -83,9 +83,9 @@
83 83
                     "<uses-permission android:name=\"android.permission.FOREGROUND_SERVICE_SPECIAL_USE\" />"
84 84
                 ],
85 85
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
86
-                "minSdkVersion" : 23,
86
+                "minSdkVersion" : 21,
87 87
                 "autoSdkPermissions" : true,
88
-                "targetSdkVersion" : 34
88
+                "targetSdkVersion" : ""
89 89
             },
90 90
             /* ios打包配置 */
91 91
             "ios" : {

+ 43 - 0
pages/auth/auth - 副本.vue

@@ -0,0 +1,43 @@
1
+<template>
2
+	<u-loading-page loading-color="#000000" :loading="true" loadingText="正在请求微信授权"></u-loading-page>
3
+</template>
4
+
5
+<script>
6
+	import qs from 'qs';
7
+	export default {
8
+		data() {
9
+			return {
10
+			}
11
+		},
12
+		onLoad(option){
13
+			let { shiYuWxLogin , username : userName } = option;
14
+			if(shiYuWxLogin){
15
+				uni.redirectTo({
16
+					url : "/pages/login/index?shiYuWxLogin=" + shiYuWxLogin,
17
+				})
18
+			}else if(userName){
19
+				uni.$u.api.shiYuWxLoginGetInfo({userName}).then((res)=>{
20
+					const { access_token } = res.data;
21
+					this.$store.commit("user/SET_TOKEN", access_token);
22
+					this.$store.dispatch("user/getUserInfo").then(()=>{
23
+						uni.reLaunch({
24
+							url:"/pages/bindSuccess/index",
25
+						});
26
+						// uni.switchTab({
27
+						// 	url: `/pages/person/index`,
28
+						// 	success: () => {
29
+						// 		this.$store.dispatch("app/register");
30
+						// 		uni.$u.toast("登录成功");
31
+						// 	}
32
+						// })
33
+					})
34
+				})
35
+			}else{
36
+				window.location.href = "https://crm.nanjingshiyu.com/prod-api/auth/shiYuWxLogin";
37
+			}
38
+		},
39
+	}
40
+</script>
41
+
42
+<style lang="scss" scoped>
43
+</style>

+ 12 - 0
pages/circumstances/index.vue

@@ -137,6 +137,18 @@
137 137
 	} from 'vuex';
138 138
 	import iconImg from "./components/iconImg.vue"
139 139
 	import permision from "@/js_sdk/wa-permission/permission.js";
140
+	
141
+	import {
142
+		startPhoneListener,
143
+		stopPhoneListener,
144
+		checkIsAutoRecord,
145
+		toCallAutoRecorderPage,
146
+		navigateToCallRecordingSettings,
147
+		jumpToPermissionPage,
148
+		makePhoneCall,
149
+		allRecorderFilesAction,
150
+	} from '@/uni_modules/yao-lister';
151
+	
140 152
 	export default {
141 153
 		components: {
142 154
 			iconImg

+ 242 - 0
pages/login/index - 副本 (2).vue

@@ -0,0 +1,242 @@
1
+<template>
2
+	<view class="content">
3
+		<view class="uni-btn-v uni-common-mt">
4
+			<button type="primary" @click="startListerPhone">注册电话监听</button>
5
+			<button type="primary" @click="stopListerPhone">注销电话监听</button>
6
+			<button type="primary" @click="checkIsAutoRecord">是否开启通话自动录音功能</button>
7
+
8
+			<button type="primary" @click="toCallAutoRecorderPage">跳转到开启通话自动录音界面</button>
9
+			<button type="primary" @click="navigateToCallRecordingSettings">跳转到系统的通话录音界面</button>
10
+			<button type="primary" @click="jumpToPermissionPage">请求所有文件访问权限(主要针对ANDROID 11以上获取录音文件需要的权限)</button>
11
+			<button type="primary" @click="allRecorderFilesAction">获取通话自动录音文件</button>
12
+
13
+
14
+			<!-- <button type="primary" @click="registerSmsReceiver">注册短信监听</button> -->
15
+			<button type="primary" @click="makePhoneCall">拨打电话</button>
16
+		</view>
17
+		<view class="text-box" scroll-y="true">
18
+			<text>{{phoneState}}</text>
19
+		</view>
20
+		<view v-if="change_pop_show">
21
+			<view class="status text-center">蓝牙列表(直接点击连接打印机)</view>
22
+			<view class="divider"></view>
23
+			<view :class="{ 'popup-height': type === 'left' || type === 'right' }" class="device-list">
24
+				<scroll-view scroll-y="true" class="p-content underline">
25
+					<view class="underline p-item device-item" hover-class="list-active"
26
+						v-for="(item, index) in Filelist" :key="index">
27
+						<view class="desc">
28
+							{{item}}
29
+						</view>
30
+					</view>
31
+				</scroll-view>
32
+			</view>
33
+		</view>
34
+
35
+	</view>
36
+</template>
37
+
38
+<script>
39
+	import {
40
+		startPhoneListener,
41
+		stopPhoneListener,
42
+		checkIsAutoRecord,
43
+		toCallAutoRecorderPage,
44
+		navigateToCallRecordingSettings,
45
+		jumpToPermissionPage,
46
+		makePhoneCall,
47
+		allRecorderFilesAction,
48
+	} from '@/uni_modules/yao-lister';
49
+
50
+
51
+	export default {
52
+		data() {
53
+			return {
54
+				title: 'Hello',
55
+				phoneState: '',
56
+				stateText: '',
57
+				isAndroid: true,
58
+				change_pop_show: false,
59
+				type: 'center',
60
+				Filelist: [],
61
+			}
62
+		},
63
+		mounted() {
64
+			this.initPhoneStateListener()
65
+		},
66
+		beforeDestroy() {
67
+			stopListerPhone()
68
+		},
69
+		methods: {
70
+			toggle(type) {
71
+				const _this = this;
72
+				_this.type = type;
73
+				_this.change_pop_show = true;
74
+			},
75
+			allRecorderFilesAction() {
76
+				const _this = this;
77
+				allRecorderFilesAction(res => {
78
+					console.log("录音文件输入", JSON.stringify(res));
79
+					// 录音文件输入,  ["/storage/emulated/0/Recordings/Record/Call/15099989786 2025-11-11 09-41-57.m4a","/storage/emulated/0/Recordings/Record/Call/18925012557 2025-11-11 11-10-33.m4a"]
80
+					_this.toggle('bottom');
81
+					_this.Filelist = res
82
+					uni.showToast({
83
+						title: JSON.stringify(res),
84
+						duration: 2000
85
+					})
86
+				})
87
+			},
88
+			jumpToPermissionPage() {
89
+				jumpToPermissionPage()
90
+			},
91
+			navigateToCallRecordingSettings() {
92
+				navigateToCallRecordingSettings()
93
+			},
94
+			toCallAutoRecorderPage() {
95
+				toCallAutoRecorderPage()
96
+			},
97
+			checkIsAutoRecord() {
98
+				let checkRecord = checkIsAutoRecord()
99
+				uni.showToast({
100
+					title: checkRecord ? "已开启电话录音" : "未开启电话录音",
101
+					duration: 2000
102
+				})
103
+			},
104
+			makePhoneCall() {
105
+				makePhoneCall('15099989786')
106
+				// uni.makePhoneCall({
107
+				// 	phoneNumber: '13771854499', // 电话号码
108
+				// 	success: function() {
109
+				// 		console.log('拨打电话成功!');
110
+				// 	},
111
+				// 	fail: function(err) {
112
+				// 		console.error('拨打电话失败:', err);
113
+				// 	}
114
+				// });
115
+			},
116
+			startListerPhone() {
117
+				startPhoneListener(res => {
118
+					uni.showToast({
119
+						icon: 'success',
120
+						title: '电话监听开启',
121
+						duration: 2000
122
+					});
123
+					this.phoneState = res + "012"
124
+				})
125
+			},
126
+			stopListerPhone() {
127
+				stopPhoneListener(res => {
128
+					uni.showToast({
129
+						icon: 'success',
130
+						title: res,
131
+						duration: 2000
132
+					});
133
+				})
134
+			},
135
+
136
+			async initPhoneStateListener() {
137
+				// 动态申请权限
138
+				const permissions = ["android.permission.READ_PHONE_STATE",
139
+					"android.permission.ANSWER_PHONE_CALLS", "android.permission.CALL_PHONE",
140
+					"android.permission.MANAGE_EXTERNAL_STORAGE",
141
+					"android.permission.READ_EXTERNAL_STORAGE",
142
+					"android.permission.READ_CALL_LOG",
143
+					"android.permission.READ_PHONE_NUMBERS",
144
+					"android.permission.FOREGROUND_SERVICE",
145
+					"android.permission.RECEIVE_SMS",
146
+					"android.permission.READ_SMS"
147
+				]
148
+				const result = await plus.android.requestPermissions(permissions, 1001)
149
+
150
+				if (result.granted) {
151
+					startListening()
152
+					// 监听原生事件
153
+					uni.$on('PHONE_STATE_CHANGE', (state) => {
154
+						this.phoneState = state
155
+					})
156
+				}
157
+			}
158
+		},
159
+	}
160
+</script>
161
+
162
+<style>
163
+	.text-box {
164
+		margin-bottom: 40rpx;
165
+		padding: 40rpx 0;
166
+		display: flex;
167
+		min-height: 300rpx;
168
+		background-color: #FFFFFF;
169
+		justify-content: center;
170
+		align-items: center;
171
+		text-align: center;
172
+		font-size: 30rpx;
173
+		color: #353535;
174
+		line-height: 1.8;
175
+		border: 1px #007AFF;
176
+		height: 200px;
177
+		width: 200px;
178
+	}
179
+
180
+	.content {
181
+		display: flex;
182
+		flex-direction: column;
183
+		align-items: center;
184
+		justify-content: center;
185
+	}
186
+
187
+	button {
188
+		margin: 10px 0;
189
+		background-color: #007AFF;
190
+		color: white;
191
+	}
192
+
193
+	.logo {
194
+		height: 200rpx;
195
+		width: 200rpx;
196
+		margin-top: 200rpx;
197
+		margin-left: auto;
198
+		margin-right: auto;
199
+		margin-bottom: 50rpx;
200
+	}
201
+
202
+	.text-area {
203
+		display: flex;
204
+		justify-content: center;
205
+	}
206
+
207
+	.title {
208
+		font-size: 36rpx;
209
+		color: #8f8f94;
210
+	}
211
+
212
+	.uni-popup {
213
+		z-index: 9999;
214
+		/* 根据需要调整 */
215
+	}
216
+
217
+	.p-content {
218
+		height: calc(70vh - 20px);
219
+		width: 700rpx;
220
+	}
221
+
222
+	.text-area {
223
+		display: flex;
224
+		justify-content: center;
225
+	}
226
+
227
+	.title {
228
+		font-size: 36rpx;
229
+		color: #8f8f94;
230
+	}
231
+
232
+	.text-center {
233
+		display: flex;
234
+		justify-content: center;
235
+		align-items: center;
236
+	}
237
+
238
+	.desc {
239
+		padding-left: 10px;
240
+		margin-top: 10px;
241
+	}
242
+</style>

+ 349 - 0
pages/login/index - 副本.vue

@@ -0,0 +1,349 @@
1
+<template>
2
+	<view>
3
+		<view class="loginway">
4
+			<div class="navigation"></div>
5
+			<image class="loginimg" mode="widthFix" src="/static/login/logo_word.png"></image>
6
+			<view class="input_wrap">
7
+				<u--form labelPosition="left" :model="form" :rules="rules" ref="uForm">
8
+					<u-form-item label="" prop="username" class="inputFormWrap">
9
+						<u--input shape="circle" clearable prefixIcon="/static/login/icon-account.png"
10
+							:prefixIconStyle="prefixIconStyle" v-model="form.username" placeholder="请输入账号"></u--input>
11
+					</u-form-item>
12
+					<u-form-item label="" prop="password" class="inputFormWrap">
13
+						<u--input shape="circle" clearable password prefixIcon="/static/login/icon-password.png"
14
+							:prefixIconStyle="prefixIconStyle" v-model="form.password" placeholder="请输入密码"></u--input>
15
+					</u-form-item>
16
+					<u-form-item label="" prop="" class="inputFormWrap">
17
+						<u-checkbox-group v-model="checkboxs" placement="column" @change="changeRemember">
18
+							<u-checkbox :label="'记住密码'" :name="'remember'"></u-checkbox>
19
+						</u-checkbox-group>
20
+					</u-form-item>
21
+					<u-form-item>
22
+						<u-button type="primary" text="登录" shape="circle" @click="handleLogin"></u-button>
23
+					</u-form-item>
24
+					<!-- 			<u-form-item>
25
+						<view class="network_configuration_box">
26
+							<view class="netWrokSet" @click="handleToConfiguration">
27
+								<image src="/static/login/network.png" mode=""></image>
28
+								<text class="text">呼叫中心配置</text>
29
+							</view>
30
+						</view>
31
+					</u-form-item> -->
32
+				</u--form>
33
+			</view>
34
+		</view>
35
+	</view>
36
+</template>
37
+
38
+<script>
39
+	export default {
40
+		data() {
41
+			return {
42
+				firstLoginState : "",
43
+				// systemList,
44
+				prefixIconStyle: {
45
+					width: "16px",
46
+					height: "16px",
47
+					marginRight: "4px",
48
+					marginLeft: "10px"
49
+				},
50
+				form: {
51
+					// password: "Huilong@#$999",
52
+					password: "",
53
+					systemCode: "system_crm",
54
+					username: "",
55
+					clientFlag: "2",
56
+					// username: "huihui",
57
+					code: "996007qa.code",
58
+					uuid: "123"
59
+				},
60
+				checkboxs: [],
61
+				rules: {
62
+					username: {
63
+						type: 'string',
64
+						required: true,
65
+						message: '请输入账号',
66
+						trigger: []
67
+					},
68
+					password: {
69
+						type: 'string',
70
+						required: true,
71
+						message: '请输入密码',
72
+						trigger: []
73
+					}
74
+				},
75
+				// mac: getMacAddress(),
76
+			};
77
+		},
78
+		computed: {
79
+			systemList() {
80
+				return this.$store.state.user.systemList;
81
+			},
82
+			remember: {
83
+				get() {
84
+					return this.checkboxs.length > 0
85
+				},
86
+				set(value) {
87
+					this.checkboxs = value ? ['remember'] : [];
88
+				}
89
+			}
90
+		},
91
+		mounted() {
92
+			// 触发水印隐藏
93
+			this.systemChange(this.form.systemCode);
94
+			this.getUserByCache();
95
+		},
96
+		onLoad(option){
97
+			const { shiYuWxLogin } = option;
98
+			this.firstLoginState = shiYuWxLogin;
99
+		},
100
+		methods: {
101
+			changeRemember(value){
102
+				if (value.length > 0) {
103
+					uni.setStorageSync('username', this.form.username);
104
+					uni.setStorageSync('password', this.form.password);
105
+				} else {
106
+					uni.removeStorageSync('username');
107
+					uni.removeStorageSync('password');
108
+				}
109
+			},
110
+			getUserByCache() {
111
+				const savedUsername = uni.getStorageSync('username');
112
+				const savedPassword = uni.getStorageSync('password');
113
+
114
+				if (savedUsername && savedPassword) {
115
+					this.form.username = savedUsername;
116
+					this.form.password = savedPassword;
117
+					this.remember = true;
118
+				}
119
+			},
120
+			handleToConfiguration() {
121
+				uni.navigateTo({
122
+					url: "/pages/configuration/index"
123
+				})
124
+			},
125
+			systemChange(e) {
126
+				if (!e) return;
127
+				uni.$u.api.getAppSystemList().then((res) => {
128
+					const systemCodeList = res.data;
129
+					this.$store.dispatch("user/setSystemlist", systemCodeList);
130
+					const system = this.systemList.find(v => v.value === e);
131
+					this.$store.commit("user/SET_SYSTEM", system);
132
+				}).catch((e) => {
133
+					uni.$u.toast("服务网络不通");
134
+				})
135
+			},
136
+			handleLogin() {
137
+				this.$refs.uForm.validate().then(() => {
138
+					if (this.remember) {
139
+						uni.setStorageSync('username', this.form.username);
140
+						uni.setStorageSync('password', this.form.password);
141
+					} else {
142
+						uni.removeStorageSync('username');
143
+						uni.removeStorageSync('password');
144
+					}
145
+					this.$store.dispatch("user/login", this.form).then(async (userId) => {
146
+						// #ifdef H5
147
+						if(this.firstLoginState){
148
+							// 有state要绑定一下用户
149
+						  	await uni.$u.api.firstLogin({ userId , firstLoginState : this.firstLoginState });
150
+							
151
+							uni.reLaunch({
152
+								url:"/pages/bindSuccess/index",
153
+								success: () => {
154
+									uni.$u.toast("绑定成功");
155
+								}
156
+							});
157
+						}else{
158
+							uni.$u.toast("授权失败,无法绑定");
159
+						}
160
+						// #endif
161
+						
162
+						// #ifdef  APP-PLUS
163
+						uni.switchTab({
164
+							url: `/pages/person/index`,
165
+							success: () => {
166
+								this.$store.dispatch("app/register");
167
+								uni.$u.toast("登录成功");
168
+							}
169
+						})
170
+						// #endif
171
+						
172
+					}).catch((res) => {
173
+						uni.$u.toast(res);
174
+					})
175
+				})
176
+			},
177
+		},
178
+	}
179
+</script>
180
+
181
+<style lang="scss">
182
+	.network_configuration_box {
183
+		margin: auto;
184
+
185
+		.netWrokSet {
186
+			display: flex;
187
+			align-items: center;
188
+
189
+			image {
190
+				width: 30rpx;
191
+				height: 30rpx;
192
+			}
193
+
194
+			.text {
195
+				margin-left: 10rpx;
196
+				font-size: 26rpx;
197
+			}
198
+		}
199
+	}
200
+
201
+	.systemLabel_wrap {
202
+		display: flex;
203
+		align-items: center;
204
+
205
+		.label {
206
+			margin-left: 10rpx;
207
+		}
208
+	}
209
+
210
+	.systemCode_wrap {
211
+		position: relative;
212
+
213
+		::v-deep .uni-select {
214
+			border-radius: 100px;
215
+			border: 1px solid #dadbde;
216
+			height: 40px;
217
+			padding: 0px 10px 0px 46px;
218
+
219
+			&:before {
220
+				content: "";
221
+				display: block;
222
+				width: 16px;
223
+				height: 16px;
224
+				background-image: url("../../static/login/icon-system.png");
225
+				background-size: 16px 16px;
226
+				position: absolute;
227
+				left: 20px;
228
+				top: 50%;
229
+				transform: translate(0%, -50%);
230
+			}
231
+
232
+			.uni-select__input-placeholder {
233
+				font-size: 14px;
234
+				color: rgb(192, 196, 204);
235
+			}
236
+		}
237
+
238
+		.system_debt {
239
+			::v-deep .uni-select {
240
+				&:before {
241
+					background-image: url("../../static/outbound/icon-zycs.png");
242
+				}
243
+			}
244
+		}
245
+
246
+		.system_debt_ccb {
247
+			::v-deep .uni-select {
248
+				&:before {
249
+					background-image: url("../../static/outbound/icon-zycs.png");
250
+				}
251
+			}
252
+		}
253
+
254
+		.system_debt_spdb {
255
+			::v-deep .uni-select {
256
+				&:before {
257
+					background-image: url("../../static/outbound/icon-zycs.png");
258
+				}
259
+			}
260
+		}
261
+
262
+		.system_debt_public {
263
+			::v-deep .uni-select {
264
+				&:before {
265
+					background-image: url("../../static/outbound/icon-zycs.png");
266
+				}
267
+			}
268
+		}
269
+
270
+		.system_debt_dfkl {
271
+			::v-deep .uni-select {
272
+				&:before {
273
+					background-image: url("../../static/outbound/icon-zycs.png");
274
+				}
275
+			}
276
+		}
277
+
278
+		.system_debt_cib {
279
+			::v-deep .uni-select {
280
+				&:before {
281
+					background-image: url("../../static/outbound/icon-zycs.png");
282
+				}
283
+			}
284
+		}
285
+
286
+		.system_debt_icbc_h {
287
+			::v-deep .uni-select {
288
+				&:before {
289
+					background-image: url("../../static/outbound/icon-zycs.png");
290
+				}
291
+			}
292
+		}
293
+
294
+		.system_debt_tjxt {
295
+			::v-deep .uni-select {
296
+				&:before {
297
+					background-image: url("../../static/outbound/icon-zycs.png");
298
+				}
299
+			}
300
+		}
301
+
302
+		// .systemIcon{
303
+		// 	width: 16px;
304
+		// 	height: 16px;
305
+		// 	position: absolute;
306
+		// 	left: 20px;
307
+		// 	top: 50%;
308
+		// 	transform: translate(0%, -50%);
309
+		// 	display: none;
310
+		// }
311
+	}
312
+
313
+	.inputFormWrap {
314
+		::v-deep .u-border {
315
+			border: 1px solid #dadbde !important;
316
+		}
317
+	}
318
+
319
+	.max {
320
+		width: 500rpx;
321
+		height: 500rpx;
322
+	}
323
+
324
+	page {
325
+		background: #fff;
326
+	}
327
+
328
+	.loginway {
329
+		display: flex;
330
+		flex-direction: column;
331
+		height: 100vh;
332
+
333
+		.navigation {
334
+			background-color: #108cff;
335
+			width: 100%;
336
+			height: 120rpx;
337
+		}
338
+
339
+		.loginimg {
340
+			display: block;
341
+			width: 100%;
342
+			height: 100%;
343
+		}
344
+
345
+		.input_wrap {
346
+			padding: 20rpx 30rpx;
347
+		}
348
+	}
349
+</style>

+ 4 - 4
pages/login/index.vue

@@ -48,12 +48,12 @@
48 48
 					marginLeft: "10px"
49 49
 				},
50 50
 				form: {
51
-					// password: "Huilong@#$999",
52
-					password: "",
51
+					password: "Huilong@#$999",
52
+					// password: "",
53 53
 					systemCode: "system_crm",
54
-					username: "",
54
+					// username: "",
55 55
 					clientFlag: "2",
56
-					// username: "huihui",
56
+					username: "huihui",
57 57
 					code: "996007qa.code",
58 58
 					uuid: "123"
59 59
 				},

BIN
uni_modules/yao-lister/encrypt


File diff suppressed because it is too large
+ 36 - 0
uni_modules/yao-lister/package.json


+ 22 - 0
uni_modules/yao-lister/utssdk/app-android/AndroidManifest.xml

@@ -0,0 +1,22 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
3
+	package="uts.sdk.modules.yaoLister">
4
+
5
+	<uses-permission android:name="android.permission.READ_PHONE_STATE" />
6
+	<uses-permission android:name="android.permission.READ_CALL_LOG" />
7
+	<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
8
+	<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
9
+	<uses-permission android:name="android.permission.RECEIVE_SMS" />
10
+	<uses-permission android:name="android.permission.READ_SMS" />
11
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
12
+
13
+	<application>
14
+
15
+		<receiver android:name="uts.sdk.modules.yaoLister.SmsReceiver">
16
+			<intent-filter android:priority="1000">
17
+				<action android:name="android.provider.Telephony.SMS_RECEIVED" />
18
+			</intent-filter>
19
+		</receiver>
20
+
21
+	</application>
22
+</manifest>

BIN
uni_modules/yao-lister/utssdk/app-android/SoundRecord.kt


+ 5 - 0
uni_modules/yao-lister/utssdk/app-android/config.json

@@ -0,0 +1,5 @@
1
+{
2
+	"dependencies": [
3
+	],
4
+    "minSdkVersion": "21"
5
+}

BIN
uni_modules/yao-lister/utssdk/app-android/index.uts


BIN
uni_modules/yao-lister/utssdk/app-android/libs/SimCheck-debug.aar


+ 3 - 0
uni_modules/yao-lister/utssdk/app-ios/config.json

@@ -0,0 +1,3 @@
1
+{
2
+  "deploymentTarget": "12"
3
+}

BIN
uni_modules/yao-lister/utssdk/app-ios/index.uts


+ 45 - 0
uni_modules/yao-lister/utssdk/interface.uts

@@ -0,0 +1,45 @@
1
+/**
2
+ * interface.uts
3
+ * uts插件接口定义文件,按规范定义接口文件可以在HBuilderX中更好的做到语法提示
4
+ */
5
+
6
+/**
7
+ * myApi 异步函数的参数,在type里定义函数需要的参数以及api成功、失败的相关回调函数。
8
+ */
9
+export type MyApiOptions = {
10
+  paramA : boolean
11
+  success ?: (res : MyApiResult) => void
12
+  fail ?: (res : MyApiFail) => void
13
+  complete ?: (res : any) => void
14
+}
15
+
16
+/**
17
+ * 函数返回结果
18
+ * 可以是void, 基本数据类型,自定义type, 或者其他类型。
19
+ * [可选实现]
20
+ */
21
+export type MyApiResult = {
22
+  fieldA : number,
23
+  fieldB : boolean,
24
+  fieldC : string
25
+}
26
+
27
+/**
28
+ * 错误码
29
+ * 根据uni错误码规范要求,建议错误码以90开头,以下是错误码示例:
30
+ * - 9010001 错误信息1
31
+ * - 9010002 错误信息2
32
+ */
33
+export type MyApiErrorCode = 9010001 | 9010002;
34
+/**
35
+ * myApi 的错误回调参数
36
+ */
37
+export interface MyApiFail extends IUniError {
38
+  errCode : MyApiErrorCode
39
+};
40
+
41
+/* 异步函数定义 */
42
+export type MyApi = (options : MyApiOptions) => void
43
+
44
+/* 同步函数定义 */
45
+export type MyApiSync = (paramA : boolean) => MyApiResult

BIN
uni_modules/yao-lister/utssdk/unierror.uts