Commit 73fc42ce authored by 付清曌's avatar 付清曌

Merge branch 'feature/beta' into 'master'

Feature/beta

See merge request !47
parents 18d15417 b1a39911
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
data-item="{{item}}" data-item="{{item}}"
class="list-item {{item.select?'delete':''}} {{tools.computClass(currentIndex,index,list.length)}}" class="list-item {{item.select?'delete':''}} {{tools.computClass(currentIndex,index,list.length)}}"
> >
<image src="{{item.imgsrc}}"></image> <image src="{{item.imgsrc}}" class="img"></image>
<view class="text">{{item.text}}</view> <view class="text">{{item.text}}</view>
<p class="price">{{item.price}}</p> <p class="price">{{item.price}}</p>
<p class="buy">{{item.people}}人购买</p> <p class="buy">{{item.people}}人购买</p>
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
margin-top: 2rpx; margin-top: 2rpx;
position: relative; position: relative;
} }
.list-item image { .list-item .img {
width: 210rpx; width: 210rpx;
display: block; display: block;
height: 210rpx; height: 210rpx;
......
...@@ -178,6 +178,8 @@ ...@@ -178,6 +178,8 @@
<open-animation v-if="showModal === 2" :joinRecord="mainInfo && mainInfo.joinRecord"/> <open-animation v-if="showModal === 2" :joinRecord="mainInfo && mainInfo.joinRecord"/>
<shared-popup v-if="showModal === 1" :inviteinfo="mainInfo && mainInfo.inviteRecord" @getSharedGold="getSharedGold"/> <shared-popup v-if="showModal === 1" :inviteinfo="mainInfo && mainInfo.inviteRecord" @getSharedGold="getSharedGold"/>
<popup @showMenu="showMenu" :showMenus="showModal === 3"/> <popup @showMenu="showMenu" :showMenus="showModal === 3"/>
<!--商品推荐列表-->
<!--<goods-list :goodsList="goodsList"></goods-list>-->
<van-dialog id="van-dialog"/> <van-dialog id="van-dialog"/>
<van-notify id="van-notify"/> <van-notify id="van-notify"/>
</view> </view>
......
...@@ -238,10 +238,10 @@ ...@@ -238,10 +238,10 @@
<view> <view>
<input type="text" class="inner-input" v-model="code"> <input type="text" class="inner-input" v-model="code">
</view> </view>
<view class="error-text" v-show="isError">邀请码错误,请重新输入</view> <view class="error-text" v-show="isError">{{errorText}}</view>
<view class="inner-footer"> <view class="inner-footer">
<view class="cancel button" bindtap="closeModal">内测结束再抽</view> <view class="cancel button" bindtap="closeModal">内测结束再抽</view>
<view class="confirm button" bindtap="checkCode">确定</view> <view class="confirm button" bindtap="checkCode">{{errorBtn}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -269,7 +269,9 @@ ...@@ -269,7 +269,9 @@
isInnerDone: 'hide', isInnerDone: 'hide',
innerActivity: '', innerActivity: '',
isError: false, isError: false,
code: '' code: '',
errorText:'',
errorBtn:'确定',
}, },
methods: { methods: {
check() { check() {
...@@ -282,9 +284,9 @@ ...@@ -282,9 +284,9 @@
let detail = e.$wx.detail || {}; let detail = e.$wx.detail || {};
function goprize() { function goprize() {
updateUserPhone(detail).then(() => { updateUserPhone(detail).then(() => {
that.confirmRaff();
wx.setStorageSync('hasPhone', true); wx.setStorageSync('hasPhone', true);
that.hasPhone = true; that.hasPhone = true;
that.joinin();
}).catch(() => { }).catch(() => {
that.btnfont = '立即参与'; that.btnfont = '立即参与';
}); });
...@@ -371,13 +373,28 @@ ...@@ -371,13 +373,28 @@
this.code = ''; this.code = '';
}, },
checkCode () { checkCode () {
if(this.code === '') {
this.errorText = '请输入邀请码';
this.isError = true;
return;
}
if(this.errorBtn !== '确定') {
return;
}
this.errorBtn = '验证中...';
checkInnerCode({code: this.code}).then(data => { checkInnerCode({code: this.code}).then(data => {
this.errorBtn = '确定';
if (+data.checkCode === 0) { if (+data.checkCode === 0) {
this.closeModal(); this.closeModal();
this.confirmRaff(); this.confirmRaff();
} else { } else {
let index = data.checkCode+2;
let mesg = ['邀请码错误,请重新输入','该邀请码已被使用,请重新输入']
this.errorText = mesg[index];
this.isError = true; this.isError = true;
} }
}).catch(()=>{
this.errorBtn = '确定';
}); });
} }
}, },
...@@ -391,8 +408,8 @@ ...@@ -391,8 +408,8 @@
} }
}, },
watch: { watch: {
code(val) { code(val,oldval) {
if (!val.length && this.isError) { if (val!==oldval && this.isError) {
this.isError = false; this.isError = false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment