27 changed files with 1516 additions and 1619 deletions
@ -1,6 +1,5 @@ |
|||
<template> |
|||
<view class="flex"> |
|||
<<<<<<< HEAD |
|||
<view class="my-cont" @click="keCode=1"> |
|||
<image src="../../static/home/[email protected]" mode=""></image> |
|||
</view> |
|||
@ -9,67 +8,58 @@ |
|||
|
|||
<view class="title"> |
|||
<image src="../../static/color/pop_icon_service@2x(1).png" mode="aspectFit" class="img1"></image> |
|||
<p>matis</p> |
|||
======= |
|||
<view class="my-cont" @click="keCode=1"> |
|||
<image src="../../static/home/[email protected]" mode=""></image> |
|||
>>>>>>> 568bf6045ac1252bb15844d528ceabdb0f66ad2f |
|||
<p>Customer Service</p> |
|||
</view> |
|||
<!-- <u-mask :z-index="10" v-if="keCode!=1"></u-mask> --> |
|||
<view class="tc" v-show="keCode==1"> |
|||
|
|||
<view class="title"> |
|||
<image src="../../static/color/pop_icon_service@2x(1).png" mode="aspectFit" class="img1"></image> |
|||
<p>matis</p> |
|||
<view class="tc_body"> |
|||
<view class="p1"> |
|||
{{serviceTime}} |
|||
</view> |
|||
<view class="tc_body"> |
|||
<view class="p1"> |
|||
Sen assistente ao vivo e sempre a seu servico. |
|||
</view> |
|||
|
|||
|
|||
<scroll-view class="item" style="height:380rpx" scroll-y="true" show-scrollbar="true" |
|||
scroll-with-animation="true" scroll-top="0"> |
|||
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in whatAppList" |
|||
:key="item"> |
|||
<image src="../../static/color/[email protected]" mode="aspectFit" class="img2"></image> |
|||
<view class="p2"> |
|||
{{getName(item)}} |
|||
</view> |
|||
<scroll-view class="item" style="height:380rpx" scroll-y="true" show-scrollbar="true" scroll-with-animation="true" scroll-top="0" > |
|||
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in whatAppList" |
|||
:key="item"> |
|||
<image src="../../static/color/[email protected]" mode="aspectFit" class="img2"></image> |
|||
<view class="p2"> |
|||
{{getName(item)}} |
|||
</view> |
|||
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in teList" :key="item"> |
|||
<image src="../../static/color/pop_icon_teltgram.png" mode="" class="img2"></image> |
|||
<view class="p2"> |
|||
<span class="whatapp-name">{{getName(item)}}</span> |
|||
</view> |
|||
</view> |
|||
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in teList" |
|||
:key="item"> |
|||
<image src="../../static/color/pop_icon_teltgram.png" mode="" class="img2"></image> |
|||
<view class="p2"> |
|||
<span class="whatapp-name">{{getName(item)}}</span> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
</view> |
|||
|
|||
<image src="../../static/color/pop_icon_close.png" mode="aspectFit" class="colseKefu" @click="keCode=0"> |
|||
</image> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
</view> |
|||
|
|||
<image src="../../static/color/pop_icon_close.png" mode="aspectFit" class="colseKefu" @click="keCode=0"></image> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
|
|||
<script> |
|||
const COMPONENT_NAME = 'cont' |
|||
export default { |
|||
name: COMPONENT_NAME, |
|||
// props:["teList","whatAppList"], |
|||
// props:["teList","whatAppList"], |
|||
data() { |
|||
return { |
|||
keCode: 0, |
|||
teList: [], |
|||
whatAppList: [], |
|||
keCode:0, |
|||
teList:[], |
|||
whatAppList:[], |
|||
serviceTime:'', |
|||
} |
|||
}, |
|||
computed: { |
|||
|
|||
|
|||
}, |
|||
mounted() { |
|||
const siteTelegram = uni.getStorageSync('siteInfo').siteTelegram; |
|||
this.serviceTime = uni.getStorageSync('siteInfo').serviceTime; |
|||
const siteTelegram = uni.getStorageSync('siteInfo').siteTelegram; |
|||
|
|||
const siteWhatsapp = uni.getStorageSync('siteInfo').siteWhatsapp; |
|||
if (siteTelegram != undefined && siteTelegram != '') { |
|||
this.teList = siteTelegram.split(',') |
|||
@ -81,162 +71,145 @@ |
|||
} |
|||
}, |
|||
methods: { |
|||
gotoWeb(gotoUrl) { |
|||
// #ifdef H5 |
|||
window.location.href = gotoUrl |
|||
// #endif |
|||
// #ifdef APP-PLUS |
|||
var networkType = '' |
|||
uni.getNetworkType({ |
|||
success: function(res) { |
|||
networkType = res.networkType |
|||
} |
|||
}); |
|||
if (networkType == 'none') { |
|||
uni.showToast({ |
|||
title: 'no Network', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
} else { |
|||
var param = { |
|||
url: gotoUrl |
|||
} |
|||
uni.navigateTo({ |
|||
url: '/pages/menu/me/rechange/topay/index?' + qs.stringify(param) |
|||
}) |
|||
gotoWeb(gotoUrl) { |
|||
// #ifdef H5 |
|||
window.location.href = gotoUrl |
|||
// #endif |
|||
// #ifdef APP-PLUS |
|||
var networkType = '' |
|||
uni.getNetworkType({ |
|||
success: function(res) { |
|||
networkType = res.networkType |
|||
} |
|||
// #endif |
|||
}, |
|||
|
|||
getLink(item) { |
|||
return item.replace(item.split(':')[0] + ':', '') |
|||
}, |
|||
getName(item) { |
|||
console.log(item, 20000); |
|||
return item.split(':')[0] |
|||
}); |
|||
if (networkType == 'none') { |
|||
uni.showToast({ |
|||
title: 'no Network', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
} else { |
|||
var param = { |
|||
url: gotoUrl |
|||
} |
|||
uni.navigateTo({ |
|||
url: '/pages/menu/me/rechange/topay/index?' + qs.stringify(param) |
|||
}) |
|||
} |
|||
// #endif |
|||
}, |
|||
|
|||
getLink(item) { |
|||
return item.replace(item.split(':')[0] + ':', '') |
|||
}, |
|||
getName(item) { |
|||
console.log(item,20000); |
|||
return item.split(':')[0] |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
|
|||
<style> |
|||
.item { |
|||
.item{ |
|||
margin-top: 60rpx; |
|||
/* height: 380rpx; |
|||
/* height: 380rpx; |
|||
overflow-y: scroll; |
|||
overflow-x: hidden; */ |
|||
} |
|||
|
|||
.img2 { |
|||
.img2{ |
|||
width: 60rpx; |
|||
height: 60rpx; |
|||
} |
|||
|
|||
.p2 { |
|||
.p2{ |
|||
font-size: 28rpx; |
|||
color: #303133FF; |
|||
margin-left: 20rpx; |
|||
} |
|||
|
|||
.p1 { |
|||
.p1{ |
|||
font-size: 28rpx; |
|||
color: #606266FF; |
|||
} |
|||
|
|||
.colseKefu { |
|||
.colseKefu{ |
|||
position: absolute; |
|||
right: 36rpx; |
|||
top: 36rpx; |
|||
width: 36rpx; |
|||
height: 36rpx; |
|||
} |
|||
|
|||
.img1 { |
|||
.img1{ |
|||
display: block; |
|||
margin: 0 auto; |
|||
width: 108rpx; |
|||
height: 108rpx; |
|||
} |
|||
|
|||
.content { |
|||
position: relative; |
|||
} |
|||
|
|||
.title { |
|||
text-transform: capitalize; |
|||
font-size: 28rpx; |
|||
color: #954DE3FF; |
|||
text-align: center; |
|||
} |
|||
|
|||
.title p { |
|||
margin-top: 18rpx; |
|||
} |
|||
|
|||
.body_item { |
|||
display: flex; |
|||
align-items: center; |
|||
padding-bottom: 40rpx; |
|||
} |
|||
|
|||
.body_item_info { |
|||
font-size: 28rpx; |
|||
color: #606266; |
|||
text-transform: capitalize; |
|||
margin-top: 28rpx; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
|
|||
.tc { |
|||
width: 600rpx; |
|||
background-color: #fff; |
|||
border-radius: 24rpx; |
|||
padding-top: 48rpx; |
|||
position: fixed; |
|||
top: 50%; |
|||
left: 50%; |
|||
transform: translate(-50%, -50%); |
|||
z-index: 999; |
|||
} |
|||
|
|||
.tc_body { |
|||
padding: 48rpx 36rpx; |
|||
padding-bottom: 0rpx; |
|||
position: relative; |
|||
} |
|||
|
|||
.tc_body::before { |
|||
content: ''; |
|||
position: absolute; |
|||
top: 20rpx; |
|||
left: 50%; |
|||
transform: translateX(-50%); |
|||
width: 100%; |
|||
height: 2rpx; |
|||
background-color: #EDEFF2FF; |
|||
} |
|||
|
|||
.my-cont { |
|||
.content{ |
|||
position: relative; |
|||
} |
|||
.title{ |
|||
text-transform: capitalize; |
|||
font-size: 28rpx; |
|||
color: #954DE3FF; |
|||
text-align: center; |
|||
} |
|||
.title p{ |
|||
margin-top: 18rpx; |
|||
} |
|||
.body_item{ |
|||
display: flex; |
|||
align-items: center; |
|||
padding-bottom: 40rpx; |
|||
} |
|||
.body_item_info{ |
|||
font-size: 28rpx; |
|||
color: #606266; |
|||
text-transform: capitalize; |
|||
margin-top: 28rpx; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.tc{ |
|||
width: 600rpx; |
|||
background-color: #fff; |
|||
border-radius: 24rpx; |
|||
padding-top: 48rpx; |
|||
position: fixed; |
|||
top: 50%; |
|||
left: 50%; |
|||
transform: translate(-50%,-50%); |
|||
z-index: 999; |
|||
} |
|||
.tc_body{ |
|||
padding: 48rpx 36rpx; |
|||
padding-bottom: 0rpx; |
|||
position: relative; |
|||
} |
|||
.tc_body::before{ |
|||
content: ''; |
|||
position: absolute; |
|||
top: 20rpx; |
|||
left: 50%; |
|||
transform: translateX(-50%); |
|||
width: 100%; |
|||
height: 2rpx; |
|||
background-color: #EDEFF2FF; |
|||
} |
|||
.my-cont{ |
|||
width: 180rpx; |
|||
height: 180rpx; |
|||
position: fixed; |
|||
top: 75%; |
|||
right: 0; |
|||
} |
|||
|
|||
.my-cont image { |
|||
.my-cont image{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
.flex { |
|||
.flex{ |
|||
align-items: center; |
|||
} |
|||
|
|||
.flex .my-cont { |
|||
.flex .my-cont{ |
|||
margin-left: auto; |
|||
|
|||
|
|||
} |
|||
</style> |
|||
|
@ -10,7 +10,8 @@ |
|||
<span class="quhao">+{{areacode}}</span> |
|||
</view> |
|||
<input type="text" value="" placeholder="mobile number" |
|||
placeholder-style="color: #BFC2CCFF;font-size:14px;text-transform: capitalize;" v-model="mobile" @input="btnControl"/> |
|||
placeholder-style="color: #BFC2CCFF;font-size:14px;text-transform: capitalize;" v-model="mobile" |
|||
@input="btnControl" /> |
|||
</view> |
|||
<view class="input-item flex"> |
|||
<view class="login-sigh login-sigh2 flex"> |
|||
@ -27,23 +28,23 @@ |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="input-item flex"> |
|||
<view class="login-sigh login-sigh2 flex"> |
|||
<view class="imgcon"> |
|||
<image src="../../../static/login/[email protected]" mode=""></image> |
|||
</view> |
|||
<view class="input-item flex"> |
|||
<view class="login-sigh login-sigh2 flex"> |
|||
<view class="imgcon"> |
|||
<image src="../../../static/login/[email protected]" mode=""></image> |
|||
</view> |
|||
<input value="" placeholder="Verification code" |
|||
placeholder-style="color: #BFC2CCFF;font-size:14px;text-transform: capitalize;" |
|||
v-model="infoCode" /> |
|||
<view class="wrap"> |
|||
<u-toast ref="uToast"></u-toast> |
|||
<u-verification-code :seconds="seconds" ref="uCode" @change="codeChange" |
|||
start-text="OTP" change-text="xs" end-text="OTP"></u-verification-code> |
|||
<u-button @tap="getCode" style="color: #954DE3FF; border-radius: 4px;font-size: 15px;width: 20px; height: 24px;line-height: 40px;">{{tips}}</u-button> |
|||
|
|||
</view> |
|||
</view> |
|||
<input value="" placeholder="Verification code" |
|||
placeholder-style="color: #BFC2CCFF;font-size:14px;" |
|||
v-model="infoCode" /> |
|||
<view class="wrap"> |
|||
<u-toast ref="uToast"></u-toast> |
|||
<u-verification-code :seconds="seconds" ref="uCode" @change="codeChange" |
|||
start-text="OTP" change-text="xs" end-text="OTP"></u-verification-code> |
|||
<u-button @tap="getCode" style="color: #954DE3FF; border-radius: 4px;font-size: 15px;width: 20px; height: 24px;line-height: 40px;">{{tips}}</u-button> |
|||
|
|||
</view> |
|||
</view> |
|||
<view class="input-item flex"> |
|||
<view class="login-sigh login-sigh2 flex"> |
|||
<view class="imgcon"> |
|||
@ -54,7 +55,8 @@ |
|||
placeholder-style="color: #BFC2CCFF;font-size:14px;text-transform: capitalize;" |
|||
v-model="newPassword" /> |
|||
</view> |
|||
<button class="login-btn" @click="resetPassword()" :class="btnNum==1?'on':''" :disabled="btnNum==1?false:true"> |
|||
<button class="login-btn" @click="resetPassword()" :class="btnNum==1?'on':''" |
|||
:disabled="btnNum==1?false:true"> |
|||
Continue |
|||
</button> |
|||
|
|||
@ -70,7 +72,7 @@ |
|||
data() { |
|||
return { |
|||
tips: 'OTP', |
|||
|
|||
|
|||
seconds: 10, |
|||
mark: 'sms_user_forget_password', |
|||
mobile: '', |
|||
@ -79,7 +81,7 @@ |
|||
infoCode: '', |
|||
picCode: '', |
|||
areacode: '', |
|||
btnNum:0, |
|||
btnNum: 0, |
|||
} |
|||
}, |
|||
|
|||
@ -90,122 +92,114 @@ |
|||
|
|||
}, |
|||
methods: { |
|||
btnControl(){ |
|||
this.btnNum=1; |
|||
if(this.mobile==''){ |
|||
this.btnNum=0; |
|||
} |
|||
|
|||
codeChange(text) { |
|||
this.tips = text; |
|||
}, |
|||
|
|||
|
|||
btnControl() { |
|||
this.btnNum = 1; |
|||
if (this.mobile == '') { |
|||
this.btnNum = 0; |
|||
} |
|||
|
|||
getCode() { |
|||
if (this.picCode == '') { |
|||
uni.showToast({ |
|||
title: 'The graphic verification code is empty', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
if (this.mobile == '') { |
|||
uni.showToast({ |
|||
title: 'Please input mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
var a = /^[0-9]{4,14}$/; |
|||
if (!a.test(this.mobile)) { |
|||
uni.showToast({ |
|||
title: 'Wrong format of mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
if (this.$refs.uCode.canGetCode) { |
|||
// 模拟向后端请求验证码 |
|||
uni.showLoading({ |
|||
title: 'Getting captcha' |
|||
}) |
|||
|
|||
setTimeout(() => { |
|||
uni.hideLoading(); |
|||
this.$refs.uCode.start(); |
|||
}, 2000); |
|||
this.countryCode = uni.getStorageSync('siteInfo').countryCode |
|||
uni.request({ |
|||
url: '/start/api/home/sendSmsCode', |
|||
data: { |
|||
}, |
|||
getCode() { |
|||
if (this.picCode == '') { |
|||
uni.showToast({ |
|||
title: 'The graphic verification code is empty', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
if (this.mobile == '') { |
|||
uni.showToast({ |
|||
title: 'Please input mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
var a = /^[0-9]{9}$/; |
|||
if (!a.test(this.mobile)) { |
|||
uni.showToast({ |
|||
title: 'Wrong format of mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
if (this.$refs.uCode.canGetCode) { |
|||
// 模拟向后端请求验证码 |
|||
uni.showLoading({ |
|||
title: 'Getting captcha' |
|||
}) |
|||
|
|||
setTimeout(() => { |
|||
uni.hideLoading(); |
|||
this.$refs.uCode.start(); |
|||
}, 2000); |
|||
this.countryCode = uni.getStorageSync('siteInfo').countryCode |
|||
const post = api.sendSmsCode({ |
|||
"mobile": this.mobile, |
|||
"mark": this.mark, |
|||
"countryCode": this.countryCode, |
|||
"code": this.picCode |
|||
}, |
|||
header: { |
|||
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //自定义请求头信息 |
|||
}, |
|||
method: 'POST', //请求方式 或GET,必须为大写 |
|||
success: (res) => { |
|||
uni.showToast({ |
|||
title: res.data.errMsg, |
|||
icon: 'none', |
|||
duration: 2500 |
|||
}) |
|||
post.then(res => { |
|||
var that = this; |
|||
uni.showToast({ |
|||
title: res.errMsg, |
|||
icon: 'none', |
|||
duration: 2500 |
|||
}) |
|||
}) |
|||
console.log(res.data); |
|||
}, |
|||
fail: (res) => { |
|||
uni.showToast({ |
|||
title: res.data.errMsg, |
|||
icon: 'none', |
|||
duration: 2500 |
|||
.catch(e => { |
|||
uni.showToast({ |
|||
title: e, |
|||
icon: 'none', |
|||
duration: 2500 |
|||
}) |
|||
}) |
|||
console.log(res.data); |
|||
} |
|||
}); |
|||
} else { |
|||
this.$u.toast('Send after the countdown'); |
|||
} |
|||
|
|||
}, |
|||
} else { |
|||
this.$u.toast('Send after the countdown'); |
|||
} |
|||
|
|||
}, |
|||
getPicCode() { |
|||
this.imgcodeUrl = "/start/api/home/imgCode?uuid=" + this.$u.guid(20); |
|||
console.log(); |
|||
console.log(this.imgcodeUrl) |
|||
}, |
|||
|
|||
resetPassword() { |
|||
var a= /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,19}$/; |
|||
|
|||
if(this.mobile==''){ |
|||
uni.showToast({ |
|||
title: 'Please input mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
var a= /^[0-9]{4,14}$/; |
|||
if(!a.test(this.mobile)){ |
|||
uni.showToast({ |
|||
title: 'Wrong format of mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
if (this.infoCode == '') { |
|||
uni.showToast({ |
|||
title: ' Please enter the SMS verification code', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
var a = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,19}$/; |
|||
|
|||
if (this.mobile == '') { |
|||
uni.showToast({ |
|||
title: 'Please input mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
var a = /^[0-9]{4,14}$/; |
|||
if (!a.test(this.mobile)) { |
|||
uni.showToast({ |
|||
title: 'Wrong format of mobile phone number', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
if (this.infoCode == '') { |
|||
uni.showToast({ |
|||
title: ' Please enter the SMS verification code', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
if (this.picCode == '') { |
|||
uni.showToast({ |
|||
title: ' Please enter the Graphic verification code', |
|||
@ -214,7 +208,7 @@ |
|||
}) |
|||
return; |
|||
} |
|||
if(!a.test(this.newPassword)){ |
|||
if (!a.test(this.newPassword)) { |
|||
uni.showToast({ |
|||
title: 'Incorrect password format,a password requires a combination of numbers and letters', |
|||
icon: 'none', |
|||
@ -222,48 +216,34 @@ |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
|
|||
uni.request({ |
|||
url: '/start/api/user/forgotPassword', |
|||
data: { |
|||
// "ticket":uni.getStorageSync('logInfo').data, |
|||
// "oldPassword": uni.getStorageSync('logInfo').password, |
|||
// "newPassword":this.nwePassword, |
|||
// "confirmNewPassword": this.nwePassword |
|||
'mobile': this.mobile, |
|||
'code': this.infoCode, |
|||
'newPassword': this.newPassword, |
|||
}, |
|||
header: { |
|||
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //自定义请求头信息 |
|||
}, |
|||
method: 'POST', //请求方式 或GET,必须为大写 |
|||
success: (res) => { |
|||
if(res.data.errCode=='SUCCESS'){ |
|||
uni.showToast({ |
|||
title: 'Password modified successfully', |
|||
icon: 'success', |
|||
duration: 1500 |
|||
}) |
|||
}else{ |
|||
uni.showToast({ |
|||
title: res.data.errMsg, |
|||
icon: '', |
|||
duration: 1500 |
|||
}) |
|||
} |
|||
console.log(res.data); |
|||
}, |
|||
|
|||
fail: (res) => { |
|||
uni.showToast({ |
|||
title: res.errMsg, |
|||
icon: '', |
|||
duration: 1500 |
|||
}) |
|||
} |
|||
}); |
|||
const post = api.forgotPassword({ |
|||
'mobile': this.mobile, |
|||
'code': this.infoCode, |
|||
'newPassword': this.newPassword, |
|||
}) |
|||
post.then(res => { |
|||
if (res.errCode == 'SUCCESS') { |
|||
uni.showToast({ |
|||
title: 'Password modified successfully', |
|||
icon: 'success', |
|||
duration: 1500 |
|||
}) |
|||
} else { |
|||
uni.showToast({ |
|||
title: res.errMsg, |
|||
icon: '', |
|||
duration: 1500 |
|||
}) |
|||
} |
|||
console.log(res.data); |
|||
}) |
|||
.catch(e => { |
|||
uni.showToast({ |
|||
title: e, |
|||
icon: 'none', |
|||
duration: 2500 |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
} |
|||
|
@ -1,7 +1,7 @@ |
|||
<template> |
|||
<view class="content"> |
|||
<navigation>color</navigation> |
|||
<balance @send="getSonValue"> |
|||
<balance @send="getSonValue" :currencySymbol="currencySymbol" :currentBalance="currentBalance"> |
|||
<view class="rules-btn" slot="rules" @click="goRule()">rules</view> |
|||
</balance> |
|||
<view class="bg_white"> |
|||
@ -11,8 +11,6 @@ |
|||
{{item.name}} |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="gameContent"> |
|||
<view class="perCon"> |
|||
<view class="perCoun flex"> |
|||
@ -36,32 +34,26 @@ |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view v-show="canBuy"> |
|||
<view class="flex icon-con"> |
|||
<view class="ico" @click="xiazhu(item.color)" v-for="item,index in gameColor" :key="item.id"> |
|||
<image :src="'../../../static/color/ico_apple_'+item.color+'@3x.png'" mode=""></image> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="multiple"> |
|||
<view class="multiple-con flex"> |
|||
<view class="mul-item" v-for="(item,index) in gameColorNumber1" :key="item.num" |
|||
:class="item.cla"> |
|||
@click="xiazhu(item.num)" :class="item.cla"> |
|||
{{item.num}} |
|||
</view> |
|||
</view> |
|||
<view class="multiple-con flex"> |
|||
<view class="mul-item" ref="mulitem" v-for="(item,index) in gameColorNumber2" |
|||
:key="item.num" :class="item.cla"> |
|||
@click="xiazhu(item.num)" :key="item.num" :class="item.cla"> |
|||
{{item.num}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
|
|||
</view> |
|||
<view class="canBuy" v-show="!canBuy"> |
|||
<view class="flex icon-con"> |
|||
@ -69,8 +61,6 @@ |
|||
<image :src="'../../../static/color/ash_'+item.color+'@3x.png'" mode=""></image> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="multiple"> |
|||
<view class="multiple-con flex"> |
|||
<view class="mul-item bg_ash" v-for="(item,index) in gameColorNumber1" :key="item.num"> |
|||
@ -84,13 +74,8 @@ |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
|
|||
</view> |
|||
|
|||
|
|||
<view class="donna flex"> |
|||
<!-- <view class="donna flex"> |
|||
<view class="flex info"> |
|||
<view class="imgcon"> |
|||
<image :src="'https://apitest.luck-work.com/'+myImgUrl" mode="aspectFit"></image> |
|||
@ -109,39 +94,20 @@ |
|||
<view class="follow" @click="follow_xiazhu_conOn=1"> |
|||
Follow |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
</view> --> |
|||
</view> |
|||
|
|||
|
|||
|
|||
<view class="gameNav"> |
|||
<view class="gameNav-item " v-for="item,index in gameNav2" :class="index==gameNavNum?'active':''" |
|||
:key="item.id" @click="gameNavMe(index)"> |
|||
{{item.text}} |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<gamecont v-if="gameNavNum==0"></gamecont> |
|||
<gamecont v-if="gameNavNum==0" :gameRecordCont="gameRecordCont" :lotteryNumResult="lotteryNumResult"></gamecont> |
|||
<gamecont2 :gameRecordCont="gameRecordCont" v-if="gameNavNum==1"></gamecont2> |
|||
<gamecont3 :myGameRecord="myGameRecord" v-if="gameNavNum==2"></gamecont3> |
|||
|
|||
</view> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
<u-mask :show="follow_xiazhu_conOn==1" z-index="1000"></u-mask> |
|||
<!-- <u-mask :show="follow_xiazhu_conOn==1" z-index="1000"></u-mask> |
|||
<view class="follow_xiazhu_con" v-show="follow_xiazhu_conOn==1"> |
|||
|
|||
<view class="xia_head"> |
|||
<view class="tiao" @click="follow_xiazhu_conOn=0"> |
|||
</view> |
|||
@ -261,7 +227,7 @@ |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> --> |
|||
|
|||
|
|||
|
|||
@ -292,10 +258,10 @@ |
|||
<view class="xname"> |
|||
Number |
|||
</view> |
|||
<u-number-box v-model="bettingNumber"></u-number-box> |
|||
<u-number-box v-model="bettingNumber" @input="tmoney()"></u-number-box> |
|||
</view> |
|||
<view class="TotalMoney xname"> |
|||
Total Contract Money is 50 |
|||
Total Contract Money is {{touzhuMoney}} |
|||
</view> |
|||
<view class="agree"> |
|||
<view class=""> |
|||
@ -306,7 +272,6 @@ |
|||
</view> |
|||
<span class="s1">I agree </span><span class="s2" @click="goRule">presale rule</span> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="btn_con flex"> |
|||
<view class="btn1 btn" @click="xiazhuCode=false"> |
|||
@ -316,9 +281,8 @@ |
|||
comfierm |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
<view class="tc" v-show="xiaSul==1"> |
|||
<!-- <view class="tc" v-show="xiaSul==1"> |
|||
<view class="title"> |
|||
connfirm |
|||
</view> |
|||
@ -328,9 +292,56 @@ |
|||
<view class="sul ok" @click="xiaSul=0"> |
|||
OK |
|||
</view> |
|||
</view> |
|||
<u-mask :show="xiazhuCode" :z-index="10"></u-mask> |
|||
</view> --> |
|||
<u-mask :show="xiazhuCode" :z-index="10" @click="xiazhuCode=false"></u-mask> |
|||
<u-mask :show="xiaSul==1" :z-index="10"></u-mask> |
|||
|
|||
|
|||
<!-- 客服信息 --> |
|||
<view class="flex"> |
|||
<view class="my-cont" @click="keCode=1"> |
|||
<image src="../../../static/home/[email protected]" mode=""></image> |
|||
</view> |
|||
<u-mask :z-index="10" :show="keCode==1"></u-mask> |
|||
<view class="tc" v-show="keCode==1"> |
|||
|
|||
<view class="title"> |
|||
<image src="../../../static/color/pop_icon_service@2x(1).png" mode="aspectFit" class="img1"></image> |
|||
<p>Customer Service</p> |
|||
</view> |
|||
<view class="tc_body"> |
|||
<view class="p1"> |
|||
{{serviceTime}} |
|||
</view> |
|||
|
|||
|
|||
<scroll-view class="item" style="height:380rpx" scroll-y="true" show-scrollbar="true" scroll-with-animation="true" scroll-top="0" > |
|||
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in whatAppList" |
|||
:key="item"> |
|||
<image src="../../../static/color/[email protected]" mode="aspectFit" class="img2"></image> |
|||
<view class="p2"> |
|||
{{getName(item)}} |
|||
</view> |
|||
</view> |
|||
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in teList" |
|||
:key="item"> |
|||
<image src="../../../static/color/pop_icon_teltgram.png" mode="" class="img2"></image> |
|||
<view class="p2"> |
|||
<span class="whatapp-name">{{getName(item)}}</span> |
|||
</view> |
|||
</view> |
|||
</scroll-view> |
|||
|
|||
</view> |
|||
|
|||
<image src="../../../static/color/pop_icon_close.png" mode="aspectFit" class="colseKefu" @click="keCode=0"></image> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
@ -347,7 +358,15 @@ |
|||
export default { |
|||
data() { |
|||
return { |
|||
|
|||
// 客服 |
|||
keCode:0, |
|||
teList:[], |
|||
whatAppList:[], |
|||
serviceTime:'', |
|||
|
|||
touzhuMoney:0, |
|||
currencySymbol:'', |
|||
currentBalance:'', |
|||
gameNavNum: 0, |
|||
xiaSul: 0, |
|||
gsxia: 0, |
|||
@ -443,7 +462,7 @@ |
|||
numindex: -1, |
|||
ganumArr: [], |
|||
gg: 3, |
|||
lotteryData: {}, |
|||
lotteryData: {}, |
|||
gameNav2: [{ |
|||
id: 1, |
|||
text: 'Chart Trending', |
|||
@ -456,49 +475,97 @@ |
|||
id: 3, |
|||
text: '' |
|||
}, |
|||
] |
|||
], |
|||
totalPage2:'', |
|||
lotteryNum:[], |
|||
lotteryNumResult:[0,0,0,0,0,0,0,0,0,0], |
|||
} |
|||
}, |
|||
|
|||
onLoad() { |
|||
|
|||
this.myName = uni.getStorageSync('MyInfo').nickname; |
|||
this.myImgUrl = uni.getStorageSync('MyInfo').headImgPath; |
|||
<<<<<<< HEAD |
|||
|
|||
|
|||
this.nextBtting(); |
|||
uni.request({ |
|||
url: '/start/api/lottery/lotteryClassList', |
|||
data: { |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
}, |
|||
header: { |
|||
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //自定义请求头信息 |
|||
}, |
|||
method: 'POST', //请求方式 或GET,必须为大写 |
|||
success: (res) => { |
|||
console.log(res.data.data, 888888888888) |
|||
this.colorList = res.data.data; |
|||
this.colorData=this.colorList[0]; |
|||
this.gameNav2[1].text=this.colorData.name+" record" |
|||
this.gameNav2[2].text='My '+this.colorData.name+" record" |
|||
}, |
|||
fail: (res) => { |
|||
console.log(res); |
|||
// 客服 |
|||
this.serviceTime = uni.getStorageSync('siteInfo').serviceTime; |
|||
const siteTelegram = uni.getStorageSync('siteInfo').siteTelegram; |
|||
|
|||
const siteWhatsapp = uni.getStorageSync('siteInfo').siteWhatsapp; |
|||
if (siteTelegram != undefined && siteTelegram != '') { |
|||
this.teList = siteTelegram.split(',') |
|||
console.log(1111111 + this.teList) |
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
======= |
|||
if (siteWhatsapp != undefined && siteWhatsapp != '') { |
|||
this.whatAppList = siteWhatsapp.split(',') |
|||
console.log(2222222 + this.whatAppList) |
|||
} |
|||
|
|||
|
|||
this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol; |
|||
this.currentBalance=uni.getStorageSync('currentBalance'); |
|||
this.myName = uni.getStorageSync('MyInfo').nickname; |
|||
this.myImgUrl = uni.getStorageSync('MyInfo').headImgPath; |
|||
|
|||
this.getLotteryClassList(); |
|||
//this.getBettingConfig(); |
|||
>>>>>>> 568bf6045ac1252bb15844d528ceabdb0f66ad2f |
|||
this.getBettingConfig(); |
|||
this.getLottertRecord(); |
|||
|
|||
|
|||
|
|||
// 获取整个往期记录 |
|||
const post = api.lotteryRecords({ |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
"classId": this.gg, |
|||
"pageNumber": 1, |
|||
"pageSize": 1277, |
|||
}) |
|||
post.then(res => { |
|||
this.lotteryNum = res.data.content; |
|||
console.log(this.lotteryNum,666666666666666666666) |
|||
for (var i = 0; i < this.lotteryNum.length; i++) { |
|||
if(!this.lotteryNum[i].lotteryResult){ |
|||
this.lotteryNumResult[0]=this.lotteryNumResult[0]+1; |
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==1){ |
|||
this.lotteryNumResult[1]=this.lotteryNumResult[1]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==2){ |
|||
this.lotteryNumResult[2]=this.lotteryNumResult[2]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==3){ |
|||
this.lotteryNumResult[3]=this.lotteryNumResult[3]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==4){ |
|||
this.lotteryNumResult[4]=this.lotteryNumResult[4]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==5){ |
|||
this.lotteryNumResult[5]=this.lotteryNumResult[5]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==6){ |
|||
this.lotteryNumResult[6]=this.lotteryNumResult[6]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==7){ |
|||
this.lotteryNumResult[7]=this.lotteryNumResult[7]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==8){ |
|||
this.lotteryNumResult[8]=this.lotteryNumResult[8]+1; |
|||
|
|||
} |
|||
if(this.lotteryNum[i].lotteryResult==9){ |
|||
this.lotteryNumResult[9]=this.lotteryNumResult[9]+1; |
|||
|
|||
} |
|||
} |
|||
console.log(this.lotteryNumResult) |
|||
}) |
|||
.catch(e => { |
|||
console.log(e) |
|||
}) |
|||
}, |
|||
onReachBottom() { |
|||
this.pageSize += 9; |
|||
@ -513,6 +580,46 @@ |
|||
|
|||
}, |
|||
methods: { |
|||
// 客服 |
|||
gotoWeb(gotoUrl) { |
|||
// #ifdef H5 |
|||
window.location.href = gotoUrl |
|||
// #endif |
|||
// #ifdef APP-PLUS |
|||
var networkType = '' |
|||
uni.getNetworkType({ |
|||
success: function(res) { |
|||
networkType = res.networkType |
|||
} |
|||
}); |
|||
if (networkType == 'none') { |
|||
uni.showToast({ |
|||
title: 'no Network', |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
} else { |
|||
var param = { |
|||
url: gotoUrl |
|||
} |
|||
uni.navigateTo({ |
|||
url: '/pages/menu/me/rechange/topay/index?' + qs.stringify(param) |
|||
}) |
|||
} |
|||
// #endif |
|||
}, |
|||
|
|||
getLink(item) { |
|||
return item.replace(item.split(':')[0] + ':', '') |
|||
}, |
|||
getName(item) { |
|||
// console.log(item,20000); |
|||
return item.split(':')[0] |
|||
}, |
|||
|
|||
tmoney(){ |
|||
this.touzhuMoney=this.bettingNumber*this.bettingPrice; |
|||
}, |
|||
getBettingConfig() { |
|||
const post = api.bettingConfig({ |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
@ -546,9 +653,17 @@ |
|||
|
|||
}, |
|||
timeChange(timestamp) { |
|||
console.log(timestamp) |
|||
// if(timestamp==0){ |
|||
// this.ganum+=1; |
|||
// this.gNum="G"+ Number(this.gNum.substring(1)+1) ; |
|||
// console.log(this.gNum,5555555555555) |
|||
// this.gaClick(this.ganum,this.gNum); |
|||
// } |
|||
// console.log(timestamp) |
|||
// console.log(123) |
|||
if (timestamp <= this.colorData.lottery) { |
|||
this.canBuy = false |
|||
this.xiazhuCode=false |
|||
} else { |
|||
this.canBuy = true |
|||
} |
|||
@ -588,6 +703,8 @@ |
|||
numColor(i, j) { |
|||
this.numindex = i; |
|||
this.bettingPrice = j; |
|||
this.touzhuMoney=j; |
|||
this.bettingNumber=1; |
|||
}, |
|||
nextBtting(gNum) { |
|||
const post = api.nextLotteryPeriod({ |
|||
@ -641,14 +758,38 @@ |
|||
"bettingNumber": this.bettingNumber, |
|||
}) |
|||
post.then(res => { |
|||
uni.showLoading({ |
|||
title:'loading' |
|||
}) |
|||
console.log(res.data) |
|||
if (res.data.success == true) { |
|||
this.xiaSul = 1; |
|||
if (res.success == true) { |
|||
// this.xiaSul = 1; |
|||
uni.showToast({ |
|||
title: 'Successful bet', |
|||
icon: 'success', |
|||
duration: 1500 |
|||
}) |
|||
//更新余额 |
|||
const post = api.withdrawConfig({ |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
}) |
|||
post.then(res => { |
|||
if(res.data){ |
|||
this.currentBalance=res.data.currentBalance; |
|||
uni.setStorage({ |
|||
key: 'currentBalance', |
|||
data: this.currentBalance, |
|||
success: function() { |
|||
console.log('success') |
|||
} |
|||
}); |
|||
} |
|||
|
|||
}) |
|||
|
|||
setTimeout(function(){ |
|||
location.reload(); |
|||
},2000) |
|||
} else { |
|||
uni.showToast({ |
|||
title: res.data.errMsg, |
|||
@ -679,7 +820,7 @@ |
|||
this.myGameRecord = res.data.content; |
|||
this.totalPage = res.data.totalElements; |
|||
for (var i = 0; i < this.myGameRecord.length; i++) { |
|||
this.myGameRecord[i].period = this.myGameRecord[i].period.substring(2, 13); |
|||
// this.myGameRecord[i].period = this.myGameRecord[i].period.substring(2, 13); |
|||
this.myGameRecord[i].addTime = index.formatyymmddhhmmss(this.myGameRecord[i] |
|||
.addTime); |
|||
} |
|||
@ -704,12 +845,17 @@ |
|||
} |
|||
this.gameRecordCont = res.data.content; |
|||
this.totalPage = res.data.totalElements; |
|||
this.totalPage2 = res.data.totalPages; |
|||
for (var i = 0; i < this.gameRecordCont.length; i++) { |
|||
this.gameRecordCont[i].period = this.gameRecordCont[i].period.substring(2, 13); |
|||
this.gameRecordCont[i].lotteryColor = this.gameRecordCont[i].lotteryColor.split( |
|||
','); |
|||
// this.gameRecordCont[i].period = this.gameRecordCont[i].period.substring(2, 13); |
|||
this.gameRecordCont[i].lotteryColor = this.gameRecordCont[i].lotteryColor.split(','); |
|||
if(!this.gameRecordCont[i].lotteryResult){ |
|||
this.gameRecordCont[i].lotteryResult=0 |
|||
} |
|||
|
|||
|
|||
} |
|||
// console.log(res.data,77777777777777) |
|||
|
|||
}) |
|||
.catch(e => { |
|||
console.log(e) |
|||
@ -718,8 +864,10 @@ |
|||
}, |
|||
|
|||
|
|||
gaClick(i, j) { |
|||
|
|||
|
|||
gaClick(i, j) { |
|||
console.log(j,8000000) |
|||
this.ganum = i |
|||
this.gNum = j; |
|||
this.colorData = this.colorList[i]; |
|||
@ -753,4 +901,4 @@ |
|||
|
|||
<style> |
|||
@import './index.css'; |
|||
</style> |
|||
</style> |
@ -3,28 +3,31 @@ |
|||
<view class="pro-head"> |
|||
promotion |
|||
<view class="pro-hea-rig"> |
|||
<image src="../../../static/promo/[email protected]" mode="aspectFit" class="img1" @click="goInviteRule()"></image> |
|||
<image src="../../../static/promo/[email protected]" mode="aspectFit" class="img2" @click="invMore=true,msShow=true"></image> |
|||
|
|||
<image src="../../../static/promo/[email protected]" mode="aspectFit" class="img1" |
|||
@click="goInviteRule()"></image> |
|||
<image src="../../../static/promo/[email protected]" mode="aspectFit" class="img2" |
|||
@click="invMore=true,msShow=true"></image> |
|||
|
|||
</view> |
|||
</view> |
|||
<view class="pro-body"> |
|||
<view class="pro-body-p1"> |
|||
bonus: <span class="category-sigh">{{currencySymbol}}</span><span class="s1">{{inviteRule.bonusCapital}}</span> |
|||
bonus: <span class="category-sigh">{{currencySymbol}}</span><span |
|||
class="s1">{{inviteRule.bonusCapital}}</span> |
|||
</view> |
|||
|
|||
|
|||
<view class="pro-body-btn1" @click="appl=true,msShow=true"> |
|||
Apply to balance |
|||
</view> |
|||
|
|||
|
|||
<view class="pro-body-lea"> |
|||
<view class="lea-item" v-for="(item,index) in proLeav" :key="item.id" @click=" leaIdChange(index)"> |
|||
<p :class="['p1', leaId==index?'on':'']">{{item.lea}}</p> |
|||
<p class="p2">{{item.lea2}}</p> |
|||
<p :class="['p1', leaId==index?'on':'']">{{item.lea}}</p> |
|||
<p class="p2">{{item.lea2}}</p> |
|||
<p class="p3">{{item.leanum}}</p> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
<view class="pro-body-code"> |
|||
<view class="code-item1"> |
|||
<p class="p1" ref="">My Promotion Code</p> |
|||
@ -34,51 +37,52 @@ |
|||
<p class="p1">My Promotion Link</p> |
|||
<p class="p2">{{copyText}}</p> |
|||
</view> |
|||
|
|||
|
|||
<view class="code-btn" @click="copyTextMethod()"> |
|||
Copy |
|||
</view> |
|||
|
|||
|
|||
|
|||
</view> |
|||
<cont></cont> |
|||
<cont></cont> |
|||
</view> |
|||
|
|||
|
|||
<view class="invite-more" v-show="invMore"> |
|||
<view class="invite-con"> |
|||
<view class="more-a" @click="goProRe"> |
|||
promotion record |
|||
</view> |
|||
<view class="more-a" @click="goBouns"> |
|||
bonus record |
|||
<view class="more-a" @click="goProRe"> |
|||
promotion record |
|||
</view> |
|||
<view class="more-a" @click="goBouns"> |
|||
bonus record |
|||
</view> |
|||
<view class="more-a" @click="applyRecord"> |
|||
apply record |
|||
</view> |
|||
</view> |
|||
<view class="more-a" @click="applyRecord"> |
|||
apply record |
|||
<view class="invite-con2"> |
|||
<view class="more-a" @click="invMore=false,msShow=false"> |
|||
cancel |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="invite-con2"> |
|||
<view class="more-a" @click="invMore=false,msShow=false"> |
|||
cancel |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
|
|||
|
|||
<view class="appl_Ba" v-show="appl"> |
|||
<view class="top"> |
|||
|
|||
|
|||
<view class="title"> |
|||
apply to balance |
|||
</view> |
|||
<view class="input"> |
|||
<input type="text" value="" placeholder="bonus" v-model="tranAmt" placeholder-style="color: #BFC2CCFF;font-size:28rpx;text-transform: capitalize"/> |
|||
</view> |
|||
<view class="all" @click="applyAll()"> |
|||
Apply all |
|||
</view> |
|||
|
|||
|
|||
<view class="title"> |
|||
apply to balance |
|||
</view> |
|||
<view class="input"> |
|||
<input type="text" value="" placeholder="bonus" v-model="tranAmt" |
|||
placeholder-style="color: #BFC2CCFF;font-size:28rpx;text-transform: capitalize" /> |
|||
</view> |
|||
|
|||
<view class="all" @click="applyAll()"> |
|||
Apply all |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="btn_con"> |
|||
<view class="btn1" @click="appl=false,msShow=false"> |
|||
cancel |
|||
@ -88,147 +92,127 @@ |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="msg-box-bg" v-show="msShow" @click="invMore=false,msShow=false,appl=false"> |
|||
<view class="msg-box-bg" v-show="msShow" @click="invMore=false,msShow=false,appl=false"> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
|
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import cont from "@/components/cont/cont.vue" |
|||
import api from '@/utils/api' |
|||
export default { |
|||
data() { |
|||
return { |
|||
currencySymbol:'', |
|||
leaId:0, |
|||
inviteRule:[], |
|||
tranAmt:'', |
|||
proLeav:[ |
|||
{ |
|||
id:0, |
|||
lea:'level1', |
|||
lea2:'Total people', |
|||
leanum:0 |
|||
}, |
|||
{ |
|||
id:1, |
|||
lea:'level2', |
|||
lea2:'Contribution', |
|||
leanum:0.00 |
|||
}, |
|||
], |
|||
copyText:'', |
|||
invMore:false, |
|||
appl:false, |
|||
msShow:false, |
|||
currencySymbol: '', |
|||
leaId: 0, |
|||
inviteRule: [], |
|||
tranAmt: '', |
|||
proLeav: [{ |
|||
id: 0, |
|||
lea: 'level1', |
|||
lea2: 'Total people', |
|||
leanum: 0 |
|||
}, |
|||
{ |
|||
id: 1, |
|||
lea: 'level2', |
|||
lea2: 'Contribution', |
|||
leanum: 0.00 |
|||
}, |
|||
], |
|||
copyText: '', |
|||
invMore: false, |
|||
appl: false, |
|||
msShow: false, |
|||
} |
|||
}, |
|||
onLoad() { |
|||
|
|||
this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol; |
|||
uni.request({ |
|||
url: '/start/api/user/inviteCode', |
|||
data: { |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
}, |
|||
header: { |
|||
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //自定义请求头信息 |
|||
}, |
|||
method: 'POST', //请求方式 或GET,必须为大写 |
|||
success: (res) => { |
|||
this.inviteRule=res.data.data |
|||
this.copyText=this.inviteRule.qrcodeUrl; |
|||
console.log(res.data,9999); |
|||
}, |
|||
fail: (res) => { |
|||
console.log(res.errMsg); |
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
const post = api.inviteCode({ |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
}) |
|||
post.then(res => { |
|||
this.inviteRule = res.data; |
|||
this.copyText = this.inviteRule.qrcodeUrl; |
|||
console.log(res.data, 9999); |
|||
}) |
|||
.catch(e => { |
|||
uni.showToast({ |
|||
title: e, |
|||
icon: 'none', |
|||
duration: 2500 |
|||
}) |
|||
}) |
|||
|
|||
}, |
|||
methods: { |
|||
goInviteRule(){ |
|||
goInviteRule() { |
|||
uni.navigateTo({ |
|||
url:'../rule/inviteRule/index' |
|||
url: '../rule/inviteRule/index' |
|||
}) |
|||
}, |
|||
applyAll(){ |
|||
this.tranAmt=this.inviteRule.bonusCapital; |
|||
applyAll() { |
|||
this.tranAmt = this.inviteRule.bonusCapital; |
|||
}, |
|||
bountOut(){ |
|||
uni.request({ |
|||
url: '/start/api/summary/bonusOut', |
|||
data: { |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
"tranAmt":this.tranAmt, |
|||
}, |
|||
header: { |
|||
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //自定义请求头信息 |
|||
}, |
|||
method: 'POST', //请求方式 或GET,必须为大写 |
|||
|
|||
success: (res) => { |
|||
if(res.data!=''){ |
|||
if(res.data.success==true){ |
|||
uni.showToast({ |
|||
title: 'Commission successfully transferred out to balance', |
|||
icon: 'success', |
|||
duration: 1500 |
|||
}) |
|||
}else{ |
|||
uni.showToast({ |
|||
title:res.data.errMsg , |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
} |
|||
} |
|||
|
|||
|
|||
}, |
|||
fail: (res) => { |
|||
uni.showToast({ |
|||
title:res.data.errMsg , |
|||
icon: 'none', |
|||
duration: 1500 |
|||
bountOut() { |
|||
const post = api.bonusOut({ |
|||
"ticket": uni.getStorageSync('logInfo').data, |
|||
"tranAmt": this.tranAmt, |
|||
}) |
|||
post.then(res => { |
|||
if (res != undefined) { |
|||
if (res.success == true) { |
|||
uni.showToast({ |
|||
title: 'Commission successfully transferred out to balance', |
|||
icon: 'success', |
|||
duration: 1500 |
|||
}) |
|||
} else { |
|||
uni.showToast({ |
|||
title: res.data.errMsg, |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
.catch(e => { |
|||
uni.showToast({ |
|||
title: e, |
|||
icon: 'none', |
|||
duration: 2500 |
|||
}) |
|||
}) |
|||
} |
|||
}); |
|||
|
|||
}, |
|||
goProRe(){ |
|||
goProRe() { |
|||
uni.reLaunch({ |
|||
url:'./promotionRecord/index' |
|||
url: './promotionRecord/index' |
|||
}) |
|||
}, |
|||
goBouns(){ |
|||
goBouns() { |
|||
uni.reLaunch({ |
|||
url:'./bounsRecord/index' |
|||
url: './bounsRecord/index' |
|||
}) |
|||
}, |
|||
applyRecord(){ |
|||
applyRecord() { |
|||
uni.reLaunch({ |
|||
url:'./applyRecord/index' |
|||
url: './applyRecord/index' |
|||
}) |
|||
}, |
|||
copyTextMethod(){ |
|||
|
|||
this.$copyText(this.copyText).then(res => { |
|||
uni.showToast({ |
|||
title: 'Copy succeeded', |
|||
icon: 'success' |
|||
}) |
|||
copyTextMethod() { |
|||
|
|||
this.$copyText(this.copyText).then(res => { |
|||
uni.showToast({ |
|||
title: 'Copy succeeded', |
|||
icon: 'success' |
|||
}) |
|||
}) |
|||
}, |
|||
leaIdChange(index){ |
|||
this.leaId=index; |
|||
} |
|||
leaIdChange(index) { |
|||
this.leaId = index; |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
Loading…
Reference in new issue