提交 c4774c67 authored 作者: 羊富学's avatar 羊富学

防伪页面

上级 90b925ec
......@@ -3,7 +3,8 @@
"pages/index/index",
"pages/attention/attention",
"pages/cameraTakePhoto/cameraTakePhoto",
"pages/upload/upload"
"pages/upload/upload",
"pages/anti/anti"
],
"window": {
"backgroundTextStyle": "light",
......@@ -15,7 +16,7 @@
"backgroundColorBottom": "#Afff"
},
"sitemapLocation": "sitemap.json",
"permission":{
"permission": {
"scope.userLocation": {
"desc": "位置信息将用于定位"
}
......
// pages/anti/anti.js
Page({
/**
* 页面的初始数据
*/
data: {
cpid:'',
antiData:{}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
cpid:options.cpid
})
this.getData()
},
getData(){
wx.showLoading({title:'正在加载'})
wx.request({
url:'https://tjfnew.china315net.com/dist/zhongfen/ajax/fw.ashx',
data:{
cpid: this.data.cpid
},
success:(res) => {
this.setData({
antiData: res.data
})
},
complete(){
wx.hideLoading()
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<view id="con" style="height:100%;disviewlay:none">
<image src="https://tjfnew.china315net.com/dist/zhongfen/img/banner.png" class="banner" />
<view class="content">
<view class="title">-防伪查询-</view>
<view class="qrcode">
<image id="fwimg" src="data:image/png;base64,{{antiData.img}}" />
</view>
<view class="tiview">
<view>请认真核对实物标签是否与图像一致,相符则为正品,否则谨防假冒!</view>
</view>
<view class="result">
<view>标签序号为:{{antiData.box_code}}</view>
</view>
<!--<view class="btn">AI认证</view>-->
</view>
</view>
page {
background-color: #d3dbe2
}
.banner {
display: block;
width: 100%;
line-height: 0
}
.content {
margin: 20rpx;
padding: 20rpx;
background-color: #fff;
border-radius: 10rpx;
text-align: center;
}
.title {
font-size: 36rpx;
font-weight: bold;
}
.btn {
width: 40vw;
margin: 1rem auto 0;
height: 9.333333vw;
line-height: 9.333333vw;
text-align: center;
color: #fff;
background-color: #16202a;
border-radius: 9.333333vw;
font-size: .8rem;
}
.qrcode {
margin: 20rpx 0;
}
.qrcode #fwimg {
width: 300rpx;
height: 300rpx;
}
/* .tip {
margin: 2.666667vw 0;
padding: 2.666667vw;
width: 100%;
border-top: 1px solid #444;
border-bottom: 1px solid #444;
text-align: left;
font-size: .7rem;
} */
/* .result {
padding-left: 1rem;
text-align: left;
font-size: .7rem;
} */
.tiview {
padding: 25rpx 0;
text-align: start;
border-bottom: 2rpx solid #000;
border-top: 2rpx solid #000;
}
.result {
margin: 20rpx 0;
padding-left: 40rpx;
text-align: start;
}
\ No newline at end of file
......@@ -38,9 +38,12 @@ Page({
showmodel:false
})
console.log('this.data.zhongfen',this.data.zhongfen)
this.setData({
webviewUrl: `https://tjfnew.china315net.com/dist/zhongfen/route.ashx?cpid=${options.cpid}`,
});
// this.setData({
// webviewUrl: `https://tjfnew.china315net.com/dist/zhongfen/route.ashx?cpid=${options.cpid}`,
// });
wx.navigateTo({
url:`/pages/anti/anti?cpid=${options.cpid}`
})
}
// wx.clearStorageSync(); // 清空本地缓存数据
wx.getSystemInfo({
......
......@@ -40,7 +40,8 @@
"disableUseStrict": false,
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false
"useCompilerPlugins": false,
"condition": false
},
"compileType": "miniprogram",
"libVersion": "2.25.3",
......
......@@ -41,6 +41,13 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/anti/anti",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论