Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
言程序plus
uni-starter
提交
78a1788c
U
uni-starter
项目概览
言程序plus
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
78a1788c
编写于
7月 27, 2021
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1. 支持vue3.0 2. 去掉App.vue全局样式,避免与非flex布局的页面样式冲突
上级
ae8b3826
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
645 addition
and
502 deletion
+645
-502
changelog.md
changelog.md
+3
-0
common/all-flex.css
common/all-flex.css
+0
-15
common/appInit.js
common/appInit.js
+1
-2
components/uni-agreements/uni-agreements.vue
components/uni-agreements/uni-agreements.vue
+8
-2
components/uni-quick-login/uni-quick-login.vue
components/uni-quick-login/uni-quick-login.vue
+24
-18
components/uni-send-sms-code/uni-send-sms-code.vue
components/uni-send-sms-code/uni-send-sms-code.vue
+27
-21
manifest.json
manifest.json
+130
-112
package.json
package.json
+1
-1
pages/list/list.nvue
pages/list/list.nvue
+3
-0
pages/ucenter/about/about.vue
pages/ucenter/about/about.vue
+193
-169
pages/ucenter/login-page/common/login-page.css
pages/ucenter/login-page/common/login-page.css
+61
-54
pages/ucenter/login-page/index/index.vue
pages/ucenter/login-page/index/index.vue
+8
-2
pages/ucenter/login-page/phone-code/phone-code.vue
pages/ucenter/login-page/phone-code/phone-code.vue
+5
-4
pages/ucenter/settings/settings.vue
pages/ucenter/settings/settings.vue
+0
-1
pages/ucenter/ucenter.vue
pages/ucenter/ucenter.vue
+17
-10
pages/ucenter/userinfo/userinfo.vue
pages/ucenter/userinfo/userinfo.vue
+14
-8
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
...loudfunctions/common/uni-config-center/uni-id/config.json
+52
-0
uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
...ile-picker/components/uni-file-picker/uni-file-picker.vue
+84
-72
uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js
...ules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js
+5
-5
uni_modules/uni-sign-in/components/uni-sign-in/uni-sign-in.vue
...odules/uni-sign-in/components/uni-sign-in/uni-sign-in.vue
+1
-1
uni_modules_tools/config.js
uni_modules_tools/config.js
+3
-1
uni_modules_tools/copy/manifest.json
uni_modules_tools/copy/manifest.json
+2
-1
uni_modules_tools/copy/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
...loudfunctions/common/uni-config-center/uni-id/config.json
+3
-3
未找到文件。
changelog.md
浏览文件 @
78a1788c
## 1.0.41(2021-07-27)
1.
支持vue3.0
2.
去掉App.vue全局样式,避免与非flex布局的页面样式冲突
## 1.0.40(2021-07-22)
1.
调整使用正则表达式配置强制登陆功能的写法,解决在小程序端的兼容问题。
2.
新增签到功能(培养用户习惯,提升用户粘性)。支持:每日签到奖励、周期性连续7日签到,奖励翻倍。
...
...
common/all-flex.css
已删除
100644 → 0
浏览文件 @
ae8b3826
view
,
scroll-view
,
text
,
image
,
switch
,
navigator
,
icons
{
display
:
flex
!important
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
scroll-view
{
-webkit-overflow-scrolling
:
touch
;
}
common/appInit.js
浏览文件 @
78a1788c
...
...
@@ -115,7 +115,7 @@ export default async function() {
//拦截器封装callFunction
let
callFunctionOption
;
uniCloud
.
addInterceptor
(
'
callFunction
'
,
{
async
invoke
(
option
)
{
async
invoke
(
option
)
{
// #ifdef APP-PLUS
// 判断如果是执行登陆(无论是哪种登陆方式),就记录用户的相关设备id
if
(
option
.
name
==
'
uni-id-cf
'
&&
(
option
.
data
.
action
==
'
register
'
||
option
.
data
.
action
.
slice
(
0
,
5
)
==
'
login
'
))
{
...
...
@@ -303,7 +303,6 @@ export default async function() {
list
.
forEach
(
item
=>
{
//用遍历的方式分别为,uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器
uni
.
addInterceptor
(
item
,
{
invoke
(
e
)
{
// 调用前拦截
// console.log(e);
//获取用户的token
const
token
=
uni
.
getStorageSync
(
'
uni_id_token
'
),
//token是否已失效
...
...
components/uni-agreements/uni-agreements.vue
浏览文件 @
78a1788c
...
...
@@ -44,8 +44,14 @@
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/common/all-flex.css'
;
<
style
lang=
"scss"
scoped
>
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
/* #endif */
.root
{
flex-direction
:
row
;
align-items
:
center
;
...
...
components/uni-quick-login/uni-quick-login.vue
浏览文件 @
78a1788c
...
...
@@ -105,29 +105,29 @@
let
servicesList
=
this
.
servicesList
//去掉配置中不存在的
servicesList
=
servicesList
.
filter
(
item
=>
this
.
loginConfig
.
includes
(
item
.
id
))
//处理一键登录
if
(
this
.
loginConfig
.
includes
(
'
univerify
'
)){
this
.
univerifyStyle
.
privacyTerms
.
privacyItems
=
this
.
agreements
//设置一键登录功能底下的快捷登陆按钮
servicesList
.
forEach
(({
id
,
logo
})
=>
{
if
(
id
!=
'
univerify
'
)
{
this
.
univerifyStyle
.
buttons
.
list
.
push
({
"
iconPath
"
:
logo
,
"
provider
"
:
id
})
}
})
}
//处理一键登录
if
(
this
.
loginConfig
.
includes
(
'
univerify
'
)){
this
.
univerifyStyle
.
privacyTerms
.
privacyItems
=
this
.
agreements
//设置一键登录功能底下的快捷登陆按钮
servicesList
.
forEach
(({
id
,
logo
})
=>
{
if
(
id
!=
'
univerify
'
)
{
this
.
univerifyStyle
.
buttons
.
list
.
push
({
"
iconPath
"
:
logo
,
"
provider
"
:
id
})
}
})
}
//如果当前页面为默认登陆界面。当前第一优先级的“微信和苹果登陆”要隐藏,因为他已经被渲染在默认登陆界面顶部
if
(
this
.
getRoute
(
1
)
==
'
/pages/ucenter/login-page/index/index
'
&&
[
'
weixin
'
,
'
apple
'
].
includes
(
this
.
loginConfig
[
0
])
)
{
servicesList
=
servicesList
.
filter
(
item
=>
item
.
id
!=
this
.
loginConfig
[
0
])
}
}
//去掉当前页面对应的登录选项
this
.
servicesList
=
servicesList
.
filter
(
item
=>
{
let
path
=
item
.
path
?
item
.
path
.
split
(
'
?
'
)[
0
]:
''
;
this
.
servicesList
=
servicesList
.
filter
(
item
=>
{
let
path
=
item
.
path
?
item
.
path
.
split
(
'
?
'
)[
0
]:
''
;
return
path
!=
this
.
getRoute
(
1
)
})
console
.
log
(
'
servicesList
'
,
servicesList
,
this
.
servicesList
);
...
...
@@ -343,7 +343,13 @@
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/common/all-flex.css'
;
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
/* #endif */
.quick-login-box
{
flex-direction
:
row
;
width
:
750rpx
;
...
...
@@ -369,4 +375,4 @@
margin-top
:
4px
;
font-size
:
26rpx
;
}
</
style
>
</
style
>
components/uni-send-sms-code/uni-send-sms-code.vue
浏览文件 @
78a1788c
...
...
@@ -74,33 +74,33 @@
title
:
'
手机号格式错误
'
,
icon
:
'
none
'
});
uniCloud
.
callFunction
({
name
:
'
uni-id-cf
'
,
data
:{
action
:
'
sendSmsCode
'
,
params
:{
"
mobile
"
:
this
.
phone
,
"
type
"
:
this
.
codeType
},
},
success
:
({
result
})
=>
{
console
.
log
(
result
);
uniCloud
.
callFunction
({
name
:
'
uni-id-cf
'
,
data
:{
action
:
'
sendSmsCode
'
,
params
:{
"
mobile
"
:
this
.
phone
,
"
type
"
:
this
.
codeType
},
},
success
:
({
result
})
=>
{
console
.
log
(
result
);
if
(
result
.
code
===
0
){
uni
.
showToast
({
title
:
"
短信验证码发送成功
"
,
icon
:
'
none
'
});
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
getCode
();
uni
.
showToast
({
title
:
"
短信验证码发送成功
"
,
icon
:
'
none
'
});
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
getCode
();
this
.
$emit
(
'
getCode
'
);
}
else
{
uni
.
showModal
({
content
:
result
.
msg
,
showCancel
:
false
});
}
}
})
}
}
})
},
getCode
()
{
if
(
this
.
reverseNumber
==
0
)
{
...
...
@@ -118,7 +118,13 @@
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/common/all-flex.css'
;
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
/* #endif */
.short-code-btn
{
width
:
200rpx
;
height
:
85rpx
;
...
...
manifest.json
浏览文件 @
78a1788c
{
"name"
:
"uni-starter"
,
"appid"
:
"__UNI__03B096E"
,
"description"
:
"云端一体应用快速开发模版"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"app-plus"
:
{
"privacy"
:
{
"prompt"
:
"template"
,
"template"
:
{
"title"
:
"服务协议和隐私政策"
,
"message"
:
" 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《服务协议》</a>和<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"buttonAccept"
:
"同意"
,
"buttonRefuse"
:
"暂不同意"
}
},
"compatible"
:
{
"ignoreVersion"
:
true
"name"
:
"uni-starter"
,
"appid"
:
"请点击重新获取"
,
"description"
:
"云端一体应用快速开发模版"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
"transformPx"
:
false
,
"app-plus"
:
{
"privacy"
:
{
"prompt"
:
"template"
,
"template"
:
{
"title"
:
"服务协议和隐私政策"
,
"message"
:
" 请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《服务协议》</a>和<a href=
\"
https://ask.dcloud.net.cn/protocol.html
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"buttonAccept"
:
"同意"
,
"buttonRefuse"
:
"暂不同意"
}
},
"compatible"
:
{
"ignoreVersion"
:
true
},
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
},
"modules"
:
{
"Fingerprint"
:
{
},
"Share"
:
{
},
"OAuth"
:
{
},
"FaceID"
:
{
},
"Push"
:
{
}
},
"distribute"
:
{
"android"
:
{
"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.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
]
},
"ios"
:
{
"capabilities"
:
{
"entitlements"
:
{
"com.apple.developer.associated-domains"
:
[
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs"
:
{
"oauth"
:
{
"apple"
:
{
},
"weixin"
:
{
"appid"
:
"wxffdd8fa6ec4ef2a0"
,
"appsecret"
:
""
,
"UniversalLinks"
:
"https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
},
"univerify"
:
{
}
},
"usingComponents"
:
true
,
"nvueStyleCompiler"
:
"uni-app"
,
"compilerVersion"
:
3
,
"splashscreen"
:
{
"alwaysShowBeforeRender"
:
true
,
"waiting"
:
true
,
"autoclose"
:
true
,
"delay"
:
0
"ad"
:
{
},
"modules"
:
{
"Fingerprint"
:
{},
"Share"
:
{},
"OAuth"
:
{},
"FaceID"
:
{},
"Push"
:
{}
"share"
:
{
"weixin"
:
{
"appid"
:
"wxffdd8fa6ec4ef2a0"
,
"UniversalLinks"
:
"https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
}
},
"distribute"
:
{
"android"
:
{
"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.ACCESS_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CAMERA
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_NETWORK_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.USE_FINGERPRINT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
],
"abiFilters"
:
[
"armeabi-v7a"
,
"arm64-v8a"
,
"x86"
]
},
"ios"
:
{
"capabilities"
:
{
"entitlements"
:
{
"com.apple.developer.associated-domains"
:
[
"applinks:static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com"
]
}
}
},
"sdkConfigs"
:
{
"oauth"
:
{
"apple"
:
{},
"weixin"
:
{
"appid"
:
"wxffdd8fa6ec4ef2a0"
,
"appsecret"
:
""
,
"UniversalLinks"
:
"https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
},
"univerify"
:
{}
},
"ad"
:
{},
"share"
:
{
"weixin"
:
{
"appid"
:
"wxffdd8fa6ec4ef2a0"
,
"UniversalLinks"
:
"https://static-76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e.bspapp.com/uni-universallinks/__UNI__03B096E"
}
},
"geolocation"
:
{},
"push"
:
{
"unipush"
:
{}
},
"payment"
:
{}
}
"geolocation"
:
{
},
"nvueLaunchMode"
:
""
},
"quickapp"
:
{},
"mp-weixin"
:
{
"appid"
:
"wx81dbb061d2258234"
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
false
"push"
:
{
"unipush"
:
{
}
},
"usingComponents"
:
true
,
"betterScopedSlots"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
"payment"
:
{
}
}
},
"h5"
:
{
"template"
:
""
"nvueLaunchMode"
:
""
},
"quickapp"
:
{
},
"mp-weixin"
:
{
"appid"
:
""
,
"setting"
:
{
"urlCheck"
:
false
,
"es6"
:
false
},
"_spaceID"
:
"76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e"
,
"vueVersion"
:
"2"
}
"usingComponents"
:
true
,
"betterScopedSlots"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
},
"mp-baidu"
:
{
"usingComponents"
:
true
},
"mp-toutiao"
:
{
"usingComponents"
:
true
},
"uniStatistics"
:
{
"enable"
:
false
},
"h5"
:
{
"template"
:
""
},
"_spaceID"
:
""
,
"vueVersion"
:
"2"
}
\ No newline at end of file
package.json
浏览文件 @
78a1788c
{
"id"
:
"uni-starter"
,
"displayName"
:
"uni-starter"
,
"version"
:
"1.0.4
0
"
,
"version"
:
"1.0.4
1
"
,
"description"
:
"云端一体应用快速开发基本项目模版"
,
"keywords"
:
[
"login"
,
...
...
pages/list/list.nvue
浏览文件 @
78a1788c
...
...
@@ -183,6 +183,9 @@
left: 0;
/* #ifndef APP-PLUS */
z-index: 9;
/* #endif */
/* #ifdef MP-WEIXIN */
width: 580rpx;
/* #endif */
}
...
...
pages/ucenter/about/about.vue
浏览文件 @
78a1788c
<
template
>
<view
class=
"about"
>
<view
class=
"box"
>
<image
class=
"logoImg"
:src=
"about.logo"
></image>
<text
class=
"tip appName"
>
{{
about
.
appName
}}
</text>
<text
class=
"tip"
>
Version
{{
version
}}
</text>
<!--Sansnn-uQRCode组件来源,插件市场:https://ext.dcloud.net.cn/plugin?id=1287 微调后-->
<Sansnn-uQRCode
:text=
"about.download"
:makeOnLoad=
"true"
class=
"qrcode"
></Sansnn-uQRCode>
<text
class=
"tip"
>
扫描二维码,您的朋友也可以下载
{{
about
.
appName
}}
客户端
</text>
</view>
<view
class=
"copyright"
>
<view
class=
"agreement-box"
v-for=
"(agreement,index) in about.agreements"
:key=
"index"
>
<text
class=
"agreement"
@
click=
"navigateTo(agreement)"
>
《
{{
agreement
.
title
}}
》
</text>
<text
class=
"hint"
v-if=
"about.agreements.length-1>index"
>
和
</text>
</view>
<text
class=
"hint"
>
Copyright ©
{{
year
}}
</text>
<text
class=
"hint"
>
{{
about
.
company
}}
</text>
</view>
</view>
</
template
>
<
script
>
import
uniShare
from
'
@/uni_modules/uni-share/js_sdk/uni-share.js
'
;
export
default
{
onLoad
()
{
// #ifdef APP-PLUS
this
.
version
=
plus
.
runtime
.
version
// #endif
},
computed
:{
uniStarterConfig
(){
console
.
log
(
getApp
());
return
getApp
().
globalData
.
config
}
},
data
()
{
return
{
version
:
"
V1.0.0
"
,
year
:
"
2020
"
,
about
:{}
};
},
created
()
{
this
.
about
=
this
.
uniStarterConfig
.
about
uni
.
setNavigationBarTitle
({
title
:
'
关于
'
+
this
.
about
.
appName
})
this
.
year
=
(
new
Date
).
getFullYear
()
},
onNavigationBarButtonTap
()
{
let
{
download
,
appName
,
slogan
,
logo
}
=
this
.
about
uniShare
({
content
:
{
//公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
type
:
0
,
href
:
download
,
title
:
appName
,
summary
:
slogan
,
imageUrl
:
logo
+
'
?x-oss-process=image/resize,m_fill,h_100,w_100
'
//压缩图片解决,在ios端分享图过大导致的图片失效问题
},
menus
:
[{
"
img
"
:
"
/static/app-plus/sharemenu/wechatfriend.png
"
,
"
text
"
:
"
微信好友
"
,
"
share
"
:
{
"
provider
"
:
"
weixin
"
,
"
scene
"
:
"
WXSceneSession
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/wechatmoments.png
"
,
"
text
"
:
"
微信朋友圈
"
,
"
share
"
:
{
"
provider
"
:
"
weixin
"
,
"
scene
"
:
"
WXSenceTimeline
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/weibo.png
"
,
"
text
"
:
"
微博
"
,
"
share
"
:
{
"
provider
"
:
"
sinaweibo
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/qq.png
"
,
"
text
"
:
"
QQ
"
,
"
share
"
:
{
"
provider
"
:
"
qq
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/copyurl.png
"
,
"
text
"
:
"
复制
"
,
"
share
"
:
"
copyurl
"
},
{
"
img
"
:
"
/static/app-plus/sharemenu/more.png
"
,
"
text
"
:
"
更多
"
,
"
share
"
:
"
shareSystem
"
}
],
cancelText
:
"
取消分享
"
,
},
e
=>
{
//callback
console
.
log
(
e
);
})
},
methods
:{
navigateTo
({
url
,
title
}){
uni
.
navigateTo
({
url
:
'
/pages/common/webview/webview?url=
'
+
url
+
'
&title=
'
+
title
,
success
:
res
=>
{},
fail
:
()
=>
{},
complete
:
()
=>
{}
});
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/common/all-flex.css'
;
.about
{
width
:
750upx
;
flex-direction
:
column
;
}
.box
{
margin-top
:
100px
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.logoImg
{
margin-bottom
:
10upx
;
width
:
160upx
;
height
:
160upx
;
border-radius
:
15px
;
}
.tip
{
font-size
:
24rpx
;
margin-top
:
10px
;
}
.appName
{
margin-top
:
20px
;
font-size
:
42rpx
;
font-weight
:
500
;
}
.qrcode
{
margin-top
:
50px
;
}
.copyright
{
width
:
750upx
;
font-size
:
32rpx
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
bottom
:
20px
;
left
:
0
;
position
:
fixed
;
}
.agreement-box
{
justify-content
:
center
;
}
.agreement
{
color
:
#2285ff
;
font-size
:
26rpx
;
}
.hint
{
text-align
:
center
;
color
:
#999999
;
font-size
:
26rpx
;
}
</
style
>
\ No newline at end of file
<
template
>
<view
class=
"about"
>
<view
class=
"box"
>
<image
class=
"logoImg"
:src=
"about.logo"
></image>
<text
class=
"tip appName"
>
{{
about
.
appName
}}
</text>
<text
class=
"tip"
>
Version
{{
version
}}
</text>
<!--Sansnn-uQRCode组件来源,插件市场:https://ext.dcloud.net.cn/plugin?id=1287 微调后-->
<Sansnn-uQRCode
:text=
"about.download"
:makeOnLoad=
"true"
class=
"qrcode"
></Sansnn-uQRCode>
<text
class=
"tip"
>
扫描二维码,您的朋友也可以下载
{{
about
.
appName
}}
客户端
</text>
</view>
<view
class=
"copyright"
>
<view
class=
"agreement-box"
v-for=
"(agreement,index) in about.agreements"
:key=
"index"
>
<text
class=
"agreement"
@
click=
"navigateTo(agreement)"
>
《
{{
agreement
.
title
}}
》
</text>
<text
class=
"hint"
v-if=
"about.agreements.length-1>index"
>
和
</text>
</view>
<text
class=
"hint"
>
Copyright ©
{{
year
}}
</text>
<text
class=
"hint"
>
{{
about
.
company
}}
</text>
</view>
</view>
</
template
>
<
script
>
import
uniShare
from
'
@/uni_modules/uni-share/js_sdk/uni-share.js
'
;
export
default
{
onLoad
()
{
// #ifdef APP-PLUS
this
.
version
=
plus
.
runtime
.
version
// #endif
},
computed
:
{
uniStarterConfig
()
{
console
.
log
(
getApp
());
return
getApp
().
globalData
.
config
}
},
data
()
{
return
{
version
:
"
V1.0.0
"
,
year
:
"
2020
"
,
about
:
{}
};
},
created
()
{
this
.
about
=
this
.
uniStarterConfig
.
about
uni
.
setNavigationBarTitle
({
title
:
'
关于
'
+
this
.
about
.
appName
})
this
.
year
=
(
new
Date
).
getFullYear
()
},
onNavigationBarButtonTap
()
{
let
{
download
,
appName
,
slogan
,
logo
}
=
this
.
about
uniShare
({
content
:
{
//公共的分享类型(type)、链接(herf)、标题(title)、summary(描述)、imageUrl(缩略图)
type
:
0
,
href
:
download
,
title
:
appName
,
summary
:
slogan
,
imageUrl
:
logo
+
'
?x-oss-process=image/resize,m_fill,h_100,w_100
'
//压缩图片解决,在ios端分享图过大导致的图片失效问题
},
menus
:
[{
"
img
"
:
"
/static/app-plus/sharemenu/wechatfriend.png
"
,
"
text
"
:
"
微信好友
"
,
"
share
"
:
{
"
provider
"
:
"
weixin
"
,
"
scene
"
:
"
WXSceneSession
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/wechatmoments.png
"
,
"
text
"
:
"
微信朋友圈
"
,
"
share
"
:
{
"
provider
"
:
"
weixin
"
,
"
scene
"
:
"
WXSenceTimeline
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/weibo.png
"
,
"
text
"
:
"
微博
"
,
"
share
"
:
{
"
provider
"
:
"
sinaweibo
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/qq.png
"
,
"
text
"
:
"
QQ
"
,
"
share
"
:
{
"
provider
"
:
"
qq
"
}
},
{
"
img
"
:
"
/static/app-plus/sharemenu/copyurl.png
"
,
"
text
"
:
"
复制
"
,
"
share
"
:
"
copyurl
"
},
{
"
img
"
:
"
/static/app-plus/sharemenu/more.png
"
,
"
text
"
:
"
更多
"
,
"
share
"
:
"
shareSystem
"
}
],
cancelText
:
"
取消分享
"
,
},
e
=>
{
//callback
console
.
log
(
e
);
})
},
methods
:
{
navigateTo
({
url
,
title
})
{
uni
.
navigateTo
({
url
:
'
/pages/common/webview/webview?url=
'
+
url
+
'
&title=
'
+
title
,
success
:
res
=>
{},
fail
:
()
=>
{},
complete
:
()
=>
{}
});
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
/* #endif */
.about
{
width
:
750upx
;
flex-direction
:
column
;
}
.box
{
margin-top
:
100px
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.logoImg
{
margin-bottom
:
10upx
;
width
:
160upx
;
height
:
160upx
;
border-radius
:
15px
;
}
.tip
{
font-size
:
24rpx
;
margin-top
:
10px
;
}
.appName
{
margin-top
:
20px
;
font-size
:
42rpx
;
font-weight
:
500
;
}
.qrcode
{
margin-top
:
50px
;
}
.copyright
{
width
:
750upx
;
font-size
:
32rpx
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
bottom
:
20px
;
left
:
0
;
position
:
fixed
;
}
.agreement-box
{
justify-content
:
center
;
}
.agreement
{
color
:
#2285ff
;
font-size
:
26rpx
;
}
.hint
{
text-align
:
center
;
color
:
#999999
;
font-size
:
26rpx
;
}
</
style
>
pages/ucenter/login-page/common/login-page.css
浏览文件 @
78a1788c
@import
'@/common/all-flex.css'
;
.content
{
padding
:
0
50
rpx
;
width
:
750
rpx
;
flex
:
1
;
}
.input-box
{
padding
:
0
15px
;
margin-bottom
:
10px
;
background-color
:
#F8F8F8
;
border-radius
:
6px
;
font-size
:
28
rpx
;
}
.get-code
{
margin
:
0
;
margin-top
:
15px
;
background-color
:
#007aff
;
color
:
#FFFFFF
;
}
.input-box
,
.get-code
{
height
:
45px
;
line-height
:
45px
;
}
.title
{
text-align
:
center
;
padding-bottom
:
5px
;
}
.tip
{
color
:
#666666
;
font-size
:
26
rpx
;
margin
:
6px
0
;
}
.easyinput
{
background-color
:
#F8F8F8
;
border-radius
:
6
rpx
;
}
.send-btn
{
width
:
100%
;
margin-top
:
15px
;
border-radius
:
6
rpx
;
}
.link
{
color
:
#04498c
;
}
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
/* #endif */
.content
{
padding
:
0
50
rpx
;
width
:
750
rpx
;
flex
:
1
;
}
.input-box
{
padding
:
0
15px
;
margin-bottom
:
10px
;
background-color
:
#F8F8F8
;
border-radius
:
6px
;
font-size
:
28
rpx
;
}
.get-code
{
margin
:
0
;
margin-top
:
15px
;
background-color
:
#007aff
;
color
:
#FFFFFF
;
}
.input-box
,
.get-code
{
height
:
45px
;
line-height
:
45px
;
}
.title
{
text-align
:
center
;
padding-bottom
:
5px
;
}
.tip
{
color
:
#666666
;
font-size
:
26
rpx
;
margin
:
6px
0
;
}
.easyinput
{
background-color
:
#F8F8F8
;
border-radius
:
6
rpx
;
}
.send-btn
{
width
:
100%
;
margin-top
:
15px
;
border-radius
:
6
rpx
;
}
.link
{
color
:
#04498c
;
}
pages/ucenter/login-page/index/index.vue
浏览文件 @
78a1788c
...
...
@@ -109,7 +109,13 @@
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/common/all-flex.css'
;
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
/* #endif */
@import
url("../common/login-page.css")
;
.quickLogin
{
width
:
650rpx
;
...
...
@@ -122,4 +128,4 @@
margin
:
20px
0
;
width
:
450rpx
;
}
</
style
>
</
style
>
pages/ucenter/login-page/phone-code/phone-code.vue
浏览文件 @
78a1788c
...
...
@@ -2,11 +2,12 @@
<view
class=
"content"
>
<!-- 顶部文字 -->
<text
class=
"tit"
>
请输入验证码
</text>
<text
class=
"tip"
>
{{
tipText
}}
</text>
<text
class=
"tip"
>
{{
tipText
}}
</text>
<uni-forms>
<!-- 登录框 (选择手机号所属国家和地区需要另行实现) -->
<uni-easyinput
type=
"number"
class=
"easyinput"
:inputBorder=
"false"
v-model=
"code"
maxlength=
"6"
placeholder=
"请输入验证码"
>
<template
slot=
"right"
>
<template
v-slot:right
>
<uni-send-sms-code
:phone=
"phone"
ref=
"sendSmsCode"
></uni-send-sms-code>
</
template
>
</uni-easyinput>
...
...
@@ -37,8 +38,8 @@
onLoad
({
phoneNumber
,
phoneArea
})
{
this
.
phone
=
phoneNumber
;
},
onReady
()
{
this
.
$refs
.
sendSmsCode
.
start
();
onReady
()
{
this
.
$refs
.
sendSmsCode
.
start
();
},
methods
:
{
submit
(){
//完成并提交
...
...
pages/ucenter/settings/settings.vue
浏览文件 @
78a1788c
...
...
@@ -240,7 +240,6 @@
border
:
none
;
border-radius
:
0
;
}
/* #endif */
.content
{
/* #ifndef APP-NVUE */
...
...
pages/ucenter/ucenter.vue
浏览文件 @
78a1788c
<
template
>
<view
class=
"center"
>
<uni-sign-in
ref=
"signIn"
></uni-sign-in>
<view
class=
"userInfo"
@
click.capture=
"toUserInfo"
>
<view
class=
"userInfo"
@
click.capture=
"toUserInfo"
>
<uni-file-picker
v-if=
"userInfo.avatar_file&&userInfo.avatar_file.url"
v-model=
"userInfo.avatar_file"
fileMediatype=
"image"
:del-icon=
"false"
return-type=
"object"
:image-styles=
"listStyles"
disablePreview
disabled
/>
...
...
@@ -60,8 +60,7 @@
}
],
ucenterList
:
[
[
{
[{
"
title
"
:
'
签到有奖
'
,
"
event
"
:
'
signIn
'
,
"
icon
"
:
"
compose
"
...
...
@@ -85,7 +84,7 @@
"
icon
"
:
"
paperplane
"
}
// #ifdef APP-PLUS
,{
,
{
"
title
"
:
'
分销推荐
'
,
"
event
"
:
'
share
'
,
"
icon
"
:
"
redo
"
...
...
@@ -155,7 +154,7 @@
url
:
"
/pages/ucenter/settings/settings
"
})
},
signIn
()
{
//签到
signIn
()
{
//签到
this
.
$refs
.
signIn
.
open
()
},
/**
...
...
@@ -233,7 +232,9 @@
})
},
async
share
()
{
let
{
result
}
=
await
uniCloud
.
callFunction
({
let
{
result
}
=
await
uniCloud
.
callFunction
({
name
:
'
uni-id-cf
'
,
data
:
{
action
:
'
getUserInviteCode
'
...
...
@@ -256,7 +257,8 @@
`/#/pages/ucenter/invite/invite?code=uniInvitationCode:
${
myInviteCode
}
`
,
title
:
appName
,
summary
:
slogan
,
imageUrl
:
logo
+
'
?x-oss-process=image/resize,m_fill,h_100,w_100
'
//压缩图片解决,在ios端分享图过大导致的图片失效问题
imageUrl
:
logo
+
'
?x-oss-process=image/resize,m_fill,h_100,w_100
'
//压缩图片解决,在ios端分享图过大导致的图片失效问题
},
menus
:
[{
"
img
"
:
"
/static/app-plus/sharemenu/wechatfriend.png
"
,
...
...
@@ -310,8 +312,13 @@
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/common/all-flex.css'
;
/* #ifndef APP-PLUS-NVUE */
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
page
{
background-color
:
#f8f8f8
;
}
...
...
@@ -418,4 +425,4 @@
/* #endif */
background-color
:
#DD524D
;
}
</
style
>
</
style
>
pages/ucenter/userinfo/userinfo.vue
浏览文件 @
78a1788c
<
template
>
<view>
<uni-list>
<uni-list-item
class=
"item"
>
<template
v-slot:body
>
<view
class=
"item"
>
<text>
头像
</text>
<uni-file-picker
@
click.native=
"uploadAvatarImg"
@
delete=
"removeAvatar"
v-model=
"avatar_file"
fileMediatype=
"image"
return-type=
"object"
:image-styles=
"listStyles"
disabled
/>
</view>
<uni-list-item
class=
"item"
>
<template
v-slot:body
>
<view
class=
"item"
>
<text>
头像
</text>
<uni-file-picker
@
click.native=
"uploadAvatarImg"
@
delete=
"removeAvatar"
v-model=
"avatar_file"
fileMediatype=
"image"
return-type=
"object"
:image-styles=
"listStyles"
disabled
/>
</view>
</
template
>
</uni-list-item>
<uni-list-item
class=
"item"
@
click=
"setNickname('')"
title=
"昵称"
:rightText=
"userInfo.nickname||'未设置'"
link
>
...
...
@@ -266,7 +266,13 @@
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
'@/common/all-flex.css'
;
/* #ifndef APP-NVUE */
view
{
display
:
flex
;
box-sizing
:
border-box
;
flex-direction
:
column
;
}
/* #endif */
.item
{
width
:
750rpx
;
flex-direction
:
row
;
...
...
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
0 → 100644
浏览文件 @
78a1788c
{
"passwordSecret"
:
"passwordSecret-demo"
,
"tokenSecret"
:
"tokenSecret-demo"
,
"tokenExpiresIn"
:
7200
,
"tokenExpiresThreshold"
:
600
,
"passwordErrorLimit"
:
6
,
"bindTokenToDevice"
:
false
,
"passwordErrorRetryTime"
:
3600
,
"autoSetInviteCode"
:
false
,
"forceInviteCode"
:
false
,
"app-plus"
:
{
"tokenExpiresIn"
:
2592000
,
"oauth"
:
{
"weixin"
:
{
"appid"
:
"填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appid"
,
"appsecret"
:
"填写来源微信开放平台https://open.weixin.qq.com/创建的应用的appsecret"
},
"apple"
:
{
"bundleId"
:
"苹果开发者后台获取的bundleId"
}
}
},
"mp-weixin"
:
{
"oauth"
:
{
"weixin"
:
{
"appid"
:
"微信小程序登录所用的appid、appsecret需要在对应的小程序管理控制台获取"
,
"appsecret"
:
"微信小程序后台获取的appsecret"
}
}
},
"mp-alipay"
:
{
"oauth"
:
{
"alipay"
:
{
"appid"
:
"支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr"
,
"privateKey"
:
"支付宝小程序登录用到的appid、privateKey请参考支付宝小程序的文档进行设置或者获取,https://opendocs.alipay.com/open/291/105971#LDsXr"
}
}
},
"service"
:
{
"sms"
:
{
"name"
:
"应用名称,对应短信模版的name"
,
"codeExpiresIn"
:
300
,
"smsKey"
:
"短信密钥key,开通短信服务处可以看到"
,
"smsSecret"
:
"短信密钥secret,开通短信服务处可以看到"
},
"univerify"
:
{
"appid"
:
"当前应用的appid,使用云函数URL化,此项必须配置"
,
"apiKey"
:
"apiKey 和 apiSecret 在开发者中心获取,开发者中心:https://dev.dcloud.net.cn/uniLogin/index?type=0,文档:https://ask.dcloud.net.cn/article/37965"
,
"apiSecret"
:
""
}
}
}
\ No newline at end of file
uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
浏览文件 @
78a1788c
...
...
@@ -3,7 +3,7 @@
<view
v-if=
"title"
class=
"uni-file-picker__header"
>
<text
class=
"file-title"
>
{{
title
}}
</text>
<text
class=
"file-count"
>
{{
filesList
.
length
}}
/
{{
limitLength
}}
</text>
</view>
</view>
<upload-image
v-if=
"fileMediatype === 'image' && showType === 'grid'"
:readonly=
"readonly"
...
...
@@ -39,10 +39,10 @@
</view>
</
template
>
<
script
>
<
script
>
import
{
chooseAndUploadFile
}
from
'
./choose-and-upload-file.js
'
import
uploadImage
from
'
./upload-image.vue
'
import
uploadFile
from
'
./upload-file.vue
'
import
uploadImage
from
'
./upload-image.vue
'
import
uploadFile
from
'
./upload-file.vue
'
let
fileInput
=
null
/**
* FilePicker 文件选择上传
...
...
@@ -92,18 +92,24 @@ export default {
uploadFile
},
props
:
{
// #ifdef VUE3
modelValue
:
{
type
:
[
Array
,
Object
],
default
()
{
return
[]
}
},
// #endif
// #ifndef VUE3
value
:
{
type
:
[
Array
,
Object
],
default
()
{
return
[]
}
},
modelValue
:
{
type
:
[
Array
,
Object
],
default
()
{
return
[]
}
},
// #endif
disabled
:
{
type
:
Boolean
,
default
:
false
...
...
@@ -131,10 +137,6 @@ export default {
type
:
String
,
default
:
'
grid
'
},
// inputUrl: {
// type: Boolean,
// default: false
// },
// 选择文件类型 image/video/all
fileMediatype
:
{
type
:
String
,
...
...
@@ -180,27 +182,32 @@ export default {
returnType
:
{
type
:
String
,
default
:
'
array
'
},
sizeType
:{
type
:
Array
,
default
(){
return
[
'
original
'
,
'
compressed
'
]
}
},
sizeType
:{
type
:
Array
,
default
(){
return
[
'
original
'
,
'
compressed
'
]
}
}
},
watch
:
{
// #ifndef VUE3
value
:
{
handler
(
newVal
)
{
handler
(
newVal
)
{
this
.
setValue
(
newVal
)
},
immediate
:
true
},
modelValue
:{
handler
(
newVal
)
{
this
.
setValue
(
newVal
)
},
immediate
:
true
}
},
// #endif
// #ifdef VUE3
modelValue
:{
handler
(
newVal
)
{
this
.
setValue
(
newVal
)
},
immediate
:
true
},
// #endif
},
data
()
{
return
{
...
...
@@ -232,18 +239,18 @@ export default {
return
9
}
return
this
.
limit
},
extname
(){
if
(
!
Array
.
isArray
(
this
.
fileExtname
))
{
let
extname
=
this
.
fileExtname
.
replace
(
/
(\[
|
\])
/g
,
''
)
return
extname
.
split
(
'
,
'
)
}
else
{
return
this
.
fileExtname
}
return
[]
},
extname
(){
if
(
!
Array
.
isArray
(
this
.
fileExtname
))
{
let
extname
=
this
.
fileExtname
.
replace
(
/
(\[
|
\])
/g
,
''
)
return
extname
.
split
(
'
,
'
)
}
else
{
return
this
.
fileExtname
}
return
[]
}
},
created
()
{
created
()
{
// TODO 兼容不开通服务空间的情况
if
(
!
(
uniCloud
.
config
&&
uniCloud
.
config
.
provider
)){
this
.
noSpace
=
true
...
...
@@ -251,37 +258,39 @@ export default {
}
this
.
tempData
=
{}
this
.
form
=
this
.
getForm
(
'
uniForms
'
)
this
.
formItem
=
this
.
getForm
(
'
uniFormsItem
'
)
this
.
formItem
=
this
.
getForm
(
'
uniFormsItem
'
)
if
(
this
.
form
&&
this
.
formItem
)
{
if
(
this
.
formItem
.
name
)
{
this
.
rename
=
this
.
formItem
.
name
this
.
form
.
inputChildrens
.
push
(
this
)
}
}
}
},
methods
:
{
setValue
(
newVal
){
let
newFils
=
[]
let
newData
=
[].
concat
(
newVal
||
[])
newData
.
forEach
(
v
=>
{
const
files
=
this
.
files
.
find
(
i
=>
i
.
url
===
v
.
url
)
const
reg
=
/cloud:
\/\/([\w
.
]
+
\/?)\S
*/
if
(
!
v
.
path
)
{
v
.
path
=
v
.
url
}
if
(
reg
.
test
(
v
.
url
))
{
this
.
getTempFileURL
(
v
,
v
.
url
)
}
newFils
.
push
(
files
?
files
:
v
)
})
let
data
=
null
if
(
this
.
returnType
===
'
object
'
)
{
data
=
this
.
backObject
(
newFils
)[
0
]
}
else
{
data
=
this
.
backObject
(
newFils
)
}
this
.
formItem
&&
this
.
formItem
.
setValue
(
data
)
if
(
newFils
.
length
)
this
.
files
=
newFils
methods
:
{
setValue
(
newVal
){
let
newFils
=
[]
let
newData
=
[].
concat
(
newVal
||
[])
newData
.
forEach
(
v
=>
{
const
files
=
this
.
files
.
find
(
i
=>
i
.
url
===
v
.
url
)
const
reg
=
/cloud:
\/\/([\w
.
]
+
\/?)\S
*/
if
(
!
v
.
path
)
{
v
.
path
=
v
.
url
}
if
(
reg
.
test
(
v
.
url
))
{
this
.
getTempFileURL
(
v
,
v
.
url
)
}
newFils
.
push
(
files
?
files
:
v
)
})
let
data
=
null
if
(
this
.
returnType
===
'
object
'
)
{
data
=
this
.
backObject
(
newFils
)[
0
]
}
else
{
data
=
this
.
backObject
(
newFils
)
}
this
.
formItem
&&
this
.
formItem
.
setValue
(
data
)
if
(
newFils
.
length
){
this
.
files
=
newFils
}
},
/**
* 获取父元素实例
...
...
@@ -351,7 +360,7 @@ export default {
uniCloud
.
chooseAndUploadFile
({
type
:
this
.
fileMediatype
,
compressed
:
false
,
compressed
:
false
,
sizeType
:
this
.
sizeType
,
// TODO 如果为空,video 有问题
extension
:
this
.
extname
.
length
>
0
?
this
.
extname
:
undefined
,
...
...
@@ -382,17 +391,16 @@ export default {
filePaths
=
res
.
tempFilePaths
files
=
res
.
tempFiles
}
let
currentData
=
[]
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
if
(
this
.
limitLength
-
this
.
files
.
length
<=
0
)
break
files
[
i
].
uuid
=
Date
.
now
()
let
filedata
=
await
this
.
getFileData
(
files
[
i
],
this
.
fileMediatype
)
filedata
.
file
=
files
[
i
]
filedata
.
progress
=
0
filedata
.
status
=
'
ready
'
this
.
files
.
push
(
filedata
)
currentData
.
push
(
filedata
)
currentData
.
push
(
{...
filedata
,
file
:
files
[
i
]}
)
}
this
.
$emit
(
'
select
'
,
{
tempFiles
:
currentData
,
...
...
@@ -415,7 +423,7 @@ export default {
this
.
setProgress
(
progressEvent
,
progressEvent
.
index
)
}
})
.
then
(
result
=>
{
.
then
(
result
=>
{
this
.
setSuccessAndError
(
result
.
tempFiles
)
})
.
catch
(
err
=>
{
...
...
@@ -522,8 +530,8 @@ export default {
tempFilePath
:
this
.
files
[
index
].
url
})
this
.
files
.
splice
(
index
,
1
)
this
.
$nextTick
(()
=>
{
this
.
setEmit
()
this
.
$nextTick
(()
=>
{
this
.
setEmit
()
})
},
...
...
@@ -570,7 +578,6 @@ export default {
uuid
:
files
.
uuid
,
extname
:
extname
||
''
,
cloudPath
:
files
.
cloudPath
,
file
:
files
.
file
,
fileType
:
files
.
fileType
,
url
:
files
.
path
||
files
.
path
,
size
:
files
.
size
,
//单位是字节
...
...
@@ -648,7 +655,12 @@ export default {
}
else
{
data
=
this
.
backObject
(
this
.
files
)
}
// #ifdef VUE3
this
.
$emit
(
'
update:modelValue
'
,
data
)
// #endif
// #ifndef VUE3
this
.
$emit
(
'
input
'
,
data
)
// #endif
},
backObject
(
files
)
{
let
newFilesData
=
JSON
.
parse
(
JSON
.
stringify
(
files
))
...
...
@@ -725,4 +737,4 @@ export default {
position
:
absolute
;
transform
:
rotate
(
90deg
);
}
</
style
>
</
style
>
\ No newline at end of file
uni_modules/uni-id-cf/uniCloud/cloudfunctions/uni-id-cf/index.js
浏览文件 @
78a1788c
...
...
@@ -248,11 +248,11 @@ exports.main = async (event, context) => {
break
;
case
'
sendSmsCode
'
:
/* -开始- 测试期间,为节约资源。统一虚拟短信验证码为: 123456;开启以下代码块即可 */
//
return uniID.setVerifyCode({
//
mobile: params.mobile,
//
code: '123456',
//
type: params.type
//
})
return
uniID
.
setVerifyCode
({
mobile
:
params
.
mobile
,
code
:
'
123456
'
,
type
:
params
.
type
})
/* -结束- */
// 简单限制一下客户端调用频率
...
...
uni_modules/uni-sign-in/components/uni-sign-in/uni-sign-in.vue
浏览文件 @
78a1788c
...
...
@@ -188,7 +188,7 @@
border-radius
:
100px
;
height
:
50rpx
;
line-height
:
50rpx
;
justify-content
:
center
;
text-align
:
center
;
width
:
50rpx
;
margin-bottom
:
6rpx
;
}
...
...
uni_modules_tools/config.js
浏览文件 @
78a1788c
...
...
@@ -4,7 +4,9 @@
"
appid
"
:
"
请点击重新获取
"
,
//清空appid
"
mp-weixin
"
:
{
"
appid
"
:
""
}
},
"
_spaceID
"
:
""
,
"
vueVersion
"
:
"
2
"
},
"
/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
"
:
{
"
tokenExpiresIn
"
:
7200
,
...
...
uni_modules_tools/copy/manifest.json
浏览文件 @
78a1788c
...
...
@@ -115,5 +115,6 @@
"h5"
:
{
"template"
:
""
},
"_spaceID"
:
"76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e"
"_spaceID"
:
"76ce2c5e-31c7-4d81-8fcf-ed1541ecbc6e"
,
"vueVersion"
:
"2"
}
uni_modules_tools/copy/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/uni-id/config.json
浏览文件 @
78a1788c
...
...
@@ -44,9 +44,9 @@
"smsSecret"
:
"短信密钥secret,开通短信服务处可以看到"
},
"univerify"
:
{
"appid"
:
"
__UNI__03B096E
"
,
"apiKey"
:
"
3fc28519d90d74173bcecf2daf4ffcc4
"
,
"apiSecret"
:
"
dd793e5bc4b372ce932f35bbb4c5d61b
"
"appid"
:
"
当前应用的appid,使用云函数URL化,此项必须配置
"
,
"apiKey"
:
"
apiKey 和 apiSecret 在开发者中心获取,开发者中心:https://dev.dcloud.net.cn/uniLogin/index?type=0,文档:https://ask.dcloud.net.cn/article/37965
"
,
"apiSecret"
:
""
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录