Commit a522ce19 authored by Mac's avatar Mac

1

parent 799f1bd9
...@@ -180,7 +180,6 @@ ...@@ -180,7 +180,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>
<!-- 选择文件 --> <!-- 选择文件 -->
<q-dialog title="选择文件" v-model="getImgChoice" width="1200px"> <q-dialog title="选择文件" v-model="getImgChoice" width="1200px">
...@@ -198,7 +197,8 @@ ...@@ -198,7 +197,8 @@
<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="PlatformId" ref="Id" <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 /> :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> </q-card-section>
...@@ -323,7 +323,6 @@ ...@@ -323,7 +323,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;
} }
...@@ -333,6 +332,8 @@ ...@@ -333,6 +332,8 @@
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
// 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) { if (this.addMsg.Type == 1) {
this.coverimg = res.Data.CoverImagePath this.coverimg = res.Data.CoverImagePath
} else if (this.addMsg.Type == 4) { } else if (this.addMsg.Type == 4) {
...@@ -427,6 +428,45 @@ ...@@ -427,6 +428,45 @@
this.addMsg.Description = data this.addMsg.Description = data
} else { } else {
this.addMsg.Content = data 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) {//普通的用户保存 savemove(type) {//普通的用户保存
...@@ -504,7 +544,7 @@ ...@@ -504,7 +544,7 @@
this.releasedialog = false this.releasedialog = false
}, },
saveCourse() { saveCourse() {
if(this.PlatformId==''){ if (this.PlatformId == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: `请选择发布平台`, message: `请选择发布平台`,
...@@ -512,7 +552,7 @@ ...@@ -512,7 +552,7 @@
}) })
return return
} }
if(this.IsPreview == 1 && this.TagId==''){ if (this.IsPreview == 1 && this.TagId == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: `请输入预览的微信号`, message: `请输入预览的微信号`,
...@@ -521,8 +561,8 @@ ...@@ -521,8 +561,8 @@
return return
} }
let msg = JSON.parse(JSON.stringify(this.addMsg)) let msg = JSON.parse(JSON.stringify(this.addMsg))
msg.IsPreview = this.IsPreview; msg.IsPreview = this.IsPreview;
msg.TagId = this.TagId; msg.TagId = this.TagId;
msg.PlatformId = this.PlatformId; msg.PlatformId = this.PlatformId;
this.loading = true this.loading = true
setAdminContributeInfo(msg).then(res => { setAdminContributeInfo(msg).then(res => {
...@@ -540,7 +580,7 @@ ...@@ -540,7 +580,7 @@
} }
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
}, },
...@@ -558,7 +598,7 @@ ...@@ -558,7 +598,7 @@
}, },
tuisong() { tuisong() {
setContributeInfoPublish({ setContributeInfoPublish({
ContributeId: 12, ContributeId: 15,
PlatformId: 1, PlatformId: 1,
IsPreview: 1, IsPreview: 1,
TagId: 'goodluck_cattle', TagId: 'goodluck_cattle',
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
} }
}, },
created() { created() {
console.log(this.$route.query) // 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;
......
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
<!-- <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 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)" /> 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-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-section >
<q-item-label>提交审核</q-item-label> <q-item-label>提交审核</q-item-label>
</q-item-section> </q-item-section>
......
...@@ -171,7 +171,7 @@ ...@@ -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+=`<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" ' + ' 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=' + ' src="http://localhost:8181/#/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+
......
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