页面bug修复

version/0412
shuxiaoquan 10 months ago
parent e68e5e32f4
commit 913d2a5f76
  1. 3
      pages/news/rules/rulesList.vue
  2. 25
      pages/news/user/vip.vue
  3. 108
      pages/search/index.vue
  4. 9
      pages/user/index.vue

@ -44,7 +44,8 @@
.pages {
width: 100%;
height: 100%;
padding: 30rpx;
padding: 30rpx;
box-sizing: border-box;
}
.item {

@ -5,9 +5,11 @@
<image src="/static/news/icon-search.png"></image>
<input type="search" placeholder="商品名称/编码" />
</view> -->
<u-search style='margin: 0 30rpx;' placeholder="输入用户昵称/姓名/手机号" @search="searchhandle" shape="round"
:show-action="false" height="60" bg-color="#fafafa" v-model="keyword"></u-search>
<view class="store-sort">
<view class="" style="padding: 0 30rpx;">
<u-search style='margin: 0 30rpx;' placeholder="输入用户昵称/姓名/手机号" @search="searchhandle" shape="round"
:show-action="false" height="60" bg-color="#fafafa" v-model="keyword"></u-search>
</view>
<view class="store-sort" v-if="type == 1">
<view class="sort-item" :class="{ active: sortType === 'all' }" @click="handleSortType('all','')">
<text>全部</text>
</view>
@ -62,6 +64,7 @@
keyword: '',
page: 1,
total: 0,
type: 3,
list: [],
title: '会员管理',
sortType: 'all', //
@ -89,12 +92,23 @@
let res = await Vip.getVipList({
page: this.page,
search: this.keyword,
user_type: this.user_type,
user_type: this.type == 1?this.user_type: 30,
})
console.log(res, "===")
this.list.push(...res.data.list.data);
this.list = this.arrayUnique(this.list.concat(res.data.list.data),'user_id');
this.total = res.data.list.total;
},
//
arrayUnique(arr, name) {
    var hash = {};
    return arr.reduce(function (item, next) {
        hash[next[name]]
            ? ""
            : (hash[next[name]] = true && item.push(next));
        return item;
    }, []);
},
copyText(text) {
uni.setClipboardData({
data: text,
@ -130,6 +144,7 @@
},
onLoad(option) {
this.title = option.title
this.type = option.type
uni.setNavigationBarTitle({
title: this.title
});

@ -9,22 +9,27 @@
</view>
<view class="find">
<view class="findTitle">
<text>搜索发现</text>
<image src="/static/search/openEye.png" mode="widthFix" class="findIcon" v-if="showEye"
<text>搜索历史</text>
<!-- <image src="/static/search/openEye.png" mode="widthFix" class="findIcon" v-if="showEye"
@click="showEye=!showEye">
</image>
<image src="/static/search/closeEye.png" mode="widthFix" class="findIcon" v-if="!showEye"
@click="showEye=!showEye">
</image>
</image> -->
<view class="others" v-if="searchList && searchList.length > 0">
<u-icon size="40" color="#999" name="trash" @click="toDo(0)" v-if="isHot"></u-icon>
<view class="do" v-else>
<view class="red" @click="toDo(1)">全部删除</view>
<view class="suc" @click="toDo(2)">完成</view>
</view>
</view>
</view>
<!-- <view class="others" @click="getHot">
换一批
</view> -->
</view>
<view class="hotSearch" v-if="showEye">
<view v-for="(item,index) in searchList" :key="index" class="hotItem" @click="searchGoods(item)">
<image src="/static/user/hot.png" mode="" class="hotImg" v-if="index==0"></image>
<text>{{item}}</text>
<view v-for="(item,index) in searchList" :key="index" class="hotItem">
<text @click="searchGoods(item)">{{item}}</text>
<view v-if="isHot == false" class="del" @click="toDo(3,index)"><u-icon size="30" color="#999" name="close-circle"></u-icon></view>
</view>
</view>
<view class="hotSuggest">
@ -79,7 +84,8 @@
searchFindList: [],
page: 1,
goodsList: [],
category_id:0
category_id:0,
isHot: true,
}
},
@ -97,7 +103,19 @@
this.chartsGoodsJingHandle()
},
methods: {
methods: {
toDo(index,idx){
if(index == 0){
this.isHot = false
}else if(index == 1){
this.searchList = []
uni.removeStorageSync("searchList")
}else if(index == 2){
this.isHot = true
}else if(index == 3){
this.searchList.splice(idx,1)
}
},
//
handleTargetGoods(sharpGoodsId) {
uni.navigateTo({
@ -211,23 +229,37 @@
margin: 0 40rpx;
margin-top: 44rpx;
.findTitle {
// width: 200rpx;
// height: 44rpx;
// font-size: 32rpx;
// font-family: PingFang SC, PingFang SC;
// font-weight: 500;
// color: #000000;
// line-height: 44rpx;
// margin-left: 40rpx;
.findTitle {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
&>text {
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #000000;
}
.do{
display: flex;
align-items: center;
padding: 0 20rpx;
white-space: nowrap;
}
.red{
font-size: 24rpx;
color: #ff0000;
}
.suc{
border-left: 1px solid #ececec;
padding-left: 20rpx;
margin-left: 20rpx;
height: 30rpx;
display: flex;
align-items: center;
font-size: 24rpx;
color: #9B9B9B;
}
.findIcon {
width: 36rpx;
height: auto;
@ -256,7 +288,6 @@
flex-wrap: wrap;
margin: 0 40rpx;
margin-top: 20rpx;
// justify-content: space-between;
.hotItem {
padding: 10rpx 30rpx;
@ -266,22 +297,23 @@
display: flex;
align-items: center;
margin-left: 12rpx;
// margin:0 20rpx;
margin-bottom: 24rpx;
// height: 64rpx;
// background: #FFFFFF;
// border-radius: 68rpx 68rpx 68rpx 68rpx;
// opacity: 1;
// font-size: 28rpx;
// font-family: PingFang SC, PingFang SC;
// font-weight: 400;
// color: #000000;
// line-height: 64rpx;
// padding-right: 22rpx;
// margin-right: 12rpx;
// margin-bottom: 24rpx;
// padding-left: 30rpx;
text{
display: block;
max-width: 200rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.del{
border-left: 1px solid #ececec;
padding-left: 20rpx;
margin-left: 20rpx;
height: 30rpx;
display: flex;
align-items: center;
}
.hotImg {
width: 25rpx;
height: 29rpx;

@ -122,11 +122,11 @@
<view class="sell">
会员分销
</view>
<view class="type" @click="goManagementHandle('/pages/news/user/vip','会员管理')">
<view class="type" @click="goManagementHandle('/pages/news/user/vip?type=1','会员管理')">
<view class="typeLeft common">
会员管理<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
<view class="typeRight common" @click="goManagementHandle('/pages/news/user/vip','分销管理')">
<view class="typeRight common" @click="goManagementHandle('/pages/news/user/vip?type=2','分销管理')">
<image :src="$picUrl+'/static/user/sale.png'" class="sale"></image>
分销管理<u-icon style="margin-left: 10rpx;" name="arrow-right"></u-icon>
</view>
@ -600,7 +600,7 @@
},
onShow(options) {
this.onRefreshPage()
this.getSuggest()
this.getSuggest();
},
onPageScroll(e) {
if (e.scrollTop <= 200) { // true
@ -722,7 +722,8 @@
uni.setStorageSync('userInfo', that.userInfo)
if (data.user_type == 20 || data.user_type == 40) {
that.getMembershipInviteQrcode()
} else if (data.user_type == 30 || data.user_type == 40) {
}
if (data.user_type == 30 || data.user_type == 40) {
that.getDealerInviteQrcode()
}
// that.getMembershipInviteQrcode()

Loading…
Cancel
Save