123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <template>
- <view class="center">
- <view v-for="(item,index) in applyList" class="flex fleet">
- <view class="fleet_img">
- <u--image class="flex-end" :showLoading="true" :src="item.coverUrl" width="60px" height="60px"
- shape='circle'>
- </u--image>
- </view>
- <view class="fleet_right">
- <view class="flex">
- <view class="fleet_name">
- {{item.fleetName}}
- </view>
- <view class="fleet_invite" v-if="item.status == '已申请'" @click="refuse(item)">拒绝</view>
- <view class="fleet_invite" v-if="item.status == '已申请'" @click="accept(item)">接受</view>
- <view class="fleet_invite" v-else>{{item.status}}</view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- commonId: "",
- applyList: []
- }
- },
- onShow() {
- },
- onLoad() {
- this.commonId = uni.getStorageSync("firstAuthentication").commonId
- this.read() //点击进来已读信息
- this.getList()
- },
- methods: {
- read() {
- this.$request.baseRequest('post', '/fleetMemberInfo/api/read', {
- commonId: this.commonId,
- readFlag: 2
- }).then(res => {})
- .catch(res => {
- uni.$u.toast(res.message);
- });
- },
- refuse(item) {
- this.$request.baseRequest('post', '/fleetMemberInfo/api/editFleetMemberInfo', {
- examineFlag: 2,
- id: item.id
- }).then(res => {
- if (res.code == 200) {
- this.$refs.uToast.show({
- type: 'success',
- message: "拒绝成功!",
- complete() {
- uni.$u.route("pages/riders/myTeam")
- }
- })
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- },
- accept(item) {
- this.$request.baseRequest('post', '/fleetMemberInfo/api/editFleetMemberInfo', {
- examineFlag: 1,
- id: item.id
- }).then(res => {
- if (res.code == 200) {
- this.$refs.uToast.show({
- type: 'success',
- message: "通过成功!",
- complete() {
- uni.$u.route("pages/riders/myTeam")
- }
- })
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- },
- getList() {
- this.$request.baseRequest('get', '/fleetMemberInfo/selectFleetMemberInfo', {
- commonId: this.commonId,
- flag: 2,
- pageSize: 10,
- currentPage: 1
- }).then(res => {
- if (res.code == 200) {
- this.applyList = res.data.records
- }
- })
- .catch(res => {
- uni.$u.toast(res.message);
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .center {
- padding: 30rpx;
- }
- .fleet {
- margin: 30rpx 0;
- .fleet_img {
- width: 20%;
- }
- .fleet_right {
- margin-top: 20rpx;
- width: 80%;
- .fleet_name {
- width: 70%;
- }
- .fleet_invite {
- background-color: #5878e8;
- color: #fff;
- margin-left: 10rpx;
- }
- }
- }
- </style>
|