Compare commits

..

3 Commits

Author SHA1 Message Date
Wayne 22f914604a test
2 years ago
Wayne 09b8631c4f test
2 years ago
Wayne 972b9b0155 bugfix20240318
2 years ago

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

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

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

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

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

Loading…
Cancel
Save