Commit 9798c1a0 authored by youjie's avatar youjie

no message

parent 8fdfc077
......@@ -481,6 +481,18 @@
(res) => {
if (res.resultCode == 1) {
try {
if(res.data.VisaProductInfo.FeeInclude.indexOf('<img')!=-1){
res.data.VisaProductInfo.FeeInclude = this.imgTagAddStyle(res.data.VisaProductInfo.FeeInclude)
}
if(res.data.VisaProductInfo.FeeNonInclude.indexOf('<img')!=-1){
res.data.VisaProductInfo.FeeNonInclude = this.imgTagAddStyle(res.data.VisaProductInfo.FeeNonInclude)
}
if(res.data.VisaProductInfo.VisaMaterials.indexOf('<img')!=-1){
res.data.VisaProductInfo.VisaMaterials = this.imgTagAddStyle(res.data.VisaProductInfo.VisaMaterials)
}
if(res.data.VisaProductInfo.WarmTip.indexOf('<img')!=-1){
res.data.VisaProductInfo.WarmTip = this.imgTagAddStyle(res.data.VisaProductInfo.WarmTip)
}
this.dataList = res.data
this.getUserCouponList()
// #ifdef MP-ALIPAY
......@@ -518,6 +530,19 @@
}
);
},
imgTagAddStyle(htmlstr){
//正则匹配所有img标签
//var regex0 = new RegExp("(i?)(\<img)([^\>]+\>)","gmi");
//正则匹配不含style="" 或 style='' 的img标签
var regex1 = new RegExp("(i?)(\<img)(?!(.*?style=['\"](.*)['\"])[^\>]+\>)","gmi");
//给不含style="" 或 style='' 的img标签加上style=""
htmlstr = htmlstr.replace(regex1, "$2 style=\"\"$3");
//正则匹配含有style的img标签
var regex2 = new RegExp("(i?)(\<img.*?style=['\"])([^\>]+\>)","gmi");
//在img标签的style里面增加css样式(这里增加的样式:display:block;max-width:100%;height:auto;border:5px solid red;)
htmlstr = htmlstr.replace(regex2, "$2display:block;max-width:100%;height:auto;$3");
return htmlstr;
},
//立即预定
goReserce() {
this.u = uni.getStorageSync("mall_UserInfo");
......
......@@ -443,7 +443,7 @@
</view>
<view class="jz_form" style="margin: 40rpx 0; padding: 0">
<view class="form-items">
<view class="label"> 支付 </view>
<view class="label"> 总金额 </view>
<view class="val f14 regular" style="text-align: right">
<text style="margin-right: 30rpx">{{ orderData.OrderModel.PeopleNum }}</text>
<text class="red">
......
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