接口地址更换

main
limingtao 11 months ago
parent b65874d947
commit 25e1156048
  1. 5
      common/globalJs/globalJs.js
  2. 3
      manifest.json
  3. 826
      pages/index/index.vue

@ -1,8 +1,9 @@
// 请求时接口的公用部分 // 请求时接口的公用部分
// #ifdef APP-PLUS || MP // #ifdef APP-PLUS || MP
// const baseUrl = "http://116.62.210.143:9002"; // const baseUrl = "http://116.62.210.143:9002";
const baseUrl = "http://118.89.79.160:8800/HiatmpPro"; // const baseUrl = "http://118.89.79.160:8800/HiatmpPro";
const chatUrl = "http://118.89.79.160:8800/HiatmpPro"; const baseUrl = "http://219.147.31.25:30001/tht-app-api";
const chatUrl = "http://219.147.31.25:30001/hitap";
// #endif // #endif
// #ifdef H5 // #ifdef H5
const baseUrl = "/HiatmpPro"; const baseUrl = "/HiatmpPro";

@ -135,7 +135,8 @@
"https" : false, "https" : false,
"proxy" : { "proxy" : {
"/HiatmpPro" : { "/HiatmpPro" : {
"target" : "http://118.89.79.160:8800", // "target" : "http://118.89.79.160:8800",
"target" : "http://219.147.31.25:30001/tht-app-api",
"changeOrigin" : true, "changeOrigin" : true,
"secure" : false, "secure" : false,
"pathRewrite" : { "pathRewrite" : {

@ -1,402 +1,444 @@
<template> <template>
<view id="page"> <view id="page">
<view class="header Box"> <view class="header Box">
<view class="title">道路交通安全隐患</view> <view class="title">道路交通安全隐患</view>
<view class="title">排查助手</view> <view class="title">排查助手</view>
<view class="desc">洞察隐患 智能守护 科技之眼照亮安全之路</view> <view class="desc">洞察隐患 智能守护 科技之眼照亮安全之路</view>
<view class="total Flex Flex_C_S-B PositionR"> <view class="total Flex Flex_C_S-B PositionR">
<view class="left Flex"> <view class="left Flex">
<view class="info"> <view class="info">
<view class="name">待办</view> <view class="name">待办</view>
<view class="number">{{ totalData.Unconfirmed }}</view> <view class="number">{{ totalData.Unconfirmed }}</view>
</view> </view>
<image style="width: 160rpx" mode="widthFix" :src="$.imgSrc + '/need.png'" class="need"></image> <image style="width: 160rpx" mode="widthFix" :src="$.imgSrc + '/need.png'" class="need"></image>
<view class="bottom PositionA Flex Flex_C_S-A TextCenter blur"> <view class="bottom PositionA Flex Flex_C_S-A TextCenter blur">
<view class="item Flex_C_S-Center"> <view class="item Flex_C_S-Center">
<text>超期</text> <text>超期</text>
<text style="margin-left: 10rpx;color: #CC2936;">{{ totalData.Delay }}</text> <text style="margin-left: 10rpx;color: #CC2936;">{{ totalData.Delay }}</text>
</view> </view>
<view class="item Flex_C_S-Center"> <view class="item Flex_C_S-Center">
<text>临期</text> <text>临期</text>
<text style="margin-left: 10rpx;color: #E68A0B;">{{ totalData.Dying }}</text> <text style="margin-left: 10rpx;color: #E68A0B;">{{ totalData.Dying }}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<view class="current_mouth Flex Flex_C_S-B blur"> <view class="current_mouth Flex Flex_C_S-B blur">
<image style="width: 80rpx" mode="widthFix" :src="$.imgSrc + '/mouth.png'" class="video"></image> <image style="width: 80rpx" mode="widthFix" :src="$.imgSrc + '/mouth.png'" class="video">
<text class="name">本月上报</text> </image>
<text class="number">{{ totalData.MonthReport }}</text> <text class="name">本月上报</text>
</view> <text class="number">{{ totalData.MonthReport }}</text>
<view class="finish Flex Flex_C_S-B blur"> </view>
<image style="width: 80rpx" mode="widthFix" :src="$.imgSrc + '/finish.png'" class="video"></image> <view class="finish Flex Flex_C_S-B blur">
<text class="name">已完成</text> <image style="width: 80rpx" mode="widthFix" :src="$.imgSrc + '/finish.png'" class="video">
<text class="number">{{ totalData.Finished }}</text> </image>
</view> <text class="name">已完成</text>
</view> <text class="number">{{ totalData.Finished }}</text>
</view> </view>
</view> </view>
<view class="con" @click="konw"> </view>
<image class="bg" src="/static/know.png" /> </view>
<view class="con-box"> <view class="con" @click="konw">
<text style="font-family: Source Han Sans CN, Source Han Sans CN;color: #363F4D;font-weight: 500;">交通隐患排查知识库</text> <image class="bg" src="/static/know.png" />
<view class="icon"> <view class="con-box">
<uni-icons type="right" size="18" color="#fff" /> <text
</view> style="font-family: Source Han Sans CN, Source Han Sans CN;color: #363F4D;font-weight: 500;">交通隐患排查知识库</text>
</view> <view class="icon">
</view> <uni-icons type="right" size="18" color="#fff" />
<view class="Width100 Box BorderBox"> </view>
<view class="list_title">待办任务</view> </view>
<view class="Content MarginAuto BorderBox"> </view>
<no-data v-if="isEmpty" /> <view class="Width100 Box BorderBox">
<view v-else class="List Width100 BorderBox"> <view class="list_title">待办任务</view>
<view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" <view class="Content MarginAuto BorderBox">
v-for="item in list" :key='item.id' @click='handleClick(item)'> <no-data v-if="isEmpty" />
<image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> <view v-else class="List Width100 BorderBox">
<view class="right"> <view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" v-for="item in list"
<view class="title">{{ item.name }}</view> :key='item.id' @click='handleClick(item)'>
<view class="type"> <image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image>
<text>排查</text> <view class="right">
<text>{{ item.deadlineStatus || '--' }}</text> <view class="title">{{ item.name }}</view>
</view> <view class="type">
</view> <text>排查</text>
<view class="trapezoidal" v-if="item.deadlineType == 1"> <text>{{ item.deadlineStatus || '--' }}</text>
超期 </view>
</view> </view>
<view class="trapezoidal lin" v-if="item.deadlineType == 2"> <view class="trapezoidal" v-if="item.deadlineType == 1">
临期 超期
</view> </view>
</view> <view class="trapezoidal lin" v-if="item.deadlineType == 2">
</view> 临期
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="loadmorestatus" v-show="!isEmpty" />
</view>
</view>
</view>
</template> </template>
<script> <script>
import NoData from "../../components/no-data.vue"; import NoData from "../../components/no-data.vue";
export default { export default {
// //
components: { components: {
NoData NoData
}, },
data() { data() {
return { return {
$: this.$, $: this.$,
// js // js
bgUrl1: '', // bgUrl1: '', //
list: [], list: [],
isEmpty: false, isEmpty: false,
isMore: true, isMore: true,
page: 1, page: 1,
tab: 1, tab: 1,
totalData: { totalData: {
UnderInvestigation: 0, UnderInvestigation: 0,
InGovernance: 0, InGovernance: 0,
Finished: 0, Finished: 0,
MonthReport: 0, MonthReport: 0,
Dying: 0, Dying: 0,
Delay: 0, Delay: 0,
} },
} loadmorestatus: 'loading',
}, }
// },
onLoad(e) { //
this.getData() onLoad(e) {
this.getList() this.getData()
}, this.getList()
// },
computed: {}, //
// computed: {},
methods: { //
getData() { methods: {
const data = this.$.getData('token') getData() {
this.$request.globalRequest('/hiddenDanger/highDanger/getHighDangerStatusNum', { nuserid: data }, 'GET').then(res => { const data = this.$.getData('token')
if (res.code === 200) { this.$request.globalRequest('/hiddenDanger/highDanger/getHighDangerStatusNum', {
res.result.forEach(item => { nuserid: data
this.totalData[item.status] = item.count }, 'GET').then(res => {
}) if (res.code === 200) {
} else { res.result.forEach(item => {
this.$.toast(res.message) this.totalData[item.status] = item.count
} })
}) } else {
}, this.$.toast(res.message)
getList() { }
let datas = { })
nuserid:this.$.getData('token'), },
status: '0', getList() {
} let datas = {
this.$request.globalRequest(`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST').then(res => { nuserid: this.$.getData('token'),
if (res.code === 200) { status: '0',
if (res.result.total === 0) { }
this.isEmpty = true; this.loadmorestatus = 'loading'
return false this.$request.globalRequest(
} `/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST')
this.list.push(...res.result.list) .then(res => {
if (this.list.length >= res.result.total) { this.loadmorestatus = 'loadmore'
this.isMore = false if (res.code === 200) {
} if (res.result.total === 0) {
} else { this.isEmpty = true;
this.$.toast(res.message) return false
} }
}) this.list.push(...res.result.list)
}, if (this.list.length >= res.result.total) {
handleClick(row) { this.isMore = false
console.log(row) this.loadmorestatus = 'nomore'
this.$.open('/pages/map/index?businessId=' + row.businessId) }
}, } else {
konw(){ this.$.toast(res.message)
this.$.open('/pages/knowledge/index') }
}, }).catch((err) => {
// this.loadmorestatus = 'nomore'
skipPage(even) { })
// this.$.open(even) },
}, handleClick(row) {
}, console.log(row)
onReady() {}, this.$.open('/pages/map/index?businessId=' + row.businessId)
// },
onUnload() { konw() {
this.$.open('/pages/knowledge/index')
}, },
// //
onPullDownRefresh() { skipPage(even) {
// // this.$.open(even)
setTimeout(() => { },
uni.stopPullDownRefresh(); },
}, 1500); onReady() {},
}, //
// onUnload() {
onReachBottom() {
if (this.isMore) { },
this.page++ //
this.getList() onPullDownRefresh() {
} //
}, setTimeout(() => {
} uni.stopPullDownRefresh();
}, 1500);
},
//
onReachBottom() {
if (this.isMore) {
this.page++
this.getList()
}
},
}
</script> </script>
<style> <style>
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
page { page {
background: #F6F8FA; background: #F6F8FA;
} }
.header { .header {
background: url("../../static/home_bg.png") no-repeat; background: url("../../static/home_bg.png") no-repeat;
background-size: cover; background-size: cover;
height: 500rpx; height: 500rpx;
color: #FFFFFF; color: #FFFFFF;
padding:calc(var(--status-bar-height) + 40rpx) 20rpx 20rpx; padding: calc(var(--status-bar-height) + 40rpx) 20rpx 20rpx;
.title {
font-family: Tensentype MeiHeiJ, Tensentype MeiHeiJ; .title {
font-weight: bold; font-family: Tensentype MeiHeiJ, Tensentype MeiHeiJ;
font-size: 24px; font-weight: bold;
line-height: 28px; font-size: 24px;
letter-spacing: 2px; line-height: 28px;
text-shadow: 0px 4px 0px rgba(255,255,255,0.16); letter-spacing: 2px;
text-align: left; text-shadow: 0px 4px 0px rgba(255, 255, 255, 0.16);
font-style: normal; text-align: left;
text-transform: none; font-style: normal;
} text-transform: none;
.desc { }
margin-top: 20rpx;
font-family: Source Han Sans CN, Source Han Sans CN; .desc {
} margin-top: 20rpx;
.total { font-family: Source Han Sans CN, Source Han Sans CN;
margin-top: 40rpx; }
.number {
font-size: 20px; .total {
font-weight: bold; margin-top: 40rpx;
color: #363F4D;
} .number {
.name { font-size: 20px;
font-size: 16px; font-weight: bold;
color: #363F4D; color: #363F4D;
font-weight: bold; }
}
.left { .name {
width: 40%; font-size: 16px;
height: 100%; color: #363F4D;
padding: 20rpx 20rpx 70rpx; font-weight: bold;
border-radius: 10rpx; }
background: linear-gradient( 180deg, #F0D9B4 0%, #F6F6F6 100%);
overflow: hidden; .left {
.info { width: 40%;
padding-left: 20rpx; height: 100%;
padding-top: 20rpx; padding: 20rpx 20rpx 70rpx;
flex: 1; border-radius: 10rpx;
.number { background: linear-gradient(180deg, #F0D9B4 0%, #F6F6F6 100%);
font-size: 20px; overflow: hidden;
}
.name { .info {
font-size: 18px; padding-left: 20rpx;
} padding-top: 20rpx;
} flex: 1;
.bottom {
bottom: 0; .number {
border-radius:0 0 10rpx 10px; font-size: 20px;
width: calc(36% + 40rpx); }
left: 0;
font-size: 16px; .name {
text-align: center; font-size: 18px;
height: 80rpx; }
line-height: 80rpx; }
color: #363F4D;
} .bottom {
} bottom: 0;
.right { border-radius: 0 0 10rpx 10px;
flex: 1; width: calc(36% + 40rpx);
padding:0 20rpx; left: 0;
margin-left: 20rpx; font-size: 16px;
display: flex; text-align: center;
flex-direction: column; height: 80rpx;
justify-content: center; line-height: 80rpx;
align-items: center; color: #363F4D;
.current_mouth { }
margin-bottom: 20rpx; }
}
.current_mouth,.finish { .right {
flex: 1; flex: 1;
border-radius: 10rpx; padding: 0 20rpx;
padding: 20rpx; margin-left: 20rpx;
width: 100%; display: flex;
} flex-direction: column;
} justify-content: center;
align-items: center;
}
} .current_mouth {
margin-bottom: 20rpx;
.img { }
width: 40rpx;
height: 40rpx; .current_mouth,
margin-left: 30rpx; .finish {
} flex: 1;
.trapezoidal { border-radius: 10rpx;
position: relative; padding: 20rpx;
display: inline-block; width: 100%;
min-width: 2em; }
text-align: center; }
padding: 3rpx 20rpx 3rpx 18rpx;
} }
}
.trapezoidal::before,
.trapezoidal::after { .img {
content: ''; width: 40rpx;
position: absolute; height: 40rpx;
top: 0; margin-left: 30rpx;
left: 0%; }
width: 100%;
height: 100%; .trapezoidal {
border-radius: 0rpx 0 0 0; position: relative;
background: #FF1111; display: inline-block;
z-index: -1; min-width: 2em;
transform-origin: bottom; text-align: center;
transform: skew(18deg); padding: 3rpx 20rpx 3rpx 18rpx;
border: 0rpx solid #333; }
box-sizing: border-box;
} .trapezoidal::before,
.trapezoidal::after {
.trapezoidal::after { content: '';
left: auto; position: absolute;
right: 0; top: 0;
transform: skew(-0deg); left: 0%;
border-radius: 0 0rpx 0 0; width: 100%;
background-color: #FF1111; height: 100%;
border-left: 0 none; border-radius: 0rpx 0 0 0;
} background: #FF1111;
.lin::before,.lin::after { z-index: -1;
background-color: #E68A0B; transform-origin: bottom;
} transform: skew(18deg);
.list_title { border: 0rpx solid #333;
font-size: 20px; box-sizing: border-box;
background: linear-gradient( 180deg, #FFFFFF 0%, rgba(255,255,255,0) 100%); }
border-radius: 24px 24px 0px 0px;
padding: 20rpx 30rpx 0; .trapezoidal::after {
font-family: Source Han Sans CN, Source Han Sans CN; left: auto;
} right: 0;
transform: skew(-0deg);
.Box { border-radius: 0 0rpx 0 0;
.Content { background-color: #FF1111;
width: calc(100% - 48rpx); border-left: 0 none;
padding-bottom: 100rpx; }
}
.lin::before,
.Unit { .lin::after {
padding: 12rpx; background-color: #E68A0B;
display: flex; }
justify-content: space-between;
align-items: center; .list_title {
position: relative; font-size: 20px;
box-shadow: 1px 1px 3px #ccc; background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
.trapezoidal { border-radius: 24px 24px 0px 0px;
position: absolute; padding: 20rpx 30rpx 0;
top: 0px; font-family: Source Han Sans CN, Source Han Sans CN;
right: 0px; }
color: #ffffff;
font-size: 14px; .Box {
font-weight: normal; .Content {
z-index: 1; width: calc(100% - 48rpx);
} padding-bottom: 100rpx;
image { }
width: 200rpx;
} .Unit {
.right { padding: 12rpx;
flex: 1; display: flex;
padding-left: 30rpx; justify-content: space-between;
.title { align-items: center;
font-size: 16px; position: relative;
} box-shadow: 1px 1px 3px #ccc;
.type {
font-size: 14px; .trapezoidal {
color: #666; position: absolute;
font-weight: normal; top: 0px;
text { right: 0px;
margin-right: 20rpx; color: #ffffff;
} font-size: 14px;
} font-weight: normal;
} z-index: 1;
} }
}
.con { image {
width: 100%; width: 200rpx;
height: 240rpx; }
padding: 30rpx;
box-sizing: border-box; .right {
position: relative; flex: 1;
z-index: 999; padding-left: 30rpx;
background-size: 100% 100%;
display: flex; .title {
align-items: center; font-size: 16px;
.bg { }
position: absolute;
top: 0; .type {
right: 0; font-size: 14px;
width: 100%; color: #666;
height: 100%; font-weight: normal;
}
.con-box { text {
width: 100%; margin-right: 20rpx;
padding: 0 20rpx; }
box-sizing: border-box; }
height: 80%; }
background: linear-gradient(to right, #8FB4F2 0%, #BCD2F2 100%); }
z-index: -1; }
position: relative;
border-radius: 8rpx; .con {
display: flex; width: 100%;
align-items: center; height: 240rpx;
.icon { padding: 30rpx;
display: flex; box-sizing: border-box;
justify-content: center; position: relative;
align-items: center; z-index: 999;
background: rgba(255,255,255,0.3); background-size: 100% 100%;
color: #fff; display: flex;
border-radius: 10%; align-items: center;
width: 40rpx;
height: 40rpx; .bg {
margin-left: 20rpx; position: absolute;
} top: 0;
} right: 0;
} width: 100%;
height: 100%;
}
.con-box {
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
height: 80%;
background: linear-gradient(to right, #8FB4F2 0%, #BCD2F2 100%);
z-index: -1;
position: relative;
border-radius: 8rpx;
display: flex;
align-items: center;
.icon {
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, 0.3);
color: #fff;
border-radius: 10%;
width: 40rpx;
height: 40rpx;
margin-left: 20rpx;
}
}
}
</style> </style>
Loading…
Cancel
Save