Browse Source

Merge remote-tracking branch 'origin/master'

master
蟑螂恶霸 2 years ago
parent
commit
6d53e32bdd
  1. 19
      src/views/Home.vue
  2. 50
      src/views/enforceHome.vue
  3. 6
      src/views/enterprise/complaint.vue
  4. 17
      src/views/enterprise/complaintNoScan.vue
  5. 2
      src/views/enterprise/qrCode.vue

19
src/views/Home.vue

@ -1,5 +1,6 @@
<template> <template>
<div class="home app_content"> <Loading class="loading-div" type="spinner" v-show="isLoading" color="#1989fa"/>
<div class="home app_content" v-if="!isLoading">
<!-- 导航栏 --> <!-- 导航栏 -->
<!-- <div class="header_body">--> <!-- <div class="header_body">-->
<!-- <header-nav :leftArrow="false" titelText="执法监督码"></header-nav>--> <!-- <header-nav :leftArrow="false" titelText="执法监督码"></header-nav>-->
@ -53,11 +54,11 @@
import {getEnterpriseMerchantAuthorization, getSiqLoginAuth, getSiqLoginAuthTest, siqCode} 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';
const {useCommon} = $globalStore; const {useCommon} = $globalStore;
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
let carouselList = reactive([]); // 轮播列表 let carouselList = reactive([]); // 轮播列表
const isLoading = ref(true);
let freshMap = reactive({ let freshMap = reactive({
refreshLoad: false, // 是否刷新 refreshLoad: false, // 是否刷新
listLoading: false, // 是否加载中 listLoading: false, // 是否加载中
@ -147,12 +148,12 @@
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()
isLoading.value = useCommon.firstLoad;
siqCode(null, success => { siqCode(null, success => {
let access_key = ""; let access_key = "";
let access_secret = ""; let access_secret = "";
@ -172,14 +173,17 @@
const signature = sha1(str).toString().toLowerCase(); const signature = sha1(str).toString().toLowerCase();
//深i企鉴权测试 //深i企鉴权测试
getSiqLoginAuthTest({userId: "1608644307579883522", userName: "汪鑫"}, success => { // getSiqLoginAuthTest({userId: "1608644307579883522", userName: "汪鑫"}, success => {
// getSiqLoginAuthTest({userId: "1795031916332843009", userName: "陈瑞"}, success => { getSiqLoginAuthTest({userId: "1795031916332843009", userName: "陈瑞"}, success => {
console.log(success.data); console.log(success.data);
useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString()); useCommon.SET_USER_PHONENUMBER(success.data.phonenumber.toString());
useCommon.SET_USER_ID(success.data.userId); useCommon.SET_USER_ID(success.data.userId);
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber); useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber);
useCommon.SET_TOKEN(success.data.token); useCommon.SET_TOKEN(success.data.token);
console.log(useCommon.userId); console.log(useCommon.userId);
if(useCommon.firstLoad){
isLoading.value = false;
}
getEnterpriseMerchant(success.data.phonenumber.toString()); getEnterpriseMerchant(success.data.phonenumber.toString());
}, error => { }, error => {
}) })
@ -212,6 +216,9 @@
// useCommon.SET_USER_ID(success.data.userId); // useCommon.SET_USER_ID(success.data.userId);
// useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber); // useCommon.SET_USER_ENTERPRISE_NUMBER(success.data.enterpriseNumber);
// getEnterpriseMerchant(success.data.phonenumber.toString()); // getEnterpriseMerchant(success.data.phonenumber.toString());
// if(useCommon.firstLoad){
// isLoading.value = false;
// }
// }, error => { // }, error => {
// console.log("error : " + error) // console.log("error : " + error)
// }) // })

50
src/views/enforceHome.vue

@ -1,5 +1,5 @@
<template> <template>
<Loading class="loading-div" type="spinner" v-show="isLoading" color="#1989fa"/> <Loading class="loading-div" type="spinner" v-show="isLoading" color="#1989fa" />
<div class="home app_content" v-if="!isLoading"> <div class="home app_content" v-if="!isLoading">
<!-- 导航栏 --> <!-- 导航栏 -->
<!-- <div class="header_body"> <!-- <div class="header_body">
@ -8,7 +8,7 @@
<!-- 中间 --> <!-- 中间 -->
<div class="warp_body"> <div class="warp_body" >
<div class="logobox"></div> <div class="logobox"></div>
<!-- <div class="streamer" @click=""> <!-- <div class="streamer" @click="">
<i></i> <i></i>
@ -72,10 +72,9 @@
<script setup name="Home"> <script setup name="Home">
import Vconsolefrom from 'vconsole'; import Vconsolefrom from 'vconsole';
import {Loading} from 'vant'; import { Loading } from 'vant';
import {getEnterpriseMerchantAuthorization, getSzyptLoginAuth} from '../api/Home'; import {getEnterpriseMerchantAuthorization, getSzyptLoginAuth} from '../api/Home';
import {queryEnforcementInspectionProgramListNoPermission} from "@/api/enforce"; import {queryEnforcementInspectionProgramListNoPermission} from "@/api/enforce";
const isLoading = ref(true); const isLoading = ref(true);
const {useCommon} = $globalStore; const {useCommon} = $globalStore;
const router = useRouter(); const router = useRouter();
@ -97,7 +96,7 @@
// { // {
// path: "/noAccess" // path: "/noAccess"
// }); // });
isLoading.value = false; // isLoading.value = false;
// }, 3000); // }, 3000);
@ -162,38 +161,38 @@
path: "/enforce/enforceNotice", path: "/enforce/enforceNotice",
}); });
} }
const queryList = () => { const queryList = () =>{
queryEnforcementInspectionProgramListNoPermission({}, success => { queryEnforcementInspectionProgramListNoPermission({},success =>{
console.log(success) console.log(success)
if (success.data.length > 4) { if(success.data.length > 4 ){
for (let i = 0; i < 1; i++) { for (let i = 0; i < 1; i++) {
carouselList.push(success.data[i]); carouselList.push(success.data[i]);
noticeObj.noticeList.push(success.data[i].planName) noticeObj.noticeList.push(success.data[i].planName)
// noticeStr += success.data[i].planName + " "; // noticeStr += success.data[i].planName + " ";
// noticeStr += success.data[i].planName != null ?success.data[i].planName + "":""; // noticeStr += success.data[i].planName != null ?success.data[i].planName + "":"";
} }
noticeStr += success.data[0].planName != null ? success.data[0].planName + "" : ""; noticeStr += success.data[0].planName != null ?success.data[0].planName + "":"";
} else { }else{
carouselList = success.data; carouselList = success.data;
for (let i = 0; i <= success.data.length; i++) { for (let i = 0; i <= success.data.length; i++) {
// carouselList.push(success.data[i]); // carouselList.push(success.data[i]);
noticeObj.noticeList.push(success.data[i].planName); noticeObj.noticeList.push(success.data[i].planName);
} }
noticeStr += success.data[0].planName != null ? success.data[0].planName + "" : ""; noticeStr += success.data[0].planName != null ?success.data[0].planName + "":"";
} }
freshMap.key = 1 freshMap.key = 1
console.log(carouselList); console.log(carouselList);
// timerObj.timer = setInterval(flushMessage, 4000); // timerObj.timer = setInterval(flushMessage, 4000);
setNotificationMove(); setNotificationMove();
}, error => { },error =>{
}) })
} }
const flushMessage = () => { const flushMessage =() =>{
timerObj.value++; timerObj.value++;
freshMap.key = timerObj.value; freshMap.key = timerObj.value;
if (carouselList.length == timerObj.value) { if(carouselList.length == timerObj.value){
timerObj.value = 0; timerObj.value = 0;
} }
freshMap.key = timerObj.value; freshMap.key = timerObj.value;
@ -224,11 +223,9 @@
// getSzyptLoginAuth(route?.query?.code,success =>{ // getSzyptLoginAuth(route?.query?.code,success =>{
getSzyptLoginAuth(code, success => { getSzyptLoginAuth(code, success => {
console.log(success.data) console.log(success.data)
if (null != success.data) {
useCommon.SET_USER_ID(success.data.userId); useCommon.SET_USER_ID(success.data.userId);
useCommon.SET_TOKEN(success.data.token); useCommon.SET_TOKEN(success.data.token);
} if(useCommon.firstLoad){
if (useCommon.firstLoad) {
isLoading.value = false; isLoading.value = false;
} }
//设置已经初始化 //设置已经初始化
@ -254,7 +251,7 @@
// queryList(); // queryList();
}); });
const setNotificationMove = () => { const setNotificationMove =()=>{
// 清除定时器 // 清除定时器
clearInterval(noticeObj.noticeTimer); clearInterval(noticeObj.noticeTimer);
const notificationContainer = document.getElementById( const notificationContainer = document.getElementById(
@ -285,7 +282,7 @@
notification.style.transform = `translateX(${noticeObj.offset}px)`; notification.style.transform = `translateX(${noticeObj.offset}px)`;
}, noticeObj.speed); }, noticeObj.speed);
} }
const delayNoticeMove = () => { const delayNoticeMove = () =>{
const notification = document.getElementById("notification"); const notification = document.getElementById("notification");
let currentOffset = notification.style.transform; let currentOffset = notification.style.transform;
if (currentOffset) { if (currentOffset) {
@ -357,7 +354,6 @@
font-size: 0.5rem; font-size: 0.5rem;
} }
} }
.box-qr-code::before { .box-qr-code::before {
content: ""; content: "";
position: absolute; position: absolute;
@ -367,7 +363,7 @@
width: calc(100% + 0.13rem); width: calc(100% + 0.13rem);
height: calc(100% + 0.13rem); height: calc(100% + 0.13rem);
background-color: #fff; background-color: #fff;
border: 0.14rem solid rgba(255, 255, 255, 0.5); border: 0.14rem solid rgba(255,255,255,0.5);
border-radius: 0.27rem; border-radius: 0.27rem;
} }
@ -402,7 +398,6 @@
font-size: 0.5rem; font-size: 0.5rem;
} }
} }
.box-info::before { .box-info::before {
content: ""; content: "";
position: absolute; position: absolute;
@ -412,7 +407,7 @@
width: calc(100% + 0.13rem); width: calc(100% + 0.13rem);
height: calc(100% + 0.13rem); height: calc(100% + 0.13rem);
background-color: #fff; background-color: #fff;
border: 0.14rem solid rgba(255, 255, 255, 0.5); border: 0.14rem solid rgba(255,255,255,0.5);
border-radius: 0.27rem; border-radius: 0.27rem;
} }
@ -448,7 +443,6 @@
} }
} }
} }
.box-complaint::before { .box-complaint::before {
content: ""; content: "";
position: absolute; position: absolute;
@ -458,7 +452,7 @@
width: calc(100% + 0.13rem); width: calc(100% + 0.13rem);
height: calc(100% + 0.13rem); height: calc(100% + 0.13rem);
background-color: #fff; background-color: #fff;
border: 0.14rem solid rgba(255, 255, 255, 0.5); border: 0.14rem solid rgba(255,255,255,0.5);
border-radius: 0.27rem; border-radius: 0.27rem;
} }
@ -596,21 +590,17 @@
background: url("../assets/images/logo.png") no-repeat; background: url("../assets/images/logo.png") no-repeat;
background-size: 100% auto; background-size: 100% auto;
} }
.loading-div{
.loading-div {
position: absolute; position: absolute;
top: 45%; top: 45%;
left: 48%; left: 48%;
} }
.notice-bar-container { .notice-bar-container {
margin-bottom: 0.27rem; margin-bottom: 0.27rem;
} }
.notice-bar-container:last-child { .notice-bar-container:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
/* .notification{ /* .notification{
height: 100%; height: 100%;
font-size: 0.27rem; font-size: 0.27rem;

6
src/views/enterprise/complaint.vue

@ -41,11 +41,11 @@
</view> </view>
<Popup :visible="popupVisible" :content="popupContent" @close="closePopup" @reciveData="reciveData"/> <Popup :visible="popupVisible" :content="popupContent" @close="closePopup" @reciveData="reciveData"/>
<!-- <van-field <van-field
v-model="submitData.enforceTypeText" v-model="submitData.enforceTypeText"
required required
label="投诉类型" label="投诉类型"
placeholder="必填 请选择" placeholder="请选择"
readonly readonly
clickable clickable
is-link is-link
@ -58,7 +58,7 @@
@cancel="data.showPicker = false" @cancel="data.showPicker = false"
@confirm="onConfirm" @confirm="onConfirm"
/> />
</van-popup>--> </van-popup>
<van-divider class="divdsty"/> <van-divider class="divdsty"/>
<van-field <van-field
v-model="submitData.problemDescription" v-model="submitData.problemDescription"

17
src/views/enterprise/complaintNoScan.vue

@ -68,6 +68,19 @@
</div> </div>
<van-divider class="divdsty" /> <van-divider class="divdsty" />
<van-field
v-model="submitData.enterpriseAddress"
rows="3"
autosize
label="涉事地址"
type="textarea"
placeholder="请填写详细地址"
required
:rules="[{ required: true, message: '请填写详细地址' }]"
show-word-limit
/>
<van-divider class="divdsty" />
<van-field <van-field
v-model="submitData.linkman" v-model="submitData.linkman"
label="联系人" label="联系人"
@ -590,7 +603,9 @@ const goBack = () => {
font-size: 0.3rem; font-size: 0.3rem;
padding: 0px 10px; padding: 0px 10px;
width: 80%; width: 80%;
color: #969799 color: #969799;
height: 10%;
padding-bottom: 0.2rem;
} }
} }

2
src/views/enterprise/qrCode.vue

@ -24,7 +24,7 @@
:src="data.qrCodeUrl" :src="data.qrCodeUrl"
/> />
</div> </div>
<span class="qr_code_text">扫一扫上面的二维码,获取企业执法信息</span> <!-- <span class="qr_code_text">扫一扫上面的二维码,获取企业执法信息</span> -->
</div> </div>
<van-action-bar> <van-action-bar>
<van-action-bar-button color="#2b75fd" text="下载二维码" @click="download(data.qrCodeUrl)" /> <van-action-bar-button color="#2b75fd" text="下载二维码" @click="download(data.qrCodeUrl)" />

Loading…
Cancel
Save