This commit is contained in:
yangtao 2024-04-11 17:18:42 +08:00
parent 845ad5b693
commit 7c02a4c795
8 changed files with 76 additions and 25 deletions

View File

@ -833,3 +833,11 @@ export function getWhellList() {
export function getWhellAction() {
return request.get('wheel/create', {}, {noAuth: true})
}
/**
* 积分赠送
* @param object data
*
*/
export function integralGive() {
return request.post('user/integral/give', {}, {noAuth: true})
}

View File

@ -59,8 +59,6 @@
this.num = this.randomArray([1,2,3,4,5,6,7,8,9,11]);
this.num.splice(9, 0, 10);
this.num.splice(11, 0, 12);
console.log(this.num);
console.log(this.key_words);
},
methods:{
//

View File

@ -16,16 +16,25 @@
</view>
<view class="coupon_popups" v-if="popShow">
<view class="bg2"></view>
<view class="con" >
<view class="con" v-if="blind">
<view class="contents">
<image src="@/static/images/jf.png" style="width: 48px;height:48px;" mode=""></image>
<view class="text-black">恭喜您获得</view>
<view class="text-red">{{drawInfo.text}}积分</view>
<view class="btn" @click="confirm" v-if="">开心收下</view>
<view class="btn" @click="goBlind">继续开盲盒</view>
<view class="btn" @click="confirm" v-if="!drawInfo.wheel">开心收下</view>
<view class="btn" @click="goBlind" v-else>继续开盲盒</view>
</view>
<view class='iconfont icon-guanbi3' @click="popShow = false"></view>
</view>
<view class="con" v-else>
<view class="content">
<image src="@/static/images/notBlind.png" style="width: 80px;height: 80px;" mode=""></image>
<view class="text-black">很遗憾,差一点就中奖了</view>
<view class="text-red">期待您下次再来</view>
<view class="btn" @click="confirm">我知道了</view>
</view>
</view>
</view>
<blindBox v-if="blindShow"></blindBox>
</view>
@ -47,10 +56,11 @@
blindShow:false,
integral:'',
list:[],
blind:true,
drawInfo:{
img:'',
text:'',
wheel:0,
}
}
},
@ -59,11 +69,13 @@
methods: {
confirm(){
this.popShow = false;
this.blind=false;
this.close();
},
async openBox(){
await setSignIntegral().then(res=>{
this.drawInfo.text = res.data.integral;
this.drawInfo.wheel=res.data.wheel;
this.gifShow=true;
setTimeout(()=>{
this.gifShow=false;
@ -75,6 +87,9 @@
});
},
goBlind(){
this.blindShow=true;
},
close(){
this.$emit('closeTreasureBox')
}

View File

@ -479,12 +479,12 @@
},
validateBtn() {
let {
shopName,mer_classification,classification,businessAddress,businessAddressDetail,EnterpriseType,EnterpriseName,EnterpriseJoinName,EnterprisePhone,EnterpriseId,EnterpriseRooter,userName,userPhone,userId,userPhoto,isVeteran,isVeteranPhoto,isFlagshipStore,isFlagshipStorePhoto,mer_type,mer_storeType
shopName,mer_classification,businessAddress,businessAddressDetail,EnterpriseType,EnterpriseName,EnterpriseJoinName,EnterprisePhone,EnterpriseId,EnterpriseRooter,userName,userPhone,userId,userPhoto,isVeteran,isVeteranPhoto,isFlagshipStore,isFlagshipStorePhoto,mer_type,mer_storeType
} = this.shopInfo;
if (shopName&&mer_classification&&classification&&businessAddress&&businessAddressDetail&&EnterpriseType&&EnterpriseName&&EnterpriseJoinName&&EnterprisePhone&&EnterpriseId&&EnterpriseRooter&&userName&&userPhone&&userId&&userPhoto&&mer_type&&mer_storeType ) {
if (shopName&&mer_classification&&businessAddress&&businessAddressDetail&&EnterpriseType&&EnterpriseName&&EnterpriseJoinName&&EnterprisePhone&&EnterpriseId&&EnterpriseRooter&&userName&&userPhone&&userId&&userPhoto&&mer_type&&mer_storeType ) {
if(isVeteran&&!isVeteranPhoto){
return
}else if (isFlagshipStore&&!isFlagshipStorePhoto){
@ -494,7 +494,6 @@
phone: userPhone,
mer_name:shopName,
name:userName,
merchant_category_id:classification,//hjb
mer_type_id:mer_type,//hjb
com:{
name:EnterpriseName,

View File

@ -106,11 +106,11 @@
</view>
</view>
<view class="item no-border">
<!-- <view class="item no-border">
<checkbox-group @change='ChangeIsAgree'>
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意</checkbox-group>
<button class="settleAgree" @click="getConfig">入驻协议</button>
</view>
</view> -->
<button class='submitBtn' :disabled="!validate" :class="validate === true ? 'on':''" @click="nextStep">下一步</button>
</view>
</view>

View File

@ -79,10 +79,10 @@
<view class="txt">关注店铺</view>
</view>
<view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<!-- <view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.total_coupon || 0}}</text>
<view class="txt">优惠券</view>
</view>
</view> -->
<view class="num-item" @click="goMenuPage('/pages/users/browsingHistory/index')">
<text class="num">{{userInfo.total_visit_product || 0}}</text>
<view class="txt">浏览记录</view>
@ -765,7 +765,7 @@ import { setTimeout } from 'timers';
margin: 30rpx 20rpx 0;
color: #fff;
.num-item {
width: 25%;
width: 33%;
text-align: center;
.num {
font-size: 42rpx;

View File

@ -47,19 +47,19 @@
<view v-if="integral_status" class='list2' :hidden='current!=1'>
<view class="list-item">
<text>姓名</text>
<input type="text" v-model="presentExp.name" />
<input type="text" placeholder="请输入姓名" v-model="presentExp.name" />
</view>
<view class="list-item">
<text>手机号</text>
<input type="number" v-model="presentExp.phone"/>
<input type="number" placeholder="请输入手机号" v-model="presentExp.phone"/>
</view>
<view class="list-item">
<text>身份证</text>
<input type="text" v-model="presentExp.id_number"/>
<input type="text" placeholder="请输入身份证" v-model="presentExp.id_number"/>
</view>
<view class="list-item">
<text>积分</text>
<input type="text" v-model="presentExp.integral"/>
<input type="text" placeholder="请输入积分" v-model="presentExp.integral"/>
</view>
<view class="list-btn" @click="giveaway">
确认赠送
@ -82,7 +82,7 @@
<script>
import pay from "@/components/pay/index.vue"
import { getIntegralInfo, getIntegralList, getAgreementApi } from '@/api/user.js';
import { getIntegralInfo, getIntegralList, getAgreementApi,integralGive } from '@/api/user.js';
import { mapGetters } from "vuex";
import emptyPage from '@/components/emptyPage.vue';
import parser from "@/components/jyf-parser/jyf-parser";
@ -150,12 +150,38 @@
closeFunc(val){
this.payShow=val;
},
payFunc(val){
console.log('val: ',val);
async payFunc(val){
let d={
name:this.presentExp.name,
phone:this.presentExp.phone,
id_number:this.presentExp.id_number,
integral:this.presentExp.integral,
password:val
}
this.payShow=false;
await integralGive(d).then((res)=>{
if(res){
uni.showToast({
title: res.message
});
}
}).catch((err)=>{
uni.showToast({
title: res.message
});
})
},
giveaway(){
this.payShow=true;
let {name,phone,id_number,integral}=this.presentExp
if(name&&phone&&id_number&&integral){
this.payShow=true;
}else{
uni.showToast({
icon:'none',
title: '请完整填写信息'
});
}
},
getUserInfo: function() {
let that = this;
@ -347,10 +373,11 @@
display: flex;
flex-direction: column;
grid-gap: 20rpx;
margin-top: 40rpx;
.list-item{
width: 90%;
height: 120rpx;
border-radius: 20rpx;
height: 100rpx;
border-radius: 16rpx;
margin: 0 auto;
background: #f2f2f2;
display: flex;
@ -363,6 +390,9 @@
input{
flex: 4;
}
.uni-input-placeholder{
color: #999;
}
}
.list-btn{
margin: 0 auto;
@ -373,6 +403,7 @@
color: white;
font-size: 32rpx;
height: 100rpx;
margin-top: 40rpx;
background-color:var(--view-theme);
}
}

View File

@ -135,7 +135,7 @@
res.data.integral = parseInt(res.data.integral);
let sum_sgin_day = res.data.count;
that.$set(that,'signConfig',res.data.title);
// that.$set(that,'is_sign',res.data.is_sign);
that.$set(that,'is_sign',res.data.is_sign);
that.$set(that,'userInfo',res.data.userInfo);
that.signCount = that.PrefixInteger(sum_sgin_day, 4);
that.sign_index = res.data.sign_num;