Commit 5a342125 authored by verestrasz's avatar verestrasz

update

parent 1697ee3e
...@@ -108,19 +108,6 @@ export const OrderMixin = { ...@@ -108,19 +108,6 @@ export const OrderMixin = {
this.$hideLoading(); this.$hideLoading();
}, },
}); });
this.$api({
apiName: "cancelOrder",
header:{
"apiToken":apiToken
},
postData: this.data.payId,
success: () => {
this.data.orderState = OrderStatus.CLOSE;
},
complete: () => {
this.$hideLoading();
},
});
}else{ }else{
this.$hideLoading(); this.$hideLoading();
} }
......
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
<div class="header"> <div class="header">
商品详情 商品详情
</div> </div>
<div class="detail" v-html="data && getHtml(data.detail)" v-finishHtml></div> <div class="detail" v-html="data&&data.detail" v-finishHtml></div>
</div> </div>
<van-popup v-model="showPopup" position="bottom" round closeable> <van-popup v-model="showPopup" position="bottom" round closeable>
<div class="blind-rule"> <div class="blind-rule">
<div class="title">规则说明</div> <div class="title">规则说明</div>
<div class="content" v-html="data && getHtml(data.blindBoxRule)"></div> <div class="content" v-html="data &&data.blindBoxRule" v-finishHtml></div>
</div> </div>
</van-popup> </van-popup>
</div> </div>
...@@ -75,16 +75,6 @@ export default { ...@@ -75,16 +75,6 @@ export default {
handleRule() { handleRule() {
this.showPopup = true this.showPopup = true
}, },
getHtml(data){
if(data){
var regex1 = new RegExp("(i?)(\<p)(?!(.*?style=['\"](.*)['\"])[^\>]+\>)", 'g')
data = data.replace(regex1, '$2 style="padding:0 10px"$3')
return data
}else{
return ""
}
}
}, },
}; };
</script> </script>
......
...@@ -101,10 +101,10 @@ export default { ...@@ -101,10 +101,10 @@ export default {
padding: 42px 12px 20px; padding: 42px 12px 20px;
background: url("~@/assets/img/blind-box-sku.png") no-repeat; background: url("~@/assets/img/blind-box-sku.png") no-repeat;
background-size: 100%; background-size: 100%;
&-box { &-box {
width: 100%; width: 100%;
overflow-x: scroll; overflow-x: auto;
overflow-y: hidden;
} }
} }
.blind-card { .blind-card {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> --> <!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> -->
<div class="title">简介</div> <div class="title">简介</div>
</div> </div>
<div class="detail" v-html="data && data.detail"></div> <div class="detail" v-html="data && data.detail" v-finishHtml></div>
<div class="desc hash flex-default"> <div class="desc hash flex-default">
<!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> --> <!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> -->
<div class="title">溯源</div> <div class="title">溯源</div>
...@@ -51,7 +51,18 @@ export default { ...@@ -51,7 +51,18 @@ export default {
props: { props: {
data: Object, data: Object,
}, },
directives:{
finishHtml:{
update(el) {
let children=el.childNodes
for(let item of children){
if(item.style.paddingLeft!=='10px'){
item.style.padding="0 10px"
}
}
}
},
},
computed: { computed: {
progressWidth() { progressWidth() {
return this.data && this.data.sales / this.data.circulation * 100 return this.data && this.data.sales / this.data.circulation * 100
......
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