提交 56d290a1 编写于 作者: 芊里

项目目录调整

上级 d3a960dc
.uni-flex {
display: flex;
}
.uni-flex-row {
@extend .uni-flex;
flex-direction: row;
box-sizing: border-box;
}
.uni-flex-column {
@extend .uni-flex;
flex-direction: column;
}
.uni-color-gary {
color: #3b4144;
}
/* 标题 */
.uni-title {
display: flex;
margin-bottom: $uni-spacing-col-base;
font-size: $uni-font-size-lg;
font-weight: bold;
color: #3b4144;
}
.uni-title-sub {
display: flex;
// margin-bottom: $uni-spacing-col-base;
font-size: $uni-font-size-base;
font-weight: 500;
color: #3b4144;
}
/* 描述 额外文本 */
.uni-note {
margin-top: 10px;
color: #999;
font-size: $uni-font-size-sm;
}
/* 列表内容 */
.uni-list-box {
@extend .uni-flex-row;
flex: 1;
margin-top: 10px;
}
/* 略缩图 */
.uni-thumb {
flex-shrink: 0;
margin-right: $uni-spacing-row-base;
width: 125px;
height: 75px;
border-radius: $uni-border-radius-lg;
overflow: hidden;
border: 1px #f5f5f5 solid;
image {
width: 100%;
height: 100%;
}
}
.uni-media-box {
@extend .uni-flex-row;
// margin-bottom: $uni-spacing-col-base;
border-radius: $uni-border-radius-lg;
overflow: hidden;
.uni-thumb {
margin: 0;
margin-left: 4px;
flex-shrink: 1;
width: 33%;
border-radius:0;
&:first-child {
margin: 0;
}
}
}
/* 内容 */
.uni-content {
@extend .uni-flex-column;
justify-content: space-between;
}
/* 列表footer */
.uni-footer {
@extend .uni-flex-row;
justify-content: space-between;
margin-top: $uni-spacing-col-lg;
}
.uni-footer-text {
font-size: $uni-font-size-sm;
color: $uni-text-color-grey;
margin-left: 5px;
}
/* 标签 */
.uni-tag {
flex-shrink: 0;
padding: 0 5px;
border: 1px $uni-border-color solid;
margin-right: $uni-spacing-row-sm;
border-radius: $uni-border-radius-base;
background: $uni-bg-color-grey;
color: $uni-text-color;
font-size: $uni-font-size-sm;
}
/* 链接 */
.uni-link {
margin-left: 10px;
color: $uni-text-color;
text-decoration: underline;
}
{ {
"name" : "base-app", "name": "base-app",
"appid" : "__UNI__BC54A00", "appid": "__UNI__BC54A00",
"description" : "", "description": "",
"versionName" : "1.0.0", "versionName": "1.0.0",
"versionCode" : "100", "versionCode": "100",
"transformPx" : false, "transformPx": false,
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueCompiler" : "uni-app", "nvueCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "safearea": { //安全区域配置,仅iOS平台生效
"alwaysShowBeforeRender" : true, "background": "#FFFFFF", //安全区域外的背景颜色,默认值为"#FFFFFF"
"waiting" : true, "bottom": { // 底部安全区域配置
"autoclose" : true, "offset": "auto" // 底部安全区域偏移,"none"表示不空出安全区域,"auto"自动计算空出安全区域,默认值为"none"
"delay" : 0 }
}, },
"modules" : { "splashscreen": {
"Share" : {}, "alwaysShowBeforeRender": true,
"Fingerprint" : {}, "waiting": true,
"OAuth" : {} "autoclose": true,
}, "delay": 0
"distribute" : { },
"android" : { "modules": {
"permissions" : [ "Share": {},
"<uses-feature android:name=\"android.hardware.camera\"/>", "Fingerprint": {},
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "OAuth": {}
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", },
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "distribute": {
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "android": {
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.WRITE_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\"/>",
/* ios打包配置 */ "<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
"ios" : { "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"capabilities" : { "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"plists" : { "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
"DCloudConfig" : { ]
"miniServer" : true },
} /* ios打包配置 */
}, "ios": {
"entitlements" : { "capabilities": {
"com.apple.developer.associated-domains" : [ "plists": {
"applinks:uniapp.dcloud.io", "DCloudConfig": {
"applinks:static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com" "miniServer": true
] }
} },
}, "entitlements": {
"privacyDescription" : { "com.apple.developer.associated-domains": [
"NSLocalNetworkUsageDescription" : "展示游戏页面" "applinks:uniapp.dcloud.io",
} "applinks:static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com"
}, ]
"sdkConfigs" : { }
"oauth" : { },
"apple" : {}, "privacyDescription": {
"weixin" : { "NSLocalNetworkUsageDescription": "展示游戏页面"
"appid" : "wx0411fa6a39d61297", }
"appsecret" : "", },
"UniversalLinks" : "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00" "sdkConfigs": {
}, "oauth": {
"univerify" : {} "apple": {},
}, "weixin": {
"share" : { "appid": "wx0411fa6a39d61297",
"weixin" : { "appsecret": "",
"appid" : "wx0411fa6a39d61297", "UniversalLinks": "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00"
"UniversalLinks" : "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00", },
"_spaceID" : "7827e38b-7f40-4421-bca7-58331dcddc00" "univerify": {}
} },
}, "share": {
"payment" : { "weixin": {
"weixin" : { "appid": "wx0411fa6a39d61297",
"UniversalLinks" : "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00" "UniversalLinks": "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00",
} "_spaceID": "7827e38b-7f40-4421-bca7-58331dcddc00"
}, }
"ad" : {} },
} "payment": {
} "weixin": {
}, "UniversalLinks": "https://static-7827e38b-7f40-4421-bca7-58331dcddc00.bspapp.com/uni-universallinks/__UNI__BC54A00"
"quickapp" : {}, }
"mp-weixin" : { },
"appid" : "", "ad": {}
"setting" : { }
"urlCheck" : false }
}, },
"usingComponents" : true "quickapp": {},
}, "mp-weixin": {
"mp-alipay" : { "appid": "",
"usingComponents" : true "setting": {
}, "urlCheck": false
"mp-baidu" : { },
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"uniStatistics" : { "mp-baidu": {
"enable" : false "usingComponents": true
} },
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false
}
} }
...@@ -130,7 +130,6 @@ ...@@ -130,7 +130,6 @@
"path": "uni_modules/uni-login-page/pages/index/pwd-login", "path": "uni_modules/uni-login-page/pages/index/pwd-login",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
...@@ -146,7 +145,6 @@ ...@@ -146,7 +145,6 @@
"path": "uni_modules/uni-login-page/pages/index/pwd-retrieve", "path": "uni_modules/uni-login-page/pages/index/pwd-retrieve",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
...@@ -162,7 +160,6 @@ ...@@ -162,7 +160,6 @@
"path": "uni_modules/uni-login-page/pages/index/phone-code", "path": "uni_modules/uni-login-page/pages/index/phone-code",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationBarBackgroundColor": "#FFFFFF",
"app-plus": { "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
...@@ -187,14 +184,14 @@ ...@@ -187,14 +184,14 @@
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "base-app", "navigationBarTitleText": "base-app",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#FFFFFF",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"tabBar": { "tabBar": {
"color": "#7A7E83", "color": "#7A7E83",
"selectedColor": "#007AFF", "selectedColor": "#007AFF",
"borderStyle": "black", "borderStyle": "black",
"backgroundColor": "#F8F8F8", "backgroundColor": "#FFFFFF",
"list": [{ "list": [{
"pagePath": "pages/list/list", "pagePath": "pages/list/list",
"iconPath": "static/tabbar/list.png", "iconPath": "static/tabbar/list.png",
......
...@@ -200,6 +200,7 @@ ...@@ -200,6 +200,7 @@
line-height: 80rpx; line-height: 80rpx;
justify-content: center; justify-content: center;
color: #ccc; color: #ccc;
text-align: center;
} }
.source { .source {
......
{
"bannerfile":"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url":"https://www.dcloud.io/",
"title":"内容 A",
"sort":0,
"category_id":"grid",
"status":true,
"description":"备注"
}
{
"bannerfile":"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url":"https://www.dcloud.io/",
"title":"内容 A",
"sort":0,
"category_id":"grid",
"status":true,
"description":"备注"
}{
"bannerfile":"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url":"https://www.dcloud.io/",
"title":"内容 A",
"sort":0,
"category_id":"grid",
"status":true,
"description":"备注"
}{
"bannerfile":"https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"open_url":"https://www.dcloud.io/",
"title":"内容 A",
"sort":0,
"category_id":"grid",
"status":true,
"description":"备注"
}
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<!-- 通过body插槽定义作者信息内容 --> <!-- 通过body插槽定义作者信息内容 -->
<view slot="body" class="header-content"> <view slot="body" class="header-content">
<view class="uni-title">{{data.author && data.author[0].username}}</view> <view class="uni-title">{{data.author && data.author[0].username}}</view>
<view class="uni-note">更新于 {{data.last_modify_date | beforTime}} </view> <view class="uni-note">更新于 <uni-dateformat :date="data.last_modify_date" format="yyyy-MM-dd" :threshold="[60000, 2592000000]" /> </view>
</view> </view>
<view slot="footer" class="footer"> <view slot="footer" class="footer">
<button @click="followClick" class="footer-button">关注</button> <button @click="followClick" class="footer-button">关注</button>
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
<script> <script>
import uParse from '@/components/u-parse/parse.vue'; import uParse from '@/components/u-parse/parse.vue';
import { friendlyDate } from '@/common/utils.js';
export default { export default {
components: { components: {
uParse uParse
...@@ -63,11 +62,6 @@ ...@@ -63,11 +62,6 @@
noData: '<p style="text-align:center;color:#666">详情加载中...</p>' noData: '<p style="text-align:center;color:#666">详情加载中...</p>'
}, },
} }
},filters:{
beforTime(number){
if(number)return friendlyDate(+number);
return '';
}
}, },
computed:{ computed:{
//拼接where条件 //拼接where条件
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/common/uni-ui.scss';
page { page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// @import '@/common/uni-ui.scss'; @import '@/common/uni-ui.scss';
page { page {
display: flex; display: flex;
......
...@@ -7,11 +7,7 @@ ...@@ -7,11 +7,7 @@
:link="item.to"></uni-list-item> :link="item.to"></uni-list-item>
</uni-list> </uni-list>
<!-- 退出按钮 --> <!-- 退出按钮 -->
<button class="bottom-back" @click="clickLogout"><text class="bottom-back-text">退出登录</text></button> <button class="bottom-back" @click="clickLogout"><text class="bottom-back-text">退出登录</text></button>
<!-- 弹窗 -->
<uni-popup type="center" ref="dialog">
<uni-popup-dialog type="warning" content="是否退出登录?" @confirm="confirm"></uni-popup-dialog>
</uni-popup>
</view> </view>
</template> </template>
...@@ -21,7 +17,8 @@ ...@@ -21,7 +17,8 @@
setting setting
} from './dc-push/push.js'; } from './dc-push/push.js';
import { import {
mapMutations mapMutations,
mapGetters
} from 'vuex'; } from 'vuex';
export default { export default {
data() { data() {
...@@ -31,8 +28,8 @@ ...@@ -31,8 +28,8 @@
to: '' to: ''
}, },
{ {
title: '修改密码', title: '修改密码',
to: '' event:'changePwd'
}, { }, {
title: '注销用户', title: '注销用户',
event: '' event: ''
...@@ -53,6 +50,11 @@ ...@@ -53,6 +50,11 @@
] ]
} }
},
computed:{
...mapGetters({
'userInfo':'user/info'
})
}, },
onLoad() { onLoad() {
this.initSoterAuthentication(); this.initSoterAuthentication();
...@@ -64,6 +66,18 @@ ...@@ -64,6 +66,18 @@
...mapMutations({ ...mapMutations({
logout: 'user/logout' logout: 'user/logout'
}), }),
changePwd(){
if(this.userInfo.phone){
uni.navigateTo({
url:'/uni_modules/uni-login-page/pages/index/pwd-retrieve?phoneNumber='+ this.userInfo.phone +'&phoneArea=+86'
});
} else {
uni.showToast({
title: '请先登录',
icon: 'none'
});
}
},
checkPush(){ checkPush(){
// 手机端获取推送是否开启 // 手机端获取推送是否开启
//#ifdef APP-PLUS //#ifdef APP-PLUS
...@@ -112,7 +126,7 @@ ...@@ -112,7 +126,7 @@
requestAuthModes: [item.name], requestAuthModes: [item.name],
challenge: '123456', // 微信端挑战因子 challenge: '123456', // 微信端挑战因子
authContent: `请用${item.title}`, authContent: `请用${item.title}`,
success(res) { success:(res)=> {
if(res.errCode == 0){ if(res.errCode == 0){
/** /**
* 验证成功后开启自己的业务逻辑 * 验证成功后开启自己的业务逻辑
...@@ -131,7 +145,7 @@ ...@@ -131,7 +145,7 @@
icon: 'none' icon: 'none'
}); });
}, },
fail(err) { fail:(err)=> {
uni.showToast({ uni.showToast({
title: `认证失败:${err.errCode}`, title: `认证失败:${err.errCode}`,
icon: 'none' icon: 'none'
...@@ -149,14 +163,14 @@ ...@@ -149,14 +163,14 @@
return resolve(res); return resolve(res);
} }
uni.showToast({ uni.showToast({
title: `设备未开启${item.title}`, title: `设备未开启${mode.title}`,
icon: 'none' icon: 'none'
}); });
reject(res); reject(res);
}, },
fail: (err) => { fail: (err) => {
uni.showToast({ uni.showToast({
title: `${item.title}失败`, title: `${mode.title}失败`,
icon: 'none' icon: 'none'
}); });
reject(err); reject(err);
...@@ -165,13 +179,23 @@ ...@@ -165,13 +179,23 @@
}) })
}, },
clickLogout() { clickLogout() {
this.$refs.dialog.open();
}, uni.showModal({
confirm(){ title: '提示',
this.logout(); content: '是否退出登录',
uni.navigateBack(); cancelText: '取消',
confirmText: '确定',
success: res => {
if(res.confirm){
this.logout();
uni.navigateBack();
}
},
fail: () => {},
complete: () => {}
});
}, },
itemClick(item) { itemClick(item) {
if (!item.to && item.event) { if (!item.to && item.event) {
this[item.event](item); this[item.event](item);
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<uni-list-item> <uni-list-item>
<template v-slot:body> <template v-slot:body>
<view class="avatar-box"> <view class="avatar-box">
<image class="avatar-img" :src="userInfo.avatar || '/static/logo.png'" @click="chooseImg" mode="aspectFill"></image> <image class="avatar-img" :src="userInfo.avatar || '/static/uni-center/logo.png'" @click="chooseImg" mode="aspectFill"></image>
</view> </view>
</template> </template>
</uni-list-item> </uni-list-item>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
:to="item.to" :to="item.to"
@click="ucenterListClick(item)" @click="ucenterListClick(item)"
></uni-list-item> ></uni-list-item>
</uni-list> </uni-list>
</view> </view>
</template> </template>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
export default { export default {
data() { data() {
return { return {
avatarUrl: '/static/logo.png', avatarUrl: '/static/uni-center/logo.png',
gridList: [{ gridList: [{
"text": "文字1", "text": "文字1",
"icon": "chat" "icon": "chat"
......
...@@ -204,8 +204,6 @@ ...@@ -204,8 +204,6 @@
</script> </script>
<style> <style>
@import '/common/uni.css';
page { page {
background-color: #efeff4; background-color: #efeff4;
} }
...@@ -227,4 +225,148 @@ ...@@ -227,4 +225,148 @@
right: -4px; right: -4px;
font-size: 12px; font-size: 12px;
} }
/* 上传 */
.uni-uploader {
flex: 1;
flex-direction: column;
}
.uni-uploader-head {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.uni-uploader-info {
color: #B2B2B2;
}
.uni-uploader-body {
margin-top: 16rpx;
}
.uni-uploader__files {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.uni-uploader__file {
margin: 10rpx;
width: 210rpx;
height: 210rpx;
}
.uni-uploader__img {
display: block;
width: 210rpx;
height: 210rpx;
}
.uni-uploader__input-box {
position: relative;
margin:10rpx;
width: 208rpx;
height: 208rpx;
border: 2rpx solid #D9D9D9;
}
.uni-uploader__input-box:before,
.uni-uploader__input-box:after {
content: " ";
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
background-color: #D9D9D9;
}
.uni-uploader__input-box:before {
width: 4rpx;
height: 79rpx;
}
.uni-uploader__input-box:after {
width: 79rpx;
height: 4rpx;
}
.uni-uploader__input-box:active {
border-color: #999999;
}
.uni-uploader__input-box:active:before,
.uni-uploader__input-box:active:after {
background-color: #999999;
}
.uni-uploader__input {
position: absolute;
z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
/*问题反馈*/
.feedback-title {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 20rpx;
color: #8f8f94;
font-size: 28rpx;
}
.feedback-star-view.feedback-title {
justify-content: flex-start;
margin: 0;
}
.feedback-quick {
position: relative;
padding-right: 40rpx;
}
.feedback-quick:after {
font-family: uniicons;
font-size: 40rpx;
content: '\e581';
position: absolute;
right: 0;
top: 50%;
color: #bbb;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.feedback-body {
background: #fff;
}
.feedback-textare {
height: 200rpx;
font-size: 34rpx;
line-height: 50rpx;
width: 100%;
box-sizing: border-box;
padding: 20rpx 30rpx 0;
}
.feedback-input {
font-size: 34rpx;
height: 50rpx;
min-height: 50rpx;
padding: 15rpx 20rpx;
line-height: 50rpx;
}
.feedback-uploader {
padding: 22rpx 20rpx;
}
.feedback-star {
font-family: uniicons;
font-size: 40rpx;
margin-left: 6rpx;
}
.feedback-star-view {
margin-left: 20rpx;
}
.feedback-star:after {
content: '\e408';
}
.feedback-star.active {
color: #FFB400;
}
.feedback-star.active:after {
content: '\e438';
}
.feedback-submit {
background: #007AFF;
color: #FFFFFF;
margin: 20rpx;
}
</style> </style>
<template>
<view class="page">
<view class="feedback-title">
<text>问题和意见</text>
<text class="feedback-quick" @tap="chooseMsg">快速键入</text>
</view>
<view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.content" class="feedback-textare"></textarea></view>
<view class="feedback-title"><text>图片(选填,提供问题截图,总大小10M以下)</text></view>
<view class="feedback-body feedback-uploader">
<view class="uni-uploader">
<view class="uni-uploader-head">
<view class="uni-uploader-title">点击预览图片</view>
<view class="uni-uploader-info">{{ imageList.length }}/5</view>
</view>
<view class="uni-uploader-body">
<view class="uni-uploader__files">
<block v-for="(image, index) in imageList" :key="index">
<view class="uni-uploader__file" style="position: relative;">
<image class="uni-uploader__img" :src="image" @tap="previewImage(index)"></image>
<view class="close-view" @click="close(index)">x</view>
</view>
</block>
<view class="uni-uploader__input-box" v-show="imageList.length < 5"><view class="uni-uploader__input" @tap="chooseImg"></view></view>
</view>
</view>
</view>
</view>
<view class="feedback-title"><text>QQ/邮箱</text></view>
<view class="feedback-body"><input class="feedback-input" v-model="sendDate.contact" placeholder="(选填,方便我们联系你 )" /></view>
<view class="feedback-title feedback-star-view">
<text>应用评分</text>
<view class="feedback-star-view">
<uni-rate v-model="sendDate.score" color="#bbb"></uni-rate>
</view>
</view>
<button type="default" class="feedback-submit" @tap="send">提交</button>
<view class="feedback-title"><text>用户反馈的结果可在app打包后于DCloud开发者中心查看</text></view>
</view>
</template>
<script>
export default {
data() {
return {
msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视,丑哭了', '偶发性崩溃'],
stars: [1, 2, 3, 4, 5],
imageList: [],
sendDate: {
score: 0,
content: '',
contact: ''
}
};
},
onLoad() {
this.deviceInfo = {
appid: plus.runtime.appid,
imei: plus.device.imei, //设备标识
p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型,i表示iOS平台,a表示Android平台。
md: plus.device.model, //设备型号
app_version: plus.runtime.version,
plus_version: plus.runtime.innerVersion, //基座版本号
os: plus.os.version,
net: '' + plus.networkinfo.getCurrentType()
};
this.sendDate = Object.assign(this.deviceInfo, this.sendDate);
},
methods: {
/**
* 关闭图片
* @param {Object} e
*/
close(e) {
this.imageList.splice(e, 1);
},
/**
* 快速输入
*/
chooseMsg() {
uni.showActionSheet({
itemList: this.msgContents,
success: res => {
this.sendDate.content = this.msgContents[res.tapIndex];
}
});
},
/**
* 选择图片
*/
chooseImg() {
//选择图片
uni.chooseImage({
sourceType: ['camera', 'album'],
sizeType: 'compressed',
count: 5 - this.imageList.length,
success: res => {
this.imageList = this.imageList.concat(res.tempFilePaths);
}
});
},
/**
* 评分
* @param {Object} e
*/
chooseStar(e) {
//点击评星
this.sendDate.score = e;
},
/**
* 预览图片
* @param {Object} index
*/
previewImage(index) {
uni.previewImage({
urls: this.imageList,
current: this.imageList[index]
});
},
/**
* 提交
*/
send() {
//发送反馈
if (this.sendDate.content.length === 0) {
uni.showModal({
content: '请输入问题和意见',
showCancel: false
});
return;
}
uni.showLoading({
title: '上传中...'
});
let imgs = this.imageList.map((value, index) => {
return {
name: 'images' + index,
uri: value
};
});
// TODO 服务端限制上传文件一次最大不超过 2M, 图片一次最多不超过5张
this.request(this.sendDate, imgs)
.then(res => {
if (typeof res.data === 'string') {
res.data = JSON.parse(res.data);
}
if (res.statusCode === 200 && res.data && res.data.ret === 0) {
uni.showModal({
content: '反馈成功',
showCancel: false
});
this.imageList = [];
this.sendDate = Object.assign(this.deviceInfo, {
score: 0,
content: '',
contact: ''
});
} else if (res.statusCode !== 200) {
uni.showModal({
content: '反馈失败,错误码为:' + res.statusCode,
showCancel: false
});
} else {
uni.showModal({
content: '反馈失败',
showCancel: false
});
}
})
.catch(err => {
console.log(err);
});
},
/**
* 发送请求到后台
*/
request(sendDate, imgs) {
return new Promise((resolve, reject) => {
let fromData = {
url: 'https://service.dcloud.net.cn/feedback',
success: res => {
resolve(res);
},
fail: res => {
reject(res);
},
complete() {
uni.hideLoading();
}
};
if (imgs.length > 0) {
fromData.files = imgs;
fromData.formData = sendDate;
uni.uploadFile(fromData);
} else {
fromData.data = sendDate;
fromData.method = 'POST';
uni.request(fromData);
}
});
}
}
};
</script>
<style>
/* #ifndef APP-NVUE */
page {
background-color: #efeff4;
}
/* #endif */
.input-view {
font-size: 28rpx;
}
.close-view {
text-align: center;
line-height: 14px;
height: 16px;
width: 16px;
border-radius: 50%;
background: #ff5053;
color: #ffffff;
position: absolute;
top: -6px;
right: -4px;
font-size: 12px;
}
</style>
// 上次启动时的用户信息
let userHistory = uni.getStorageSync('userInfo') || null;
let state = {
/**
* 是否需要强制登录
*/
forcedLogin: false,
hasLogin: Boolean(userHistory),
info: userHistory
},
getters = {
info(state) {
return state.info;
},
hasLogin(state){
return state.hasLogin;
}
},
mutations = {
login(state, info) {
state.info = info;
state.hasLogin = true;
uni.setStorageSync('userInfo', info);
},
logout(state) {
state.info = null;
state.hasLogin = false;
uni.setStorageSync('userInfo', null);
}
},
actions = {
}
export default {
state,
getters,
mutations,
actions
}
// 在本文件中可配置云数据库初始化,数据格式见:https://uniapp.dcloud.io/uniCloud/cf-database?id=db_init // 在本文件中可配置云数据库初始化,数据格式见:https://uniapp.dcloud.io/uniCloud/cf-database?id=db_init
// 编写完毕后对本文件点右键,可按配置规则创建表和添加数据 // 编写完毕后对本文件点右键,可按配置规则创建表和添加数据
{ {
"opendb-news-articles-detail": { "opendb-banner": {
"data": [ "data": [{
{ "bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"article_status": 1, "open_url": "https://www.dcloud.io/",
"author_avatar": "https://pic.36krcnd.com/avatar/201804/11034847/2w2w8ix0d1x98939.jpg!120", "title": "内容 A",
"author_name": "土土土槽", "sort": 0,
"category_id": "223", "category_id": "grid",
"comment_count": 1204, "status": true,
"comment_status": 0, "description": "备注"
"content": "<p>编者按:本文来自微信公众号<a href=\"https://mp.weixin.qq.com/s/ahOP6VxdxWfxG70KBgh2JA\">“土土土槽”(ID:xtutux6)</a>,作者:林安,36氪经授权发布。</p><p>大家好,我是林安。今天想跟你们聊一聊自由职业者的五险一金问题。</p><p>因为这个是想做自由职业的朋友问我最多的问题,也是自由职业初期必须思考的问题,所以今天就展开给大家讲讲。</p><p>在成为自由职业者以前,我没有任何一次裸辞经历,基本都是找好下家才跳槽,所以你应该看得出来,我不是一名“冲动型”选手,做任何决定前一定会三思后行。</p><p>所以产生了辞职想法后,我着手准备的第一件事,就是“搞清楚社保和公积金怎么交”,“断交或不交会对我的生活产生哪些影响”。</p><p>这些也是想做自由职业的朋友问我最多的问题。下面我就结合自己的实际情况,分4部分给大家讲讲。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_823646324f724d8b9dae3ae9d06a7d1a_img_000\" data-img-size-val=\"720,480\"/></p><h2 >&nbsp;一、自由职业后,还有必要交五险一金吗?</h2><p>其实五险一金中最重要的是“养老险”和“医疗险”。</p><p>一般社保交满15年后养老保险终身有效,养老金也是“多缴多得、长缴多得”;</p><p>社保交满25年后,医疗保险终身有效,看病时医保可以报销一部分费用。</p><p>关于“五险一金”交或不交,要根据不同人的不同情况来看。</p><p>如果你在户口所在地的城市工作,且在本地已有房,那么交不交、交多少完全看你需求。</p><p>如果你已经购买了性价比更高的商业保险,并且没有在本地再买房的打算,那你可以不交五险一金。</p><p>当然,如果你还是想买一份国民保险,图个安心,或者害怕以后办理一些事情被社保拖住(毕竟不同城市的政策也是经常变动),也可以自己在当地的社保局缴纳。</p><p>但如果你是外地户口且没有当地房产,将来又想在所在地买房落户,那我建议你最好继续缴纳五险,因为社保和大部分城市的落户买房政策挂钩,交不满年限,就无法买房落户。</p><p>而且五险中除了养老保险可以断交之外,其他一旦停交则不能补缴,需要重新开始再次缴纳。</p><p>我当初就是考虑到应该会在上海定居,才决定继续在上海缴纳五险的。</p><p>至于公积金,如果你近1年内没有买房需求,可以暂时不缴,等到你决定买房了,再开始重新缴纳也不迟。</p><p>停缴的公积金账户会暂时封存,等你重新交的时候,再去公积金中心解封就可以了。</p><p>但如果你没有在所在地定居的打算,比如很多朋友想年轻的时候在一线城市工作生活,等年纪大了或结婚成家了再退居二三线城市工作,这种情况其实可以不在当地缴纳社保,在户籍所在地缴纳或者给自己买一份商业保险也是OK的。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_c46a9fc0cc444f118738fe09727de874_img_000\" data-img-size-val=\"720,480\"/></p><h2 >&nbsp;二、不交五险一金会有什么影响?</h2><p>公积金断交只对已经存在公积金贷款者或者准备申请公积金贷款者存在影响,其他则无直接影响。</p><p>如果你还有房贷要还却断交公积金,那么剩余的贷款就会按照商业利率来计算了。</p><p>社保断交的影响主要有2点:</p><h3 >1.影响医疗报销和报销上限</h3><p>很多城市社保只要断缴一个月,第二月就不能继续使用了。</p><p>而且有的城市政策是连续缴纳社保的时间越久,报销上限就越高。这个具体看不同城市的政策,你们可以自行上网查一下。</p><h3 >2.影响买房买车、积分落户、孩子上学</h3><p>部分热门城市要求社保交够一定年份,才可以买房买车。</p><p>还有的一线城市会把社保缴纳的额度和积分落户、孩子上学捆绑在一起,比如北上广深。</p><p>我所在的上海,就是连续缴纳5年社保才有资格买房买车,交满7年,才有资格申请落户。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_6f15c618ffda491bba453443419de4b8_img_000\" data-img-size-val=\"720,521\"/></p><h2 >&nbsp;三、自由职业者如何缴纳五险一金?</h2><p>那么自由职业者应该如何缴纳五险一金呢?常见的方式有4种。</p><h3 >1.自己去社保局和公积金中心以灵活就业的方式缴纳</h3><p>这种只适合本地户籍的人,社保部分也只能缴纳养老保险和医疗保险。</p><p>你们可以根据自身的需求和具体状况,自由选择社保和公积金的缴费级别。</p><h3 >2.如果你是外地户籍,可以找第三方机构代缴</h3><p>通过这种方式缴纳的社保一般会像上班时一样把五险交齐,不同的是以前公司替员工缴纳的部分也要你自己承担。</p><p>现在网上类似的代理机构挺多的,支付宝、淘宝和小程序上有很多,一般每个月会收几十块的代理费。</p><p>记得一定要找正规、有名的机构,每次交完以后,也要登陆自己的账号查询是否有按时缴纳。</p><h3 >3.挂靠在朋友公司下缴纳</h3><p>如果你有朋友本身就是开公司的,可以把你的社保挂靠在他们公司下缴纳,这种比找机构省点钱,但是公司缴纳的部分金额也完全是你自己承担的。</p><h3 >4.开一家公司自行缴纳</h3><p>这种比较适合有稳定客户且业务量比较大的自由职业者,公司的用途除了可以帮你缴纳五险一金外,还可以给客户开正规发票。</p><p>但开一家公司又会面临很多税务上的问题,不太建议自由职业新人或收入不稳定的自由职业者开公司。具体原因我和自由税务师骆盈合开的课程里有详细讲到(传送门:<a href=\"http://mp.weixin.qq.com/s?__biz=MzA4MTYxNzMzNQ==&mid=2650502058&idx=1&sn=35885aa82b5555507197cf3b073daf1d&chksm=879d9b72b0ea12646260778c2b4720883703d9ecc29bc9363166c3a63ffcc2cee3064f8efe66&scene=21#wechat_redirect\">不懂一点税务知识,你“敢”成为自由职业者吗?</a>)。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_68e061036408488fbbe2bb8b6295d703_img_000\" data-img-size-val=\"720,480\"/></p><p>以上,就是不同类型自由职业者交五险一金的方式了。我目前的情况是挂靠在朋友公司下缴纳五险,公积金暂时断交了,等到要买房的时候再重新开始交。</p><p>大家可以根据自己的实际情况选择交或不交,以及缴纳方式和数额。</p>", },
"cover": "https://img.36krcdn.com/20200410/v2_d748f06964014bafbd0e9cd9371de6d1_img_000?x-oss-process=image/resize,m_mfit,w_432,h_288/crop,w_432,h_288,g_center", {
"excerpt": "自由职业前,应该想清楚的问题。", "bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"is_essence": false, "open_url": "https://www.dcloud.io/",
"is_sticky": false, "title": "内容 B",
"last_comment_user_id": "", "sort": 0,
"last_modify_date": "2020-04-10 18:44:10", "category_id": "grid",
"last_modify_ip": "", "status": true,
"like_count": 4603, "description": "备注"
"publish_date": "2020-04-10 18:39:00", }, {
"publish_ip": "", "bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"title": "干货:自由职业者如何搞定五险一金?", "open_url": "https://www.dcloud.io/",
"user_id": 121321, "title": "内容 C",
"user_name": "未来汽车日报", "sort": 0,
"view_count": 32053 "category_id": "grid",
} "status": true,
], "description": "备注"
"schema": { }, {
"bsonType": "object", "bannerfile": "https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/094a9dc0-50c0-11eb-b680-7980c8a877b8.jpg",
"required": [ "open_url": "https://www.dcloud.io/",
"user_id", "title": "内容 D",
"title", "sort": 0,
"content", "category_id": "grid",
"article_status", "status": true,
"view_count", "description": "备注"
"like_count", }
"is_sticky", ]
"is_essence", },
"comment_status", "opendb-news-articles-detail": {
"comment_count", "data": [{
"mode" "article_status": 1,
], "author_avatar": "https://pic.36krcnd.com/avatar/201804/11034847/2w2w8ix0d1x98939.jpg!120",
"permission": { "author_name": "土土土槽",
"read": true, "category_id": "223",
"create": "auth.uid != null", "comment_count": 1204,
"update": "doc.uid == auth.uid", "comment_status": 0,
"delete": "doc.uid == auth.uid" "content": "<p>编者按:本文来自微信公众号<a href=\"https://mp.weixin.qq.com/s/ahOP6VxdxWfxG70KBgh2JA\">“土土土槽”(ID:xtutux6)</a>,作者:林安,36氪经授权发布。</p><p>大家好,我是林安。今天想跟你们聊一聊自由职业者的五险一金问题。</p><p>因为这个是想做自由职业的朋友问我最多的问题,也是自由职业初期必须思考的问题,所以今天就展开给大家讲讲。</p><p>在成为自由职业者以前,我没有任何一次裸辞经历,基本都是找好下家才跳槽,所以你应该看得出来,我不是一名“冲动型”选手,做任何决定前一定会三思后行。</p><p>所以产生了辞职想法后,我着手准备的第一件事,就是“搞清楚社保和公积金怎么交”,“断交或不交会对我的生活产生哪些影响”。</p><p>这些也是想做自由职业的朋友问我最多的问题。下面我就结合自己的实际情况,分4部分给大家讲讲。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_823646324f724d8b9dae3ae9d06a7d1a_img_000\" data-img-size-val=\"720,480\"/></p><h2 >&nbsp;一、自由职业后,还有必要交五险一金吗?</h2><p>其实五险一金中最重要的是“养老险”和“医疗险”。</p><p>一般社保交满15年后养老保险终身有效,养老金也是“多缴多得、长缴多得”;</p><p>社保交满25年后,医疗保险终身有效,看病时医保可以报销一部分费用。</p><p>关于“五险一金”交或不交,要根据不同人的不同情况来看。</p><p>如果你在户口所在地的城市工作,且在本地已有房,那么交不交、交多少完全看你需求。</p><p>如果你已经购买了性价比更高的商业保险,并且没有在本地再买房的打算,那你可以不交五险一金。</p><p>当然,如果你还是想买一份国民保险,图个安心,或者害怕以后办理一些事情被社保拖住(毕竟不同城市的政策也是经常变动),也可以自己在当地的社保局缴纳。</p><p>但如果你是外地户口且没有当地房产,将来又想在所在地买房落户,那我建议你最好继续缴纳五险,因为社保和大部分城市的落户买房政策挂钩,交不满年限,就无法买房落户。</p><p>而且五险中除了养老保险可以断交之外,其他一旦停交则不能补缴,需要重新开始再次缴纳。</p><p>我当初就是考虑到应该会在上海定居,才决定继续在上海缴纳五险的。</p><p>至于公积金,如果你近1年内没有买房需求,可以暂时不缴,等到你决定买房了,再开始重新缴纳也不迟。</p><p>停缴的公积金账户会暂时封存,等你重新交的时候,再去公积金中心解封就可以了。</p><p>但如果你没有在所在地定居的打算,比如很多朋友想年轻的时候在一线城市工作生活,等年纪大了或结婚成家了再退居二三线城市工作,这种情况其实可以不在当地缴纳社保,在户籍所在地缴纳或者给自己买一份商业保险也是OK的。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_c46a9fc0cc444f118738fe09727de874_img_000\" data-img-size-val=\"720,480\"/></p><h2 >&nbsp;二、不交五险一金会有什么影响?</h2><p>公积金断交只对已经存在公积金贷款者或者准备申请公积金贷款者存在影响,其他则无直接影响。</p><p>如果你还有房贷要还却断交公积金,那么剩余的贷款就会按照商业利率来计算了。</p><p>社保断交的影响主要有2点:</p><h3 >1.影响医疗报销和报销上限</h3><p>很多城市社保只要断缴一个月,第二月就不能继续使用了。</p><p>而且有的城市政策是连续缴纳社保的时间越久,报销上限就越高。这个具体看不同城市的政策,你们可以自行上网查一下。</p><h3 >2.影响买房买车、积分落户、孩子上学</h3><p>部分热门城市要求社保交够一定年份,才可以买房买车。</p><p>还有的一线城市会把社保缴纳的额度和积分落户、孩子上学捆绑在一起,比如北上广深。</p><p>我所在的上海,就是连续缴纳5年社保才有资格买房买车,交满7年,才有资格申请落户。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_6f15c618ffda491bba453443419de4b8_img_000\" data-img-size-val=\"720,521\"/></p><h2 >&nbsp;三、自由职业者如何缴纳五险一金?</h2><p>那么自由职业者应该如何缴纳五险一金呢?常见的方式有4种。</p><h3 >1.自己去社保局和公积金中心以灵活就业的方式缴纳</h3><p>这种只适合本地户籍的人,社保部分也只能缴纳养老保险和医疗保险。</p><p>你们可以根据自身的需求和具体状况,自由选择社保和公积金的缴费级别。</p><h3 >2.如果你是外地户籍,可以找第三方机构代缴</h3><p>通过这种方式缴纳的社保一般会像上班时一样把五险交齐,不同的是以前公司替员工缴纳的部分也要你自己承担。</p><p>现在网上类似的代理机构挺多的,支付宝、淘宝和小程序上有很多,一般每个月会收几十块的代理费。</p><p>记得一定要找正规、有名的机构,每次交完以后,也要登陆自己的账号查询是否有按时缴纳。</p><h3 >3.挂靠在朋友公司下缴纳</h3><p>如果你有朋友本身就是开公司的,可以把你的社保挂靠在他们公司下缴纳,这种比找机构省点钱,但是公司缴纳的部分金额也完全是你自己承担的。</p><h3 >4.开一家公司自行缴纳</h3><p>这种比较适合有稳定客户且业务量比较大的自由职业者,公司的用途除了可以帮你缴纳五险一金外,还可以给客户开正规发票。</p><p>但开一家公司又会面临很多税务上的问题,不太建议自由职业新人或收入不稳定的自由职业者开公司。具体原因我和自由税务师骆盈合开的课程里有详细讲到(传送门:<a href=\"http://mp.weixin.qq.com/s?__biz=MzA4MTYxNzMzNQ==&mid=2650502058&idx=1&sn=35885aa82b5555507197cf3b073daf1d&chksm=879d9b72b0ea12646260778c2b4720883703d9ecc29bc9363166c3a63ffcc2cee3064f8efe66&scene=21#wechat_redirect\">不懂一点税务知识,你“敢”成为自由职业者吗?</a>)。</p><p><img style=\"max-width:100%\" src=\"https://img.36krcdn.com/20200410/v2_68e061036408488fbbe2bb8b6295d703_img_000\" data-img-size-val=\"720,480\"/></p><p>以上,就是不同类型自由职业者交五险一金的方式了。我目前的情况是挂靠在朋友公司下缴纳五险,公积金暂时断交了,等到要买房的时候再重新开始交。</p><p>大家可以根据自己的实际情况选择交或不交,以及缴纳方式和数额。</p>",
}, "cover": "https://img.36krcdn.com/20200410/v2_d748f06964014bafbd0e9cd9371de6d1_img_000?x-oss-process=image/resize,m_mfit,w_432,h_288/crop,w_432,h_288,g_center",
"properties": { "excerpt": "自由职业前,应该想清楚的问题。",
"_id": { "is_essence": false,
"description": "存储文档 ID(用户 ID),系统自动生成" "is_sticky": false,
}, "last_comment_user_id": "",
"user_id": { "last_modify_date": "2020-04-10 18:44:10",
"bsonType": "string", "last_modify_ip": "",
"description": "文章作者ID, 参考`uni-id-users` 表" "like_count": 4603,
}, "publish_date": "2020-04-10 18:39:00",
"category_id": { "publish_ip": "",
"bsonType": "string", "title": "干货:自由职业者如何搞定五险一金?",
"description": "分类 id,参考`uni-news-categories`表" "user_id": 121321,
}, "user_name": "未来汽车日报",
"title": { "view_count": 32053
"bsonType": "string", }],
"description": "标题", "schema": {
"label": "标题" "bsonType": "object",
}, "required": [
"content": { "user_id",
"bsonType": "string", "title",
"description": "文章内容", "content",
"label": "文章内容" "article_status",
}, "view_count",
"excerpt": { "like_count",
"bsonType": "string", "is_sticky",
"description": "文章摘录", "is_essence",
"label": "摘要" "comment_status",
}, "comment_count",
"article_status": { "mode"
"bsonType": "int", ],
"minimum": 0, "permission": {
"maximum": 1, "read": true,
"description": "文章状态:0 草稿箱 1 已发布" "create": "auth.uid != null",
}, "update": "doc.uid == auth.uid",
"view_count": { "delete": "doc.uid == auth.uid"
"bsonType": "int", },
"description": "阅读数量", "properties": {
"permission": { "_id": {
"write": false "description": "存储文档 ID(用户 ID),系统自动生成"
} },
}, "user_id": {
"like_count": { "bsonType": "string",
"bsonType": "int", "description": "文章作者ID, 参考`uni-id-users` 表"
"description": "喜欢数、点赞数", },
"permission": { "category_id": {
"write": false "bsonType": "string",
} "description": "分类 id,参考`uni-news-categories`表"
}, },
"is_sticky": { "title": {
"bsonType": "bool", "bsonType": "string",
"description": "是否置顶", "description": "标题",
"permission": { "label": "标题"
"write": false },
} "content": {
}, "bsonType": "string",
"is_essence": { "description": "文章内容",
"bsonType": "bool", "label": "文章内容"
"description": "阅读加精", },
"permission": { "excerpt": {
"write": false "bsonType": "string",
} "description": "文章摘录",
}, "label": "摘要"
"comment_status": { },
"bsonType": "int", "article_status": {
"minimum": 0, "bsonType": "int",
"maximum": 1, "minimum": 0,
"description": "评论状态:0 关闭 1 开放" "maximum": 1,
}, "description": "文章状态:0 草稿箱 1 已发布"
"comment_count": { },
"bsonType": "int", "view_count": {
"description": "评论数量", "bsonType": "int",
"permission": { "description": "阅读数量",
"write": false "permission": {
} "write": false
}, }
"last_comment_user_id": { },
"bsonType": "string", "like_count": {
"description": "最后回复用户 id,参考`uni-id-users` 表" "bsonType": "int",
}, "description": "喜欢数、点赞数",
"avatar": { "permission": {
"bsonType": "string", "write": false
"description": "缩略图地址", }
"label": "封面大图" },
}, "is_sticky": {
"publish_date": { "bsonType": "bool",
"bsonType": "timestamp", "description": "是否置顶",
"description": "发表时间", "permission": {
"defaultValue": { "write": false
"$env": "now" }
} },
}, "is_essence": {
"publish_ip": { "bsonType": "bool",
"bsonType": "string", "description": "阅读加精",
"description": "发表时 IP 地址", "permission": {
"forceDefaultValue": { "write": false
"$env": "clientIP" }
} },
}, "comment_status": {
"last_modify_date": { "bsonType": "int",
"bsonType": "timestamp", "minimum": 0,
"description": "最后修改时间" "maximum": 1,
}, "description": "评论状态:0 关闭 1 开放"
"last_modify_ip": { },
"bsonType": "string", "comment_count": {
"description": "最后修改时 IP 地址" "bsonType": "int",
}, "description": "评论数量",
"mode": { "permission": {
"bsonType": "number", "write": false
"description": "排版显示模式" }
} },
} "last_comment_user_id": {
} "bsonType": "string",
} "description": "最后回复用户 id,参考`uni-id-users` 表"
} },
\ No newline at end of file "avatar": {
"bsonType": "string",
"description": "缩略图地址",
"label": "封面大图"
},
"publish_date": {
"bsonType": "timestamp",
"description": "发表时间",
"defaultValue": {
"$env": "now"
}
},
"publish_ip": {
"bsonType": "string",
"description": "发表时 IP 地址",
"forceDefaultValue": {
"$env": "clientIP"
}
},
"last_modify_date": {
"bsonType": "timestamp",
"description": "最后修改时间"
},
"last_modify_ip": {
"bsonType": "string",
"description": "最后修改时 IP 地址"
},
"mode": {
"bsonType": "number",
"description": "排版显示模式"
}
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册