mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-08 18:36:47 +08:00
事件添加
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<view class="tabs-text" @click="tabsClick(2)" :class="{'active':active ==2}">回答<text v-show="active ==2" class="active-line"></text></view>
|
||||
</view>
|
||||
<view class="my-qa-list" v-show="active ==1">
|
||||
<view class="my-qa-index" v-for="put in putList.list" :key="put.id" @click="toDetail(put)">
|
||||
<view class="my-qa-index" v-for="(put, index) in putList.list" :key="put.id" @click="toDetail(put)">
|
||||
<view class="artical-box-top">
|
||||
<view style="" class="artical-tit">
|
||||
<text class="qa-basic qa-solve" v-if="put.isResolve">【已解决】</text>
|
||||
@@ -44,7 +44,7 @@
|
||||
<view class="rowbtn" @click.stop="toEdit(put)">
|
||||
<image class="btn-img" src="../../static/images/icon/edit.png" size="24"></image><text class="btn-text">编辑</text>
|
||||
</view>
|
||||
<view class="rowbtn" style="margin-left: 12upx;" @click.stop="del(put)">
|
||||
<view class="rowbtn" style="margin-left: 12upx;" @click.stop="del(put,index)">
|
||||
<image class="btn-img" src="../../static/images/icon/del.png" size="24"></image><text class="btn-text">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -265,7 +265,7 @@
|
||||
url:'/pages/plus/editQuestion?value='+JSON.stringify(item)
|
||||
})
|
||||
},
|
||||
del(item){
|
||||
del(item,index){
|
||||
const $this=this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
@@ -275,8 +275,24 @@
|
||||
apiQa.del(item.id).then(res=>{
|
||||
if(res.status=200){
|
||||
$this.$refs.articleToast.show({message:'删除成功',type:'success'});
|
||||
let event = {
|
||||
key: "DeleteQuestion",//
|
||||
title: "删除提问",//事件的标题
|
||||
parameters:"author:"+item.sysCreateAid,//作者参数
|
||||
content: "删除提问【"+item.title+"】",//事件的内容
|
||||
source:'page',
|
||||
objId: item.id,//关联的id
|
||||
objType: "2",//关联的类型
|
||||
objInfo: item.title,
|
||||
aid: $this.userInfo.aid, //当前登录人的id
|
||||
aname: $this.userInfo.name,//当前人的姓名
|
||||
status: 1 ,//状态,直接写1
|
||||
source:2,
|
||||
}
|
||||
apiStat.sendEvent(event);
|
||||
setTimeout(()=>{
|
||||
$this.findData(true)
|
||||
// $this.findData(true)
|
||||
$this.putList.list.splice(index, 1);
|
||||
},1000)
|
||||
}else{
|
||||
$this.$refs.articleToast.show({message:'删除失败,请稍后再试',type:'error'});
|
||||
|
||||
Reference in New Issue
Block a user