Browse Source

计算提交

master
fan 4 years ago
parent
commit
e8bafe2a96
  1. 2
      components/balance/balance.vue
  2. 281
      components/cont/cont.vue
  3. 298
      components/gamecont/gamecont.vue
  4. 9
      components/gamecont2/gamecont2.vue
  5. 2
      components/gamecont3/gamecont3.vue
  6. 126
      pages/login/index.vue
  7. 306
      pages/login/resetPassword/index.vue
  8. 397
      pages/menu/My/index.vue
  9. 98
      pages/menu/color/index.css
  10. 334
      pages/menu/color/index.vue
  11. 51
      pages/menu/index/index.vue
  12. 41
      pages/menu/promotion/applyRecord/index.vue
  13. 72
      pages/menu/promotion/bounsRecord/index.vue
  14. 286
      pages/menu/promotion/index.vue
  15. 58
      pages/menu/promotion/promotionRecord/index.vue
  16. 30
      pages/menu/recharge/index.css
  17. 231
      pages/menu/recharge/index.vue
  18. 38
      pages/menu/recharge/rechargeRule.vue
  19. 53
      pages/menu/recharge/record/index.vue
  20. 33
      pages/menu/rule/index.vue
  21. 36
      pages/menu/rule/inviteRule/index.vue
  22. 113
      pages/menu/withdrawl/index.vue
  23. 44
      pages/menu/withdrawl/transactions/index.vue
  24. 42
      pages/menu/withdrawl/withdrawlRecord/index.vue
  25. 118
      pages/register/index.vue
  26. 3
      utils/api.js
  27. 33
      utils/axios.js

2
components/balance/balance.vue

@ -6,7 +6,7 @@
</view> </view>
<view class="rq flex"> <view class="rq flex">
<view class="index-p1"> <view class="index-p1">
<span class="category-sigh">{{currencySymbol}}</span> <span>{{currentBalance}}</span> <span class="category-sigh">{{currencySymbol}} </span><span>{{currentBalance}}</span>
</view> </view>
<view class="index-a1" @click="sendMegToIndex"> <view class="index-a1" @click="sendMegToIndex">
Recharge Recharge

281
components/cont/cont.vue

