Commit a522ce19 authored by Mac's avatar Mac

1

parent 799f1bd9
......@@ -180,7 +180,6 @@
<!-- <q-btn class="q-mr-md" label="推送" @click="tuisong()" style="width: 60px;" /> -->
</div>
</div>
<!-- 选择文件 -->
<q-dialog title="选择文件" v-model="getImgChoice" width="1200px">
......@@ -198,7 +197,8 @@
<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="PlatformId" ref="Id"
:options="platTypeList" label="发布平台" :dense="false" emit-value map-options />
<q-input v-if='IsPreview==1' clearable filled v-model="TagId" label="输入微信号" maxlength="30" style="margin-top: 20px;"/>
<q-input v-if='IsPreview==1' clearable filled v-model="TagId" label="输入微信号" maxlength="30"
style="margin-top: 20px;" />
</q-card-section>
......@@ -323,7 +323,6 @@
//获取已开放平台
getPlatForm() {
GetContributePlatfrom({}).then(res => {
console.log(res, '数据');
if (res.Code == 1) {
this.platTypeList = res.Data;
}
......@@ -333,6 +332,8 @@
getContributeInfo({ ContributeId: this.addMsg.Id }).then(res => {
if (res.Code == 1) {
this.addMsg = res.Data
// this.addMsg.Content = res.Data.Content.replace(/<p><mp-miniprogram[^>]*>(.|\n)*<\/mp-miniprogram><\/p>/g,'')
// console.log(this.addMsg.Content,'this.addMsg.Content')
if (this.addMsg.Type == 1) {
this.coverimg = res.Data.CoverImagePath
} else if (this.addMsg.Type == 4) {
......@@ -427,6 +428,45 @@
this.addMsg.Description = data
} else {
this.addMsg.Content = data
// var reg = /data-time="(.*?)"/g;
// let _arr = []
// _arr = data.match(reg)
// console.log(data)
// if (_arr && _arr.length > 0) {
// var _res = []; //
// _arr.sort();
// for (var i = 0; i < _arr.length;) {
// var count = 0;
// for (var j = i; j < _arr.length; j++) {
// if (_arr[i] == _arr[j]) {
// count++;
// }
// }
// _res.push([_arr[i], count]);
// i += count;
// }
// //_res 二维数维中保存了 值和值的重复数
// var _newArr = [];
// for (var i = 0; i < _res.length; i++) {
// _newArr.push(
// {name:_res[i][0],num:_res[i][1]}
// );
// }
// console.log(_newArr)
// _newArr.forEach(x=>{
// console.log(x)
// if(x.num==1){
// let a = new RegExp(`<mp-miniprogram ${x.name}[^>]*>(.|\n)*<\/mp-miniprogram>`,'g')
// console.log(a)
// this.addMsg.Content = data.replace(a,'')
// // this.$refs.UE_cb.getagain(this.addMsg.Content)
// }
// })
// }
console.log(this.addMsg.Content, '返回数据')
}
},
savemove(type) {//普通的用户保存
......@@ -504,7 +544,7 @@
this.releasedialog = false
},
saveCourse() {
if(this.PlatformId==''){
if (this.PlatformId == '') {
this.$q.notify({
type: 'negative',
message: `请选择发布平台`,
......@@ -512,7 +552,7 @@
})
return
}
if(this.IsPreview == 1 && this.TagId==''){
if (this.IsPreview == 1 && this.TagId == '') {
this.$q.notify({
type: 'negative',
message: `请输入预览的微信号`,
......@@ -521,8 +561,8 @@
return
}
let msg = JSON.parse(JSON.stringify(this.addMsg))
msg.IsPreview = this.IsPreview;
msg.TagId = this.TagId;
msg.IsPreview = this.IsPreview;
msg.TagId = this.TagId;
msg.PlatformId = this.PlatformId;
this.loading = true
setAdminContributeInfo(msg).then(res => {
......@@ -540,7 +580,7 @@
}
}).catch(() => {
this.loading = false
})
},
......@@ -558,7 +598,7 @@
},
tuisong() {
setContributeInfoPublish({
ContributeId: 12,
ContributeId: 15,
PlatformId: 1,
IsPreview: 1,
TagId: 'goodluck_cattle',
......
......@@ -34,7 +34,7 @@
}
},
created() {
console.log(this.$route.query)
// console.log(this.$route.query)
if(this.$route.query){
this.Image = this.$route.query.Image;
this.Name = this.$route.query.Name;
......
......@@ -50,13 +50,13 @@
<!-- <q-btn flat size="xs" icon="iconfont icon-view" style="font-weight:400;color: #3FC4FF"
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 v-if="props.row.AuditState==0 || props.row.AuditState==3" flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="编辑" @click="goedit(props.row)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px">
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px" v-if="props.row.AuditState==0 || props.row.AuditState==3">
<q-list>
<q-item v-if="props.row.AuditState==0" clickable v-close-popup @click="tijiaosh(props.row)">
<q-item clickable v-close-popup @click="tijiaosh(props.row)">
<q-item-section >
<q-item-label>提交审核</q-item-label>
</q-item-section>
......
......@@ -171,7 +171,7 @@
// 给公众号的写法
html+=`<mp-miniprogram data-time="${dataTime}" data-miniprogram-appid="${data.appletmsg.AppID}" data-miniprogram-path="${data.route}" data-miniprogram-title="${data.title}" data-miniprogram-imageurl="http://mmbiz.qpic.cn/mmbiz_jpg/iamUJ3Ot9utFjb5RP6Fr0ECTbQDnicewkS38JbPCsoFZPUzibXuIj6IhaHOPudWSG0ZxldLIj70QtHVSbwrBaP85g/0?wx_fmt=jpeg" data-miniprogram-type="card" data-miniprogram-servicetype="0"></mp-miniprogram>`
//自己看的写法
html += '<p><iframe height="320" width="auto" data-time='+ dataTime +' 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" ' +
' src="http://localhost:8181/#/teacher/contribution/graphicType?Name=' + data.appletmsg.Name + '&Image=' +
data.appletmsg.Image + '&title=' +data.title+ '&imgUrl=' +data.imgUrl+
......
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