Browse Source

应对拍摄临时提交

master
蟑螂恶霸 2 years ago
parent
commit
8c781543ea
  1. 2
      src/views/Home.vue
  2. 39
      src/views/enforce/scanQrCode.vue
  3. 14
      src/views/enforceHome.vue

2
src/views/Home.vue

@ -147,7 +147,7 @@
onMounted(() => {
// console.log(useCommon.phonenumber)
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber);
new Vconsolefrom();
// new Vconsolefrom();
const access_key = '6374106c5eb449a4ad6c2430f30796e6';
const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f';

39
src/views/enforce/scanQrCode.vue

@ -58,6 +58,7 @@ import {getEnterpriseMerchantAuthorization} from '@/api/Home';
import {checkIsExists} from '@/api/enterprise';
import {szyptGetToken} from "../../api/Home";
import wx from "weixin-js-sdk";
const {useCommon} = $globalStore;
const router = useRouter();
let carouselList = reactive([]); // 轮播列表
@ -120,7 +121,8 @@ const openScan = () => {
wx.error((res) => {
console.log("获取失败");
});
},error =>{});
}, error => {
});
};
const ClickScan = () => {
wx.scanQRCode({
@ -130,24 +132,24 @@ const ClickScan = () => {
// 页面跳转
console.log("=========== 扫码返回 ===========")
console.log(res)
checkIsExists(res,success=>{
console.log(success.data)
if(success.data){
// checkIsExists(res, success => {
// console.log(success.data)
// if (success.data) {
router.push({
path: "/enterpriseScanPreview",
query: {
enterpriseNumber: res.resultStr
}
})
}else{
showFailToast('企业信息不存在,请确认二维码是否正确!');
router.push({
path:"/enforce/scanQrCode",
})
}
},error =>{
})
// } else {
// showFailToast('企业信息不存在,请确认二维码是否正确!');
// router.push({
// path: "/enforce/scanQrCode",
// })
// }
// }, error => {
//
// })
// router.push({
// path: "/enterpriseScanPreview",
// query: {
@ -229,6 +231,7 @@ const goBack = () => {
background-image: linear-gradient(to bottom, #ebf3fb, transparent);
background-size: cover;
position: relative;
.carousel_box {
position: relative;
top: 2%;
@ -246,6 +249,7 @@ const goBack = () => {
width: 30%;
font-size: 0.4rem;
color: #999;
.box-scan-text {
margin-top: 70%;
display: block;
@ -253,6 +257,7 @@ const goBack = () => {
text-align: center
}
}
.box-scan-two {
left: auto;
right: 12.5%;
@ -271,7 +276,9 @@ const goBack = () => {
padding: 0px 0px 10px 0px;
display: flex;
justify-content: center;
};
}
;
.box-qr-code {
width: 52%;
text-align: right;
@ -289,12 +296,14 @@ const goBack = () => {
display: block;
font-size: 0.45333rem;
}
img {
position: absolute;
top: 0%;
left: 34%;
}
}
.box-info {
width: 52%;
text-align: right;
@ -311,6 +320,7 @@ const goBack = () => {
font-size: 17px
}
}
.box-complaint {
width: 36%;
text-align: right;
@ -320,6 +330,7 @@ const goBack = () => {
margin-left: 2%;
background: url("@/assets/images/item_complain.png");
background-size: cover;
.box-complaint-text {
margin-right: 5%;
margin-top: 3%;

14
src/views/enforceHome.vue

@ -153,7 +153,7 @@
};
onMounted(() => {
new Vconsolefrom();
// new Vconsolefrom();
let fullUrl = window.location.href;
let code = fullUrl.substring(fullUrl.indexOf('code=') + 5, fullUrl.indexOf('&state='));
// getSzyptLoginAuth(route?.query?.code,success =>{
@ -162,12 +162,12 @@
useCommon.SET_USER_ID(success.data.userId);
// 如果不是执法用户 则跳转
if (!success.data.lawOfficer) {
router.push(
{
path: "/noAccess"
});
}
// if (!success.data.lawOfficer) {
// router.push(
// {
// path: "/noAccess"
// });
// }
}, error => {
})

Loading…
Cancel
Save