diff --git a/env/.env.development b/env/.env.development index f1635d4..4095854 100644 --- a/env/.env.development +++ b/env/.env.development @@ -5,6 +5,6 @@ VITE_DELETE_CONSOLE=false #本地环境 VITE_SERVER_BASEURL=https://howhowfresh.com/prod-api -#VITE_SERVER_BASEURL=http://192.168.5.11:8080 -#VITE_SERVER_BASEURL=http://192.168.0.148:8888 +#VITE_SERVER_BASEURL=http://192.168.0.158:8889 +#VITE_SERVER_BASEURL=http://192.168.0.158:8888 #VITE_SERVER_BASEURL=http://liuyao.nat100.top/meiguowaimai \ No newline at end of file diff --git a/src/components/navbar/navbar.vue b/src/components/navbar/navbar.vue index 1b2d0c3..d604544 100644 --- a/src/components/navbar/navbar.vue +++ b/src/components/navbar/navbar.vue @@ -59,7 +59,7 @@ function handleClickLeft() { height: 72rpx; border-radius: 50%; background-color: #fff; - box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08); + // box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08); } :deep(.wd-navbar) { diff --git a/src/locale/en.json b/src/locale/en.json index 059d17f..f85e855 100644 --- a/src/locale/en.json +++ b/src/locale/en.json @@ -135,6 +135,9 @@ "navbar-forget-password": "Forgot password", "navbar-forget-payment-password": "Forgot your payment password", "navbar-invited-person": "My invitation", + "navbar-ai-recommend": "AI Recommend Entry", + "navbar-ai-diet-preference": "Diet Preference Setup", + "navbar-ai-chat": "AI Ingredient Chat", "navbar-nickname": "Name", "navbar-personal-information": "personal information", "navbar-set-payment-password": "Set a payment password", @@ -230,6 +233,70 @@ "featured-dishes": "Featured Dishes", "nearby-merchants": "Nearby Merchants" }, + "ai": { + "recommend": { + "loading": "Loading..." + }, + "dietPreference": { + "title": "Complete Your Diet Preferences", + "sub": "We will recommend dishes and ingredients that better match your taste based on your information, allowing AI to understand your stomach better.", + "loadingConfig": "Loading profile configuration...", + "empty": "No configurable items", + "multi": "(Multiple)", + "single": "(Single)", + "submit": "Save Configuration", + "fallback": { + "groupTaste": "Taste & Taboos", + "tasteLike": "Taste Preference", + "tasteTaboo": "Absolute Taboos", + "optionHeavy": "Heavy Flavor", + "optionLight": "Light", + "optionSpicy": "Spicy", + "optionSeafood": "Seafood Allergy", + "optionOrgan": "No Offal", + "optionOnion": "No Onion/Ginger/Garlic" + } + }, + "chat": { + "title": "AI Ingredient Recommendation", + "defaultMessage": "Hi, I can recommend dishes based on your budget, taboos, and taste preferences.", + "thinking": "Thinking...", + "thinkingSearching": "AI is searching matching items...", + "searchingGoods": "Searching products...", + "toolStatusWithSize": "Calling {tool}, total {size} items", + "emptyResult": "Completed, but no displayable content returned.", + "requestFailed": "Request failed, please try again later.", + "recommendCountPrefix": "Recommended items: ", + "recommendCountSuffix": "", + "recommendSource": "Selected by AI in real time", + "summaryFound": "{count} items found", + "summaryBudget": "Estimate {estimate}, actual {actual}, saved {save}", + "unnamed": "Unnamed Item", + "quickAdd": "Quick Add", + "added": "Added", + "addAll": "Add All", + "addingAll": "Adding...", + "allAdded": "All Added", + "addAllResultPrefix": "Added ", + "addAllResultMiddle1": ", failed ", + "addAllResultMiddle2": ", skipped ", + "addAllResultSuffix": "", + "addAllFailed": "Failed to add, please try again", + "goCartTitle": "Added Successfully", + "goCartTip": "Go to cart now?", + "goCartLater": "Maybe later", + "goCartNow": "Go now", + "duplicateTitle": "Duplicate Add Confirmation", + "duplicateSingleTip": "This item already exists in the cart. Add again?", + "duplicateBatchTipPrefix": "", + "duplicateBatchTipSuffix": " recommended item(s) already exist in the cart. Add them again?", + "missingDishNav": "Missing merchant info, unable to open detail", + "missingCartArgs": "Missing merchant or dish info, unable to add cart", + "addCartPending": "Add to Cart (pending integration)", + "inputPlaceholder": "Send a message or hold to speak (demo)", + "generating": "Generating..." + } + }, "mine": { "activity-description": "Activity description", "activity-description-tip": "Share the QR code and invite new users to register successfully. Successful invitation", diff --git a/src/locale/zh-Hans.json b/src/locale/zh-Hans.json index 8d79dc8..f06e90a 100644 --- a/src/locale/zh-Hans.json +++ b/src/locale/zh-Hans.json @@ -135,6 +135,9 @@ "navbar-forget-password": "忘记密码", "navbar-forget-payment-password": "忘记支付密码", "navbar-invited-person": "我的邀请", + "navbar-ai-recommend": "AI推荐入口", + "navbar-ai-diet-preference": "饮食喜好设置", + "navbar-ai-chat": "AI食材推荐", "navbar-nickname": "昵称", "navbar-personal-information": "个人信息", "navbar-set-payment-password": "设置支付密码", @@ -230,6 +233,70 @@ "featured-dishes": "精选菜品", "nearby-merchants": "附近商家" }, + "ai": { + "recommend": { + "loading": "加载中..." + }, + "dietPreference": { + "title": "完善您的饮食偏好", + "sub": "我们将根据您的信息为您推荐更符合口味的菜品和食材,让AI更懂你的胃。", + "loadingConfig": "正在加载画像配置...", + "empty": "暂无可配置项", + "multi": "(可多选)", + "single": "(单选)", + "submit": "保存配置", + "fallback": { + "groupTaste": "口味与禁忌", + "tasteLike": "口味偏好", + "tasteTaboo": "绝对忌口", + "optionHeavy": "重口味", + "optionLight": "清淡", + "optionSpicy": "麻辣", + "optionSeafood": "海鲜过敏", + "optionOrgan": "不吃内脏", + "optionOnion": "不吃葱姜蒜" + } + }, + "chat": { + "title": "AI食材推荐", + "defaultMessage": "你好,我可以根据你的预算、忌口和口味推荐菜品。", + "thinking": "思考中...", + "thinkingSearching": "AI 正在检索匹配商品...", + "searchingGoods": "正在检索商品...", + "toolStatusWithSize": "正在调用 {tool},共 {size} 条", + "emptyResult": "已完成,但未返回可展示内容。", + "requestFailed": "请求失败,请稍后重试。", + "recommendCountPrefix": "推荐商品 ", + "recommendCountSuffix": " 件", + "recommendSource": "来自 AI 实时筛选", + "summaryFound": "找到 {count} 件商品", + "summaryBudget": "预估 {estimate},实际 {actual},优惠 {save} 元", + "unnamed": "未命名商品", + "quickAdd": "一键加购", + "added": "已加购", + "addAll": "一键加入全部", + "addingAll": "加购中...", + "allAdded": "已全部加购", + "addAllResultPrefix": "已加购", + "addAllResultMiddle1": "件,失败", + "addAllResultMiddle2": "件,跳过", + "addAllResultSuffix": "件", + "addAllFailed": "加入失败,请稍后重试", + "goCartTitle": "加入成功", + "goCartTip": "是否前往购物车?", + "goCartLater": "下次再说", + "goCartNow": "直接前往", + "duplicateTitle": "重复加入确认", + "duplicateSingleTip": "当前购物车已存在该商品,是否重复加入?", + "duplicateBatchTipPrefix": "当前购物车已有", + "duplicateBatchTipSuffix": "件推荐商品,是否重复加入这些商品?", + "missingDishNav": "缺少商家信息,暂无法查看详情", + "missingCartArgs": "缺少商家或菜品信息,暂无法加购", + "addCartPending": "加入购物车(待接入)", + "inputPlaceholder": "输入消息后点击发送", + "generating": "生成中..." + } + }, "mine": { "activity-description": "活动说明:", "activity-description-tip": "分享专属二维码邀请新用户注册即邀请成功。一起来注册体验点餐功能。", diff --git a/src/manifest.json b/src/manifest.json index 34a558d..1cecf37 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,8 +2,8 @@ "name" : "CHEFLINK delivery", "appid" : "__UNI__06509BE", "description" : "", - "versionName" : "3.1.4", - "versionCode" : 314, + "versionName" : "3.1.8", + "versionCode" : 318, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/src/pages-store/pages/store/dishes.vue b/src/pages-store/pages/store/dishes.vue index c4ce1e2..dd65dac 100644 --- a/src/pages-store/pages/store/dishes.vue +++ b/src/pages-store/pages/store/dishes.vue @@ -388,10 +388,10 @@ const specPopupDisplayPrice = computed(() => { const detailDisplayPrice = computed(() => { const dish = dishDetailData.value as any; - const firstSpecPrice = dish?.merchantSideDishVoList?.[0]?.merchantSideDishItemVoList?.[0]?.actualSalePrice; - if (firstSpecPrice != null && String(firstSpecPrice) !== "") { - return firstSpecPrice; - } + // const firstSpecPrice = dish?.merchantSideDishVoList?.[0]?.merchantSideDishItemVoList?.[0]?.actualSalePrice; + // if (firstSpecPrice != null && String(firstSpecPrice) !== "") { + // return firstSpecPrice; + // } return dish?.actualSalePrice; }); @@ -771,21 +771,19 @@ function getStoreDetail() { - + $ {{ - detailDisplayPrice + dishDetailData?.originalPrice }} ${{ dishDetailData?.originalPrice }}${{ dishDetailData?.discountPrice }} +import { computed } from 'vue' + +const props = withDefaults( + defineProps<{ + modelValue: boolean + title: string + content: string + cancelText: string + confirmText: string + }>(), + { + modelValue: false, + title: '', + content: '', + cancelText: '', + confirmText: '', + } +) + +const emit = defineEmits<{ + (e: 'update:modelValue', value: boolean): void + (e: 'confirm'): void + (e: 'cancel'): void +}>() + +const show = computed({ + get: () => props.modelValue, + set: (value: boolean) => emit('update:modelValue', value), +}) + +function handleCancel() { + emit('cancel') +} + +function handleConfirm() { + emit('confirm') +} + +function handleClose() { + emit('cancel') +} + + + + + diff --git a/src/pages/ai/chat/index.vue b/src/pages/ai/chat/index.vue new file mode 100644 index 0000000..4260e47 --- /dev/null +++ b/src/pages/ai/chat/index.vue @@ -0,0 +1,811 @@ + + + + + + diff --git a/src/pages/ai/diet-preference/index.vue b/src/pages/ai/diet-preference/index.vue new file mode 100644 index 0000000..53b7234 --- /dev/null +++ b/src/pages/ai/diet-preference/index.vue @@ -0,0 +1,426 @@ + + + + + + diff --git a/src/pages/ai/recommend/index.vue b/src/pages/ai/recommend/index.vue new file mode 100644 index 0000000..6a137e3 --- /dev/null +++ b/src/pages/ai/recommend/index.vue @@ -0,0 +1,77 @@ + + + + + + diff --git a/src/pages/home/components/tabbar-home/components/home-skeleton.vue b/src/pages/home/components/tabbar-home/components/home-skeleton.vue index 55978dc..2d9b776 100644 --- a/src/pages/home/components/tabbar-home/components/home-skeleton.vue +++ b/src/pages/home/components/tabbar-home/components/home-skeleton.vue @@ -1,20 +1,26 @@