123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <template>
- <view class="center">
- <view v-for="(item,index) in applyList" class="flex fleet" @click="fleetInfo(item)">
- <view class="fleet_img">
- <u--image class="flex-end" :showLoading="true" :src="item.driverPortrait" width="60px" height="60px" shape='circle'>
- </u--image>
- </view>
-
- <view class="fleet_right">
- <view class="flex">
- <view class="fleet_name">
- {{item.driverNickname}}
- </view>
- <view class="fleet_invite" @click="refuse(item)" v-if="item.status =='已申请'">拒绝</view>
- <view class="fleet_invite" @click="accept(item)" v-if="item.status =='已申请'">通过</view>
- <view class="fleet_invite" v-else>{{item.status == '已加入' ? "已通过" : item.status}}</view>
- </view>
- <view>
- {{item.fleetName}}
- </view>
- </view>
- </view>
- <u-toast ref="uToast"></u-toast>
- </view>
- </template>
- <script>
- export default{
- data(){
- return{
- commonId:"",
- applyList:[]
- }
- },
- onShow(){
-
- },
- onLoad(){
- this.commonId = uni.getStorageSync("firstAuthentication").commonId
- this.getList()
- },
- methods:{
- 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:1,
- 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{
- margin-left: 10rpx;
- background-color: #5878e8;
- color: #fff;
- }
- }
- }
- </style>
|