<template>
|
<view class="container" style="height: auto;">
|
<view style="margin: 0.5rem;">
|
<button @click="toDx()" class="mini-btn" style="margin-right: 10px;" type="default" size="mini">短信审核</button>
|
<button class="mini-btn" style="background-color: cornflowerblue;" type="primary" size="mini">微信朋友圈</button>
|
</view>
|
<view style="display: flex;justify-content: center; flex-direction: column; /">
|
<view>
|
<textarea maxlength="492" v-model="content" class="smstxt" placeholder="请输入朋友圈文案"
|
placeholder-class="text-color-assist font-size-base"></textarea>
|
</view>
|
<view>
|
<textarea maxlength="492" v-model="commnet" class="smstxt" placeholder="请输入评论(非必填)"
|
placeholder-class="text-color-assist font-size-base"></textarea>
|
</view>
|
<view>
|
<cl-upload action="/api/automanage/uploadpublicfile" @onSuccess="onSuccess" v-model="list" :listStyle="{
|
columns: 2,
|
columnGap: '20rpx',
|
rowGap:'20rpx',
|
padding:'10rpx',
|
height:'300rpx',
|
radius:'20rpx'
|
}">
|
<template v-slot:addImg>
|
<view class="newAddImg">
|
<view>+</view>
|
<text>添加</text>
|
</view>
|
</template>
|
</cl-upload>
|
</view>
|
</view>
|
<view style="text-align: center;margin-top: 3rem;">
|
<button @click="addSet()"
|
style="width: 10rem;height: 3rem; line-height: 3rem; font-size: 20px; color: #fff; background: green;"
|
class="mini-btn" type="default" size="mini">提交</button>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import comUtils from '@/utils/ComUtils.js'
|
export default {
|
data() {
|
return {
|
content: '',
|
list: [],
|
commnet: ''
|
}
|
},
|
onLoad(option) {
|
//this.checkId();
|
},
|
|
methods: {
|
//检查白名单
|
checkId() {
|
var openId = uni.getStorageSync('smsopenid');
|
var whiteid = comUtils.getSmsStatus(status);
|
if (openId == "" || whiteid.indexOf(openId) < 0) {
|
uni.reLaunch({
|
url: '/pages/emptypage/nopermissions'
|
})
|
} else {
|
this.getTemplateData();
|
}
|
},
|
onSuccess(reslut) {
|
// 把服务端返回的图片地址添加到list中与组件数据同步
|
this.list.push(reslut.result)
|
},
|
addSet() {
|
var param = {
|
Content: this.content,
|
PicList: this.list,
|
Commnet: this.commnet
|
}
|
var that=this;
|
that.$http.post('/api/AutoManage/AddPyq', param).then(e => {
|
uni.hideLoading();
|
if (e.result) {
|
uni.showToast({
|
title: '操作成功!',
|
icon: 'none'
|
});
|
that.content='';
|
that.list=[];
|
that.commnet='';
|
} else {
|
uni.showToast({
|
title: '操作失败!',
|
icon: 'none'
|
});
|
}
|
}).catch(function(err) {
|
uni.hideLoading()
|
console.log(err);
|
})
|
},
|
toDx()
|
{
|
uni.navigateTo({
|
url:'/pages/ad_page/sms_examine'
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
page {
|
background: #fff;
|
height: 100%;
|
}
|
|
.smstxt {
|
width: 90%;
|
margin-top: 2rem;
|
border: 1px solid;
|
}
|
|
.newAddImg {
|
width: 8rem;
|
border: 1px solid;
|
height: 8rem;
|
display: flex;
|
justify-content: center;
|
flex-direction: column;
|
text-align: center;
|
}
|
</style>
|