添加页面及部分多语言切换
This commit is contained in:
+52
-22
@@ -1,22 +1,21 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="contop">
|
||||
<view class="changeyy" @click="switchLang" >
|
||||
<image src="/static/image/change.png" mode=""></image>切换语言
|
||||
<view class="changeyy" @click="showlang = true" >
|
||||
<image src="/static/image/change.png" mode=""></image>{{$t('home.langbtn')}}
|
||||
</view>
|
||||
<view class="title">
|
||||
您已陪伴HESU CRM
|
||||
{{$t('home.title')}} HESU CRM
|
||||
</view>
|
||||
<view class="num">
|
||||
66 <text>天</text>
|
||||
66 <text>{{$t('home.day')}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="data-briefing">
|
||||
<view class="top">
|
||||
<text>数据简报</text>
|
||||
<text>{{$t('home.databf')}}</text>
|
||||
<view class="time" @click="show = true">
|
||||
<image src="/static/image/time.png" mode=""></image>
|
||||
<!-- <u--input v-model="timevalue" border="none" disabled disabledColor="#ffffff" style="width: 65px;margin-left: 5px;"></u--input> -->
|
||||
<u--input v-model="time" border="none" disabled disabledColor="#ffffff" style="width: 65px;margin-left: 5px;"></u--input>
|
||||
<u-icon name="arrow-down" color="#666666" size="16"></u-icon>
|
||||
</view>
|
||||
@@ -25,19 +24,19 @@
|
||||
<u-grid :border="false" col="4">
|
||||
<u-grid-item>
|
||||
<text class="grid-num">20</text>
|
||||
<text class="grid-text">常见问题</text>
|
||||
<text class="grid-text">{{$t('home.addxs')}}</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<text class="grid-num">20</text>
|
||||
<text class="grid-text">新增客户</text>
|
||||
<text class="grid-text">{{$t('home.addkh')}}</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<text class="grid-num">20</text>
|
||||
<text class="grid-text">新增拜访</text>
|
||||
<text class="grid-text">{{$t('home.addbf')}}</text>
|
||||
</u-grid-item>
|
||||
<u-grid-item>
|
||||
<text class="grid-num">20</text>
|
||||
<text class="grid-text">新增跟进</text>
|
||||
<text class="grid-text">{{$t('home.addgj')}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
@@ -57,7 +56,8 @@
|
||||
</userlist>
|
||||
</view>
|
||||
</view>
|
||||
<u-datetime-picker :show="show" v-model="value1" @confirm="confirm" @cancel="cancel" @close="close" mode="year-month"></u-datetime-picker>
|
||||
<u-datetime-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="show" v-model="value1" @confirm="confirm" @cancel="cancel" mode="year-month"></u-datetime-picker>
|
||||
<u-picker :cancel-text="$t('cancel')" :confirm-text="$t('confirm')" :show="showlang" :columns="columns" @cancel="cancellang" @confirm="confirmlang" :title="$t('home.langbtn')" keyName="label"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
home: this.$t('tabbar.home'),
|
||||
value0: 0,
|
||||
show: false,
|
||||
showlang: false,
|
||||
value1: Number(new Date()),
|
||||
timevalue:this.result(Number(new Date())),
|
||||
time:this.result(Number(new Date())),
|
||||
@@ -82,25 +83,56 @@
|
||||
{id:3},
|
||||
{id:4}
|
||||
],
|
||||
columns:[
|
||||
[{
|
||||
label: '中文',
|
||||
id: 'zh'
|
||||
}, {
|
||||
label: '英文',
|
||||
id: 'en'
|
||||
}, {
|
||||
label: '俄语',
|
||||
id: 'ru'
|
||||
}]
|
||||
],
|
||||
list1: [
|
||||
{
|
||||
name: '全部',
|
||||
name: this.$t('all'),
|
||||
}, {
|
||||
name: '跟进中',
|
||||
name: this.$t('followup'),
|
||||
}, {
|
||||
name: '已成交'
|
||||
name: this.$t('deal')
|
||||
}, {
|
||||
name: '已丢失'
|
||||
name: this.$t('lost')
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
switchLang() {
|
||||
this.$i18n.locale = this.$i18n.locale == 'en' ? 'cn' : 'en';
|
||||
confirm(e) {
|
||||
// console.log('confirm', e);
|
||||
this.show = false
|
||||
},
|
||||
cancellang() {
|
||||
// console.log('cancel');
|
||||
this.showlang = false
|
||||
},
|
||||
confirmlang(e) {
|
||||
this.$i18n.locale = e.value[0].id
|
||||
this.showlang = false
|
||||
this.list1 = [
|
||||
{
|
||||
name: this.$t('all'),
|
||||
}, {
|
||||
name: this.$t('followup'),
|
||||
}, {
|
||||
name: this.$t('deal')
|
||||
}, {
|
||||
name: this.$t('lost')
|
||||
}
|
||||
];
|
||||
uni.setTabBarItem({
|
||||
index: 0,
|
||||
text: this.$t('tabbar.home')
|
||||
@@ -114,9 +146,6 @@
|
||||
text: this.$t('tabbar.mine')
|
||||
})
|
||||
},
|
||||
close() {
|
||||
this.show = false
|
||||
},
|
||||
cancel() {
|
||||
this.show = false
|
||||
},
|
||||
@@ -173,6 +202,7 @@
|
||||
.title{
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 20px;
|
||||
width: 58%;
|
||||
}
|
||||
.num{
|
||||
font-size: 60rpx;
|
||||
@@ -220,7 +250,7 @@
|
||||
}
|
||||
.grid-text{
|
||||
color: #222222;
|
||||
font-size: 24rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user