积分赠送

This commit is contained in:
yangtao 2024-04-12 16:43:42 +08:00
parent 4ff49ea26d
commit b0022c31a4
3 changed files with 39 additions and 18 deletions

View File

@ -838,6 +838,6 @@ export function getWhellAction() {
* @param object data * @param object data
* *
*/ */
export function integralGive() { export function integralGive(data) {
return request.post('user/integral/give', {}, {noAuth: true}) return request.post('user/integral/give',data, {noAuth: true})
} }

View File

@ -80,10 +80,10 @@
<text class="num">{{userInfo.total_visit_product || 0}}</text> <text class="num">{{userInfo.total_visit_product || 0}}</text>
<view class="txt">浏览记录</view> <view class="txt">浏览记录</view>
</view> </view>
<view class="num-item" > <!-- <view class="num-item" >
<text class="num">{{userInfo.member_value || 0}}</text> <text class="num">{{userInfo.member_value || 0}}</text>
<view class="txt">成长值</view> <view class="txt">成长值</view>
</view> </view> -->
<view class="num-item" > <view class="num-item" >
<text class="num">{{userInfo.member_value || 0}}</text> <text class="num">{{userInfo.member_value || 0}}</text>
<view class="txt">累积成长值</view> <view class="txt">累积成长值</view>

View File

@ -25,7 +25,7 @@
<view class='item acea-row row-center-wrapper' :class='current==index?"on":""' v-for="(item,index) in navList" :key='index' <view class='item acea-row row-center-wrapper' :class='current==index?"on":""' v-for="(item,index) in navList" :key='index'
@click='nav(index)'><text class='iconfont' :class="item.icon"></text>{{item.name}}</view> @click='nav(index)'><text class='iconfont' :class="item.icon"></text>{{item.name}}</view>
</view> </view>
<view class='list' :hidden='current != 0' > <view class='list' :hidden='current != 0' v-if="current == 0" >
<view class='tip' v-if="userInfo.clear && userInfo.clear.status && userInfo.clear.nextClearIntegral > 0"><text class='iconfont icon-shuoming'></text> <view class='tip' v-if="userInfo.clear && userInfo.clear.status && userInfo.clear.nextClearIntegral > 0"><text class='iconfont icon-shuoming'></text>
<text class="tip-text">提示您有部分积分将于{{userInfo.clear.nextClearDay}}过期请尽快使用</text> <text class="tip-text">提示您有部分积分将于{{userInfo.clear.nextClearDay}}过期请尽快使用</text>
</view> </view>
@ -44,10 +44,10 @@
<emptyPage title="暂无积分记录哦~"></emptyPage> <emptyPage title="暂无积分记录哦~"></emptyPage>
</view> </view>
</view> </view>
<view v-if="integral_status" class='list2' :hidden='current!=1'> <view v-else class='list2' :hidden='current==0'>
<view class="list-item"> <view class="list-item">
<text>姓名</text> <text>姓名</text>
<input type="text" placeholder="请输入姓名" v-model="presentExp.name" /> <input type="text" placeholder="请输入姓名" v-model="presentExp.real_name" />
</view> </view>
<view class="list-item"> <view class="list-item">
<text>手机号</text> <text>手机号</text>
@ -55,7 +55,7 @@
</view> </view>
<view class="list-item"> <view class="list-item">
<text>身份证</text> <text>身份证</text>
<input type="text" placeholder="请输入身份证" v-model="presentExp.id_number"/> <input type="text" placeholder="请输入身份证" v-model="presentExp.card_id"/>
</view> </view>
<view class="list-item"> <view class="list-item">
<text>积分</text> <text>积分</text>
@ -124,9 +124,9 @@
}, },
integral_status: true, integral_status: true,
presentExp:{ presentExp:{
name:'', real_name:'',
phone:'', phone:'',
id_number:'', card_id:'',
integral:'', integral:'',
} }
}; };
@ -152,19 +152,22 @@
}, },
async payFunc(val){ async payFunc(val){
let d={ let d={
name:this.presentExp.name, real_name:this.presentExp.real_name,
phone:this.presentExp.phone, phone:this.presentExp.phone,
id_number:this.presentExp.id_number, card_id:this.presentExp.card_id,
integral:this.presentExp.integral, integral:this.presentExp.integral,
password:val password:val.password
} }
this.closeFunc();
await integralGive(d).then((res)=>{ await integralGive(d).then((res)=>{
if(res){ if(res){
this.closeFunc();
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title: res.message title: res.message
}); });
setTimeout(()=>{
this.$router.go(0);
},1000)
} }
}).catch((err)=>{ }).catch((err)=>{
uni.showToast({ uni.showToast({
@ -173,10 +176,28 @@
}); });
}) })
}, },
giveaway(){ async giveaway(){
let {name,phone,id_number,integral}=this.presentExp let {real_name,phone,card_id,integral}=this.presentExp
if(name&&phone&&id_number&&integral){ if(real_name&&phone&&card_id&&integral){
this.payShow=true;
let d={
balance_vert:1,
real_name:this.presentExp.real_name,
phone:this.presentExp.phone,
card_id:this.presentExp.card_id,
integral:this.presentExp.integral,
}
this.closeFunc();
await integralGive(d).then((res)=>{
if(res.data.status=='continue'){
this.payShow=true;
}
}).catch((err)=>{
uni.showToast({
icon:'none',
title: err,
});
})
}else{ }else{
uni.showToast({ uni.showToast({
icon:'none', icon:'none',