This commit is contained in:
parent
845ad5b693
commit
7c02a4c795
|
@ -833,3 +833,11 @@ export function getWhellList() {
|
||||||
export function getWhellAction() {
|
export function getWhellAction() {
|
||||||
return request.get('wheel/create', {}, {noAuth: true})
|
return request.get('wheel/create', {}, {noAuth: true})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 积分赠送
|
||||||
|
* @param object data
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export function integralGive() {
|
||||||
|
return request.post('user/integral/give', {}, {noAuth: true})
|
||||||
|
}
|
||||||
|
|
|
@ -59,8 +59,6 @@
|
||||||
this.num = this.randomArray([1,2,3,4,5,6,7,8,9,11]);
|
this.num = this.randomArray([1,2,3,4,5,6,7,8,9,11]);
|
||||||
this.num.splice(9, 0, 10);
|
this.num.splice(9, 0, 10);
|
||||||
this.num.splice(11, 0, 12);
|
this.num.splice(11, 0, 12);
|
||||||
console.log(this.num);
|
|
||||||
console.log(this.key_words);
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 数组混淆
|
// 数组混淆
|
||||||
|
|
|
@ -16,16 +16,25 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="coupon_popups" v-if="popShow">
|
<view class="coupon_popups" v-if="popShow">
|
||||||
<view class="bg2"></view>
|
<view class="bg2"></view>
|
||||||
<view class="con" >
|
<view class="con" v-if="blind">
|
||||||
<view class="contents">
|
<view class="contents">
|
||||||
<image src="@/static/images/jf.png" style="width: 48px;height:48px;" mode=""></image>
|
<image src="@/static/images/jf.png" style="width: 48px;height:48px;" mode=""></image>
|
||||||
<view class="text-black">恭喜您获得</view>
|
<view class="text-black">恭喜您获得</view>
|
||||||
<view class="text-red">{{drawInfo.text}}积分</view>
|
<view class="text-red">{{drawInfo.text}}积分</view>
|
||||||
<view class="btn" @click="confirm" v-if="">开心收下</view>
|
<view class="btn" @click="confirm" v-if="!drawInfo.wheel">开心收下</view>
|
||||||
<view class="btn" @click="goBlind">继续开盲盒</view>
|
<view class="btn" @click="goBlind" v-else>继续开盲盒</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='iconfont icon-guanbi3' @click="popShow = false"></view>
|
<view class='iconfont icon-guanbi3' @click="popShow = false"></view>
|
||||||
</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>
|
</view>
|
||||||
<blindBox v-if="blindShow"></blindBox>
|
<blindBox v-if="blindShow"></blindBox>
|
||||||
</view>
|
</view>
|
||||||
|
@ -47,10 +56,11 @@
|
||||||
blindShow:false,
|
blindShow:false,
|
||||||
integral:'',
|
integral:'',
|
||||||
list:[],
|
list:[],
|
||||||
|
blind:true,
|
||||||
drawInfo:{
|
drawInfo:{
|
||||||
img:'',
|
img:'',
|
||||||
text:'',
|
text:'',
|
||||||
|
wheel:0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -59,11 +69,13 @@
|
||||||
methods: {
|
methods: {
|
||||||
confirm(){
|
confirm(){
|
||||||
this.popShow = false;
|
this.popShow = false;
|
||||||
|
this.blind=false;
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
async openBox(){
|
async openBox(){
|
||||||
await setSignIntegral().then(res=>{
|
await setSignIntegral().then(res=>{
|
||||||
this.drawInfo.text = res.data.integral;
|
this.drawInfo.text = res.data.integral;
|
||||||
|
this.drawInfo.wheel=res.data.wheel;
|
||||||
this.gifShow=true;
|
this.gifShow=true;
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.gifShow=false;
|
this.gifShow=false;
|
||||||
|
@ -75,6 +87,9 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
goBlind(){
|
||||||
|
this.blindShow=true;
|
||||||
|
},
|
||||||
close(){
|
close(){
|
||||||
this.$emit('closeTreasureBox')
|
this.$emit('closeTreasureBox')
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,12 +479,12 @@
|
||||||
},
|
},
|
||||||
validateBtn() {
|
validateBtn() {
|
||||||
let {
|
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;
|
} = 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){
|
if(isVeteran&&!isVeteranPhoto){
|
||||||
return
|
return
|
||||||
}else if (isFlagshipStore&&!isFlagshipStorePhoto){
|
}else if (isFlagshipStore&&!isFlagshipStorePhoto){
|
||||||
|
@ -494,7 +494,6 @@
|
||||||
phone: userPhone,
|
phone: userPhone,
|
||||||
mer_name:shopName,
|
mer_name:shopName,
|
||||||
name:userName,
|
name:userName,
|
||||||
merchant_category_id:classification,//hjb 这里应该是设置反了
|
|
||||||
mer_type_id:mer_type,//hjb 这里应该是设置反了
|
mer_type_id:mer_type,//hjb 这里应该是设置反了
|
||||||
com:{
|
com:{
|
||||||
name:EnterpriseName,
|
name:EnterpriseName,
|
||||||
|
|
|
@ -106,11 +106,11 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item no-border">
|
<!-- <view class="item no-border">
|
||||||
<checkbox-group @change='ChangeIsAgree'>
|
<checkbox-group @change='ChangeIsAgree'>
|
||||||
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意</checkbox-group>
|
<checkbox class="checkbox" :checked="isAgree ? true : false" />已阅读并同意</checkbox-group>
|
||||||
<button class="settleAgree" @click="getConfig">《入驻协议》</button>
|
<button class="settleAgree" @click="getConfig">《入驻协议》</button>
|
||||||
</view>
|
</view> -->
|
||||||
<button class='submitBtn' :disabled="!validate" :class="validate === true ? 'on':''" @click="nextStep">下一步</button>
|
<button class='submitBtn' :disabled="!validate" :class="validate === true ? 'on':''" @click="nextStep">下一步</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -79,10 +79,10 @@
|
||||||
<view class="txt">关注店铺</view>
|
<view class="txt">关注店铺</view>
|
||||||
</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>
|
<text class="num">{{userInfo.total_coupon || 0}}</text>
|
||||||
<view class="txt">优惠券</view>
|
<view class="txt">优惠券</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="num-item" @click="goMenuPage('/pages/users/browsingHistory/index')">
|
<view class="num-item" @click="goMenuPage('/pages/users/browsingHistory/index')">
|
||||||
<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>
|
||||||
|
@ -765,7 +765,7 @@ import { setTimeout } from 'timers';
|
||||||
margin: 30rpx 20rpx 0;
|
margin: 30rpx 20rpx 0;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
.num-item {
|
.num-item {
|
||||||
width: 25%;
|
width: 33%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.num {
|
.num {
|
||||||
font-size: 42rpx;
|
font-size: 42rpx;
|
||||||
|
|
|
@ -47,19 +47,19 @@
|
||||||
<view v-if="integral_status" class='list2' :hidden='current!=1'>
|
<view v-if="integral_status" class='list2' :hidden='current!=1'>
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<text>姓名</text>
|
<text>姓名</text>
|
||||||
<input type="text" v-model="presentExp.name" />
|
<input type="text" placeholder="请输入姓名" v-model="presentExp.name" />
|
||||||
</view>
|
</view>
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<text>手机号</text>
|
<text>手机号</text>
|
||||||
<input type="number" v-model="presentExp.phone"/>
|
<input type="number" placeholder="请输入手机号" v-model="presentExp.phone"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<text>身份证</text>
|
<text>身份证</text>
|
||||||
<input type="text" v-model="presentExp.id_number"/>
|
<input type="text" placeholder="请输入身份证" v-model="presentExp.id_number"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
<text>积分</text>
|
<text>积分</text>
|
||||||
<input type="text" v-model="presentExp.integral"/>
|
<input type="text" placeholder="请输入积分" v-model="presentExp.integral"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-btn" @click="giveaway">
|
<view class="list-btn" @click="giveaway">
|
||||||
确认赠送
|
确认赠送
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import pay from "@/components/pay/index.vue"
|
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 { mapGetters } from "vuex";
|
||||||
import emptyPage from '@/components/emptyPage.vue';
|
import emptyPage from '@/components/emptyPage.vue';
|
||||||
import parser from "@/components/jyf-parser/jyf-parser";
|
import parser from "@/components/jyf-parser/jyf-parser";
|
||||||
|
@ -150,12 +150,38 @@
|
||||||
closeFunc(val){
|
closeFunc(val){
|
||||||
this.payShow=val;
|
this.payShow=val;
|
||||||
},
|
},
|
||||||
payFunc(val){
|
async payFunc(val){
|
||||||
console.log('val: ',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;
|
this.payShow=false;
|
||||||
|
await integralGive(d).then((res)=>{
|
||||||
|
if(res){
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}).catch((err)=>{
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message
|
||||||
|
});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
giveaway(){
|
giveaway(){
|
||||||
|
let {name,phone,id_number,integral}=this.presentExp
|
||||||
|
if(name&&phone&&id_number&&integral){
|
||||||
this.payShow=true;
|
this.payShow=true;
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
icon:'none',
|
||||||
|
title: '请完整填写信息'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
getUserInfo: function() {
|
getUserInfo: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -347,10 +373,11 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
grid-gap: 20rpx;
|
grid-gap: 20rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
.list-item{
|
.list-item{
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: 120rpx;
|
height: 100rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 16rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -363,6 +390,9 @@
|
||||||
input{
|
input{
|
||||||
flex: 4;
|
flex: 4;
|
||||||
}
|
}
|
||||||
|
.uni-input-placeholder{
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.list-btn{
|
.list-btn{
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
@ -373,6 +403,7 @@
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
margin-top: 40rpx;
|
||||||
background-color:var(--view-theme);
|
background-color:var(--view-theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
res.data.integral = parseInt(res.data.integral);
|
res.data.integral = parseInt(res.data.integral);
|
||||||
let sum_sgin_day = res.data.count;
|
let sum_sgin_day = res.data.count;
|
||||||
that.$set(that,'signConfig',res.data.title);
|
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.$set(that,'userInfo',res.data.userInfo);
|
||||||
that.signCount = that.PrefixInteger(sum_sgin_day, 4);
|
that.signCount = that.PrefixInteger(sum_sgin_day, 4);
|
||||||
that.sign_index = res.data.sign_num;
|
that.sign_index = res.data.sign_num;
|
||||||
|
|
Loading…
Reference in New Issue