完成第一版开发
This commit is contained in:
parent
e4b66175f9
commit
327da6f04c
@ -12,8 +12,8 @@
|
|||||||
import { useIndex } from '@/stores/index.js'
|
import { useIndex } from '@/stores/index.js'
|
||||||
|
|
||||||
onLaunch( async(e) => {
|
onLaunch( async(e) => {
|
||||||
uni.setLocale('en')
|
|
||||||
useIndex().menuInit()
|
useIndex().menuInit()
|
||||||
|
useIndex().getAppInfo()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -120,3 +120,10 @@ export const saveMsg = (data) => {
|
|||||||
export const fullTextSearchApi = (params) => {
|
export const fullTextSearchApi = (params) => {
|
||||||
return request.get('/web/searchText', {params})
|
return request.get('/web/searchText', {params})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @function 获取基础信息
|
||||||
|
**/
|
||||||
|
export const appInfoApi = () => {
|
||||||
|
return request.get('/web/footerInfo')
|
||||||
|
}
|
@ -40,7 +40,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
import { ref, computed, nextTick } from 'vue';
|
import { ref, computed, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
@ -96,6 +96,13 @@
|
|||||||
{id:121113123,title: 'SINOTRUK HOWO Tractor Truck Head',mainPic:'https://dianliang123.oss-cn-qingdao.aliyuncs.com/user/2025/07/09/55979a0deee24031a38e934c6b06ca20.jpg'}
|
{id:121113123,title: 'SINOTRUK HOWO Tractor Truck Head',mainPic:'https://dianliang123.oss-cn-qingdao.aliyuncs.com/user/2025/07/09/55979a0deee24031a38e934c6b06ca20.jpg'}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
onPullDownRefresh(async() => {
|
||||||
|
try {
|
||||||
|
await getInfo()
|
||||||
|
} catch(err){}
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
id.value = options.id
|
id.value = options.id
|
||||||
getInfo()
|
getInfo()
|
||||||
@ -105,7 +112,12 @@
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.pages {
|
.pages {
|
||||||
padding: 0 18rpx;
|
padding: 0 18rpx;
|
||||||
|
/* #ifdef APP */
|
||||||
|
padding-top: calc(var(--status-bar-height) + 30px);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
padding-top: calc(var(--status-bar-height) + 50px);
|
padding-top: calc(var(--status-bar-height) + 50px);
|
||||||
|
/* #endif */
|
||||||
padding-bottom: 200rpx;
|
padding-bottom: 200rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
::v-deep .tabs {
|
::v-deep .tabs {
|
||||||
@ -113,7 +125,10 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
/* #ifdef H5 */
|
||||||
top: calc(var(--status-bar-height) + 44px);
|
top: calc(var(--status-bar-height) + 44px);
|
||||||
|
/* #endif */
|
||||||
left: 0;
|
left: 0;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
background-color: #e4ecff;
|
background-color: #e4ecff;
|
||||||
|
@ -14,7 +14,11 @@
|
|||||||
:current="swiperCurrent"
|
:current="swiperCurrent"
|
||||||
@change="swiperChange"
|
@change="swiperChange"
|
||||||
>
|
>
|
||||||
<swiper-item v-for="(item,index) in productsImages" :key="index">
|
<swiper-item
|
||||||
|
v-for="(item,index) in productsImages"
|
||||||
|
:key="index"
|
||||||
|
@click="previewImg(index)"
|
||||||
|
>
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
<image :src="item" mode="aspectFill"></image>
|
<image :src="item" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -182,7 +186,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
import { ref, computed, nextTick } from 'vue';
|
import { ref, computed, nextTick } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import {
|
import {
|
||||||
@ -318,6 +322,21 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const previewImg = (index) => {
|
||||||
|
uni.previewImage({
|
||||||
|
urls: productsImages.value,
|
||||||
|
current: index
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onPullDownRefresh(async() => {
|
||||||
|
try {
|
||||||
|
await getInfo()
|
||||||
|
await getFormOptions()
|
||||||
|
} catch(err){}
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
})
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
id.value = options.id
|
id.value = options.id
|
||||||
getInfo()
|
getInfo()
|
||||||
@ -328,7 +347,12 @@
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.pages {
|
.pages {
|
||||||
padding: 0 18rpx;
|
padding: 0 18rpx;
|
||||||
|
/* #ifdef APP */
|
||||||
|
padding-top: calc(var(--status-bar-height) + 30px);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
padding-top: calc(var(--status-bar-height) + 50px);
|
padding-top: calc(var(--status-bar-height) + 50px);
|
||||||
|
/* #endif */
|
||||||
padding-bottom: 200rpx;
|
padding-bottom: 200rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
::v-deep .tabs {
|
::v-deep .tabs {
|
||||||
@ -336,7 +360,10 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
/* #ifdef H5 */
|
||||||
top: calc(var(--status-bar-height) + 44px);
|
top: calc(var(--status-bar-height) + 44px);
|
||||||
|
/* #endif */
|
||||||
left: 0;
|
left: 0;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
background-color: #e4ecff;
|
background-color: #e4ecff;
|
||||||
|
@ -1,3 +1,18 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'DouyinSansBold'; /* 自定义字体的名称 */
|
||||||
|
src: url('@/assets/fonts/DouyinSansBold.otf') format('opentype'); /* 字体文件的路径 */
|
||||||
|
font-weight: normal; /* 字体的粗细 */
|
||||||
|
font-style: normal; /* 字体的样式 */
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'SourceHanSansCN'; /* 自定义字体的名称 */
|
||||||
|
src: url('@/assets/fonts/SourceHanSansCN-Regular.otf') format('opentype'); /* 字体文件的路径 */
|
||||||
|
font-weight: normal; /* 字体的粗细 */
|
||||||
|
font-style: normal; /* 字体的样式 */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
view{
|
view{
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
BIN
src/assets/fonts/DouyinSansBold.otf
Normal file
BIN
src/assets/fonts/DouyinSansBold.otf
Normal file
Binary file not shown.
BIN
src/assets/fonts/SourceHanSansCN-Regular.otf
Normal file
BIN
src/assets/fonts/SourceHanSansCN-Regular.otf
Normal file
Binary file not shown.
@ -9,7 +9,7 @@
|
|||||||
<image class="icon" src="@/assets/images/icon/phone2.png"></image>
|
<image class="icon" src="@/assets/images/icon/phone2.png"></image>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
<label>{{ $t('contactUs.contactUs') }}</label>
|
<label>{{ $t('contactUs.contactUs') }}</label>
|
||||||
<view>0086 182 5311 2969</view>
|
<view>{{useIndex().appInfo.tel}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
<image class="icon" src="@/assets/images/icon/mail2.png"></image>
|
<image class="icon" src="@/assets/images/icon/mail2.png"></image>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
<label>{{ $t('common.E-mail') }}</label>
|
<label>{{ $t('common.E-mail') }}</label>
|
||||||
<view>alicesales@scdtrailer.com</view>
|
<view>{{useIndex().appInfo.email}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<image class="icon" src="@/assets/images/icon/online.png"></image>
|
<image class="icon" src="@/assets/images/icon/online.png"></image>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
<label>{{ $t('common.Online') }}</label>
|
<label>{{ $t('common.Online') }}</label>
|
||||||
<view>0086 182 5311 2969</view>
|
<view>{{useIndex().appInfo.tel}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -40,6 +40,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { useIndex } from '@/stores/index.js';
|
||||||
|
|
||||||
const emits = defineEmits(['close'])
|
const emits = defineEmits(['close'])
|
||||||
|
|
||||||
@ -65,7 +66,12 @@
|
|||||||
height: 768rpx;
|
height: 768rpx;
|
||||||
padding: 74rpx 38rpx 38rpx;
|
padding: 74rpx 38rpx 38rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
/* #ifdef APP */
|
||||||
|
top: 280rpx;
|
||||||
|
/* #endif */
|
||||||
|
/* #ifdef H5 */
|
||||||
top: 354rpx;
|
top: 354rpx;
|
||||||
|
/* #endif */
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
background: url('@/assets/images/bg/online-bg.png') no-repeat;
|
background: url('@/assets/images/bg/online-bg.png') no-repeat;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { onShow } from "@dcloudio/uni-app";
|
||||||
import { ref, watch, computed } from 'vue';
|
import { ref, watch, computed } from 'vue';
|
||||||
import { useScroll } from '@/stores/index.js';
|
import { useScroll } from '@/stores/index.js';
|
||||||
|
|
||||||
@ -33,6 +34,12 @@
|
|||||||
})
|
})
|
||||||
useScroll().sendCallback()
|
useScroll().sendCallback()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
let locale = uni.getLocale()
|
||||||
|
console.log(locale)
|
||||||
|
uni.setLocale(locale === 'zh-Hans' ? 'zh-Hans' : 'en')
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -140,5 +140,12 @@
|
|||||||
"keywords": "China National Heavy Duty Truck Group (CNHTC) HOWO, HOWO Trucks, Heavy Truck Products, Heavy duty Trucks, Commercial Vehicles, HOWO Models, CNHTC Products, HOWO Truck Series, Large Trucks, Commercial Vehicle Products",
|
"keywords": "China National Heavy Duty Truck Group (CNHTC) HOWO, HOWO Trucks, Heavy Truck Products, Heavy duty Trucks, Commercial Vehicles, HOWO Models, CNHTC Products, HOWO Truck Series, Large Trucks, Commercial Vehicle Products",
|
||||||
"description": "China National Heavy Duty Truck Group Co., Ltd. provides a rich range of HOWO truck products, including various models and configurations. Understand the performance, technical specifications, and industry advantages of our heavy-duty trucks to meet your procurement needs."
|
"description": "China National Heavy Duty Truck Group Co., Ltd. provides a rich range of HOWO truck products, including various models and configurations. Understand the performance, technical specifications, and industry advantages of our heavy-duty trucks to meet your procurement needs."
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"app.Home": "Home",
|
||||||
|
"app.Product": "Product",
|
||||||
|
"app.News": "News",
|
||||||
|
"app.About": "About Us",
|
||||||
|
"app.Contact": "Contact Us",
|
||||||
|
"app.Online": "Online",
|
||||||
|
"app.fulltextsearch": "fulltextsearch"
|
||||||
}
|
}
|
@ -140,5 +140,12 @@
|
|||||||
"keywords": "中国重汽豪沃, 豪沃卡车, 重卡产品, 重型卡车, 商用车, 豪沃车型, 重汽产品, 豪沃卡车系列, 大型卡车, 商用车产品",
|
"keywords": "中国重汽豪沃, 豪沃卡车, 重卡产品, 重型卡车, 商用车, 豪沃车型, 重汽产品, 豪沃卡车系列, 大型卡车, 商用车产品",
|
||||||
"description": "中国重汽豪沃销售有限公司提供丰富的豪沃卡车产品系列,包括各种车型和配置。了解我们的重型卡车性能、技术参数及行业优势,满足您的采购需求。"
|
"description": "中国重汽豪沃销售有限公司提供丰富的豪沃卡车产品系列,包括各种车型和配置。了解我们的重型卡车性能、技术参数及行业优势,满足您的采购需求。"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"app.Home": "首页",
|
||||||
|
"app.Product": "产品",
|
||||||
|
"app.News": "新闻",
|
||||||
|
"app.About": "关于我们",
|
||||||
|
"app.Contact": "联系我们",
|
||||||
|
"app.Online": "在线",
|
||||||
|
"app.fulltextsearch": "全站搜索"
|
||||||
}
|
}
|
@ -2,7 +2,7 @@ import { createSSRApp,provide,h } from "vue";
|
|||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import { createPinia } from 'pinia';
|
import { createPinia } from 'pinia';
|
||||||
import { createI18n } from 'vue-i18n';
|
import { createI18n } from 'vue-i18n';
|
||||||
import zh from './locale/zh.json';
|
import zh from './locale/zh-Hans.json';
|
||||||
import en from './locale/en.json';
|
import en from './locale/en.json';
|
||||||
import ConfirmPopup from '@/components/comfirm-popup.vue'; // 全局统一的操作弹窗
|
import ConfirmPopup from '@/components/comfirm-popup.vue'; // 全局统一的操作弹窗
|
||||||
import CustomHeader from "@/components/custom-header.vue";
|
import CustomHeader from "@/components/custom-header.vue";
|
||||||
|
@ -10,34 +10,31 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "China Trailer, Truck, Trailer Parts, Truck Parts Manufacturers and Factory - Price - SINOTRUCK",
|
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/products/index",
|
"path": "pages/products/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "Product",
|
"enablePullDownRefresh": false
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/article-page/index",
|
"path": "pages/article-page/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "News"
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/separate/index",
|
"path": "pages/separate/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "About Us",
|
"enablePullDownRefresh": false
|
||||||
"enablePullDownRefresh": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/inquiry/index",
|
"path": "pages/inquiry/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "Contact Us"
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -48,7 +45,6 @@
|
|||||||
{
|
{
|
||||||
"path": "product-details",
|
"path": "product-details",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "Product details",
|
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "default"
|
"navigationStyle": "default"
|
||||||
}
|
}
|
||||||
@ -56,7 +52,6 @@
|
|||||||
{
|
{
|
||||||
"path": "article-details",
|
"path": "article-details",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "News detail",
|
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "default"
|
"navigationStyle": "default"
|
||||||
}
|
}
|
||||||
@ -64,15 +59,15 @@
|
|||||||
{
|
{
|
||||||
"path": "online",
|
"path": "online",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "Online",
|
"navigationBarTitleText": "%app.Online%",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": false,
|
||||||
"navigationStyle": "default"
|
"navigationStyle": "default"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "search-result",
|
"path": "search-result",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "Full text search",
|
"navigationBarTitleText": "%app.fulltextsearch%",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
"navigationStyle": "default"
|
"navigationStyle": "default"
|
||||||
}
|
}
|
||||||
@ -85,31 +80,31 @@
|
|||||||
"selectedColor": "#0358ff",
|
"selectedColor": "#0358ff",
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"text": "Home",
|
"text": "%app.Home%",
|
||||||
"pagePath": "pages/index/index",
|
"pagePath": "pages/index/index",
|
||||||
"iconPath": "/static/home.png",
|
"iconPath": "/static/home.png",
|
||||||
"selectedIconPath": "/static/home-select.png"
|
"selectedIconPath": "/static/home-select.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Product",
|
"text": "%app.Product%",
|
||||||
"pagePath": "pages/products/index",
|
"pagePath": "pages/products/index",
|
||||||
"iconPath": "/static/product.png",
|
"iconPath": "/static/product.png",
|
||||||
"selectedIconPath": "/static/product-select.png"
|
"selectedIconPath": "/static/product-select.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "News",
|
"text": "%app.News%",
|
||||||
"pagePath": "pages/article-page/index",
|
"pagePath": "pages/article-page/index",
|
||||||
"iconPath": "/static/news.png",
|
"iconPath": "/static/news.png",
|
||||||
"selectedIconPath": "/static/news-select.png"
|
"selectedIconPath": "/static/news-select.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "About Us",
|
"text": "%app.About%",
|
||||||
"pagePath": "pages/separate/index",
|
"pagePath": "pages/separate/index",
|
||||||
"iconPath": "/static/aboutus.png",
|
"iconPath": "/static/aboutus.png",
|
||||||
"selectedIconPath": "/static/aboutus-select.png"
|
"selectedIconPath": "/static/aboutus-select.png"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Contact Us",
|
"text": "%app.Contact%",
|
||||||
"pagePath": "pages/inquiry/index",
|
"pagePath": "pages/inquiry/index",
|
||||||
"iconPath": "/static/contactus.png",
|
"iconPath": "/static/contactus.png",
|
||||||
"selectedIconPath": "/static/contactus-select.png"
|
"selectedIconPath": "/static/contactus-select.png"
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
:scroll-y="true"
|
:scroll-y="true"
|
||||||
:scroll-top="prodScroll"
|
:scroll-top="prodScroll"
|
||||||
@scroll="scroll"
|
@scroll="scroll"
|
||||||
|
@scrolltolower="scrollBottom"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="prod-item"
|
class="prod-item"
|
||||||
@ -95,9 +96,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
import { ref, computed, watch, nextTick } from 'vue';
|
import { ref, computed, watch, nextTick } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
import { prodOrNewsCatgApi, articlePageApi, appMaxCatgIdApi } from '@/api';
|
import { prodOrNewsCatgApi, articlePageApi, appMaxCatgIdApi } from '@/api';
|
||||||
import { useScroll } from '@/stores/index.js';
|
import { useScroll } from '@/stores/index.js';
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const prodList = ref([])
|
const prodList = ref([])
|
||||||
const params = ref({
|
const params = ref({
|
||||||
@ -114,13 +118,19 @@
|
|||||||
}
|
}
|
||||||
return articlePageApi(params.value).then(({data:res}) => {
|
return articlePageApi(params.value).then(({data:res}) => {
|
||||||
if (isLoad) {
|
if (isLoad) {
|
||||||
prodList.value = [...prodList.value,res.data.records]
|
prodList.value = [...prodList.value,...res.data.records]
|
||||||
} else {
|
} else {
|
||||||
prodList.value = res.data.records
|
prodList.value = res.data.records
|
||||||
}
|
}
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const scrollBottom = () => {
|
||||||
|
if (total.value === prodList.value.length) {
|
||||||
|
return uni.$showTost(t('common.Allloaded'))
|
||||||
|
}
|
||||||
|
init(true)
|
||||||
|
}
|
||||||
|
|
||||||
const collapseRef = ref()
|
const collapseRef = ref()
|
||||||
const collapseValue = ref('0')
|
const collapseValue = ref('0')
|
||||||
@ -217,14 +227,14 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(async() => {
|
||||||
|
|
||||||
})
|
|
||||||
onLoad(async() => {
|
|
||||||
await getMaxCatgId()
|
await getMaxCatgId()
|
||||||
await catgTreeInit()
|
await catgTreeInit()
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
onLoad(async() => {
|
||||||
|
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -271,6 +281,7 @@
|
|||||||
padding: 22rpx 16rpx;
|
padding: 22rpx 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #77778b;
|
color: #77778b;
|
||||||
|
font-family: 'SourceHanSansCN';
|
||||||
&:first-child {
|
&:first-child {
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="panel">
|
<view class="panel">
|
||||||
<view class="r-box">
|
<view class="r-box" @click="goPage('/pages/products/index','tab')">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text>{{$t('common.All')}}</text>
|
<text>{{$t('common.All')}}</text>
|
||||||
<text>{{$t('common.productslowercase')}}</text>
|
<text>{{$t('common.productslowercase')}}</text>
|
||||||
@ -45,16 +45,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="l-box">
|
<view class="l-box">
|
||||||
<view class="t-box">
|
<view class="t-box" @click="goPage('/pages/separate/index','tab')">
|
||||||
<view class="title">{{$t('index.companyProfile')}}</view>
|
<view class="title">{{$t('index.companyProfile')}}</view>
|
||||||
<image src="@/assets/images/icon/arrow.png"></image>
|
<image src="@/assets/images/icon/arrow.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="b-box">
|
<view class="b-box">
|
||||||
<view>
|
<view @click="goPage('/pages/article-page/index','tab')">
|
||||||
<text>{{$t('news.news')}}</text>
|
<text>{{$t('news.news')}}</text>
|
||||||
<text>{{$t('common.Center')}}</text>
|
<text>{{$t('common.Center')}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view @click="goPage('/pages/inquiry/index','tab')">
|
||||||
<text>{{$t('common.Quick')}}</text>
|
<text>{{$t('common.Quick')}}</text>
|
||||||
<text>{{$t('index.contact')}}</text>
|
<text>{{$t('index.contact')}}</text>
|
||||||
</view>
|
</view>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
<view class="common-card">
|
<view class="common-card">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<text class="title">{{$t('index.PopularProduct')}}</text>
|
<text class="title">{{$t('index.PopularProduct')}}</text>
|
||||||
<navigator class="view-more" url="/">
|
<navigator class="view-more" open-type="switchTab" url="/pages/products/index">
|
||||||
<text>{{$t('common.viewmore')}}</text>
|
<text>{{$t('common.viewmore')}}</text>
|
||||||
<image src="@/assets/images/icon/view-more.png"></image>
|
<image src="@/assets/images/icon/view-more.png"></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
@ -75,6 +75,7 @@
|
|||||||
class="product-item"
|
class="product-item"
|
||||||
v-for="item in hotProductList"
|
v-for="item in hotProductList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@click="goPage(`/application/product-details?id=${item.id}`,'nav')"
|
||||||
>
|
>
|
||||||
<image class="cover" :src="item.mainPic" mode="aspectFill"></image>
|
<image class="cover" :src="item.mainPic" mode="aspectFill"></image>
|
||||||
<view class="text-ellipsis title">
|
<view class="text-ellipsis title">
|
||||||
@ -87,7 +88,7 @@
|
|||||||
<view class="common-card">
|
<view class="common-card">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<text class="title">{{$t('menu.Products')}}</text>
|
<text class="title">{{$t('menu.Products')}}</text>
|
||||||
<navigator class="view-more" url="/">
|
<navigator class="view-more" open-type="switchTab" url="/pages/products/index">
|
||||||
<text>{{$t('common.viewmore')}}</text>
|
<text>{{$t('common.viewmore')}}</text>
|
||||||
<image src="@/assets/images/icon/view-more.png"></image>
|
<image src="@/assets/images/icon/view-more.png"></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
@ -97,6 +98,7 @@
|
|||||||
class="product-item"
|
class="product-item"
|
||||||
v-for="item in ordinaryProductList"
|
v-for="item in ordinaryProductList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@click="goPage(`/application/product-details?id=${item.id}`,'nav')"
|
||||||
>
|
>
|
||||||
<image class="cover" :src="item.mainPic" mode="aspectFill"></image>
|
<image class="cover" :src="item.mainPic" mode="aspectFill"></image>
|
||||||
<view class="text-ellipsis title">
|
<view class="text-ellipsis title">
|
||||||
@ -109,7 +111,7 @@
|
|||||||
<view class="common-card">
|
<view class="common-card">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<text class="title">{{$t('news.newsCenter')}}</text>
|
<text class="title">{{$t('news.newsCenter')}}</text>
|
||||||
<navigator class="view-more" url="/">
|
<navigator class="view-more" open-type="switchTab" url="/pages/article-page/index">
|
||||||
<text>{{$t('common.viewmore')}}</text>
|
<text>{{$t('common.viewmore')}}</text>
|
||||||
<image src="@/assets/images/icon/view-more.png"></image>
|
<image src="@/assets/images/icon/view-more.png"></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
@ -119,6 +121,7 @@
|
|||||||
class="news-item"
|
class="news-item"
|
||||||
v-for="item in hotNewsList"
|
v-for="item in hotNewsList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@click="goPage(`/application/article-details?id=${item.id}`,'nav')"
|
||||||
>
|
>
|
||||||
<image class="cover" :src="item.mainPic" mode="aspectFill"></image>
|
<image class="cover" :src="item.mainPic" mode="aspectFill"></image>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
@ -186,6 +189,18 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const goPage = (url,type) => {
|
||||||
|
if (type === 'tab') {
|
||||||
|
uni.switchTab({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onPullDownRefresh(async() => {
|
onPullDownRefresh(async() => {
|
||||||
try {
|
try {
|
||||||
await getBannerList()
|
await getBannerList()
|
||||||
@ -245,6 +260,7 @@
|
|||||||
min-height: 252rpx;
|
min-height: 252rpx;
|
||||||
margin: 24rpx 0;
|
margin: 24rpx 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
font-family: 'DouyinSansBold';
|
||||||
.r-box,.l-box {
|
.r-box,.l-box {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@ -273,7 +289,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.goto {
|
.goto {
|
||||||
width: min-content;
|
width: max-content;
|
||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
padding: 6rpx 12rpx;
|
padding: 6rpx 12rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -353,6 +369,7 @@
|
|||||||
.title {
|
.title {
|
||||||
color: #015fe8;
|
color: #015fe8;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
font-family: 'SourceHanSansCN';
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.view-more {
|
.view-more {
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
<view class="desc">
|
<view class="desc">
|
||||||
<view>
|
<view>
|
||||||
<label>{{$t('contactUs.contact')}}: </label>
|
<label>{{$t('contactUs.contact')}}: </label>
|
||||||
<text>{{$t('contactUs.contacts')}}</text>
|
<text>{{useIndex().appInfo.teams}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<label>{{$t('common.tel')}}: </label>
|
<label>{{$t('common.tel')}}: </label>
|
||||||
<text>+86-531-6998513</text>
|
<text>{{useIndex().appInfo.tel}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<label>{{$t('common.addressLabel')}}: </label>
|
<label>{{$t('common.addressLabel')}}: </label>
|
||||||
<text>{{$t('contactUs.address')}}</text>
|
<text>{{useIndex().appInfo.address}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -135,7 +135,7 @@
|
|||||||
<image class="icon" src="@/assets/images/icon/phone2.png"></image>
|
<image class="icon" src="@/assets/images/icon/phone2.png"></image>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
<label>{{ $t('contactUs.contactUs') }}</label>
|
<label>{{ $t('contactUs.contactUs') }}</label>
|
||||||
<view>0086 182 5311 2969</view>
|
<view>{{ useIndex().appInfo.tel }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -143,7 +143,7 @@
|
|||||||
<image class="icon" src="@/assets/images/icon/mail2.png"></image>
|
<image class="icon" src="@/assets/images/icon/mail2.png"></image>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
<label>{{ $t('common.E-mail') }}</label>
|
<label>{{ $t('common.E-mail') }}</label>
|
||||||
<view>alicesales@scdtrailer.com</view>
|
<view>{{ useIndex().appInfo.email }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<image class="icon" src="@/assets/images/icon/address.png"></image>
|
<image class="icon" src="@/assets/images/icon/address.png"></image>
|
||||||
<view class="desc">
|
<view class="desc">
|
||||||
<label>{{ $t('common.addressLabel') }}</label>
|
<label>{{ $t('common.addressLabel') }}</label>
|
||||||
<view>{{ $t('aboutUs.address') }}</view>
|
<view>{{ useIndex().appInfo.address }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -161,9 +161,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
import { ref, computed } from 'vue';
|
import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
import { useIndex } from '@/stores/index.js';
|
||||||
import { formOptionsApi, submitFormApi } from '@/api/index.js';
|
import { formOptionsApi, submitFormApi } from '@/api/index.js';
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
@ -232,7 +233,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {
|
onShow(() => {
|
||||||
getFormOptions()
|
getFormOptions()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -91,7 +91,8 @@
|
|||||||
class="list-scroll"
|
class="list-scroll"
|
||||||
:scroll-y="true"
|
:scroll-y="true"
|
||||||
:scroll-top="prodScroll"
|
:scroll-top="prodScroll"
|
||||||
@scroll="scroll"
|
@scroll="scroll"
|
||||||
|
@scrolltolower="scrollBottom"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="prod-item"
|
class="prod-item"
|
||||||
@ -115,9 +116,12 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
import { ref, computed, watch, nextTick } from 'vue';
|
import { ref, computed, watch, nextTick } from 'vue';
|
||||||
|
import { useI18n } from 'vue-i18n';
|
||||||
import { prodOrNewsCatgApi, prodPageApi, appMaxCatgIdApi } from '@/api';
|
import { prodOrNewsCatgApi, prodPageApi, appMaxCatgIdApi } from '@/api';
|
||||||
import { useScroll } from '@/stores/index.js';
|
import { useScroll } from '@/stores/index.js';
|
||||||
|
|
||||||
|
const { t } = useI18n()
|
||||||
|
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const prodList = ref([])
|
const prodList = ref([])
|
||||||
const params = ref({
|
const params = ref({
|
||||||
@ -135,13 +139,19 @@
|
|||||||
}
|
}
|
||||||
return prodPageApi(params.value).then(({data:res}) => {
|
return prodPageApi(params.value).then(({data:res}) => {
|
||||||
if (isLoad) {
|
if (isLoad) {
|
||||||
prodList.value = [...prodList.value,res.data.records]
|
prodList.value = [...prodList.value,...res.data.records]
|
||||||
} else {
|
} else {
|
||||||
prodList.value = res.data.records
|
prodList.value = res.data.records
|
||||||
}
|
}
|
||||||
total.value = res.data.total
|
total.value = res.data.total
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const scrollBottom = () => {
|
||||||
|
if (total.value === prodList.value.length) {
|
||||||
|
return uni.$showTost(t('common.Allloaded'))
|
||||||
|
}
|
||||||
|
init(true)
|
||||||
|
}
|
||||||
|
|
||||||
const collapseRef = ref()
|
const collapseRef = ref()
|
||||||
const collapseValue = ref('0')
|
const collapseValue = ref('0')
|
||||||
@ -238,14 +248,14 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow( async() => {
|
||||||
|
|
||||||
})
|
|
||||||
onLoad(async() => {
|
|
||||||
await getMaxCatgId()
|
await getMaxCatgId()
|
||||||
await catgTreeInit()
|
await catgTreeInit()
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
onLoad(() => {
|
||||||
|
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -310,6 +320,7 @@
|
|||||||
padding: 22rpx 16rpx;
|
padding: 22rpx 16rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
color: #77778b;
|
color: #77778b;
|
||||||
|
font-family: 'SourceHanSansCN';
|
||||||
&:first-child {
|
&:first-child {
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onPullDownRefresh } from '@dcloudio/uni-app';
|
import { onShow, onPullDownRefresh } from '@dcloudio/uni-app';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { categoryInfoApi, appMaxCatgIdApi } from '@/api/index.js';
|
import { categoryInfoApi, appMaxCatgIdApi } from '@/api/index.js';
|
||||||
|
|
||||||
@ -35,7 +35,7 @@
|
|||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(async(options) => {
|
onShow(async() => {
|
||||||
await getMaxCatgId()
|
await getMaxCatgId()
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { menuCategoryApi, msgListApi, saveMsg } from '@/api/index.js';
|
import { menuCategoryApi, msgListApi, saveMsg, appInfoApi } from '@/api/index.js';
|
||||||
import { getUuid } from '@/utils/tool.js';
|
import { getUuid } from '@/utils/tool.js';
|
||||||
|
|
||||||
export const useIndex = defineStore('index',()=>{
|
export const useIndex = defineStore('index',()=>{
|
||||||
@ -44,9 +44,18 @@ export const useIndex = defineStore('index',()=>{
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const appInfo = ref({})
|
||||||
|
const getAppInfo = () => {
|
||||||
|
appInfoApi().then(({data:res}) => {
|
||||||
|
appInfo.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
menuInit,
|
menuInit,
|
||||||
menuTree
|
menuTree,
|
||||||
|
appInfo,
|
||||||
|
getAppInfo
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import uni from "@dcloudio/vite-plugin-uni";
|
import uni from "@dcloudio/vite-plugin-uni";
|
||||||
import { defineConfig, loadEnv } from 'vite';
|
import { defineConfig, loadEnv } from 'vite';
|
||||||
import UniLayouts from '@uni-helper/vite-plugin-uni-layouts'
|
import UniLayouts from '@uni-helper/vite-plugin-uni-layouts';
|
||||||
|
|
||||||
export default defineConfig(({ command, mode }) => {
|
export default defineConfig(({ command, mode }) => {
|
||||||
// 根据当前工作目录中的 `mode` 加载 .env 文件
|
// 根据当前工作目录中的 `mode` 加载 .env 文件
|
||||||
@ -9,8 +9,8 @@ export default defineConfig(({ command, mode }) => {
|
|||||||
return {
|
return {
|
||||||
// vite 配置
|
// vite 配置
|
||||||
plugins: [
|
plugins: [
|
||||||
uni(),
|
|
||||||
UniLayouts(),
|
UniLayouts(),
|
||||||
|
uni(),
|
||||||
],
|
],
|
||||||
base: './',
|
base: './',
|
||||||
define: {
|
define: {
|
||||||
|
Loading…
Reference in New Issue
Block a user