|
|
|
@ -15,14 +15,14 @@ |
|
|
|
<div class="warp_body"> |
|
|
|
<!-- <refresh-list v-model:freshMap="freshMap" @refresh="onRefresh" @onLoad="onLoad"> --> |
|
|
|
<div class="white-body"> |
|
|
|
<!-- <div class="carousel_box"> |
|
|
|
<div class="carousel_box"> |
|
|
|
<div class="box-scan-one"> |
|
|
|
<span class="box-scan-text">扫一扫<br/>企业二维码</span> |
|
|
|
</div> |
|
|
|
<div class="box-scan-two"> |
|
|
|
<span class="box-scan-text">即可查看<br/>企业信息</span> |
|
|
|
</div> |
|
|
|
</div>--> |
|
|
|
</div> |
|
|
|
<div class="boutique_box"> |
|
|
|
<!-- <van-cell :border="false" title="精品" /> --> |
|
|
|
<div class="boutique_body"> |
|
|
|
@ -32,48 +32,23 @@ |
|
|
|
<span class="box-qr-code-text">执法监督码</span>--> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="scan-note">扫一扫企业二维码,即可查看企业信息</div> |
|
|
|
<!-- <div class="nocode" @click="toNoScanView">扫码不成功?手动输入关键词查询 >></div>--> |
|
|
|
<div class="nocode" @click="showPopup()">手动登记,请输入关键字搜索企业 >></div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="nav-div"> |
|
|
|
<div @click="showPopup()"><van-icon name="search" /><span>企业搜索</span> |
|
|
|
<div class="act-note">扫码不成功?手动输入关键词查询</div> |
|
|
|
</div> |
|
|
|
<div><van-icon name="records-o" /><span>补录</span> |
|
|
|
<div class="act-note">仅限因特殊情形,需先检查,后登记相关检查信息</div> |
|
|
|
</div> |
|
|
|
</div>--> |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- <div class="addinfo" @click="toRecord">补录</div>--> |
|
|
|
|
|
|
|
|
|
|
|
<div class="record">如遇网络异常、设备故障无法登录系统的情况,<a @click="toSign">补录 >></a></div> |
|
|
|
</div> |
|
|
|
<!-- <div class="recommend_box"> |
|
|
|
<van-cell :border="false" title="推荐" /> |
|
|
|
<div class="recommend_body"> |
|
|
|
<goodsCard :goodsList="recommend"></goodsCard> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
<div class="nocode" @click="toNoScanView">没有企业码?手动输入关键词查询 >></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- <div class="recommend_box"> |
|
|
|
<van-cell :border="false" title="推荐" /> |
|
|
|
<div class="recommend_body"> |
|
|
|
<goodsCard :goodsList="recommend"></goodsCard> |
|
|
|
</div> |
|
|
|
</div> --> |
|
|
|
<!-- </refresh-list> --> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 底部 --> |
|
|
|
<!-- <div class="footer_body"> |
|
|
|
<footer-nav></footer-nav> |
|
|
|
</div> --> |
|
|
|
<popup :visible="popupVisible" :content="data.lawContent" @close="closePopup" @reciveData=""/> |
|
|
|
</div> |
|
|
|
<!-- <van-popup v-model:show="data.showNoScanPicker" position="bottom"> |
|
|
|
<van-calendar v-model:show="data.showOperatingTermPicker" type="range" |
|
|
|
:min-date="data.minDate" :max-date="data.maxDate" @confirm="onOperatingTermConfirm" /> |
|
|
|
</van-popup> --> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup name="Home"> |
|
|
|
@ -126,14 +101,13 @@ |
|
|
|
let fullUrl = window.location.href; |
|
|
|
let code = fullUrl.substring(fullUrl.indexOf('code=') + 5, fullUrl.indexOf('&state=')); |
|
|
|
let paramUrl = window.location.href.split("#")[0]; |
|
|
|
let param = {code: code, url: paramUrl}; |
|
|
|
console.log(paramUrl); |
|
|
|
let param = {code: code, url: fullUrl}; |
|
|
|
szyptGetToken(param, success => { |
|
|
|
let resMsg = success.data; |
|
|
|
console.log(resMsg); |
|
|
|
wx.config({ |
|
|
|
// 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 |
|
|
|
debug: true, |
|
|
|
debug: false, |
|
|
|
// 必填,公众号的唯一标识 |
|
|
|
appId: resMsg.corpid, |
|
|
|
// 必填,生成签名的时间戳 |
|
|
|
@ -150,7 +124,7 @@ |
|
|
|
ClickScan() |
|
|
|
}); |
|
|
|
wx.error((res) => { |
|
|
|
console.log("获取失败"); |
|
|
|
console.log("获取失败", res); |
|
|
|
}); |
|
|
|
}, error => { |
|
|
|
}); |
|
|
|
@ -165,23 +139,24 @@ |
|
|
|
console.log(res) |
|
|
|
//TODO 判断是否是市监 |
|
|
|
if(isHttpLink(res.resultStr)){ |
|
|
|
//判断地址是否存在cid统一信用代码 |
|
|
|
getEnterpriseInfoBySj({"url":res.resultStr},success =>{ |
|
|
|
if (success.success) { |
|
|
|
router.push({ |
|
|
|
path: "/enterpriseScanPreview", |
|
|
|
query: { |
|
|
|
enterpriseNumber: success.data.salt, |
|
|
|
isNoScan: false |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
showFailToast(success.message); |
|
|
|
router.push({ |
|
|
|
path: "/enforce/scanQrCode", |
|
|
|
}) |
|
|
|
} |
|
|
|
},error =>{}) |
|
|
|
|
|
|
|
getEnterpriseInfoBySj({"url":res.resultStr},success =>{ |
|
|
|
if (success.success) { |
|
|
|
router.push({ |
|
|
|
path: "/enterpriseScanPreview", |
|
|
|
query: { |
|
|
|
enterpriseNumber: success.data.salt, |
|
|
|
isNoScan: false |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
showFailToast(success.message); |
|
|
|
router.push({ |
|
|
|
path: "/enforce/scanQrCode", |
|
|
|
}) |
|
|
|
} |
|
|
|
},error =>{}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
const scanObj = JSON.parse(res.resultStr); |
|
|
|
// 判断二维码是否过期, 如果已过期则跳转提示页 |
|
|
|
@ -205,22 +180,21 @@ |
|
|
|
showFailToast("该二维码不正确"); |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
error: function(res) { |
|
|
|
console.log("错误回调",res) |
|
|
|
if (res.errMsg.indexOf('function_not_exist') > 0) { |
|
|
|
showFailToast('版本过低请升级') |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
cancel: (res) => { |
|
|
|
console.log('err', res); |
|
|
|
}, |
|
|
|
|
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
const toScanPageView = async () => { |
|
|
|
openScan(); |
|
|
|
// router.push({ |
|
|
|
// path: "/enforce/scanPage_szy", |
|
|
|
// query: {} |
|
|
|
// }); |
|
|
|
}; |
|
|
|
|
|
|
|
const toNoScanView = async () => { |
|
|
|
@ -246,6 +220,9 @@ |
|
|
|
freshMap.listFinished = false; |
|
|
|
freshMap.listLoading = true; |
|
|
|
freshMap.refreshLoad = true; |
|
|
|
// Promise.all([getCarousel(), boutiqueGoods(), recommendGoods()]).then(() => { |
|
|
|
// freshMap.refreshLoad = false; |
|
|
|
// }); |
|
|
|
}; |
|
|
|
|
|
|
|
// 触底加载 |
|
|
|
@ -253,62 +230,24 @@ |
|
|
|
// recommendGoods(true); |
|
|
|
}; |
|
|
|
|
|
|
|
// onMounted(() => { |
|
|
|
// // new Vconsole(); |
|
|
|
// getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber}, success => { |
|
|
|
// if (success.data != null && success.data.length > 0) { |
|
|
|
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); |
|
|
|
// } |
|
|
|
// }, error => { |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
// new Vconsole(); |
|
|
|
getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber}, success => { |
|
|
|
if (success.data != null && success.data.length > 0) { |
|
|
|
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); |
|
|
|
} |
|
|
|
}, error => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
// 返回 |
|
|
|
const goBack = () => { |
|
|
|
router.go(-1); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const toSign = () => { |
|
|
|
router.push({ |
|
|
|
path: "/sign", |
|
|
|
query: { |
|
|
|
// enterpriseNumber: data.enterpriseNumber, |
|
|
|
reason: '补录', |
|
|
|
checkCss: 3, |
|
|
|
checkCss: 9, |
|
|
|
isNoScan: true, |
|
|
|
} |
|
|
|
}); |
|
|
|
}; |
|
|
|
const isHttpLink = (url) =>{ |
|
|
|
return url.indexOf("http://") === 0 || url.indexOf("https://") === 0; |
|
|
|
} |
|
|
|
</script> |
|
|
|
<script> |
|
|
|
//不扫码企业筛选弹窗 |
|
|
|
import Popup from '@/views/enforce/noScanFilter.vue'; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
Popup |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
popupVisible: false, |
|
|
|
popupContent: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
showPopup() { |
|
|
|
this.popupVisible = true; |
|
|
|
}, |
|
|
|
closePopup() { |
|
|
|
this.popupVisible = false; |
|
|
|
} |
|
|
|
const isHttpLink = (url) =>{ |
|
|
|
return url.indexOf("http://") === 0 || url.indexOf("https://") === 0; |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less" scoped> |
|
|
|
.home { |
|
|
|
display: flex; |
|
|
|
@ -357,7 +296,7 @@ export default { |
|
|
|
|
|
|
|
.boutique_box { |
|
|
|
position: relative; |
|
|
|
top: 25%; |
|
|
|
top: 10%; |
|
|
|
z-index: 100; |
|
|
|
width: 100%; |
|
|
|
|
|
|
|
@ -371,7 +310,7 @@ export default { |
|
|
|
.box-qr-code { |
|
|
|
width: 52%; |
|
|
|
text-align: right; |
|
|
|
height: 6rem; |
|
|
|
height: 7rem; |
|
|
|
//background-color: var(--van-primary-color); |
|
|
|
background: url("../../assets/images/scan-btn.jpg") no-repeat center center; |
|
|
|
background-size: 100%; |
|
|
|
@ -398,7 +337,6 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.white-body { |
|
|
|
position: relative; |
|
|
|
margin: 0 3%; |
|
|
|
width: 94%; |
|
|
|
height: 99%; |
|
|
|
@ -407,212 +345,10 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.nocode { |
|
|
|
margin: 15% 0 0; |
|
|
|
width: 100%; |
|
|
|
color: #fb7905; |
|
|
|
font-size: 0.42rem; |
|
|
|
text-align: center; |
|
|
|
line-height: 5; |
|
|
|
} |
|
|
|
|
|
|
|
.scan-note { |
|
|
|
width: 100%; |
|
|
|
color: #d3d0d0; |
|
|
|
font-size: 0.35rem; |
|
|
|
text-align: center; |
|
|
|
line-height: 2; |
|
|
|
line-height: 3; |
|
|
|
} |
|
|
|
|
|
|
|
.popup { |
|
|
|
position: fixed; |
|
|
|
top: 0; |
|
|
|
left: 0; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
background: rgba(0, 0, 0, 0.35); |
|
|
|
} |
|
|
|
|
|
|
|
.popup-content { |
|
|
|
position: fixed; |
|
|
|
z-index: 999; |
|
|
|
bottom: 0; |
|
|
|
left: 0; |
|
|
|
padding: 0 3%; |
|
|
|
width: 94%; |
|
|
|
height: 35vh; |
|
|
|
background: #fff; |
|
|
|
overflow-y: auto; |
|
|
|
font-size: 0.37rem; |
|
|
|
} |
|
|
|
|
|
|
|
.subtitle { |
|
|
|
margin: 5% 2% 2%; |
|
|
|
width: 96%; |
|
|
|
/*font-size: 0.4rem; |
|
|
|
font-weight: 600;*/ |
|
|
|
border-bottom: 1px solid #f4f4f4; |
|
|
|
line-height: 2; |
|
|
|
} |
|
|
|
|
|
|
|
.item-btn { |
|
|
|
float: left; |
|
|
|
margin: 0.3rem 0.2rem; |
|
|
|
padding: 0.2rem 0.3rem; |
|
|
|
background-color: #f2f3f4; |
|
|
|
color: #999; |
|
|
|
border-radius: 1rem; |
|
|
|
font-size: 0.35rem; |
|
|
|
} |
|
|
|
|
|
|
|
.item-btn.active { |
|
|
|
background-color: #e9f2fb; |
|
|
|
color: #1367fe; |
|
|
|
} |
|
|
|
|
|
|
|
.btnbox { |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
position: absolute; |
|
|
|
bottom: 1rem; |
|
|
|
left: 5%; |
|
|
|
width: 90%; |
|
|
|
height: 1rem; |
|
|
|
} |
|
|
|
|
|
|
|
.btn-reset { |
|
|
|
display: inline-block; |
|
|
|
margin: 0 2%; |
|
|
|
padding: 0; |
|
|
|
width: 60%; |
|
|
|
color: #fff; |
|
|
|
font-size: 0.35rem; |
|
|
|
border-radius: 1rem; |
|
|
|
background: #1367fe; |
|
|
|
border: 1px solid #1367fe; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
.btn-search { |
|
|
|
display: inline-block; |
|
|
|
margin: 3% 7%; |
|
|
|
padding: 0; |
|
|
|
width: 70%; |
|
|
|
color: #fff; |
|
|
|
font-size: 0.35rem; |
|
|
|
border-radius: 1rem; |
|
|
|
background: #1367fe; |
|
|
|
border: 1px solid #1367fe; |
|
|
|
text-align: center; |
|
|
|
height: 90%; |
|
|
|
} |
|
|
|
|
|
|
|
.btn-reset { |
|
|
|
width: 35%; |
|
|
|
background-color: #fff; |
|
|
|
border-color: rgba(19, 103, 254, .7); |
|
|
|
color: #1367fe; |
|
|
|
} |
|
|
|
|
|
|
|
.close-button { |
|
|
|
position: absolute; |
|
|
|
top: 0.15rem; |
|
|
|
right: 0.1rem; |
|
|
|
width: 0.8rem; |
|
|
|
height: 0.8rem; |
|
|
|
background-color: rgba(255, 255, 255, .5); |
|
|
|
border: 0.05rem solid rgba(255, 255, 255, .7); |
|
|
|
border-radius: 50%; |
|
|
|
transform: rotate(45deg); |
|
|
|
} |
|
|
|
|
|
|
|
.close-button:before, |
|
|
|
.close-button:after { |
|
|
|
content: ''; |
|
|
|
position: absolute; |
|
|
|
top: 50%; |
|
|
|
left: 50%; |
|
|
|
background: #333; |
|
|
|
border-radius: 50%; |
|
|
|
transform: translate(-50%, -50%); |
|
|
|
height: 0.4rem; |
|
|
|
width: 0.02rem; |
|
|
|
} |
|
|
|
|
|
|
|
.close-button:after { |
|
|
|
height: 0.02rem; |
|
|
|
width: 0.4rem; |
|
|
|
} |
|
|
|
|
|
|
|
.nav-div { |
|
|
|
display: flex; |
|
|
|
margin: 15% 2% 0; |
|
|
|
width: 96%; |
|
|
|
color: #287eef; |
|
|
|
font-size: 0.4rem; |
|
|
|
line-height: 2; |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
|
|
|
|
.nav-div > div { |
|
|
|
margin: 2% 3%; |
|
|
|
width: 45%; |
|
|
|
} |
|
|
|
|
|
|
|
.nav-div div span{ |
|
|
|
display: block; |
|
|
|
} |
|
|
|
|
|
|
|
.nav-div div i { |
|
|
|
margin: 0.35rem; |
|
|
|
width: 1.5rem; |
|
|
|
height: 1.5rem; |
|
|
|
font-size: 0.8rem; |
|
|
|
background: #e6eff7; |
|
|
|
border-radius: 50%; |
|
|
|
text-align: center; |
|
|
|
line-height: 1.85; |
|
|
|
} |
|
|
|
|
|
|
|
.nav-div .act-note { |
|
|
|
margin: 10% 0 0; |
|
|
|
width: 100%; |
|
|
|
font-size: 0.3rem; |
|
|
|
color: #d3d0d0; |
|
|
|
line-height: 1.5; |
|
|
|
text-align: left; |
|
|
|
} |
|
|
|
|
|
|
|
.addinfo { |
|
|
|
position: absolute; |
|
|
|
bottom: 2rem; |
|
|
|
right: 2%; |
|
|
|
z-index: 999; |
|
|
|
width: 1.5rem; |
|
|
|
height: 1.5rem; |
|
|
|
background-color: #e0e9f9; |
|
|
|
border-radius: 50%; |
|
|
|
box-shadow: 0 0 0.27rem #90b6f9; |
|
|
|
color: #0240f7; |
|
|
|
font-size: 0.4rem; |
|
|
|
text-align: center; |
|
|
|
vertical-align: middle; |
|
|
|
padding-top: 0.45rem; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
|
|
|
|
.record { |
|
|
|
position: absolute; |
|
|
|
bottom: 2rem; |
|
|
|
color: #bbbaba; |
|
|
|
font-size: 0.35rem; |
|
|
|
width: 100%; |
|
|
|
text-align: center; |
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
|
|
|
|
.record a { |
|
|
|
color: #287eef; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|