xy 3 years ago
parent 8806e7ebe3
commit 2405cebfe5

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

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

@ -22,7 +22,7 @@
</view>
<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 class="login">
@ -107,7 +107,6 @@ import popover from "@/component/popover/index.vue";
}
},
onLoad() {
this.getNotices()
},
methods: {
toRaffle() {
@ -127,33 +126,35 @@ import popover from "@/component/popover/index.vue";
},
sendCode() {
if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) {
uni.showToast({
icon: 'none',
title: '手机号不正确'
// if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) {
// uni.showToast({
// icon: 'none',
// 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 {
if(this.$refs.uCode.canGetCode) {
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('倒计时结束后再发送');
}
this.$u.toast('倒计时结束后再发送');
}
},
bindMobile() {
if(this.code) {
this.$u.api.bindMobile({
mobile: `192${this.inputMobile}`,
mobile: this.inputMobile,
//`192${this.inputMobile}`,
code: this.code
}).then(res => {
this.popoverType = 3;
@ -176,6 +177,16 @@ import popover from "@/component/popover/index.vue";
return 'laugh';
}
}
},
watch: {
vuex_token: {
handler(newVal){
if(newVal) {
this.getNotices()
}
},
immediate: true
}
}
}
</script>
@ -205,13 +216,13 @@ import popover from "@/component/popover/index.vue";
& .logo {
margin-top: 4vh;
margin-top: 3vh;
margin-left: 40rpx;
}
& .title {
margin-top: 4vh;
margin-top: 3vh;
}
& .notice {
@ -221,19 +232,19 @@ import popover from "@/component/popover/index.vue";
color: #fff;
text-align: center;
margin: .2vh 140rpx 0 140rpx;
margin: .1vh 140rpx 0 140rpx;
}
.present {
margin-top: 0.75vh;
margin-top: 0.5vh;
}
.login {
height: 448rpx;
position: relative;
margin: -5.6vh 60rpx 0 60rpx;
margin: -12vh 60rpx 0 60rpx;
padding: 0 52rpx 3.5vh 40rpx;
&-bkg {
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;
text-align: center;
padding-top: 6.9vh;
padding-top: 4vh;
padding-bottom: 2.28vh;
}
}

@ -10,7 +10,7 @@
<view class="info">
<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 class="info-detail">
@ -48,10 +48,10 @@
<view class="record-list__item" v-for="i in draws">
<view class="left">
<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 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>
@ -74,7 +74,6 @@ export default {
const res = await this.$u.api.getPrize()
this.userInfo = res.user
this.draws = res.prize
console.log(res)
}
},
computed: {
@ -179,7 +178,7 @@ export default {
align-items: flex-end;
margin-top: 1.22vh;
padding: 8rpx 30rpx 10rpx 16rpx;
padding: 8rpx 20rpx 10rpx 16rpx;
& .icon {
height: 24rpx;

@ -99,7 +99,7 @@
<view v-if="popoverType === 5">
<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: '将活动分享给小伙伴',
@ -121,7 +121,7 @@
fontSize: '28rpx',
width: '166rpx',
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>
@ -261,7 +261,7 @@ export default {
& .title {
margin-top: 10vh;
margin-top: 5vh;
}
& .notice {
@ -279,7 +279,7 @@ export default {
height: 924rpx;
position: relative;
margin: 2.9vh auto 0 auto;
margin: 2.4vh auto 0 auto;
&-bkg {
z-index: 1;

Loading…
Cancel
Save