Browse Source

修改申请兑换请求接口

1.0
396316021 1 year ago
parent
commit
f4f62516fa
  1. 9
      api/user.js
  2. 7
      pages/Order/detail.vue
  3. 2
      pages/User/order.vue

9
api/user.js

@ -126,6 +126,15 @@ export function submitHouseOrder(data) {
data data
}); });
} }
export function submitApplyHouseOrder(data) {
return request({
url: `${host}/user/houseorder-exchange`,
method: "post",
data
});
}
export function submitGoodsOrder(data) { export function submitGoodsOrder(data) {
return request({ return request({

7
pages/Order/detail.vue

@ -270,6 +270,7 @@ export default {
type:'create', type:'create',
model: { model: {
order: { order: {
house_order_id:'',
house_id: '', house_id: '',
name: '', name: '',
id_card: '', id_card: '',
@ -359,7 +360,7 @@ export default {
} }
}, },
onLoad(option) { onLoad(option) {
this.model.order.house_id = option.id?option.id:''; this.model.order.house_order_id = option.id?option.id:'';
this.model.order.rent = option.rent?parseFloat(option.rent)+'':''; this.model.order.rent = option.rent?parseFloat(option.rent)+'':'';
this.type = option.type?option.type:'create'; this.type = option.type?option.type:'create';
}, },
@ -384,7 +385,7 @@ export default {
let data = res.data; let data = res.data;
data.end_time = uni.$u.timeFormat(data.end_time,'yyyy-mm-dd') data.end_time = uni.$u.timeFormat(data.end_time,'yyyy-mm-dd')
this.model = {order: data}; this.model = {order: data};
// this.model.order.house_id = house_id; this.model.order.house_order_id = id;
// this.model.order.month = ''+this.model.order.month; // this.model.order.month = ''+this.model.order.month;
// this.model.order.month = parseInt(this.model.order.month); // this.model.order.month = parseInt(this.model.order.month);
@ -584,7 +585,7 @@ export default {
this.getUserExtend(); this.getUserExtend();
} }
if(this.type === 'detail' || this.type === 'edit' || this.type === 'apply'){ if(this.type === 'detail' || this.type === 'edit' || this.type === 'apply'){
this.getDetail(this.model.order.house_id); this.getDetail(this.model.order.house_order_id );
} }
} }
} }

2
pages/User/order.vue

@ -131,7 +131,7 @@
shape="circle" shape="circle"
custom-style="height:64rpx;border: 2rpx solid #AFB5BE;padding:0rpx 42rpx;"></u-button> custom-style="height:64rpx;border: 2rpx solid #AFB5BE;padding:0rpx 42rpx;"></u-button>
</view> </view>
<view class="button" v-else-if="item.status === 5"> <view class="button" v-else-if="item.status === 5 || item.status === 1">
<u-button <u-button
@click="navTo('/pages/Order/detail?id='+item.id+'&type=apply')" @click="navTo('/pages/Order/detail?id='+item.id+'&type=apply')"
text="申请兑换" text="申请兑换"

Loading…
Cancel
Save