Commit 8f42f0fd authored by 黄奎's avatar 黄奎

页面修改

parent 74fc3448
...@@ -712,7 +712,6 @@ ...@@ -712,7 +712,6 @@
} }
}, },
created() { created() {
console.log(this.saveObj)
if (this.saveObj.tab) { if (this.saveObj.tab) {
this.tab = (this.saveObj.tab).toString(); this.tab = (this.saveObj.tab).toString();
} }
......
...@@ -1737,7 +1737,6 @@ ...@@ -1737,7 +1737,6 @@
}) })
}, },
studyabroadorderconfirmation(item) { //留学订单确认 studyabroadorderconfirmation(item) { //留学订单确认
console.log(item)
let that = this let that = this
this.$q.dialog({ this.$q.dialog({
title: '提示信息', title: '提示信息',
......
...@@ -230,7 +230,6 @@ ...@@ -230,7 +230,6 @@
CustomerId: this.customerObj.CustomerId CustomerId: this.customerObj.CustomerId
} }
GetCustomer(msg).then(res => { GetCustomer(msg).then(res => {
console.log(res,'数据');
if (res.Code == 1) { if (res.Code == 1) {
let tempData = res.Data; let tempData = res.Data;
this.objOption.CustomerId = tempData.CustomerId; this.objOption.CustomerId = tempData.CustomerId;
......
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
this.getEmployeeList(); this.getEmployeeList();
}, },
mounted() { mounted() {
console.log("this.saveObj",this.saveObj)
if (this.saveObj && this.saveObj.Id > 0) { if (this.saveObj && this.saveObj.Id > 0) {
this.objOption.Id = this.saveObj.Id; this.objOption.Id = this.saveObj.Id;
this.objOption.CreateBy = this.saveObj.CreateBy; this.objOption.CreateBy = this.saveObj.CreateBy;
......
...@@ -142,7 +142,6 @@ export default { ...@@ -142,7 +142,6 @@ export default {
e.TeacherId = e.Teacher_Id; e.TeacherId = e.Teacher_Id;
delete e.Teacher_Id; delete e.Teacher_Id;
}); });
console.log(this.dataList);
setFeedBack(this.dataList) setFeedBack(this.dataList)
.then((res) => { .then((res) => {
this.saveLoading = false; this.saveLoading = false;
...@@ -161,7 +160,6 @@ export default { ...@@ -161,7 +160,6 @@ export default {
}); });
}, },
uploadFile(files, index) { uploadFile(files, index) {
console.log(files, index, this.dataList);
let type = let type =
files.type.indexOf("video") != -1 || files.type.indexOf("image") != -1; files.type.indexOf("video") != -1 || files.type.indexOf("image") != -1;
if (type) { if (type) {
......
...@@ -239,8 +239,7 @@ ...@@ -239,8 +239,7 @@
</div> </div>
<div style="display: flex;align-items: center;margin-left: 10px;"> <div style="display: flex;align-items: center;margin-left: 10px;">
<span>¥:</span> <span>¥:</span>
<span class="sjbox_l_t_x" style="width: 200px" <span class="sjbox_l_t_x" style="width: 200px" :class="[name==1?'':'color_bt']">{{GetDetail.Money}}</span>
:class="[name==1?'':'color_bt']">{{GetDetail.Money}}</span>
</div> </div>
</div> </div>
<div class="sjbox_l_t" style="margin-top: 30px;"> <div class="sjbox_l_t" style="margin-top: 30px;">
...@@ -249,7 +248,8 @@ ...@@ -249,7 +248,8 @@
</div> </div>
</div> </div>
<div style="display: flex;flex-direction: column;align-items: center;width: 20px;line-height: 17px;" v-if="name==1"> <div style="display: flex;flex-direction: column;align-items: center;width: 20px;line-height: 17px;"
v-if="name==1">
<div></div> <div></div>
<div></div> <div></div>
<div></div> <div></div>
...@@ -260,7 +260,8 @@ ...@@ -260,7 +260,8 @@
<div></div> <div></div>
<div></div> <div></div>
</div> </div>
<div style="display: flex;flex-direction: column;align-items: center;width: 20px;line-height: 17px;" v-if="name==2"> <div style="display: flex;flex-direction: column;align-items: center;width: 20px;line-height: 17px;"
v-if="name==2">
<div></div> <div></div>
<div></div> <div></div>
<div></div> <div></div>
...@@ -311,9 +312,22 @@ ...@@ -311,9 +312,22 @@
currentMoney: 0, currentMoney: 0,
benMoney: 0, benMoney: 0,
GetDetail: {}, GetDetail: {},
AuditSteps: [{ Id: 1, Name: '单位盖章' }, { Id: 2, Name: '出纳' }, { Id: 3, Name: '交款方式' }, { Id: 4, Name: '开票人' },], AuditSteps: [{
Id: 1,
Name: '单位盖章'
}, {
Id: 2,
Name: '出纳'
}, {
Id: 3,
Name: '交款方式'
}, {
Id: 4,
Name: '开票人'
}, ],
} }
}, created() { },
created() {
let date = new Date(), let date = new Date(),
y = date.getFullYear(), y = date.getFullYear(),
m = date.getMonth() < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1, m = date.getMonth() < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1,
...@@ -322,7 +336,8 @@ ...@@ -322,7 +336,8 @@
min = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(), min = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(),
s = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); s = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
this.printTime = y + '' + m + '' + d + ' ' + h + ':' + min + ':' + s; this.printTime = y + '' + m + '' + d + ' ' + h + ':' + min + ':' + s;
}, methods: { },
methods: {
sendMsg() { sendMsg() {
this.$emit('helloPP', '1') this.$emit('helloPP', '1')
}, },
...@@ -341,21 +356,22 @@ ...@@ -341,21 +356,22 @@
Financial_post_GetDetail(id) { //获取单据详情 Financial_post_GetDetail(id) { //获取单据详情
if (!id) return; if (!id) return;
this.loading = true; this.loading = true;
getReceiptInfoForFinanceId({ FinanceId: id }).then(res => { getReceiptInfoForFinanceId({
FinanceId: id
}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.loading = false; this.loading = false;
let data = res.Data; let data = res.Data;
data.ChinesePayMoney = this.$commonUtils.changeMoneyToChinese(data.Money) data.ChinesePayMoney = this.$commonUtils.changeMoneyToChinese(data.Money)
data.Money = this.$commonUtils.addCommas(Math.round(data.Money * 100) / 100) data.Money = this.$commonUtils.addCommas(Math.round(data.Money * 100) / 100)
this.GetDetail = data; this.GetDetail = data;
console.log(this.GetDetail)
this.$set(this.$data, "GetDetail", data); this.$set(this.$data, "GetDetail", data);
} }
}) })
}, },
}, mounted() { },
mounted() {
const myDate = new Date(); const myDate = new Date();
let yaer = myDate.getFullYear(); //获取完整的年份(4位,1970-????) let yaer = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
let month = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月) let month = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
...@@ -365,7 +381,8 @@ ...@@ -365,7 +381,8 @@
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.EmployeeId = userInfo.EmployeeId; this.EmployeeId = userInfo.EmployeeId;
this.Financial_post_GetDetail(this.ID); this.Financial_post_GetDetail(this.ID);
}, watch: { // 监听参数变化 },
watch: { // 监听参数变化
ID: { ID: {
handler: function (val, oldVal) { handler: function (val, oldVal) {
......
...@@ -314,7 +314,6 @@ ...@@ -314,7 +314,6 @@
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.imgcode.src=this.imgUrl; this.$refs.imgcode.src=this.imgUrl;
}) })
console.log(this.imgUrl)
tipLoadding.hide(); tipLoadding.hide();
} else { } else {
tipLoadding.hide(); tipLoadding.hide();
......
...@@ -71,9 +71,11 @@ ...@@ -71,9 +71,11 @@
<el-table-column prop="ContributeType" label="投稿类型"> </el-table-column> <el-table-column prop="ContributeType" label="投稿类型"> </el-table-column>
<el-table-column width='80' prop="ContributeId" label="投稿编码"> <el-table-column width='80' prop="ContributeId" label="投稿编码">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="cursor: pointer;text-decoration: underline;" @click="showXQ(scope.row.ContributeId)">{{scope.row.ContributeId}}</div> <div style="cursor: pointer;text-decoration: underline;" @click="showXQ(scope.row.ContributeId)">
{{scope.row.ContributeId}}</div>
</template> </template>
</el-table-column> <el-table-column width='250' prop="ContributeTitle" label="投稿标题"> </el-table-column> </el-table-column>
<el-table-column width='250' prop="ContributeTitle" label="投稿标题"> </el-table-column>
<el-table-column prop="CommissionMoney" label="提成金额"> </el-table-column> <el-table-column prop="CommissionMoney" label="提成金额"> </el-table-column>
<el-table-column width='90' prop="Periods" label="期数"> </el-table-column> <el-table-column width='90' prop="Periods" label="期数"> </el-table-column>
<el-table-column prop="Remark" width='160' label="备注"> </el-table-column> <el-table-column prop="Remark" width='160' label="备注"> </el-table-column>
...@@ -103,7 +105,9 @@ ...@@ -103,7 +105,9 @@
title: "用户提成明细" title: "用户提成明细"
}, },
props: {}, props: {},
components: {contributionXQ}, components: {
contributionXQ
},
data() { data() {
return { return {
loading: false, loading: false,
...@@ -111,7 +115,7 @@ ...@@ -111,7 +115,7 @@
msg: { msg: {
PeriodId: 0, PeriodId: 0,
TeacherId: 0, TeacherId: 0,
TeacherIds:'' TeacherIds: ''
}, },
pageCount: 0, pageCount: 0,
persistent: false, persistent: false,
...@@ -123,11 +127,11 @@ ...@@ -123,11 +127,11 @@
allClassList: [], allClassList: [],
TeacherList: [], TeacherList: [],
allTeacherList: [], allTeacherList: [],
ContributeId:0, ContributeId: 0,
isDetails:false, isDetails: false,
} }
}, },
created() { }, created() {},
mounted() { mounted() {
if (this.$route.query && this.$route.query.userId) { if (this.$route.query && this.$route.query.userId) {
...@@ -140,7 +144,6 @@ ...@@ -140,7 +144,6 @@
this.msg.TeacherIds = this.$route.query.TeacherIds this.msg.TeacherIds = this.$route.query.TeacherIds
} }
this.getList() this.getList()
// this.setClass()
this.GetTeacherList() this.GetTeacherList()
}, },
methods: { methods: {
...@@ -148,14 +151,12 @@ ...@@ -148,14 +151,12 @@
getList() { getList() {
if (this.msg) if (this.msg)
this.loading = true; this.loading = true;
getTeaConCommissionUserDetailList(this.msg).then(res => { getTeaConCommissionUserDetailList(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.loading = false; this.loading = false;
this.tableData = res.Data this.tableData = res.Data
if (this.tableData.length > 0) { if (this.tableData.length > 0) {
this.getAskfor() this.getAskfor()
} }
} }
}) })
...@@ -171,35 +172,31 @@ ...@@ -171,35 +172,31 @@
}; };
}) })
this.tableData.push(obj) this.tableData.push(obj)
}, },
accAdd(arg1, arg2) { //js 加法精确计算 accAdd(arg1, arg2) { //js 加法精确计算
var r1, r2, m; var r1, r2, m;
try { try {
r1 = arg1.toString().split(".")[1].length; r1 = arg1.toString().split(".")[1].length;
} catch (e) { } catch (e) {
r1 = 0; r1 = 0;
} }
try { try {
r2 = arg2.toString().split(".")[1].length; r2 = arg2.toString().split(".")[1].length;
} catch (e) { } catch (e) {
r2 = 0; r2 = 0;
} }
m = Math.pow(10, Math.max(r1, r2)); m = Math.pow(10, Math.max(r1, r2));
return (arg1 * m + arg2 * m) / m; return (arg1 * m + arg2 * m) / m;
}, },
//获取教师下拉 //获取教师下拉
GetTeacherList() { GetTeacherList() {
getTeacherDropDownList({}).then(res => { getTeacherDropDownList({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
var jsonData = res.Data; var jsonData = res.Data;
jsonData.unshift({ TeacherName: '不限', TId: 0 }) jsonData.unshift({
// this.allTeacherList = JSON.parse(JSON.stringify(jsonData));; TeacherName: '不限',
TId: 0
})
this.TeacherList = JSON.parse(JSON.stringify(jsonData)); this.TeacherList = JSON.parse(JSON.stringify(jsonData));
} }
}) })
...@@ -222,7 +219,6 @@ ...@@ -222,7 +219,6 @@
}, },
//筛选老师 //筛选老师
filterFn(val, update) { filterFn(val, update) {
console.log(val)
update(() => { update(() => {
if (val === '') { if (val === '') {
this.TeacherList = JSON.parse(JSON.stringify(this.allTeacherList)) this.TeacherList = JSON.parse(JSON.stringify(this.allTeacherList))
...@@ -233,18 +229,13 @@ ...@@ -233,18 +229,13 @@
this.$forceUpdate(); this.$forceUpdate();
}) })
}, },
goreturn() { goreturn() {
this.$router.go(-1); this.$router.go(-1);
}, },
showXQ(ContributeId){//弹出显示详情 showXQ(ContributeId) { //弹出显示详情
this.ContributeId= ContributeId; this.ContributeId = ContributeId;
this.isDetails = true this.isDetails = true
} }
}, },
} }
</script> </script>
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
} }
.userCommissionDetails .border-bottom { .userCommissionDetails .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px; padding-bottom: 5px;
margin-bottom: 5px; margin-bottom: 5px;
} }
...@@ -83,8 +82,6 @@ ...@@ -83,8 +82,6 @@
<div v-if="scope.row.OrderId" style="cursor: pointer;text-decoration: underline;" @click="goUrlorderList('/sale/orderStatistics',scope.row)"> <div v-if="scope.row.OrderId" style="cursor: pointer;text-decoration: underline;" @click="goUrlorderList('/sale/orderStatistics',scope.row)">
{{scope.row.OrderId}} {{scope.row.OrderId}}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="CommissionMoney" label="订单提成"></el-table-column> <el-table-column prop="CommissionMoney" label="订单提成"></el-table-column>
...@@ -156,7 +153,6 @@ ...@@ -156,7 +153,6 @@
if (this.$route.query && this.$route.query.OrderId) { if (this.$route.query && this.$route.query.OrderId) {
this.msg.OrderId = this.$route.query.OrderId this.msg.OrderId = this.$route.query.OrderId
} }
console.log( this.msg.PeriodId)
this.getList() this.getList()
this.getStudyAbroad() this.getStudyAbroad()
}, },
...@@ -318,6 +314,5 @@ ...@@ -318,6 +314,5 @@
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
\ No newline at end of file
...@@ -223,7 +223,6 @@ ...@@ -223,7 +223,6 @@
}, },
//选择图片 //选择图片
PageSelect(item) { PageSelect(item) {
console.log(item,'item');
if(this.type!=1){//单选 if(this.type!=1){//单选
this.emitmsg = []; this.emitmsg = [];
this.emitmsg.push(item) this.emitmsg.push(item)
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
<q-img v-else :src="imgPath" style="width: 110px;height: 110px;border-radius: 6px;display: flex;"> <q-img v-else :src="imgPath" style="width: 110px;height: 110px;border-radius: 6px;display: flex;">
</q-img> </q-img>
</el-upload> </el-upload>
<q-img v-else :src="imgPath" style="width: 110px;height: 110px;border-radius: 6px;display: flex;" v-if="ismodify"></q-img> <q-img v-else :src="imgPath" style="width: 110px;height: 110px;border-radius: 6px;display: flex;"
v-if="ismodify"></q-img>
<!-- <el-upload class="avatar-uploader materialupload" action="" :before-upload="uploadFile" <!-- <el-upload class="avatar-uploader materialupload" action="" :before-upload="uploadFile"
accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp" :show-file-list="false"> accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp" :show-file-list="false">
<i class="el-icon-plus avatar-uploader-icon" style="font-size: 30px;" v-if="addMsg.Path==''"></i> <i class="el-icon-plus avatar-uploader-icon" style="font-size: 30px;" v-if="addMsg.Path==''"></i>
...@@ -79,7 +80,8 @@ ...@@ -79,7 +80,8 @@
</span> </span>
</q-circular-progress> </q-circular-progress>
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<el-upload class="avatar-uploader " action="" :before-upload="uploadFile" :show-file-list="false" v-if="ismodify==false"> <el-upload class="avatar-uploader " action="" :before-upload="uploadFile" :show-file-list="false"
v-if="ismodify==false">
<q-btn color="accent" size="sm" class="q-mr-md" icon="cloud_upload" label="上传" <q-btn color="accent" size="sm" class="q-mr-md" icon="cloud_upload" label="上传"
@click='stopPlayVoice()'> @click='stopPlayVoice()'>
</q-btn> </q-btn>
...@@ -114,11 +116,13 @@ ...@@ -114,11 +116,13 @@
v-model="addMsg.PlatformType" @input="$forceUpdate()" ref="Id" :options="platTypeList" label="平台类型" v-model="addMsg.PlatformType" @input="$forceUpdate()" ref="Id" :options="platTypeList" label="平台类型"
:dense="false" emit-value map-options /> --> :dense="false" emit-value map-options /> -->
<q-input clearable filled v-model="addMsg.MediaName" placeholder="请输入视频名称" class="q-mt-lg" maxlength="20" /> <q-input clearable filled v-model="addMsg.MediaName" placeholder="请输入视频名称" class="q-mt-lg" maxlength="20" />
<q-input clearable filled v-model="addMsg.Description" placeholder="请输入视频介绍" class="q-mt-lg" type="textarea" maxlength="300" counter/> <q-input clearable filled v-model="addMsg.Description" placeholder="请输入视频介绍" class="q-mt-lg" type="textarea"
maxlength="300" counter />
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<div style="width:80px">视频封面图:</div> <div style="width:80px">视频封面图:</div>
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<div style="width:100px;height:100px;border:1px solid #d1d1d1;text-align:center;line-height:100px;" @click="getImgChoice=true"> <div style="width:100px;height:100px;border:1px solid #d1d1d1;text-align:center;line-height:100px;"
@click="getImgChoice=true">
<i class="el-icon-plus avatar-uploader-icon" style="font-size: 30px;" <i class="el-icon-plus avatar-uploader-icon" style="font-size: 30px;"
v-if="addMsg.VideoWXImage==''"></i> v-if="addMsg.VideoWXImage==''"></i>
<q-img v-else :src="addMsg.VideoWXImage" style="width: 100%;height: 100%;"> <q-img v-else :src="addMsg.VideoWXImage" style="width: 100%;height: 100%;">
...@@ -142,7 +146,8 @@ ...@@ -142,7 +146,8 @@
<source :src="addMsg.Path" type="video/mp4" /> <source :src="addMsg.Path" type="video/mp4" />
</video> </video>
<div style="margin-top: 15px;"> <div style="margin-top: 15px;">
<el-upload class="avatar-uploader " action="" :before-upload="uploadFile" :show-file-list="false" v-if="ismodify==false"> <el-upload class="avatar-uploader " action="" :before-upload="uploadFile" :show-file-list="false"
v-if="ismodify==false">
<q-btn color="accent" size="sm" class="q-mr-md" icon="cloud_upload" label="上传"> <q-btn color="accent" size="sm" class="q-mr-md" icon="cloud_upload" label="上传">
</q-btn> </q-btn>
</el-upload> </el-upload>
...@@ -222,19 +227,19 @@ ...@@ -222,19 +227,19 @@
imgPath: '', imgPath: '',
importFileUrl2: '', importFileUrl2: '',
getImgChoice: false, getImgChoice: false,
ismodify:false,//是否修改 ismodify: false, //是否修改
} }
}, },
created() { created() {
if (this.editobj != null) { if (this.editobj != null) {
this.addMsg = JSON.parse(JSON.stringify(this.editobj)) this.addMsg = JSON.parse(JSON.stringify(this.editobj))
this.ismodify = true this.ismodify = true
if(this.type==1){ if (this.type == 1) {
this.imgPath = this.addMsg.ImageUrl; this.imgPath = this.addMsg.ImageUrl;
} }
} }
let address = process.env.API; let address = process.env.API;
this.importFileUrl2 = address+'/upload/UploadTemporaryFile' this.importFileUrl2 = address + '/upload/UploadTemporaryFile'
}, },
mounted() { mounted() {
this.getPlatForm(); this.getPlatForm();
...@@ -247,7 +252,6 @@ ...@@ -247,7 +252,6 @@
//获取已开放平台 //获取已开放平台
getPlatForm() { getPlatForm() {
GetContributePlatfrom({}).then(res => { GetContributePlatfrom({}).then(res => {
console.log(res, '数据');
if (res.Code == 1) { if (res.Code == 1) {
this.platTypeList = res.Data; this.platTypeList = res.Data;
} }
...@@ -262,7 +266,6 @@ ...@@ -262,7 +266,6 @@
message: res.Message, message: res.Message,
position: 'top' position: 'top'
}) })
//this.gettype()
this.$emit('editsuccess') this.$emit('editsuccess')
}) })
}, },
...@@ -273,7 +276,7 @@ ...@@ -273,7 +276,7 @@
if (file.Code == 1) { if (file.Code == 1) {
let address = process.env.API; let address = process.env.API;
let aOne = address.split('/api')[0]; let aOne = address.split('/api')[0];
this.imgPath =aOne + file.Data.HttpPath; this.imgPath = aOne + file.Data.HttpPath;
this.addMsg.Path = file.Data.Path; this.addMsg.Path = file.Data.Path;
this.addMsg.MediaName = file.Data.Name; this.addMsg.MediaName = file.Data.Name;
} }
...@@ -298,12 +301,7 @@ ...@@ -298,12 +301,7 @@
position: 'top' position: 'top'
}) })
} else { } else {
// UploadSelfFile('wechatcatalogue', files, res => {
//           console.log(res, '数据');
//           if (res.Code == 1) {
// this.addMsg.Path = res.FileUrl;
//           }
//         })
} }
} }
if (this.type == 2) { //音频上传 if (this.type == 2) { //音频上传
...@@ -313,14 +311,6 @@ ...@@ -313,14 +311,6 @@
const isLt2M = files.size / 1024 / 1024 < 2; const isLt2M = files.size / 1024 / 1024 < 2;
let Times = this.getTimes(files) let Times = this.getTimes(files)
const isTime60S = Times >= 60 ? true : false; const isTime60S = Times >= 60 ? true : false;
// 获取时长
// if (!isAudio) {
// this.$q.notify({
// type: 'negative',
// message: `上传文件只能是mp3、wma、wav、amr格式!`,
// position: 'top'
// })
// } else {
if (!isLt2M) { if (!isLt2M) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -350,9 +340,8 @@ ...@@ -350,9 +340,8 @@
} else { } else {
that.$forceUpdate(); that.$forceUpdate();
that.addMsg.Path = res.FileUrl; that.addMsg.Path = res.FileUrl;
that.addMsg.MediaName = res.FileName?res.FileName:''; that.addMsg.MediaName = res.FileName ? res.FileName : '';
that.addMsg.Minutes = parseInt(that.duration.toFixed()); that.addMsg.Minutes = parseInt(that.duration.toFixed());
console.log(that.addMsg.Minutes, 'Minutes');
} }
}).catch((e) => { }).catch((e) => {
...@@ -360,13 +349,11 @@ ...@@ -360,13 +349,11 @@
} }
}) })
} }
// }
} }
} }
if (this.type == 3) { //视频上传 if (this.type == 3) { //视频上传
// 文件类型进行判断 // 文件类型进行判断
const isLt10M = files.size / 1024 / 1024 < 10; const isLt10M = files.size / 1024 / 1024 < 10;
if (['video/mp4'].indexOf(files.type) == -1) { if (['video/mp4'].indexOf(files.type) == -1) {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -387,18 +374,15 @@ ...@@ -387,18 +374,15 @@
isCreateCover: 1 isCreateCover: 1
} }
UploadSelfFile('wechatcatalogue', files, res => { UploadSelfFile('wechatcatalogue', files, res => {
console.log(res,'数据');
if (res.Code == 1) { if (res.Code == 1) {
let amr = new BenzAMRRecorder() let amr = new BenzAMRRecorder()
let that = this let that = this
amr.initWithUrl(res.FileUrl).then(function () { amr.initWithUrl(res.FileUrl).then(function () {
that.duration = amr.getDuration(); that.duration = amr.getDuration();
that.addMsg.Path = res.FileUrl; that.addMsg.Path = res.FileUrl;
that.addMsg.MediaName = res.FileName?res.FileName:''; that.addMsg.MediaName = res.FileName ? res.FileName : '';
that.addMsg.Minutes = parseInt(that.duration.toFixed()); that.addMsg.Minutes = parseInt(that.duration.toFixed());
}).catch((e) => { }).catch((e) => {})
})
} }
}) })
} }
...@@ -408,7 +392,6 @@ ...@@ -408,7 +392,6 @@
let audioDuration = 0 let audioDuration = 0
//获取录音时长 //获取录音时长
var url = URL.createObjectURL(content); var url = URL.createObjectURL(content);
console.log(url, '进入url');
//经测试,发现audio也可获取视频的时长 //经测试,发现audio也可获取视频的时长
var audioElement = new Audio(url); var audioElement = new Audio(url);
audioElement.addEventListener("loadedmetadata", function (_event) { audioElement.addEventListener("loadedmetadata", function (_event) {
...@@ -534,7 +517,6 @@ ...@@ -534,7 +517,6 @@
} }
} }
</script> </script>
<style> <style>
...@@ -641,5 +623,4 @@ ...@@ -641,5 +623,4 @@
.fullscreen { .fullscreen {
z-index: 999; z-index: 999;
} }
</style> </style>
\ No newline at end of file
...@@ -7,10 +7,11 @@ ...@@ -7,10 +7,11 @@
@click="goadd()"></q-btn> @click="goadd()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="delete" label="批量删除" <q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="delete" label="批量删除"
@click="pldelete()"></q-btn> @click="pldelete()"></q-btn>
<q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="edit" label="修改分组" <q-btn color="accent" style="float:right;" size="sm" class="q-mr-md" icon="edit" label="修改分组" @click="plmove()">
@click="plmove()"></q-btn> </q-btn>
</div> </div>
<div style="width: 100%;display: flex;align-items: center;flex-wrap: wrap;padding: 10px 20px;" v-if="dataList.length>0"> <div style="width: 100%;display: flex;align-items: center;flex-wrap: wrap;padding: 10px 20px;"
v-if="dataList.length>0">
<q-card class="imgcard" v-for="(x,y) in dataList" :key='y' <q-card class="imgcard" v-for="(x,y) in dataList" :key='y'
:style="{border:x.check==true?'2px solid #91d5ff':'2px solid #FFF'}" :style="{border:x.check==true?'2px solid #91d5ff':'2px solid #FFF'}"
@click="dataList[y].check = !dataList[y].check,$forceUpdate()"> @click="dataList[y].check = !dataList[y].check,$forceUpdate()">
...@@ -19,8 +20,7 @@ ...@@ -19,8 +20,7 @@
<div>{{x.UpdateTime}}</div> <div>{{x.UpdateTime}}</div>
<div> <div>
<i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;" <i class="el-icon-edit-outline" style="font-size: 20px;color: #1890ff;" @click.stop="goedit(x)"></i>
@click.stop="goedit(x)"></i>
</div> </div>
</div> </div>
<video width="260" height="180" :src="x.Path" controls="controls" v-if="x.Path"> <video width="260" height="180" :src="x.Path" controls="controls" v-if="x.Path">
...@@ -29,8 +29,10 @@ ...@@ -29,8 +29,10 @@
<div class="onetext" style="margin-top: 5px;">{{x.MediaName}}</div> <div class="onetext" style="margin-top: 5px;">{{x.MediaName}}</div>
<div style="margin-top: 5px;display: flex;justify-content: space-between;align-items: center;"> <div style="margin-top: 5px;display: flex;justify-content: space-between;align-items: center;">
<span class="onetext" style="width: 50%;"><i class="iconfont icon-ico-64" style="font-size: 12px;color: #1890ff;margin-right: 3px;" ></i>{{x.MediaGroupName}}</span> <span class="onetext" style="width: 50%;"><i class="iconfont icon-ico-64"
<span class="onetext" style="width: 50%;text-align: right;" ><i class="iconfont icon-ren-" style="font-size: 14px;color: #1890ff;margin-right: 3px;" ></i>{{x.UpdateByName}}</span> style="font-size: 12px;color: #1890ff;margin-right: 3px;"></i>{{x.MediaGroupName}}</span>
<span class="onetext" style="width: 50%;text-align: right;"><i class="iconfont icon-ren-"
style="font-size: 14px;color: #1890ff;margin-right: 3px;"></i>{{x.UpdateByName}}</span>
</div> </div>
</q-card-section> </q-card-section>
</q-card> </q-card>
...@@ -40,7 +42,8 @@ ...@@ -40,7 +42,8 @@
</div> </div>
<div v-if="Isadd==true"> <div v-if="Isadd==true">
<alladdsc :allclassifyList="allclassifyList" type='3' @editsuccess="getchildren" :editobj='editobj' @getcancel='Isadd=false'></alladdsc> <alladdsc :allclassifyList="allclassifyList" type='3' @editsuccess="getchildren" :editobj='editobj'
@getcancel='Isadd=false'></alladdsc>
</div> </div>
...@@ -60,7 +63,7 @@ ...@@ -60,7 +63,7 @@
type: Array, type: Array,
default: [], default: [],
}, },
allclassifyList:{ allclassifyList: {
type: Array, type: Array,
default: [], default: [],
} }
...@@ -69,7 +72,7 @@ ...@@ -69,7 +72,7 @@
return { return {
loading: false, loading: false,
Isadd: false, Isadd: false,
editobj:null editobj: null
} }
}, },
created() { created() {
...@@ -78,27 +81,24 @@ ...@@ -78,27 +81,24 @@
methods: { methods: {
goadd() { goadd() {
this.Isadd = true; this.Isadd = true;
this.editobj=null this.editobj = null
}, },
goedit(row){ goedit(row) {
console.log(row,'row'); this.editobj = row
this.editobj= row
this.Isadd = true this.Isadd = true
}, },
getchildren() {
getchildren(){
this.$emit('editsuccess') this.$emit('editsuccess')
this.Isadd = false this.Isadd = false
}, },
pldelete(){ pldelete() {
this.$emit('getdelete') this.$emit('getdelete')
}, },
plmove(){ plmove() {
this.$emit('getmove') this.$emit('getmove')
} }
} }
} }
</script> </script>
<style> <style>
......
...@@ -54,39 +54,18 @@ ...@@ -54,39 +54,18 @@
</style> </style>
<template> <template>
<div class="addimageText"> <div class="addimageText">
<!-- <div class="box_l" style="display:none;"> <div
<div class="box_l_center"> style="width: 100%;height: 40px;display: flex;align-items: center;position: fixed;top: 20px;left: 0;justify-content: center;">
<div class="appmsg_account">
<img style="width: 24px;height: 24px;border-radius: 50%;margin-right: 10px;"
src="http://wx.qlogo.cn/mmopen/B2EfAOZfS1hP0WNR9tGwEFJibrib3NcWYd4VXF10YAia2Fy6OmkzicpibHmabNRic4Yqj9wtImErdG3picwY3ia3AjVoZaBZAFQTnBJl/64"
alt="">
赞羊生活
</div>
<div class="appmsg" v-for="(x,y) in list" :key='y' :style="{border:x.Id==select?'2px solid #07c160':''}"
@click="select=x.Id">
<div class="appmsg_one" v-if="y==0">
<span>{{x.Name!=''?x.Name:'标题'}}</span>
</div>
<div class="appmsg_two" v-if="y!=0">
<span>{{x.Name!=''?x.Name:'标题'}}</span>
</div>
</div>
</div>
</div> -->
<div style="width: 100%;height: 40px;display: flex;align-items: center;position: fixed;top: 20px;left: 0;justify-content: center;">
<div style="width: 800px;position: relative;"> <div style="width: 800px;position: relative;">
<div style="position: absolute;top: 5px;left: -160px;" v-if="addMsg.Type==1 || addMsg.Type==2"> <div style="position: absolute;top: 5px;left: -160px;" v-if="addMsg.Type==1 || addMsg.Type==2">
<q-btn-group push> <q-btn-group push>
<q-btn push label="图片" @click="getChoice(1),iscover=false" :disable="addMsg.Type==2?true:false"/> <q-btn push label="图片" @click="getChoice(1),iscover=false" :disable="addMsg.Type==2?true:false" />
<q-btn push label="小程序" @click="getapplet" /> <q-btn push label="小程序" @click="getapplet" />
</q-btn-group> </q-btn-group>
</div> </div>
</div> </div>
</div> </div>
<div class="box_r"> <div class="box_r">
<q-input clearable filled v-model="addMsg.Title" label="标题" maxlength="64" counter <q-input clearable filled v-model="addMsg.Title" label="标题" maxlength="64" counter
v-if="this.addMsg.Type != 2 && this.addMsg.Type != 5" style="margin-top: 20px;" /> v-if="this.addMsg.Type != 2 && this.addMsg.Type != 5" style="margin-top: 20px;" />
<q-input clearable filled v-model="addMsg.Author" label="作者" maxlength="8" counter v-if="addMsg.Type == 1" <q-input clearable filled v-model="addMsg.Author" label="作者" maxlength="8" counter v-if="addMsg.Type == 1"
...@@ -105,18 +84,18 @@ ...@@ -105,18 +84,18 @@
<span style="font-size: 40px;">+</span> <span style="font-size: 40px;">+</span>
<span style="display: block; color: #7e8081;font-size: 14px;">选择封面</span> <span style="display: block; color: #7e8081;font-size: 14px;">选择封面</span>
</div> </div>
<div v-if="addMsg.CoverImageId && addMsg.CoverImageId>0 && coverimg!='' " <div v-if="addMsg.CoverImageId && addMsg.CoverImageId>0 && coverimg!='' " style="width:210px;height:90px"
style="width:210px;height:90px" @click="getChoice(0),iscover=true"> @click="getChoice(0),iscover=true">
<el-image style="width: 100%; height: 100%" :src="coverimg" fit="cover"></el-image> <el-image style="width: 100%; height: 100%" :src="coverimg" fit="cover"></el-image>
</div> </div>
<q-input clearable filled v-model="addMsg.Description" label="描述/摘要" maxlength="120" counter <q-input clearable filled v-model="addMsg.Description" label="描述/摘要" maxlength="120" counter type="textarea"
type="textarea" bottom-slots style="margin-left: 20px;width: 500px;" /> bottom-slots style="margin-left: 20px;width: 500px;" />
</div> </div>
<!-- 音频 --> <!-- 音频 -->
<div v-if="addMsg.Type == 4"> <div v-if="addMsg.Type == 4">
<q-input clearable filled v-model="addMsg.Description" label="可以输入140字以内的推荐语(选填)" maxlength="140" <q-input clearable filled v-model="addMsg.Description" label="可以输入140字以内的推荐语(选填)" maxlength="140" counter
counter type="textarea" bottom-slots style="width: 100%;" /> type="textarea" bottom-slots style="width: 100%;" />
<div style="display: flex;align-items: center;"> <div style="display: flex;align-items: center;">
<audio :src="audiourl" controls="controls"></audio> <audio :src="audiourl" controls="controls"></audio>
<q-btn color="accent" class="q-mr-md" label="替换素材" @click="getChoice(2),iscover=true" size="sm" <q-btn color="accent" class="q-mr-md" label="替换素材" @click="getChoice(2),iscover=true" size="sm"
...@@ -126,15 +105,15 @@ ...@@ -126,15 +105,15 @@
</div> </div>
<!-- 图片 --> <!-- 图片 -->
<div v-if="addMsg.Type == 5"> <div v-if="addMsg.Type == 5">
<q-input clearable filled v-model="addMsg.Description" label="可以输入140字以内的推荐语(选填)" maxlength="140" <q-input clearable filled v-model="addMsg.Description" label="可以输入140字以内的推荐语(选填)" maxlength="140" counter
counter type="textarea" bottom-slots style="width: 100%;margin-top: 20px;" /> type="textarea" bottom-slots style="width: 100%;margin-top: 20px;" />
<div style="display: flex;flex-wrap: wrap;width: 100%;"> <div style="display: flex;flex-wrap: wrap;width: 100%;">
<draggable v-model="imgsList" style="display: flex;flex-wrap: wrap;width: 100%;"> <draggable v-model="imgsList" style="display: flex;flex-wrap: wrap;width: 100%;">
<div style="width: 178px;height: 178px;margin: 0 5px 10px;position: relative;cursor: grab" <div style="width: 178px;height: 178px;margin: 0 5px 10px;position: relative;cursor: grab"
v-for="(x,y) in imgsList" :key='y'> v-for="(x,y) in imgsList" :key='y'>
<el-image style="width: 100%; height: 100%" :src="x.ImageUrl" fit="cover"></el-image> <el-image style="width: 100%; height: 100%" :src="x.ImageUrl" fit="cover"></el-image>
<q-icon style="position: absolute;right: 5px;top: 5px;color: #F56C6C;" <q-icon style="position: absolute;right: 5px;top: 5px;color: #F56C6C;" name="iconfont icon-yiquxiao"
name="iconfont icon-yiquxiao" size="24px" @click="ClearCarouse(y)"></q-icon> size="24px" @click="ClearCarouse(y)"></q-icon>
</div> </div>
</draggable> </draggable>
<div @click="getChoice(1)" class="cursor-pointer" v-if="imgsList.length<9" <div @click="getChoice(1)" class="cursor-pointer" v-if="imgsList.length<9"
...@@ -176,8 +155,7 @@ ...@@ -176,8 +155,7 @@
<q-radio v-model="IsShowCover" val="0" label="不显示" /> <q-radio v-model="IsShowCover" val="0" label="不显示" />
<span style="font-size: 11px;color: red;margin-left: 20px;">*注:封面图是否在正文中显示</span> <span style="font-size: 11px;color: red;margin-left: 20px;">*注:封面图是否在正文中显示</span>
</div> </div>
<div style="display: flex;align-items: center;margin: 10px 0 ;" <div style="display: flex;align-items: center;margin: 10px 0 ;" v-if="addMsg.Type==1 || addMsg.Type==5 ">
v-if="addMsg.Type==1 || addMsg.Type==5 ">
打开评论: 打开评论:
<q-radio v-model="IsOpenComment" val="1" label="打开" /> <q-radio v-model="IsOpenComment" val="1" label="打开" />
<q-radio v-model="IsOpenComment" val="0" label="不打开" /> <q-radio v-model="IsOpenComment" val="0" label="不打开" />
...@@ -199,8 +177,6 @@ ...@@ -199,8 +177,6 @@
<!-- <q-btn class="q-mr-md" label="推送" @click="tuisong()" style="width: 60px;" /> --> <!-- <q-btn class="q-mr-md" label="推送" @click="tuisong()" style="width: 60px;" /> -->
</div> </div>
</div> </div>
</div> </div>
<!-- 选择文件 --> <!-- 选择文件 -->
<q-dialog title="选择文件" v-model="getImgChoice" width="1200px"> <q-dialog title="选择文件" v-model="getImgChoice" width="1200px">
...@@ -220,13 +196,13 @@ ...@@ -220,13 +196,13 @@
:options="platTypeList" label="发布平台" :dense="false" emit-value map-options /> :options="platTypeList" label="发布平台" :dense="false" emit-value map-options />
<q-input v-if='IsPreview==1' clearable filled v-model="TagId" label="输入微信号" maxlength="30" <q-input v-if='IsPreview==1' clearable filled v-model="TagId" label="输入微信号" maxlength="30"
style="margin-top: 20px;" /> style="margin-top: 20px;" />
<q-select v-if='IsPreview==2' clearable filled stack-label option-value="id" option-label="name" v-model="TagId" style="margin-top: 20px;" <q-select v-if='IsPreview==2' clearable filled stack-label option-value="id" option-label="name"
:options="tagList" label="用户标签" :dense="false" emit-value map-options /> v-model="TagId" style="margin-top: 20px;" :options="tagList" label="用户标签" :dense="false" emit-value
map-options />
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" />
@click="closeCourseForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="loading" <q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="loading"
@click="saveCourse" /> @click="saveCourse" />
</q-card-actions> </q-card-actions>
...@@ -248,7 +224,7 @@ ...@@ -248,7 +224,7 @@
getGZHUserTagList getGZHUserTagList
} from '../../../api/teacher/contribution'; } from '../../../api/teacher/contribution';
import { import {
GetContributePlatfrom,//获取平台 GetContributePlatfrom, //获取平台
} from '../../../api/system/wechat'; } from '../../../api/system/wechat';
export default { export default {
meta: { meta: {
...@@ -278,7 +254,7 @@ ...@@ -278,7 +254,7 @@
getImgChoice: false, getImgChoice: false,
getappletChoice: false, getappletChoice: false,
type: -1, type: -1,
ContributionType: 1,//进入的类型 ContributionType: 1, //进入的类型
addMsg: { addMsg: {
Id: 0, Id: 0,
Type: 1, Type: 1,
...@@ -290,23 +266,23 @@ ...@@ -290,23 +266,23 @@
ImageList: [], ImageList: [],
Content: '', Content: '',
AuditState: 0, AuditState: 0,
SendContent:'', SendContent: '',
}, },
loading: false, loading: false,
iscover: false,//是否选择封面 iscover: false, //是否选择封面
coverimg: '', coverimg: '',
audiourl: '',//音频地址 audiourl: '', //音频地址
imgsList: [],//图片消息的数据 imgsList: [], //图片消息的数据
isManage: false,//是否是管理端 isManage: false, //是否是管理端
IsPreview: 0,//1预览 2群发 0 只保存投稿 不发送 IsPreview: 0, //1预览 2群发 0 只保存投稿 不发送
TagId: '',//预览 =》 微信号(必传); 群发 =》 标签ID TagId: '', //预览 =》 微信号(必传); 群发 =》 标签ID
PlatformId: 1,//发布的平台 PlatformId: 1, //发布的平台
IsShowCover: '0',//是否显示封面,1为显示,0为不显示 (图文) IsShowCover: '0', //是否显示封面,1为显示,0为不显示 (图文)
SourceUrl: '',// 原文地址 (图文) SourceUrl: '', // 原文地址 (图文)
IsOpenComment: '0',//是否打开评论,0不打开,1打开(图文 + 图片) IsOpenComment: '0', //是否打开评论,0不打开,1打开(图文 + 图片)
IsFansCanComment: '0',//是否粉丝才可评论,0所有人可评论,1粉丝才 IsFansCanComment: '0', //是否粉丝才可评论,0所有人可评论,1粉丝才
platTypeList: [],//平台列表 platTypeList: [], //平台列表
tagList:[],//用户标签列表 tagList: [], //用户标签列表
} }
}, },
created() { created() {
...@@ -314,39 +290,38 @@ ...@@ -314,39 +290,38 @@
this.addMsg.Type = this.$route.query.type; this.addMsg.Type = this.$route.query.type;
if (this.addMsg.Type == 2 || this.addMsg.Type == 3) { if (this.addMsg.Type == 2 || this.addMsg.Type == 3) {
this.config.initialFrameHeight = 200; this.config.initialFrameHeight = 200;
this.config.toolbars = [['undo', 'redo', 'link', 'unlink', ]] this.config.toolbars = [
['undo', 'redo', 'link', 'unlink', ]
]
} }
if (this.addMsg.Type == 2) { if (this.addMsg.Type == 2) {
this.config.maximumWords = 300; this.config.maximumWords = 300;
this.config.wordCount = true; this.config.wordCount = true;
} }
// Todo 暂时不弄视频相关的东西 // Todo 暂时不弄视频相关的东西
} }
if (this.$route.query && this.$route.query.Id) {//编辑 if (this.$route.query && this.$route.query.Id) { //编辑
this.addMsg.Id = this.$route.query.Id; this.addMsg.Id = this.$route.query.Id;
this.getdetails()//获取投稿详情 this.getdetails() //获取投稿详情
} else {//没有id的话新增 } else { //没有id的话新增
if (this.addMsg.Type == 4) { if (this.addMsg.Type == 4) {
this.getImgChoice = true; this.getImgChoice = true;
this.iscover = true this.iscover = true
this.type = 2;//音频 这个自定义type 2为音频 this.type = 2; //音频 这个自定义type 2为音频
} }
if (this.addMsg.Type == 5) { if (this.addMsg.Type == 5) {
this.getImgChoice = true; this.getImgChoice = true;
this.iscover = true this.iscover = true
this.type = 1;//音频 这个自定义type 1为图片 this.type = 1; //音频 这个自定义type 1为图片
} }
} }
if (this.$route.query && this.$route.query.isM) {//是否是管理端isM if (this.$route.query && this.$route.query.isM) { //是否是管理端isM
this.isManage = true; this.isManage = true;
this.getPlatForm() this.getPlatForm()
} }
}, },
mounted() { mounted() {
this.getGZHUserTagList()//获取公众号的用户标签 this.getGZHUserTagList() //获取公众号的用户标签
}, },
methods: { methods: {
//获取已开放平台 //获取已开放平台
...@@ -365,7 +340,9 @@ ...@@ -365,7 +340,9 @@
}) })
}, },
getdetails() { getdetails() {
getContributeInfo({ ContributeId: this.addMsg.Id }).then(res => { getContributeInfo({
ContributeId: this.addMsg.Id
}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.addMsg = res.Data this.addMsg = res.Data
if (this.addMsg.Type == 1) { if (this.addMsg.Type == 1) {
...@@ -378,7 +355,6 @@ ...@@ -378,7 +355,6 @@
} }
} }
}).catch(() => { }).catch(() => {
}) })
}, },
getChoice(type) { getChoice(type) {
...@@ -409,42 +385,39 @@ ...@@ -409,42 +385,39 @@
} }
data.push(a) data.push(a)
}) })
if (this.type == 0) {//图片单选 if (this.type == 0) { //图片单选
this.coverimg = obj[0].ImageUrl; this.coverimg = obj[0].ImageUrl;
this.addMsg.CoverImageId = obj[0].Id this.addMsg.CoverImageId = obj[0].Id
} else if (this.type == 1) {//图片多选 } else if (this.type == 1) { //图片多选
if (this.addMsg.Type == 1) {//图文 if (this.addMsg.Type == 1) { //图文
this.$refs.UE_cb.instertImage(data) this.$refs.UE_cb.instertImage(data)
} else {//图片消息 } else { //图片消息
if (this.imgsList.length == 0) { if (this.imgsList.length == 0) {
this.coverimg = obj[0].ImageUrl; this.coverimg = obj[0].ImageUrl;
this.addMsg.CoverImageId = obj[0].Id this.addMsg.CoverImageId = obj[0].Id
} }
this.imgsList = this.imgsList.concat(obj) this.imgsList = this.imgsList.concat(obj)
if (this.imgsList.length > 9) { if (this.imgsList.length > 9) {
this.imgsList.slice(0, 9) this.imgsList.slice(0, 9)
} }
} }
} }
if (this.type == 2) { if (this.type == 2) {
if (this.iscover == true) {//选择的音频 if (this.iscover == true) { //选择的音频
this.audiourl = obj[0].Path; this.audiourl = obj[0].Path;
this.addMsg.VideoMediumId = obj[0].Id; this.addMsg.VideoMediumId = obj[0].Id;
this.addMsg.Title = obj[0].MediaName this.addMsg.Title = obj[0].MediaName
} else {//选择音频插入富文本 } else { //选择音频插入富文本
this.$refs.UE_cb.insertaudio(data) this.$refs.UE_cb.insertaudio(data)
} }
} }
if (this.type == 3) { if (this.type == 3) {
this.$refs.UE_cb.insertVideo(data) this.$refs.UE_cb.insertVideo(data)
} }
this.getImgChoice = false; this.getImgChoice = false;
} }
}, },
ClearCarouse(index) {//删除图片 ClearCarouse(index) { //删除图片
this.imgsList.splice(index, 1); this.imgsList.splice(index, 1);
}, },
successUpload(file) { successUpload(file) {
...@@ -456,8 +429,7 @@ ...@@ -456,8 +429,7 @@
this.$refs.UE_cb.instertImage(data) this.$refs.UE_cb.instertImage(data)
} }
}, },
savemove(type) { //普通的用户保存
savemove(type) {//普通的用户保存
this.loading = true this.loading = true
if (this.addMsg.Type == 5) { if (this.addMsg.Type == 5) {
this.addMsg.ImageList = [] this.addMsg.ImageList = []
...@@ -480,14 +452,12 @@ ...@@ -480,14 +452,12 @@
message: res.Message, message: res.Message,
position: 'top' position: 'top'
}) })
// this.goblck()
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
savemoveManage(type) {//管理的保存 savemoveManage(type) { //管理的保存
if (this.addMsg.Type == 5) { if (this.addMsg.Type == 5) {
this.addMsg.ImageList = [] this.addMsg.ImageList = []
this.imgsList.forEach(x => { this.imgsList.forEach(x => {
...@@ -522,13 +492,11 @@ ...@@ -522,13 +492,11 @@
message: res.Message, message: res.Message,
position: 'top' position: 'top'
}) })
// this.goblck()
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
} else {//预览 和 群发 } else { //预览 和 群发
this.TagId = '' this.TagId = ''
this.releasedialog = true this.releasedialog = true
this.IsPreview = type this.IsPreview = type
...@@ -577,17 +545,14 @@ ...@@ -577,17 +545,14 @@
message: res.Message, message: res.Message,
position: 'top' position: 'top'
}) })
// this.goblck()
this.releasedialog = false this.releasedialog = false
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
goblck() {//返回上一个页面 goblck() { //返回上一个页面
if (this.isManage == true) {//是管理端的时候返回投稿发布 if (this.isManage == true) { //是管理端的时候返回投稿发布
this.$router.push({ this.$router.push({
path: '/teacher/contribution/contributemanage', path: '/teacher/contribution/contributemanage',
}); });
...@@ -596,7 +561,6 @@ ...@@ -596,7 +561,6 @@
path: '/teacher/contribution/imageTextlist', path: '/teacher/contribution/imageTextlist',
}); });
} }
}, },
tuisong() { tuisong() {
setContributeInfoPublish({ setContributeInfoPublish({
...@@ -605,28 +569,22 @@ ...@@ -605,28 +569,22 @@
IsPreview: 1, IsPreview: 1,
TagId: 'goodluck_cattle', TagId: 'goodluck_cattle',
}).then(res => { }).then(res => {
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
getapplet() {//小程序弹窗 getapplet() { //小程序弹窗
this.getappletChoice = true this.getappletChoice = true
}, },
getresult(data) {//选择小程序的结果 getresult(data) { //选择小程序的结果
this.getappletChoice = false this.getappletChoice = false
this.$refs.UE_cb.applet(data) this.$refs.UE_cb.applet(data)
}, },
getcontnet(data, length) { getcontnet(data, length) {
if (this.addMsg.Type == 2) { if (this.addMsg.Type == 2) {
let obj = JSON.parse(JSON.stringify(data)) let obj = JSON.parse(JSON.stringify(data))
let a = obj.replace(/<\/p>/g,'</p>\n')//处理换行的问题 let a = obj.replace(/<\/p>/g, '</p>\n') //处理换行的问题
this.addMsg.Description = a.replace(/<\/?p[^>]*>/gi,'') this.addMsg.Description = a.replace(/<\/?p[^>]*>/gi, '')
} else { } else {
this.addMsg.Content = data this.addMsg.Content = data
this.addMsg.SendContent = JSON.parse(JSON.stringify(data)) this.addMsg.SendContent = JSON.parse(JSON.stringify(data))
...@@ -650,30 +608,24 @@ ...@@ -650,30 +608,24 @@
//_res 二维数维中保存了 值和值的重复数 //_res 二维数维中保存了 值和值的重复数
var _newArr = []; var _newArr = [];
for (var i = 0; i < _res.length; i++) { for (var i = 0; i < _res.length; i++) {
_newArr.push( _newArr.push({
{name:_res[i][0],num:_res[i][1]} name: _res[i][0],
); num: _res[i][1]
} });
_newArr.forEach(x=>{ }
if(x.num==2){ _newArr.forEach(x => {
let a = new RegExp(`<mp-miniprogram ${x.name}[^>]*>(.|\n)*<\/mp-miniprogram><span ${x.name}></span>`,'g') if (x.num == 2) {
this.addMsg.SendContent = this.addMsg.SendContent.replace(a,'') let a = new RegExp(
`<mp-miniprogram ${x.name}[^>]*>(.|\n)*<\/mp-miniprogram><span ${x.name}></span>`, 'g')
this.addMsg.SendContent = this.addMsg.SendContent.replace(a, '')
} }
// 清楚sengConent 里面不用的iframe // 清楚sengConent 里面不用的iframe
let b = new RegExp(`<iframe[^>]*>(.|\n)*<\/iframe><span ${x.name}></span>`,'g') let b = new RegExp(`<iframe[^>]*>(.|\n)*<\/iframe><span ${x.name}></span>`, 'g')
this.addMsg.SendContent = this.addMsg.SendContent.replace(b,'') this.addMsg.SendContent = this.addMsg.SendContent.replace(b, '')
}) })
} }
// console.log(this.addMsg.Content)
} }
}, },
} }
} }
</script> </script>
\ No newline at end of file
...@@ -3,18 +3,16 @@ ...@@ -3,18 +3,16 @@
<div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name" <q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name" v-model="msg.Type"
v-model="msg.Type" ref="Id" :options="TypeList" label="类型" :dense="false" emit-value ref="Id" :options="TypeList" label="类型" :dense="false" emit-value map-options />
map-options />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name" <q-select filled stack-label @input="changePage(1)" option-value="Id" option-label="Name"
v-model="msg.AuditState" ref="Id" :options="StateList" label="状态" :dense="false" emit-value v-model="msg.AuditState" ref="Id" :options="StateList" label="状态" :dense="false" emit-value map-options />
map-options />
</div> </div>
<div class="col-3"> <div class="col-3">
<q-input @keyup.enter.native="changePage(1)" @clear="changePage(1)" clearable filled <q-input @keyup.enter.native="changePage(1)" @clear="changePage(1)" clearable filled v-model="msg.Title"
v-model="msg.Title" label="输入标题内容" maxlength="20" /> label="输入标题内容" maxlength="20" />
</div> </div>
</div> </div>
</div> </div>
...@@ -29,9 +27,8 @@ ...@@ -29,9 +27,8 @@
</template> </template>
<template v-slot:body-cell-CoverImagePath="props"> <template v-slot:body-cell-CoverImagePath="props">
<q-td :props="props"> <q-td :props="props">
<el-image v-if="props.row.Type==1 || props.row.Type==5" <el-image v-if="props.row.Type==1 || props.row.Type==5" style="width: 200px;height: 100px;padding: 10px 0 ;"
style="width: 200px;height: 100px;padding: 10px 0 ;" :src="props.row.CoverImagePath" :src="props.row.CoverImagePath" fit="cover"></el-image>
fit="cover"></el-image>
<div v-if="props.row.Type==4" <div v-if="props.row.Type==4"
style="width: 200px;height: 80px;display: flex;align-items: center;justify-content: center;background: #f6f7f8;"> style="width: 200px;height: 80px;display: flex;align-items: center;justify-content: center;background: #f6f7f8;">
<img src="../../../assets/images/Noticen.png" alt="" style="width: 41px;height: 39px;"> <img src="../../../assets/images/Noticen.png" alt="" style="width: 41px;height: 39px;">
...@@ -43,7 +40,8 @@ ...@@ -43,7 +40,8 @@
<template v-slot:body-cell-Title="props"> <template v-slot:body-cell-Title="props">
<q-td :props="props"> <q-td :props="props">
<span>{{props.row.Title}}</span> <span>{{props.row.Title}}</span>
<div style="width: 200px;overflow: hidden ;max-height: 78px;display: inline-block;white-space:pre-wrap" v-if="props.row.Type==2" v-html="props.row.Description"></div> <div style="width: 200px;overflow: hidden ;max-height: 78px;display: inline-block;white-space:pre-wrap"
v-if="props.row.Type==2" v-html="props.row.Description"></div>
<div v-if="props.row.Type==5" style="width: 200px;overflow: hidden; <div v-if="props.row.Type==5" style="width: 200px;overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
...@@ -56,15 +54,15 @@ ...@@ -56,15 +54,15 @@
<!-- <q-btn flat size="xs" icon="iconfont icon-view" style="font-weight:400;color: #3FC4FF" <!-- <q-btn flat size="xs" icon="iconfont icon-view" style="font-weight:400;color: #3FC4FF"
class="q-mr-xs" label="详情" @click="viewDetails(props.row)" /> --> class="q-mr-xs" label="详情" @click="viewDetails(props.row)" /> -->
<q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" <q-btn flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs" label="修改"
label="修改" @click="goedit(props.row)" /> @click="goedit(props.row)" />
<q-btn flat size="xs" icon="iconfont icon-fabu" style="font-weight:400;color: purple" class="q-mr-xs" <q-btn flat size="xs" icon="iconfont icon-fabu" style="font-weight:400;color: purple" class="q-mr-xs"
label="发布" @click="release(props.row)" /> label="发布" @click="release(props.row)" />
<q-btn flat size="xs" icon="iconfont icon-lianluojilu" style="font-weight:400;color: purple" class="q-mr-xs" <q-btn flat size="xs" icon="iconfont icon-lianluojilu" style="font-weight:400;color: purple" class="q-mr-xs"
label="发布记录" @click="releaserecord(props.row)" > label="发布记录" @click="releaserecord(props.row)">
<q-popup-proxy transition-show="flip-up" transition-hide="flip-down"> <q-popup-proxy transition-show="flip-up" transition-hide="flip-down">
<div style="padding: 10px;"> <div style="padding: 10px;">
<el-table :data="recordDate" border > <el-table :data="recordDate" border>
<el-table-column width="100" property="PlatfromName" label="平台"></el-table-column> <el-table-column width="100" property="PlatfromName" label="平台"></el-table-column>
<el-table-column width="200" property="Content" label="内容"> <el-table-column width="200" property="Content" label="内容">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -74,7 +72,7 @@ ...@@ -74,7 +72,7 @@
<el-table-column width="100" property="UpdateByName" label="操作人"></el-table-column> <el-table-column width="100" property="UpdateByName" label="操作人"></el-table-column>
<el-table-column width="100" property="UpdateByName" label="状态"> <el-table-column width="100" property="UpdateByName" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<div >{{scope.row.Msg_Id!=null &&scope.row.Msg_Id!=''?'已发布':'-' }}</div> <div>{{scope.row.Msg_Id!=null &&scope.row.Msg_Id!=''?'已发布':'-' }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="150" property="UpdateTime" label="操作时间"></el-table-column> <el-table-column width="150" property="UpdateTime" label="操作时间"></el-table-column>
...@@ -86,8 +84,8 @@ ...@@ -86,8 +84,8 @@
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:max="pageCount" :input="true" @input="changePage" /> :input="true" @input="changePage" />
</template> </template>
</q-table> </q-table>
</div> </div>
...@@ -97,13 +95,13 @@ ...@@ -97,13 +95,13 @@
<div class="text-h6">投稿发布</div> <div class="text-h6">投稿发布</div>
</q-card-section> </q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh"> <q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<q-select filled stack-label option-value="Id" option-label="Name" v-model="publishMsg.PlatformId" <q-select filled stack-label option-value="Id" option-label="Name" v-model="publishMsg.PlatformId" ref="Id"
ref="Id" :options="platTypeList" label="发布平台" :dense="false" emit-value map-options /> :options="platTypeList" label="发布平台" :dense="false" emit-value map-options />
<div style="display: flex;align-items: center;margin: 10px 0 ;"> <div style="display: flex;align-items: center;margin: 10px 0 ;">
展示方式: 展示方式:
<q-radio v-model="publishMsg.IsPreview" val="0" label="上传不发布" v-if="publishMsg.Type==1"/> <q-radio v-model="publishMsg.IsPreview" val="0" label="上传不发布" v-if="publishMsg.Type==1" />
<q-radio v-model="publishMsg.IsPreview" val="1" label="预览" @input="publishMsg.TagId=''"/> <q-radio v-model="publishMsg.IsPreview" val="1" label="预览" @input="publishMsg.TagId=''" />
<q-radio v-model="publishMsg.IsPreview" val="2" label="群发" @input="publishMsg.TagId=''"/> <q-radio v-model="publishMsg.IsPreview" val="2" label="群发" @input="publishMsg.TagId=''" />
</div> </div>
<div style="color: red;font-size: 12px;margin: 5px 0 10px;"> <div style="color: red;font-size: 12px;margin: 5px 0 10px;">
<span v-if='publishMsg.IsPreview==0'>注:只上传到公众号平台不发布</span> <span v-if='publishMsg.IsPreview==0'>注:只上传到公众号平台不发布</span>
...@@ -112,15 +110,14 @@ ...@@ -112,15 +110,14 @@
</div> </div>
<q-input v-if='publishMsg.IsPreview==1' clearable filled v-model="publishMsg.TagId" label="输入微信号" <q-input v-if='publishMsg.IsPreview==1' clearable filled v-model="publishMsg.TagId" label="输入微信号"
maxlength="30" /> maxlength="30" />
<q-select v-if='publishMsg.IsPreview==2' clearable filled stack-label option-value="id" option-label="name" v-model="publishMsg.TagId" <q-select v-if='publishMsg.IsPreview==2' clearable filled stack-label option-value="id" option-label="name"
:options="tagList" label="用户标签" :dense="false" emit-value map-options /> v-model="publishMsg.TagId" :options="tagList" label="用户标签" :dense="false" emit-value map-options />
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" />
@click="closeCourseForm" /> <q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" @click="saveCourse" />
:loading="saveCourseLoading" @click="saveCourse" />
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
...@@ -138,7 +135,7 @@ ...@@ -138,7 +135,7 @@
getGZHUserTagList getGZHUserTagList
} from '../../../api/teacher/contribution'; } from '../../../api/teacher/contribution';
import { import {
GetContributePlatfrom,//获取平台 GetContributePlatfrom, //获取平台
} from '../../../api/system/wechat'; } from '../../../api/system/wechat';
export default { export default {
meta: { meta: {
...@@ -155,11 +152,11 @@ ...@@ -155,11 +152,11 @@
pageSize: 15, pageSize: 15,
rowsPerPage: 15, rowsPerPage: 15,
AuditState: "-1", //审核状态 AuditState: "-1", //审核状态
Type: '-1',//类型 Type: '-1', //类型
Title: '',//标题 Title: '', //标题
}, },
TypeList: [],//类型 TypeList: [], //类型
StateList: [],//状态 StateList: [], //状态
data: [], data: [],
pageCount: 0, pageCount: 0,
columns: [{ columns: [{
...@@ -211,15 +208,15 @@ ...@@ -211,15 +208,15 @@
} }
], ],
TypeList2: [], TypeList2: [],
platTypeList: [],//平台列表 platTypeList: [], //平台列表
publishMsg: { publishMsg: {
ContributeId: 0, ContributeId: 0,
PlatformId: 1, PlatformId: 1,
IsPreview: 0, IsPreview: 0,
TagId: '' TagId: ''
}, },
recordDate:[], recordDate: [],
tagList:[], tagList: [],
} }
}, },
...@@ -228,13 +225,12 @@ ...@@ -228,13 +225,12 @@
this.getPlatForm() this.getPlatForm()
this.getStateList() this.getStateList()
this.getList() this.getList()
this.getGZHUserTagList()//获取公众号的用户标签 this.getGZHUserTagList() //获取公众号的用户标签
}, },
methods: { methods: {
//获取已开放平台 //获取已开放平台
getPlatForm() { getPlatForm() {
GetContributePlatfrom({}).then(res => { GetContributePlatfrom({}).then(res => {
console.log(res, '数据');
if (res.Code == 1) { if (res.Code == 1) {
this.platTypeList = res.Data; this.platTypeList = res.Data;
} }
...@@ -293,27 +289,28 @@ ...@@ -293,27 +289,28 @@
}) })
}, },
release(row) {//发布 release(row) { //发布
this.publishMsg.ContributeId = row.Id; this.publishMsg.ContributeId = row.Id;
this.publishMsg.PlatformId = 1;//默认为微信公众号 this.publishMsg.PlatformId = 1; //默认为微信公众号
this.publishMsg.IsPreview = '1'; this.publishMsg.IsPreview = '1';
this.publishMsg.TagId = ''; this.publishMsg.TagId = '';
this.publishMsg.Type = row.Type; this.publishMsg.Type = row.Type;
this.releasedialog = true this.releasedialog = true
}, },
releaserecord(row){ releaserecord(row) {
getContributeInfoPublishLogList({ContributeId:row.Id}).then(res => { getContributeInfoPublishLogList({
ContributeId: row.Id
}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.recordDate=res.Data this.recordDate = res.Data
} }
}).catch(() => { }).catch(() => {})
})
}, },
closeCourseForm() { closeCourseForm() {
this.releasedialog = false this.releasedialog = false
}, },
saveCourse() {//发布投稿 saveCourse() { //发布投稿
if (this.publishMsg.PlatformId == '') { if (this.publishMsg.PlatformId == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -322,7 +319,7 @@ ...@@ -322,7 +319,7 @@
}) })
return return
} }
if(this.publishMsg.IsPreview == 1 && this.publishMsg.TagId==''){ if (this.publishMsg.IsPreview == 1 && this.publishMsg.TagId == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: `请输入预览的微信号`, message: `请输入预览的微信号`,
...@@ -330,7 +327,7 @@ ...@@ -330,7 +327,7 @@
}) })
return return
} }
this.saveCourseLoading= true this.saveCourseLoading = true
//推送 //推送
setContributeInfoPublish(this.publishMsg).then(res => { setContributeInfoPublish(this.publishMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -351,14 +348,14 @@ ...@@ -351,14 +348,14 @@
}, },
goedit(row) {//编辑 goedit(row) { //编辑
this.OpenNewUrl("/teacher/contribution/addimageText", { this.OpenNewUrl("/teacher/contribution/addimageText", {
type: row.Type, type: row.Type,
Id: row.Id, Id: row.Id,
isM:1, isM: 1,
}); });
}, },
goadd(type) {//新增 goadd(type) { //新增
this.OpenNewUrl("/teacher/contribution/addimageText", { this.OpenNewUrl("/teacher/contribution/addimageText", {
type: type type: type
...@@ -367,7 +364,6 @@ ...@@ -367,7 +364,6 @@
} }
} }
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
} }
}, },
created() { created() {
// console.log(this.$route.query)
if(this.$route.query){ if(this.$route.query){
this.Image = this.$route.query.Image; this.Image = this.$route.query.Image;
this.Name = this.$route.query.Name; this.Name = this.$route.query.Name;
......
...@@ -116,7 +116,8 @@ ...@@ -116,7 +116,8 @@
let html = ''; let html = '';
//s视频 //s视频
fileArray.forEach(item => { fileArray.forEach(item => {
html += "<iframe frameborder='0' width='100%' height='200px' src='https://v.qq.com/iframe/player.html?vid=v326875u4ek' allowfullscreen='true'></iframe>" html +=
"<iframe frameborder='0' width='100%' height='200px' src='https://v.qq.com/iframe/player.html?vid=v326875u4ek' allowfullscreen='true'></iframe>"
}) })
if (html && html != '') { if (html && html != '') {
...@@ -157,24 +158,29 @@ ...@@ -157,24 +158,29 @@
}, },
applet(data) { applet(data) {
let html = ''; let html = '';
if (data.type == 1) {//文字小程序 if (data.type == 1) { //文字小程序
html += `<p><a data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}" href="">${data.title}</a></p>`; html +=
`<p><a data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}" href="">${data.title}</a></p>`;
} else if (data.type == 2) {//图片小程序 } else if (data.type == 2) { //图片小程序
html += `<p><a data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}" href=""><img src="${data.imgUrl}" alt="" data-width="null" ></a></p>` html +=
`<p><a data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}" href=""><img src="${data.imgUrl}" alt="" data-width="null" ></a></p>`
} else if (data.type == 3) { } else if (data.type == 3) {
let dataTime = Date.parse(new Date()) let dataTime = Date.parse(new Date())
// 给公众号的写法 // 给公众号的写法
html += `<mp-miniprogram data-time="${dataTime}" data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}" html +=
`<mp-miniprogram data-time="${dataTime}" data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}"
data-miniprogram-title="${data.title}" data-miniprogram-title="${data.title}"
data-miniprogram-imageurl="${data.imgUrl}" data-miniprogram-imageurl="${data.imgUrl}"
data-miniprogram-type="card" data-miniprogram-servicetype="0"></mp-miniprogram><span data-time="${dataTime}"></span>` data-miniprogram-type="card" data-miniprogram-servicetype="0"></mp-miniprogram><span data-time="${dataTime}"></span>`
//自己看的写法 //自己看的写法
html += '<p><iframe height="320" width="auto" data-time=' + dataTime + ' data-miniprogram-appid=' + data.appletmsg.AppID + ' frameborder="0" allowtransparency="true" ' + html += '<p><iframe height="320" width="auto" data-time=' + dataTime + ' data-miniprogram-appid=' + data
.appletmsg.AppID + ' frameborder="0" allowtransparency="true" ' +
' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" ' + ' style="background-color:transparent;border-radius: 3px;overflow: hidden;z-index: 0;" scrolling="no" ' +
' src="http://edu.oytour.com/#/teacher/contribution/graphicType?Name=' + data.appletmsg.Name + '&Image=' + ' src="http://edu.oytour.com/#/teacher/contribution/graphicType?Name=' + data.appletmsg.Name + '&Image=' +
data.appletmsg.Image + '&title=' + data.title + '&imgUrl=' + data.imgUrl + data.appletmsg.Image + '&title=' + data.title + '&imgUrl=' + data.imgUrl +
'" class="ans-insertaudio-module" module="_insertaudio">' + ' </iframe><span data-time=' + dataTime + '></span></p>'; '" class="ans-insertaudio-module" module="_insertaudio">' + ' </iframe><span data-time=' + dataTime +
'></span></p>';
} }
...@@ -254,7 +260,6 @@ ...@@ -254,7 +260,6 @@
}); });
this.ue.addListener('keyup', editor => { this.ue.addListener('keyup', editor => {
this.isInputChange = true; this.isInputChange = true;
// this.$emit('input', this.ue.getContent());
}); });
this.ue.addListener('contentChange', (editor, e) => { this.ue.addListener('contentChange', (editor, e) => {
this.isInputChange = true; this.isInputChange = true;
...@@ -268,7 +273,7 @@ ...@@ -268,7 +273,7 @@
this.$emit('focus'); this.$emit('focus');
}); });
this.ue.addListener('selectionchange', editor => { this.ue.addListener('selectionchange', editor => {
// console.log(this.ue.selection.getStart() )
}) })
this.ue.addListener('click', (editor, a) => { this.ue.addListener('click', (editor, a) => {
...@@ -276,7 +281,6 @@ ...@@ -276,7 +281,6 @@
} }
}, },
} }
</script> </script>
<style scoped> <style scoped>
......
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