Commit e6bbcea2 authored by lei's avatar lei

add:扫码商户主页

parent 4af8aade
......@@ -112,13 +112,20 @@ window.onload = function () {
success: function (data) {
// 获取到data为二维码的url路径,从这里取请求参数,商户id,在下面跳转本地系统路径
// alert('扫码成功'+JSON.stringify(data))
const strUrl = new URL(data);
const param = {
merId: strUrl.searchParams.get('merId'),
accessType: strUrl.searchParams.get('accessType')
};
console.log('扫码成功', data, param);
// location.href = 'shanghu_home.html'
// let param = {
// accessType: 'saoma',
// merId: data,
// }
// let url = gemhoUtil.setParameter(`_shanghu_home.html`, param)
// gemhoUtil.navigatePage(url, '跳转中...')
let url = gemhoUtil.setParameter(`./src/_shanghu_home.html`, param)
gemhoUtil.navigatePage(url, '跳转中...')
//成功回调
},
fail: function (data) {
......
......@@ -4,7 +4,7 @@
* description: 商户首页
*/
var VUE = null
window.addEventListener("load", function() {
window.addEventListener("load", function () {
VUE = new Vue({
el: '#app',
data() {
......@@ -12,21 +12,21 @@ window.addEventListener("load", function() {
// 新增子Tab数据
subActiveTab: 0,
hazardList: [{
id: 1,
description: '消防通道被货物堵塞,存在严重安全隐患',
status: '待审核',
date: '2024-03-15',
shop: 'XX餐饮店',
type: 2
},
{
id: 2,
description: '消防通道被货物堵塞,存在严重安全隐患',
status: '待整改',
date: '2024-03-15',
shop: 'XX餐饮店',
type: 2
},
id: 1,
description: '消防通道被货物堵塞,存在严重安全隐患',
status: '待审核',
date: '2024-03-15',
shop: 'XX餐饮店',
type: 2
},
{
id: 2,
description: '消防通道被货物堵塞,存在严重安全隐患',
status: '待整改',
date: '2024-03-15',
shop: 'XX餐饮店',
type: 2
},
// 更多示例数据...
],
activeTab: 0,
......@@ -42,15 +42,15 @@ window.addEventListener("load", function() {
type: '', // 新增类型字段
},
checkList: [{
id: 1,
date: '2024-03-15',
result: '合格'
},
{
id: 2,
date: '2024-03-14',
result: '不合格'
}
id: 1,
date: '2024-03-15',
result: '合格'
},
{
id: 2,
date: '2024-03-14',
result: '不合格'
}
]
}
},
......@@ -63,9 +63,17 @@ window.addEventListener("load", function() {
}
},
methods: {
navTo(url){
navTo(url) {
// gemhoUtil.nav2asd(url)
gemhoUtil.navigatePage(`_${url}.html`)
let params = gemhoUtil.getUrlParams()
if (url == 'check_info') {
params = {
...params,
flag: 'ADD',
pageName: '_shanghu_home'
}
}
gemhoUtil.navigatePage(`_${url}.html`, params)
},
// 新增选择确认方法
onConfirmType(value) {
......@@ -88,7 +96,7 @@ window.addEventListener("load", function() {
viewDetail(item) {
console.log('查看详情:', id);
// 这里添加跳转逻辑
if(item.status == '01'){ // 待审核
if (item.status == '01') { // 待审核
this.navTo('check_info', item.id)
// gemhoUtil.navigatePage(`_${url}.html`)
}
......
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