xy 3 years ago
parent 8806e7ebe3
commit 2405cebfe5

@ -2,16 +2,15 @@ const mode = 'devLocal'; //devLocal本地测试、devOnline线上测试、
let ROOTPATH = ''; //域名 let ROOTPATH = ''; //域名
switch (mode) { switch (mode) {
case 'devLocal': case 'devLocal':
ROOTPATH = "http://h5.ali251.langye.net" ROOTPATH = "//h5.ali251.langye.net"
break; break;
case 'devOnline': case 'devOnline':
ROOTPATH = "https://xxxxx.cn" ROOTPATH = ""
break; break;
case 'production': case 'production':
ROOTPATH = "http://h5.ali251.langye.net" ROOTPATH = "//h5.ali251.langye.net"
break; break;
default: default:
throw new Error('未配置环境'); throw new Error('未配置环境');
console.log(`未配置环境`);
} }
export { ROOTPATH } export { ROOTPATH }

@ -55,7 +55,7 @@ const install = (Vue, vm) => {
} }
} else { } else {
uni.showToast({ uni.showToast({
icon: "fail", icon: "none",
title: res.statusCode title: res.statusCode
}) })

@ -22,7 +22,7 @@
</view> </view>
<view class="present"> <view class="present">
<u-image style="display: flex;justify-content: center;" mode="heightFix" width="auto" height="720rpx" :src="require('@/static/present.png')"></u-image> <u-image style="display: flex;justify-content: center;" mode="heightFix" width="auto" height="700rpx" :src="require('@/static/present.png')"></u-image>
</view> </view>
<view class="login"> <view class="login">
@ -107,7 +107,6 @@ import popover from "@/component/popover/index.vue";
} }
}, },
onLoad() { onLoad() {
this.getNotices()
}, },
methods: { methods: {
toRaffle() { toRaffle() {
@ -127,33 +126,35 @@ import popover from "@/component/popover/index.vue";
}, },
sendCode() { sendCode() {
if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) { // if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) {
uni.showToast({ // uni.showToast({
icon: 'none', // icon: 'none',
title: '手机号不正确' // title: ''
// })
// return
// }
if(this.$refs.uCode.canGetCode) {
this.$refs.uCode.start()
this.$u.api.sendSms({
tempate_key: 'sms_code_template',
mobile: this.inputMobile
//`192${this.inputMobile}`
}).then(res => {
uni.showToast({
icon: 'none',
title: res.msg
})
}) })
} else { } else {
if(this.$refs.uCode.canGetCode) { this.$u.toast('倒计时结束后再发送');
this.$refs.uCode.start()
this.$u.api.sendSms({
tempate_key: 'sms_code_template',
mobile: `192${this.inputMobile}`
}).then(res => {
uni.showToast({
icon: 'none',
title: res.msg
})
})
} else {
this.$u.toast('倒计时结束后再发送');
}
} }
}, },
bindMobile() { bindMobile() {
if(this.code) { if(this.code) {
this.$u.api.bindMobile({ this.$u.api.bindMobile({
mobile: `192${this.inputMobile}`, mobile: this.inputMobile,
//`192${this.inputMobile}`,
code: this.code code: this.code
}).then(res => { }).then(res => {
this.popoverType = 3; this.popoverType = 3;
@ -176,6 +177,16 @@ import popover from "@/component/popover/index.vue";
return 'laugh'; return 'laugh';
} }
} }
},
watch: {
vuex_token: {
handler(newVal){
if(newVal) {
this.getNotices()
}
},
immediate: true
}
} }
} }
</script> </script>
@ -205,13 +216,13 @@ import popover from "@/component/popover/index.vue";
& .logo { & .logo {
margin-top: 4vh; margin-top: 3vh;
margin-left: 40rpx; margin-left: 40rpx;
} }
& .title { & .title {
margin-top: 4vh; margin-top: 3vh;
} }
& .notice { & .notice {
@ -221,19 +232,19 @@ import popover from "@/component/popover/index.vue";
color: #fff; color: #fff;
text-align: center; text-align: center;
margin: .2vh 140rpx 0 140rpx; margin: .1vh 140rpx 0 140rpx;
} }
.present { .present {
margin-top: 0.75vh; margin-top: 0.5vh;
} }
.login { .login {
height: 448rpx; height: 448rpx;
position: relative; position: relative;
margin: -5.6vh 60rpx 0 60rpx; margin: -12vh 60rpx 0 60rpx;
padding: 0 52rpx 3.5vh 40rpx; padding: 0 52rpx 3.5vh 40rpx;
&-bkg { &-bkg {
filter: drop-shadow(14rpx 14rpx 4rpx rgba(0,0,0,0.3)); filter: drop-shadow(14rpx 14rpx 4rpx rgba(0,0,0,0.3));
@ -308,7 +319,7 @@ import popover from "@/component/popover/index.vue";
line-height: 32rpx; line-height: 32rpx;
text-align: center; text-align: center;
padding-top: 6.9vh; padding-top: 4vh;
padding-bottom: 2.28vh; padding-bottom: 2.28vh;
} }
} }

@ -10,7 +10,7 @@
<view class="info"> <view class="info">
<view class="info-img"> <view class="info-img">
<u-image :height="188" shape="circle" width="100%" :src="require('@/static/icon-none.png')"></u-image> <u-image :height="188" shape="circle" width="100%" :src="userInfo.headimgurl || require('@/static/icon-none.png')"></u-image>
</view> </view>
<view class="info-detail"> <view class="info-detail">
@ -48,10 +48,10 @@
<view class="record-list__item" v-for="i in draws"> <view class="record-list__item" v-for="i in draws">
<view class="left"> <view class="left">
<view class="left__title">{{ i.draw_prize ? i.draw_prize.name : '' }}</view> <view class="left__title">{{ i.draw_prize ? i.draw_prize.name : '' }}</view>
<view class="left__date">{{ i.draw_prize ? $moment(i.draw_prize.created_at).format('YYYY-MM-DD') : '' }}</view> <view class="left__date">{{ i.draw_prize ? $moment(i.created_at).format('YYYY-MM-DD') : '' }}</view>
</view> </view>
<view class="right"> <view class="right">
<u-button :ripple="true" shape="circle" :hair-line="false" :custom-style="btnStyle(i.is_send)">{{ btnText(i.is_send) }}</u-button> <u-button v-if="i.draw_prize.name !== '谢谢参与'" :ripple="true" shape="circle" :hair-line="false" :custom-style="btnStyle(i.is_send)">{{ btnText(i.is_send) }}</u-button>
</view> </view>
</view> </view>
</view> </view>
@ -74,7 +74,6 @@ export default {
const res = await this.$u.api.getPrize() const res = await this.$u.api.getPrize()
this.userInfo = res.user this.userInfo = res.user
this.draws = res.prize this.draws = res.prize
console.log(res)
} }
}, },
computed: { computed: {
@ -179,7 +178,7 @@ export default {
align-items: flex-end; align-items: flex-end;
margin-top: 1.22vh; margin-top: 1.22vh;
padding: 8rpx 30rpx 10rpx 16rpx; padding: 8rpx 20rpx 10rpx 16rpx;
& .icon { & .icon {
height: 24rpx; height: 24rpx;

@ -99,7 +99,7 @@
<view v-if="popoverType === 5"> <view v-if="popoverType === 5">
<view class="box-text__title-5">做任务增加抽奖机会</view> <view class="box-text__title-5">做任务增加抽奖机会</view>
<view class="box-text__item-5" v-for="item in <view class="box-text__item-5" v-for="(item,index) in
[ [
{ {
v: '将活动分享给小伙伴', v: '将活动分享给小伙伴',
@ -121,7 +121,7 @@
fontSize: '28rpx', fontSize: '28rpx',
width: '166rpx', width: '166rpx',
height: '56rpx' height: '56rpx'
}" shape="circle" :hair-line="false" :ripple="true" @click="toShare = true">{{ item.b }}</u-button> }" shape="circle" :hair-line="false" :ripple="true" @click="index === 0 ? toShare = true : ''">{{ item.b }}</u-button>
</view> </view>
</view> </view>
</view> </view>
@ -261,7 +261,7 @@ export default {
& .title { & .title {
margin-top: 10vh; margin-top: 5vh;
} }
& .notice { & .notice {
@ -279,7 +279,7 @@ export default {
height: 924rpx; height: 924rpx;
position: relative; position: relative;
margin: 2.9vh auto 0 auto; margin: 2.4vh auto 0 auto;
&-bkg { &-bkg {
z-index: 1; z-index: 1;

Loading…
Cancel
Save