苹果手机访问html文件路径,【报Bug】web-view 路径为上个页面传过来时,在苹果手机上不显示...

本文介绍了用户在列表详情页中如何通过右上角导航栏操作,包括审核稿件、查看修改痕迹、流程记录,以及针对非作者用户的特殊权限。重点展示了审核功能,通过弹窗选择通过或退回,并调用API进行实际操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

export default {

data() {

return {

userInfo: {} ,// 用户信息

item: {}

}

},

onLoad(e) {

// 获取缓存user信息

this.item = JSON.parse(e.item)

console.log('列表详情信息', JSON.parse(e.item), this.url)

this.userInfo = uni.getStorageSync('tokenInfo')

this.$forceUpdate();

},

// 右上角 导航栏按钮

onNavigationBarButtonTap(e) {

var arr1 = ['审核', '修改痕迹', '流程记录', '修改', '删除']

// 判断审核显示 1记者 2编辑 // 判断该条是否为自己的 稿源中心里isAuditor 1自己 我的列表里0自己

if (this.userInfo.isAuditor == 1) {

arr1.splice(0, 1)

}

if (this.item.isAuthor == 0 && this.userInfo.isAuthor == 1) return;

uni.showActionSheet({

itemList: arr1,

success: res => {

// 审核

if (arr1.findIndex(item => item == '审核') == res.tapIndex) {

console.log('审核')

uni.showModal({

content: '通过还是退回',

cancelText: '退回',

confirmText: '通过',

success: res=> {

if (res.confirm) {

//0 删除 1通过 2审核 99 草稿箱

this.affirmAudit(1)

} else if (res.cancel) {

uni.navigateTo({

url: '/pages/index/seeDetails/sendBack?id=' + this.item.idInfo

})

}

}

});

}

// 修改痕迹

if (arr1.findIndex(item => item == '修改痕迹') == res.tapIndex) {

console.log()

uni.navigateTo({

url: '/pages/index/seeDetails/alterTrail?id=' + this.item.idInfo

})

}

// 流程记录

if (arr1.findIndex(item => item == '流程记录') == res.tapIndex) {

uni.navigateTo({

url: '/pages/index/seeDetails/flowHistory?id=' + this.item.idInfo

})

}

// 修改

if (arr1.findIndex(item => item == '修改') == res.tapIndex) {

// 1 新闻 2 专题 3图集 4视频 5音频

switch (this.item.typeInfo) {

case 1:

uni.navigateTo({

url: '/pages/index/navList/cast_draft/cast_draft?param=' + JSON.stringify(this.item)

})

break;

case 2:

break;

case 3:

uni.navigateTo({

url: '/pages/index/navList/cast_image/cast_image?param=' + JSON.stringify(this.item)

})

break;

case 4:

break;

case 5:

break;

}

}

// 删除

if (arr1.findIndex(item => item == '删除') == res.tapIndex) {

uni.showModal({

title: '温馨提示',

content: '确定删除稿件?该操作无法撤回',

cancelText: '取消',

confirmText: '确定',

success: res => {

if (res.confirm) {

this.affirmAudit(0)

}

}

});

}

}

});

},

methods: {

// 审核操作 0 删除 1通过 2审核 99 草稿箱

examine(status) {

return new Promise((resolve, reject)=> {

uni.request({

url: this.websiteUrl + '/news/auditNews',

method: "POST",

header: {

'Content-Type': 'application/x-www-form-urlencoded',

userid: this.userInfo.id,

type: this.userInfo.isAuditor,

token: this.userInfo.tokenInfo,

siteid: this.userInfo.siteIdInfo

},

data: {

id: this.item.idInfo,

status: status //0 删除 1通过 2审核 99 草稿箱

},

success: (res) => {

resolve(res.data)

}

});

})

},

// 确定操作

async affirmAudit(e) {

var title = ''

switch (e){

case 0:

title = '删除成功'

break;

case 1:

title = '已通过'

break;

default:

break;

}

try{

var example1 = await this.examine(e)

console.log(example1)

if (example1.code == 1) {

uni.showToast({

icon: 'none',

title: title,

duration: 1000

})

var timer1 = setTimeout(()=>{

uni.navigateBack({

delta:1

})

}, 1000)

this.$once('hook:beforeDestroy',()=>{

clearTimeout(timer1)

})

}

}catch(e){

//TODO handle the exception

}

}

}

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值