Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
一个会的不多的人
uni-starter
提交
94b2e093
U
uni-starter
项目概览
一个会的不多的人
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
1
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看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
94b2e093
编写于
4月 16, 2021
作者:
芊
芊里
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
登录页面目录调整
上级
80c9c3c5
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
6 addition
and
779 deletion
+6
-779
pages.json
pages.json
+6
-36
uniCloud-aliyun/database/opendb-department.schema.json
uniCloud-aliyun/database/opendb-department.schema.json
+0
-47
uniCloud-aliyun/database/uni-id-roles.schema.json
uniCloud-aliyun/database/uni-id-roles.schema.json
+0
-46
uni_modules/uni-id-roles/js_sdk/validator/uni-id-roles.js
uni_modules/uni-id-roles/js_sdk/validator/uni-id-roles.js
+0
-53
uni_modules/uni-id-roles/package.json
uni_modules/uni-id-roles/package.json
+0
-91
uni_modules/uni-id-roles/pages/uni-id-roles/add.vue
uni_modules/uni-id-roles/pages/uni-id-roles/add.vue
+0
-138
uni_modules/uni-id-roles/pages/uni-id-roles/detail.vue
uni_modules/uni-id-roles/pages/uni-id-roles/detail.vue
+0
-135
uni_modules/uni-id-roles/pages/uni-id-roles/edit.vue
uni_modules/uni-id-roles/pages/uni-id-roles/edit.vue
+0
-166
uni_modules/uni-id-roles/pages/uni-id-roles/list.vue
uni_modules/uni-id-roles/pages/uni-id-roles/list.vue
+0
-67
uni_modules/uni-login-page/pages/phone-code/phone-code.vue
uni_modules/uni-login-page/pages/phone-code/phone-code.vue
+0
-0
uni_modules/uni-login-page/pages/pwd-login/pwd-login.vue
uni_modules/uni-login-page/pages/pwd-login/pwd-login.vue
+0
-0
uni_modules/uni-login-page/pages/pwd-retrieve/pwd-retrieve.vue
...odules/uni-login-page/pages/pwd-retrieve/pwd-retrieve.vue
+0
-0
未找到文件。
pages.json
浏览文件 @
94b2e093
...
...
@@ -138,49 +138,19 @@
"navigationStyle"
:
"custom"
}
},
{
"path"
:
"uni_modules/uni-login-page/pages/
index
/pwd-login"
,
"path"
:
"uni_modules/uni-login-page/pages/
pwd-login
/pwd-login"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-login-page/pages/
index
/pwd-retrieve"
,
"path"
:
"uni_modules/uni-login-page/pages/
pwd-retrieve
/pwd-retrieve"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-login-page/pages/
index
/phone-code"
,
"path"
:
"uni_modules/uni-login-page/pages/
phone-code
/phone-code"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"app-plus"
:
{
//
"titleNView"
:
{
//
"buttons"
:
[{
//
"text"
:
"帮助"
,
//
"type"
:
"none"
,
//
"fontSize"
:
"16px"
,
//
"width"
:
"60px"
//
}]
//
}
}
"navigationBarTitleText"
:
""
}
},
{
...
...
uniCloud-aliyun/database/opendb-department.schema.json
已删除
100644 → 0
浏览文件 @
80c9c3c5
{
"bsonType"
:
"object"
,
"required"
:
[
"name"
],
"permission"
:
{
"read"
:
true
,
"create"
:
false
,
"update"
:
false
,
"delete"
:
false
},
"properties"
:
{
"_id"
:
{
"description"
:
"ID,系统自动生成"
},
"parent_id"
:
{
"bsonType"
:
"string"
,
"description"
:
"父级部门ID"
,
"parentKey"
:
"_id"
},
"name"
:
{
"bsonType"
:
"string"
,
"description"
:
"部门名称"
,
"title"
:
"部门名称"
,
"trim"
:
"both"
},
"level"
:
{
"bsonType"
:
"int"
,
"description"
:
"部门层级,为提升检索效率而作的冗余设计"
},
"sort"
:
{
"bsonType"
:
"int"
,
"description"
:
"部门在当前层级下的顺序,由小到大"
,
"title"
:
"显示顺序"
},
"manager_uid"
:
{
"bsonType"
:
"string"
,
"description"
:
"部门主管的userid, 参考`uni-id-users` 表"
,
"foreignKey"
:
"uni-id-users._id"
},
"create_date"
:
{
"bsonType"
:
"timestamp"
,
"description"
:
"部门创建时间"
,
"forceDefaultValue"
:
{
"$env"
:
"now"
}
}
}
}
uniCloud-aliyun/database/uni-id-roles.schema.json
已删除
100644 → 0
浏览文件 @
80c9c3c5
{
"bsonType"
:
"object"
,
"required"
:
[
"role_id"
],
"permission"
:
{
"read"
:
false
,
"create"
:
false
,
"update"
:
false
,
"delete"
:
false
},
"properties"
:
{
"_id"
:
{
"description"
:
"存储文档 ID,系统自动生成"
},
"role_id"
:
{
"title"
:
"唯一ID"
,
"bsonType"
:
"string"
,
"description"
:
"角色唯一标识,不可修改,不允许重复"
,
"trim"
:
"both"
},
"role_name"
:
{
"title"
:
"名称"
,
"bsonType"
:
"string"
,
"description"
:
"角色名称"
,
"trim"
:
"both"
},
"permission"
:
{
"title"
:
"权限"
,
"bsonType"
:
"array"
,
"foreignKey"
:
"uni-id-permissions.permission_id"
,
"description"
:
"角色拥有的权限列表"
},
"comment"
:
{
"title"
:
"备注"
,
"bsonType"
:
"string"
,
"description"
:
"备注"
,
"trim"
:
"both"
},
"create_date"
:
{
"bsonType"
:
"timestamp"
,
"description"
:
"创建时间"
,
"forceDefaultValue"
:
{
"$env"
:
"now"
}
}
}
}
uni_modules/uni-id-roles/js_sdk/validator/uni-id-roles.js
已删除
100644 → 0
浏览文件 @
80c9c3c5
// 表单校验规则由 schema2code 生成,不建议直接修改校验规则,而建议通过 schema2code 生成, 详情: https://uniapp.dcloud.net.cn/uniCloud/schema
const
validator
=
{
"
role_id
"
:
{
"
rules
"
:
[
{
"
required
"
:
true
},
{
"
format
"
:
"
string
"
}
],
"
label
"
:
"
唯一ID
"
},
"
role_name
"
:
{
"
rules
"
:
[
{
"
format
"
:
"
string
"
}
],
"
label
"
:
"
名称
"
},
"
permission
"
:
{
"
rules
"
:
[
{
"
format
"
:
"
array
"
}
],
"
label
"
:
"
权限
"
},
"
comment
"
:
{
"
rules
"
:
[
{
"
format
"
:
"
string
"
}
],
"
label
"
:
"
备注
"
},
"
create_date
"
:
{
"
rules
"
:
[
{
"
format
"
:
"
timestamp
"
}
]
}
}
const
enumConverter
=
{}
export
{
validator
,
enumConverter
}
uni_modules/uni-id-roles/package.json
已删除
100644 → 0
浏览文件 @
80c9c3c5
{
"id"
:
"uni-id-roles"
,
"displayName"
:
"uni-id-roles"
,
"version"
:
"1.0.0"
,
"description"
:
""
,
"keywords"
:
[
"uni-id-roles"
],
"repository"
:
""
,
"engines"
:
{
"HBuilderX"
:
"^3.1.0"
},
"dcloudext"
:
{
"category"
:
[
"uniCloud"
,
"Admin插件"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
"无"
,
"data"
:
"无"
,
"permissions"
:
"无"
},
"npmurl"
:
""
},
"uni_modules"
:
{
"dependencies"
:
[
"uni-dateformat"
,
"uni-badge"
,
"uni-icons"
,
"uni-load-more"
,
"uni-link"
,
"uni-forms"
,
"uni-group"
,
"uni-list"
,
"uni-fab"
,
"uni-datetime-picker"
,
"uni-data-picker"
,
"uni-file-picker"
,
"uni-easyinput"
,
"uni-data-checkbox"
],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
},
"client"
:
{
"App"
:
{
"app-vue"
:
"y"
,
"app-nvue"
:
"u"
},
"H5-mobile"
:
{
"Safari"
:
"y"
,
"Android Browser"
:
"y"
,
"微信浏览器(Android)"
:
"y"
,
"QQ浏览器(Android)"
:
"y"
},
"H5-pc"
:
{
"Chrome"
:
"y"
,
"IE"
:
"u"
,
"Edge"
:
"y"
,
"Firefox"
:
"y"
,
"Safari"
:
"y"
},
"小程序"
:
{
"微信"
:
"y"
,
"阿里"
:
"y"
,
"百度"
:
"y"
,
"字节跳动"
:
"y"
,
"QQ"
:
"y"
},
"快应用"
:
{
"华为"
:
"u"
,
"联盟"
:
"u"
}
}
}
}
}
\ No newline at end of file
uni_modules/uni-id-roles/pages/uni-id-roles/add.vue
已删除
100644 → 0
浏览文件 @
80c9c3c5
<
template
>
<view
class=
"uni-container"
>
<uni-forms
ref=
"form"
:value=
"formData"
validate-trigger=
"submit"
err-show-type=
"toast"
>
<uni-forms-item
name=
"role_id"
label=
"唯一ID"
required
>
<uni-easyinput
placeholder=
"角色唯一标识,不可修改,不允许重复"
v-model=
"formData.role_id"
trim=
"both"
/>
</uni-forms-item>
<uni-forms-item
name=
"role_name"
label=
"名称"
>
<uni-easyinput
placeholder=
"角色名称"
v-model=
"formData.role_name"
trim=
"both"
/>
</uni-forms-item>
<uni-forms-item
name=
"permission"
label=
"权限"
>
<uni-data-checkbox
:multiple=
"true"
v-model=
"formData.permission"
/>
</uni-forms-item>
<uni-forms-item
name=
"comment"
label=
"备注"
>
<uni-easyinput
placeholder=
"备注"
v-model=
"formData.comment"
trim=
"both"
/>
</uni-forms-item>
<uni-forms-item
name=
"create_date"
label=
""
>
<uni-datetime-picker
return-type=
"timestamp"
:value=
"formData.create_date"
/>
</uni-forms-item>
<view
class=
"uni-button-group"
>
<button
type=
"primary"
class=
"uni-button"
@
click=
"submit"
>
提交
</button>
</view>
</uni-forms>
</view>
</
template
>
<
script
>
import
{
validator
}
from
'
../../js_sdk/validator/uni-id-roles.js
'
;
const
db
=
uniCloud
.
database
();
const
dbCollectionName
=
'
uni-id-roles
'
;
function
getValidator
(
fields
)
{
let
reuslt
=
{}
for
(
let
key
in
validator
)
{
if
(
fields
.
indexOf
(
key
)
>
-
1
)
{
reuslt
[
key
]
=
validator
[
key
]
}
}
return
reuslt
}
export
default
{
data
()
{
return
{
formData
:
{
"
role_id
"
:
""
,
"
role_name
"
:
""
,
"
permission
"
:
[],
"
comment
"
:
""
,
"
create_date
"
:
null
},
formOptions
:
{},
rules
:
{
...
getValidator
([
"
role_id
"
,
"
role_name
"
,
"
permission
"
,
"
comment
"
,
"
create_date
"
])
}
}
},
onReady
()
{
this
.
$refs
.
form
.
setRules
(
this
.
rules
)
},
methods
:
{
/**
* 触发表单提交
*/
submit
()
{
uni
.
showLoading
({
mask
:
true
})
this
.
$refs
.
form
.
submit
().
then
((
res
)
=>
{
this
.
submitForm
(
res
)
}).
catch
((
errors
)
=>
{
uni
.
hideLoading
()
})
},
submitForm
(
value
)
{
// 使用 clientDB 提交数据
db
.
collection
(
dbCollectionName
).
add
(
value
).
then
((
res
)
=>
{
uni
.
showToast
({
icon
:
'
none
'
,
title
:
'
新增成功
'
})
this
.
getOpenerEventChannel
().
emit
(
'
refreshData
'
)
setTimeout
(()
=>
uni
.
navigateBack
(),
500
)
}).
catch
((
err
)
=>
{
uni
.
showModal
({
content
:
err
.
message
||
'
请求服务失败
'
,
showCancel
:
false
})
}).
finally
(()
=>
{
uni
.
hideLoading
()
})
}
}
}
</
script
>
<
style
>
.uni-container
{
padding
:
15px
;
}
.uni-input-border
,
.uni-textarea-border
{
width
:
100%
;
font-size
:
14px
;
color
:
#666
;
border
:
1px
#e5e5e5
solid
;
border-radius
:
5px
;
box-sizing
:
border-box
;
}
.uni-input-border
{
padding
:
0
10px
;
height
:
35px
;
}
.uni-textarea-border
{
padding
:
10px
;
height
:
80px
;
}
.uni-button-group
{
margin-top
:
50px
;
display
:
flex
;
justify-content
:
center
;
}
.uni-button
{
width
:
184px
;
padding
:
12px
20px
;
font-size
:
14px
;
border-radius
:
4px
;
line-height
:
1
;
margin
:
0
;
}
</
style
>
uni_modules/uni-id-roles/pages/uni-id-roles/detail.vue
已删除
100644 → 0
浏览文件 @
80c9c3c5
<
template
>
<view
class=
"container"
>
<unicloud-db
ref=
"udb"
v-slot:default=
"
{data, loading, error, options}" :options="options" collection="uni-id-roles" field="role_id,role_name,permission,comment,create_date" :where="queryWhere" :getone="true" :manual="true">
<view
v-if=
"error"
>
{{
error
.
message
}}
</view>
<view
v-else-if=
"loading"
>
<uni-load-more
:contentText=
"loadMore"
status=
"loading"
></uni-load-more>
</view>
<view
v-else-if=
"data"
>
<view>
<text>
唯一ID:
</text>
<text>
{{
data
.
role_id
}}
</text>
</view>
<view>
<text>
名称:
</text>
<text>
{{
data
.
role_name
}}
</text>
</view>
<view>
<text>
权限:
</text>
<text>
{{
data
.
permission
}}
</text>
</view>
<view>
<text>
备注:
</text>
<text>
{{
data
.
comment
}}
</text>
</view>
<view>
<text>
create_date:
</text>
<uni-dateformat
:date=
"data.create_date"
:threshold=
"[0, 0]"
/>
</view>
</view>
</unicloud-db>
<view
class=
"btns"
>
<button
type=
"primary"
@
click=
"handleUpdate"
>
修改
</button>
<button
type=
"warn"
class=
"btn-delete"
@
click=
"handleDelete"
>
删除
</button>
</view>
</view>
</
template
>
<
script
>
// 由schema2code生成,包含校验规则和enum静态数据
import
{
enumConverter
}
from
'
../../js_sdk/validator/uni-id-roles.js
'
;
export
default
{
data
()
{
return
{
queryWhere
:
''
,
loadMore
:
{
contentdown
:
''
,
contentrefresh
:
''
,
contentnomore
:
''
},
options
:
{
// 将scheme enum 属性静态数据中的value转成text
...
enumConverter
}
}
},
onLoad
(
e
)
{
this
.
_id
=
e
.
id
},
onReady
()
{
if
(
this
.
_id
)
{
this
.
queryWhere
=
'
_id=="
'
+
this
.
_id
+
'
"
'
}
},
methods
:
{
handleUpdate
()
{
// 打开修改页面
uni
.
navigateTo
({
url
:
'
../uni-id-roles/edit?id=
'
+
this
.
_id
,
events
:
{
// 监听修改页面成功修改数据后, 刷新当前页面数据
refreshData
:
()
=>
{
this
.
$refs
.
udb
.
loadData
({
clear
:
true
})
}
}
})
},
handleDelete
()
{
this
.
$refs
.
udb
.
remove
(
this
.
_id
,
{
success
:
(
res
)
=>
{
// 删除数据成功后跳转到list页面
uni
.
navigateTo
({
url
:
'
../uni-id-roles/list
'
})
}
})
}
}
}
</
script
>
<
style
>
.container
{
padding
:
10px
;
}
.btns
{
margin-top
:
10px
;
display
:
flex
;
flex-direction
:
row
;
}
.btns
button
{
flex
:
1
;
}
.btn-delete
{
margin-left
:
10px
;
}
</
style
>
uni_modules/uni-id-roles/pages/uni-id-roles/edit.vue
已删除
100644 → 0
浏览文件 @
80c9c3c5
<
template
>
<view
class=
"uni-container"
>
<uni-forms
ref=
"form"
:value=
"formData"
validate-trigger=
"submit"
err-show-type=
"toast"
>
<uni-forms-item
name=
"role_id"
label=
"唯一ID"
required
>
<uni-easyinput
placeholder=
"角色唯一标识,不可修改,不允许重复"
v-model=
"formData.role_id"
trim=
"both"
/>
</uni-forms-item>
<uni-forms-item
name=
"role_name"
label=
"名称"
>
<uni-easyinput
placeholder=
"角色名称"
v-model=
"formData.role_name"
trim=
"both"
/>
</uni-forms-item>
<uni-forms-item
name=
"permission"
label=
"权限"
>
<uni-data-checkbox
:multiple=
"true"
v-model=
"formData.permission"
/>
</uni-forms-item>
<uni-forms-item
name=
"comment"
label=
"备注"
>
<uni-easyinput
placeholder=
"备注"
v-model=
"formData.comment"
trim=
"both"
/>
</uni-forms-item>
<uni-forms-item
name=
"create_date"
label=
""
>
<uni-datetime-picker
return-type=
"timestamp"
:value=
"formData.create_date"
/>
</uni-forms-item>
<view
class=
"uni-button-group"
>
<button
type=
"primary"
class=
"uni-button"
@
click=
"submit"
>
提交
</button>
</view>
</uni-forms>
</view>
</
template
>
<
script
>
import
{
validator
}
from
'
../../js_sdk/validator/uni-id-roles.js
'
;
const
db
=
uniCloud
.
database
();
const
dbCollectionName
=
'
uni-id-roles
'
;
function
getValidator
(
fields
)
{
let
reuslt
=
{}
for
(
let
key
in
validator
)
{
if
(
fields
.
indexOf
(
key
)
>
-
1
)
{
reuslt
[
key
]
=
validator
[
key
]
}
}
return
reuslt
}
export
default
{
data
()
{
return
{
formData
:
{
"
role_id
"
:
""
,
"
role_name
"
:
""
,
"
permission
"
:
[],
"
comment
"
:
""
,
"
create_date
"
:
null
},
formOptions
:
{},
rules
:
{
...
getValidator
([
"
role_id
"
,
"
role_name
"
,
"
permission
"
,
"
comment
"
,
"
create_date
"
])
}
}
},
onLoad
(
e
)
{
const
id
=
e
.
id
this
.
formDataId
=
id
this
.
getDetail
(
id
)
},
onReady
()
{
this
.
$refs
.
form
.
setRules
(
this
.
rules
)
},
methods
:
{
/**
* 触发表单提交
*/
submit
()
{
uni
.
showLoading
({
mask
:
true
})
this
.
$refs
.
form
.
submit
().
then
((
res
)
=>
{
this
.
submitForm
(
res
)
}).
catch
((
errors
)
=>
{
uni
.
hideLoading
()
})
},
submitForm
(
value
)
{
// 使用 clientDB 提交数据
db
.
collection
(
dbCollectionName
).
doc
(
this
.
formDataId
).
update
(
value
).
then
((
res
)
=>
{
uni
.
showToast
({
icon
:
'
none
'
,
title
:
'
修改成功
'
})
this
.
getOpenerEventChannel
().
emit
(
'
refreshData
'
)
setTimeout
(()
=>
uni
.
navigateBack
(),
500
)
}).
catch
((
err
)
=>
{
uni
.
showModal
({
content
:
err
.
message
||
'
请求服务失败
'
,
showCancel
:
false
})
}).
finally
(()
=>
{
uni
.
hideLoading
()
})
},
/**
* 获取表单数据
* @param {Object} id
*/
getDetail
(
id
)
{
uni
.
showLoading
({
mask
:
true
})
db
.
collection
(
dbCollectionName
).
doc
(
id
).
get
().
then
((
res
)
=>
{
const
data
=
res
.
result
.
data
[
0
]
if
(
data
)
{
this
.
formData
=
data
}
}).
catch
((
err
)
=>
{
uni
.
showModal
({
content
:
err
.
message
||
'
请求服务失败
'
,
showCancel
:
false
})
}).
finally
(()
=>
{
uni
.
hideLoading
()
})
}
}
}
</
script
>
<
style
>
.uni-container
{
padding
:
15px
;
}
.uni-input-border
,
.uni-textarea-border
{
width
:
100%
;
font-size
:
14px
;
color
:
#666
;
border
:
1px
#e5e5e5
solid
;
border-radius
:
5px
;
box-sizing
:
border-box
;
}
.uni-input-border
{
padding
:
0
10px
;
height
:
35px
;
}
.uni-textarea-border
{
padding
:
10px
;
height
:
80px
;
}
.uni-button-group
{
margin-top
:
50px
;
display
:
flex
;
justify-content
:
center
;
}
.uni-button
{
width
:
184px
;
padding
:
12px
20px
;
font-size
:
14px
;
border-radius
:
4px
;
line-height
:
1
;
margin
:
0
;
}
</
style
>
uni_modules/uni-id-roles/pages/uni-id-roles/list.vue
已删除
100644 → 0
浏览文件 @
80c9c3c5
<
template
>
<view
class=
"container"
>
<unicloud-db
ref=
"udb"
v-slot:default=
"
{data, pagination, loading, hasMore, error}" collection="uni-id-roles" field="">
<view
v-if=
"error"
>
{{
error
.
message
}}
</view>
<view
v-else-if=
"data"
>
<uni-list>
<uni-list-item
v-for=
"(item, index) in data"
:key=
"index"
showArrow
:clickable=
"true"
@
click=
"handleItemClick(item._id)"
>
<view
slot=
"body"
>
<!-- 此处默认显示为_id,请根据需要自行修改为其他字段 -->
{{
item
.
_id
}}
</view>
</uni-list-item>
</uni-list>
</view>
<uni-load-more
:status=
"loading?'loading':(hasMore ? 'more' : 'noMore')"
></uni-load-more>
</unicloud-db>
<uni-fab
ref=
"fab"
horizontal=
"right"
vertical=
"bottom"
:pop-menu=
"false"
@
fabClick=
"fabClick"
/>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
loadMore
:
{
contentdown
:
''
,
contentrefresh
:
''
,
contentnomore
:
''
}
}
},
onPullDownRefresh
()
{
this
.
$refs
.
udb
.
loadData
({
clear
:
true
},
()
=>
{
uni
.
stopPullDownRefresh
()
})
},
onReachBottom
()
{
this
.
$refs
.
udb
.
loadMore
()
},
methods
:
{
handleItemClick
(
id
)
{
uni
.
navigateTo
({
url
:
'
./detail?id=
'
+
id
})
},
fabClick
()
{
// 打开新增页面
uni
.
navigateTo
({
url
:
'
./add
'
,
events
:
{
// 监听新增数据成功后, 刷新当前页面数据
refreshData
:
()
=>
{
this
.
$refs
.
udb
.
loadData
({
clear
:
true
})
}
}
})
}
}
}
</
script
>
<
style
>
</
style
>
uni_modules/uni-login-page/pages/
index
/phone-code.vue
→
uni_modules/uni-login-page/pages/
phone-code
/phone-code.vue
浏览文件 @
94b2e093
文件已移动
uni_modules/uni-login-page/pages/
index
/pwd-login.vue
→
uni_modules/uni-login-page/pages/
pwd-login
/pwd-login.vue
浏览文件 @
94b2e093
文件已移动
uni_modules/uni-login-page/pages/
index
/pwd-retrieve.vue
→
uni_modules/uni-login-page/pages/
pwd-retrieve
/pwd-retrieve.vue
浏览文件 @
94b2e093
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录