优化详情图片的处理
parent
43a6919f78
commit
1df03872a0
|
@ -651,10 +651,9 @@ const tools = {
|
|||
return arrEntities[t];
|
||||
})
|
||||
.replace('<section', '<div')
|
||||
// .replace(/\<img/g, '<img style="max-width:100%!important;width:100%!important;height:auto" mode="widthFix" ')
|
||||
.replace(/\<img/g, '<img mode="widthFix" ')
|
||||
.replace(/src=\"/g,'src="https://7and5.cn')
|
||||
.replace(/style="[^\"]*?"/g,'style="max-width:100%!important;width:100%!important;height:auto" ');
|
||||
.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, (match, p1) => {
|
||||
return `<img mode="widthFix" style="max-width:100%!important;height:auto" src='${p1.indexOf('http') > -1 ? p1 : 'https://7and5.cn' + p1}' />`
|
||||
})
|
||||
},
|
||||
// 检查网络状态
|
||||
networkStatus(){
|
||||
|
@ -864,6 +863,14 @@ const tools = {
|
|||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @description 自动返回上一页事件
|
||||
*/
|
||||
automaticBack() {
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack({delta:1})
|
||||
},2000)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -272,6 +272,7 @@
|
|||
this.allPrice = res.data.pay_price;//费用合计
|
||||
} else {
|
||||
this.$toolAll.tools.showToast(res.msg);
|
||||
this.$toolAll.tools.automaticBack();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue