Commit 62cc5464 authored by 全球's avatar 全球

防伪码优化

parent db22731c
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
scanCode(params).then(res => { scanCode(params).then(res => {
if (res.code == 0) { if (res.code == 0) {
localStorage.setItem("shaValue", res.data); localStorage.setItem("shaValue", res.data);
localStorage.setItem("qrCode", this.shaValue);
this.$router.push("/certification"); this.$router.push("/certification");
} else { } else {
this.$toast.fail(res.message); this.$toast.fail(res.message);
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<p class="countries">企业名称 <p class="countries">企业名称
<span class="countries-class">{{companyName}}</span> <span class="countries-class">{{companyName}}</span>
</p> </p>
<p class="countries" style="height: 37px">企业地址 <p class="countries" style="height: 60px">企业地址
<span class="countries-class">{{companyAddress}}</span> <span class="countries-class" style="display:block;overflow-wrap:break-word;">{{companyAddress}}</span>
</p> </p>
<p class="countries">企业网址 <p class="countries">企业网址
<span class="countries-class">{{companyUrl}}</span> <span class="countries-class">{{companyUrl}}</span>
...@@ -34,8 +34,8 @@ ...@@ -34,8 +34,8 @@
<p class="countries">货运单号 <p class="countries">货运单号
<span class="countries-class">{{trackingNumber}}</span> <span class="countries-class">{{trackingNumber}}</span>
</p> </p>
<p class="countries" style="height: 53px">物流轨迹查询平台 <p class="countries" style="height: 70px">物流轨迹查询平台
<span class="countries-class">{{logisticsUrl}}</span> <span class="countries-class" style="display:block;overflow-wrap:break-word;">{{logisticsUrl}}</span>
</p> </p>
<p class="countries">海关进境备案编号 <p class="countries">海关进境备案编号
<span class="countries-class">{{recordNumber}}</span> <span class="countries-class">{{recordNumber}}</span>
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
<p class="sum-form"><span>{{shaValue1}}</span></p> <p class="sum-form"><span>{{shaValue1}}</span></p>
<p class="sha-name" v-if="shaName == '非正品'" style="color: #ee0a24">{{shaName}}</p> <p class="sha-name" v-if="shaName == '非正品'" style="color: #ee0a24">{{shaName}}</p>
<p class="sha-name" v-else style="color: #2bee16">{{shaName}}</p> <p class="sha-name" v-else style="color: #2bee16">{{shaName}}</p>
<p class="sha-time" >{{shaTime}}</p>
<p class="sha-sum" >{{shaSum}}</p>
</van-popup> </van-popup>
</div> </div>
</template> </template>
...@@ -56,22 +58,25 @@ ...@@ -56,22 +58,25 @@
export default { export default {
data() { data() {
return { return {
brand:'西田森NMN 1300mg', brand:'',
specification:'60粒/瓶', specification:'',
productCountry:'加拿大', productCountry:'',
produceTime:'2021/1/1', produceTime:'',
validTime:'2021/1/1', validTime:'',
companyName:'日本西田森制药株式会社', companyName:'',
companyAddress:'东京都千代田区东神田2丁目6番7号608', companyAddress:'',
trackingNumber:'741741741741', trackingNumber:'',
logisticsUrl:'随意随意随意随意随意随意随意随意随意随意随意随意随意随意随意随意随', logisticsUrl:'',
recordNumber:'4646135146813', recordNumber:'',
sheetShow: false, sheetShow: false,
popupName:'本产品采用区块链技术验证防伪链上数据显示', popupName:'',
companyUrl:'', companyUrl:'',
shaValue:"", shaValue:"",
shaValue1:"", shaValue1:"",
shaName:"", shaName:"",
shaTime:'',
shaSum:'',
}; };
}, },
created() { created() {
...@@ -83,20 +88,24 @@ ...@@ -83,20 +88,24 @@
// this.$bridgeToAppFun.navigateBack(); // this.$bridgeToAppFun.navigateBack();
// } catch { // } catch {
// this.$router.go(-1); // this.$router.go(-1);
// } // }'
// }, // },
stCertList(){ stCertList(){
this.shaValue = localStorage.getItem("shaValue") this.shaValue = localStorage.getItem("shaValue")
this.sheetShow = true this.sheetShow = true
if(this.shaValue.indexOf("非")){ if(!this.shaValue.indexOf("非")){
this.shaValue1 = this.shaValue.substring(0,this.shaValue.length-4); this.shaValue1 = this.shaValue.substring(0,this.shaValue.length-39);
this.shaName = "非正品"; this.shaName = "非正品";
this.shaTime = this.shaValue.split(",")[1]
this.shaSum = this.shaValue.split(",")[2]
}else { }else {
this.shaValue1 = this.shaValue.substring(0,this.shaValue.length-3); this.shaValue1 = this.shaValue.substring(0,this.shaValue.length-39);
this.shaName = "正品"; this.shaName = "正品";
this.shaTime = this.shaValue.split(",")[1]
this.shaSum = this.shaValue.split(",")[2]
} }
const params = { const params = {
shaValue: this.shaValue, shaValue: localStorage.getItem("qrCode"),
}; };
productInfo(params).then(res => { productInfo(params).then(res => {
if (res.code == 0) { if (res.code == 0) {
...@@ -211,6 +220,16 @@ ...@@ -211,6 +220,16 @@
font-size: 30px; font-size: 30px;
padding-top: 45px; padding-top: 45px;
} }
.sha-time{
color: #666666;
font-size: 13px;
padding-left: 40px;
}
.sha-sum{
color: #666666;
font-size: 13px;
padding-left: 106px;
}
} }
} }
</style> </style>
......
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