Commit 5a342125 authored by verestrasz's avatar verestrasz

update

parent 1697ee3e
......@@ -108,19 +108,6 @@ export const OrderMixin = {
this.$hideLoading();
},
});
this.$api({
apiName: "cancelOrder",
header:{
"apiToken":apiToken
},
postData: this.data.payId,
success: () => {
this.data.orderState = OrderStatus.CLOSE;
},
complete: () => {
this.$hideLoading();
},
});
}else{
this.$hideLoading();
}
......
......@@ -33,12 +33,12 @@
<div class="header">
商品详情
</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>
<van-popup v-model="showPopup" position="bottom" round closeable>
<div class="blind-rule">
<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>
</van-popup>
</div>
......@@ -75,16 +75,6 @@ export default {
handleRule() {
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>
......
......@@ -101,10 +101,10 @@ export default {
padding: 42px 12px 20px;
background: url("~@/assets/img/blind-box-sku.png") no-repeat;
background-size: 100%;
&-box {
width: 100%;
overflow-x: scroll;
overflow-x: auto;
overflow-y: hidden;
}
}
.blind-card {
......
......@@ -8,7 +8,7 @@
<!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> -->
<div class="title">简介</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">
<!-- <m-icon icon="icon-goods-desc" :size="12" className="icon" /> -->
<div class="title">溯源</div>
......@@ -51,7 +51,18 @@ export default {
props: {
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: {
progressWidth() {
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