Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-starter
提交
d30b63dc
U
uni-starter
项目概览
DCloud
/
uni-starter
通知
4669
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d30b63dc
编写于
4月 13, 2021
作者:
L
linju
浏览文件
操作
浏览文件
下载
差异文件
21
上级
a921045c
911ff155
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
367 addition
and
109 deletion
+367
-109
pages.json
pages.json
+1
-2
uni_modules/opendb-feedback/pages/opendb-feedback/add.vue
uni_modules/opendb-feedback/pages/opendb-feedback/add.vue
+2
-0
uni_modules/opendb-feedback/pages/opendb-feedback/list.vue
uni_modules/opendb-feedback/pages/opendb-feedback/list.vue
+62
-66
uni_modules/opendb-feedback/uniCloud/database/opendb-feedback.schema.json
...db-feedback/uniCloud/database/opendb-feedback.schema.json
+4
-1
uni_modules/uni-nodata/changelog.md
uni_modules/uni-nodata/changelog.md
+0
-0
uni_modules/uni-nodata/components/uni-nodata/uni-nodata.nvue
uni_modules/uni-nodata/components/uni-nodata/uni-nodata.nvue
+214
-0
uni_modules/uni-nodata/package.json
uni_modules/uni-nodata/package.json
+76
-0
uni_modules/uni-nodata/readme.md
uni_modules/uni-nodata/readme.md
+1
-0
uni_modules/uni-nodata/static/nodata.png
uni_modules/uni-nodata/static/nodata.png
+0
-0
uni_modules/uni-nodata/static/nowifi.png
uni_modules/uni-nodata/static/nowifi.png
+0
-0
uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package-lock.json
...uick-login/uniCloud/cloudfunctions/user/package-lock.json
+7
-40
未找到文件。
pages.json
浏览文件 @
d30b63dc
...
...
@@ -69,8 +69,7 @@
},
{
"path"
:
"uni_modules/opendb-feedback/pages/opendb-feedback/list"
,
"style"
:
{
"navigationBarTitleText"
:
"反馈列表"
,
"enablePullDownRefresh"
:
true
"navigationBarTitleText"
:
"反馈列表"
}
},
{
"path"
:
"uni_modules/opendb-feedback/pages/opendb-feedback/add"
,
...
...
uni_modules/opendb-feedback/pages/opendb-feedback/add.vue
浏览文件 @
d30b63dc
...
...
@@ -97,6 +97,8 @@
.
then
(
imgs
=>
{
res
.
imgs
=
imgs
;
res
.
create_date
=
Date
.
now
();
res
.
is_reply
=
true
;
this
.
submitForm
(
res
)
});
}).
catch
((
errors
)
=>
{
...
...
uni_modules/opendb-feedback/pages/opendb-feedback/list.vue
浏览文件 @
d30b63dc
<
template
>
<view
class=
"container"
>
<unicloud-db
ref=
"udb"
v-slot:default=
"
{data, pagination, loading, hasMore, error}" collection="opendb-feedback" field="user_id,create_date,content,imgs,is_reply,feedback_id,contact,mobile,reply_count">
<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
.
content
}}
</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
},
(
res
)
=>
{
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
>
<
template
>
<view
class=
"container"
>
<unicloud-db
ref=
"udb"
v-slot:default=
"
{data, pagination, loading, hasMore, error}" collection="opendb-feedback"
field="user_id,create_date,content,imgs,is_reply,feedback_id,contact,mobile,reply_count">
<view
v-if=
"data && data.length"
>
<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
.
content
}}
</view>
</uni-list-item>
</uni-list>
</view>
<uni-nodata
v-else
@
retry=
"refreshData"
></uni-nodata>
</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
:
''
}
}
},
methods
:
{
refreshData
()
{
this
.
$refs
.
udb
.
loadData
({
clear
:
true
},
(
res
)
=>
{})
},
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/opendb-feedback/uniCloud/database/opendb-feedback.schema.json
浏览文件 @
d30b63dc
{
"bsonType"
:
"object"
,
"permission"
:
{
"read"
:
"
auth.uid && doc.uid == auth.uid
"
,
"read"
:
"
!doc.is_reply
"
,
"create"
:
true
,
"update"
:
false
,
"delete"
:
false
...
...
@@ -17,6 +17,9 @@
"forceDefaultValue"
:
{
"$env"
:
"uid"
}
},
"title"
:{
"description"
:
"反馈标题(用于列表展示)"
},
"ip"
:
{
"forceDefaultValue"
:
{
...
...
uni_modules/uni-nodata/changelog.md
0 → 100644
浏览文件 @
d30b63dc
uni_modules/uni-nodata/components/uni-nodata/uni-nodata.nvue
0 → 100644
浏览文件 @
d30b63dc
<template>
<view class="nodata">
<view class="nodata-content">
<view class="text-view a-i-c j-c-c t-a-c">
<text class="title">{{textTypes[networkType]}}</text>
</view>
<view class="icon-view">
<image src="/uni_modules/uni-nodata/static/nodata.png" class="icon-image"></image>
</view>
<view class="opera-view">
<view class="btn btn-default" v-if="networkType!='none'" @click="retry">
<text class="btn-text">重试</text>
</view>
<view class="btn btn-default" v-if="networkType=='none'" @click="openSettings">
<text class="btn-text">设置</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'uni-nodata',
data() {
return {
textTypes: {
none: "暂无网络"
},
isConnected: false,
networkType: "none"
}
},
mounted() {
this.isIOS = (uni.getSystemInfoSync().platform === 'ios');
uni.onNetworkStatusChange((res) => {
this.isConnected = res.isConnected;
this.networkType = res.networkType;
});
uni.getNetworkType({
success: (res) => {
this.networkType = res.networkType;
}
});
},
methods: {
retry() {
this.$emit('retry');
},
async openSettings() {
if (this.networkType == "none") {
this.openSystemSettings();
return;
}
},
openAppSettings() {
this.gotoAppSetting();
},
openSystemSettings() {
if (this.isIOS) {
this.gotoiOSSetting();
} else {
this.gotoAndroidSetting();
}
},
network() {
var result = null;
var cellularData = plus.ios.newObject("CTCellularData");
var state = cellularData.plusGetAttribute("restrictedState");
if (state == 0) {
result = null;
console.log("StateUnknown");
} else if (state == 2) {
result = 1;
console.log("已经开启了互联网权限:NotRestricted");
} else if (state == 1) {
result = 2;
console.log("Restricted");
}
plus.ios.deleteObject(cellularData);
return result;
},
gotoAppSetting() {
if (this.isIOS) {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
var setting2 = NSURL2.URLWithString("app-settings:");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
} else {
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var Uri = plus.android.importClass("android.net.Uri");
var mainActivity = plus.android.runtimeMainActivity();
var intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);
intent.setData(uri);
mainActivity.startActivity(intent);
}
},
gotoiOSSetting() {
var UIApplication = plus.ios.import("UIApplication");
var application2 = UIApplication.sharedApplication();
var NSURL2 = plus.ios.import("NSURL");
var setting2 = NSURL2.URLWithString("App-prefs:root=General");
application2.openURL(setting2);
plus.ios.deleteObject(setting2);
plus.ios.deleteObject(NSURL2);
plus.ios.deleteObject(application2);
},
gotoAndroidSetting() {
var Intent = plus.android.importClass("android.content.Intent");
var Settings = plus.android.importClass("android.provider.Settings");
var mainActivity = plus.android.runtimeMainActivity();
var intent = new Intent(Settings.ACTION_SETTINGS);
mainActivity.startActivity(intent);
}
}
}
</script>
<style>
.a-i-c {
align-items: center;
}
.j-c-c {
justify-content: center;
}
.t-a-c {
text-align: center;
}
.nodata {
flex: 1;
flex-direction: column;
/* #ifndef APP-PLUS */
display: flex;
/* #endif */
align-items: center;
justify-content: center;
padding: 30px;
background-color: #f8f8f8;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
/* #ifndef APP-NVUE */
margin: auto;
/* #endif */
}
.nodata-content {
transform: translateY(-50px);
}
.text-view {
margin-bottom: 40px;
}
.title {
color: #999999;
font-size: 18px;
}
.opera-view {
flex-direction: column;
align-items: center;
justify-content: center;
}
.btn {
padding: 5px 10px;
width: 128px;
flex-direction: row;
align-items: center;
justify-content: center;
text-align: center;
}
.btn-text {
color: #999999;
font-size: 15px;
}
.btn-default {
border-color: #999999;
border-style: solid;
border-width: 1px;
border-radius: 3px;
}
.icon-view{
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
border-width: 1rpx;
border-color: #DD524D;
}
.icon-image{
width: 640rpx;
height: 640rpx;
}
</style>
uni_modules/uni-nodata/package.json
0 → 100644
浏览文件 @
d30b63dc
{
"id"
:
"uni-nodata"
,
"displayName"
:
"uni-nodata"
,
"version"
:
"1.0.0"
,
"description"
:
"uni-nodata"
,
"keywords"
:
[
"uni-nodata"
],
"repository"
:
""
,
"engines"
:
{
"HBuilderX"
:
"^3.1.0"
},
"dcloudext"
:
{
"category"
:
[
"前端组件"
,
"通用组件"
],
"sale"
:
{
"regular"
:
{
"price"
:
"0.00"
},
"sourcecode"
:
{
"price"
:
"0.00"
}
},
"contact"
:
{
"qq"
:
""
},
"declaration"
:
{
"ads"
:
""
,
"data"
:
""
,
"permissions"
:
""
},
"npmurl"
:
""
},
"uni_modules"
:
{
"dependencies"
:
[],
"encrypt"
:
[],
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"u"
,
"aliyun"
:
"u"
},
"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"
}
}
}
}
}
\ No newline at end of file
uni_modules/uni-nodata/readme.md
0 → 100644
浏览文件 @
d30b63dc
# uni-nodata
\ No newline at end of file
uni_modules/uni-nodata/static/nodata.png
0 → 100644
浏览文件 @
d30b63dc
44.7 KB
uni_modules/uni-nodata/static/nowifi.png
0 → 100644
浏览文件 @
d30b63dc
96.0 KB
uni_modules/uni-quick-login/uniCloud/cloudfunctions/user/package-lock.json
浏览文件 @
d30b63dc
{
"name"
:
"user"
,
"version"
:
"1.0.0"
,
"lockfileVersion"
:
2
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"packages"
:
{
""
:
{
"version"
:
"1.0.0"
,
"license"
:
"ISC"
,
"dependencies"
:
{
"uni-captcha"
:
"file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha"
,
"uni-config-center"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
,
"uni-id"
:
"file:../../../../uni-id/uniCloud/cloudfunctions/common/uni-id"
}
},
"../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha"
:
{
"version"
:
"0.1.0"
,
"license"
:
"Apache-2.0"
},
"../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
:
{
"version"
:
"0.0.1"
,
"license"
:
"Apache-2.0"
},
"../../../../uni-id/uniCloud/cloudfunctions/common/uni-id"
:
{
"version"
:
"3.0.8"
,
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
"uni-config-center"
:
"file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
},
"node_modules/uni-captcha"
:
{
"resolved"
:
"../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha"
,
"link"
:
true
},
"node_modules/uni-config-center"
:
{
"resolved"
:
"../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
,
"link"
:
true
},
"node_modules/uni-id"
:
{
"resolved"
:
"../../../../uni-id/uniCloud/cloudfunctions/common/uni-id"
,
"link"
:
true
}
},
"dependencies"
:
{
"uni-captcha"
:
{
"version"
:
"file:../../../../uni-captcha/uniCloud/cloudfunctions/common/uni-captcha"
...
...
@@ -51,7 +13,12 @@
"uni-id"
:
{
"version"
:
"file:../../../../uni-id/uniCloud/cloudfunctions/common/uni-id"
,
"requires"
:
{
"uni-config-center"
:
"file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
"uni-config-center"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
},
"dependencies"
:
{
"uni-config-center"
:
{
"version"
:
"file:../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center"
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录