Merge remote-tracking branch 'origin/master' into master
# Conflicts:
# main.js
# pages/business/cstmr/cstmrDetails.vue
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | baseUrl: '', |
| | | cstmrTypes: [], |
| | | cstmrType: '', |
| | | directors: [], |
| | |
| | | onShow() { |
| | | // 获取省市区 |
| | | this.citysData = test.citysData |
| | | this.baseUrl = uni.getStorageSync('baseUrl') |
| | | this.autoLoad('cstmrType','') |
| | | this.autoLoad('user','') |
| | | }, |
| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | baseUrl: '', |
| | | csmtrList: [], |
| | | last_id: '', |
| | | reload: false, |
| | | status: 'more', |
| | | curr:1, |
| | | contentText: { |
| | | contentdown: '上拉加载更多', |
| | | contentrefresh: '加载中', |
| | | contentnomore: '没有更多' |
| | | } |
| | | } |
| | | }, |
| | | // 新建按钮事件 |
| | |
| | | }) |
| | | }, |
| | | onShow() { |
| | | this.baseUrl = uni.getStorageSync('baseUrl') |
| | | this.getCsmtr() |
| | | }, |
| | | onReachBottom() { |
| | | this.status = 'more'; |
| | | this.getCsmtr(); |
| | | }, |
| | | methods: { |
| | | getCsmtr() { |
| | |
| | | }); |
| | | }, 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'}) |
| | |
| | | } |
| | | 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(() => { |
| | |
| | | data() { |
| | | return { |
| | | id: 0, |
| | | baseUrl: '', |
| | | cstmr: {}, |
| | | cstmr: { |
| | | id: '', |
| | | name: '', |
| | | tel: '', |
| | | addr: '', |
| | | cstman: '' |
| | | }, |
| | | addFollower: { |
| | | follower: '', |
| | | followers: '', |
| | |
| | | }, |
| | | onLoad(option) { |
| | | this.id = option.id |
| | | this.baseUrl = uni.getStorageSync('baseUrl') |
| | | this.init() |
| | | this.autoLoad('follower','') |
| | | setTimeout(()=>{ |
| | | this.getFollowers() |
| | | },500) |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | init() { |
| | |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success(res) { |
| | | console.log(res); |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | uni.navigateBack() |
| | |
| | | success(result) { |
| | | var res = result.data |
| | | that.getFollowers() |
| | | console.log(res); |
| | | } |
| | | }) |
| | | this.addFollower.follower = '' |
| | |
| | | method: 'POST', |
| | | success(result) { |
| | | var res = result.data |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | var element; |
| | | if (type == 'follower') { |
| | |
| | | }, |
| | | removeFollowers(userId) { |
| | | let that = this |
| | | console.log(that.cstmrId); |
| | | uni.request({ |
| | | url: that.baseUrl + '/cstmr/followers/remove/auth', |
| | | header:{ |
| | |
| | | success(res) { |
| | | res = res.data |
| | | that.getFollowers() |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |