Commit f857ef34 authored by 乐宝呗666's avatar 乐宝呗666

添加必填星号展示

parent a0bcb34d
......@@ -75,14 +75,10 @@ const routes = [
},
]
function getAbsolutePath () {
let path = location.pathname
return path.substring(0, path.lastIndexOf('/') + 1)
}
const router = new VueRouter({
routes: routes,
mode: "history",
base: getAbsolutePath()
base: process.env.BASE_URL
})
const whiteList =['/login','/success','/screen']
router.beforeEach((to, from, next) => {
......
......@@ -63,19 +63,10 @@ export default {
});
},
goDetail(item) {
if (item.id === this.currentUserId) {
// 修改页面
this.$router.push({
path: "/adminInfo",
query: { id: item.id, disabled: false },
});
} else {
// 详情页面
this.$router.push({
path: "/adminInfo",
query: { id: item.id, disabled: true },
});
}
this.$router.push({
path: "/adminInfo",
query: { id: item.id, disabled: item.id !== this.currentUserId },
});
},
},
};
......
......@@ -5,7 +5,7 @@
<van-tabs type="card" v-model="activeTab">
<van-tab title="观影互动">
<div class="commit-page">
<commit-tab @updateActive="updateActive" />
<commit-tab />
</div>
</van-tab>
<van-tab title="互动历史">
......@@ -32,18 +32,10 @@ export default {
data() {
return {
activeTab: 1,
form: {},
show: false,
fileList: [],
imgFileList: [],
};
},
mounted() {},
methods: {
updateActive(active) {
this.activeTab = active;
},
},
methods: {},
};
</script>
......
<template>
<div class="admin-detail-content">
<Header title="管理员详情" />
<van-form validate-first ref='form' @submit="onSubmit">
<van-form @submit="onSubmit">
<div class="input-box">
<van-field
required
label="管理员姓名"
:disabled="disabled"
v-model="form.userName"
......@@ -15,6 +16,7 @@
]"
/>
<van-field
required
label="手机号码"
:disabled="disabled"
v-model="form.phone"
......@@ -150,7 +152,6 @@ export default {
<style lang="scss" scoped>
.admin-detail-content {
padding: 50px 24px 0;
// height: calc(100% - 150px);
overflow-y: auto;
.input-box {
padding-bottom: 32px;
......@@ -194,6 +195,10 @@ export default {
width: 100%;
}
}
::v-deep .van-cell--required::before {
left: -10px;
color:#A4151D;
}
.van-field__control,
.van-cell__value {
color: #333;
......
......@@ -9,6 +9,7 @@
class="field-form-item"
readonly
clickable
required
name="boardName"
input-align="right"
:value="form.boardName"
......@@ -37,6 +38,7 @@
class="field-form-item"
readonly
clickable
required
name="studyTime"
input-align="right"
:value="form.studyTime || ''"
......@@ -57,6 +59,7 @@
/>
</van-popup>
<van-field
required
label="观影人数"
v-model="form.num"
placeholder="请输入观影人数"
......@@ -64,6 +67,7 @@
:rules="[{ pattern: /^[1-9]\d{0,9}$/, message: '请输入正确内容,最多10位数',trigger:'blur'}]"
/>
<van-field
required
label="管理员账号"
v-model="form.name"
placeholder="请输入管理员账号"
......@@ -71,6 +75,7 @@
:rules="[{ required: true }]"
/>
<van-field
required
type="password"
label="管理员密码"
v-model="form.password"
......@@ -141,6 +146,7 @@
</div>
<div class="field-content">
<van-field
required
class="field-textarea"
type="textarea"
v-model="form.content"
......@@ -207,20 +213,6 @@ export default {
this.form.boardId = this.boardList[index].id;
this.showBoard = false;
},
beforeVideo(file) {
let isOver = true
if(Array.isArray(file)){
isOver = file.every(item=>item <= 10*1024*1024)
}else{
isOver = file.size <= 10*1024*1024
}
if(!isOver){
this.$toast.fail("上传文件大小不能超过 10MB");
return false
}else{
return true
}
},
// 打开日历
onDisplay() {
this.show = true;
......@@ -328,6 +320,21 @@ export default {
console.log(err);
});
},
// 上传视频size限制
beforeVideo(file) {
let isOver = true
if(Array.isArray(file)){
isOver = file.every(item=>item <= 10*1024*1024)
}else{
isOver = file.size <= 10*1024*1024
}
if(!isOver){
this.$toast.fail("上传文件大小不能超过 10MB");
return false
}else{
return true
}
},
// 删除视频
async deleteVideo(file,detail){
this.form.videos.splice(detail.index,1)
......@@ -408,7 +415,6 @@ export default {
param.images = [...param.images, ...param.videos];
param.images = param.images.join(",");
delete param.videos;
console.log(param);
vm.$https(
{
url: "interaction/add",
......@@ -459,6 +465,32 @@ export default {
}
.field-content {
padding-bottom: 32px;
.upload-content {
.avatar-plus {
width: 48px;
height: 48px;
line-height: 48px;
text-align: center;
background-color: #f5f5f5;
border-radius: 1px;
font-size: 25px;
color: #999;
margin-bottom: 12px;
}
.tips {
img {
width: 12px;
height: 12px;
vertical-align: middle;
}
span {
margin-left: 4px;
color: #666;
font-size: 12px;
vertical-align: middle;
}
}
}
}
.input-box {
padding-bottom: 32px;
......@@ -472,16 +504,6 @@ export default {
display: none;
}
}
.calendar-icon {
.van-icon {
position: absolute;
width: 20px;
height: 20px;
right: 0;
bottom: 22px;
z-index: 2;
}
}
.commit-page-button {
position: fixed;
bottom: 50px;
......@@ -522,32 +544,10 @@ export default {
padding: 0;
}
}
.upload-content {
.avatar-plus {
width: 48px;
height: 48px;
line-height: 48px;
text-align: center;
background-color: #f5f5f5;
border-radius: 1px;
font-size: 25px;
color: #999;
margin-bottom: 12px;
}
.tips {
img {
width: 12px;
height: 12px;
vertical-align: middle;
}
span {
margin-left: 4px;
color: #666;
font-size: 12px;
vertical-align: middle;
}
}
::v-deep .van-cell--required::before {
left: -10px;
color:#A4151D;
}
}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -60,7 +60,7 @@
<div class="learn-title">展板音频</div>
<div class="learn-body">
<span
class="file-box"
class="file-box audio"
v-for="(s, i) in item.audioList"
:key="i"
>
......@@ -188,6 +188,9 @@ export default {
padding: 10px;
box-sizing: border-box;
}
.file-box.audio {
width: 100%;
}
img {
width: 32px;
height: auto;
......
......@@ -37,7 +37,6 @@
/>
</div>
<div class="admin-detail-button">
<!-- <van-button type="default" plain native-type="button" @click="onCancle">取消</van-button> -->
<van-button type="default" native-type="submit">提交</van-button>
</div>
</van-form>
......@@ -61,11 +60,6 @@ export default {
// 查询管理员信息
},
methods: {
onCancle() {
this.form = {
username: JSON.parse(sessionStorage.getItem("userInfo")).userName,
};
},
// 提交数据
onSubmit() {
if (this.form.password !== this.form.againPsd) {
......@@ -116,9 +110,6 @@ export default {
display: flex;
flex-direction: column;
box-sizing: border-box;
.edit-container {
}
.input-box {
padding-bottom: 32px;
.van-cell {
......
......@@ -33,7 +33,7 @@ export default {
finished: false,
pageNum: 1,
pageSize: 10,
flag: true,
flag: true, // 是否是第一次加载
list: [],
refreshing: false,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment