Commit 82c137e8 authored by lei's avatar lei

add:商户列表接口

parent 297fdc87
...@@ -111,7 +111,7 @@ window.onload = function () { ...@@ -111,7 +111,7 @@ window.onload = function () {
// alert('扫码成功'+JSON.stringify(data)) // alert('扫码成功'+JSON.stringify(data))
// location.href = 'shanghu_home.html' // location.href = 'shanghu_home.html'
gemhoUtil.navigatePage(`src/_shanghu_home.html`) gemhoUtil.navigatePage(`src/_checkrecord.html`)
//成功回调 //成功回调
}, },
fail: function (data) { fail: function (data) {
...@@ -120,6 +120,10 @@ window.onload = function () { ...@@ -120,6 +120,10 @@ window.onload = function () {
}, },
}) })
} else { } else {
this.userInfo.userType === 'sj'
? (toData = 'checkrecord')
: (toData = 'shanghu_list')
gemhoUtil.navigatePage(`src/_${toData}.html`) gemhoUtil.navigatePage(`src/_${toData}.html`)
} }
}, },
...@@ -157,7 +161,7 @@ window.onload = function () { ...@@ -157,7 +161,7 @@ window.onload = function () {
this.showPicker = false this.showPicker = false
}, },
getUserInfo() { getUserInfo() {
http.get('/gq/information/getAll/141 ').then((res) => { http.get('/gq/information/getAll/1 ').then((res) => {
if (res.code !== 200 && res.data == null) { if (res.code !== 200 && res.data == null) {
return return
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* 请求拦截、相应拦截、错误统一处理 * 请求拦截、相应拦截、错误统一处理
*/ */
// 环境的切换 // 环境的切换
axios.defaults.baseURL = 'http://192.168.2.37:8080' axios.defaults.baseURL = 'http://192.168.2.16:8080'
axios.defaults.timeout = 50000 axios.defaults.timeout = 50000
// post请求头 // post请求头
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8' // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
<van-cell-group> <van-cell-group>
<van-field label="商家名称" v-model="formData.unitName" :disabled="flag=='XQ'" /> <van-field label="商家名称" v-model="formData.unitName" :disabled="flag=='XQ'" />
</van-cell-group> </van-cell-group>
<van-cell-group> <van-cell-group>
<van-field label="负责人" v-model="formData.owner" type="tel" :disabled="flag=='XQ'"/> <van-field label="负责人" v-model="formData.owner" type="tel" :disabled="flag=='XQ'"/>
</van-cell-group> </van-cell-group>
......
...@@ -5,6 +5,7 @@ window.addEventListener('load', function () { ...@@ -5,6 +5,7 @@ window.addEventListener('load', function () {
el: '#app', el: '#app',
data() { data() {
return { return {
flag: 'XQ',
formData: { formData: {
principal: '', principal: '',
phone: '', phone: '',
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<!-- 隐患列表 --> <!-- 隐患列表 -->
<van-list> <van-list>
<van-cell v-for="item in filteredHazards" :key="item.id" style="margin-bottom: 0.25rem;margin-top: 0.25rem;"> <van-cell v-for="item in hazardList" :key="item.id" style="margin-bottom: 0.25rem;margin-top: 0.25rem;" @click="viewDetail(item.id)" >
<div style="width: 100%;"> <div style="width: 100%;">
<!-- 第一行:隐患描述 --> <!-- 第一行:隐患描述 -->
<div style=" <div style="
...@@ -73,16 +73,16 @@ ...@@ -73,16 +73,16 @@
font-size: 0.3rem; font-size: 0.3rem;
font-weight: bold; font-weight: bold;
font-family: PingFang SC; font-family: PingFang SC;
">{{ item.description }}</div> ">{{ item.unitName }}</div>
<!-- 第二行:状态和时间 --> <!-- 第二行:状态和时间 -->
<div style="display: flex; justify-content: space-between; margin: 8px 0;"> <div style="display: flex; justify-content: space-between; margin: 8px 0;">
<span style="color: #737373; font-size: 0.28rem;margin-left: -1.4rem;">场所类型:{{ item.date }}</span> <span style="color: #737373; font-size: 0.28rem;">场所类型:{{ item.smallPlaceTypeName }}</span>
</div> </div>
<!-- 第三行:商家和箭头 --> <!-- 第三行:商家和箭头 -->
<div style="display: flex; justify-content: space-between; align-items: center;"> <div style="display: flex; justify-content: space-between; align-items: center;">
<span style="color: #666; font-size: 0.28rem;">威海市和谐路xxxx号</span> <span style="color: #666; font-size: 0.28rem;">{{item.businessAddress}}</span>
</div> </div>
</div> </div>
</van-cell> </van-cell>
...@@ -97,58 +97,34 @@ ...@@ -97,58 +97,34 @@
return { return {
shanghuName: '', shanghuName: '',
// 新增子Tab数据 // 新增子Tab数据
subActiveTab: 0, hazardList: [],
hazardList: [{
id: 1,
description: '威海市保卫酒店有限公司1',
status: '待审核',
date: '场所类型:小餐饮',
shop: 'XX餐饮店',
type: 2
},
{
id: 2,
description: '威海市保卫酒店有限公司2',
status: '待整改',
date: '场所类型:小餐饮',
shop: 'XX餐饮店',
type: 2
},
// 更多示例数据...
],
} }
}, },
computed: { computed: {
filteredHazards() {
return this.hazardList
}
}, },
methods: { methods: {
onSearch(){ onSearch(){
console.log('xxxx') console.log('xxxx')
}, },
// 新增选择确认方法
onConfirmType(value) {
this.formData.type = value;
this.showTypePicker = false;
},
onConfirmTime(time) {
this.formData.businessHours = time;
this.showTimePicker = false;
},
statusTagType(status) {
const types = {
'待审核': 'warning',
'待整改': 'primary',
'已整改': 'success',
'整改逾期': 'danger',
};
return types[status] || '';
},
viewDetail(id) { viewDetail(id) {
console.log('查看详情:', id); console.log('查看详情:', id);
gemhoUtil.navigatePage(`_checkrecord.html`)
// 这里添加跳转逻辑 // 这里添加跳转逻辑
},
getMerchantList(){
http
.get('/gq/merchant/getUserCheckMerchantList')
.then((res) => {
this.hazardList = res.data;
})
},
init(){
// 初始化方法
this.getMerchantList()
} }
},
created() {
this.init()
} }
}); });
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment