Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘文虎
account-book
Commits
c25ec321
Commit
c25ec321
authored
Aug 20, 2022
by
Facius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/liuwenhu/account-book
parents
d330860e
127ec6d3
Pipeline
#3294
canceled with stages
Changes
16
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
341 additions
and
13 deletions
+341
-13
billing-daily.vue
components/billing-daily/billing-daily.vue
+4
-0
main.js
main.js
+0
-2
manifest.json
manifest.json
+11
-8
login.vue
pages/login/login.vue
+4
-2
drap-view.vue
pages/mine/payments-setting/components/drap-view.vue
+1
-1
payments-setting.vue
pages/mine/payments-setting/payments-setting.vue
+1
-0
changelog.md
uni_modules/uni-config-center/changelog.md
+4
-0
package.json
uni_modules/uni-config-center/package.json
+80
-0
readme.md
uni_modules/uni-config-center/readme.md
+93
-0
index.js
...uniCloud/cloudfunctions/common/uni-config-center/index.js
+1
-0
package.json
...loud/cloudfunctions/common/uni-config-center/package.json
+9
-0
changelog.md
uni_modules/uni-id-common/changelog.md
+26
-0
package.json
uni_modules/uni-id-common/package.json
+87
-0
readme.md
uni_modules/uni-id-common/readme.md
+3
-0
index.js
...mon/uniCloud/cloudfunctions/common/uni-id-common/index.js
+1
-0
package.json
...uniCloud/cloudfunctions/common/uni-id-common/package.json
+16
-0
No files found.
components/billing-daily/billing-daily.vue
View file @
c25ec321
...
@@ -147,6 +147,7 @@ export default {
...
@@ -147,6 +147,7 @@ export default {
init
()
{
init
()
{
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
form
.
happenTime
=
this
.
parseTime
(
new
Date
(),
'{y}-{m}-{d}'
);
this
.
form
.
type
=
this
.
billType
;
this
.
form
.
type
=
this
.
billType
;
console
.
log
(
"checkToken"
,
checkToken
())
if
(
checkToken
())
{
if
(
checkToken
())
{
this
.
getBillTypeOptions
();
this
.
getBillTypeOptions
();
this
.
getQiniuToken
();
this
.
getQiniuToken
();
...
@@ -248,6 +249,9 @@ export default {
...
@@ -248,6 +249,9 @@ export default {
},
},
chooseLocation
()
{
chooseLocation
()
{
uni
.
chooseLocation
({
uni
.
chooseLocation
({
// #ifdef APP-PLUS
keyword
:
"1"
,
// #endif
success
:
res
=>
{
success
:
res
=>
{
console
.
log
(
'位置名称:'
+
res
.
name
);
console
.
log
(
'位置名称:'
+
res
.
name
);
console
.
log
(
'详细地址:'
+
res
.
address
);
console
.
log
(
'详细地址:'
+
res
.
address
);
...
...
main.js
View file @
c25ec321
...
@@ -5,10 +5,8 @@ import '.env.js'
...
@@ -5,10 +5,8 @@ import '.env.js'
// #ifndef VUE3
// #ifndef VUE3
import
Vue
from
'vue'
import
Vue
from
'vue'
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
//// #ifndef APP-PLUS
import
{
router
,
RouterMount
}
from
'./router'
//路径换成自己的
import
{
router
,
RouterMount
}
from
'./router'
//路径换成自己的
Vue
.
use
(
router
)
Vue
.
use
(
router
)
//// #endif
import
uView
from
"uview-ui"
;
import
uView
from
"uview-ui"
;
...
...
manifest.json
View file @
c25ec321
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
"OAuth"
:
{},
"OAuth"
:
{},
"Payment"
:
{},
"Payment"
:
{},
"Share"
:
{},
"Share"
:
{},
"Geolocation"
:
{}
"Geolocation"
:
{},
"Maps"
:
{}
},
},
/*
应用发布信息
*/
/*
应用发布信息
*/
"distribute"
:
{
"distribute"
:
{
...
@@ -95,15 +96,17 @@
...
@@ -95,15 +96,17 @@
"UniversalLinks"
:
""
"UniversalLinks"
:
""
}
}
},
},
"maps"
:
{},
"maps"
:
{
"geolocation"
:
{
"baidu"
:
{
"system"
:
{
"appkey_ios"
:
"dFMUnxGBq8mB8CSotGMELp4EGUq9qlwo"
,
"__platform__"
:
[
"ios"
,
"android"
]
"appkey_android"
:
"32HwrFwjGUFno8GddnqSZtP72sDFucG1"
}
},
},
"geolocation"
:
{
"baidu"
:
{
"baidu"
:
{
"__platform__"
:
[
"
ios"
,
"
android"
],
"__platform__"
:
[
"android"
],
"appkey_ios"
:
""
,
"appkey_ios"
:
"
dFMUnxGBq8mB8CSotGMELp4EGUq9qlwo
"
,
"appkey_android"
:
""
"appkey_android"
:
"
32HwrFwjGUFno8GddnqSZtP72sDFucG1
"
}
}
}
}
},
},
...
...
pages/login/login.vue
View file @
c25ec321
...
@@ -142,9 +142,11 @@ export default {
...
@@ -142,9 +142,11 @@ export default {
return
;
return
;
}
}
console
.
log
(
'toPhoneLogin'
,
res
);
console
.
log
(
'toPhoneLogin'
,
res
);
if
(
res
.
data
){
let
{
openId
,
unionId
,
loginChannel
,
authType
}
=
res
.
data
;
let
{
openId
,
unionId
,
loginChannel
,
authType
}
=
res
.
data
;
}
let
params
=
{};
let
params
=
{};
if
(
unionId
)
{
if
(
res
.
data
&&
unionId
)
{
params
=
{
params
=
{
openId
,
openId
,
unionId
,
unionId
,
...
...
pages/mine/payments-setting/components/drap-view.vue
View file @
c25ec321
...
@@ -276,7 +276,7 @@ export default {
...
@@ -276,7 +276,7 @@ export default {
}
}
},
},
// 拖拽结束(松手)
// 拖拽结束(松手)
dragEnd
(
event
)
{
dragEnd
(
event
,
item
)
{
// 禁止无效的move
// 禁止无效的move
if
(
this
.
pageInfo
.
beginMove
)
{
if
(
this
.
pageInfo
.
beginMove
)
{
console
.
log
(
'dragEnd'
);
console
.
log
(
'dragEnd'
);
...
...
pages/mine/payments-setting/payments-setting.vue
View file @
c25ec321
...
@@ -163,6 +163,7 @@ export default {
...
@@ -163,6 +163,7 @@ export default {
console
.
log
(
list
);
console
.
log
(
list
);
this
.
submitChange
(
list
);
this
.
submitChange
(
list
);
},
},
handleChange
(){},
async
submitChange
(
list
)
{
async
submitChange
(
list
)
{
try
{
try
{
let
ids
=
list
.
map
(
item
=>
item
.
id
)
let
ids
=
list
.
map
(
item
=>
item
.
id
)
...
...
uni_modules/uni-config-center/changelog.md
0 → 100644
View file @
c25ec321
## 0.0.2(2021-04-16)
-
修改插件package信息
## 0.0.1(2021-03-15)
-
初始化项目
uni_modules/uni-config-center/package.json
0 → 100644
View file @
c25ec321
{
"id"
:
"uni-config-center"
,
"displayName"
:
"uni-config-center"
,
"version"
:
"0.0.2"
,
"description"
:
"uniCloud 配置中心"
,
"keywords"
:
[
"配置"
,
"配置中心"
],
"repository"
:
""
,
"engines"
:
{
"HBuilderX"
:
"^3.1.0"
},
"dcloudext"
:
{
"category"
:
[
"uniCloud"
,
"云函数模板"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
"无"
,
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
""
},
"directories"
:
{
"example"
:
"../../../scripts/dist"
},
"uni_modules"
:
{
"dependencies"
:
[],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
},
"client"
:
{
"App"
:
{
"app-vue"
:
"u"
,
"app-nvue"
:
"u"
},
"H5-mobile"
:
{
"Safari"
:
"u"
,
"Android Browser"
:
"u"
,
"微信浏览器(Android)"
:
"u"
,
"QQ浏览器(Android)"
:
"u"
},
"H5-pc"
:
{
"Chrome"
:
"u"
,
"IE"
:
"u"
,
"Edge"
:
"u"
,
"Firefox"
:
"u"
,
"Safari"
:
"u"
},
"小程序"
:
{
"微信"
:
"u"
,
"阿里"
:
"u"
,
"百度"
:
"u"
,
"字节跳动"
:
"u"
,
"QQ"
:
"u"
},
"快应用"
:
{
"华为"
:
"u"
,
"联盟"
:
"u"
}
}
}
}
}
uni_modules/uni-config-center/readme.md
0 → 100644
View file @
c25ec321
# 为什么使用uni-config-center
实际开发中很多插件需要配置文件才可以正常运行,如果每个插件都单独进行配置的话就会产生下面这样的目录结构
```
bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ ├─index.js
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b // plugin-b对应的目录
├─index.js
└─config.json // plugin-b对应的配置文件
```
假设插件作者要发布一个项目模板,里面使用了很多需要配置的插件,无论是作者发布还是用户使用都是一个大麻烦。
uni-config-center就是用了统一管理这些配置文件的,使用uni-config-center后的目录结构如下
```
bash
cloudfunctions
└─────common 公共模块
├─plugin-a // 插件A对应的目录
│ └─index.js
├─plugin-b // plugin-b对应的目录
│ └─index.js
└─uni-config-center
├─index.js // config-center入口文件
├─plugin-a
│ ├─config.json // plugin-a对应的配置文件
│ └─other-file.cert // plugin-a依赖的其他文件
└─plugin-b
└─config.json // plugin-b对应的配置文件
```
使用uni-config-center后的优势
-
配置文件统一管理,分离插件主体和配置信息,更新插件更方便
-
支持对config.json设置schema,插件使用者在HBuilderX内编写config.json文件时会有更好的提示(后续HBuilderX会提供支持)
# 用法
在要使用uni-config-center的公共模块或云函数内引入uni-config-center依赖,请参考:
[
使用公共模块
](
https://uniapp.dcloud.net.cn/uniCloud/cf-common
)
```
js
const
createConfig
=
require
(
'uni-config-center'
)
const
uniIdConfig
=
createConfig
({
pluginId
:
'uni-id'
,
// 插件id
defaultConfig
:
{
// 默认配置
tokenExpiresIn
:
7200
,
tokenExpiresThreshold
:
600
,
},
customMerge
:
function
(
defaultConfig
,
userConfig
)
{
// 自定义默认配置和用户配置的合并规则,不设置的情况侠会对默认配置和用户配置进行深度合并
// defaudltConfig 默认配置
// userConfig 用户配置
return
Object
.
assign
(
defaultConfig
,
userConfig
)
}
})
// 以如下配置为例
// {
// "tokenExpiresIn": 7200,
// "passwordErrorLimit": 6,
// "bindTokenToDevice": false,
// "passwordErrorRetryTime": 3600,
// "app-plus": {
// "tokenExpiresIn": 2592000
// },
// "service": {
// "sms": {
// "codeExpiresIn": 300
// }
// }
// }
// 获取配置
uniIdConfig
.
config
()
// 获取全部配置,注意:uni-config-center内不存在对应插件目录时会返回空对象
uniIdConfig
.
config
(
'tokenExpiresIn'
)
// 指定键值获取配置,返回:7200
uniIdConfig
.
config
(
'service.sms.codeExpiresIn'
)
// 指定键值获取配置,返回:300
uniIdConfig
.
config
(
'tokenExpiresThreshold'
,
600
)
// 指定键值获取配置,如果不存在则取传入的默认值,返回:600
// 获取文件绝对路径
uniIdConfig
.
resolve
(
'custom-token.js'
)
// 获取uni-config-center/uni-id/custom-token.js文件的路径
// 引用文件(require)
uniIDConfig
.
requireFile
(
'custom-token.js'
)
// 使用require方式引用uni-config-center/uni-id/custom-token.js文件。文件不存在时返回undefined,文件内有其他错误导致require失败时会抛出错误。
// 判断是否包含某文件
uniIDConfig
.
hasFile
(
'custom-token.js'
)
// 配置目录是否包含某文件,true: 文件存在,false: 文件不存在
```
\ No newline at end of file
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/index.js
0 → 100644
View file @
c25ec321
This diff is collapsed.
Click to expand it.
uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center/package.json
0 → 100644
View file @
c25ec321
{
"name"
:
"uni-config-center"
,
"version"
:
"0.0.2"
,
"description"
:
"配置中心"
,
"main"
:
"index.js"
,
"keywords"
:
[],
"author"
:
"DCloud"
,
"license"
:
"Apache-2.0"
}
\ No newline at end of file
uni_modules/uni-id-common/changelog.md
0 → 100644
View file @
c25ec321
## 1.0.13(2022-07-21)
-
修复 创建token时未传角色权限信息生成的token不正确的bug
## 1.0.12(2022-07-15)
-
提升与旧版本uni-id的兼容性(补充读取配置文件时回退平台app-plus、h5),但是仍推荐使用新平台名进行配置(app、web)
## 1.0.11(2022-07-14)
-
修复 部分情况下报
`read property 'reduce' of undefined`
的错误
## 1.0.10(2022-07-11)
-
将token存储在用户表的token字段内,与旧版本uni-id保持一致
## 1.0.9(2022-07-01)
-
checkToken兼容token内未缓存角色权限的情况,此时将查库获取角色权限
## 1.0.8(2022-07-01)
-
修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug
## 1.0.7(2022-06-30)
-
修复config文件不合法时未抛出具体错误的Bug
## 1.0.6(2022-06-28)
-
移除插件内的数据表schema
## 1.0.5(2022-06-27)
-
修复使用多应用配置时报
`Cannot read property 'appId' of undefined`
的Bug
## 1.0.4(2022-06-27)
-
修复使用自定义token内容功能报错的Bug
[
详情
](
https://ask.dcloud.net.cn/question/147945
)
## 1.0.2(2022-06-23)
-
对齐旧版本uni-id默认配置
## 1.0.1(2022-06-22)
-
补充对uni-config-center的依赖
## 1.0.0(2022-06-21)
-
提供uni-id token创建、校验、刷新接口,简化旧版uni-id公共模块
uni_modules/uni-id-common/package.json
0 → 100644
View file @
c25ec321
{
"id"
:
"uni-id-common"
,
"displayName"
:
"uni-id-common"
,
"version"
:
"1.0.13"
,
"description"
:
"包含uni-id token生成、校验、刷新功能的云函数公共模块"
,
"keywords"
:
[
"uni-id-common"
,
"uniCloud"
,
"token"
,
"权限"
],
"repository"
:
"https://gitcode.net/dcloud/uni-id-common"
,
"engines"
:
{
"HBuilderX"
:
"^3.1.0"
},
"dcloudext"
:
{
"category"
:
[
"uniCloud"
,
"云函数模板"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
"无"
,
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
""
},
"uni_modules"
:
{
"dependencies"
:
[
"uni-config-center"
],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
},
"client"
:
{
"Vue"
:
{
"vue2"
:
"u"
,
"vue3"
:
"u"
},
"App"
:
{
"app-vue"
:
"u"
,
"app-nvue"
:
"u"
},
"H5-mobile"
:
{
"Safari"
:
"u"
,
"Android Browser"
:
"u"
,
"微信浏览器(Android)"
:
"u"
,
"QQ浏览器(Android)"
:
"u"
},
"H5-pc"
:
{
"Chrome"
:
"u"
,
"IE"
:
"u"
,
"Edge"
:
"u"
,
"Firefox"
:
"u"
,
"Safari"
:
"u"
},
"小程序"
:
{
"微信"
:
"u"
,
"阿里"
:
"u"
,
"百度"
:
"u"
,
"字节跳动"
:
"u"
,
"QQ"
:
"u"
,
"钉钉"
:
"u"
,
"快手"
:
"u"
,
"飞书"
:
"u"
,
"京东"
:
"u"
},
"快应用"
:
{
"华为"
:
"u"
,
"联盟"
:
"u"
}
}
}
}
}
uni_modules/uni-id-common/readme.md
0 → 100644
View file @
c25ec321
# uni-id-common
文档请参考:
[
uni-id-common
](
https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html
)
\ No newline at end of file
uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/index.js
0 → 100644
View file @
c25ec321
This diff is collapsed.
Click to expand it.
uni_modules/uni-id-common/uniCloud/cloudfunctions/common/uni-id-common/package.json
0 → 100644
View file @
c25ec321
{
"name"
:
"uni-id-common"
,
"version"
:
"1.0.13"
,
"description"
:
"uni-id token生成、校验、刷新"
,
"main"
:
"index.js"
,
"homepage"
:
"https://uniapp.dcloud.io/uniCloud/uni-id-common.html"
,
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://gitee.com/dcloud/uni-id-common.git"
},
"author"
:
"DCloud"
,
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
"uni-config-center"
:
"file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment