提交 6e6a8787 编写于 作者: DCloud_JSON's avatar DCloud_JSON 提交者: study夏羽

修复search页面因多语言国际化导致多白屏问题

上级 034663f7
## 1.1.13(2021-09-29)
修复search页面因多语言国际化导致多白屏问题
## 1.1.12(2021-09-28)
1. 改造微信登陆逻辑,直接使用`uni.login`参数`"onlyAuthorize":true`实现
2. 修复,一键登录弹出层,已勾选“同意隐私政策协议”点击自定义登陆按钮,报“你未同意隐私政策协议”的bug
......
{
"id": "uni-starter",
"displayName": "uni-starter",
"version": "1.1.12",
"version": "1.1.13",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"login",
......
......@@ -24,10 +24,8 @@
}
}, {
"path": "pages/list/search/search",
"style": {
//#ifndef MP
"navigationStyle": "custom"
//#endif
"style": {
"navigationBarTitleText":"搜索"
}
}, {
"path": "pages/list/detail",
......
<template>
<view class="container">
<view class="status-bar" :style="{height:statusBarHeight}"></view>
<view class="search-container">
<!-- 搜索框 -->
<view class="search-container-bar">
......@@ -9,22 +8,22 @@
<!-- #endif -->
<!-- :cancelText="keyBoardPopup ? '取消' : '搜索'" -->
<uni-search-bar ref="searchBar" style="flex:1;" radius="100" v-model="searchText" :focus="focus" :placeholder="hotWorld"
clearButton="auto" :cancelText="$t('search.cancelText')" cancelButton="always" @clear="clear" @confirm="confirm" @cancel="backPage" />
clearButton="auto" cancelButton="always" @clear="clear" @confirm="confirm" @cancel="cancel" />
</view>
</view>
<view class="search-body">
<!-- 搜索历史 -->
<view class="word-container" v-if="localSearchList.length">
<view class="word-container_header">
<text class="word-container_header-text">{{$t('search.searchHistory')}}</text>
<text class="word-container_header-text">搜索历史</text>
<uni-icons v-if="!localSearchListDel" @click="localSearchListDel = true" class="search-icons" style="padding-right: 0;"
:color="iconColor" size="18" type="trash"></uni-icons>
<view v-else class="flex-center flex-row" style="font-weight: 500;justify-content: space-between;">
<text style="font-size: 22rpx;color: #666;padding-top:4rpx;padding-bottom:4rpx;padding-right:20rpx;" @click="LocalSearchListClear">{{$t('search.deleteAll')}}</text>
<text style="font-size: 22rpx;color: #c0402b;padding-top:4rpx;padding-bottom:4rpx;padding-left:20rpx;" @click="localSearchListDel = false">{{$t('search.complete')}}</text>
<text style="font-size: 22rpx;color: #666;padding-top:4rpx;padding-bottom:4rpx;padding-right:20rpx;" @click="LocalSearchListClear">全部删除</text>
<text style="font-size: 22rpx;color: #c0402b;padding-top:4rpx;padding-bottom:4rpx;padding-left:20rpx;" @click="localSearchListDel = false">完成</text>
</view>
</view>
<view class="word-container_body">
<view class="flex-center flex-row word-container_body-text" v-for="(word,index) in localSearchList" :key="index"
@click="LocalSearchlistItemClick(word,index)">
......@@ -37,13 +36,13 @@
<view class="word-container">
<view class="word-container_header">
<view class="flex-center flex-row">
<text class="word-container_header-text">{{$t('search.searchDiscovery')}}</text>
<text class="word-container_header-text">搜索发现</text>
<uni-icons v-if="!netHotListIsHide" class="search-icons" :color="iconColor" size="14" type="reload" @click="searchHotRefresh"></uni-icons>
</view>
<uni-icons class="search-icons" style="padding-right: 0;" :color="iconColor" size="18" :type="netHotListIsHide ? 'eye-slash' : 'eye'"
@click="netHotListIsHide = !netHotListIsHide"></uni-icons>
</view>
<unicloud-db ref="udb" #default="{data, loading, error, options}" field="content" collection="opendb-search-hot"
orderby="create_date desc,count desc" page-data="replace" :page-size="10">
<text v-if="loading && !netHotListIsHide" class="word-container_body-info">正在加载...</text>
......@@ -55,16 +54,19 @@
</template>
</template>
<view v-else style="flex:1;">
<text class="word-container_body-info">{{$t('search.searchHiddenTip')}}</text>
<text class="word-container_body-info">当前搜索发现已隐藏</text>
</view>
</view>
</unicloud-db>
</view>
</view>
<!-- 搜索联想 -->
<view class="search-associative" :style="{marginTop:statusBarHeight}" v-if="associativeShow">
<view class="search-associative" v-if="associativeShow">
<uni-list>
<uni-list-item v-for="(item,index) in associativeList" :key="item._id" :ellipsis="1" :title="item.title" @click="associativeClick(item)" show-extra-icon clickable :extra-icon="{size:18,color:iconColor,type:'search'}" />
<template v-for="(item,index) in associativeList">
<uni-list-item :key="item._id" :ellipsis="1" :title="item.name" @click="associativeClick(item)" show-extra-icon
clickable :extra-icon="{size:18,color:iconColor,type:'search'}" />
</template>
</uni-list>
</view>
</view>
......@@ -213,8 +215,8 @@
},
LocalSearchListClear() {
uni.showModal({
content: this.$t('search.deleteTip'),
confirmText: this.$t('search.delete'),
content: "确认清空搜索历史吗",
confirmText: "删除",
confirmColor: 'red',
cancelColor: '#808080',
success: res => {
......
......@@ -5,7 +5,7 @@
<uni-easyinput :inputBorder="false" class="easyinput" :placeholder="$t('register.usernamePlaceholder')" v-model="formData.username" trim="both" />
</uni-forms-item>
<uni-forms-item name="nickname">
<uni-easyinput :inputBorder="false" class="easyinput" :placeholder="$t('register.nicknamePlaceholder')" v-model="formData.nickname" trim="both" />
<uni-easyinput :inputBorder="false" class="easyinput" :placeholder="$t('register.nicknamePlaceholder')" v-model="formData.nickname" trim="both" style="width: 660rpx;" />
</uni-forms-item>
<uni-forms-item name="password" v-model="formData.password" required>
<uni-easyinput :inputBorder="false" class="easyinput" :placeholder="$t('register.passwordDigitsPlaceholder')" type="password" v-model="formData.password" trim="both" />
......@@ -120,5 +120,8 @@ import mixin from '../common/login-page.mixin.js';
}
.send-btn{
margin-top: 5px;
}
.uni-container ::v-deep .uni-forms-item__label{
width: 15px !important;
}
</style>
......@@ -155,7 +155,7 @@
,
appConfig() {
return getApp().globalData.config
}
}
},
methods: {
...mapMutations({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册