思路:
1. 一进入到页面,就获取缓存当中的数据;
2. 当点击input搜索框时,拿到input双向数据绑定的值;
3. 判断缓存中有没有值,没有就存当前的值;
4. 如果缓存当中有值,判断是不是重复值,是就删除当前值,并重新缓存到数组头部,不是就缓存到数组头部;
5. 判断数组长度若是大于5,就删除数组尾部的值.
<uni-nav-bar fixed="true" style="display: flex;justify-content: center; margin-top: 15px;" :status-bar="true" :border="false" class="NavBar"
:rightText="searchtext" left-icon="back" @clickLeft="goBack()">
<view class="top_flex">
<view class="user_top_seach">
<u-icon size="50" name="search" color="#999" @click="searchAll" @keyup.enter="searchAll"></u-icon>
<input class