whycq
2023-01-10 3930a1d44ab273a6d7155f4fa4163944458c7ca1
Merge remote-tracking branch 'origin/master' into master

# Conflicts:
# main.js
# pages/business/cstmr/cstmrDetails.vue
3个文件已修改
53 ■■■■■ 已修改文件
pages/business/cstmr/addCsmtr.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/business/cstmr/csmtr.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/business/cstmr/cstmrDetails.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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','')
        },
pages/business/cstmr/csmtr.vue
@@ -4,7 +4,7 @@
        <view class="search-bg">
            <uni-search-bar placeholder="客户代号/名称" 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(() => {
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);
                    }
                })
            }