Commit 82c137e8 authored by lei's avatar lei

add:商户列表接口

parent 297fdc87
......@@ -111,7 +111,7 @@ window.onload = function () {
// alert('扫码成功'+JSON.stringify(data))
// location.href = 'shanghu_home.html'
gemhoUtil.navigatePage(`src/_shanghu_home.html`)
gemhoUtil.navigatePage(`src/_checkrecord.html`)
//成功回调
},
fail: function (data) {
......@@ -120,6 +120,10 @@ window.onload = function () {
},
})
} else {
this.userInfo.userType === 'sj'
? (toData = 'checkrecord')
: (toData = 'shanghu_list')
gemhoUtil.navigatePage(`src/_${toData}.html`)
}
},
......@@ -157,7 +161,7 @@ window.onload = function () {
this.showPicker = false
},
getUserInfo() {
http.get('/gq/information/getAll/141 ').then((res) => {
http.get('/gq/information/getAll/1 ').then((res) => {
if (res.code !== 200 && res.data == null) {
return
}
......
......@@ -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
// post请求头
// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
......
......@@ -15,7 +15,6 @@
<van-cell-group>
<van-field label="商家名称" v-model="formData.unitName" :disabled="flag=='XQ'" />
</van-cell-group>
<van-cell-group>
<van-field label="负责人" v-model="formData.owner" type="tel" :disabled="flag=='XQ'"/>
</van-cell-group>
......
......@@ -5,6 +5,7 @@ window.addEventListener('load', function () {
el: '#app',
data() {
return {
flag: 'XQ',
formData: {
principal: '',
phone: '',
......
......@@ -62,7 +62,7 @@
<!-- 隐患列表 -->
<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="
......@@ -73,16 +73,16 @@
font-size: 0.3rem;
font-weight: bold;
font-family: PingFang SC;
">{{ item.description }}</div>
">{{ item.unitName }}</div>
<!-- 第二行:状态和时间 -->
<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 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>
</van-cell>
......@@ -97,58 +97,34 @@
return {
shanghuName: '',
// 新增子Tab数据
subActiveTab: 0,
hazardList: [{
id: 1,
description: '威海市保卫酒店有限公司1',
status: '待审核',
date: '场所类型:小餐饮',
shop: 'XX餐饮店',
type: 2
},
{
id: 2,
description: '威海市保卫酒店有限公司2',
status: '待整改',
date: '场所类型:小餐饮',
shop: 'XX餐饮店',
type: 2
},
// 更多示例数据...
],
hazardList: [],
}
},
computed: {
filteredHazards() {
return this.hazardList
}
},
methods: {
onSearch(){
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) {
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>
......
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