Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-starter
提交
66c410e0
U
uni-starter
项目概览
DCloud
/
uni-starter
通知
4671
Star
228
Fork
210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
66c410e0
编写于
12月 14, 2023
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
2.1.6 更新 依赖的uni-id-pages的版本为1.1.17
上级
f0058035
变更
28
隐藏空白更改
内联
并排
Showing
28 changed file
with
1483 addition
and
278 deletion
+1483
-278
changelog.md
changelog.md
+2
-0
uni_modules/uni-captcha/changelog.md
uni_modules/uni-captcha/changelog.md
+6
-0
uni_modules/uni-captcha/components/uni-captcha/uni-captcha.uvue
...dules/uni-captcha/components/uni-captcha/uni-captcha.uvue
+180
-0
uni_modules/uni-captcha/components/uni-popup-captcha/uni-popup-captcha.uvue
...ptcha/components/uni-popup-captcha/uni-popup-captcha.uvue
+134
-0
uni_modules/uni-captcha/package.json
uni_modules/uni-captcha/package.json
+1
-1
uni_modules/uni-captcha/static/run.gif
uni_modules/uni-captcha/static/run.gif
+0
-0
uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/index.obj.js
...ptcha/uniCloud/cloudfunctions/uni-captcha-co/index.obj.js
+9
-5
uni_modules/uni-forms/changelog.md
uni_modules/uni-forms/changelog.md
+2
-0
uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
...es/uni-forms/components/uni-forms-item/uni-forms-item.vue
+5
-5
uni_modules/uni-forms/components/uni-forms/uni-forms.vue
uni_modules/uni-forms/components/uni-forms/uni-forms.vue
+1
-1
uni_modules/uni-forms/package.json
uni_modules/uni-forms/package.json
+1
-1
uni_modules/uni-icons/changelog.md
uni_modules/uni-icons/changelog.md
+14
-0
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
+91
-0
uni_modules/uni-icons/components/uni-icons/uni-icons.vue
uni_modules/uni-icons/components/uni-icons/uni-icons.vue
+52
-38
uni_modules/uni-icons/components/uni-icons/uniicons.css
uni_modules/uni-icons/components/uni-icons/uniicons.css
+32
-31
uni_modules/uni-icons/components/uni-icons/uniicons.ttf
uni_modules/uni-icons/components/uni-icons/uniicons.ttf
+0
-0
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
+664
-0
uni_modules/uni-icons/package.json
uni_modules/uni-icons/package.json
+14
-12
uni_modules/uni-id-pages/changelog.md
uni_modules/uni-id-pages/changelog.md
+2
-0
uni_modules/uni-id-pages/package.json
uni_modules/uni-id-pages/package.json
+1
-1
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js
...-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js
+79
-81
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js
.../uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js
+27
-27
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js
...unctions/uni-id-co/module/dev/get-supported-login-type.js
+70
-71
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json
...i-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json
+2
-2
uni_modules/uni-popup/changelog.md
uni_modules/uni-popup/changelog.md
+2
-0
uni_modules/uni-popup/components/uni-popup/uni-popup.uvue
uni_modules/uni-popup/components/uni-popup/uni-popup.uvue
+90
-0
uni_modules/uni-popup/components/uni-popup/uni-popup.vue
uni_modules/uni-popup/components/uni-popup/uni-popup.vue
+1
-1
uni_modules/uni-popup/package.json
uni_modules/uni-popup/package.json
+1
-1
未找到文件。
changelog.md
浏览文件 @
66c410e0
## 2.1.6(2023-12-14)
-
更新 依赖的uni-id-pages的版本为1.1.17
## 2.1.5(2023-10-20)
-
更新 依赖的uni-id-pages的版本为1.1.16
## 2.1.4(2023-07-11)
...
...
uni_modules/uni-captcha/changelog.md
浏览文件 @
66c410e0
## 0.7.3(2023-11-15)
-
更新 uni-popup-captcha.uvue依赖的popup组件,直接使用uni_modules下的uni-popup组件
## 0.7.2(2023-11-07)
-
新增 前端组件:uni-captcha.uvue、uni-popup-captcha
## 0.7.1(2023-11-07)
-
新增 前端组件:uni-captcha.uvue、uni-popup-captcha
## 0.7.0(2023-10-10)
-
新增 支持在
`uni-config-center`
中配置mode,可选值为svg和bmp,配置成bmp后可以在uniappx的uvue页面正常显示验证码(uvue不支持显示svg验证码)
## 0.6.4(2023-01-16)
...
...
uni_modules/uni-captcha/components/uni-captcha/uni-captcha.uvue
0 → 100644
浏览文件 @
66c410e0
<template>
<view class="captcha-box">
<view class="captcha-img-box">
<image class="loding" src="/uni_modules/uni-captcha/static/run.gif" v-if="loging" mode="widthFix" />
<image class="captcha-img" :class="{opacity:loging}" @click="getImageCaptcha(true)" :src="captchaBase64" mode="widthFix" />
</view>
<input @blur="focusCaptchaInput = false" :focus="focusCaptchaInput" type="digit" class="captcha" :inputBorder="false"
maxlength="4" v-model="val" placeholder="请输入验证码" :cursor-spacing="cursorSpacing" />
</view>
</template>
<script>
export default {
emits: ["modelValue"],
props: {
cursorSpacing: {
type: Number,
default: 100
},
modelValue: {
type: String,
default: ""
},
value: {
type: String,
default: ""
},
scene: {
type: String,
default: ""
},
focus: {
type: Boolean,
default: false
}
},
data() {
return {
focusCaptchaInput: false,
captchaBase64: "" as string,
loging: false,
val: ""
};
},
watch: {
value: {
handler(value : string) {
// console.log('setvue', value);
this.val = value
},
immediate: true
},
modelValue: {
handler(modelValue : string) {
// console.log('setvue', modelValue);
this.val = modelValue
},
immediate: true
},
scene: {
handler(scene : string) {
if (scene.length != 0) {
this.getImageCaptcha(this.focus)
} else {
uni.showToast({
title: 'scene不能为空',
icon: 'none'
});
}
},
immediate: true
},
val(value : string) {
// console.log('setvue', value);
// TODO 兼容 vue2
// #ifdef VUE2
this.$emit('input', value);
// #endif
// TODO 兼容 vue3
// #ifdef VUE3
this.$emit('update:modelValue', value)
// #endif
}
},
methods: {
setFocus(state:boolean){
this.focusCaptchaInput = state
},
getImageCaptcha(focus : boolean) {
this.loging = true
if (focus) {
this.val = ''
this.focusCaptchaInput = true
}
const uniIdCo = uniCloud.importObject("uni-captcha-co", {
customUI: true
})
uniIdCo.getImageCaptcha({
scene: this.scene,
isUniAppX:true
}).then((result : UTSJSONObject) => {
this.captchaBase64 = (result.getString('captchaBase64') as string)
})
.catch<void>((err : any | null) : void => {
const error = err as UniCloudError
console.error(error)
console.error(error.code)
uni.showToast({
title: error.message,
icon: 'none'
});
})
.finally(()=> {
this.loging = false
})
}
}
}
</script>
<style lang="scss" scoped>
.captcha-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: flex-end;
flex: 1;
}
.captcha-img-box,
.captcha {
height: 44px;
}
.captcha {
flex: 1;
}
.captcha-img-box {
position: relative;
background-color: #FEFAE7;
}
.captcha {
background-color: #F8F8F8;
font-size: 14px;
flex: 1;
padding: 0 20rpx;
margin-left: 20rpx;
/* #ifndef APP-NVUE */
box-sizing: border-box;
/* #endif */
}
.captcha-img-box,
.captcha-img,
.loding {
width: 100px;
}
.captcha-img {
/* #ifdef WEB */
cursor: pointer;
/* #endif */
height: 44px;
}
.loding {
z-index: 9;
position: absolute;
width: 30px;
margin:7px 35px;
}
.opacity {
opacity: 0.5;
}
</style>
\ No newline at end of file
uni_modules/uni-captcha/components/uni-popup-captcha/uni-popup-captcha.uvue
0 → 100644
浏览文件 @
66c410e0
<template>
<uni-popup ref="popup" @clickMask="cancel">
<view class="popup-captcha">
<view class="content">
<text class="title">{{title}}</text>
<uni-captcha ref="captcha" :focus="focus" :scene="scene" v-model="val" :cursorSpacing="150"></uni-captcha>
</view>
<view class="button-box">
<text @click="cancel" class="btn cancel">取消</text>
<text @click="confirm" class="btn confirm">确认</text>
</view>
</view>
</uni-popup>
</template>
<script>
import uniPopup from './uni-popup/uni-popup.uvue';
let confirmCallBack = ():void=>console.log('未传入回调函数')
export default {
components: {
uniPopup
},
emits:["modelValue","confirm","cancel"],
data() {
return {
focus: false,
val:""
}
},
props: {
modelValue: {
type: String,
default: ""
},
value: {
type: String,
default: ""
},
scene: {
type: String,
default: ""
},
title: {
type: String,
default: "默认标题"
}
},
watch: {
val(val:string) {
// console.log(val);
// TODO 兼容 vue2
// #ifdef VUE2
this.$emit('input', val);
// #endif
// TODO 兼容 vue3
// #ifdef VUE3
this.$emit('update:modelValue', val)
// #endif
if(val.length == 4){
this.confirm()
}
}
},
mounted() {},
methods: {
open(callback: () => void) {
// console.log('callback',callback);
confirmCallBack = callback;
this.focus = true
this.val = "";
(this.$refs['popup'] as ComponentPublicInstance).$callMethod("open");
this.$nextTick(()=>{
(this.$refs['captcha'] as ComponentPublicInstance).$callMethod("getImageCaptcha",true);
})
},
close() {
this.focus = false;
(this.$refs['popup'] as ComponentPublicInstance).$callMethod("close");
},
cancel(){
this.close()
this.$emit("cancel")
},
confirm() {
if (this.val.length != 4) {
return uni.showToast({
title: '请填写验证码',
icon: 'none'
});
}
this.close()
this.$emit('confirm')
confirmCallBack()
}
}
}
</script>
<style lang="scss" scoped>
.popup-captcha {
background-color: #fff;
flex-direction: column;
width: 600rpx;
padding:10px 15px;
border-radius: 10px;
}
.popup-captcha .title {
text-align: center;
font-weight: 700;
margin: 5px 0;
}
.popup-captcha .button-box {
flex-direction: row;
justify-content: space-around;
margin-top: 5px;
}
.popup-captcha .button-box .btn {
flex: 1;
height: 35px;
line-height: 35px;
text-align: center;
}
.popup-captcha .button-box .cancel {
border: 1px solid #eee;
color: #666;
}
.confirm {
background-color: #0070ff;
color: #fff;
margin-left: 5px;
}
</style>
\ No newline at end of file
uni_modules/uni-captcha/package.json
浏览文件 @
66c410e0
{
"id"
:
"uni-captcha"
,
"displayName"
:
"uni-captcha"
,
"version"
:
"0.7.
0
"
,
"version"
:
"0.7.
3
"
,
"description"
:
"云端一体图形验证码组件"
,
"keywords"
:
[
"captcha"
,
...
...
uni_modules/uni-captcha/static/run.gif
0 → 100644
浏览文件 @
66c410e0
30.4 KB
uni_modules/uni-captcha/uniCloud/cloudfunctions/uni-captcha-co/index.obj.js
浏览文件 @
66c410e0
...
...
@@ -7,7 +7,7 @@ const db = uniCloud.database();
const
verifyCodes
=
db
.
collection
(
'
opendb-verify-codes
'
)
module
.
exports
=
{
async
getImageCaptcha
({
scene
scene
,
isUniAppX
})
{
//获取设备id
let
{
...
...
@@ -22,10 +22,14 @@ module.exports = {
}).
limit
(
1
).
get
()
//如果已存在则调用刷新接口,反之调用插件接口
let
action
=
res
.
data
.
length
?
'
refresh
'
:
'
create
'
//执行并返回结果
return
await
uniCaptcha
[
action
](
{
//执行并返回结果
let
option
=
{
scene
,
//来源客户端传递,表示:使用场景值,用于防止不同功能的验证码混用
uniPlatform
:
platform
})
uniPlatform
:
platform
}
if
(
isUniAppX
){
option
.
mode
=
"
bmp
"
}
return
await
uniCaptcha
[
action
](
option
)
}
}
\ No newline at end of file
uni_modules/uni-forms/changelog.md
浏览文件 @
66c410e0
## 1.4.10(2023-11-03)
-
优化 labelWidth 描述错误
## 1.4.9(2023-02-10)
-
修复 required 参数无法动态绑定
## 1.4.8(2022-08-23)
...
...
uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
浏览文件 @
66c410e0
...
...
@@ -36,7 +36,7 @@
* @tutorial https://ext.dcloud.net.cn/plugin?id=2773
* @property {Boolean} required 是否必填,左边显示红色"*"号
* @property {String } label 输入框左边的文字提示
* @property {Number } labelWidth label的宽度,单位px(默认
65
)
* @property {Number } labelWidth label的宽度,单位px(默认
70
)
* @property {String } labelAlign = [left|center|right] label的文字对齐方式(默认left)
* @value left label 左侧显示
* @value center label 居中
...
...
@@ -91,7 +91,7 @@
type
:
String
,
default
:
''
},
// label的宽度
,默认 80
// label的宽度
labelWidth
:
{
type
:
[
String
,
Number
],
default
:
''
...
...
@@ -128,7 +128,7 @@
errMsg
:
''
,
userRules
:
null
,
localLabelAlign
:
'
left
'
,
localLabelWidth
:
'
65
px
'
,
localLabelWidth
:
'
70
px
'
,
localLabelPos
:
'
left
'
,
border
:
false
,
isFirstBorder
:
false
,
...
...
@@ -413,9 +413,9 @@
// const {
// labelWidth
// } = this.form
return
this
.
num2px
(
this
.
labelWidth
?
this
.
labelWidth
:
(
labelWidth
||
(
this
.
label
?
65
:
'
auto
'
)))
return
this
.
num2px
(
this
.
labelWidth
?
this
.
labelWidth
:
(
labelWidth
||
(
this
.
label
?
70
:
'
auto
'
)))
// }
// return '
65
px'
// return '
70
px'
},
// 处理 label 位置
_labelPosition
()
{
...
...
uni_modules/uni-forms/components/uni-forms/uni-forms.vue
浏览文件 @
66c410e0
...
...
@@ -52,7 +52,7 @@
* @property {String} labelPosition = [top|left] label 位置 默认 left
* @value top 顶部显示 label
* @value left 左侧显示 label
* @property {String} labelWidth label 宽度,默认
65
px
* @property {String} labelWidth label 宽度,默认
70
px
* @property {String} labelAlign = [left|center|right] label 居中方式 默认 left
* @value left label 左侧显示
* @value center label 居中
...
...
uni_modules/uni-forms/package.json
浏览文件 @
66c410e0
{
"id"
:
"uni-forms"
,
"displayName"
:
"uni-forms 表单"
,
"version"
:
"1.4.
9
"
,
"version"
:
"1.4.
10
"
,
"description"
:
"由输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据"
,
"keywords"
:
[
"uni-ui"
,
...
...
uni_modules/uni-icons/changelog.md
浏览文件 @
66c410e0
## 2.0.7(2023-12-14)
-
修复 size 属性为 string 时,不加单位导致尺寸异常的bug
## 2.0.6(2023-12-11)
-
优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.5(2023-12-11)
-
优化 兼容老版本icon类型,如 top ,bottom 等
## 2.0.4(2023-12-06)
-
优化 uni-app x 下示例项目图标排序
## 2.0.3(2023-12-06)
-
修复 nvue下引入组件报错的bug
## 2.0.2(2023-12-05)
-优化 size 属性支持单位
## 2.0.1(2023-12-05)
-
新增 uni-app x 支持定义图标
## 1.3.5(2022-01-24)
-
优化 size 属性可以传入不带单位的字符串数值
## 1.3.4(2022-01-24)
...
...
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
0 → 100644
浏览文件 @
66c410e0
<template>
<text class="uni-icons" :style="styleObj">
<slot>{{unicode}}</slot>
</text>
</template>
<script>
import { fontData, IconsDataItem } from './uniicons_file'
/**
* Icons 图标
* @description 用于展示 icon 图标
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export default {
name: "uni-icons",
props: {
type: {
type: String,
default: ''
},
color: {
type: String,
default: '#333333'
},
size: {
type: Object,
default: 24
},
fontFamily: {
type: String,
default: ''
}
},
data() {
return {};
},
computed: {
unicode() : string {
let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
if (codes !== null) {
return codes.unicode
}
return ''
},
iconSize() : string {
const size = this.size
if (typeof size == 'string') {
const reg = /^[0-9]*$/g
return reg.test(size as string) ? '' + size + 'px' : '' + size;
// return '' + this.size
}
return this.getFontSize(size as number)
},
styleObj() : UTSJSONObject {
if (this.fontFamily !== '') {
return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
}
return { color: this.color, fontSize: this.iconSize }
}
},
created() { },
methods: {
/**
* 字体大小
*/
getFontSize(size : number) : string {
return size + 'px';
},
},
}
</script>
<style scoped>
@font-face {
font-family: UniIconsFontFamily;
src: url('./uniicons.ttf');
}
.uni-icons {
font-family: UniIconsFontFamily;
font-size: 18px;
font-style: normal;
color: #333;
}
</style>
uni_modules/uni-icons/components/uni-icons/uni-icons.vue
浏览文件 @
66c410e0
<
template
>
<!-- #ifdef APP-NVUE -->
<text
:style=
"
{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">
{{
unicode
}}
</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text
:style=
"
{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
</text>
<
template
>
<!-- #ifdef APP-NVUE -->
<text
:style=
"styleObj"
class=
"uni-icons"
@
click=
"_onClick"
>
{{
unicode
}}
</text>
<!-- #endif -->
<!-- #ifndef APP-NVUE -->
<text
:style=
"styleObj"
class=
"uni-icons"
:class=
"['uniui-'+type,customPrefix,customPrefix?type:'']"
@
click=
"_onClick"
>
<slot></slot>
</text>
<!-- #endif -->
</
template
>
<
script
>
import
icons
from
'
./icons.js
'
;
const
getVal
=
(
val
)
=>
{
const
reg
=
/^
[
0-9
]
*$/g
return
(
typeof
val
===
'
number
'
||
reg
.
test
(
val
)
)?
val
+
'
px
'
:
val
;
}
import
{
fontData
}
from
'
./uniicons_file.ts
'
;
const
getVal
=
(
val
)
=>
{
const
reg
=
/^
[
0-9
]
*$/g
return
(
typeof
val
===
'
number
'
||
reg
.
test
(
val
))
?
val
+
'
px
'
:
val
;
}
// #ifdef APP-NVUE
var
domModule
=
weex
.
requireModule
(
'
dom
'
);
import
iconUrl
from
'
./uniicons.ttf
'
domModule
.
addRule
(
'
fontFace
'
,
{
'
fontFamily
'
:
"
uniicons
"
,
'
src
'
:
"
url('
"
+
iconUrl
+
"
')
"
'
src
'
:
"
url('
"
+
iconUrl
+
"
')
"
});
// #endif
...
...
@@ -28,13 +32,13 @@
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
* @property {Number} size 图标大小
* @property {String} type 图标图案,参考示例
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @property {String} color 图标颜色
* @property {String} customPrefix 自定义图标
* @event {Function} click 点击 Icon 触发事件
*/
export
default
{
name
:
'
UniIcons
'
,
emits
:[
'
click
'
],
emits
:
[
'
click
'
],
props
:
{
type
:
{
type
:
String
,
...
...
@@ -46,29 +50,39 @@
},
size
:
{
type
:
[
Number
,
String
],
default
:
16
},
customPrefix
:{
type
:
String
,
default
:
''
default
:
24
},
customPrefix
:
{
type
:
String
,
default
:
''
},
fontFamily
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
icons
:
icons
.
glyphs
icons
:
fontData
}
},
computed
:
{
unicode
()
{
let
code
=
this
.
icons
.
find
(
v
=>
v
.
font_class
===
this
.
type
)
if
(
code
)
{
return
code
.
unicode
}
return
''
},
iconSize
()
{
return
getVal
(
this
.
size
)
},
styleObj
()
{
if
(
this
.
fontFamily
!==
''
)
{
return
`color:
${
this
.
color
}
; font-size:
${
this
.
iconSize
}
; font-family:
${
this
.
fontFamily
}
;`
}
return
`color:
${
this
.
color
}
; font-size:
${
this
.
iconSize
}
;`
}
},
computed
:{
unicode
(){
let
code
=
this
.
icons
.
find
(
v
=>
v
.
font_class
===
this
.
type
)
if
(
code
){
return
unescape
(
`%u
${
code
.
unicode
}
`
)
}
return
''
},
iconSize
(){
return
getVal
(
this
.
size
)
}
},
methods
:
{
_onClick
()
{
...
...
@@ -78,19 +92,19 @@
}
</
script
>
<
style
lang=
"scss"
>
/* #ifndef APP-NVUE */
<
style
lang=
"scss"
>
/* #ifndef APP-NVUE */
@import
'./uniicons.css'
;
@font-face
{
font-family
:
uniicons
;
src
:
url('./uniicons.ttf')
format
(
'truetype'
)
;
src
:
url('./uniicons.ttf')
;
}
/* #endif */
/* #endif */
.uni-icons
{
font-family
:
uniicons
;
text-decoration
:
none
;
text-align
:
center
;
}
</
style
>
uni_modules/uni-icons/components/uni-icons/uniicons.css
浏览文件 @
66c410e0
.uniui-cart-filled
:before
{
content
:
"\e6d0"
;
}
.uniui-gift-filled
:before
{
content
:
"\e6c4"
;
}
.uniui-color
:before
{
content
:
"\e6cf"
;
}
...
...
@@ -58,10 +67,6 @@
content
:
"\e6c3"
;
}
.uniui-gift-filled
:before
{
content
:
"\e6c4"
;
}
.uniui-fire-filled
:before
{
content
:
"\e6c5"
;
}
...
...
@@ -82,6 +87,18 @@
content
:
"\e698"
;
}
.uniui-arrowthinleft
:before
{
content
:
"\e6d2"
;
}
.uniui-arrowthinup
:before
{
content
:
"\e6d3"
;
}
.uniui-arrowthindown
:before
{
content
:
"\e6d4"
;
}
.uniui-back
:before
{
content
:
"\e6b9"
;
}
...
...
@@ -94,55 +111,43 @@
content
:
"\e6bb"
;
}
.uniui-arrowthinright
:before
{
content
:
"\e6bb"
;
}
.uniui-arrow-left
:before
{
content
:
"\e6bc"
;
}
.uniui-arrowthinleft
:before
{
content
:
"\e6bc"
;
}
.uniui-arrow-up
:before
{
content
:
"\e6bd"
;
}
.uniui-arrowthinup
:before
{
content
:
"\e6bd"
;
}
.uniui-arrow-down
:before
{
content
:
"\e6be"
;
}
.uniui-arrowthin
down
:before
{
content
:
"\e6
be
"
;
.uniui-arrowthin
right
:before
{
content
:
"\e6
d1
"
;
}
.uniui-
bottom
:before
{
.uniui-
down
:before
{
content
:
"\e6b8"
;
}
.uniui-
arrowdown
:before
{
.uniui-
bottom
:before
{
content
:
"\e6b8"
;
}
.uniui-right
:before
{
content
:
"\e6
b
5"
;
.uniui-
arrow
right
:before
{
content
:
"\e6
d
5"
;
}
.uniui-
arrow
right
:before
{
.uniui-right
:before
{
content
:
"\e6b5"
;
}
.uniui-
to
p
:before
{
.uniui-
u
p
:before
{
content
:
"\e6b6"
;
}
.uniui-
arrowu
p
:before
{
.uniui-
to
p
:before
{
content
:
"\e6b6"
;
}
...
...
@@ -150,8 +155,8 @@
content
:
"\e6b7"
;
}
.uniui-arrow
left
:before
{
content
:
"\e6
b7
"
;
.uniui-arrow
up
:before
{
content
:
"\e6
d6
"
;
}
.uniui-eye
:before
{
...
...
@@ -638,10 +643,6 @@
content
:
"\e627"
;
}
.uniui-cart-filled
:before
{
content
:
"\e629"
;
}
.uniui-checkbox
:before
{
content
:
"\e62b"
;
}
...
...
uni_modules/uni-icons/components/uni-icons/uniicons.ttf
浏览文件 @
66c410e0
无法预览此类型文件
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
0 → 100644
浏览文件 @
66c410e0
export
type
IconsData
=
{
id
:
string
name
:
string
font_family
:
string
css_prefix_text
:
string
description
:
string
glyphs
:
Array
<
IconsDataItem
>
}
export
type
IconsDataItem
=
{
font_class
:
string
unicode
:
string
}
export
const
fontData
=
[
{
"
font_class
"
:
"
arrow-down
"
,
"
unicode
"
:
"
\
ue6be
"
},
{
"
font_class
"
:
"
arrow-left
"
,
"
unicode
"
:
"
\
ue6bc
"
},
{
"
font_class
"
:
"
arrow-right
"
,
"
unicode
"
:
"
\
ue6bb
"
},
{
"
font_class
"
:
"
arrow-up
"
,
"
unicode
"
:
"
\
ue6bd
"
},
{
"
font_class
"
:
"
auth
"
,
"
unicode
"
:
"
\
ue6ab
"
},
{
"
font_class
"
:
"
auth-filled
"
,
"
unicode
"
:
"
\
ue6cc
"
},
{
"
font_class
"
:
"
back
"
,
"
unicode
"
:
"
\
ue6b9
"
},
{
"
font_class
"
:
"
bars
"
,
"
unicode
"
:
"
\
ue627
"
},
{
"
font_class
"
:
"
calendar
"
,
"
unicode
"
:
"
\
ue6a0
"
},
{
"
font_class
"
:
"
calendar-filled
"
,
"
unicode
"
:
"
\
ue6c0
"
},
{
"
font_class
"
:
"
camera
"
,
"
unicode
"
:
"
\
ue65a
"
},
{
"
font_class
"
:
"
camera-filled
"
,
"
unicode
"
:
"
\
ue658
"
},
{
"
font_class
"
:
"
cart
"
,
"
unicode
"
:
"
\
ue631
"
},
{
"
font_class
"
:
"
cart-filled
"
,
"
unicode
"
:
"
\
ue6d0
"
},
{
"
font_class
"
:
"
chat
"
,
"
unicode
"
:
"
\
ue65d
"
},
{
"
font_class
"
:
"
chat-filled
"
,
"
unicode
"
:
"
\
ue659
"
},
{
"
font_class
"
:
"
chatboxes
"
,
"
unicode
"
:
"
\
ue696
"
},
{
"
font_class
"
:
"
chatboxes-filled
"
,
"
unicode
"
:
"
\
ue692
"
},
{
"
font_class
"
:
"
chatbubble
"
,
"
unicode
"
:
"
\
ue697
"
},
{
"
font_class
"
:
"
chatbubble-filled
"
,
"
unicode
"
:
"
\
ue694
"
},
{
"
font_class
"
:
"
checkbox
"
,
"
unicode
"
:
"
\
ue62b
"
},
{
"
font_class
"
:
"
checkbox-filled
"
,
"
unicode
"
:
"
\
ue62c
"
},
{
"
font_class
"
:
"
checkmarkempty
"
,
"
unicode
"
:
"
\
ue65c
"
},
{
"
font_class
"
:
"
circle
"
,
"
unicode
"
:
"
\
ue65b
"
},
{
"
font_class
"
:
"
circle-filled
"
,
"
unicode
"
:
"
\
ue65e
"
},
{
"
font_class
"
:
"
clear
"
,
"
unicode
"
:
"
\
ue66d
"
},
{
"
font_class
"
:
"
close
"
,
"
unicode
"
:
"
\
ue673
"
},
{
"
font_class
"
:
"
closeempty
"
,
"
unicode
"
:
"
\
ue66c
"
},
{
"
font_class
"
:
"
cloud-download
"
,
"
unicode
"
:
"
\
ue647
"
},
{
"
font_class
"
:
"
cloud-download-filled
"
,
"
unicode
"
:
"
\
ue646
"
},
{
"
font_class
"
:
"
cloud-upload
"
,
"
unicode
"
:
"
\
ue645
"
},
{
"
font_class
"
:
"
cloud-upload-filled
"
,
"
unicode
"
:
"
\
ue648
"
},
{
"
font_class
"
:
"
color
"
,
"
unicode
"
:
"
\
ue6cf
"
},
{
"
font_class
"
:
"
color-filled
"
,
"
unicode
"
:
"
\
ue6c9
"
},
{
"
font_class
"
:
"
compose
"
,
"
unicode
"
:
"
\
ue67f
"
},
{
"
font_class
"
:
"
contact
"
,
"
unicode
"
:
"
\
ue693
"
},
{
"
font_class
"
:
"
contact-filled
"
,
"
unicode
"
:
"
\
ue695
"
},
{
"
font_class
"
:
"
down
"
,
"
unicode
"
:
"
\
ue6b8
"
},
{
"
font_class
"
:
"
bottom
"
,
"
unicode
"
:
"
\
ue6b8
"
},
{
"
font_class
"
:
"
download
"
,
"
unicode
"
:
"
\
ue68d
"
},
{
"
font_class
"
:
"
download-filled
"
,
"
unicode
"
:
"
\
ue681
"
},
{
"
font_class
"
:
"
email
"
,
"
unicode
"
:
"
\
ue69e
"
},
{
"
font_class
"
:
"
email-filled
"
,
"
unicode
"
:
"
\
ue69a
"
},
{
"
font_class
"
:
"
eye
"
,
"
unicode
"
:
"
\
ue651
"
},
{
"
font_class
"
:
"
eye-filled
"
,
"
unicode
"
:
"
\
ue66a
"
},
{
"
font_class
"
:
"
eye-slash
"
,
"
unicode
"
:
"
\
ue6b3
"
},
{
"
font_class
"
:
"
eye-slash-filled
"
,
"
unicode
"
:
"
\
ue6b4
"
},
{
"
font_class
"
:
"
fire
"
,
"
unicode
"
:
"
\
ue6a1
"
},
{
"
font_class
"
:
"
fire-filled
"
,
"
unicode
"
:
"
\
ue6c5
"
},
{
"
font_class
"
:
"
flag
"
,
"
unicode
"
:
"
\
ue65f
"
},
{
"
font_class
"
:
"
flag-filled
"
,
"
unicode
"
:
"
\
ue660
"
},
{
"
font_class
"
:
"
folder-add
"
,
"
unicode
"
:
"
\
ue6a9
"
},
{
"
font_class
"
:
"
folder-add-filled
"
,
"
unicode
"
:
"
\
ue6c8
"
},
{
"
font_class
"
:
"
font
"
,
"
unicode
"
:
"
\
ue6a3
"
},
{
"
font_class
"
:
"
forward
"
,
"
unicode
"
:
"
\
ue6ba
"
},
{
"
font_class
"
:
"
gear
"
,
"
unicode
"
:
"
\
ue664
"
},
{
"
font_class
"
:
"
gear-filled
"
,
"
unicode
"
:
"
\
ue661
"
},
{
"
font_class
"
:
"
gift
"
,
"
unicode
"
:
"
\
ue6a4
"
},
{
"
font_class
"
:
"
gift-filled
"
,
"
unicode
"
:
"
\
ue6c4
"
},
{
"
font_class
"
:
"
hand-down
"
,
"
unicode
"
:
"
\
ue63d
"
},
{
"
font_class
"
:
"
hand-down-filled
"
,
"
unicode
"
:
"
\
ue63c
"
},
{
"
font_class
"
:
"
hand-up
"
,
"
unicode
"
:
"
\
ue63f
"
},
{
"
font_class
"
:
"
hand-up-filled
"
,
"
unicode
"
:
"
\
ue63e
"
},
{
"
font_class
"
:
"
headphones
"
,
"
unicode
"
:
"
\
ue630
"
},
{
"
font_class
"
:
"
heart
"
,
"
unicode
"
:
"
\
ue639
"
},
{
"
font_class
"
:
"
heart-filled
"
,
"
unicode
"
:
"
\
ue641
"
},
{
"
font_class
"
:
"
help
"
,
"
unicode
"
:
"
\
ue679
"
},
{
"
font_class
"
:
"
help-filled
"
,
"
unicode
"
:
"
\
ue674
"
},
{
"
font_class
"
:
"
home
"
,
"
unicode
"
:
"
\
ue662
"
},
{
"
font_class
"
:
"
home-filled
"
,
"
unicode
"
:
"
\
ue663
"
},
{
"
font_class
"
:
"
image
"
,
"
unicode
"
:
"
\
ue670
"
},
{
"
font_class
"
:
"
image-filled
"
,
"
unicode
"
:
"
\
ue678
"
},
{
"
font_class
"
:
"
images
"
,
"
unicode
"
:
"
\
ue650
"
},
{
"
font_class
"
:
"
images-filled
"
,
"
unicode
"
:
"
\
ue64b
"
},
{
"
font_class
"
:
"
info
"
,
"
unicode
"
:
"
\
ue669
"
},
{
"
font_class
"
:
"
info-filled
"
,
"
unicode
"
:
"
\
ue649
"
},
{
"
font_class
"
:
"
left
"
,
"
unicode
"
:
"
\
ue6b7
"
},
{
"
font_class
"
:
"
link
"
,
"
unicode
"
:
"
\
ue6a5
"
},
{
"
font_class
"
:
"
list
"
,
"
unicode
"
:
"
\
ue644
"
},
{
"
font_class
"
:
"
location
"
,
"
unicode
"
:
"
\
ue6ae
"
},
{
"
font_class
"
:
"
location-filled
"
,
"
unicode
"
:
"
\
ue6af
"
},
{
"
font_class
"
:
"
locked
"
,
"
unicode
"
:
"
\
ue66b
"
},
{
"
font_class
"
:
"
locked-filled
"
,
"
unicode
"
:
"
\
ue668
"
},
{
"
font_class
"
:
"
loop
"
,
"
unicode
"
:
"
\
ue633
"
},
{
"
font_class
"
:
"
mail-open
"
,
"
unicode
"
:
"
\
ue643
"
},
{
"
font_class
"
:
"
mail-open-filled
"
,
"
unicode
"
:
"
\
ue63a
"
},
{
"
font_class
"
:
"
map
"
,
"
unicode
"
:
"
\
ue667
"
},
{
"
font_class
"
:
"
map-filled
"
,
"
unicode
"
:
"
\
ue666
"
},
{
"
font_class
"
:
"
map-pin
"
,
"
unicode
"
:
"
\
ue6ad
"
},
{
"
font_class
"
:
"
map-pin-ellipse
"
,
"
unicode
"
:
"
\
ue6ac
"
},
{
"
font_class
"
:
"
medal
"
,
"
unicode
"
:
"
\
ue6a2
"
},
{
"
font_class
"
:
"
medal-filled
"
,
"
unicode
"
:
"
\
ue6c3
"
},
{
"
font_class
"
:
"
mic
"
,
"
unicode
"
:
"
\
ue671
"
},
{
"
font_class
"
:
"
mic-filled
"
,
"
unicode
"
:
"
\
ue677
"
},
{
"
font_class
"
:
"
micoff
"
,
"
unicode
"
:
"
\
ue67e
"
},
{
"
font_class
"
:
"
micoff-filled
"
,
"
unicode
"
:
"
\
ue6b0
"
},
{
"
font_class
"
:
"
minus
"
,
"
unicode
"
:
"
\
ue66f
"
},
{
"
font_class
"
:
"
minus-filled
"
,
"
unicode
"
:
"
\
ue67d
"
},
{
"
font_class
"
:
"
more
"
,
"
unicode
"
:
"
\
ue64d
"
},
{
"
font_class
"
:
"
more-filled
"
,
"
unicode
"
:
"
\
ue64e
"
},
{
"
font_class
"
:
"
navigate
"
,
"
unicode
"
:
"
\
ue66e
"
},
{
"
font_class
"
:
"
navigate-filled
"
,
"
unicode
"
:
"
\
ue67a
"
},
{
"
font_class
"
:
"
notification
"
,
"
unicode
"
:
"
\
ue6a6
"
},
{
"
font_class
"
:
"
notification-filled
"
,
"
unicode
"
:
"
\
ue6c1
"
},
{
"
font_class
"
:
"
paperclip
"
,
"
unicode
"
:
"
\
ue652
"
},
{
"
font_class
"
:
"
paperplane
"
,
"
unicode
"
:
"
\
ue672
"
},
{
"
font_class
"
:
"
paperplane-filled
"
,
"
unicode
"
:
"
\
ue675
"
},
{
"
font_class
"
:
"
person
"
,
"
unicode
"
:
"
\
ue699
"
},
{
"
font_class
"
:
"
person-filled
"
,
"
unicode
"
:
"
\
ue69d
"
},
{
"
font_class
"
:
"
personadd
"
,
"
unicode
"
:
"
\
ue69f
"
},
{
"
font_class
"
:
"
personadd-filled
"
,
"
unicode
"
:
"
\
ue698
"
},
{
"
font_class
"
:
"
personadd-filled-copy
"
,
"
unicode
"
:
"
\
ue6d1
"
},
{
"
font_class
"
:
"
phone
"
,
"
unicode
"
:
"
\
ue69c
"
},
{
"
font_class
"
:
"
phone-filled
"
,
"
unicode
"
:
"
\
ue69b
"
},
{
"
font_class
"
:
"
plus
"
,
"
unicode
"
:
"
\
ue676
"
},
{
"
font_class
"
:
"
plus-filled
"
,
"
unicode
"
:
"
\
ue6c7
"
},
{
"
font_class
"
:
"
plusempty
"
,
"
unicode
"
:
"
\
ue67b
"
},
{
"
font_class
"
:
"
pulldown
"
,
"
unicode
"
:
"
\
ue632
"
},
{
"
font_class
"
:
"
pyq
"
,
"
unicode
"
:
"
\
ue682
"
},
{
"
font_class
"
:
"
qq
"
,
"
unicode
"
:
"
\
ue680
"
},
{
"
font_class
"
:
"
redo
"
,
"
unicode
"
:
"
\
ue64a
"
},
{
"
font_class
"
:
"
redo-filled
"
,
"
unicode
"
:
"
\
ue655
"
},
{
"
font_class
"
:
"
refresh
"
,
"
unicode
"
:
"
\
ue657
"
},
{
"
font_class
"
:
"
refresh-filled
"
,
"
unicode
"
:
"
\
ue656
"
},
{
"
font_class
"
:
"
refreshempty
"
,
"
unicode
"
:
"
\
ue6bf
"
},
{
"
font_class
"
:
"
reload
"
,
"
unicode
"
:
"
\
ue6b2
"
},
{
"
font_class
"
:
"
right
"
,
"
unicode
"
:
"
\
ue6b5
"
},
{
"
font_class
"
:
"
scan
"
,
"
unicode
"
:
"
\
ue62a
"
},
{
"
font_class
"
:
"
search
"
,
"
unicode
"
:
"
\
ue654
"
},
{
"
font_class
"
:
"
settings
"
,
"
unicode
"
:
"
\
ue653
"
},
{
"
font_class
"
:
"
settings-filled
"
,
"
unicode
"
:
"
\
ue6ce
"
},
{
"
font_class
"
:
"
shop
"
,
"
unicode
"
:
"
\
ue62f
"
},
{
"
font_class
"
:
"
shop-filled
"
,
"
unicode
"
:
"
\
ue6cd
"
},
{
"
font_class
"
:
"
smallcircle
"
,
"
unicode
"
:
"
\
ue67c
"
},
{
"
font_class
"
:
"
smallcircle-filled
"
,
"
unicode
"
:
"
\
ue665
"
},
{
"
font_class
"
:
"
sound
"
,
"
unicode
"
:
"
\
ue684
"
},
{
"
font_class
"
:
"
sound-filled
"
,
"
unicode
"
:
"
\
ue686
"
},
{
"
font_class
"
:
"
spinner-cycle
"
,
"
unicode
"
:
"
\
ue68a
"
},
{
"
font_class
"
:
"
staff
"
,
"
unicode
"
:
"
\
ue6a7
"
},
{
"
font_class
"
:
"
staff-filled
"
,
"
unicode
"
:
"
\
ue6cb
"
},
{
"
font_class
"
:
"
star
"
,
"
unicode
"
:
"
\
ue688
"
},
{
"
font_class
"
:
"
star-filled
"
,
"
unicode
"
:
"
\
ue68f
"
},
{
"
font_class
"
:
"
starhalf
"
,
"
unicode
"
:
"
\
ue683
"
},
{
"
font_class
"
:
"
trash
"
,
"
unicode
"
:
"
\
ue687
"
},
{
"
font_class
"
:
"
trash-filled
"
,
"
unicode
"
:
"
\
ue685
"
},
{
"
font_class
"
:
"
tune
"
,
"
unicode
"
:
"
\
ue6aa
"
},
{
"
font_class
"
:
"
tune-filled
"
,
"
unicode
"
:
"
\
ue6ca
"
},
{
"
font_class
"
:
"
undo
"
,
"
unicode
"
:
"
\
ue64f
"
},
{
"
font_class
"
:
"
undo-filled
"
,
"
unicode
"
:
"
\
ue64c
"
},
{
"
font_class
"
:
"
up
"
,
"
unicode
"
:
"
\
ue6b6
"
},
{
"
font_class
"
:
"
top
"
,
"
unicode
"
:
"
\
ue6b6
"
},
{
"
font_class
"
:
"
upload
"
,
"
unicode
"
:
"
\
ue690
"
},
{
"
font_class
"
:
"
upload-filled
"
,
"
unicode
"
:
"
\
ue68e
"
},
{
"
font_class
"
:
"
videocam
"
,
"
unicode
"
:
"
\
ue68c
"
},
{
"
font_class
"
:
"
videocam-filled
"
,
"
unicode
"
:
"
\
ue689
"
},
{
"
font_class
"
:
"
vip
"
,
"
unicode
"
:
"
\
ue6a8
"
},
{
"
font_class
"
:
"
vip-filled
"
,
"
unicode
"
:
"
\
ue6c6
"
},
{
"
font_class
"
:
"
wallet
"
,
"
unicode
"
:
"
\
ue6b1
"
},
{
"
font_class
"
:
"
wallet-filled
"
,
"
unicode
"
:
"
\
ue6c2
"
},
{
"
font_class
"
:
"
weibo
"
,
"
unicode
"
:
"
\
ue68b
"
},
{
"
font_class
"
:
"
weixin
"
,
"
unicode
"
:
"
\
ue691
"
}
]
as
IconsDataItem
[]
// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)
uni_modules/uni-icons/package.json
浏览文件 @
66c410e0
{
"id"
:
"uni-icons"
,
"displayName"
:
"uni-icons 图标"
,
"version"
:
"
1.3.5
"
,
"version"
:
"
2.0.7
"
,
"description"
:
"图标组件,用于展示移动端常见的图标,可自定义颜色、大小。"
,
"keywords"
:
[
"uni-ui"
,
...
...
@@ -16,11 +16,7 @@
"directories"
:
{
"example"
:
"../../temps/example_temps"
},
"dcloudext"
:
{
"category"
:
[
"前端组件"
,
"通用组件"
],
"dcloudext"
:
{
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
...
...
@@ -37,7 +33,8 @@
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
"https://www.npmjs.com/package/@dcloudio/uni-ui"
"npmurl"
:
"https://www.npmjs.com/package/@dcloudio/uni-ui"
,
"type"
:
"component-vue"
},
"uni_modules"
:
{
"dependencies"
:
[
"uni-scss"
],
...
...
@@ -50,7 +47,8 @@
"client"
:
{
"App"
:
{
"app-vue"
:
"y"
,
"app-nvue"
:
"y"
"app-nvue"
:
"y"
,
"app-uvue"
:
"y"
},
"H5-mobile"
:
{
"Safari"
:
"y"
,
...
...
@@ -70,11 +68,15 @@
"阿里"
:
"y"
,
"百度"
:
"y"
,
"字节跳动"
:
"y"
,
"QQ"
:
"y"
"QQ"
:
"y"
,
"钉钉"
:
"y"
,
"快手"
:
"y"
,
"飞书"
:
"y"
,
"京东"
:
"y"
},
"快应用"
:
{
"华为"
:
"
u
"
,
"联盟"
:
"
u
"
"华为"
:
"
y
"
,
"联盟"
:
"
y
"
},
"Vue"
:
{
"vue2"
:
"y"
,
...
...
@@ -83,4 +85,4 @@
}
}
}
}
\ No newline at end of file
}
uni_modules/uni-id-pages/changelog.md
浏览文件 @
66c410e0
## 1.1.17(2023-12-14)
-
uni-id-co 移除一键登录、短信的调用凭据
## 1.1.16(2023-10-18)
-
修复 当不满足一键登录时页面回退无法继续登录的问题
## 1.1.15(2023-07-13)
...
...
uni_modules/uni-id-pages/package.json
浏览文件 @
66c410e0
{
"id"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"version"
:
"1.1.1
6
"
,
"version"
:
"1.1.1
7
"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"keywords"
:
[
"用户管理"
,
...
...
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/sms.js
浏览文件 @
66c410e0
const
{
setMobileVerifyCode
}
=
require
(
'
./verify-code
'
)
const
{
getVerifyCode
}
=
require
(
'
../../common/utils
'
)
/**
* 发送短信
* @param {object} param
* @param {string} param.mobile 手机号
* @param {object} param.code 可选,验证码
* @param {object} param.scene 短信场景
* @param {object} param.templateId 可选,短信模板id
* @returns
*/
async
function
sendSmsCode
({
mobile
,
code
,
scene
,
templateId
}
=
{})
{
const
requiredParams
=
[
'
name
'
,
'
smsKey
'
,
'
smsSecret
'
,
'
codeExpiresIn
'
]
const
smsConfig
=
(
this
.
config
.
service
&&
this
.
config
.
service
.
sms
)
||
{}
for
(
let
i
=
0
;
i
<
requiredParams
.
length
;
i
++
)
{
const
key
=
requiredParams
[
i
]
if
(
!
smsConfig
[
key
])
{
throw
new
Error
(
`Missing config param: service.sms.
${
key
}
`
)
}
}
if
(
!
code
)
{
code
=
getVerifyCode
()
}
let
action
switch
(
scene
)
{
case
'
login-by-sms
'
:
action
=
this
.
t
(
'
login
'
)
break
default
:
action
=
this
.
t
(
'
verify-mobile
'
)
break
}
const
sceneConfig
=
(
smsConfig
.
scene
||
{})[
scene
]
||
{}
if
(
!
templateId
)
{
templateId
=
sceneConfig
.
templateId
}
if
(
!
templateId
)
{
throw
new
Error
(
'
"templateId" is required
'
)
}
const
codeExpiresIn
=
sceneConfig
.
codeExpiresIn
||
smsConfig
.
codeExpiresIn
await
setMobileVerifyCode
.
call
(
this
,
{
mobile
,
code
,
expiresIn
:
codeExpiresIn
,
scene
})
await
uniCloud
.
sendSms
({
smsKey
:
smsConfig
.
smsKey
,
smsSecret
:
smsConfig
.
smsSecret
,
phone
:
mobile
,
templateId
,
data
:
{
name
:
smsConfig
.
name
,
code
,
action
,
expMinute
:
''
+
Math
.
round
(
codeExpiresIn
/
60
)
}
})
return
{
errCode
:
0
}
}
module
.
exports
=
{
sendSmsCode
}
const
{
setMobileVerifyCode
}
=
require
(
'
./verify-code
'
)
const
{
getVerifyCode
}
=
require
(
'
../../common/utils
'
)
/**
* 发送短信
* @param {object} param
* @param {string} param.mobile 手机号
* @param {object} param.code 可选,验证码
* @param {object} param.scene 短信场景
* @param {object} param.templateId 可选,短信模板id
* @returns
*/
async
function
sendSmsCode
({
mobile
,
code
,
scene
,
templateId
}
=
{})
{
const
requiredParams
=
[
'
name
'
,
'
codeExpiresIn
'
]
const
smsConfig
=
(
this
.
config
.
service
&&
this
.
config
.
service
.
sms
)
||
{}
for
(
let
i
=
0
;
i
<
requiredParams
.
length
;
i
++
)
{
const
key
=
requiredParams
[
i
]
if
(
!
smsConfig
[
key
])
{
throw
new
Error
(
`Missing config param: service.sms.
${
key
}
`
)
}
}
if
(
!
code
)
{
code
=
getVerifyCode
()
}
let
action
switch
(
scene
)
{
case
'
login-by-sms
'
:
action
=
this
.
t
(
'
login
'
)
break
default
:
action
=
this
.
t
(
'
verify-mobile
'
)
break
}
const
sceneConfig
=
(
smsConfig
.
scene
||
{})[
scene
]
||
{}
if
(
!
templateId
)
{
templateId
=
sceneConfig
.
templateId
}
if
(
!
templateId
)
{
throw
new
Error
(
'
"templateId" is required
'
)
}
const
codeExpiresIn
=
sceneConfig
.
codeExpiresIn
||
smsConfig
.
codeExpiresIn
await
setMobileVerifyCode
.
call
(
this
,
{
mobile
,
code
,
expiresIn
:
codeExpiresIn
,
scene
})
await
uniCloud
.
sendSms
({
smsKey
:
smsConfig
.
smsKey
,
smsSecret
:
smsConfig
.
smsSecret
,
phone
:
mobile
,
templateId
,
data
:
{
name
:
smsConfig
.
name
,
code
,
action
,
expMinute
:
''
+
Math
.
round
(
codeExpiresIn
/
60
)
}
})
return
{
errCode
:
0
}
}
module
.
exports
=
{
sendSmsCode
}
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/univerify.js
浏览文件 @
66c410e0
async
function
getPhoneNumber
({
// eslint-disable-next-line camelcase
access_token
,
openid
}
=
{})
{
const
requiredParams
=
[
'
apiKey
'
,
'
apiSecret
'
]
const
univerifyConfig
=
(
this
.
config
.
service
&&
this
.
config
.
service
.
univerify
)
||
{}
for
(
let
i
=
0
;
i
<
requiredParams
.
length
;
i
++
)
{
const
key
=
requiredParams
[
i
]
if
(
!
univerifyConfig
[
key
])
{
throw
new
Error
(
`Missing config param: service.univerify.
${
key
}
`
)
}
}
return
uniCloud
.
getPhoneNumber
({
provider
:
'
univerify
'
,
appid
:
this
.
getUniversalClientInfo
().
appId
,
apiKey
:
univerifyConfig
.
apiKey
,
apiSecret
:
univerifyConfig
.
apiSecret
,
// eslint-disable-next-line camelcase
access_token
,
openid
})
}
module
.
exports
=
{
getPhoneNumber
}
async
function
getPhoneNumber
({
// eslint-disable-next-line camelcase
access_token
,
openid
}
=
{})
{
const
requiredParams
=
[
]
const
univerifyConfig
=
(
this
.
config
.
service
&&
this
.
config
.
service
.
univerify
)
||
{}
for
(
let
i
=
0
;
i
<
requiredParams
.
length
;
i
++
)
{
const
key
=
requiredParams
[
i
]
if
(
!
univerifyConfig
[
key
])
{
throw
new
Error
(
`Missing config param: service.univerify.
${
key
}
`
)
}
}
return
uniCloud
.
getPhoneNumber
({
provider
:
'
univerify
'
,
appid
:
this
.
getUniversalClientInfo
().
appId
,
apiKey
:
univerifyConfig
.
apiKey
,
apiSecret
:
univerifyConfig
.
apiSecret
,
// eslint-disable-next-line camelcase
access_token
,
openid
})
}
module
.
exports
=
{
getPhoneNumber
}
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/dev/get-supported-login-type.js
浏览文件 @
66c410e0
function
isMobileCodeSupported
()
{
const
config
=
this
.
config
return
!!
(
config
.
service
&&
config
.
service
.
sms
&&
config
.
service
.
sms
.
smsKey
)
}
function
isUniverifySupport
()
{
const
config
=
this
.
config
return
!!
(
config
.
service
&&
config
.
service
.
univerify
&&
config
.
service
.
univerify
.
apiKey
)
}
function
isWeixinSupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
weixin
'
})
return
true
}
function
isQQSupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
qq
'
})
return
true
}
function
isAppleSupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
apple
'
})
return
true
}
function
isAlipaySupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
alipay
'
})
return
true
}
const
loginTypeTester
=
{
'
mobile-code
'
:
isMobileCodeSupported
,
univerify
:
isUniverifySupport
,
weixin
:
isWeixinSupported
,
qq
:
isQQSupported
,
apple
:
isAppleSupported
,
alipay
:
isAlipaySupported
}
/**
* 获取支持的登录方式
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-supported-login-type
* @returns
*/
module
.
exports
=
async
function
()
{
const
supportedLoginType
=
[
'
username-password
'
,
'
mobile-password
'
,
'
email-password
'
]
for
(
const
type
in
loginTypeTester
)
{
try
{
if
(
loginTypeTester
[
type
].
call
(
this
))
{
supportedLoginType
.
push
(
type
)
}
}
catch
(
error
)
{
}
}
return
{
errCode
:
0
,
errMsg
:
''
,
supportedLoginType
}
}
function
isMobileCodeSupported
()
{
const
config
=
this
.
config
return
!!
(
config
.
service
&&
config
.
service
.
sms
&&
config
.
service
.
sms
.
smsKey
)
}
function
isUniverifySupport
()
{
return
true
}
function
isWeixinSupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
weixin
'
})
return
true
}
function
isQQSupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
qq
'
})
return
true
}
function
isAppleSupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
apple
'
})
return
true
}
function
isAlipaySupported
()
{
this
.
configUtils
.
getOauthConfig
({
provider
:
'
alipay
'
})
return
true
}
const
loginTypeTester
=
{
'
mobile-code
'
:
isMobileCodeSupported
,
univerify
:
isUniverifySupport
,
weixin
:
isWeixinSupported
,
qq
:
isQQSupported
,
apple
:
isAppleSupported
,
alipay
:
isAlipaySupported
}
/**
* 获取支持的登录方式
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#get-supported-login-type
* @returns
*/
module
.
exports
=
async
function
()
{
const
supportedLoginType
=
[
'
username-password
'
,
'
mobile-password
'
,
'
email-password
'
]
for
(
const
type
in
loginTypeTester
)
{
try
{
if
(
loginTypeTester
[
type
].
call
(
this
))
{
supportedLoginType
.
push
(
type
)
}
}
catch
(
error
)
{
}
}
return
{
errCode
:
0
,
errMsg
:
''
,
supportedLoginType
}
}
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json
浏览文件 @
66c410e0
{
"name"
:
"uni-id-co"
,
"version"
:
"1.1.1
5
"
,
"version"
:
"1.1.1
7
"
,
"description"
:
""
,
"main"
:
"index.js"
,
"keywords"
:
[],
...
...
@@ -29,4 +29,4 @@
"eslint-plugin-n"
:
"^15.2.3"
,
"eslint-plugin-promise"
:
"^6.0.0"
}
}
}
\ No newline at end of file
uni_modules/uni-popup/changelog.md
浏览文件 @
66c410e0
## 1.8.4(2023-11-15)
-
新增 uni-popup 支持uni-app-x 注意暂时仅支持
`maskClick`
`@open`
`@close`
## 1.8.3(2023-04-17)
-
修复 uni-popup 重复打开时的 bug
## 1.8.2(2023-02-02)
...
...
uni_modules/uni-popup/components/uni-popup/uni-popup.uvue
0 → 100644
浏览文件 @
66c410e0
<template>
<view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask">
<view @click.stop>
<slot></slot>
</view>
</view>
</template>
<script>
type CloseCallBack = ()=> void;
let closeCallBack:CloseCallBack = () :void => {};
export default {
emits:["close","clickMask"],
data() {
return {
isShow:false,
isOpen:false
}
},
props: {
maskClick: {
type: Boolean,
default: true
},
},
watch: {
// 设置show = true 时,如果没有 open 需要设置为 open
isShow:{
handler(isShow) {
// console.log("isShow",isShow)
if(isShow && this.isOpen == false){
this.isOpen = true
}
},
immediate:true
},
// 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow
isOpen:{
handler(isOpen) {
// console.log("isOpen",isOpen)
if(isOpen && this.isShow == false){
this.isShow = true
}
},
immediate:true
}
},
methods:{
open(){
// ...funs : CloseCallBack[]
// if(funs.length > 0){
// closeCallBack = funs[0]
// }
this.isOpen = true;
},
clickMask(){
if(this.maskClick == true){
this.$emit('clickMask')
this.close()
}
},
close(): void{
this.isOpen = false;
this.$emit('close')
closeCallBack()
},
hiden(){
this.isShow = false
},
show(){
this.isShow = true
}
}
}
</script>
<style>
.popup-root {
position: fixed;
top: 0;
left: 0;
width: 750rpx;
height: 100%;
flex: 1;
background-color: rgba(0, 0, 0, 0.3);
justify-content: center;
align-items: center;
z-index: 99;
}
</style>
\ No newline at end of file
uni_modules/uni-popup/components/uni-popup/uni-popup.vue
浏览文件 @
66c410e0
...
...
@@ -163,7 +163,7 @@
},
maskShow
:
true
,
mkclick
:
true
,
popupstyle
:
this
.
isDesktop
?
'
fixforpc-top
'
:
'
top
'
popupstyle
:
'
top
'
}
},
computed
:
{
...
...
uni_modules/uni-popup/package.json
浏览文件 @
66c410e0
{
"id"
:
"uni-popup"
,
"displayName"
:
"uni-popup 弹出层"
,
"version"
:
"1.8.
3
"
,
"version"
:
"1.8.
4
"
,
"description"
:
" Popup 组件,提供常用的弹层"
,
"keywords"
:
[
"uni-ui"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录