首页,我的 写扫码点餐之前提交1.0.0

This commit is contained in:
wwz
2025-02-13 16:49:13 +08:00
parent 6cea5aeb42
commit f2513ef13a
48 changed files with 7757 additions and 514 deletions

View File

@@ -13,11 +13,16 @@
ref,
defineProps
} from 'vue';
import {
APIproductqueryShop
} from "@/common/api/product/product.js";
import {
Storelogin
} from '@/stores/share.js';
const props = defineProps({
district: Array
});
const clickdistrict = (item) => {
console.log(item, '调试')
switch (item.jumpType) {
case 'absolute':
uni.pro.navigateTo('webview/webview', {
@@ -28,11 +33,7 @@
uni.navigateToMiniProgram(JSON.parse(item.value))
break;
case 'relative':
uni.setStorage({
key: 'itemData',
data: item,
});
uni.pro.navigateTo(item.absUrl, item.name);
uni.pro.navigateTo(item.absUrl);
break;
case 'scan':
if (!uni.utils.pluschooseImage()) {
@@ -44,9 +45,19 @@
let tableCode = getQueryString(decodeURIComponent(res.result), 'code')
uni.cache.set('tableCode', tableCode)
if (tableCode) {
let data = await this.api.productqueryShop({
let data = await APIproductqueryShop({
code: uni.cache.get('tableCode'),
})
// -4请求登录
const store = Storelogin();
if (data.code == '-4') {
if (await store.actionslogin()) {
// 成功
} else {
// 失败接着请求
await store.actionslogin()
}
}
if (data.data.shopTableInfo && !data.data.shopTableInfo.choseCount) {
uni.pro.navigateTo('/pagesOrder/orderAMeal/index', {
tableCode: tableCode,
@@ -87,16 +98,19 @@
width: 100%;
background: #F9F9F9;
border-radius: 48rpx 48rpx 0rpx 0rpx;
overflow-x: auto;
overflow-x: auto;
flex-wrap: nowrap;
box-sizing: border-box;
.towcontent_item {
width: 25%;
margin-left: 34rpx;
image {
width: 92rpx;
height: 92rpx;
}
text {
margin-top: 16rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
@@ -106,6 +120,7 @@
white-space: nowrap;
}
}
.towcontent_item:nth-child(1) {
margin-left: 0rpx;
}