bugfix20240318

dev
Wayne 2 years ago
parent ac04840889
commit 972b9b0155

@ -37,6 +37,7 @@ class ProductController extends BaseController
$total = Db::name('product')
->where($where)
->where('lang', $param['lang'])
->count();
foreach($list as $key => $val){
@ -57,6 +58,7 @@ class ProductController extends BaseController
$params = $request->post();
$data = [
'lang' => $params['lang'],
'name' => isset($params['name'])?$params['name']:'',
'imageurl' => isset($params['imageurl'])?$params['imageurl']:'',
'cat_id' => isset($params['cat_id'])?$params['cat_id']:0,

@ -36,6 +36,12 @@ const handleSearchSubmit = () => {
router.push(localePath('/products/search/' + searchKeyword.value));
searchKeyword.value = '';
}
watch(locale, (nVal,oVal) => {
if(nVal !== oVal) {
router.push(localePath('/'));
}
})
</script>
<template>

@ -30,11 +30,11 @@ const bannerObj = computed(() => {
const menuList = [
{
"name": t('contact'),
"name": t('Contact.form'),
"path": "/contact/form"
},
{
"name": t('branch'),
"name": t('Contact.branch'),
"path":"/contact/company"
},
]

@ -59,7 +59,7 @@ const submitForm = async (formEl) => {
<template>
<div class="toolbar">
<div class="text">
<div class="tTitle">{{ $t('contact') }}</div>
<div class="tTitle">{{ $t('Contact.form') }}</div>
</div>
</div>
<div class="content">

@ -5,6 +5,9 @@ import prodImg from '@/assets/img/noImage.jpg';
import featureImg from '@/assets/img/iStock.jpg';
const { locale } = useI18n()
const localePath = useLocalePath()
const store = useStore();
const router = useRouter();
@ -63,7 +66,7 @@ onMounted(async () => {
//
const goProd = (cid) => {
if(cid && cid !== null){
router.push({ path: '/products/list/' + cid });
router.push(localePath('/products/list/' + cid));
}
}
</script>

Loading…
Cancel
Save