@ -1,6 +1,5 @@
<template> <template>
<view class="flex"> <view class="flex">
<<<<<<< HEAD
<view class="my-cont" @click="keCode=1"> <view class="my-cont" @click="keCode=1">
<image src="../../static/home/[email protected]" mode=""></image> <image src="../../static/home/[email protected]" mode=""></image>
</view> </view>
@ -9,67 +8,58 @@
<view class="title"> <view class="title">
<image src="../../static/color/pop_icon_service@2x(1).png" mode="aspectFit" class="img1"></image> <image src="../../static/color/pop_icon_service@2x(1).png" mode="aspectFit" class="img1"></image>
<p>matis</p> <p>Customer Service</p>
=======
<view class="my-cont" @click="keCode=1">
<image src="../../static/home/[email protected]" mode=""></image>
>>>>>>> 568bf6045ac1252bb15844d528ceabdb0f66ad2f
</view> </view>
<!-- <u-mask :z-index="10" v-if="keCode!=1"></u-mask> --> <view class="tc_body">
<view class="tc" v-show="keCode==1"> <view class="p1">
{{serviceTime}}
<view class="title">
<image src="../../static/color/pop_icon_service@2x(1).png" mode="aspectFit" class="img1"></image>
<p>matis</p>
</view> </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-view class="item" style="height:380rpx" scroll-y="true" show-scrollbar="true" scroll-with-animation="true" scroll-top="0" >
scroll-with-animation="true" scroll-top="0"> <view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in whatAppList"
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in whatAppList" :key="item">
:key="item"> <image src="../../static/color/[email protected]" mode="aspectFit" class="img2"></image>
<image src="../../static/color/[email protected]" mode="aspectFit" class="img2"></image> <view class="p2">
<view class="p2"> {{getName(item)}}
{{getName(item)}}
</view>
</view> </view>
<view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in teList" :key="item"> </view>
<image src="../../static/color/pop_icon_teltgram.png" mode="" class="img2"></image> <view class="body_item" @click="gotoWeb(getLink(item))" v-for="(item,index) in teList"
<view class="p2"> :key="item">
<span class="whatapp-name">{{getName(item)}}</span> <image src="../../static/color/pop_icon_teltgram.png" mode="" class="img2"></image>
</view> <view class="p2">
<span class="whatapp-name">{{getName(item)}}</span>
</view> </view>
</scroll-view> </view>
</scroll-view>
</view>
<image src="../../static/color/pop_icon_close.png" mode="aspectFit" class="colseKefu" @click="keCode=0">
</image>
</view> </view>
<image src="../../static/color/pop_icon_close.png" mode="aspectFit" class="colseKefu" @click="keCode=0"></image>
</view> </view>
</view>
</template> </template>
<script> <script>
const COMPONENT_NAME = 'cont' const COMPONENT_NAME = 'cont'
export default { export default {
name: COMPONENT_NAME, name: COMPONENT_NAME,
// props:["teList","whatAppList"], // props:["teList","whatAppList"],
data() { data() {
return { return {
keCode: 0, keCode:0,
teList: [], teList:[],
whatAppList: [], whatAppList:[],
serviceTime:'',
} }
}, },
computed: { computed: {
}, },
mounted() { 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; const siteWhatsapp = uni.getStorageSync('siteInfo').siteWhatsapp;
if (siteTelegram != undefined && siteTelegram != '') { if (siteTelegram != undefined && siteTelegram != '') {
this.teList = siteTelegram.split(',') this.teList = siteTelegram.split(',')
@ -81,162 +71,145 @@
} }
}, },
methods: { methods: {
gotoWeb(gotoUrl) { gotoWeb(gotoUrl) {
// #ifdef H5 // #ifdef H5
window.location.href = gotoUrl window.location.href = gotoUrl
// #endif // #endif
// #ifdef APP-PLUS // #ifdef APP-PLUS
var networkType = '' var networkType = ''
uni.getNetworkType({ uni.getNetworkType({
success: function(res) { success: function(res) {
networkType = res.networkType 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 });
}, if (networkType == 'none') {
uni.showToast({
getLink(item) { title: 'no Network',
return item.replace(item.split(':')[0] + ':', '') icon: 'none',
}, duration: 1500
getName(item) { })
console.log(item, 20000); } else {
return item.split(':')[0] 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> </script>
<style> <style>
.item { .item{
margin-top: 60rpx; margin-top: 60rpx;
/* height: 380rpx; /* height: 380rpx;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; */ overflow-x: hidden; */
} }
.img2{
.img2 {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
} }
.p2{
.p2 {
font-size: 28rpx; font-size: 28rpx;
color: #303133FF; color: #303133FF;
margin-left: 20rpx; margin-left: 20rpx;
} }
.p1{
.p1 {
font-size: 28rpx; font-size: 28rpx;
color: #606266FF; color: #606266FF;
} }
.colseKefu{
.colseKefu {
position: absolute; position: absolute;
right: 36rpx; right: 36rpx;
top: 36rpx; top: 36rpx;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
} }
.img1{
.img1 {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
width: 108rpx; width: 108rpx;
height: 108rpx; height: 108rpx;
} }
.content{
.content { position: relative;
position: relative; }
} .title{
text-transform: capitalize;
.title { font-size: 28rpx;
text-transform: capitalize; color: #954DE3FF;
font-size: 28rpx; text-align: center;
color: #954DE3FF; }
text-align: center; .title p{
} margin-top: 18rpx;
}
.title p { .body_item{
margin-top: 18rpx; display: flex;
} align-items: center;
padding-bottom: 40rpx;
.body_item { }
display: flex; .body_item_info{
align-items: center; font-size: 28rpx;
padding-bottom: 40rpx; color: #606266;
} text-transform: capitalize;
margin-top: 28rpx;
.body_item_info { margin-bottom: 20rpx;
font-size: 28rpx; }
color: #606266; .tc{
text-transform: capitalize; width: 600rpx;
margin-top: 28rpx; background-color: #fff;
margin-bottom: 20rpx; border-radius: 24rpx;
} padding-top: 48rpx;
position: fixed;
.tc { top: 50%;
width: 600rpx; left: 50%;
background-color: #fff; transform: translate(-50%,-50%);
border-radius: 24rpx; z-index: 999;
padding-top: 48rpx; }
position: fixed; .tc_body{
top: 50%; padding: 48rpx 36rpx;
left: 50%; padding-bottom: 0rpx;
transform: translate(-50%, -50%); position: relative;
z-index: 999; }
} .tc_body::before{
content: '';
.tc_body { position: absolute;
padding: 48rpx 36rpx; top: 20rpx;
padding-bottom: 0rpx; left: 50%;
position: relative; transform: translateX(-50%);
} width: 100%;
height: 2rpx;
.tc_body::before { background-color: #EDEFF2FF;
content: ''; }
position: absolute; .my-cont{
top: 20rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
height: 2rpx;
background-color: #EDEFF2FF;
}
.my-cont {
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
position: fixed; position: fixed;
top: 75%; top: 75%;
right: 0; right: 0;
} }
.my-cont image{
.my-cont image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.flex{
.flex {
align-items: center; align-items: center;
} }
.flex .my-cont{
.flex .my-cont {
margin-left: auto; margin-left: auto;
} }
</style> </style>

298
components/gamecont/gamecont.vue

@ -46,308 +46,55 @@
frequency frequency
</view> </view>
<view class="num_con"> <view class="num_con">
<view class="num"> <view class="num" v-for="item,index in lotteryNumResult" :key="item">
6 {{item}}
</view>
<view class="num">
3
</view>
<view class="num">
26
</view>
<view class="num">
7
</view>
<view class="num">
19
</view>
<view class="num">
9
</view>
<view class="num">
8
</view>
<view class="num">
12
</view>
<view class="num">
1
</view>
<view class="num">
0
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="conttwo"> <view class="conttwo">
<view class="contone_item contone_item2"> <view class="contone_item contone_item2" v-for="item,index in gameRecordCont" :key="item.period">
<view class="miss"> <view class="miss">
20210602234 {{item.period}}
</view> </view>
<view class="num_con"> <view class="num_con">
<view class="num2">
6 <view class="num2" :style="[{backgroundColor:(item.lotteryResult==0?item.lotteryColor:'')},{color:(item.lotteryResult==0?white:'')}]">
</view>
<view class="num2">
3
</view>
<view class="num2">
26
</view>
<view class="num2">
7
</view>
<view class="num2">
19
</view>
<view class="num2">
9
</view>
<view class="num2">
8
</view>
<view class="num2">
12
</view>
<view class="num2">
1
</view>
<view class="num2">
0 0
</view> </view>
</view> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==1?item.lotteryColor:'')},{color:(item.lotteryResult==1?white:'')}]" >
</view>
<view class="contone_item contone_item2">
<view class="miss">
20210602233
</view>
<view class="num_con">
<view class="num2">
6
</view>
<view class="num2">
3
</view>
<view class="num2">
26
</view>
<view class="num2">
7
</view>
<view class="num2">
19
</view>
<view class="num2 green">
9
</view>
<view class="num2">
8
</view>
<view class="num2">
12
</view>
<view class="num2">
1 1
</view> </view>
<view class="num2"> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==2?item.lotteryColor:'')},{color:(item.lotteryResult==2?white:'')}]">
0 2
</view> </view>
</view> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==3?item.lotteryColor:'')},{color:(item.lotteryResult==3?white:'')}]">
</view>
<view class="contone_item contone_item2">
<view class="miss">
20210602232
</view>
<view class="num_con">
<view class="num2">
6
</view>
<view class="num2">
3 3
</view> </view>
<view class="num2"> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==4?item.lotteryColor:'')},{color:(item.lotteryResult==4?white:'')}]">
26 4
</view>
<view class="num2">
7
</view>
<view class="num2">
19
</view>
<view class="num2">
9
</view>
<view class="num2">
8
</view>
<view class="num2">
12
</view>
<view class="num2">
1
</view> </view>
<view class="num2"> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==5?item.lotteryColor:'')},{color:(item.lotteryResult==5?white:'')}]">
0 5
</view> </view>
</view> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==6?item.lotteryColor:'')},{color:(item.lotteryResult==6?white:'')}]">
</view>
<view class="contone_item contone_item2">
<view class="miss">
20210602231
</view>
<view class="num_con">
<view class="num2">
6 6
</view> </view>
<view class="num2"> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==7?item.lotteryColor:'')},{color:(item.lotteryResult==7?white:'')}]">
3
</view>
<view class="num2">
26
</view>
<view class="num2">
7 7
</view> </view>
<view class="num2"> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==8?item.lotteryColor:'')},{color:(item.lotteryResult==8?white:'')}]">
19
</view>
<view class="num2">
9
</view>
<view class="num2">
8 8
</view> </view>
<view class="num2"> <view class="num2" :style="[{backgroundColor:(item.lotteryResult==9?item.lotteryColor:'')},{color:(item.lotteryResult==9?white:'')}]">
12
</view>
<view class="num2">
1
</view>
<view class="num2">
0
</view>
</view>
</view>
<view class="contone_item contone_item2">
<view class="miss">
20210602230
</view>
<view class="num_con">
<view class="num2">
6
</view>
<view class="num2">
3
</view>
<view class="num2">
26
</view>
<view class="num2">
7
</view>
<view class="num2">
19
</view>
<view class="num2">
9 9
</view> </view>
<view class="num2">
8
</view>
<view class="num2">
12
</view>
<view class="num2">
1
</view>
<view class="num2">
0
</view>
</view>
</view> </view>
<view class="contone_item contone_item2">
<view class="miss">
20210602229
</view>
<view class="num_con">
<view class="num2 red">
6
</view>
<view class="num2">
3
</view>
<view class="num2">
26
</view>
<view class="num2">
7
</view>
<view class="num2">
19
</view>
<view class="num2">
9
</view>
<view class="num2">
8
</view>
<view class="num2">
12
</view>
<view class="num2">
1
</view>
<view class="num2">
0
</view>
</view>
</view>
<view class="contone_item contone_item2">
<view class="miss">
20210602228
</view>
<view class="num_con">
<view class="num2">
6
</view>
<view class="num2 bg_jb1">
3
</view>
<view class="num2">
26
</view>
<view class="num2">
7
</view>
<view class="num2">
19
</view>
<view class="num2">
9
</view>
<view class="num2">
8
</view>
<view class="num2">
12
</view>
<view class="num2">
1
</view>
<view class="num2 bg_jb1">
0
</view>
</view> </view>
</view> </view>
</view> </view>
<cont class="test"></cont>
<view class="morejia">
<p class="">More</p>
<image src="../../static/color/loading_icon_ins@3x(20).png" mode=""></image>
</view>
</view> </view>
@ -357,18 +104,19 @@
import cont from "../cont/cont.vue" import cont from "../cont/cont.vue"
const COMPONENT_NAME = 'gamecont' const COMPONENT_NAME = 'gamecont'
export default { export default {
props:["gameRecordCont","lotteryNumResult"],
name: COMPONENT_NAME, name: COMPONENT_NAME,
data() { data() {
return { return {
white:'white',
} }
}, },
computed: { computed: {
}, },
mounted() { mounted() {
}, },
methods: { methods: {
sendCond(){ sendCond(){
@ -403,6 +151,7 @@
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #303133; color: #303133;
margin:0 10rpx;
} }
.num_con{ .num_con{
width: 514rpx; width: 514rpx;
@ -412,6 +161,7 @@
} }
.miss{ .miss{
width: 236rpx; width: 236rpx;
overflow-x: scroll;
color: #606266; color: #606266;
font-size: 28rpx; font-size: 28rpx;
text-transform: capitalize; text-transform: capitalize;

9
components/gamecont2/gamecont2.vue

@ -17,7 +17,7 @@
<view class="cont2_body"> <view class="cont2_body">
<view class="bodycon flex" v-for="(item,index) in gameRecordCont"> <view class="bodycon flex" v-for="(item,index) in gameRecordCont">
<view class="body_item item"> <view class="body_item item one">
{{item.period}} {{item.period}}
</view> </view>
<view class="body_item item"> <view class="body_item item">
@ -33,7 +33,7 @@
</view> </view>
<cont class="test"></cont> <!-- <cont class="test"></cont> -->
<view class="morejia"> <view class="morejia">
<p class="">More</p> <p class="">More</p>
<image src="../../static/color/loading_icon_ins@3x(20).png" mode=""></image> <image src="../../static/color/loading_icon_ins@3x(20).png" mode=""></image>
@ -67,6 +67,11 @@
<style> <style>
.one{
overflow-x: scroll;
overflow-y: hidden;
}
.flex2{ .flex2{
display: flex; display: flex;
justify-content: center; justify-content: center;

2
components/gamecont3/gamecont3.vue

@ -101,7 +101,7 @@
</view> </view>
</view> </view>
<cont class="test"></cont> <!-- <cont class="test"></cont> -->
<view class="morejia"> <view class="morejia">
<p class="">More</p> <p class="">More</p>
<image src="../../static/color/loading_icon_ins@3x(20).png" mode=""></image> <image src="../../static/color/loading_icon_ins@3x(20).png" mode=""></image>

126
pages/login/index.vue

@ -86,33 +86,15 @@
this.logoUrl = this.siteInfoData.siteDomain + this.siteInfoData.siteLogo this.logoUrl = this.siteInfoData.siteDomain + this.siteInfoData.siteLogo
this.siteName = this.siteInfoData.siteName this.siteName = this.siteInfoData.siteName
// const ticket = this.$store.state.ticket // const ticket = this.$store.state.ticket
<<<<<<< HEAD
const ticket= uni.getStorageSync('logInfo').data; const ticket= uni.getStorageSync('logInfo').data;
console.log(ticket,7777777777777777777) console.log(ticket,7777777777777777777)
// if(ticket != undefined){ // if(ticket != ''){
// uni.reLaunch({ // uni.reLaunch({
// url: '../menu/index/index' // url: '../menu/index/index'
// }) // })
// }else{
// // location.reload()
// } // }
=======
const ticket = uni.getStorageSync('logInfo').data;
console.log(ticket, 7777777777777777777)
// if (ticket) {
// uni.reLaunch({
// url: '../menu/index/index'
// })
// } else {
// // location.reload()
// }
>>>>>>> 568bf6045ac1252bb15844d528ceabdb0f66ad2f
}, },
methods: { methods: {
btnControl() { btnControl() {
@ -172,65 +154,57 @@
} }
uni.request({
url: '/start/api/user/login',
data: {
"mobile": this.mobile,
'password': md5(this.password),
},
header: {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET
success: (res) => {
var that = this;
if (res.data.errCode == "SUCCESS") {
uni.setStorage({
key: 'logInfo',
data: res.data,
success: function() {
console.log('success')
}
});
uni.setStorage({
key: 'loginMobile',
data: this.mobile,
success: function() {
console.log('success', 8686668)
}
});
uni.showToast({
title: 'Successful login',
icon: 'success',
duration: 1500
})
setTimeout(function() {
uni.reLaunch({
url: '../menu/index/index'
})
}, 1500)
console.log(uni.getStorageSync('logInfo').data, 66666666666666666666)
} else {
uni.showToast({
title: res.data.errMsg,
icon: 'none',
duration: 2500
})
}
}, const post = api.login({
fail: (res) => { "mobile": this.mobile,
uni.showToast({ 'password': md5(this.password),
title: res.data.errMsg, })
icon: 'none', post.then(res => {
duration: 2500 var that = this;
if (res.errCode == "SUCCESS") {
uni.setStorage({
key: 'logInfo',
data: res,
success: function() {
console.log('success')
}
});
uni.setStorage({
key: 'loginMobile',
data: this.mobile,
success: function() {
console.log('success', 8686668)
}
});
uni.showToast({
title: 'Successful login',
icon: 'success',
duration: 1500
})
setTimeout(function() {
uni.reLaunch({
url: '../menu/index/index'
}) })
console.log(res.data); }, 1500)
} console.log(uni.getStorageSync('logInfo').data, 66666666666666666666)
}); } else {
uni.showToast({
title: res.errMsg,
icon: 'none',
duration: 2500
})
}
})
.catch(e => {
uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
} }

306
pages/login/resetPassword/index.vue

@ -10,7 +10,8 @@
<span class="quhao">+{{areacode}}</span> <span class="quhao">+{{areacode}}</span>
</view> </view>
<input type="text" value="" placeholder="mobile number" <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>
<view class="input-item flex"> <view class="input-item flex">
<view class="login-sigh login-sigh2 flex"> <view class="login-sigh login-sigh2 flex">
@ -27,23 +28,23 @@
</view> </view>
</view> </view>
<view class="input-item flex"> <view class="input-item flex">
<view class="login-sigh login-sigh2 flex"> <view class="login-sigh login-sigh2 flex">
<view class="imgcon"> <view class="imgcon">
<image src="../../../static/login/[email protected]" mode=""></image> <image src="../../../static/login/[email protected]" mode=""></image>
</view>
</view> </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> </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="input-item flex">
<view class="login-sigh login-sigh2 flex"> <view class="login-sigh login-sigh2 flex">
<view class="imgcon"> <view class="imgcon">
@ -54,7 +55,8 @@
placeholder-style="color: #BFC2CCFF;font-size:14px;text-transform: capitalize;" placeholder-style="color: #BFC2CCFF;font-size:14px;text-transform: capitalize;"
v-model="newPassword" /> v-model="newPassword" />
</view> </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 Continue
</button> </button>
@ -70,7 +72,7 @@
data() { data() {
return { return {
tips: 'OTP', tips: 'OTP',
seconds: 10, seconds: 10,
mark: 'sms_user_forget_password', mark: 'sms_user_forget_password',
mobile: '', mobile: '',
@ -79,7 +81,7 @@
infoCode: '', infoCode: '',
picCode: '', picCode: '',
areacode: '', areacode: '',
btnNum:0, btnNum: 0,
} }
}, },
@ -90,122 +92,114 @@
}, },
methods: { methods: {
btnControl(){ codeChange(text) {
this.btnNum=1; this.tips = text;
if(this.mobile==''){
this.btnNum=0;
}
}, },
btnControl() {
this.btnNum = 1;
if (this.mobile == '') {
this.btnNum = 0;
}
getCode() { },
if (this.picCode == '') { getCode() {
uni.showToast({ if (this.picCode == '') {
title: 'The graphic verification code is empty', uni.showToast({
icon: 'none', title: 'The graphic verification code is empty',
duration: 1500 icon: 'none',
}) duration: 1500
return; })
} return;
if (this.mobile == '') { }
uni.showToast({ if (this.mobile == '') {
title: 'Please input mobile phone number', uni.showToast({
icon: 'none', title: 'Please input mobile phone number',
duration: 1500 icon: 'none',
}) duration: 1500
return; })
} return;
var a = /^[0-9]{4,14}$/; }
if (!a.test(this.mobile)) { var a = /^[0-9]{9}$/;
uni.showToast({ if (!a.test(this.mobile)) {
title: 'Wrong format of mobile phone number', uni.showToast({
icon: 'none', title: 'Wrong format of mobile phone number',
duration: 1500 icon: 'none',
}) duration: 1500
return; })
} return;
if (this.$refs.uCode.canGetCode) { }
// if (this.$refs.uCode.canGetCode) {
uni.showLoading({ //
title: 'Getting captcha' uni.showLoading({
}) title: 'Getting captcha'
})
setTimeout(() => {
uni.hideLoading(); setTimeout(() => {
this.$refs.uCode.start(); uni.hideLoading();
}, 2000); this.$refs.uCode.start();
this.countryCode = uni.getStorageSync('siteInfo').countryCode }, 2000);
uni.request({ this.countryCode = uni.getStorageSync('siteInfo').countryCode
url: '/start/api/home/sendSmsCode', const post = api.sendSmsCode({
data: {
"mobile": this.mobile, "mobile": this.mobile,
"mark": this.mark, "mark": this.mark,
"countryCode": this.countryCode, "countryCode": this.countryCode,
"code": this.picCode "code": this.picCode
}, })
header: { post.then(res => {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // var that = this;
}, uni.showToast({
method: 'POST', // GET title: res.errMsg,
success: (res) => { icon: 'none',
uni.showToast({ duration: 2500
title: res.data.errMsg, })
icon: 'none',
duration: 2500
}) })
console.log(res.data); .catch(e => {
}, uni.showToast({
fail: (res) => { title: e,
uni.showToast({ icon: 'none',
title: res.data.errMsg, duration: 2500
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() { getPicCode() {
this.imgcodeUrl = "/start/api/home/imgCode?uuid=" + this.$u.guid(20); this.imgcodeUrl = "/start/api/home/imgCode?uuid=" + this.$u.guid(20);
console.log();
console.log(this.imgcodeUrl) console.log(this.imgcodeUrl)
}, },
resetPassword() { resetPassword() {
var a= /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,19}$/; var a = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{5,19}$/;
if(this.mobile==''){ if (this.mobile == '') {
uni.showToast({ uni.showToast({
title: 'Please input mobile phone number', title: 'Please input mobile phone number',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
return; return;
} }
var a= /^[0-9]{4,14}$/; var a = /^[0-9]{4,14}$/;
if(!a.test(this.mobile)){ if (!a.test(this.mobile)) {
uni.showToast({ uni.showToast({
title: 'Wrong format of mobile phone number', title: 'Wrong format of mobile phone number',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
return; return;
} }
if (this.infoCode == '') { if (this.infoCode == '') {
uni.showToast({ uni.showToast({
title: ' Please enter the SMS verification code', title: ' Please enter the SMS verification code',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
return; return;
} }
if (this.picCode == '') { if (this.picCode == '') {
uni.showToast({ uni.showToast({
title: ' Please enter the Graphic verification code', title: ' Please enter the Graphic verification code',
@ -214,7 +208,7 @@
}) })
return; return;
} }
if(!a.test(this.newPassword)){ if (!a.test(this.newPassword)) {
uni.showToast({ uni.showToast({
title: 'Incorrect password format,a password requires a combination of numbers and letters', title: 'Incorrect password format,a password requires a combination of numbers and letters',
icon: 'none', icon: 'none',
@ -222,48 +216,34 @@
}) })
return; return;
} }
const post = api.forgotPassword({
'mobile': this.mobile,
uni.request({ 'code': this.infoCode,
url: '/start/api/user/forgotPassword', 'newPassword': this.newPassword,
data: { })
// "ticket":uni.getStorageSync('logInfo').data, post.then(res => {
// "oldPassword": uni.getStorageSync('logInfo').password, if (res.errCode == 'SUCCESS') {
// "newPassword":this.nwePassword, uni.showToast({
// "confirmNewPassword": this.nwePassword title: 'Password modified successfully',
'mobile': this.mobile, icon: 'success',
'code': this.infoCode, duration: 1500
'newPassword': this.newPassword, })
}, } else {
header: { uni.showToast({
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // title: res.errMsg,
}, icon: '',
method: 'POST', // GET duration: 1500
success: (res) => { })
if(res.data.errCode=='SUCCESS'){ }
uni.showToast({ console.log(res.data);
title: 'Password modified successfully', })
icon: 'success', .catch(e => {
duration: 1500 uni.showToast({
}) title: e,
}else{ icon: 'none',
uni.showToast({ duration: 2500
title: res.data.errMsg, })
icon: '', })
duration: 1500
})
}
console.log(res.data);
},
fail: (res) => {
uni.showToast({
title: res.errMsg,
icon: '',
duration: 1500
})
}
});
} }
}, },
} }

397
pages/menu/My/index.vue

@ -4,8 +4,8 @@
<view class="my-info"> <view class="my-info">
<view class="my-a"> <view class="my-a">
<view class="my-img"> <view class="my-img">
<!-- <img :src=`http://openweathermap.org/img/w/${item.weather[0].icon}.png`> --> <!-- <img :src=`http://openweathermap.org/img/w/${item.weather[0].icon}.png`> -->
<image :src="'https://apitest.luck-work.com/'+MyInfo.headImgPath" mode=""></image> <image :src="'https://apitest.luck-work.com/'+MyInfo.headImgPath" mode=""></image>
</view> </view>
<view class="my-nameid"> <view class="my-nameid">
@ -17,84 +17,84 @@
</view> </view>
</view> </view>
</view> </view>
<view class="my-b"> <view class="my-b">
<view class="my-tel"> <view class="my-tel">
Mobile: +{{areaCode}} {{MyInfo.mobile}} Mobile: +{{areaCode}} {{MyInfo.mobile}}
</view> </view>
<view class="my-bal flex"> <view class="my-bal flex">
<view>Available Balance: {{currentBalance}}</view> <view>Available Balance: {{currentBalance}}</view>
<!-- <view class="my-ap"> <!-- <view class="my-ap">
A+ Plan A+ Plan
</view> --> </view> -->
</view>
</view> </view>
</view> <view class="my-c flex">
<view class="my-c flex"> <view class="my-btn1" @click="goRecharge()">
<view class="my-btn1" @click="goRecharge()"> recharge
recharge </view>
</view> <view class="my-btn2" @click="goWithdraw">
<view class="my-btn2" @click="goWithdraw"> Withdraw
Withdraw </view>
</view> </view>
</view>
</view> </view>
</view>
<view class="my-bg">
<view class="my-body">
<view class="my-body-item" v-for="(item,index) in myAList" :key="item.id" @click="go(index)">
{{item.text}}
</view>
</view>
<view class="my-body-out" @click="logout">
logout
</view>
<cont></cont>
</view>
<u-mask :show="transferCode==1" :z-index="888"></u-mask>
<view class="tc" v-show="transferCode==1">
<view class="title">
change name
</view> </view>
<view class="tc_body">
<view class="body_item "> <view class="my-bg">
<input type="text" value="" placeholder="New user name" <view class="my-body">
placeholder-style="color: #BFC2CC;font-size:14px;text-transform: capitalize;padding-left:24rpx" v-model="newName"/> <view class="my-body-item" v-for="(item,index) in myAList" :key="item.id" @click="go(index)">
{{item.text}}
</view>
</view>
<view class="my-body-out" @click="logout">
logout
</view> </view>
<cont></cont>
</view> </view>
<view class="anniu_con flex">
<view class="cancel" @click="transferCode=0"> <u-mask :show="transferCode==1" :z-index="888"></u-mask>
cancel <view class="tc" v-show="transferCode==1">
<view class="title">
change name
</view> </view>
<view class="cancel pupler" @click="changeName()"> <view class="tc_body">
confirm <view class="body_item ">
<input type="text" value="" placeholder="New user name"
placeholder-style="color: #BFC2CC;font-size:14px;text-transform: capitalize;padding-left:24rpx"
v-model="newName" />
</view>
</view>
<view class="anniu_con flex">
<view class="cancel" @click="transferCode=0">
cancel
</view>
<view class="cancel pupler" @click="changeName()">
confirm
</view>
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
import api from '@/utils/api' import api from '@/utils/api'
import utils from '@/utils' import utils from '@/utils'
import cont from "@/components/cont/cont.vue" import cont from "@/components/cont/cont.vue"
export default{ export default {
data(){ data() {
return{ return {
newName:'', newName: '',
MyInfo:{}, MyInfo: {},
transferCode:0, transferCode: 0,
currentBalance:'', currentBalance: '',
areaCode:'', areaCode: '',
androidUrl:'', androidUrl: '',
myAList:[ myAList: [{
{ id: '3',
id:'3', text: 'Change Nick Name'
text:'Change Nick Name'
}, },
// { // {
// id:'1', // id:'1',
@ -109,177 +109,178 @@
// text:'Address' // text:'Address'
// }, // },
{ {
id:'4', id: '4',
text:'Reset password' text: 'Reset password'
}, },
{ {
id:'5', id: '5',
text:'Android download' text: 'Android download'
}, },
], ],
}
},
onLoad() {
this.areaCode = uni.getStorageSync('siteInfo').areaCode;
this.androidUrl = uni.getStorageSync('siteInfo').androidUrl;
console.log(this.androidUrl,78)
this.currentBalance=uni.getStorageSync('currentBalance');
this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol;
uni.request({
url: '/start/api/user/userInfo',
data: {
"ticket": uni.getStorageSync('logInfo').data,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET
success: (res) => {
this.MyInfo=res.data.data;
console.log(this.MyInfo,9990);
uni.setStorage({
key: 'MyInfo',
data: res.data.data,
success: function() {
console.log('success')
}
});
console.log(res.data)
},
fail: (res) => {
console.log(res.data);
} }
});
}, },
methods:{
onLoad() {
go(i){ this.areaCode = uni.getStorageSync('siteInfo').areaCode;
if(i==0){ this.androidUrl = uni.getStorageSync('siteInfo').androidUrl;
this.transferCode=1 console.log(this.androidUrl, 78)
} this.currentBalance = uni.getStorageSync('currentBalance');
if(i==1){ this.currencySymbol = uni.getStorageSync('siteInfo').currencySymbol;
uni.reLaunch({
url:'../../login/resetPassword/index'
})
}
if(i==2){
console.log(this.androidUrl)
uni.navigateTo({
url:this.androidUrl
}) const post = api.userInfo({
} "ticket": uni.getStorageSync('logInfo').data,
},
changeName(){
uni.showLoading({
title:"loading"
}) })
if(this.newName==''){ post.then(res => {
this.MyInfo = res.data;
console.log(this.MyInfo, 9990);
uni.setStorage({
key: 'MyInfo',
data: res.data,
success: function() {
console.log('success')
}
});
console.log(res.data)
})
.catch(e => {
uni.showToast({ uni.showToast({
title: 'The new user name cannot be empty', title: e,
icon: 'none', icon: 'none',
duration: 1500 duration: 2500
}) })
return; })
}
uni.request({
url: '/start/api/user/updateNickname',
data: {
"ticket": uni.getStorageSync('logInfo').data,
"nickname":this.newName,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET
success: (res) => {
if(res.data.success==true){ },
methods: {
uni.showToast({
title: 'Modified successfully', go(i) {
icon: 'success', if (i == 0) {
duration: 1500 this.transferCode = 1
}) }
setTimeout(function(){ if (i == 1) {
location.reload(); uni.navigateTo({
},1000) url: '../../login/resetPassword/index'
}else{ })
uni.showToast({ }
title: 'Modification failed', if (i == 2) {
icon: 'none', console.log(this.androidUrl)
duration: 1500 uni.navigateTo({
}) url: this.androidUrl
} })
console.log(res.data,9990); }
}, },
fail: (res) => { changeName() {
uni.showLoading({
title: "loading"
})
if (this.newName == '') {
uni.showToast({ uni.showToast({
title: res.data.errMsg, title: 'The new user name cannot be empty',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
return;
}
const post = api.updateNickname({
"ticket": uni.getStorageSync('logInfo').data,
"nickname": this.newName,
})
post.then(res => {
if (res.success == true) {
uni.showToast({
title: 'Modified successfully',
icon: 'success',
duration: 1500
})
setTimeout(function() {
location.reload();
}, 1000)
} else {
uni.showToast({
title: 'Modification failed',
icon: 'none',
duration: 1500
})
} }
}); console.log(res.data, 9990);
})
.catch(e => {
uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
}, },
goRecharge(){ goRecharge() {
uni.reLaunch({ uni.reLaunch({
url:'../recharge/index' url: '../recharge/index'
}) })
}, },
goWithdraw(){ goWithdraw() {
uni.navigateTo({ uni.navigateTo({
url:'../withdrawl/index' url: '../withdrawl/index'
}) })
}, },
logout(){ logout() {
const param = { const param = {
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
} }
const post = api.loginOut(param) const post = api.loginOut(param)
post.then(res => { post.then(res => {
uni.showLoading({ uni.showLoading({
title:'loading' title: 'loading'
}) })
if(res.data.success==true){ if (res.data.success == true) {
uni.showToast({ uni.showToast({
title: 'Log out successfully', title: 'Log out successfully',
icon: 'success', icon: 'success',
duration: 1500 duration: 1500
}) })
uni.removeStorageSync('logInfo'); uni.removeStorageSync('logInfo');
uni.removeStorageSync('ticket') uni.removeStorageSync('ticket')
setTimeout(function(){ setTimeout(function() {
uni.reLaunch({ uni.reLaunch({
url:'../../login/index' url: '../../login/index'
}) })
},2000) }, 2000)
}else{ } else {
uni.showToast({ uni.showToast({
title: 'Exit failed', title: 'Exit failed',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
} }
console.log(res.data,9990); console.log(res.data, 9990);
}) })
.catch(e => { .catch(e => {
console.log(e) console.log(e)
}) })
} }
}, },
} }
</script> </script>
<style> <style>
@import './index.css'; @import './index.css';
</style> </style>

98
pages/menu/color/index.css

@ -2,6 +2,104 @@
.content{ .content{
position: relative; position: relative;
} }
.item{
margin-top: 60rpx;
/* height: 380rpx;
overflow-y: scroll;
overflow-x: hidden; */
}
.img2{
width: 60rpx;
height: 60rpx;
}
.p2{
font-size: 28rpx;
color: #303133FF;
margin-left: 20rpx;
}
.p1{
font-size: 28rpx;
color: #606266FF;
}
.colseKefu{
position: absolute;
right: 36rpx;
top: 36rpx;
width: 36rpx;
height: 36rpx;
}
.img1{
display: block;
margin: 0 auto;
width: 108rpx;
height: 108rpx;
}
.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{
width: 100%;
height: 100%;
}
.flex{
align-items: center;
}
.flex .my-cont{
margin-left: auto;
}
.rules-btn{ .rules-btn{
font-size: 24rpx; font-size: 24rpx;
color: #FFFFFF; color: #FFFFFF;

334
pages/menu/color/index.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="content"> <view class="content">
<navigation>color</navigation> <navigation>color</navigation>
<balance @send="getSonValue"> <balance @send="getSonValue" :currencySymbol="currencySymbol" :currentBalance="currentBalance">
<view class="rules-btn" slot="rules" @click="goRule()">rules</view> <view class="rules-btn" slot="rules" @click="goRule()">rules</view>
</balance> </balance>
<view class="bg_white"> <view class="bg_white">
@ -11,8 +11,6 @@
{{item.name}} {{item.name}}
</view> </view>
</view> </view>
<view class="gameContent"> <view class="gameContent">
<view class="perCon"> <view class="perCon">
<view class="perCoun flex"> <view class="perCoun flex">
@ -36,32 +34,26 @@
</view> </view>
</view> </view>
</view> </view>
<view v-show="canBuy"> <view v-show="canBuy">
<view class="flex icon-con"> <view class="flex icon-con">
<view class="ico" @click="xiazhu(item.color)" v-for="item,index in gameColor" :key="item.id"> <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> <image :src="'../../../static/color/ico_apple_'+item.color+'@3x.png'" mode=""></image>
</view> </view>
</view> </view>
<view class="multiple"> <view class="multiple">
<view class="multiple-con flex"> <view class="multiple-con flex">
<view class="mul-item" v-for="(item,index) in gameColorNumber1" :key="item.num" <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}} {{item.num}}
</view> </view>
</view> </view>
<view class="multiple-con flex"> <view class="multiple-con flex">
<view class="mul-item" ref="mulitem" v-for="(item,index) in gameColorNumber2" <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}} {{item.num}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="canBuy" v-show="!canBuy"> <view class="canBuy" v-show="!canBuy">
<view class="flex icon-con"> <view class="flex icon-con">
@ -69,8 +61,6 @@
<image :src="'../../../static/color/ash_'+item.color+'@3x.png'" mode=""></image> <image :src="'../../../static/color/ash_'+item.color+'@3x.png'" mode=""></image>
</view> </view>
</view> </view>
<view class="multiple"> <view class="multiple">
<view class="multiple-con flex"> <view class="multiple-con flex">
<view class="mul-item bg_ash" v-for="(item,index) in gameColorNumber1" :key="item.num"> <view class="mul-item bg_ash" v-for="(item,index) in gameColorNumber1" :key="item.num">
@ -84,13 +74,8 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="donna flex">
<view class="donna flex">
<view class="flex info"> <view class="flex info">
<view class="imgcon"> <view class="imgcon">
<image :src="'https://apitest.luck-work.com/'+myImgUrl" mode="aspectFit"></image> <image :src="'https://apitest.luck-work.com/'+myImgUrl" mode="aspectFit"></image>
@ -109,39 +94,20 @@
<view class="follow" @click="follow_xiazhu_conOn=1"> <view class="follow" @click="follow_xiazhu_conOn=1">
Follow Follow
</view> </view>
</view> </view> -->
</view> </view>
<view class="gameNav"> <view class="gameNav">
<view class="gameNav-item " v-for="item,index in gameNav2" :class="index==gameNavNum?'active':''" <view class="gameNav-item " v-for="item,index in gameNav2" :class="index==gameNavNum?'active':''"
:key="item.id" @click="gameNavMe(index)"> :key="item.id" @click="gameNavMe(index)">
{{item.text}} {{item.text}}
</view> </view>
</view> </view>
<gamecont v-if="gameNavNum==0" :gameRecordCont="gameRecordCont" :lotteryNumResult="lotteryNumResult"></gamecont>
<gamecont v-if="gameNavNum==0"></gamecont>
<gamecont2 :gameRecordCont="gameRecordCont" v-if="gameNavNum==1"></gamecont2> <gamecont2 :gameRecordCont="gameRecordCont" v-if="gameNavNum==1"></gamecont2>
<gamecont3 :myGameRecord="myGameRecord" v-if="gameNavNum==2"></gamecont3> <gamecont3 :myGameRecord="myGameRecord" v-if="gameNavNum==2"></gamecont3>
</view> </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="follow_xiazhu_con" v-show="follow_xiazhu_conOn==1">
<view class="xia_head"> <view class="xia_head">
<view class="tiao" @click="follow_xiazhu_conOn=0"> <view class="tiao" @click="follow_xiazhu_conOn=0">
</view> </view>
@ -261,7 +227,7 @@
</view> </view>
</view> </view>
</view> </view> -->
@ -292,10 +258,10 @@
<view class="xname"> <view class="xname">
Number Number
</view> </view>
<u-number-box v-model="bettingNumber"></u-number-box> <u-number-box v-model="bettingNumber" @input="tmoney()"></u-number-box>
</view> </view>
<view class="TotalMoney xname"> <view class="TotalMoney xname">
Total Contract Money is 50 Total Contract Money is {{touzhuMoney}}
</view> </view>
<view class="agree"> <view class="agree">
<view class=""> <view class="">
@ -306,7 +272,6 @@
</view> </view>
<span class="s1">I agree </span><span class="s2" @click="goRule">presale rule</span> <span class="s1">I agree </span><span class="s2" @click="goRule">presale rule</span>
</view> </view>
</view> </view>
<view class="btn_con flex"> <view class="btn_con flex">
<view class="btn1 btn" @click="xiazhuCode=false"> <view class="btn1 btn" @click="xiazhuCode=false">
@ -316,9 +281,8 @@
comfierm comfierm
</view> </view>
</view> </view>
</view> </view>
<view class="tc" v-show="xiaSul==1"> <!-- <view class="tc" v-show="xiaSul==1">
<view class="title"> <view class="title">
connfirm connfirm
</view> </view>
@ -328,9 +292,56 @@
<view class="sul ok" @click="xiaSul=0"> <view class="sul ok" @click="xiaSul=0">
OK OK
</view> </view>
</view> </view> -->
<u-mask :show="xiazhuCode" :z-index="10"></u-mask> <u-mask :show="xiazhuCode" :z-index="10" @click="xiazhuCode=false"></u-mask>
<u-mask :show="xiaSul==1" :z-index="10"></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> </view>
</template> </template>
@ -347,7 +358,15 @@
export default { export default {
data() { data() {
return { return {
//
keCode:0,
teList:[],
whatAppList:[],
serviceTime:'',
touzhuMoney:0,
currencySymbol:'',
currentBalance:'',
gameNavNum: 0, gameNavNum: 0,
xiaSul: 0, xiaSul: 0,
gsxia: 0, gsxia: 0,
@ -443,7 +462,7 @@
numindex: -1, numindex: -1,
ganumArr: [], ganumArr: [],
gg: 3, gg: 3,
lotteryData: {}, lotteryData: {},
gameNav2: [{ gameNav2: [{
id: 1, id: 1,
text: 'Chart Trending', text: 'Chart Trending',
@ -456,49 +475,97 @@
id: 3, id: 3,
text: '' text: ''
}, },
] ],
totalPage2:'',
lotteryNum:[],
lotteryNumResult:[0,0,0,0,0,0,0,0,0,0],
} }
}, },
onLoad() { onLoad() {
this.myName = uni.getStorageSync('MyInfo').nickname;
this.myImgUrl = uni.getStorageSync('MyInfo').headImgPath;
<<<<<<< HEAD
this.nextBtting(); //
uni.request({ this.serviceTime = uni.getStorageSync('siteInfo').serviceTime;
url: '/start/api/lottery/lotteryClassList', const siteTelegram = uni.getStorageSync('siteInfo').siteTelegram;
data: {
"ticket": uni.getStorageSync('logInfo').data, const siteWhatsapp = uni.getStorageSync('siteInfo').siteWhatsapp;
}, if (siteTelegram != undefined && siteTelegram != '') {
header: { this.teList = siteTelegram.split(',')
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // console.log(1111111 + this.teList)
},
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);
} }
}); 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.getLotteryClassList();
//this.getBettingConfig(); this.getBettingConfig();
>>>>>>> 568bf6045ac1252bb15844d528ceabdb0f66ad2f
this.getLottertRecord(); 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() { onReachBottom() {
this.pageSize += 9; this.pageSize += 9;
@ -513,6 +580,46 @@
}, },
methods: { 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() { getBettingConfig() {
const post = api.bettingConfig({ const post = api.bettingConfig({
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
@ -546,9 +653,17 @@
}, },
timeChange(timestamp) { 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) { if (timestamp <= this.colorData.lottery) {
this.canBuy = false this.canBuy = false
this.xiazhuCode=false
} else { } else {
this.canBuy = true this.canBuy = true
} }
@ -588,6 +703,8 @@
numColor(i, j) { numColor(i, j) {
this.numindex = i; this.numindex = i;
this.bettingPrice = j; this.bettingPrice = j;
this.touzhuMoney=j;
this.bettingNumber=1;
}, },
nextBtting(gNum) { nextBtting(gNum) {
const post = api.nextLotteryPeriod({ const post = api.nextLotteryPeriod({
@ -641,14 +758,38 @@
"bettingNumber": this.bettingNumber, "bettingNumber": this.bettingNumber,
}) })
post.then(res => { post.then(res => {
uni.showLoading({
title:'loading'
})
console.log(res.data) console.log(res.data)
if (res.data.success == true) { if (res.success == true) {
this.xiaSul = 1; // this.xiaSul = 1;
uni.showToast({ uni.showToast({
title: 'Successful bet', title: 'Successful bet',
icon: 'success', icon: 'success',
duration: 1500 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 { } else {
uni.showToast({ uni.showToast({
title: res.data.errMsg, title: res.data.errMsg,
@ -679,7 +820,7 @@
this.myGameRecord = res.data.content; this.myGameRecord = res.data.content;
this.totalPage = res.data.totalElements; this.totalPage = res.data.totalElements;
for (var i = 0; i < this.myGameRecord.length; i++) { 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] this.myGameRecord[i].addTime = index.formatyymmddhhmmss(this.myGameRecord[i]
.addTime); .addTime);
} }
@ -704,12 +845,17 @@
} }
this.gameRecordCont = res.data.content; this.gameRecordCont = res.data.content;
this.totalPage = res.data.totalElements; this.totalPage = res.data.totalElements;
this.totalPage2 = res.data.totalPages;
for (var i = 0; i < this.gameRecordCont.length; i++) { for (var i = 0; i < this.gameRecordCont.length; i++) {
this.gameRecordCont[i].period = this.gameRecordCont[i].period.substring(2, 13); // this.gameRecordCont[i].period = this.gameRecordCont[i].period.substring(2, 13);
this.gameRecordCont[i].lotteryColor = this.gameRecordCont[i].lotteryColor.split( 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 => { .catch(e => {
console.log(e) console.log(e)
@ -718,8 +864,10 @@
}, },
gaClick(i, j) {
gaClick(i, j) {
console.log(j,8000000)
this.ganum = i this.ganum = i
this.gNum = j; this.gNum = j;
this.colorData = this.colorList[i]; this.colorData = this.colorList[i];
@ -753,4 +901,4 @@
<style> <style>
@import './index.css'; @import './index.css';
</style> </style>

51
pages/menu/index/index.vue

@ -17,6 +17,7 @@
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import balance from "@/components/balance/balance.vue" import balance from "@/components/balance/balance.vue"
import api from '@/utils/api'
export default { export default {
data() { data() {
return { return {
@ -26,17 +27,12 @@
}, },
onLoad() { onLoad() {
this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol; this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol;
uni.request({ const post = api.withdrawConfig({
url: '/start/api/withdraw/withdrawConfig', "ticket": uni.getStorageSync('logInfo').data,
data: { })
"ticket": uni.getStorageSync('logInfo').data, post.then(res => {
}, if(res.data!=undefined){
header: { this.currentBalance=res.data.currentBalance;
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET
success: (res) => {
this.currentBalance=res.data.data.currentBalance;
uni.setStorage({ uni.setStorage({
key: 'currentBalance', key: 'currentBalance',
data: this.currentBalance, data: this.currentBalance,
@ -44,11 +40,36 @@
console.log('success') console.log('success')
} }
}); });
},
fail: (res) => {
console.log(res.data);
} }
});
})
.catch(e => {
console.log(e)
})
const post2 = api.userInfo({
"ticket": uni.getStorageSync('logInfo').data,
})
post2.then(res => {
uni.setStorage({
key: 'MyInfo',
data: res.data,
success: function() {
console.log('success')
}
});
console.log(res.data)
})
.catch(e => {
uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
}, },
methods: { methods: {
getSonValue(){ getSonValue(){

41
pages/menu/promotion/applyRecord/index.vue

@ -69,35 +69,34 @@
this.level=i+1; this.level=i+1;
this.getBounsRecord(); this.getBounsRecord();
}, },
getBounsRecord(){ getBounsRecord(){
uni.request({ const post = api.bonusOutRecords({
url: '/start/api/summary/bonusOutRecords', "ticket": uni.getStorageSync('logInfo').data,
data: { "level":this.level,
"ticket": uni.getStorageSync('logInfo').data, "pageNumber": 1,
"pageNumber": 1, "pageSize": this.pageSize,
"pageSize": 20, })
}, post.then(res => {
header: { this.totalElements=res.data.totalElements;
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // if(res.data.content){
}, this.promotionRecord=res.data.content;
method: 'POST', // GET
success: (res) => {
if(res.data.data.content!=''){
this.promotionRecord=res.data.data.content;
for(var i=0;i<this.promotionRecord.length;i++){ for(var i=0;i<this.promotionRecord.length;i++){
this.promotionRecord[i].addTime=index.formatyymmddhhmmss(this.promotionRecord[i].addTime); this.promotionRecord[i].addTime=index.formatyymmddhhmmss(this.promotionRecord[i].addTime);
this.promotionRecord[i].orderNo = this.promotionRecord[i].orderNo.substring(13, 20);
} }
this.test=this.promotionRecord.length; this.test=this.promotionRecord.length;
console.log(res.data) console.log(res.data)
}else{ }else{
console.log(123123) console.log(123123)
} }
}, })
fail: (res) => { .catch(e => {
console.log(res.data); uni.showToast({
} title: e,
}); icon: 'none',
duration: 2500
})
})
} }
}, },
} }

72
pages/menu/promotion/bounsRecord/index.vue

@ -100,35 +100,49 @@
this.getBounsRecord(); this.getBounsRecord();
}, },
getBounsRecord(){ getBounsRecord(){
uni.request({
url: '/start/api/summary/bonusRecords',
data: {
"ticket": uni.getStorageSync('logInfo').data,
"level":this.level,
"pageNumber": 1,
"pageSize": this.pageSize,
},
header: { const post = api.bonusRecords({
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // "ticket": uni.getStorageSync('logInfo').data,
}, "level":this.level,
method: 'POST', // GET "pageNumber": 1,
success: (res) => { "pageSize": this.pageSize,
this.totalElements=res.data.data.totalElements; })
if(res.data.data.content!=''){ post.then(res => {
this.promotionRecord=res.data.data.content; this.totalElements=res.data.totalElements;
for(var i=0;i<this.promotionRecord.length;i++){ if(res.data.content){
this.promotionRecord[i].addTime=index.formatyymmddhhmmss(this.promotionRecord[i].addTime); this.promotionRecord=res.data.content;
} for(var i=0;i<this.promotionRecord.length;i++){
this.test=this.promotionRecord.length; this.promotionRecord[i].addTime=index.formatyymmddhhmmss(this.promotionRecord[i].addTime);
console.log(res.data) }
}else{ this.test=this.promotionRecord.length;
console.log(123123) console.log(res.data)
} }else{
}, console.log(123123)
fail: (res) => { }
console.log(res.data); })
} .catch(e => {
}); uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
} }
}, },
} }

286
pages/menu/promotion/index.vue

@ -3,28 +3,31 @@
<view class="pro-head"> <view class="pro-head">
promotion promotion
<view class="pro-hea-rig"> <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="img1"
<image src="../../../static/promo/[email protected]" mode="aspectFit" class="img2" @click="invMore=true,msShow=true"></image> @click="goInviteRule()"></image>
<image src="../../../static/promo/[email protected]" mode="aspectFit" class="img2"
@click="invMore=true,msShow=true"></image>
</view> </view>
</view> </view>
<view class="pro-body"> <view class="pro-body">
<view class="pro-body-p1"> <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>
<view class="pro-body-btn1" @click="appl=true,msShow=true"> <view class="pro-body-btn1" @click="appl=true,msShow=true">
Apply to balance Apply to balance
</view> </view>
<view class="pro-body-lea"> <view class="pro-body-lea">
<view class="lea-item" v-for="(item,index) in proLeav" :key="item.id" @click=" leaIdChange(index)"> <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="['p1', leaId==index?'on':'']">{{item.lea}}</p>
<p class="p2">{{item.lea2}}</p> <p class="p2">{{item.lea2}}</p>
<p class="p3">{{item.leanum}}</p> <p class="p3">{{item.leanum}}</p>
</view> </view>
</view> </view>
<view class="pro-body-code"> <view class="pro-body-code">
<view class="code-item1"> <view class="code-item1">
<p class="p1" ref="">My Promotion Code</p> <p class="p1" ref="">My Promotion Code</p>
@ -34,51 +37,52 @@
<p class="p1">My Promotion Link</p> <p class="p1">My Promotion Link</p>
<p class="p2">{{copyText}}</p> <p class="p2">{{copyText}}</p>
</view> </view>
<view class="code-btn" @click="copyTextMethod()"> <view class="code-btn" @click="copyTextMethod()">
Copy Copy
</view> </view>
</view> </view>
<cont></cont> <cont></cont>
</view> </view>
<view class="invite-more" v-show="invMore"> <view class="invite-more" v-show="invMore">
<view class="invite-con"> <view class="invite-con">
<view class="more-a" @click="goProRe"> <view class="more-a" @click="goProRe">
promotion record promotion record
</view> </view>
<view class="more-a" @click="goBouns"> <view class="more-a" @click="goBouns">
bonus record bonus record
</view>
<view class="more-a" @click="applyRecord">
apply record
</view>
</view> </view>
<view class="more-a" @click="applyRecord"> <view class="invite-con2">
apply record <view class="more-a" @click="invMore=false,msShow=false">
cancel
</view>
</view> </view>
</view>
<view class="invite-con2">
<view class="more-a" @click="invMore=false,msShow=false">
cancel
</view>
</view>
</view> </view>
<view class="appl_Ba" v-show="appl"> <view class="appl_Ba" v-show="appl">
<view class="top"> <view class="top">
<view class="title"> <view class="title">
apply to balance apply to balance
</view> </view>
<view class="input"> <view class="input">
<input type="text" value="" placeholder="bonus" v-model="tranAmt" placeholder-style="color: #BFC2CCFF;font-size:28rpx;text-transform: capitalize"/> <input type="text" value="" placeholder="bonus" v-model="tranAmt"
</view> placeholder-style="color: #BFC2CCFF;font-size:28rpx;text-transform: capitalize" />
<view class="all" @click="applyAll()">
Apply all
</view>
</view> </view>
<view class="all" @click="applyAll()">
Apply all
</view>
</view>
<view class="btn_con"> <view class="btn_con">
<view class="btn1" @click="appl=false,msShow=false"> <view class="btn1" @click="appl=false,msShow=false">
cancel cancel
@ -88,147 +92,127 @@
</view> </view>
</view> </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>
</view> </view>
</template> </template>
<script> <script>
import cont from "@/components/cont/cont.vue" import cont from "@/components/cont/cont.vue"
import api from '@/utils/api'
export default { export default {
data() { data() {
return { return {
currencySymbol:'', currencySymbol: '',
leaId:0, leaId: 0,
inviteRule:[], inviteRule: [],
tranAmt:'', tranAmt: '',
proLeav:[ proLeav: [{
{ id: 0,
id:0, lea: 'level1',
lea:'level1', lea2: 'Total people',
lea2:'Total people', leanum: 0
leanum:0 },
}, {
{ id: 1,
id:1, lea: 'level2',
lea:'level2', lea2: 'Contribution',
lea2:'Contribution', leanum: 0.00
leanum:0.00 },
}, ],
], copyText: '',
copyText:'', invMore: false,
invMore:false, appl: false,
appl:false, msShow: false,
msShow:false,
} }
}, },
onLoad() { onLoad() {
const post = api.inviteCode({
this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol; "ticket": uni.getStorageSync('logInfo').data,
uni.request({ })
url: '/start/api/user/inviteCode', post.then(res => {
data: { this.inviteRule = res.data;
"ticket": uni.getStorageSync('logInfo').data, this.copyText = this.inviteRule.qrcodeUrl;
}, console.log(res.data, 9999);
header: { })
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // .catch(e => {
}, uni.showToast({
method: 'POST', // GET title: e,
success: (res) => { icon: 'none',
this.inviteRule=res.data.data duration: 2500
this.copyText=this.inviteRule.qrcodeUrl; })
console.log(res.data,9999); })
},
fail: (res) => {
console.log(res.errMsg);
}
});
}, },
methods: { methods: {
goInviteRule(){ goInviteRule() {
uni.navigateTo({ uni.navigateTo({
url:'../rule/inviteRule/index' url: '../rule/inviteRule/index'
}) })
}, },
applyAll(){ applyAll() {
this.tranAmt=this.inviteRule.bonusCapital; this.tranAmt = this.inviteRule.bonusCapital;
}, },
bountOut(){ bountOut() {
uni.request({ const post = api.bonusOut({
url: '/start/api/summary/bonusOut', "ticket": uni.getStorageSync('logInfo').data,
data: { "tranAmt": this.tranAmt,
"ticket": uni.getStorageSync('logInfo').data, })
"tranAmt":this.tranAmt, post.then(res => {
}, if (res != undefined) {
header: { if (res.success == true) {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // uni.showToast({
}, title: 'Commission successfully transferred out to balance',
method: 'POST', // GET icon: 'success',
duration: 1500
success: (res) => { })
if(res.data!=''){ } else {
if(res.data.success==true){ uni.showToast({
uni.showToast({ title: res.data.errMsg,
title: 'Commission successfully transferred out to balance', icon: 'none',
icon: 'success', duration: 1500
duration: 1500 })
}) }
}else{ }
uni.showToast({ })
title:res.data.errMsg , .catch(e => {
icon: 'none', uni.showToast({
duration: 1500 title: e,
}) icon: 'none',
} duration: 2500
} })
},
fail: (res) => {
uni.showToast({
title:res.data.errMsg ,
icon: 'none',
duration: 1500
}) })
}
});
}, },
goProRe(){ goProRe() {
uni.reLaunch({ uni.reLaunch({
url:'./promotionRecord/index' url: './promotionRecord/index'
}) })
}, },
goBouns(){ goBouns() {
uni.reLaunch({ uni.reLaunch({
url:'./bounsRecord/index' url: './bounsRecord/index'
}) })
}, },
applyRecord(){ applyRecord() {
uni.reLaunch({ uni.reLaunch({
url:'./applyRecord/index' url: './applyRecord/index'
}) })
}, },
copyTextMethod(){ copyTextMethod() {
this.$copyText(this.copyText).then(res => { this.$copyText(this.copyText).then(res => {
uni.showToast({ uni.showToast({
title: 'Copy succeeded', title: 'Copy succeeded',
icon: 'success' icon: 'success'
})
}) })
})
}, },
leaIdChange(index){ leaIdChange(index) {
this.leaId=index; this.leaId = index;
} }
} }
} }
</script> </script>

58
pages/menu/promotion/promotionRecord/index.vue

@ -95,36 +95,36 @@
this.level=i+1; this.level=i+1;
this.getBounsRecord(); this.getBounsRecord();
}, },
getBounsRecord(){ getBounsRecord(){
uni.request({
url: '/start/api/summary/promotionRecords', const post = api.promotionRecords({
data: { "ticket": uni.getStorageSync('logInfo').data,
"ticket": uni.getStorageSync('logInfo').data, "level":this.level,
"level":this.level, "pageNumber": 1,
"pageNumber": 1, "pageSize": this.pageSize,
"pageSize": this.pageSize, })
}, post.then(res => {
header: { this.totalElements=res.data.totalElements;
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // if(res.data.content){
}, this.promotionRecord=res.data.content;
method: 'POST', // GET for(var i=0;i<this.promotionRecord.length;i++){
success: (res) => { this.promotionRecord[i].addTime=index.formatyymmddhhmmss(this.promotionRecord[i].addTime);
this.totalElements=res.data.data.totalElements; }
if(res.data.data.content){ this.test=this.promotionRecord.length;
this.promotionRecord=res.data.data.content; console.log(res.data)
for(var i=0;i<this.promotionRecord.length;i++){ }else{
this.promotionRecord[i].addTime=index.formatyymmddhhmmss(this.promotionRecord[i].addTime); console.log(res,555555555555);
} console.log(123123)
this.test=this.promotionRecord.length; }
console.log(res.data) })
}else{ .catch(e => {
console.log(123123) uni.showToast({
} title: e,
}, icon: 'none',
fail: (res) => { duration: 2500
console.log(res.data); })
} })
});
} }
}, },
} }

30
pages/menu/recharge/index.css

@ -119,17 +119,7 @@ display: flex;
color: #909399; color: #909399;
text-transform: capitalize; text-transform: capitalize;
} }
.capy{
font-size: 32rpx;
color: #954DE3;
display: flex;
align-items: center;
}
.capy image{
width: 34rpx;
height: 34rpx;
padding-right: 12rpx;
}
.rech-btn{ .rech-btn{
margin-top: 58rpx; margin-top: 58rpx;
line-height: 96rpx; line-height: 96rpx;
@ -151,4 +141,22 @@ display: flex;
.payTypenName{ .payTypenName{
text-transform: capitalize; text-transform: capitalize;
font-size: 32rpx; font-size: 32rpx;
}
.offline-text{
padding: 0 36rpx;
font-size: 28rpx;
color: #303133;
line-height: 60rpx;
margin-top: 40rpx;
}
.offline-button{
display: inline-block;
width: 80rpx;
margin: 0 10rpx;
vertical-align: middle;
line-height: 40rpx;
text-align: center;
font-size: 28rpx;
padding: 0;
color: rgb(149, 77, 227);
} }

231
pages/menu/recharge/index.vue

@ -51,7 +51,7 @@
payment payment
</view> </view>
<view class="paymentType"> <view class="paymentType">
<u-radio-group v-model="payType" @change="radioGroupChange" class="payTypenName"> <u-radio-group @change="radioGroupChange" class="payTypenName">
<u-radio @change="radioChange(item)" v-for="(item, index) in paymentType" :key="index" <u-radio @change="radioChange(item)" v-for="(item, index) in paymentType" :key="index"
:name="item.typeName" :disabled="item.disabled" active-color="#954DE3FF"> :name="item.typeName" :disabled="item.disabled" active-color="#954DE3FF">
{{item.typeName}} {{item.typeName}}
@ -65,6 +65,28 @@
Confirm Confirm
</view> </view>
</view> </view>
<view class="offline-text" v-show="pd==1">
You can follow the steps to pay:
<view class="">
1. Go to your M-Pesa menu or App on your phone.
</view>
<view class="">
2. Go to Lipa na M-Pena then select "Pay Bill" option.
</view>
<view class="">
3. Enter business number: {{mobile}} <button type="default" class="offline-button" @click="copyTextMethod()">Copy</button> Account number: Enter your ID : {{userId}}
</view>
<view class="">
5. Enter the amount
</view>
<view class="">
6. Enter your M-Pesa PIN.
</view>
<view class="">
7. Confirm that all details are correct and submit.
</view>
</view>
</view> </view>
</template> </template>
@ -76,6 +98,7 @@
export default { export default {
data() { data() {
return { return {
copyText: '',
pd:0, pd:0,
mobile:'', mobile:'',
areacode: '', areacode: '',
@ -85,65 +108,71 @@
paymentType: [], paymentType: [],
payType: '', payType: '',
currencySymbol:'', currencySymbol:'',
currentBalance:'' currentBalance:'',
userId:'',
} }
}, },
onLoad() { onLoad() {
this.copyText=uni.getStorageSync('loginMobile');
this.mobile=uni.getStorageSync('loginMobile'); this.mobile=uni.getStorageSync('loginMobile');
this.currentBalance=uni.getStorageSync('currentBalance'); this.currentBalance=uni.getStorageSync('currentBalance');
this.areacode = uni.getStorageSync('siteInfo').areaCode; this.areacode = uni.getStorageSync('siteInfo').areaCode;
this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol; this.currencySymbol=uni.getStorageSync('siteInfo').currencySymbol;
uni.request({ this.userId=uni.getStorageSync('MyInfo').userId;
url: '/start/api/recharge/rechargeConfig', const post = api.rechargeConfig({
data: { "ticket": uni.getStorageSync('logInfo').data,
"ticket": uni.getStorageSync('logInfo').data, })
}, post.then(res => {
header: { uni.setStorage({
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // key: 'rechargeInfo',
}, data: res.data,
method: 'POST', // GET success: function() {
success: (res) => { console.log('success')
uni.setStorage({ }
key: 'rechargeInfo', });
data: res.data.data, this.rechangeInfo = res.data;
success: function() { this.recharge_amount = this.rechangeInfo.recharge_amount.split(',');
console.log('success') console.log(res.data, 9990);
} })
}); .catch(e => {
this.rechangeInfo = res.data.data; uni.showToast({
this.recharge_amount = this.rechangeInfo.recharge_amount.split(','); title: e,
console.log(res.data, 9990); icon: 'none',
duration: 2500
})
}, })
fail: (res) => {
const post2 = api.getPayType({
console.log(res.data); "ticket": uni.getStorageSync('logInfo').data,
} })
}); post2.then(res => {
this.paymentType = res.data;
uni.request({ console.log(res.data);
url: '/start/api/recharge/getPayType', })
data: { .catch(e => {
"ticket": uni.getStorageSync('logInfo').data, uni.showToast({
}, title: e,
header: { icon: 'none',
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // duration: 2500
}, })
method: 'POST', // GET })
success: (res) => {
this.paymentType = res.data.data;
console.log(res.data.data);
},
fail: (res) => {
console.log(res.data);
}
});
}, },
methods: { methods: {
copyTextMethod() {
this.$copyText(this.copyText).then(res => {
uni.showToast({
title: 'Copy succeeded',
icon: 'success'
})
})
},
PayTo(){ PayTo(){
uni.showLoading({
title:'loading'
})
if(this.payType==''){ if(this.payType==''){
uni.showToast({ uni.showToast({
title: 'Please choose the payment method', title: 'Please choose the payment method',
@ -185,99 +214,61 @@
}) })
return; return;
} }
uni.request({
url: '/start/api/recharge/recharge', const post2 = api.recharge({
data: { "ticket": uni.getStorageSync('logInfo').data,
"ticket": uni.getStorageSync('logInfo').data, "payType":this.payType,
"payType":this.payType, "tranAmt":this.tranAmt,
"tranAmt":this.tranAmt, "mobile":this.mobile,
"mobile":this.mobile, })
}, post2.then(res => {
header: { if(res.success==true){
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET
success: (res) => {
if(res.data.errCode=='SUCCESS'){
uni.request({
url: '/start/api/recharge/toPay',
data: {
"ticket": uni.getStorageSync('logInfo').data,
'orderNo': res.data.data.orderNo,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET
success: (res) => {
if(res.data.success==true){
uni.showToast({
title: 'Recharge success',
icon: 'success',
duration: 1500
})
setTimeout(function(){
location.reload()
},1000)
}else{
uni.showToast({
title: 'Payment failed',
icon: 'none',
duration: 1500
})
}
console.log(res.data);
},
fail: (res) => {
uni.showToast({
title: res.data.errMsg,
icon: 'none',
duration: 1500
})
console.log(res.data);
},
});
}else{
uni.showToast({ uni.showToast({
title: res.data.errMsg, title: 'Recharge success',
icon: 'success',
duration: 1500
})
setTimeout(function(){
location.reload()
},1000)
}else{
uni.showToast({
title: 'Payment failed',
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
} }
console.log(res.data,666666666); })
console.log(res.data.data.orderNo,666666666); .catch(e => {
uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
}, },
fail: (res) => {
uni.showToast({
title: res.data.errMsg,
icon: 'none',
duration: 1500
})
console.log(res.data);
}
});
},
radioChange(e) { radioChange(e) {
if(e.payType=='pay.offline'){ if(e.payType=='pay.offline'){
this.pd=1; this.pd=1;
this.payType=e.payType
}else{ }else{
this.pd=0; this.pd=0;
this.payType=e.payType
} }
console.log(e) console.log(e)
}, },
// radioradio-group // radioradio-group
radioGroupChange(e) { radioGroupChange(e) {
// console.log(e); console.log(this.payType,8888888888888)
}, },
getMonVal(m) { getMonVal(m) {
this.tranAmt = m this.tranAmt = m
} }
}, },
} }
</script> </script>

38
pages/menu/recharge/rechargeRule.vue

@ -21,29 +21,25 @@
}, },
onLoad() { onLoad() {
uni.request({ const post2 = api.rechargeConfig({
url: '/start/api/recharge/rechargeConfig',
data: {
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
})
post2.then(res => {
this.rechangeRule=res.data.tips;
})
.catch(e => {
uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
}, },
header: {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET
success: (res) => {
this.rechangeRule=res.data.data.tips;
},
fail: (res) => {
console.log(res.data);
}
});
},
methods:{ methods:{

53
pages/menu/recharge/record/index.vue

@ -62,30 +62,35 @@
methods:{ methods:{
getRechardRecord(){ getRechardRecord(){
uni.request({
url: '/start/api/recharge/rechargeList',
data: {
"ticket": uni.getStorageSync('logInfo').data, const post2 = api.rechargeList({
"pageNumber":this.pageNumber, "ticket": uni.getStorageSync('logInfo').data,
"pageSize":this.pageSize, "pageNumber":this.pageNumber,
}, "pageSize":this.pageSize,
header: { })
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // post2.then(res => {
}, if(res.data.content){
method: 'POST', // GET this.record_list=res.data.content;
success: (res) => { for(var i=0;i<this.record_list[i].addTime;i++){
this.record_list=res.data.data.content; this.record_list[i].addTime=index.formatyymmddhhmmss(this.record_list[i].addTime);
for(var i=0;i<this.record_list[i].addTime;i++){ }
this.record_list[i].addTime=index.formatyymmddhhmmss(this.record_list[i].addTime); this.totalPage=res.data.totalElements;
}
this.totalPage=res.data.data.totalPages; }
}, })
fail: (res) => { .catch(e => {
console.log(res); uni.showToast({
} title: e,
}); icon: 'none',
duration: 2500
})
})
}, },
}, },

33
pages/menu/rule/index.vue

@ -21,22 +21,23 @@
} }
}, },
onLoad(){ onLoad(){
uni.request({
url: '/start/api/lottery/bettingConfig',
data: { const post2 = api.bettingConfig({
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
}, })
header: { post2.then(res => {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // this.betting_rule=res.data.tips;
},
method: 'POST', // GET })
success: (res) => { .catch(e => {
this.betting_rule=res.data.data.tips; uni.showToast({
}, title: e,
fail: (res) => { icon: 'none',
console.log(res); duration: 2500
} })
}); })
}, },
methods: { methods: {

36
pages/menu/rule/inviteRule/index.vue

@ -44,23 +44,25 @@
} }
}, },
onLoad() { onLoad() {
uni.request({
url: '/start/api/user/inviteCode', const post2 = api.inviteCode({
data: { "ticket": uni.getStorageSync('logInfo').data,
"ticket": uni.getStorageSync('logInfo').data, })
}, post2.then(res => {
header: { this.inviteRule=res.data
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' //
},
method: 'POST', // GET })
success: (res) => { .catch(e => {
this.inviteRule=res.data.data uni.showToast({
console.log(res.data,9999); title: e,
}, icon: 'none',
fail: (res) => { duration: 2500
console.log(res.errMsg); })
} })
});
}, },
methods: { methods: {
back(){ back(){

113
pages/menu/withdrawl/index.vue

@ -129,26 +129,28 @@
onLoad() { onLoad() {
this.currentBalance = uni.getStorageSync('currentBalance'); this.currentBalance = uni.getStorageSync('currentBalance');
this.mobile = uni.getStorageSync('loginMobile'); this.mobile = uni.getStorageSync('loginMobile');
uni.request({
url: '/start/api/withdraw/withdrawConfig',
data: {
"ticket": uni.getStorageSync('logInfo').data,
}, const post2 = api.withdrawConfig({
header: { "ticket": uni.getStorageSync('logInfo').data,
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // })
}, post2.then(res => {
method: 'POST', // GET this.withdrawConfig = res.data;
success: (res) => { this.content = this.withdrawConfig.tips;
this.withdrawConfig = res.data.data; console.log(res.data, 8880);
this.content = this.withdrawConfig.tips; console.log(this.withdrawConfig, 9990);
console.log(res.data, 8880); this.show = true;
console.log(this.withdrawConfig, 9990);
this.show = true; })
}, .catch(e => {
fail: (res) => { uni.showToast({
console.log(res.data); title: e,
} icon: 'none',
}); duration: 2500
})
})
}, },
@ -235,7 +237,7 @@
uni.showLoading({ uni.showLoading({
title: 'loading' title: 'loading'
}); });
if (this.tranAmt == null) { if (this.tranAmt == '') {
uni.showToast({ uni.showToast({
title: 'Please enter the withdrawal amount', title: 'Please enter the withdrawal amount',
icon: 'none', icon: 'none',
@ -246,49 +248,37 @@
uni.request({
url: '/start/api/withdraw/withdraw', const post2 = api.withdraw({
data: {
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
// 'password': md5(this.password), // 'password': md5(this.password),
"tranAmt": this.tranAmt, "tranAmt": this.tranAmt,
}, })
header: { post2.then(res => {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // if (res.success == true) {
},
method: 'POST', // GET
success: (res) => {
if (res.data.success == true) {
uni.showToast({ uni.showToast({
title: res.data.errMsg, title: res.errMsg,
icon: 'none', icon: 'none',
duration: 1500 duration: 1500
}) })
uni.request({
url: '/start/api/withdraw/withdrawServiceCharge', const post = api.withdrawServiceCharge({
data: {
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
// 'password': md5(this.password), // 'password': md5(this.password),
"tranAmt": this.tranAmt, "tranAmt": this.tranAmt,
"ticket": uni.getStorageSync('MyInfo').data, "ticket": uni.getStorageSync('MyInfo').data,
}, })
header: { post.then(res => {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // console.log(res.data, '45464654646446');
},
method: 'POST', // GET })
success: (res) => { .catch(e => {
uni.showToast({
console.log(res.data, '45464654646446'); title: e,
}, icon: 'none',
fail: (res) => { duration: 2500
uni.showToast({ })
title: res.data.errMsg,
icon: 'none',
duration: 1500
}) })
}
});
} else { } else {
uni.showToast({ uni.showToast({
title: 'Withdrawal failed', title: 'Withdrawal failed',
@ -296,17 +286,16 @@
duration: 1500 duration: 1500
}) })
} }
console.log(res.data);
},
fail: (res) => {
uni.showToast({
title: res.data.errMsg,
icon: 'none',
duration: 1500
}) })
} .catch(e => {
}); uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
} }
}, },

44
pages/menu/withdrawl/transactions/index.vue

@ -66,29 +66,35 @@
onLoad() { onLoad() {
uni.request({
url: '/start/api/summary/billList', const post = api.billList({
data: {
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
"pageNumber":this.pageNumber, "pageNumber":this.pageNumber,
"pageSize":this.pageSize, "pageSize":this.pageSize,
}, })
header: { post.then(res => {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // if(res.data.content){
}, this.record_list=res.data.content;
method: 'POST', // GET for(var i=0;i<this.record_list.length;i++){
success: (res) => { this.record_list[i].addTime=index.formatyymmddhhmmss(this.record_list[i].addTime);
this.record_list=res.data.data.content; }
for(var i=0;i<this.record_list.length;i++){
this.record_list[i].addTime=index.formatyymmddhhmmss(this.record_list[i].addTime);
} }
console.log(res.data,9999);
},
fail: (res) => { })
console.log(res.errMsg); .catch(e => {
} uni.showToast({
}); title: e,
icon: 'none',
duration: 2500
})
})
}, },

42
pages/menu/withdrawl/withdrawlRecord/index.vue

@ -65,30 +65,32 @@
}, },
onLoad() { onLoad() {
const post = api.withdrawList({
uni.request({
url: '/start/api/withdraw/withdrawList',
data: {
"ticket": uni.getStorageSync('logInfo').data, "ticket": uni.getStorageSync('logInfo').data,
"pageNumber":this.pageNumber, "pageNumber":this.pageNumber,
"pageSize":this.pageSize, "pageSize":this.pageSize,
}, })
header: { post.then(res => {
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // if(res.data.content){
}, this.record_list=res.data.content;
method: 'POST', // GET for(var i=0;i<this.record_list.length;i++){
success: (res) => { this.record_list[i].createTime=index.formatyymmddhhmmss(this.record_list[i].createTime);
this.record_list=res.data.data.content; }
for(var i=0;i<this.record_list.length;i++){
this.record_list[i].createTime=index.formatyymmddhhmmss(this.record_list[i].createTime);
} }
console.log(res.data,9999);
}, })
fail: (res) => { .catch(e => {
console.log(res.errMsg); uni.showToast({
} title: e,
}); icon: 'none',
duration: 2500
})
})

118
pages/register/index.vue

@ -141,7 +141,7 @@
}) })
return; return;
} }
var a = /^[0-9]{4,14}$/; var a = /^[0-9]{9}$/;
if (!a.test(this.mobile)) { if (!a.test(this.mobile)) {
uni.showToast({ uni.showToast({
title: 'Wrong format of mobile phone number', title: 'Wrong format of mobile phone number',
@ -161,35 +161,27 @@
this.$refs.uCode.start(); this.$refs.uCode.start();
}, 2000); }, 2000);
this.countryCode = uni.getStorageSync('siteInfo').countryCode this.countryCode = uni.getStorageSync('siteInfo').countryCode
uni.request({ const post = api.sendSmsCode({
url: '/start/api/home/sendSmsCode', "mobile": this.mobile,
data: { "mark": this.mark,
"mobile": this.mobile, "countryCode": this.countryCode,
"mark": this.mark, "code": this.picCode
"countryCode": this.countryCode, })
"code": this.picCode post.then(res => {
}, var that = this;
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
})
console.log(res.data);
},
fail: (res) => {
uni.showToast({ uni.showToast({
title: res.data.errMsg, title: res.errMsg,
icon: 'none', icon: 'none',
duration: 2500 duration: 2500
}) })
console.log(res.data); })
} .catch(e => {
}); uni.showToast({
title: e,
icon: 'none',
duration: 2500
})
})
} else { } else {
this.$u.toast('Send after the countdown'); this.$u.toast('Send after the countdown');
} }
@ -209,21 +201,6 @@
url: '../login/index' url: '../login/index'
}) })
}, },
checPas() {
},
getInfoCode() {
},
getPicCode() { getPicCode() {
this.imgcodeUrl = "/start/api/home/imgCode?uuid=" + this.$u.guid(20); this.imgcodeUrl = "/start/api/home/imgCode?uuid=" + this.$u.guid(20);
@ -296,45 +273,44 @@
uni.showLoading({ uni.showLoading({
title: 'loading' title: 'loading'
}); });
uni.request({
url: '/start/api/home/register',
data: {
"mobile": this.mobile,
'password': md5(this.password),
'inviteCode': this.inviteCode, const post = api.register({
'code': this.infoCode, "mobile": this.mobile,
'password': md5(this.password),
}, 'inviteCode': this.inviteCode,
header: { 'code': this.infoCode,
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8' // })
}, post.then(res => {
method: 'POST', // GET uni.showToast({
success: (res) => { title: res.errMsg,
uni.showToast({ icon: 'none',
title: res.data.errMsg, duration: 1500
icon: 'none', })
duration: 1500 setTimeout(function() {
uni.reLaunch({
url: '../login/index'
})
}, 1500)
}) })
setTimeout(function() { .catch(e => {
uni.reLaunch({
url: '../login/index'
})
}, 1500)
},
fail: (res) => {
uni.showToast({ uni.showToast({
title: res.data.errMsg, title: e,
icon: 'none', icon: 'none',
duration: 1500 duration: 2500
}) })
} })
});
} }
}, },
goLogin() { goLogin() {
uni.reLaunch({ uni.navigateTo({
url: '../login/index', url: '../login/index',
}) })
} }

3
utils/api.js

@ -43,6 +43,9 @@ const api = {
inviteCode: (params) => Vue.prototype.$axios.post('/api/user/inviteCode',params), inviteCode: (params) => Vue.prototype.$axios.post('/api/user/inviteCode',params),
bonusOut: (params) => Vue.prototype.$axios.post('/api/summary/bonusOut',params), bonusOut: (params) => Vue.prototype.$axios.post('/api/summary/bonusOut',params),
bonusOutRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusOutRecords',params), bonusOutRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusOutRecords',params),
promotionRecords: (params) => Vue.prototype.$axios.post('/api/summary/promotionRecords',params),
bonusRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusRecords',params),
} }

33
utils/axios.js

@ -20,17 +20,6 @@ const service = axios.create({
}) })
// request拦截器,在请求之前做一些处理 // request拦截器,在请求之前做一些处理
<<<<<<< HEAD
// service.interceptors.request.use(
// config => {
// console.log('showDialog' + Vue.prototype.$showDialog)
// if (Vue.prototype.$showDialog) {
// uni.showLoading({
// title: 'loading',
// mask: true
// })
// }
=======
service.interceptors.request.use( service.interceptors.request.use(
config => { config => {
console.log('showDialog' + Vue.prototype.$showDialog) console.log('showDialog' + Vue.prototype.$showDialog)
@ -40,7 +29,6 @@ service.interceptors.request.use(
mask: true mask: true
}) })
} }
>>>>>>> 568bf6045ac1252bb15844d528ceabdb0f66ad2f
// if (store.state.token) { // if (store.state.token) {
// // 给请求头添加user-token // // 给请求头添加user-token
// config.headers["user-token"] = store.state.token; // config.headers["user-token"] = store.state.token;
@ -69,8 +57,8 @@ service.interceptors.request.use(
} }
var keys = []; var keys = [];
let sign=''; let sign='';
    for (var k in config.data) for (var k in config.data)
      keys.push(k); keys.push(k);
keys.sort(function(a,b){ keys.sort(function(a,b){
return a<b?-1:1; return a<b?-1:1;
}) })
@ -97,22 +85,6 @@ service.interceptors.request.use(
} }
if (config.method=='get') { if (config.method=='get') {
<<<<<<< HEAD
// if (ticket != '') {
// config.url = config.url + '&ticket=' + ticket + '&sign=' + sign
// } else {
// config.url = config.url + '&sign=' + sign
// }
// }
// console.log(config)
// return config;
// },
// error => {
// console.log(error); // for debug
// return Promise.reject(error);
// }
// );
=======
if (ticket != '') { if (ticket != '') {
config.url = config.url + '&ticket=' + ticket + '&sign=' + sign config.url = config.url + '&ticket=' + ticket + '&sign=' + sign
} else { } else {
@ -127,7 +99,6 @@ service.interceptors.request.use(
return Promise.reject(error); return Promise.reject(error);
} }
); );
>>>>>>> 568bf6045ac1252bb15844d528ceabdb0f66ad2f
//配置成功后的拦截器 //配置成功后的拦截器
service.interceptors.response.use(res => { service.interceptors.response.use(res => {

Loading…
Cancel
Save