#I1VA6O 修改分销列表中搜索框的x按钮无效的问题
This commit is contained in:
@ -13,22 +13,14 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="nav acea-row row-around">
|
||||
<view
|
||||
class="item"
|
||||
:class="screen.grade == 0 ? 'on' : ''"
|
||||
@click="checkGrade(0)"
|
||||
>一级({{ first||'0' }})</view>
|
||||
<view
|
||||
class="item"
|
||||
:class="screen.grade == 1 ? 'on' : ''"
|
||||
@click="checkGrade(1)"
|
||||
>二级({{ second||'0' }})</view>
|
||||
<view class="item" :class="screen.grade == 0 ? 'on' : ''" @click="checkGrade(0)">一级({{ first||'0' }})</view>
|
||||
<view class="item" :class="screen.grade == 1 ? 'on' : ''" @click="checkGrade(1)">二级({{ second||'0' }})</view>
|
||||
</view>
|
||||
<view class="search acea-row row-between-wrapper">
|
||||
<form @submit.prevent="submitForm">
|
||||
<view class="input">
|
||||
<input placeholder="点击搜索会员名称" v-model="screen.keyword" />
|
||||
<text class="iconfont icon-guanbi"></text>
|
||||
<text class="iconfont icon-guanbi" @click="screen.keyword=''"></text>
|
||||
</view>
|
||||
</form>
|
||||
<view class="iconfont icon-sousuo2"></view>
|
||||
@ -56,11 +48,8 @@
|
||||
</view>
|
||||
</view>
|
||||
<view :class="fixedState === true ? 'sortList' : ''">
|
||||
<view
|
||||
class="item acea-row row-between-wrapper"
|
||||
v-for="(val, spreadListIndex) in spreadList"
|
||||
:key="spreadListIndex"
|
||||
>
|
||||
<view class="item acea-row row-between-wrapper" v-for="(val, spreadListIndex) in spreadList"
|
||||
:key="spreadListIndex">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="val.avatar" />
|
||||
@ -84,15 +73,17 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getSpreadUser } from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
export default {
|
||||
import {
|
||||
getSpreadUser
|
||||
} from "@/api/user";
|
||||
import Loading from "@/components/Loading";
|
||||
export default {
|
||||
name: "PromoterList",
|
||||
components: {
|
||||
Loading
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
data: function () {
|
||||
return {
|
||||
fixedState: false,
|
||||
screen: {
|
||||
@ -113,14 +104,14 @@ export default {
|
||||
second: ""
|
||||
};
|
||||
},
|
||||
mounted: function() {
|
||||
mounted: function () {
|
||||
this.getSpreadUsers();
|
||||
},
|
||||
onReachBottom() {
|
||||
!this.loading && this.getSpreadUsers();
|
||||
},
|
||||
watch: {
|
||||
"screen.sort": function() {
|
||||
"screen.sort": function () {
|
||||
this.screen.page = 0;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
@ -129,7 +120,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleScroll: function() {
|
||||
handleScroll: function () {
|
||||
// var scrollTop =
|
||||
// document.documentElement.scrollTop || document.body.scrollTop;
|
||||
// var offsetTop = document.querySelector(".header").clientHeight;
|
||||
@ -139,14 +130,14 @@ export default {
|
||||
// this.fixedState = false;
|
||||
// }
|
||||
},
|
||||
submitForm: function() {
|
||||
submitForm: function () {
|
||||
this.screen.page = 0;
|
||||
this.loaded = false;
|
||||
this.loading = false;
|
||||
this.spreadList = [];
|
||||
this.getSpreadUsers();
|
||||
},
|
||||
getSpreadUsers: function() {
|
||||
getSpreadUsers: function () {
|
||||
let that = this,
|
||||
screen = that.screen;
|
||||
if (that.loaded || that.loading) return;
|
||||
@ -163,8 +154,7 @@ export default {
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
@ -172,7 +162,7 @@ export default {
|
||||
300
|
||||
);
|
||||
},
|
||||
checkGrade: function(val) {
|
||||
checkGrade: function (val) {
|
||||
if (val == this.screen.grade) return;
|
||||
else {
|
||||
this.screen.page = 1;
|
||||
@ -183,7 +173,7 @@ export default {
|
||||
this.getSpreadUsers();
|
||||
}
|
||||
},
|
||||
sort: function(types) {
|
||||
sort: function (types) {
|
||||
let that = this;
|
||||
switch (types) {
|
||||
case "childCount":
|
||||
@ -245,5 +235,5 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user