Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/Home.vue
master
chenrui 2 years ago
parent
commit
e2c699cabd
  1. 3
      src/api/Home.js
  2. 452
      src/views/Home.vue
  3. 1
      src/views/administrative/appointment.vue
  4. 2
      src/views/enforce/lawFilter.vue
  5. 4
      src/views/enforce/sign.vue

3
src/api/Home.js

@ -18,4 +18,5 @@ export const getSiqLoginAuthTest = (params, success, error) => _post("/app/third
export const getSzyptLoginAuth = (code, success, error) => _get("/app/thirdLogin/szyptLogin/"+code,null,success,error); export const getSzyptLoginAuth = (code, success, error) => _get("/app/thirdLogin/szyptLogin/"+code,null,success,error);
export const szyptGetToken = (params, success, error) => _get("/app/thirdLogin/szyptGetToken",params,success,error); export const szyptGetToken = (params, success, error) => _get("/app/thirdLogin/szyptGetToken",params,success,error);
// 获取包裹的数据
export const siqCode = (params, success, error) => _get("/app/thirdLogin/getSiqCode",params,success,error);

452
src/views/Home.vue

@ -50,7 +50,7 @@
import Vconsolefrom from 'vconsole'; import Vconsolefrom from 'vconsole';
import * as w6s from 'szient-js-sdk'; import * as w6s from 'szient-js-sdk';
import sha1 from 'crypto-js/sha1'; import sha1 from 'crypto-js/sha1';
import {getEnterpriseMerchantAuthorization, getSiqLoginAuth, getSiqLoginAuthTest} from '../api/Home'; import {getEnterpriseMerchantAuthorization, getSiqLoginAuth, getSiqLoginAuthTest, siqCode} from '../api/Home';
import {showSuccessToast} from "vant"; import {showSuccessToast} from "vant";
import 'vant/es/toast/style'; import 'vant/es/toast/style';
@ -147,82 +147,87 @@
onMounted(() => { onMounted(() => {
// console.log(useCommon.phonenumber) // console.log(useCommon.phonenumber)
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber); // useCommon.SET_USER_PHONENUMBER(success.data.phonenumber);
new Vconsolefrom(); // new Vconsolefrom();
const access_key = '6374106c5eb449a4ad6c2430f30796e6'; // const access_key = '6374106c5eb449a4ad6c2430f30796e6';
const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f'; // const access_secret = '434fec85aa5846e88bbeb8fac6cf6d7f';
// generateRandomNumber() // generateRandomNumber()
const nonce = generateRandomNumber();
const timestamp = `${Date.now()}`;
const str = [access_secret, nonce, timestamp]
.sort()
.reduce((str, item) => str += item, '');
//
const signature = sha1(str).toString().toLowerCase();
// //i
getSiqLoginAuthTest({userId: "1795031916332843009", userName: "陈瑞"},success =>{
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber);
useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString());
useCommon.SET_TOKEN(success.data.token);
console.log("phone : "+useCommon.phonenumber);
console.log("token : "+useCommon.token);
getEnterpriseMerchant(success.data.phonenumber.toString());
},error =>{})
// w6s.config({
// access_key: access_key,
// nonce: nonce,
// timestamp: timestamp,
// signature: signature,
// })
// .then((res) => {
// //
// console.log("", res);
// })
// .catch((err) => {
// //
// // console.log(err)
// console.log("", err);
// // todo
// if(useCommon.phonenumber != '' || useCommon.phonenumber != null){
// getEnterpriseMerchant(useCommon.phonenumber.toString());
// }
// });
// w6s.ready(() => {
// w6s.szient.getAuthCode({
// success: function (res) {
// console.log(res)
// console.log("", res);
// console.log("code: " + res.result.result.code);
// getSiqLoginAuth({code: res.result.result.code}, success => {
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString());
// useCommon.SET_USER_ID(success.data.userId);
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber);
// getEnterpriseMerchant(success.data.phonenumber.toString());
// }, error => {
// console.log("error : " + error)
// })
// },
// fail: function (err) {
// console.log(err)
// console.log("", err);
// },
// });
// });
// getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber},success =>{ siqCode(null, success => {
// if(!(success.data == null && success.data.length == 0)){ let access_key = "";
// console.log("success.data[0].enterpriseNumber :" + success.data[0].enterpriseNumber) let access_secret = "";
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); if (success.success) {
// } access_key = success.data.accessKey;
// },error =>{ access_secret = success.data.accessSecret;
// }) }
const nonce = generateRandomNumber();
const timestamp = `${Date.now()}`;
const str = [access_secret, nonce, timestamp]
.sort()
.reduce((str, item) => str += item, '');
//
const signature = sha1(str).toString().toLowerCase();
//i
// getSiqLoginAuthTest({userId: "1795031916332843009", userName: ""}, success => {
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber);
// useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString());
// console.log("phone : " + useCommon.phonenumber);
// }, error => {
// })
w6s.config({
access_key: access_key,
nonce: nonce,
timestamp: timestamp,
signature: signature,
}).then((res) => {
//
console.log("鉴权", res);
}).catch((err) => {
//
// console.log(err)
console.log("鉴权", err);
// todo
getEnterpriseMerchant(useCommon.phonenumber.toString());
});
w6s.ready(() => {
w6s.szient.getAuthCode({
success: function (res) {
console.log(res)
console.log("认证", res);
console.log("code: " + res.result.result.code);
getSiqLoginAuth({code: res.result.result.code}, success => {
useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString());
useCommon.SET_USER_ID(success.data.userId);
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber);
getEnterpriseMerchant(success.data.phonenumber.toString());
}, error => {
console.log("error : " + error)
})
},
fail: function (err) {
console.log(err)
console.log("认证", err);
},
});
});
// getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber},success =>{
// if(!(success.data == null && success.data.length == 0)){
// console.log("success.data[0].enterpriseNumber :" + success.data[0].enterpriseNumber)
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber);
// }
// },error =>{
// })
});
}); });
</script> </script>
@ -235,15 +240,15 @@
background-color: #f4f4f4; background-color: #f4f4f4;
.warp_body { .warp_body {
position: relative; position: relative;
margin: 0; margin: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #c6e6ff url("../assets/images/bg_c.jpg") no-repeat top; background: #c6e6ff url("../assets/images/bg_c.jpg") no-repeat top;
background-size: auto 100%; background-size: auto 100%;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
margin-top: 0%;
.carousel_box { .carousel_box {
height: 4rem; height: 4rem;
width: 100%; width: 100%;
@ -253,149 +258,152 @@
} }
.boutique_box { .boutique_box {
position: absolute; position: absolute;
width: 100%; width: 100%;
bottom: 1%; bottom: 1%;
.boutique_body { .boutique_body {
padding: 0 0 0.27rem 0; padding: 0 0 0.27rem 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.box-qr-code { .box-qr-code {
position: relative; position: relative;
margin: 2% 0; margin: 2% 0;
width: 90%; width: 90%;
height: 3.67rem; height: 3.67rem;
text-align: right; text-align: right;
border-radius: 0.27rem; border-radius: 0.27rem;
.box-qr-code-text {
position: absolute;
z-index: 10;
top: 0.35rem;
right: 0.35rem;
display: block;
font-size: 0.5rem;
}
}
.box-qr-code-text { .box-qr-code::before {
position: absolute; content: "";
z-index: 10; position: absolute;
top: 0.35rem; top: -0.14rem;
right: 0.35rem; left: -0.14rem;
display: block; z-index: 0;
font-size: 0.5rem; width: calc(100% + 0.13rem);
} height: calc(100% + 0.13rem);
} background-color: #fff;
.box-qr-code::before { border: 0.14rem solid rgba(255, 255, 255, 0.5);
content: ""; border-radius: 0.27rem;
position: absolute; }
top: -0.14rem;
left: -0.14rem;
z-index: 0;
width: calc(100% + 0.13rem);
height: calc(100% + 0.13rem);
background-color: #fff;
border: 0.14rem solid rgba(255,255,255,0.5);
border-radius: 0.27rem;
}
.box-qr-code::after { .box-qr-code::after {
content: ""; content: "";
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1; z-index: 1;
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 0.27rem; border-radius: 0.27rem;
background: #fff url("../assets/images/item_code.jpg") no-repeat left; background: #fff url("../assets/images/item_code.jpg") no-repeat left;
background-size: auto 100%; background-size: auto 100%;
border: 1px solid #8db4ff; border: 1px solid #8db4ff;
} }
.box-info { .box-info {
position: relative; position: relative;
margin-right: 2%; margin-right: 2%;
width: 50%; width: 50%;
height: 3.67rem; height: 3.67rem;
text-align: right; text-align: right;
border-radius: 0.27rem; border-radius: 0.27rem;
.box-info-text {
position: absolute;
z-index: 10;
top: 0.35rem;
right: 0.35rem;
display: block;
font-size: 0.5rem;
}
}
.box-info-text { .box-info::before {
position: absolute; content: "";
z-index: 10; position: absolute;
top: 0.35rem; top: -0.14rem;
right: 0.35rem; left: -0.14rem;
display: block; z-index: 0;
font-size: 0.5rem; width: calc(100% + 0.13rem);
} height: calc(100% + 0.13rem);
} background-color: #fff;
.box-info::before { border: 0.14rem solid rgba(255, 255, 255, 0.5);
content: ""; border-radius: 0.27rem;
position: absolute; }
top: -0.14rem;
left: -0.14rem; .box-info::after {
z-index: 0; content: "";
width: calc(100% + 0.13rem); position: absolute;
height: calc(100% + 0.13rem); top: 0;
background-color: #fff; left: 0;
border: 0.14rem solid rgba(255,255,255,0.5); z-index: 1;
border-radius: 0.27rem; width: 100%;
} height: 100%;
border-radius: 0.27rem;
background: #fff url("../assets/images/item_checkc.jpg") no-repeat left;
background-size: auto 100%;
border: 1px solid #8db4ff;
}
.box-info::after { .box-complaint {
content: ""; position: relative;
position: absolute; margin-left: 3%;
top: 0; width: 35%;
left: 0; height: 3.67rem;
z-index: 1; text-align: right;
width: 100%; border-radius: 0.27rem;
height: 100%;
border-radius: 0.27rem; .box-complaint-text {
background: #fff url("../assets/images/item_checkc.jpg") no-repeat left; position: absolute;
background-size: auto 100%; z-index: 10;
border: 1px solid #8db4ff; top: 0.35rem;
right: 0.35rem;
display: block;
font-size: 0.5rem;
}
}
} }
.box-complaint { .box-complaint::before {
position: relative; content: "";
margin-left: 3%; position: absolute;
width: 35%; top: -0.14rem;
height: 3.67rem; left: -0.14rem;
text-align: right; z-index: 0;
border-radius: 0.27rem; width: calc(100% + 0.13rem);
height: calc(100% + 0.13rem);
background-color: #fff;
border: 0.14rem solid rgba(255, 255, 255, 0.5);
border-radius: 0.27rem;
}
.box-complaint-text { .box-complaint::after {
content: "";
position: absolute; position: absolute;
z-index: 10; top: 0;
top: 0.35rem; left: 0;
right: 0.35rem; z-index: 1;
display: block; width: 100%;
font-size: 0.5rem; height: 100%;
} border-radius: 0.27rem;
background: #fff url("../assets/images/item_complain.jpg") no-repeat left;
background-size: auto 100%;
border: 1px solid #8db4ff;
} }
}
.box-complaint::before {
content: "";
position: absolute;
top: -0.14rem;
left: -0.14rem;
z-index: 0;
width: calc(100% + 0.13rem);
height: calc(100% + 0.13rem);
background-color: #fff;
border: 0.14rem solid rgba(255,255,255,0.5);
border-radius: 0.27rem;
}
.box-complaint::after {
content: "";
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 100%;
height: 100%;
border-radius: 0.27rem;
background: #fff url("../assets/images/item_complain.jpg") no-repeat left;
background-size: auto 100%;
border: 1px solid #8db4ff;
}
.recommend_box { .recommend_box {
.recommend_body { .recommend_body {
@ -416,17 +424,17 @@
} }
@media screen and (max-width: 380px) { @media screen and (max-width: 380px) {
.home .warp_body { .home .warp_body {
background: #c6e6ff url("../assets/images/bg_c.jpg") no-repeat top; background: #c6e6ff url("../assets/images/bg_c.jpg") no-repeat top;
background-size: 100% auto; background-size: 100% auto;
} }
} }
@media screen and (min-width: 540px) { @media screen and (min-width: 540px) {
.home .warp_body { .home .warp_body {
background: #c6e6ff url("../assets/images/bg_c.jpg") no-repeat top; background: #c6e6ff url("../assets/images/bg_c.jpg") no-repeat top;
background-size: 100% auto; background-size: 100% auto;
} }
} }
</style> </style>

1
src/views/administrative/appointment.vue

@ -107,7 +107,6 @@
rows="2" rows="2"
autosize autosize
type="textarea" type="textarea"
maxlength="50"
placeholder="请选择" placeholder="请选择"
show-word-limit show-word-limit
readonly readonly

2
src/views/enforce/lawFilter.vue

@ -18,7 +18,7 @@
<div class="search-result"> <div class="search-result">
<div class="case-item" v-for="(item, index) in dataList" :key="index" @click="selectData(item)"> <div class="case-item" v-for="(item, index) in dataList" :key="index" @click="selectData(item)">
<div class="case-title">企业名{{ item.enterpriseName }}</div> <div class="case-title">企业名{{ item.enterpriseName }}</div>
<div class="case-depart">执法项{{ item.checkItem }}</div> <div class="case-depart">执法{{ item.checkItem }}</div>
<!-- <div class="case-time">执法证件号{{ item.lawCertificateNum }}</div>--> <!-- <div class="case-time">执法证件号{{ item.lawCertificateNum }}</div>-->
</div> </div>
</div> </div>

4
src/views/enforce/sign.vue

@ -110,12 +110,10 @@
<van-field <van-field
v-model="submitData.lawText" v-model="submitData.lawText"
label="检查项" label="检查项"
maxlength="50" maxlength="50"
placeholder="请选择" placeholder="请选择"
readonly readonly
required
:rules="[{ required: true, message: '必填项' }]"
@click="data.lawChecked=true" @click="data.lawChecked=true"
/> />

Loading…
Cancel
Save