接口地址更换

main
limingtao 1 year ago
parent b65874d947
commit 25e1156048
  1. 5
      common/globalJs/globalJs.js
  2. 3
      manifest.json
  3. 126
      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" : {

@ -24,12 +24,14 @@
</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">
</image>
<text class="name">本月上报</text> <text class="name">本月上报</text>
<text class="number">{{ totalData.MonthReport }}</text> <text class="number">{{ totalData.MonthReport }}</text>
</view> </view>
<view class="finish Flex Flex_C_S-B blur"> <view class="finish Flex Flex_C_S-B blur">
<image style="width: 80rpx" mode="widthFix" :src="$.imgSrc + '/finish.png'" class="video"></image> <image style="width: 80rpx" mode="widthFix" :src="$.imgSrc + '/finish.png'" class="video">
</image>
<text class="name">已完成</text> <text class="name">已完成</text>
<text class="number">{{ totalData.Finished }}</text> <text class="number">{{ totalData.Finished }}</text>
</view> </view>
@ -39,7 +41,8 @@
<view class="con" @click="konw"> <view class="con" @click="konw">
<image class="bg" src="/static/know.png" /> <image class="bg" src="/static/know.png" />
<view class="con-box"> <view class="con-box">
<text style="font-family: Source Han Sans CN, Source Han Sans CN;color: #363F4D;font-weight: 500;">交通隐患排查知识库</text> <text
style="font-family: Source Han Sans CN, Source Han Sans CN;color: #363F4D;font-weight: 500;">交通隐患排查知识库</text>
<view class="icon"> <view class="icon">
<uni-icons type="right" size="18" color="#fff" /> <uni-icons type="right" size="18" color="#fff" />
</view> </view>
@ -50,8 +53,8 @@
<view class="Content MarginAuto BorderBox"> <view class="Content MarginAuto BorderBox">
<no-data v-if="isEmpty" /> <no-data v-if="isEmpty" />
<view v-else class="List Width100 BorderBox"> <view v-else class="List Width100 BorderBox">
<view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" <view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" v-for="item in list"
v-for="item in list" :key='item.id' @click='handleClick(item)'> :key='item.id' @click='handleClick(item)'>
<image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> <image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image>
<view class="right"> <view class="right">
<view class="title">{{ item.name }}</view> <view class="title">{{ item.name }}</view>
@ -68,14 +71,15 @@
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="loadmorestatus" v-show="!isEmpty" />
</view> </view>
</view> </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
@ -97,7 +101,8 @@ export default {
MonthReport: 0, MonthReport: 0,
Dying: 0, Dying: 0,
Delay: 0, Delay: 0,
} },
loadmorestatus: 'loading',
} }
}, },
// //
@ -111,7 +116,9 @@ export default {
methods: { methods: {
getData() { getData() {
const data = this.$.getData('token') const data = this.$.getData('token')
this.$request.globalRequest('/hiddenDanger/highDanger/getHighDangerStatusNum', { nuserid: data }, 'GET').then(res => { this.$request.globalRequest('/hiddenDanger/highDanger/getHighDangerStatusNum', {
nuserid: data
}, 'GET').then(res => {
if (res.code === 200) { if (res.code === 200) {
res.result.forEach(item => { res.result.forEach(item => {
this.totalData[item.status] = item.count this.totalData[item.status] = item.count
@ -123,10 +130,14 @@ export default {
}, },
getList() { getList() {
let datas = { let datas = {
nuserid:this.$.getData('token'), nuserid: this.$.getData('token'),
status: '0', status: '0',
} }
this.$request.globalRequest(`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST').then(res => { this.loadmorestatus = 'loading'
this.$request.globalRequest(
`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST')
.then(res => {
this.loadmorestatus = 'loadmore'
if (res.code === 200) { if (res.code === 200) {
if (res.result.total === 0) { if (res.result.total === 0) {
this.isEmpty = true; this.isEmpty = true;
@ -135,17 +146,20 @@ export default {
this.list.push(...res.result.list) this.list.push(...res.result.list)
if (this.list.length >= res.result.total) { if (this.list.length >= res.result.total) {
this.isMore = false this.isMore = false
this.loadmorestatus = 'nomore'
} }
} else { } else {
this.$.toast(res.message) this.$.toast(res.message)
} }
}).catch((err) => {
this.loadmorestatus = 'nomore'
}) })
}, },
handleClick(row) { handleClick(row) {
console.log(row) console.log(row)
this.$.open('/pages/map/index?businessId=' + row.businessId) this.$.open('/pages/map/index?businessId=' + row.businessId)
}, },
konw(){ konw() {
this.$.open('/pages/knowledge/index') this.$.open('/pages/knowledge/index')
}, },
// //
@ -172,70 +186,80 @@ export default {
this.getList() 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 { .title {
font-family: Tensentype MeiHeiJ, Tensentype MeiHeiJ; font-family: Tensentype MeiHeiJ, Tensentype MeiHeiJ;
font-weight: bold; font-weight: bold;
font-size: 24px; font-size: 24px;
line-height: 28px; line-height: 28px;
letter-spacing: 2px; letter-spacing: 2px;
text-shadow: 0px 4px 0px rgba(255,255,255,0.16); text-shadow: 0px 4px 0px rgba(255, 255, 255, 0.16);
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
} }
.desc { .desc {
margin-top: 20rpx; margin-top: 20rpx;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
} }
.total { .total {
margin-top: 40rpx; margin-top: 40rpx;
.number { .number {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #363F4D; color: #363F4D;
} }
.name { .name {
font-size: 16px; font-size: 16px;
color: #363F4D; color: #363F4D;
font-weight: bold; font-weight: bold;
} }
.left { .left {
width: 40%; width: 40%;
height: 100%; height: 100%;
padding: 20rpx 20rpx 70rpx; padding: 20rpx 20rpx 70rpx;
border-radius: 10rpx; border-radius: 10rpx;
background: linear-gradient( 180deg, #F0D9B4 0%, #F6F6F6 100%); background: linear-gradient(180deg, #F0D9B4 0%, #F6F6F6 100%);
overflow: hidden; overflow: hidden;
.info { .info {
padding-left: 20rpx; padding-left: 20rpx;
padding-top: 20rpx; padding-top: 20rpx;
flex: 1; flex: 1;
.number { .number {
font-size: 20px; font-size: 20px;
} }
.name { .name {
font-size: 18px; font-size: 18px;
} }
} }
.bottom { .bottom {
bottom: 0; bottom: 0;
border-radius:0 0 10rpx 10px; border-radius: 0 0 10rpx 10px;
width: calc(36% + 40rpx); width: calc(36% + 40rpx);
left: 0; left: 0;
font-size: 16px; font-size: 16px;
@ -245,18 +269,22 @@ page {
color: #363F4D; color: #363F4D;
} }
} }
.right { .right {
flex: 1; flex: 1;
padding:0 20rpx; padding: 0 20rpx;
margin-left: 20rpx; margin-left: 20rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.current_mouth { .current_mouth {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.current_mouth,.finish {
.current_mouth,
.finish {
flex: 1; flex: 1;
border-radius: 10rpx; border-radius: 10rpx;
padding: 20rpx; padding: 20rpx;
@ -265,23 +293,24 @@ page {
} }
} }
} }
.img { .img {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-left: 30rpx; margin-left: 30rpx;
} }
.trapezoidal {
.trapezoidal {
position: relative; position: relative;
display: inline-block; display: inline-block;
min-width: 2em; min-width: 2em;
text-align: center; text-align: center;
padding: 3rpx 20rpx 3rpx 18rpx; padding: 3rpx 20rpx 3rpx 18rpx;
} }
.trapezoidal::before, .trapezoidal::before,
.trapezoidal::after { .trapezoidal::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
@ -295,28 +324,31 @@ page {
transform: skew(18deg); transform: skew(18deg);
border: 0rpx solid #333; border: 0rpx solid #333;
box-sizing: border-box; box-sizing: border-box;
} }
.trapezoidal::after { .trapezoidal::after {
left: auto; left: auto;
right: 0; right: 0;
transform: skew(-0deg); transform: skew(-0deg);
border-radius: 0 0rpx 0 0; border-radius: 0 0rpx 0 0;
background-color: #FF1111; background-color: #FF1111;
border-left: 0 none; border-left: 0 none;
} }
.lin::before,.lin::after {
.lin::before,
.lin::after {
background-color: #E68A0B; background-color: #E68A0B;
} }
.list_title {
.list_title {
font-size: 20px; font-size: 20px;
background: linear-gradient( 180deg, #FFFFFF 0%, rgba(255,255,255,0) 100%); background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
border-radius: 24px 24px 0px 0px; border-radius: 24px 24px 0px 0px;
padding: 20rpx 30rpx 0; padding: 20rpx 30rpx 0;
font-family: Source Han Sans CN, Source Han Sans CN; font-family: Source Han Sans CN, Source Han Sans CN;
} }
.Box { .Box {
.Content { .Content {
width: calc(100% - 48rpx); width: calc(100% - 48rpx);
padding-bottom: 100rpx; padding-bottom: 100rpx;
@ -329,6 +361,7 @@ page {
align-items: center; align-items: center;
position: relative; position: relative;
box-shadow: 1px 1px 3px #ccc; box-shadow: 1px 1px 3px #ccc;
.trapezoidal { .trapezoidal {
position: absolute; position: absolute;
top: 0px; top: 0px;
@ -338,27 +371,33 @@ page {
font-weight: normal; font-weight: normal;
z-index: 1; z-index: 1;
} }
image { image {
width: 200rpx; width: 200rpx;
} }
.right { .right {
flex: 1; flex: 1;
padding-left: 30rpx; padding-left: 30rpx;
.title { .title {
font-size: 16px; font-size: 16px;
} }
.type { .type {
font-size: 14px; font-size: 14px;
color: #666; color: #666;
font-weight: normal; font-weight: normal;
text { text {
margin-right: 20rpx; margin-right: 20rpx;
} }
} }
} }
} }
} }
.con {
.con {
width: 100%; width: 100%;
height: 240rpx; height: 240rpx;
padding: 30rpx; padding: 30rpx;
@ -368,6 +407,7 @@ page {
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
align-items: center; align-items: center;
.bg { .bg {
position: absolute; position: absolute;
top: 0; top: 0;
@ -375,6 +415,7 @@ page {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.con-box { .con-box {
width: 100%; width: 100%;
padding: 0 20rpx; padding: 0 20rpx;
@ -386,11 +427,12 @@ page {
border-radius: 8rpx; border-radius: 8rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.icon { .icon {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: rgba(255,255,255,0.3); background: rgba(255, 255, 255, 0.3);
color: #fff; color: #fff;
border-radius: 10%; border-radius: 10%;
width: 40rpx; width: 40rpx;
@ -398,5 +440,5 @@ page {
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
} }
</style> </style>
Loading…
Cancel
Save