From 3930a1d44ab273a6d7155f4fa4163944458c7ca1 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期二, 10 一月 2023 15:53:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into master
---
pages/business/cstmr/addCsmtr.vue | 2 --
pages/business/cstmr/csmtr.vue | 34 +++++++++++++++++++++++++---------
pages/business/cstmr/cstmrDetails.vue | 17 +++++++----------
3 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/pages/business/cstmr/addCsmtr.vue b/pages/business/cstmr/addCsmtr.vue
index 4527d80..569908b 100644
--- a/pages/business/cstmr/addCsmtr.vue
+++ b/pages/business/cstmr/addCsmtr.vue
@@ -50,7 +50,6 @@
export default {
data() {
return {
- baseUrl: '',
cstmrTypes: [],
cstmrType: '',
directors: [],
@@ -147,7 +146,6 @@
onShow() {
// 鑾峰彇鐪佸競鍖�
this.citysData = test.citysData
- this.baseUrl = uni.getStorageSync('baseUrl')
this.autoLoad('cstmrType','')
this.autoLoad('user','')
},
diff --git a/pages/business/cstmr/csmtr.vue b/pages/business/cstmr/csmtr.vue
index ee74470..e81e043 100644
--- a/pages/business/cstmr/csmtr.vue
+++ b/pages/business/cstmr/csmtr.vue
@@ -4,7 +4,7 @@
<view class="search-bg">
<uni-search-bar placeholder="瀹㈡埛浠e彿/鍚嶇О" bgColor="#f4f4f4" @confirm="search" />
</view>
- <scroll-view>
+ <view>
<!-- 瀹㈡埛鍒楄〃 -->
<view class="c-list" @click="getDetails(item.id)" v-for="(item,index) in csmtrList" :key="index">
<view class="titles"><y-title :title="item.name"></y-title></view><view></view>
@@ -17,7 +17,8 @@
<view class="list-item1">鍒涘缓浜�</view><view class="list-item2">{{item.createBy$}}</view>
<view class="list-item1">鍒涘缓鏃堕棿</view><view class="list-item2">{{item.createTime$}}</view>
</view>
- </scroll-view>
+ </view>
+ <uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
</view>
</template>
@@ -25,8 +26,16 @@
export default {
data() {
return {
- baseUrl: '',
csmtrList: [],
+ last_id: '',
+ reload: false,
+ status: 'more',
+ curr:1,
+ contentText: {
+ contentdown: '涓婃媺鍔犺浇鏇村',
+ contentrefresh: '鍔犺浇涓�',
+ contentnomore: '娌℃湁鏇村'
+ }
}
},
// 鏂板缓鎸夐挳浜嬩欢
@@ -36,8 +45,11 @@
})
},
onShow() {
- this.baseUrl = uni.getStorageSync('baseUrl')
this.getCsmtr()
+ },
+ onReachBottom() {
+ this.status = 'more';
+ this.getCsmtr();
},
methods: {
getCsmtr() {
@@ -52,10 +64,9 @@
});
}, 1000);
},
- header: {'token' : uni.getStorageSync('token'),
- "content-type": "application/json"},
- data: {curr:1,limit:16},
- method:'POST',
+ header: {'token' : uni.getStorageSync('token'),},
+ data: {curr:that.curr,limit:4},
+ method:'GET',
success(result) {
if (result.statusCode === 404) {
uni.showToast({title: '璇烽噸鏂扮櫥褰�', icon: "none", position: 'top'})
@@ -63,7 +74,12 @@
}
var res = result.data
if (res.code === 200) {
- that.csmtrList = res.data.records
+ let list = res.data.records
+ that.csmtrList = that.reload ? list : that.csmtrList.concat(list);
+ that.curr = that.curr + 1
+ if (res.data.records.length == 0) {
+ that.status = 'noMore'
+ }
} else if (res.code === 403) {
uni.showToast({title: res.msg, icon: "none", position: 'top'})
setTimeout(() => {
diff --git a/pages/business/cstmr/cstmrDetails.vue b/pages/business/cstmr/cstmrDetails.vue
index ca921be..1bf8a5d 100644
--- a/pages/business/cstmr/cstmrDetails.vue
+++ b/pages/business/cstmr/cstmrDetails.vue
@@ -63,8 +63,13 @@
data() {
return {
id: 0,
- baseUrl: '',
- cstmr: {},
+ cstmr: {
+ id: '',
+ name: '',
+ tel: '',
+ addr: '',
+ cstman: ''
+ },
addFollower: {
follower: '',
followers: '',
@@ -76,14 +81,11 @@
},
onLoad(option) {
this.id = option.id
- this.baseUrl = uni.getStorageSync('baseUrl')
this.init()
this.autoLoad('follower','')
setTimeout(()=>{
this.getFollowers()
},500)
-
-
},
methods: {
init() {
@@ -109,7 +111,6 @@
data: {ids: ids},
method: 'POST',
success(res) {
- console.log(res);
res = res.data
if (res.code === 200) {
uni.navigateBack()
@@ -151,7 +152,6 @@
success(result) {
var res = result.data
that.getFollowers()
- console.log(res);
}
})
this.addFollower.follower = ''
@@ -168,7 +168,6 @@
method: 'POST',
success(result) {
var res = result.data
- console.log(res);
if (res.code === 200) {
var element;
if (type == 'follower') {
@@ -197,7 +196,6 @@
},
removeFollowers(userId) {
let that = this
- console.log(that.cstmrId);
uni.request({
url: that.baseUrl + '/cstmr/followers/remove/auth',
header:{
@@ -212,7 +210,6 @@
success(res) {
res = res.data
that.getFollowers()
- console.log(res);
}
})
}
--
Gitblit v1.9.1