抽奖列表,兑换列表调试

This commit is contained in:
GaoHao
2024-12-23 10:32:42 +08:00
parent 7c339bc617
commit c719ce1f27
3 changed files with 121 additions and 34 deletions

View File

@@ -2,11 +2,20 @@
<view class="min-page bg-gray u-font-28">
<view class="block bg-fff border-r-18 default-box-padding">
<view>
<view>兑换账</view>
<view>中奖用户手机</view>
<view class="border u-m-t-24 u-p-l-24" style="margin-bottom: 20rpx;">
<u-input v-model="query.phone" type="number" maxlength="11" placeholder="请输入中奖用户手机号"></u-input>
</view>
<view>收货地址</view>
<view class="border u-m-t-24 u-p-l-24" style="margin-bottom: 20rpx;">
<u-input v-model="query.address" type="text" placeholder="请输入收货地址"></u-input>
</view>
<view>备注</view>
<view class="border u-m-t-24 u-p-l-24">
<u-input type="text" placeholder="请输入兑换账号"></u-input>
<u-input v-model="query.remark" type="text" placeholder="请输入备注"></u-input>
</view>
</view>
<view class="u-m-t-48">
<view>兑换事项</view>
<view class="u-m-t-16 color-999">
@@ -15,7 +24,7 @@
</view>
</view>
<view class="u-flex u-row-center">
<view class="btn-circle duihuan">确认兑换</view>
<view class="btn-circle duihuan" @click="exchange">确认兑换</view>
</view>
</view>
</template>
@@ -24,11 +33,44 @@
export default {
data() {
return {
query: {
discSpinningRecordId: null,
source: 1,
phone: "",
address: "",
remark: "",
},
}
},
onLoad(options) {
console.log(options)
if ( options.id ) {
this.query.discSpinningRecordId = options.id
}
if ( options.source ) {
this.query.source = options.source
}
},
methods: {
exchange(){
let url = ""
if ( !this.query.phone ) {
uni.showToast({ title: '请输入中奖用户手机号', icon: 'none' });
return;
}
if ( !this.query.address ) {
uni.showToast({ title: '请输入中奖用户地址', icon: 'none' });
return;
}
this.$Request.postJson("app/userPrizeExchange/exchange", this.query).then(res => {
if (res.code == 0 ) {
uni.navigateBack()
} else {
uni.showToast({ title: res.msg, icon: 'none' });
}
})
},
}
}
</script>