积分赠送
This commit is contained in:
parent
4ff49ea26d
commit
b0022c31a4
|
@ -838,6 +838,6 @@ export function getWhellAction() {
|
|||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function integralGive() {
|
||||
return request.post('user/integral/give', {}, {noAuth: true})
|
||||
export function integralGive(data) {
|
||||
return request.post('user/integral/give',data, {noAuth: true})
|
||||
}
|
||||
|
|
|
@ -80,10 +80,10 @@
|
|||
<text class="num">{{userInfo.total_visit_product || 0}}</text>
|
||||
<view class="txt">浏览记录</view>
|
||||
</view>
|
||||
<view class="num-item" >
|
||||
<!-- <view class="num-item" >
|
||||
<text class="num">{{userInfo.member_value || 0}}</text>
|
||||
<view class="txt">成长值</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="num-item" >
|
||||
<text class="num">{{userInfo.member_value || 0}}</text>
|
||||
<view class="txt">累积成长值</view>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<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>
|
||||
</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>
|
||||
<text class="tip-text">提示:您有部分积分将于{{userInfo.clear.nextClearDay}}过期,请尽快使用!</text>
|
||||
</view>
|
||||
|
@ -44,10 +44,10 @@
|
|||
<emptyPage title="暂无积分记录哦~"></emptyPage>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="integral_status" class='list2' :hidden='current!=1'>
|
||||
<view v-else class='list2' :hidden='current==0'>
|
||||
<view class="list-item">
|
||||
<text>姓名</text>
|
||||
<input type="text" placeholder="请输入姓名" v-model="presentExp.name" />
|
||||
<input type="text" placeholder="请输入姓名" v-model="presentExp.real_name" />
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<text>手机号</text>
|
||||
|
@ -55,7 +55,7 @@
|
|||
</view>
|
||||
<view class="list-item">
|
||||
<text>身份证</text>
|
||||
<input type="text" placeholder="请输入身份证" v-model="presentExp.id_number"/>
|
||||
<input type="text" placeholder="请输入身份证" v-model="presentExp.card_id"/>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<text>积分</text>
|
||||
|
@ -124,9 +124,9 @@
|
|||
},
|
||||
integral_status: true,
|
||||
presentExp:{
|
||||
name:'',
|
||||
real_name:'',
|
||||
phone:'',
|
||||
id_number:'',
|
||||
card_id:'',
|
||||
integral:'',
|
||||
}
|
||||
};
|
||||
|
@ -152,19 +152,22 @@
|
|||
},
|
||||
async payFunc(val){
|
||||
let d={
|
||||
name:this.presentExp.name,
|
||||
real_name:this.presentExp.real_name,
|
||||
phone:this.presentExp.phone,
|
||||
id_number:this.presentExp.id_number,
|
||||
card_id:this.presentExp.card_id,
|
||||
integral:this.presentExp.integral,
|
||||
password:val
|
||||
password:val.password
|
||||
}
|
||||
this.closeFunc();
|
||||
await integralGive(d).then((res)=>{
|
||||
if(res){
|
||||
this.closeFunc();
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title: res.message
|
||||
});
|
||||
setTimeout(()=>{
|
||||
this.$router.go(0);
|
||||
},1000)
|
||||
}
|
||||
}).catch((err)=>{
|
||||
uni.showToast({
|
||||
|
@ -173,10 +176,28 @@
|
|||
});
|
||||
})
|
||||
},
|
||||
giveaway(){
|
||||
let {name,phone,id_number,integral}=this.presentExp
|
||||
if(name&&phone&&id_number&&integral){
|
||||
this.payShow=true;
|
||||
async giveaway(){
|
||||
let {real_name,phone,card_id,integral}=this.presentExp
|
||||
if(real_name&&phone&&card_id&&integral){
|
||||
|
||||
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{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
|
|
Loading…
Reference in New Issue