diff --git a/src/pages/tabbar/onlineShop.vue b/src/pages/tabbar/onlineShop.vue index 0037727..274508d 100644 --- a/src/pages/tabbar/onlineShop.vue +++ b/src/pages/tabbar/onlineShop.vue @@ -29,39 +29,39 @@ class="flex-1" v-model="state.params.keyword" type="text" - height="66" - minHeight="66" + height="72" + minHeight="72" fontSize="28" :showClear="true" :focus="false" placeholder="请输入商品名称" - style="border: 2rpx solid #0779fd; border-radius: 14rpx" + style="border: 4rpx solid #0779fd; border-radius: 14rpx" :focus-highlight="false" color="#ECF4F9" > - 购物车 + 购物车 - - - - {{ v.name }} - + + + + {{ v.name }} + + @@ -76,7 +76,7 @@ :hasAroundGutter="false" backgroundColor="#ffffff00" :crossOrigin="false" - :animationCancel="true" + :animationCancel="false" > - - + + {{ v.name }} {{ v.contactName }} - {{ v.contactPhone }} + + + {{ v.contactPhone }} + {{ v.email }} - {{ v.businessHours }} + 营业:{{ v.businessHours }} + + + + {{ v.address }} - {{ v.address }}1111 - - - - {{ pV.title }} - - + + + + {{ pV.title }} + + ¥ - {{ hooks.useMoney(pV.minPrice) }} + {{ pV.spuPrice.toFixed(2) }} - {{ pV.unit || "" }} + {{ pV.unit || "" }} - - + + ¥ - {{ hooks.useMoney(pV.spuPrice) }} + {{ pV.originalPrice.toFixed(2) }} - 库存{{ pV.totalStock }} + 库存{{ pV.totalStock }} @@ -109,6 +111,8 @@ import { onLoad } from "@dcloudio/uni-app" import { isEmpty } from "radash" import { reactive, ref } from "vue" import { filePath } from "@@/utils/file" +import { getAppInfo } from "@/sheep/utils/app" +import { APPENV } from "@/sheep/constant" const state = reactive({ params: { @@ -164,6 +168,22 @@ const search = () => { pageRef.value && pageRef.value.reload(true) } +// 联系商家 +const doPhone = async (item: string) => { + if (isEmpty(item)) return uni.showToast({ title: "该商户没有预留电话", icon: "none" }) + if ((await getAppInfo()) == APPENV.ZZD) { + ;(window as any).dd + .callPhone({ phoneNum: item.trim() }) + .then((res) => {}) + .catch((err) => {}) + return + } + if ((await getAppInfo()) == APPENV.SH) { + hooks.useMakePhoneCall(item.trim()) + return + } +} + // 超市详情 const toDetail = async (v: any) => { const isLogin = await hooks.useCheckLogin() diff --git a/src/sheep/api/prosperityShop.ts b/src/sheep/api/prosperityShop.ts index e20ba84..8097e42 100644 --- a/src/sheep/api/prosperityShop.ts +++ b/src/sheep/api/prosperityShop.ts @@ -6,7 +6,7 @@ export default { return request({ url: "/supermarket/app/mall/merchant/list", method: "GET", - params, + params: { productLimit: 5 }, }) }, }