chushih
This commit is contained in:
+264
@@ -0,0 +1,264 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<u-navbar title="" bgColor="#000" :placeholder="true" :fixed="true" leftIcon="" height="60">
|
||||
<view slot="center">
|
||||
<u--image :showLoading="false" :src="titlePng" width="350px" height="45px" mode="scaleToFill"
|
||||
class="ezlogo"></u--image>
|
||||
<u--image :showLoading="false" :src="require('static/images/service_icon.png')" width="100%"
|
||||
height="auto" mode="widthFix" class="service_icon" @click="goRouter()"></u--image>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<u-swiper class="swiper" :list="list" bgColor="#000" radius="0" imgMode="scaleToFill" height="39vw"
|
||||
interval="4000" @tap="goPaht"></u-swiper>
|
||||
<view style="min-height: 38px">
|
||||
<u-notice-bar v-if="showNotice" :text="text" bgColor="#252627" color="#eee" speed="40"></u-notice-bar>
|
||||
</view>
|
||||
<!-- <u--image :showLoading="false" :src="
|
||||
require(`static/images/${
|
||||
language == 'tw' ? 'tw' : 'en'
|
||||
}_advertisement_v2.jpg`)
|
||||
" width="100%" height="auto" mode="widthFix" @tap="goPaht('baccarat')"></u--image>
|
||||
<view style="margin-top: 5px; margin-bottom: 5px">
|
||||
<u--image :showLoading="false" :src="require('static/images/title-ez.png')" width="100%" height="auto"
|
||||
mode="widthFix"></u--image>
|
||||
</view> -->
|
||||
|
||||
|
||||
<view class="triple">
|
||||
<view class="triple-item">
|
||||
<img :src="require(`static/images/click.png`)" @click="goPaht('other')" alt="">
|
||||
<p>{{ $lang.flagshipHall }}</p>
|
||||
</view>
|
||||
<view class="triple-item">
|
||||
<img :src="require(`static/images/triple.png`)" @click="goPaht('other')" alt="">
|
||||
<p>{{ $lang.liveHall }}</p>
|
||||
</view>
|
||||
<!--
|
||||
<view class="triple-item">
|
||||
<img :src="require(`static/images/triple.png`)" @click="goPaht('triple')" alt="">
|
||||
<p>{{ $lang.liveHall }}</p>
|
||||
</view>
|
||||
-->
|
||||
</view>
|
||||
|
||||
|
||||
<view class="list">
|
||||
<u--image :showLoading="false" :src="require('static/images/game_1.png')" width="100%" height="auto"
|
||||
mode="widthFix"></u--image>
|
||||
<view class="box">
|
||||
<view class="text">{{ $lang.baccarat }}</view>
|
||||
<view class="text">{{ $lang.niuniu }}</view>
|
||||
</view>
|
||||
<view class="left link" @tap="goPaht('baccarat')"></view>
|
||||
<view class="right link" @tap="goPaht('nn')"></view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<u--image :showLoading="false" :src="require('static/images/game_3.png')" width="100%" height="auto"
|
||||
mode="widthFix"></u--image>
|
||||
<view class="box">
|
||||
<view class="text">{{ $lang.longhu }}</view>
|
||||
<view class="text">{{ $lang.sedie }}</view>
|
||||
</view>
|
||||
<view class="left link" @tap="goPaht('longhu')"></view>
|
||||
<view class="right link" @tap="goPaht('toning')"></view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<u--image :showLoading="false" :src="require('static/images/game_2.png')" width="100%" height="auto"
|
||||
mode="widthFix"></u--image>
|
||||
<view class="box">
|
||||
<view class="text">{{ $lang.sicbo }}</view>
|
||||
<view class="text">{{ $lang.threecard }}</view>
|
||||
</view>
|
||||
<view class="left link" @tap="goPaht('dice')"></view>
|
||||
<view class="right link" @tap="goPaht('threecard')"></view>
|
||||
</view>
|
||||
<view class="mb10"></view>
|
||||
<!--
|
||||
<view class="list" @tap="goPaht('other')">
|
||||
<u--image
|
||||
:showLoading="false"
|
||||
:src="require('static/images/game_4.png')"
|
||||
width="100%"
|
||||
height="auto"
|
||||
mode="widthFix"
|
||||
></u--image>
|
||||
<view class="box">
|
||||
<view class="text">{{ $lang.buyu }}</view>
|
||||
<view class="text">{{ $lang.qipai }}</view>
|
||||
</view>
|
||||
</view>-->
|
||||
<!--<view class="mb60"></view>-->
|
||||
|
||||
<!-- <u--image :showLoading="false" :src="
|
||||
require(`static/images/${language == 'tw' ? 'tw' : 'en'}_slots-ez.png`)
|
||||
" width="100%" height="auto" mode="widthFix" @tap="goPaht('other')"></u--image> -->
|
||||
<view class="mb80"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showNotice: true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
language: (state) => state.app.language,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
titlePng: (state) => state.app.titlePng,
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
loginType: (state) => state.app.loginType,
|
||||
customServiceUrl: (state) => state.app.customServiceUrl,
|
||||
showAd: (state) => {
|
||||
const userInfo = state.app.userInfo;
|
||||
let show = false;
|
||||
if (userInfo.pay_channel) {
|
||||
show = true;
|
||||
}
|
||||
return show;
|
||||
},
|
||||
text: (state) => {
|
||||
let text = "";
|
||||
const language = state.app.language;
|
||||
if (language == "cn") {
|
||||
text =
|
||||
"首储活动(真人视讯)🔥 新人首存赠【10%】 五倍流水上限【1688】 回存送【5%】 两倍流水 上限【888】 🔥 ONLINE GAMING 🔥 H5网页版 正式上线了 欢迎来爆庄哦......首储活动(真人视讯)🔥 新人首存赠【10%】 五倍流水上限【1688】 回存送【5%】 两倍流水 上限【888】 🔥 ONLINE GAMING 🔥 H5网页版 正式上线了 欢迎来爆庄哦...";
|
||||
} else if (language == "tw") {
|
||||
text =
|
||||
"首儲活動(真人視訊)🔥 新人首存贈【10%】 五倍流水上限【1688】 回存送【5%】 兩倍流水 上限【888】 🔥 ONLINE GAMING 🔥 H5網頁版 正式上線了 歡迎來爆莊哦......首儲活動(真人視訊)🔥 新人首存贈【10%】 五倍流水上限【1688】 回存送【5%】 兩倍流水 上限【888】 🔥 ONLINE GAMING 🔥 H5網頁版 正式上線了 歡迎來爆莊哦...";
|
||||
} else if (language == "en") {
|
||||
text =
|
||||
"首儲活動(真人視訊)🔥 新人首存贈【10%】 五倍流水上限【1688】 回存送【5%】 兩倍流水 上限【888】 🔥 ONLINE GAMING 🔥 H5網頁版 正式上線了 歡迎來爆莊哦......首儲活動(真人視訊)🔥 新人首存贈【10%】 五倍流水上限【1688】 回存送【5%】 兩倍流水 上限【888】 🔥 ONLINE GAMING 🔥 H5網頁版 正式上線了 歡迎來爆莊哦...";
|
||||
} else if (language == "kr") {
|
||||
text =
|
||||
"존귀한 고객님, ONLINE GAMING 에 오신 것을 환영합니다. 만약 당신이 새로운 게이머라면 애플 자체 브라우저나 구글 브라우저로 우리의 웹 주소를 열고 데스크톱 생성 아이콘을 클릭하면 더 편리한 조작 체험과 시각 효과를 가져다 줄 수 있습니다......귀한 고객🔥 ONLINE GAMING 🔥 H5 웹버전이 정식으로 오픈되었습니다. 폭장에 오신 것을 환영합니다......";
|
||||
} else if (language == "yn") {
|
||||
text =
|
||||
"Chào mừng bạn đến ONLINE GAMING, nếu bạn là người chơi mới, xin vui lòng sử dụng trình duyệt của Apple hoặc Google Explorer để mở địa chỉ web của chúng tôi bằng cách nhấp vào để tạo biểu tượng máy tính để bàn sẽ mang lại cho bạn một kinh nghiệm hoạt động thuận tiện hơn và hiệu ứng hình ảnh.... Quý khách hàng 🔥 ONLINE GAMING 🔥 Trang web H5 chính thức lên mạng, chào mừng đến với trang web bùng nổ......";
|
||||
}
|
||||
return text;
|
||||
},
|
||||
list: (state) => {
|
||||
const language = state.app.language;
|
||||
const lang = (language == "tw" || language == 'cn') ? "tw" : "en";
|
||||
let list = [
|
||||
`/static/images/${lang}_banner_ac1.png`,
|
||||
`/static/images/${lang}_banner_2-ez-v3.png`,
|
||||
];
|
||||
return list;
|
||||
},
|
||||
}),
|
||||
},
|
||||
onShow() {
|
||||
this.showNotice = false;
|
||||
if (this.$route.query.logout && this.$route.query.logout == '1') {
|
||||
localStorage.removeItem("userInfo");
|
||||
this.$router.replace({
|
||||
path: "/"
|
||||
});
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.showNotice = true;
|
||||
}, 100);
|
||||
},
|
||||
methods: {
|
||||
// this.baseApi
|
||||
goPaht(type) {
|
||||
if (type == "other") {
|
||||
window.location.href =
|
||||
`${this.$baseApi.gameUrl}/?token=${this.userInfo.api_token}&language=${this.language}#/${type}`;
|
||||
} else if(type == 'triple'){
|
||||
window.location.href =
|
||||
`${this.$baseApi.tripleUrl}/?token=${this.userInfo.api_token}`;
|
||||
}
|
||||
else {
|
||||
window.location.href =
|
||||
`${this.$baseApi.gameUrl}/?token=${this.userInfo.api_token}&language=${this.language}#/${type}`;
|
||||
}
|
||||
},
|
||||
goRouter() {
|
||||
let url = this.customServiceUrl + '&visiter_id=' + this.userInfo.username + '&visiter_name=' + this
|
||||
.userInfo.username;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.index {
|
||||
.ezlogo {
|
||||
margin-left: -25px;
|
||||
}
|
||||
|
||||
.service_icon {
|
||||
width: 26px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 2px;
|
||||
margin: 15px 8px;
|
||||
}
|
||||
|
||||
.list {
|
||||
padding: 5px 5px;
|
||||
position: relative;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.link {
|
||||
position: absolute;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
|
||||
&.left {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&.right {
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
color: #f4c46f;
|
||||
font-size: medium;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-top: 5px;
|
||||
|
||||
.text {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.triple{
|
||||
display: flex;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
&-item{
|
||||
width: 50%;
|
||||
padding: 2%;
|
||||
img{
|
||||
width: 100%;
|
||||
// height: 110px;
|
||||
}
|
||||
p{
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
+299
@@ -0,0 +1,299 @@
|
||||
<template>
|
||||
<view class="login">
|
||||
<div class="langview">
|
||||
<div class="select" @click="showLangselect(true)">
|
||||
{{ langList[language] }}
|
||||
</div>
|
||||
<div class="select-box" v-show="langselect">
|
||||
<div
|
||||
class="option"
|
||||
v-for="item in Object.keys(langList)"
|
||||
:key="item"
|
||||
:class="{ active: item == language }"
|
||||
@click="choseLang(item)"
|
||||
>
|
||||
{{ langList[item] }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<view class="content">
|
||||
<view class="logo">
|
||||
<u--image
|
||||
:showLoading="false"
|
||||
:src="loginLogo"
|
||||
width="125px"
|
||||
height="119px"
|
||||
mode="scaleToFill"
|
||||
></u--image>
|
||||
</view>
|
||||
<u-input
|
||||
class="input"
|
||||
v-model="phone"
|
||||
type="number"
|
||||
clearable
|
||||
:placeholder="$lang.enterAccount"
|
||||
><!--
|
||||
<view class="phone-code" slot="prefix" @click="countryShow = true">{{
|
||||
countryData.country_code
|
||||
}}</view>-->
|
||||
</u-input>
|
||||
<u-input
|
||||
class="input"
|
||||
v-model="password"
|
||||
:password="true"
|
||||
:placeholder="$lang.enterPassword"
|
||||
>
|
||||
</u-input>
|
||||
<view class="btn-box">
|
||||
<view class="btn" @tap="login('login')">{{ $lang.login }}</view>
|
||||
<view class="btn" @tap="login('dome')">{{ $lang.dome }}</view>
|
||||
</view>
|
||||
<view class="tip" @tap="goRegister">{{ $lang.goRegister }}</view>
|
||||
</view>
|
||||
<!-- 提示 -->
|
||||
<u-toast ref="uToast" />
|
||||
<!-- 区号 -->
|
||||
<country-code
|
||||
class="country"
|
||||
:show="countryShow"
|
||||
:anchor="countryData.anchor_index"
|
||||
:country="countryData.country_en"
|
||||
@select="selectCountryTap"
|
||||
@close="countryShow = false"
|
||||
></country-code>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: "",
|
||||
password: "",
|
||||
countryShow: false,
|
||||
countryData: {
|
||||
anchor_index: 2,
|
||||
country_en: "Philippines",
|
||||
country_cn: "菲律賓",
|
||||
country_code: "+63",
|
||||
},
|
||||
langList: {
|
||||
en: "English",
|
||||
tw: "繁體中文",
|
||||
cn: "简体中文",
|
||||
yn: "Việt nam",
|
||||
kr: "한국어",
|
||||
tl: "แบบไทย",
|
||||
in: "Indonesia",
|
||||
},
|
||||
langselect: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
language: (state) => (state.app.language ? state.app.language : "en"),
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
loginLogo: (state) => state.app.loginLogo,
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
let userData = {};
|
||||
try {
|
||||
userData = localStorage.getItem("userInfo");
|
||||
userData = userData ? JSON.parse(userData) : {};
|
||||
if (userData && userData.id) {
|
||||
uni.switchTab({
|
||||
url: "/pages/index",
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showLangselect(state) {
|
||||
this.langselect = state;
|
||||
},
|
||||
choseLang(lang) {
|
||||
this.$store.commit("app/updateLanguage", lang);
|
||||
this.langselect = false;
|
||||
},
|
||||
selectCountryTap(data) {
|
||||
this.countryData = data;
|
||||
this.countryShow = false;
|
||||
},
|
||||
goRegister() {
|
||||
this.$router.replace({
|
||||
path: "/pages/register",
|
||||
});
|
||||
},
|
||||
login(type) {
|
||||
if (!this.phone && type == "login") {
|
||||
this.$toast({
|
||||
message: this.$lang.enterAccount,
|
||||
duration: 2000,
|
||||
});
|
||||
} else if (!this.password & (type == "login")) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterPassword,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
const o = navigator.userAgent;
|
||||
const isAndroid = o.indexOf("Android") > -1 || o.indexOf("Adr") > -1; //android终端
|
||||
const isiOS = !!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
||||
const client = isAndroid ? 3 : isiOS ? 2 : 1;
|
||||
const params = {
|
||||
username: this.phone,
|
||||
password: this.password,
|
||||
code: this.countryData.country_code,
|
||||
client,
|
||||
};
|
||||
let api = "login";
|
||||
if (type == "dome") {
|
||||
api = "dome";
|
||||
params.token = "shiwanlogin";
|
||||
// console.log(params)
|
||||
}
|
||||
this.$toast({
|
||||
type: "loading",
|
||||
message: this.$lang.logining,
|
||||
duration: 200000,
|
||||
});
|
||||
this.$api[api](params)
|
||||
.then((res) => {
|
||||
if (res.Success) {
|
||||
this.$store.commit("app/updateUserInfo", {
|
||||
...res.Data,
|
||||
});
|
||||
this.$store.commit("app/updateLoginType", type);
|
||||
uni.switchTab({
|
||||
url: "/pages/index",
|
||||
});
|
||||
this.$toastHide();
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
this.$toastHide();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.login {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: url("~@/static/images/login_bg.png") no-repeat;
|
||||
background-size: 100% auto;
|
||||
background-position: bottom left;
|
||||
overflow-y: auto;
|
||||
.langview {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
.select {
|
||||
border-radius: 4px;
|
||||
width: 90px;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
color: #cfc189;
|
||||
line-height: 35px;
|
||||
background: #212121;
|
||||
text-align: center;
|
||||
&:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
.select-box {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 45px;
|
||||
width: 90px;
|
||||
line-height: 30px;
|
||||
background: #212121;
|
||||
border-radius: 4px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
z-index: 9;
|
||||
.option:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.active {
|
||||
color: #cfc189;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
width: 280px;
|
||||
padding-bottom: 50px;
|
||||
margin: 0 auto;
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20%;
|
||||
}
|
||||
.input {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-bottom: 15px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.phone-code {
|
||||
min-width: 50px;
|
||||
text-align: center;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
.btn-box {
|
||||
margin-top: 20px;
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
background: url("~@/static/images/btn_bg.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-weight: 600;
|
||||
margin-top: 15px;
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.country {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
.tip {
|
||||
font-size: 12px;
|
||||
color: #b38f3c;
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
&:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,401 @@
|
||||
<template>
|
||||
<view class="recharge">
|
||||
<u-navbar
|
||||
title=""
|
||||
bgColor="#000"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
leftIcon=""
|
||||
height="60"
|
||||
>
|
||||
<view slot="left">
|
||||
<text class="navbar-lab">{{ $lang.recharge }}</text>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<template v-if="userInfo.pay_channel == 'BC'">
|
||||
<view class="picker-view" @click="show = true">
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.pleaseChoose"
|
||||
color="#93979b"
|
||||
v-model="type"
|
||||
border="none"
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.chooseRecharge"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
<u-icon
|
||||
slot="suffix"
|
||||
name="arrow-down-fill"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</u-input>
|
||||
</view>
|
||||
<u-picker
|
||||
:title="$lang.chooseRecharge"
|
||||
closeOnClickOverlay
|
||||
:show="show"
|
||||
:columns="columns"
|
||||
:cancelText="$lang.cancel"
|
||||
:confirmText="$lang.confirm"
|
||||
@cancel="close"
|
||||
@close="close"
|
||||
@confirm="confirm"
|
||||
></u-picker>
|
||||
<view class="list">
|
||||
<view class="lab">{{ $lang.rechargeWithdrawNetwork }}</view>
|
||||
<view class="type">TRC20</view>
|
||||
</view>
|
||||
|
||||
<view class="list">
|
||||
<view class="lab">{{ $lang.walletAddress }}:</view>
|
||||
<view class="box">
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.walletAddress"
|
||||
fontSize="12px"
|
||||
color="#93979b"
|
||||
:value="address"
|
||||
>
|
||||
<template slot="suffix">
|
||||
<u-button
|
||||
class="btn"
|
||||
:text="$lang.copy"
|
||||
type="success"
|
||||
@click="copyCode"
|
||||
color="#e5b932"
|
||||
></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list qrcode">
|
||||
<u--image
|
||||
radius="5px"
|
||||
:showLoading="true"
|
||||
:src="qrcode"
|
||||
width="200px"
|
||||
height="200px"
|
||||
mode="scaleToFill"
|
||||
></u--image>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="tip">
|
||||
{{ $lang.rechargeTip }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="userInfo.pay_channel == 'YBF'">
|
||||
<view
|
||||
class="picker-view"
|
||||
@click="fnPicker('currency')"
|
||||
v-if="currency_list.length"
|
||||
>
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.chooseCoin"
|
||||
color="#93979b"
|
||||
v-model="currency.name"
|
||||
border="none"
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.chooseCoin"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
<u-icon
|
||||
slot="suffix"
|
||||
name="arrow-down-fill"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</u-input>
|
||||
</view>
|
||||
<view
|
||||
class="picker-view"
|
||||
@click="fnPicker('coin_type')"
|
||||
v-if="coin_type_list.length"
|
||||
>
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.chooseLine"
|
||||
color="#93979b"
|
||||
v-model="coin_type.name"
|
||||
border="none"
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.chooseLine"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
<u-icon
|
||||
slot="suffix"
|
||||
name="arrow-down-fill"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="picker-view">
|
||||
<u-input
|
||||
:placeholder="$lang.enterMoney"
|
||||
color="#93979b"
|
||||
v-model="amount"
|
||||
border="none"
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.rechargeAmount"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
</u-input>
|
||||
</view>
|
||||
<view class="list mb60">
|
||||
<u-button
|
||||
class="button"
|
||||
color="#e5b932"
|
||||
:text="$lang.submit"
|
||||
@click="submit"
|
||||
></u-button>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="tip">
|
||||
{{ $lang.rechargeTip }}
|
||||
</view>
|
||||
</view>
|
||||
<u-picker
|
||||
:title="$lang.chooseRecharge"
|
||||
closeOnClickOverlay
|
||||
:show="showPicker"
|
||||
:columns="columnsPicker"
|
||||
keyName="name"
|
||||
:cancelText="$lang.cancel"
|
||||
:confirmText="$lang.confirm"
|
||||
@cancel="closePicker"
|
||||
@close="closePicker"
|
||||
@confirm="confirmPicker"
|
||||
></u-picker>
|
||||
</template>
|
||||
</view>
|
||||
<view class="mb60"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import qr from "qr-image";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
address: "",
|
||||
qrcode: "",
|
||||
// 币种选择
|
||||
type: "USDT",
|
||||
show: false,
|
||||
columns: [["USDT"]],
|
||||
// 支付方式
|
||||
showPicker: false,
|
||||
columnsPicker: [],
|
||||
pickerType: "",
|
||||
amount: "",
|
||||
currency: { name: "", key: "" },
|
||||
coin_type: { name: "", key: "" },
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
coin_type_list: (state) => {
|
||||
return state.app?.userInfo?.pay_channel_coin_chain || [];
|
||||
},
|
||||
currency_list: (state) => {
|
||||
return state.app?.userInfo?.pay_channel_currency || [];
|
||||
},
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
if (this.userInfo && this.userInfo.wallet) {
|
||||
this.address = this.userInfo.wallet.address;
|
||||
this.setQrCode();
|
||||
}
|
||||
if (
|
||||
this.userInfo &&
|
||||
this.userInfo.pay_channel_coin_chain &&
|
||||
this.userInfo.pay_channel_coin_chain.length
|
||||
) {
|
||||
this.coin_type = this.userInfo.pay_channel_coin_chain[0];
|
||||
}
|
||||
if (
|
||||
this.userInfo &&
|
||||
this.userInfo.pay_channel_currency &&
|
||||
this.userInfo.pay_channel_currency.length
|
||||
) {
|
||||
this.currency = this.userInfo.pay_channel_currency[0];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirm(chose) {
|
||||
this.type = chose.value[0];
|
||||
this.close();
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
setQrCode() {
|
||||
const qrcode =
|
||||
"data:image/png;base64," +
|
||||
uni.arrayBufferToBase64(
|
||||
qr.imageSync(this.address, {
|
||||
margin: 2,
|
||||
})
|
||||
);
|
||||
this.qrcode = qrcode;
|
||||
},
|
||||
// 复制链接
|
||||
copyCode() {
|
||||
uni.setClipboardData({
|
||||
data: this.address,
|
||||
success: () => {
|
||||
this.$toast({
|
||||
message: this.$lang.copySuccessfully,
|
||||
duration: 2000,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
fnPicker(type) {
|
||||
this.pickerType = type;
|
||||
this.columnsPicker = [this[`${type}_list`]];
|
||||
this.showPicker = true;
|
||||
},
|
||||
confirmPicker(chose) {
|
||||
this[this.pickerType] = chose.value[0];
|
||||
this.closePicker();
|
||||
},
|
||||
closePicker() {
|
||||
this.showPicker = false;
|
||||
},
|
||||
submit() {
|
||||
if (!this.amount) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterWithdrawalamount,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
const params = {
|
||||
user_id: this.userInfo.id,
|
||||
pay_channel: this.userInfo.pay_channel,
|
||||
amount: this.amount,
|
||||
currency: this.currency.key,
|
||||
coin_type: this.coin_type.key,
|
||||
};
|
||||
this.$toast({
|
||||
type: "loading",
|
||||
message: `${this.$lang.submit}...`,
|
||||
duration: 200000,
|
||||
});
|
||||
this.$api
|
||||
.ybfDeposit(params)
|
||||
.then((res) => {
|
||||
if (res.Success == 1) {
|
||||
const o = navigator.userAgent;
|
||||
const isiOS = !!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
||||
if (isiOS) {
|
||||
window.location.href = res.data.payUrl;
|
||||
} else {
|
||||
window.open(res.data.payUrl, "_blank");
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
this.$toastHide();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.recharge {
|
||||
background: #0b1520;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
.navbar-lab {
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
}
|
||||
.content {
|
||||
margin: 5px 5px;
|
||||
border: 2px solid #947b2b;
|
||||
background: #222222;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
.picker-view {
|
||||
border: 2px solid #947b2b;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 20px;
|
||||
&.input {
|
||||
border: 1px solid #dadbde;
|
||||
}
|
||||
}
|
||||
.list {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
&.qrcode {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 25px 0;
|
||||
}
|
||||
.lab {
|
||||
color: #757272;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.btn {
|
||||
height: 30px;
|
||||
font-weight: 600;
|
||||
color: #0b1520 !important;
|
||||
}
|
||||
.type {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
background: #e5b932;
|
||||
border-radius: 40px;
|
||||
text-align: center;
|
||||
line-height: 35px;
|
||||
font-weight: 600;
|
||||
margin: 10px auto;
|
||||
}
|
||||
.button {
|
||||
line-height: 45px;
|
||||
height: 45px;
|
||||
color: #0b1520 !important;
|
||||
font-weight: bold;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.tip {
|
||||
color: #cc4c0e;
|
||||
font-size: 13px;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<view class="recharge">
|
||||
<u-navbar
|
||||
title=""
|
||||
bgColor="#000"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
leftIcon=""
|
||||
height="60"
|
||||
>
|
||||
<view slot="left">
|
||||
<text class="navbar-lab">{{ $lang.recharge }}</text>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<view class="picker-view" @click="show = true">
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.pleaseChoose"
|
||||
color="#93979b"
|
||||
v-model="type"
|
||||
border="none"
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.chooseRecharge"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
<u-icon
|
||||
slot="suffix"
|
||||
name="arrow-down-fill"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</u-input>
|
||||
</view>
|
||||
<u-picker
|
||||
:title="$lang.chooseRecharge"
|
||||
closeOnClickOverlay
|
||||
:show="show"
|
||||
:columns="columns"
|
||||
@cancel="close"
|
||||
@close="close"
|
||||
@confirm="confirm"
|
||||
></u-picker>
|
||||
<view class="list">
|
||||
<view class="lab">{{ $lang.rechargeWithdrawNetwork }}</view>
|
||||
<view class="type">TRC20</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="lab">{{ $lang.walletAddress }}:</view>
|
||||
<view class="box">
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.walletAddress"
|
||||
fontSize="12px"
|
||||
color="#93979b"
|
||||
:value="address"
|
||||
>
|
||||
<template slot="suffix">
|
||||
<u-button
|
||||
class="btn"
|
||||
:text="$lang.copy"
|
||||
type="success"
|
||||
@click="copyCode"
|
||||
color="#e5b932"
|
||||
></u-button>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list qrcode">
|
||||
<u--image
|
||||
radius="5px"
|
||||
:showLoading="true"
|
||||
:src="qrcode"
|
||||
width="200px"
|
||||
height="200px"
|
||||
mode="scaleToFill"
|
||||
></u--image>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="tip">
|
||||
{{ $lang.rechargeTip2 }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import qr from "qr-image";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: "USDT",
|
||||
address: "",
|
||||
qrcode: "",
|
||||
show: false,
|
||||
columns: [["USDT"]],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
if (this.userInfo && this.userInfo.pay_channel_address) {
|
||||
this.address = this.userInfo.pay_channel_address;
|
||||
this.setQrCode();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirm(chose) {
|
||||
this.type = chose.value[0];
|
||||
this.close();
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
setQrCode() {
|
||||
const qrcode =
|
||||
"data:image/png;base64," +
|
||||
uni.arrayBufferToBase64(
|
||||
qr.imageSync(this.address, {
|
||||
margin: 2,
|
||||
})
|
||||
);
|
||||
this.qrcode = qrcode;
|
||||
},
|
||||
// 复制链接
|
||||
copyCode() {
|
||||
uni.setClipboardData({
|
||||
data: this.address,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: this.$lang.copySuccessfully,
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.recharge {
|
||||
background: #0b1520;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
.navbar-lab {
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
}
|
||||
.content {
|
||||
margin: 5px 5px;
|
||||
border: 2px solid #947b2b;
|
||||
background: #222222;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
.picker-view {
|
||||
border: 2px solid #947b2b;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.list {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
&.qrcode {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 25px 0;
|
||||
}
|
||||
.lab {
|
||||
color: #757272;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.btn {
|
||||
height: 30px;
|
||||
font-weight: 600;
|
||||
color: #0b1520 !important;
|
||||
}
|
||||
.type {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
background: #e5b932;
|
||||
border-radius: 40px;
|
||||
text-align: center;
|
||||
line-height: 35px;
|
||||
font-weight: 600;
|
||||
margin: 10px auto;
|
||||
}
|
||||
.tip {
|
||||
color: #cc4c0e;
|
||||
font-size: 13px;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,250 @@
|
||||
<template>
|
||||
<view class="register">
|
||||
<view class="content">
|
||||
<view class="logo">
|
||||
<u--image :showLoading="false" :src="loginLogo" width="125px" height="119px" mode="scaleToFill"></u--image>
|
||||
</view>
|
||||
<u-input class="input" :focus='focusUsername' v-model="username" type="number" clearable :placeholder="$lang.enterAccount">
|
||||
<text class="text" slot="prefix">{{ $lang.account }}</text>
|
||||
</u-input>
|
||||
<u-input class="input" :focus='focusPassword' v-model="password" :password="true" :placeholder="$lang.enterPassword" autocomplete="new-password">
|
||||
<text class="text" slot="prefix">{{ $lang.password }}</text>
|
||||
</u-input>
|
||||
<u-input class="input" :focus='focusRepass' v-model="repass" :password="true" :placeholder="$lang.enterPasswordAgain">
|
||||
<text class="text" slot="prefix">{{ $lang.confirmPassword }}</text>
|
||||
</u-input>
|
||||
<u-input class="input" :focus='focusPhone' v-model="phone" type="number" clearable
|
||||
:placeholder="`${$lang.enterPhone}`">
|
||||
<view class="phone-code" slot="prefix" @click="countryShow = true">
|
||||
{{ countryData.country_code }}
|
||||
</view>
|
||||
</u-input>
|
||||
<u-input class="input" v-model="referral_code" placeholder="TC176852" :disabled="referral_disabled">
|
||||
<text class="text" slot="prefix">{{ $lang.invitationCode }}</text>
|
||||
</u-input>
|
||||
<view class="btn-box">
|
||||
<view class="btn" @tap="register()">{{ $lang.register }}</view>
|
||||
</view>
|
||||
<view class="tip" @tap="goLogin">{{ $lang.goLogin }}</view>
|
||||
</view>
|
||||
<!-- 提示 -->
|
||||
<u-toast ref="uToast" />
|
||||
<!-- 区号 -->
|
||||
<country-code class="country" :show="countryShow" :anchor="countryData.anchor_index"
|
||||
:country="countryData.country_en" @select="selectCountryTap" @close="countryShow = false"></country-code>
|
||||
<view class="mb60"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
mapState
|
||||
} from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
username: "",
|
||||
password: "",
|
||||
repass: "",
|
||||
phone: "",
|
||||
referral_code: undefined,
|
||||
countryShow: false,
|
||||
referral_disabled: false,
|
||||
countryData: {
|
||||
anchor_index: 2,
|
||||
country_en: "Philippines",
|
||||
country_cn: "菲律宾",
|
||||
country_code: "+63"
|
||||
},
|
||||
// 焦点
|
||||
focusUsername: false,
|
||||
focusPassword: false,
|
||||
focusRepass: false,
|
||||
focusPhone: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
$lang: state => state.app.lang[state.app.language],
|
||||
loginLogo: state => state.app.loginLogo
|
||||
})
|
||||
},
|
||||
onLoad() {
|
||||
const {
|
||||
invitedCode = null
|
||||
} = this.$route.query;
|
||||
if (invitedCode) {
|
||||
this.referral_code = invitedCode;
|
||||
this.referral_disabled = true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectCountryTap(data) {
|
||||
this.countryData = data;
|
||||
this.countryShow = false;
|
||||
},
|
||||
goLogin() {
|
||||
this.$router.replace({
|
||||
path: "/pages/login"
|
||||
});
|
||||
},
|
||||
register() {
|
||||
if (!this.username) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterAccount,
|
||||
duration: 2000
|
||||
});
|
||||
this.focusUsername = true
|
||||
} else if (!this.password) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterPassword,
|
||||
duration: 2000
|
||||
});
|
||||
this.focusPassword = true
|
||||
} else if (!this.repass) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterPasswordAgain,
|
||||
duration: 2000
|
||||
});
|
||||
this.focusRepass = true
|
||||
} else if (!this.phone) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterPhone,
|
||||
duration: 2000
|
||||
});
|
||||
this.focusPhone = true
|
||||
} else {
|
||||
const o = navigator.userAgent;
|
||||
const isAndroid = o.indexOf("Android") > -1 || o.indexOf("Adr") > -1; //android终端
|
||||
const isiOS = !!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
|
||||
const client = isAndroid ? 3 : isiOS ? 2 : 1;
|
||||
const referralCode = this.referral_code ? this.referral_code : 'TC176852'
|
||||
const params = {
|
||||
username: this.username,
|
||||
pass: this.password,
|
||||
repass: this.repass,
|
||||
mobile: this.phone,
|
||||
code: this.countryData.country_code,
|
||||
referral_code: referralCode,
|
||||
area_id: 2,
|
||||
client
|
||||
};
|
||||
this.$toast({
|
||||
type: "loading",
|
||||
message: `${this.$lang.register}...`,
|
||||
duration: 200000
|
||||
});
|
||||
this.$api
|
||||
.register(params)
|
||||
.then(res => {
|
||||
this.$toastHide();
|
||||
if (res.Success == 1) {
|
||||
this.$store.commit("app/updateUserInfo", {
|
||||
...res.Data
|
||||
});
|
||||
uni.switchTab({
|
||||
url: "/pages/login"
|
||||
});
|
||||
this.$toast({
|
||||
message: this.$lang.register+this.$lang.success,
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.Msg,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$toastHide();
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.register {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
background: url("~@/static/images/login_bg.png") no-repeat;
|
||||
background-size: 100% auto;
|
||||
background-position: bottom left;
|
||||
overflow-y: auto;
|
||||
|
||||
.content {
|
||||
width: 280px;
|
||||
padding-bottom: 50px;
|
||||
margin: 0 auto;
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20%;
|
||||
}
|
||||
|
||||
.input {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-bottom: 15px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.phone-code {
|
||||
min-width: 50px;
|
||||
text-align: center;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.text {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
margin-top: 20px;
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
background: url("~@/static/images/btn_bg.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-weight: 600;
|
||||
margin-top: 15px;
|
||||
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.country {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.tip {
|
||||
font-size: 12px;
|
||||
color: #b38f3c;
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
|
||||
&:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<view class="transfer">
|
||||
<u-navbar
|
||||
title=""
|
||||
bgColor="#000"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
leftIcon=""
|
||||
height="60"
|
||||
>
|
||||
<view slot="left">
|
||||
<text class="navbar-lab">{{ $lang.transfer }}</text>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<view class="list">
|
||||
<view class="lable money"
|
||||
>{{ $lang.accountBalance }}:{{ userInfo.money }}</view
|
||||
>
|
||||
<view class="lable gmoney">{{ $lang.gameBalance }}:{{ gmoney }}</view>
|
||||
</view>
|
||||
|
||||
<view class="list transfer-box">
|
||||
<u-input
|
||||
class="input"
|
||||
color="#947b2b"
|
||||
clearable
|
||||
border="none"
|
||||
v-model="from"
|
||||
readonly
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.from"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
</u-input>
|
||||
<view class="down_icon"></view>
|
||||
<u-input
|
||||
class="input"
|
||||
color="#947b2b"
|
||||
clearable
|
||||
border="none"
|
||||
v-model="to"
|
||||
readonly
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.to"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
</u-input>
|
||||
<view class="transfer-btn" @tap="switchFlow"></view>
|
||||
</view>
|
||||
|
||||
<view class="picker-view" @click="show = true">
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.pleaseChoose"
|
||||
color="#93979b"
|
||||
v-model="type"
|
||||
border="none"
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.transferType"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
<u-icon
|
||||
slot="suffix"
|
||||
name="arrow-down-fill"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</u-input>
|
||||
</view>
|
||||
<u-picker
|
||||
:title="$lang.pleaseChooseTransferType"
|
||||
closeOnClickOverlay
|
||||
:show="show"
|
||||
:columns="columns"
|
||||
:cancelText="$lang.cancel"
|
||||
:confirmText="$lang.confirm"
|
||||
@cancel="close"
|
||||
@close="close"
|
||||
@confirm="confirm"
|
||||
></u-picker>
|
||||
<view class="list">
|
||||
<view class="lable">{{ $lang.amount }}</view>
|
||||
<u-input
|
||||
class="input"
|
||||
color="#947b2b"
|
||||
clearable
|
||||
:placeholder="$lang.pleaseEnterTransferAmount"
|
||||
border="surround"
|
||||
v-model="money"
|
||||
></u-input>
|
||||
</view>
|
||||
<view class="list">
|
||||
<u-button
|
||||
@tap="submit"
|
||||
class="button"
|
||||
color="#e5b932"
|
||||
:text="$lang.transfer"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mb60"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
from: "",
|
||||
to: "",
|
||||
flow: true, //"upper"
|
||||
money: "",
|
||||
gmoney: "",
|
||||
type: "USDT",
|
||||
show: false,
|
||||
columns: [["USDT"]],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
this.from = this.$lang.capitalAccount;
|
||||
this.to = this.$lang.gameAccount;
|
||||
this.getGameInfo();
|
||||
},
|
||||
methods: {
|
||||
confirm(chose) {
|
||||
this.type = chose.value[0];
|
||||
this.close();
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
switchFlow() {
|
||||
this.flow = !this.flow;
|
||||
if (this.flow) {
|
||||
this.from = this.$lang.capitalAccount;
|
||||
this.to = this.$lang.gameAccount;
|
||||
} else {
|
||||
this.from = this.$lang.gameAccount;
|
||||
this.to = this.$lang.capitalAccount;
|
||||
}
|
||||
},
|
||||
getGameInfo() {
|
||||
this.$api
|
||||
.gameInfo()
|
||||
.then((res) => {
|
||||
if (res.status_code == 200) {
|
||||
this.gmoney = res.data.totalmoney;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
const params = {
|
||||
money: this.money,
|
||||
};
|
||||
if (!params.money) {
|
||||
this.$toast({
|
||||
message: this.$lang.amountCannotBe0,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
this.$toast({
|
||||
type: "loading",
|
||||
message: this.$lang.submittingApplication,
|
||||
duration: 200000,
|
||||
});
|
||||
const type = this.flow ? "gameUpper" : "gameUnder";
|
||||
this.$api[type](params)
|
||||
.then((res) => {
|
||||
if (res.status_code == 200) {
|
||||
this.$toast({
|
||||
type: "success",
|
||||
message: res.message,
|
||||
duration: 2000,
|
||||
});
|
||||
this.getGameInfo();
|
||||
this.$store.dispatch("app/getUserInfo");
|
||||
this.money = "";
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.message,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
this.$toastHide();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.transfer {
|
||||
background: #0b1520;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
.navbar-lab {
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
}
|
||||
.content {
|
||||
margin: 5px 5px;
|
||||
border: 2px solid #947b2b;
|
||||
background: #222222;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
min-height: 400px;
|
||||
.transfer-box {
|
||||
border: 2px solid #947b2b;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 20px;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
.down_icon {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background: url("~@/static/images/down_icon.png") no-repeat -3px center;
|
||||
background-size: 100% auto;
|
||||
}
|
||||
.transfer-btn {
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: url("~@/static/images/transfer_btn.png") no-repeat;
|
||||
background-size: 100% auto;
|
||||
right: 20px;
|
||||
top: 50%;
|
||||
margin-top: -25px;
|
||||
&:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.picker-view {
|
||||
border: 2px solid #947b2b;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.list {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
.lab {
|
||||
color: #757272;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.lable {
|
||||
text-align: left;
|
||||
color: #ddd;
|
||||
margin-top: 20px;
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.money {
|
||||
font-size: 16px;
|
||||
margin-top: 0;
|
||||
padding-top: 15px;
|
||||
padding-bottom: 5px;
|
||||
color: #e5b932;
|
||||
}
|
||||
.gmoney {
|
||||
font-size: 16px;
|
||||
margin-top: 0;
|
||||
padding-bottom: 15px;
|
||||
color: #e5b932;
|
||||
}
|
||||
.btn {
|
||||
height: 30px;
|
||||
font-weight: 600;
|
||||
color: #0b1520 !important;
|
||||
}
|
||||
.type {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
background: #e5b932;
|
||||
border-radius: 40px;
|
||||
text-align: center;
|
||||
line-height: 35px;
|
||||
font-weight: 600;
|
||||
margin: 10px auto;
|
||||
}
|
||||
.input {
|
||||
line-height: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.button {
|
||||
line-height: 45px;
|
||||
height: 45px;
|
||||
color: #0b1520 !important;
|
||||
font-weight: bold;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.tip {
|
||||
color: #cc4c0e;
|
||||
font-size: 13px;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<view class="customservice">
|
||||
<u-navbar
|
||||
leftIconColor="#eee"
|
||||
bgColor="#0c0c0d"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
height="60"
|
||||
@leftClick="back"
|
||||
></u-navbar>
|
||||
<view class="cellBox">
|
||||
<view class="cell">
|
||||
<u--image
|
||||
:showLoading="false"
|
||||
:src="require('static/images/customservice.png')"
|
||||
width="100%"
|
||||
height="auto"
|
||||
mode="widthFix"
|
||||
class="icon"
|
||||
></u--image>
|
||||
<u-link
|
||||
target="_blank"
|
||||
:href="customServiceUrl"
|
||||
text="Online service"
|
||||
class="lable"
|
||||
></u-link>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<u--image
|
||||
:showLoading="false"
|
||||
:src="require('static/images/line.png')"
|
||||
width="100%"
|
||||
height="auto"
|
||||
mode="widthFix"
|
||||
class="icon"
|
||||
></u--image>
|
||||
<u-link target="_blank" :href="telegramUrl" text="Telegram" class="lable"></u-link>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<u--image
|
||||
:showLoading="false"
|
||||
:src="require('static/images/telegram.png')"
|
||||
width="100%"
|
||||
height="auto"
|
||||
mode="widthFix"
|
||||
class="icon"
|
||||
></u--image>
|
||||
<u-link target="_blank" :href="lineUrl" text="Line" class="lable"></u-link>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
customServiceUrl: state => state.app.customServiceUrl,
|
||||
telegramUrl: state => state.app.telegramUrl,
|
||||
lineUrl: state => state.app.lineUrl
|
||||
})
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.customservice {
|
||||
background: #0b1520;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
/deep/.u-navbar__content__title {
|
||||
color: #eee;
|
||||
font-weight: 600;
|
||||
}
|
||||
.cellBox {
|
||||
position: absolute;
|
||||
top: 30%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 300px;
|
||||
}
|
||||
.cell {
|
||||
display: flex;
|
||||
padding: 15px;
|
||||
align-items: center;
|
||||
// background: #151617;
|
||||
color: #deb366;
|
||||
.icon {
|
||||
width: 35px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.lable {
|
||||
// border-bottom: 1px solid;
|
||||
color: #deb366 !important;
|
||||
font-size: 30px !important;
|
||||
line-height: 30px !important;
|
||||
/deep/span {
|
||||
border-bottom: 1px solid;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<view class="fund">
|
||||
<u-navbar
|
||||
leftIconColor="#eee"
|
||||
bgColor="#0c0c0d"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
height="60"
|
||||
@leftClick="back"
|
||||
>
|
||||
<view class="nav" slot="center">
|
||||
<view
|
||||
class="li"
|
||||
:class="{ active: active == 'userRecharge' }"
|
||||
@tap="chooseNav('userRecharge')"
|
||||
>{{ $lang.depositRecords }}</view
|
||||
>
|
||||
<view
|
||||
class="li"
|
||||
:class="{ active: active == 'userWithdraw' }"
|
||||
@tap="chooseNav('userWithdraw')"
|
||||
>{{ $lang.withdrawalRecords }}</view
|
||||
>
|
||||
</view>
|
||||
</u-navbar>
|
||||
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<template v-if="active == 'userRecharge'">
|
||||
<view class="box order">
|
||||
{{ $lang.transactionNumber }}: {{ item.out_trade_no }}
|
||||
</view>
|
||||
<view class="box amount"
|
||||
>{{ $lang.rechargeAmount }}: {{ item.amount }}</view
|
||||
>
|
||||
<view class="box amount"
|
||||
>{{ $lang.balance }}: {{ item.new_money }}</view
|
||||
>
|
||||
<view class="box amount"
|
||||
>{{ $lang.rechargeAddress }}: {{ item.from_addr }}</view
|
||||
>
|
||||
<view class="box tiem">
|
||||
{{ $lang.rechargeDate }}: {{ item.create_time }}</view
|
||||
>
|
||||
</template>
|
||||
<template v-if="active == 'userWithdraw'">
|
||||
<view class="box order">
|
||||
{{ $lang.withdrawalNumber }}: {{ item.order_no }}
|
||||
</view>
|
||||
<view class="box amount"
|
||||
>{{ $lang.withdrawalAmount }}: {{ item.amount }}</view
|
||||
>
|
||||
<view class="box free"
|
||||
>{{ $lang.withdrawalCommission }}: {{ item.service_fee }}</view
|
||||
>
|
||||
<view class="box amount"
|
||||
>{{ $lang.balance }}: {{ item.new_money }}</view
|
||||
>
|
||||
<view class="box amount"
|
||||
>{{ $lang.withdrawalAddress }}: {{ item.to_address }}</view
|
||||
>
|
||||
<view class="box tiem">
|
||||
{{ $lang.withdrawalDate }}: {{ item.create_time }}</view
|
||||
>
|
||||
<view class="box tiem">
|
||||
{{ $lang.withdrawalState }}:
|
||||
{{ $lang.statusType[item.status] }}</view
|
||||
>
|
||||
</template>
|
||||
</view>
|
||||
<u-empty
|
||||
:show="status == 'nomore' && list.length == 0"
|
||||
text=" "
|
||||
marginTop="20%"
|
||||
icon="https://cdn.uviewui.com/uview/empty/data.png"
|
||||
>
|
||||
</u-empty>
|
||||
<u-loadmore :status="status" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
active: "userRecharge",
|
||||
status: "loadmore",
|
||||
list: [],
|
||||
page: 1,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
this.getData("refresh");
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.status != "nomore") {
|
||||
this.getData("loading");
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseNav(nav) {
|
||||
this.active = nav;
|
||||
this.getData("refresh");
|
||||
},
|
||||
|
||||
getData(type) {
|
||||
if (type == "refresh") {
|
||||
this.list = [];
|
||||
this.page = 1;
|
||||
} else {
|
||||
this.page += 1;
|
||||
}
|
||||
const params = {
|
||||
user_id: this.userInfo.id,
|
||||
page: this.page,
|
||||
page_size: 10,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.$api[this.active](params)
|
||||
.then((res) => {
|
||||
let list = [];
|
||||
if (res.Success == 1) {
|
||||
list = res?.data?.list || [];
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
if (list.length == 0 || list.length < 10) {
|
||||
this.status = "nomore";
|
||||
}
|
||||
this.list = [...this.list, ...list];
|
||||
})
|
||||
.catch((err) => {
|
||||
this.status = "nomore";
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.fund {
|
||||
/deep/.u-navbar__content__title {
|
||||
color: #eee;
|
||||
font-weight: 600;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
color: #959393;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
.li {
|
||||
background: #242424;
|
||||
padding: 6px 15px;
|
||||
font-weight: 600;
|
||||
&.active {
|
||||
background: #947b2b;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item {
|
||||
color: $u-content-color;
|
||||
font-size: 28rpx;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1px solid #38393b;
|
||||
.box {
|
||||
padding: 10rpx 20rpx;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<view class="game">
|
||||
<u-navbar
|
||||
leftIconColor="#eee"
|
||||
bgColor="#0c0c0d"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
height="60"
|
||||
@leftClick="back"
|
||||
>
|
||||
<view class="nav" slot="center" @tap="show = true">
|
||||
<text>{{ active.name }}</text>
|
||||
<u-icon
|
||||
class="icon"
|
||||
name="arrow-down-fill"
|
||||
color="#959393"
|
||||
size="13"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="data-btn" slot="right">
|
||||
<u-icon
|
||||
v-if="active.game_id == 100"
|
||||
@tap="showDate = true"
|
||||
name="calendar"
|
||||
color="#eee"
|
||||
size="28"
|
||||
></u-icon>
|
||||
<text v-else class="rigt-text">{{ $lang.weekRecord }}</text>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<template v-if="active.game_id == 100">
|
||||
<view class="box"> {{ $lang.gameName }}: {{ item.GameName }} </view>
|
||||
<view class="box">{{ $lang.roomNo }}: {{ item.ChildGameID }}</view>
|
||||
<view class="box">{{ $lang.totalBetting }}: {{ item.AllBet }}</view>
|
||||
<view class="box">{{ $lang.winLose }}: {{ item.ValidBet }}</view>
|
||||
<view class="box" v-if="item.Tax > 0"
|
||||
>{{ $lang.taxation }}: {{ item.Tax }}</view
|
||||
>
|
||||
<view class="box"> {{ $lang.date }}: {{ item.createTime }}</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="box">
|
||||
{{ $lang.tableNumber }}: {{ item.table_name }}
|
||||
</view>
|
||||
<view class="box">{{ $lang.playingMethod }}: {{ item.user_bet }}</view>
|
||||
<view class="box" v-if="item.maliang"
|
||||
>{{ $lang.maliang }}: {{ item.maliang }}</view
|
||||
>
|
||||
<view class="box">{{ $lang.result }}: {{ item.card_result }}</view>
|
||||
<view class="box">{{ $lang.winLose }}: {{ item.win_total }}</view>
|
||||
<view class="box">{{ $lang.date }}: {{ item.create_time }}</view>
|
||||
</template>
|
||||
</view>
|
||||
<u-empty
|
||||
:show="status == 'nomore' && list.length == 0"
|
||||
text=" "
|
||||
marginTop="20%"
|
||||
icon="https://cdn.uviewui.com/uview/empty/data.png"
|
||||
>
|
||||
</u-empty>
|
||||
<u-loadmore :status="status" />
|
||||
<view class="ft" v-if="active.game_id != 100">
|
||||
<view class="text"> {{ $lang.common }}{{ num }}{{ $lang.strip }}</view>
|
||||
<view class="text"> {{ $lang.totalBetting }} {{ alldown }} </view>
|
||||
<view class="text"> {{ $lang.totalWin }} {{ allwin }} </view>
|
||||
</view>
|
||||
<view class="mb60"></view>
|
||||
<l-calendar
|
||||
v-model="showDate"
|
||||
@change="changeDate"
|
||||
:isRange="true"
|
||||
:maxDate="today"
|
||||
:initStartDate="startTime"
|
||||
:initEndDate="endTime"
|
||||
></l-calendar>
|
||||
<u-picker
|
||||
:title="$lang.gameType"
|
||||
closeOnClickOverlay
|
||||
:show="show"
|
||||
:columns="$lang.gameList"
|
||||
:cancelText="$lang.cancel"
|
||||
:confirmText="$lang.confirm"
|
||||
keyName="name"
|
||||
@close="show = false"
|
||||
@cancel="show = false"
|
||||
@confirm="chooseNav"
|
||||
></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
status: "loadmore",
|
||||
list: [],
|
||||
page: 1,
|
||||
num: 0,
|
||||
pagenum: 0,
|
||||
alldown: 0,
|
||||
allwin: 0,
|
||||
show: false,
|
||||
showDate: false,
|
||||
today: dayjs().format("YYYY-MM-D"),
|
||||
startTime: dayjs().subtract(3, "day").format("YYYY-MM-D"),
|
||||
endTime: dayjs().format("YYYY-MM-D"),
|
||||
active: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
this.active = this.$lang.gameList[0][0];
|
||||
console.log(this.$lang.gameList);
|
||||
this.getData("refresh");
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.status != "nomore") {
|
||||
this.getData("loading");
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
chooseNav(nav) {
|
||||
this.active = nav.value[0];
|
||||
this.show = false;
|
||||
this.getData("refresh");
|
||||
},
|
||||
changeDate(date) {
|
||||
this.startTime = date.startDate;
|
||||
this.endTime = date.endDate;
|
||||
this.getData("refresh");
|
||||
},
|
||||
getData(type) {
|
||||
if (type == "refresh") {
|
||||
this.list = [];
|
||||
this.page = 1;
|
||||
} else {
|
||||
this.page += 1;
|
||||
}
|
||||
this.status = "loading";
|
||||
if (this.active.game_id == 100) {
|
||||
this.getGamelog();
|
||||
} else {
|
||||
this.getUserBets();
|
||||
}
|
||||
},
|
||||
getUserBets() {
|
||||
const params = {
|
||||
user_id: this.userInfo.id,
|
||||
api_token: this.userInfo.api_token,
|
||||
game_id: this.active.game_id,
|
||||
page: this.page,
|
||||
time_interval: 3,
|
||||
};
|
||||
this.$api
|
||||
.getUserBets(params)
|
||||
.then((res) => {
|
||||
let list = [];
|
||||
if (res.Success == 1) {
|
||||
const data = res.Data;
|
||||
list = res?.Data?.bet_info || [];
|
||||
this.num = data.bet_num || 0;
|
||||
this.pagenum = data.page_num || 0;
|
||||
this.alldown = data.bet_list_amount || 0;
|
||||
this.allwin = data.bet_list_wintotal || 0;
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
if (list.length == 0 || list.length < 10) {
|
||||
this.status = "nomore";
|
||||
}
|
||||
this.list = [...this.list, ...list];
|
||||
})
|
||||
.catch((err) => {
|
||||
this.status = "nomore";
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {});
|
||||
},
|
||||
getRobBet() {
|
||||
const params = {
|
||||
// user_id: this.userInfo.id,
|
||||
// api_token: this.userInfo.api_token,
|
||||
// game_id: this.active.game_id,
|
||||
// page: this.page,
|
||||
// time_interval: 3,
|
||||
// user_id: this.userInfo.id,
|
||||
// api_token: this.userInfo.api_token,
|
||||
// game_id: this.type,
|
||||
// page: this.robpage,
|
||||
// number_tab_id: number_tab_id,
|
||||
};
|
||||
getRobBet(params)
|
||||
.then((res) => {
|
||||
if (res.Success == 1) {
|
||||
const data = res.Data;
|
||||
console.log(data);
|
||||
// this.showRob = true;
|
||||
// this.robTitle = title;
|
||||
// this.robData = data.bet_info;
|
||||
// this.robnum = data.bet_num;
|
||||
// this.robpagenum = data.page_num;
|
||||
// this.roballdown = data.bet_list_amount;
|
||||
// this.roballwin = data.bet_list_wintotal;
|
||||
} else {
|
||||
// console.log(data)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
getGamelog() {
|
||||
const params = {
|
||||
pageSize: 10,
|
||||
page: this.page,
|
||||
// startTime: dayjs(this.startTime).unix(),
|
||||
// endTime: dayjs(this.endTime).unix(),
|
||||
};
|
||||
|
||||
let start = dayjs(this.startTime).unix(),
|
||||
end = dayjs(this.endTime).unix();
|
||||
|
||||
if (end > start) {
|
||||
params.startTime = start;
|
||||
params.endTime = end + 24 * 60 * 60 * 1000 - 1;
|
||||
} else {
|
||||
params.startTime = end;
|
||||
params.endTime = start + 24 * 60 * 60 * 1000 - 1;
|
||||
}
|
||||
|
||||
this.$api
|
||||
.getGamelog(params)
|
||||
.then((res) => {
|
||||
let list = [];
|
||||
if (res.status_code == 200) {
|
||||
console.log(res);
|
||||
list = res?.data?.list || [];
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.message,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
if (list.length == 0 || list.length < 10) {
|
||||
this.status = "nomore";
|
||||
}
|
||||
this.list = [...this.list, ...list];
|
||||
})
|
||||
.catch((err) => {
|
||||
this.status = "nomore";
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.game {
|
||||
height: calc(100vh - 40px);
|
||||
/deep/.u-navbar__content__title {
|
||||
color: #eee;
|
||||
font-weight: 600;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
font-size: 16px;
|
||||
color: #947b2b;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.icon {
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.rigt-text {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
.item {
|
||||
color: $u-content-color;
|
||||
font-size: 28rpx;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1px solid #38393b;
|
||||
.box {
|
||||
padding: 10rpx 20rpx;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.ft {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 20px;
|
||||
background: #0c0c0d;
|
||||
color: #947b2b;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
}
|
||||
.mb60 {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,261 @@
|
||||
<template>
|
||||
<view class="user">
|
||||
<view class="card">
|
||||
<view class="uid">ID:{{ userInfo.username }}</view>
|
||||
<u--image
|
||||
class="logo"
|
||||
:showLoading="true"
|
||||
:src="loginLogo"
|
||||
width="50px"
|
||||
height="auto"
|
||||
mode="widthFix"
|
||||
></u--image>
|
||||
<view class="box">
|
||||
<view class="text">{{ $lang.userBalance }}</view>
|
||||
<view class="money">{{ money }}</view>
|
||||
</view>
|
||||
<u--image
|
||||
:showLoading="false"
|
||||
:src="require('static/images/card_bg.png')"
|
||||
width="100%"
|
||||
height="auto"
|
||||
mode="widthFix"
|
||||
></u--image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view
|
||||
class="cell"
|
||||
v-for="(item, index) in userMenu"
|
||||
:key="index"
|
||||
@click="goPath(item)"
|
||||
>
|
||||
<view class="lab">{{ item.name }}</view>
|
||||
<u-icon
|
||||
class="icon"
|
||||
name="arrow-right"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="logout" @tap="modalShow = true">{{ $lang.logout }}</view>
|
||||
</view>
|
||||
<u-picker
|
||||
:title="$lang.languageSettings"
|
||||
closeOnClickOverlay
|
||||
:defaultIndex="defaultIndex"
|
||||
:show="show"
|
||||
:columns="langList"
|
||||
:cancelText="$lang.cancel"
|
||||
:confirmText="$lang.confirm"
|
||||
keyName="name"
|
||||
@close="show = false"
|
||||
@cancel="show = false"
|
||||
@confirm="confirm"
|
||||
></u-picker>
|
||||
<u-modal
|
||||
:show="modalShow"
|
||||
:title="$lang.tip"
|
||||
:confirmText="$lang.confirm"
|
||||
:cancelText="$lang.cancel"
|
||||
@confirm="confirmLogout"
|
||||
@cancel="modalShow = false"
|
||||
:showCancelButton="true"
|
||||
ref="uModal"
|
||||
:asyncClose="true"
|
||||
>
|
||||
<view style="text-align: center">{{ $lang.logoutTip }}</view>
|
||||
</u-modal>
|
||||
<view class="mb60"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
modalShow: false,
|
||||
|
||||
defaultIndex: [0],
|
||||
langList: [
|
||||
[
|
||||
{ key: "en", name: "English" },
|
||||
{ key: "tw", name: "繁體中文" },
|
||||
{ key: "cn", name: "简体中文" },
|
||||
{ key: "yn", name: "Việt nam" },
|
||||
{ key: "kr", name: "한국어" },
|
||||
{ key: "tl", name: "แบบไทย" },
|
||||
{ key: "in", name: "Indonesia" },
|
||||
],
|
||||
],
|
||||
money:0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
language: (state) => state.app.language,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
loginLogo: (state) => state.app.loginLogo,
|
||||
userMenu: (state) => {
|
||||
let list = [];
|
||||
const lang = state.app.lang[state.app.language];
|
||||
const userInfo = state.app.userInfo;
|
||||
if (userInfo.pay_channel) {
|
||||
list = lang.userMenu.filter(
|
||||
(v) => v.id != 1
|
||||
);
|
||||
} else {
|
||||
list = lang.userMenu.filter(
|
||||
(v) => v.id != 1 && v.id != 2 && v.id != 4 && v.id != 5
|
||||
);
|
||||
}
|
||||
return list;
|
||||
},
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
this.langList[0].forEach((v, i) => {
|
||||
if (v.key == this.language) {
|
||||
this.defaultIndex = [i];
|
||||
}
|
||||
});
|
||||
this.getUserMoneyData()
|
||||
},
|
||||
methods: {
|
||||
confirm(item) {
|
||||
this.$store.commit("app/updateLanguage", item.value[0].key);
|
||||
this.show = false;
|
||||
},
|
||||
goPath(item) {
|
||||
if (item.id == 0) {
|
||||
this.show = true;
|
||||
} else if (item.id == 4 || item.id == 5 || item.id == 6) {
|
||||
uni.switchTab({
|
||||
url: item.path,
|
||||
});
|
||||
} else {
|
||||
if (this.userInfo.is_sw == 1) {
|
||||
this.$toast({
|
||||
message: this.$lang.is_sw,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
confirmLogout() {
|
||||
localStorage.removeItem("userInfo");
|
||||
this.$router.replace({ path: "/" });
|
||||
},
|
||||
getUserMoneyData() {
|
||||
var that = this
|
||||
const params = {
|
||||
user_id: this.userInfo.id,
|
||||
api_token: this.userInfo.api_token,
|
||||
};
|
||||
this.$api['getUserMoney'](params)
|
||||
.then((res) => {
|
||||
if (res.Success) {
|
||||
that.money = parseFloat(res.Data.money).toFixed(2)
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.user {
|
||||
background: #0b1520;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
.card {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.uid {
|
||||
position: absolute;
|
||||
left: 30px;
|
||||
top: 25px;
|
||||
z-index: 3;
|
||||
font-size: 14px;
|
||||
color: #573d14;
|
||||
}
|
||||
.logo {
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
top: 20px;
|
||||
z-index: 3;
|
||||
}
|
||||
.box {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
z-index: 3;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #573d14;
|
||||
text-align: center;
|
||||
.money {
|
||||
padding-left: 38px;
|
||||
padding-right: 36px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 4px;
|
||||
background: url("/static/images/balance_icon.png") no-repeat;
|
||||
background-size: 33px auto;
|
||||
background-position: left top;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
margin: 20px 15px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
.cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 16px;
|
||||
padding: 15px 10px;
|
||||
color: #deb366;
|
||||
border-bottom: 1px solid #594522;
|
||||
background: #151617;
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
.logout {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
background: #e5b932;
|
||||
font-weight: 600;
|
||||
margin: 20px auto;
|
||||
border-radius: 5px;
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<view class="ifame">
|
||||
<u-navbar
|
||||
leftIconColor="#eee"
|
||||
:title="$lang.safe"
|
||||
bgColor="#0c0c0d"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
height="60"
|
||||
@leftClick="back"
|
||||
>
|
||||
</u-navbar>
|
||||
<view class="section">
|
||||
<!-- <web-view src="https://test-ybf-business02.dcops.cc/?t=MUJ3hn6x2lf65vb-KWbmF2LLcy3kAZZI8U5DWLu7Y1AKdl1PuIg7PIcLyloAAmOyXBWnVWa2RVmwvAK0fQWQkwjujJqPi2B7uv22pZzvr-aFSlW8ld8gfU873DbnBlLozM_LH5dXEHe2iukkANJBOxBEaE3k8DngoHhqSRATSL-KBhdf5vA4r9eEgoNiCU_QRPFMq7AwXYH5UH9wzWLf1hQvB0bszdhnVX_NYAFDuQrVAbLF4Z2WjSGxbe5YoX4TMQKW3FIAyy7nv8ntrjR6gIUz8ccKsSEEthrGwM32nZ3h5RhHs0Juz_hn0WFcL1QqPlspo2GkHNVHaKcaz_Barv-6NIahVoBPFcis_eePqVUZ9Futo0Bj2S8To7DaxXbXzziiKgoltzoN8feHHbKk5LQk1qpKTnoLUdmbT1AnRGOK0-ILJLSSXZAm4y-PG3JzMk6zwvI06z4u5VMinIlowmIKftRRvz_5kJod5tI6Tc_V4qeR53MLbF8MsG7I_cF3GTfY-nDsOp2BjKyrHxxK1vdNj0h4gZAsEmXkdmtpu1_y610WidlpwZEYGgWuyKdqIn1rvRkextQVy2nfZY-gdXral20QpJZBaycQPYoXOAfTU618WwbD2qqj23yzd6nDW06Jp5_ATxtgxBaOsZeoB9kTsjODC3kEn3Q_gqqtyqkRbPv-6g_kmPHY8vZa2MnbYHCGRwPCmI5JHW2R_g5JDgeDAeBmDfyRDnqEwv_gHe564d5fqPi81zND9_zUum7Cpck3xFzzRHwjslmL4lahbtmAs4BJePiF7fqDPD5IgJOgNIg64Qu389AgQ6mQMcrc&v=2"></web-view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad() {},
|
||||
computed: {
|
||||
...mapState({
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ifame {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<view class="resetPassword">
|
||||
<u-navbar
|
||||
leftIconColor="#eee"
|
||||
:title="$lang.reset + $lang.password"
|
||||
bgColor="#0c0c0d"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
height="60"
|
||||
@leftClick="back"
|
||||
>
|
||||
</u-navbar>
|
||||
|
||||
<view class="content">
|
||||
<view class="logo">
|
||||
<u--image
|
||||
:showLoading="false"
|
||||
:src="require('static/images/ez-logo-login.png')"
|
||||
width="125px"
|
||||
height="119px"
|
||||
mode="scaleToFill"
|
||||
></u--image>
|
||||
</view>
|
||||
<u-input
|
||||
class="input"
|
||||
v-model="password_now"
|
||||
:password="true"
|
||||
:placeholder="$lang.enterNowPassword"
|
||||
>
|
||||
<text class="text" slot="prefix">{{ $lang.nowPassword }}</text>
|
||||
</u-input>
|
||||
<u-input
|
||||
class="input"
|
||||
v-model="password_new"
|
||||
:password="true"
|
||||
:placeholder="$lang.enterNewPassword"
|
||||
>
|
||||
<text class="text" slot="prefix">{{ $lang.nwwPassword }}</text>
|
||||
</u-input>
|
||||
<u-input
|
||||
class="input"
|
||||
v-model="password_reply"
|
||||
:password="true"
|
||||
:placeholder="$lang.enterPasswordAgain"
|
||||
>
|
||||
<text class="text" slot="prefix">{{ $lang.confirmPassword }}</text>
|
||||
</u-input>
|
||||
<view class="btn-box">
|
||||
<view class="btn" @tap="reset()">{{ $lang.reset }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
password_now: "",
|
||||
password_new: "",
|
||||
password_reply: "",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
reset() {
|
||||
const params = {
|
||||
password_now: this.password_now,
|
||||
password_new: this.password_new,
|
||||
password_reply: this.password_reply,
|
||||
user_id: this.userInfo.id,
|
||||
api_token: this.userInfo.api_token,
|
||||
};
|
||||
if (!params.password_now) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterNowPassword,
|
||||
duration: 2000,
|
||||
});
|
||||
} else if (!params.password_new) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterNewPassword,
|
||||
duration: 2000,
|
||||
});
|
||||
} else if (!params.password_reply) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterPasswordAgain,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
this.$toast({
|
||||
type: "loading",
|
||||
message: `${this.$lang.submit}...`,
|
||||
duration: 200000,
|
||||
});
|
||||
this.$api
|
||||
.updatePassword(params)
|
||||
.then((res) => {
|
||||
if (res.Success == 1) {
|
||||
this.$toast({
|
||||
type: "success",
|
||||
title: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
this.$toast({
|
||||
title: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
this.$toastHide();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.resetPassword {
|
||||
/deep/.u-navbar__content__title {
|
||||
color: #eee;
|
||||
font-weight: 600;
|
||||
}
|
||||
.content {
|
||||
width: 280px;
|
||||
padding-bottom: 50px;
|
||||
margin: 0 auto;
|
||||
.logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20%;
|
||||
}
|
||||
.input {
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
margin-bottom: 15px;
|
||||
background: #fff;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.phone-code {
|
||||
min-width: 50px;
|
||||
text-align: center;
|
||||
border-right: 1px solid #ddd;
|
||||
}
|
||||
.text {
|
||||
padding-right: 5px;
|
||||
}
|
||||
.btn-box {
|
||||
margin-top: 20px;
|
||||
.btn {
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
background: url("~@/static/images/btn_bg.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-weight: 600;
|
||||
margin-top: 15px;
|
||||
&:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<view class="safe">
|
||||
<u-navbar
|
||||
leftIconColor="#eee"
|
||||
:title="$lang.safe"
|
||||
bgColor="#0c0c0d"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
height="60"
|
||||
@leftClick="back"
|
||||
>
|
||||
</u-navbar>
|
||||
<view
|
||||
class="cell"
|
||||
v-for="(item, index) in $lang.resetPasswordList"
|
||||
:key="index"
|
||||
@click="goRouter(item)"
|
||||
>
|
||||
<view class="lable">{{ item.name }}</view>
|
||||
<u-icon
|
||||
class="icon"
|
||||
name="arrow-right"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
onLoad() {},
|
||||
computed: {
|
||||
...mapState({
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
goRouter(item) {
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.safe {
|
||||
/deep/.u-navbar__content__title {
|
||||
color: #eee;
|
||||
font-weight: 600;
|
||||
}
|
||||
.cell {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 15px;
|
||||
align-items: center;
|
||||
background: #151617;
|
||||
color: #deb366;
|
||||
&:active {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<view class="transaction">
|
||||
<u-navbar
|
||||
leftIconColor="#eee"
|
||||
bgColor="#0c0c0d"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
height="60"
|
||||
@leftClick="back"
|
||||
>
|
||||
<view class="nav" slot="center">
|
||||
<view
|
||||
class="li"
|
||||
:class="{ active: active == 11 }"
|
||||
@tap="chooseNav(11)"
|
||||
>{{ $lang.upperRecord }}</view
|
||||
>
|
||||
<view
|
||||
class="li"
|
||||
:class="{ active: active == 12 }"
|
||||
@tap="chooseNav(12)"
|
||||
>{{ $lang.lowerRecord }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="data-btn" slot="right">
|
||||
<u-icon
|
||||
@tap="showDate = true"
|
||||
name="calendar"
|
||||
color="#eee"
|
||||
size="28"
|
||||
></u-icon>
|
||||
</view>
|
||||
</u-navbar>
|
||||
|
||||
<view class="item" v-for="(item, index) in list" :key="index">
|
||||
<template v-if="active == 11">
|
||||
<view class="box order">
|
||||
{{ $lang.transactionNumber }}: {{ item.OrderNo }}
|
||||
</view>
|
||||
<view class="box amount"
|
||||
>{{ $lang.upSplitAmount }}: {{ item.Money }}</view
|
||||
>
|
||||
<view class="box tiem">
|
||||
{{ $lang.upSplitDate }}: {{ item.CreateTime }}</view
|
||||
>
|
||||
<view class="box tiem">
|
||||
{{ $lang.upSplitState }}: {{ $lang.statusType[item.Status] }}</view
|
||||
>
|
||||
</template>
|
||||
<template v-if="active == 12">
|
||||
<view class="box order">
|
||||
{{ $lang.transactionNumber }}: {{ item.OrderNo }}
|
||||
</view>
|
||||
<view class="box amount"
|
||||
>{{ $lang.downSplitAmount }}: {{ item.Money }}</view
|
||||
>
|
||||
<view class="box tiem">
|
||||
{{ $lang.downSplitDate }}: {{ item.CreateTime }}</view
|
||||
>
|
||||
<view class="box tiem">
|
||||
{{ $lang.downSplitState }}: {{ $lang.statusType[item.Status] }}</view
|
||||
>
|
||||
</template>
|
||||
</view>
|
||||
<u-empty
|
||||
:show="status == 'nomore' && list.length == 0"
|
||||
text=" "
|
||||
marginTop="20%"
|
||||
icon="https://cdn.uviewui.com/uview/empty/data.png"
|
||||
>
|
||||
</u-empty>
|
||||
<u-loadmore :status="status" />
|
||||
<l-calendar
|
||||
v-model="showDate"
|
||||
@change="changeDate"
|
||||
:isRange="true"
|
||||
:maxDate="today"
|
||||
:initStartDate="startTime"
|
||||
:initEndDate="endTime"
|
||||
></l-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
active: 11,
|
||||
status: "loadmore",
|
||||
list: [],
|
||||
page: 1,
|
||||
showDate: false,
|
||||
today: dayjs().format("YYYY-MM-D"),
|
||||
startTime: dayjs().subtract(1, "week").format("YYYY-MM-D"),
|
||||
endTime: dayjs().format("YYYY-MM-D"),
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
onLoad() {
|
||||
this.getData("refresh");
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getData("loading");
|
||||
},
|
||||
methods: {
|
||||
chooseNav(nav) {
|
||||
this.active = nav;
|
||||
this.getData("refresh");
|
||||
},
|
||||
changeDate(date) {
|
||||
this.startTime = date.startDate;
|
||||
this.endTime = date.endDate;
|
||||
this.getData("refresh");
|
||||
},
|
||||
getData(type) {
|
||||
if (type == "refresh") {
|
||||
this.list = [];
|
||||
this.page = 1;
|
||||
} else {
|
||||
this.page += 1;
|
||||
}
|
||||
const params = {
|
||||
type: this.active,
|
||||
pageSize: 10,
|
||||
page: this.page,
|
||||
};
|
||||
let start = dayjs(this.startTime).unix(),
|
||||
end = dayjs(this.endTime).unix();
|
||||
|
||||
if (end > start) {
|
||||
params.startTime = start;
|
||||
params.endTime = end + 24 * 60 * 60 * 1000 - 1;
|
||||
} else {
|
||||
params.startTime = end;
|
||||
params.endTime = start + 24 * 60 * 60 * 1000 - 1;
|
||||
}
|
||||
|
||||
this.status = "loading";
|
||||
this.$api
|
||||
.getScorelog(params)
|
||||
.then((res) => {
|
||||
let list = [];
|
||||
if (res.status_code == 200) {
|
||||
console.log(res);
|
||||
list = res?.data?.list || [];
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.message,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
if (list.length == 0 || list.length < 10) {
|
||||
this.status = "nomore";
|
||||
}
|
||||
this.list = [...this.list, ...list];
|
||||
})
|
||||
.catch((err) => {
|
||||
this.status = "nomore";
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.transaction {
|
||||
/deep/.u-navbar__content__title {
|
||||
color: #eee;
|
||||
font-weight: 600;
|
||||
}
|
||||
.nav {
|
||||
display: flex;
|
||||
color: #959393;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
.li {
|
||||
background: #242424;
|
||||
padding: 6px 15px;
|
||||
font-weight: 600;
|
||||
&.active {
|
||||
background: #947b2b;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item {
|
||||
color: $u-content-color;
|
||||
font-size: 28rpx;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1px solid #38393b;
|
||||
.box {
|
||||
padding: 10rpx 20rpx;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<view class="withdraw">
|
||||
<u-navbar
|
||||
title=""
|
||||
bgColor="#000"
|
||||
:placeholder="true"
|
||||
:fixed="true"
|
||||
leftIcon=""
|
||||
height="60"
|
||||
>
|
||||
<view slot="left">
|
||||
<text class="navbar-lab">{{ $lang.withdraw }}</text>
|
||||
</view>
|
||||
</u-navbar>
|
||||
<view class="content">
|
||||
<view class="list">
|
||||
<view class="lable money"
|
||||
>{{ $lang.balance }}:{{ userInfo.money }}</view
|
||||
>
|
||||
</view>
|
||||
<view class="picker-view" @click="show = true">
|
||||
<u-input
|
||||
readonly
|
||||
:placeholder="$lang.pleaseChoose"
|
||||
color="#93979b"
|
||||
v-model="type"
|
||||
border="none"
|
||||
>
|
||||
<u--text
|
||||
:text="$lang.chooseWithdraw"
|
||||
slot="prefix"
|
||||
margin="0 3px 0 0"
|
||||
type="tips"
|
||||
></u--text>
|
||||
<u-icon
|
||||
slot="suffix"
|
||||
name="arrow-down-fill"
|
||||
color="#757272"
|
||||
size="16"
|
||||
></u-icon>
|
||||
</u-input>
|
||||
</view>
|
||||
<u-picker
|
||||
:title="$lang.pleaseChooseWithdraw"
|
||||
closeOnClickOverlay
|
||||
:show="show"
|
||||
:columns="columns"
|
||||
:cancelText="$lang.cancel"
|
||||
:confirmText="$lang.confirm"
|
||||
@cancel="close"
|
||||
@close="close"
|
||||
@confirm="confirm"
|
||||
></u-picker>
|
||||
<view class="list">
|
||||
<view class="lable">{{ $lang.walletAddress }}</view>
|
||||
<u-input
|
||||
class="input"
|
||||
color="#947b2b"
|
||||
clearable
|
||||
:placeholder="$lang.enterWithdrawalAddress"
|
||||
border="surround"
|
||||
v-model="address"
|
||||
></u-input>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="lable">{{ $lang.amount }}</view>
|
||||
<u-input
|
||||
class="input"
|
||||
color="#947b2b"
|
||||
clearable
|
||||
:placeholder="$lang.enterWithdrawalamount"
|
||||
border="surround"
|
||||
v-model="money"
|
||||
></u-input>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="lab">{{ $lang.rechargeWithdrawNetwork }}</view>
|
||||
<view class="type">TRC20</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<u-button
|
||||
@tap="applyWithdraw"
|
||||
class="button"
|
||||
color="#e5b932"
|
||||
:text="$lang.submit"
|
||||
></u-button>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="tip">{{ $lang.withdrawTip }}</view>
|
||||
<view class="tip">{{ $lang.commission }}:1 USDT</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mb60"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
address: "",
|
||||
money: "",
|
||||
type: "USDT",
|
||||
show: false,
|
||||
columns: [["USDT"]],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
userInfo: (state) => state.app.userInfo,
|
||||
$lang: (state) => state.app.lang[state.app.language],
|
||||
}),
|
||||
},
|
||||
onLoad() {},
|
||||
methods: {
|
||||
confirm(chose) {
|
||||
this.type = chose.value[0];
|
||||
this.close();
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
applyWithdraw() {
|
||||
const params = {
|
||||
user_id: this.userInfo.id,
|
||||
to_addr: this.address,
|
||||
amount: this.money,
|
||||
};
|
||||
if (!params.to_addr) {
|
||||
this.$toast({
|
||||
message: this.$lang.enterWithdrawalAddress,
|
||||
duration: 2000,
|
||||
});
|
||||
} else if (!params.amount) {
|
||||
this.$toast({
|
||||
message: this.$lang.amountCannotBe0,
|
||||
duration: 2000,
|
||||
});
|
||||
} else {
|
||||
this.$toast({
|
||||
type: "loading",
|
||||
message: this.$lang.submittingApplication,
|
||||
duration: 200000,
|
||||
});
|
||||
this.$api
|
||||
.applyWithdraw(params)
|
||||
.then((res) => {
|
||||
if (res.Success) {
|
||||
this.$toast({
|
||||
type: "success",
|
||||
message: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
this.address = "";
|
||||
this.money = "";
|
||||
} else {
|
||||
this.$toast({
|
||||
message: res.Msg,
|
||||
duration: 2000,
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
.finally(() => {
|
||||
this.$toastHide();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.withdraw {
|
||||
background: #0b1520;
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
.navbar-lab {
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
}
|
||||
.content {
|
||||
margin: 5px 5px;
|
||||
border: 2px solid #947b2b;
|
||||
background: #222222;
|
||||
box-sizing: border-box;
|
||||
padding: 15px;
|
||||
min-height: 400px;
|
||||
|
||||
.picker-view {
|
||||
border: 2px solid #947b2b;
|
||||
padding: 8px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.list {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
.lab {
|
||||
color: #757272;
|
||||
margin: 10px 0;
|
||||
}
|
||||
.lable {
|
||||
text-align: left;
|
||||
color: #ddd;
|
||||
margin-top: 20px;
|
||||
font-size: 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.money {
|
||||
font-size: 16px;
|
||||
margin-top: 0;
|
||||
padding: 15px 0;
|
||||
color: #e5b932;
|
||||
}
|
||||
.btn {
|
||||
height: 30px;
|
||||
font-weight: 600;
|
||||
color: #0b1520 !important;
|
||||
}
|
||||
.type {
|
||||
width: 70px;
|
||||
height: 35px;
|
||||
background: #e5b932;
|
||||
border-radius: 40px;
|
||||
text-align: center;
|
||||
line-height: 35px;
|
||||
font-weight: 600;
|
||||
margin: 10px auto;
|
||||
}
|
||||
.input {
|
||||
line-height: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.button {
|
||||
line-height: 45px;
|
||||
height: 45px;
|
||||
color: #0b1520 !important;
|
||||
font-weight: bold;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.tip {
|
||||
color: #cc4c0e;
|
||||
font-size: 13px;
|
||||
text-align: justify;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user