Merge pull request 'xbx' (#144) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/144
This commit is contained in:
luyuan 2020-11-20 17:52:42 +08:00
commit 46bdea137d
10 changed files with 58 additions and 21 deletions

View File

@ -358,8 +358,10 @@ export async function cashout(data?: any,accountinfo?: any){
message.success(res.msg) message.success(res.msg)
// userinfo() // userinfo()
store.dispatch("setUserInfo"); store.dispatch("setUserInfo");
return true;
}else{ }else{
message.error(res.msg) message.error(res.msg)
return false;
} }
} }
/** /**
@ -394,6 +396,10 @@ export async function editaccount( id: any,data?: any){
const res=await put<Liveaddrule>('wallect/' +id ,data); const res=await put<Liveaddrule>('wallect/' +id ,data);
if(res.code==0){ if(res.code==0){
message.success("修改成功") message.success("修改成功")
router.push("/mine/wallet")
}else{
message.error(res.msg)
} }
} }
/** /**

View File

@ -42,7 +42,7 @@ export default {
banquan: "Copyright Beelink Inc. All rights reserved 2019-2022", banquan: "Copyright Beelink Inc. All rights reserved 2019-2022",
zhanghao: "accounts", zhanghao: "accounts",
shuruzhanghao: "Please enter your email or mobile phone number", shuruzhanghao: "Please enter your email or mobile phone number",
shuruzhanghaol: "Please enter your email address or country number + mobile phone number34690xxx", shuruzhanghaol: "Email or country + mobile No.e.g. Spain, 34690xxx",
mima: "password", mima: "password",
shurumima: "Please enter your password", shurumima: "Please enter your password",
wangjimima: "Forget the password?", wangjimima: "Forget the password?",

View File

@ -52,7 +52,7 @@ export default createStore({
zoneStr: "中途岛GMT-11:00", zoneStr: "中途岛GMT-11:00",
zoneid: 1, zoneid: 1,
symbol: "$", symbol: "$",
zoneValue:"", zoneValue: "Atlantic/South_Georgia",
currencytag: 0 currencytag: 0
}, },
islogin: false, islogin: false,

View File

@ -73,7 +73,12 @@ export function getweek(time: string, id: string,zhou?: number){
dayjs.extend(timezone) dayjs.extend(timezone)
const days: any = dayjs; const days: any = dayjs;
console.log(id, 11111) console.log(id, 11111)
let now = days((!time ? undefined : time)).tz(id) let now;
try {
now = days((!time ? undefined : time)).tz(id)
} catch (error) {
now = days(undefined).tz(id)
}
console.log(now, 11111) console.log(now, 11111)
if(zhou != undefined){ if(zhou != undefined){

View File

@ -52,7 +52,6 @@
<a-form-item :label="lan.$t('zhanghao')" class="form-item"> <a-form-item :label="lan.$t('zhanghao')" class="form-item">
<a-input-group compact> <a-input-group compact>
<a-input <a-input
style="width: 80%"
:placeholder="lan.$t('shuruzhanghaol')" :placeholder="lan.$t('shuruzhanghaol')"
v-model:value="userinfo.phone" v-model:value="userinfo.phone"
/> />

View File

@ -1372,9 +1372,10 @@ export default defineComponent({
line-height: 23px; line-height: 23px;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
position: fixed; position: absolute;
bottom: 100px; top: 1.5rem;
right: 300px; right: 1rem;
} }
// .submit-btn:hover { // .submit-btn:hover {
// background: #08ae98; // background: #08ae98;

View File

@ -61,7 +61,7 @@
</div> </div>
</div> </div>
<div class="zhanghao"> <div class="zhanghao">
{{lan.$t('zhanghao')}}{{i.account}} {{lan.$t('zhanghao')}}{{i.account || i.bankcode}}
</div> </div>
</div> </div>
</a-radio> </a-radio>
@ -113,7 +113,7 @@
<div <div
class="ale" class="ale"
v-if=" v-if="
payinfo.money < 100 || payinfo.money > parseFloat(yue) payinfo.money < parseInt(minwithdraw) || payinfo.money > parseFloat(yue)
" "
> >
*{{lan.$t('yueshu')}} {{danwei + parseFloat(yue) }}{{lan.$t('zuiditixian')}} *{{lan.$t('yueshu')}} {{danwei + parseFloat(yue) }}{{lan.$t('zuiditixian')}}
@ -139,6 +139,7 @@ export default defineComponent({
NavBottom, NavBottom,
}, },
setup() { setup() {
const lan: any = useI18n(); const lan: any = useI18n();
const money = ref(0); const money = ref(0);
const payinfo = ref<any>({ const payinfo = ref<any>({
@ -172,6 +173,7 @@ export default defineComponent({
function all() { function all() {
payinfo.value.money = yue.value; payinfo.value.money = yue.value;
} }
function sub() { function sub() {
console.log(toRaw(payinfo.value)); console.log(toRaw(payinfo.value));
@ -189,7 +191,11 @@ export default defineComponent({
cashout( cashout(
toRaw(payinfo.value), toRaw(payinfo.value),
toRaw(accountlist.value)[payinfo.value.type] toRaw(accountlist.value)[payinfo.value.type]
); ).then((res: boolean)=>{
if(res){
router.push("/mine/wallet")
}
})
} }
// cashout( // cashout(
@ -202,6 +208,8 @@ export default defineComponent({
router.push(url) router.push(url)
} }
const minwithdraw = computed(()=>store.state.seting.minwithdraw)
return { return {
money, money,
moneychange, moneychange,
@ -214,7 +222,8 @@ export default defineComponent({
store, store,
lan, lan,
navto, navto,
danwei danwei,
minwithdraw
}; };
}, },
}); });

View File

@ -222,7 +222,7 @@
<p>{{ lan.$t("querenquxiao") }}</p> <p>{{ lan.$t("querenquxiao") }}</p>
</a-modal> </a-modal>
<nav-bottom></nav-bottom> <nav-bottom></nav-bottom>
<div class="tishi" v-if="!jinzhi"> <div class="tishi" v-if="false">
{{ lan.$t("zhibotishi") }} {{ lan.$t("zhibotishi") }}
</div> </div>

View File

@ -213,13 +213,21 @@ export default defineComponent({
async function getdates(userid: number){ async function getdates(userid: number){
getdatelist(month.value.start, month.value.end, userid).then((res: any)=>{ getdatelist(month.value.start, month.value.end, userid).then((res: any)=>{
console.log(res) console.log(res)
for(const i in res){ // const day = getDay(res[i].dateline)
const day = getDay(res[i].dateline)
for(const j in month.value.date){ for(const j in month.value.date){
for(const k in month.value.date[j]){ for(const k in month.value.date[j]){
if(yue.value == 0 && month.value.date[j][k].day == month.value.day){ if(yue.value == 0 && month.value.date[j][k].day == month.value.day){
month.value.date[j][k].s = 1 month.value.date[j][k].s = 1
} }
}
}
for(const i in res){
const day = getDay(res[i].dateline)
for(const j in month.value.date){
for(const k in month.value.date[j]){
// if(yue.value == 0 && month.value.date[j][k].day == month.value.day){
// month.value.date[j][k].s = 1
// }
if(month.value.date[j][k].day == day){ if(month.value.date[j][k].day == day){
if(month.value.date[j][k].list == undefined){ if(month.value.date[j][k].list == undefined){
month.value.date[j][k].list = []; month.value.date[j][k].list = [];

View File

@ -249,7 +249,7 @@
} }
</style> </style>
<script lang="ts"> <script lang="ts">
import { defineComponent, ref, watch } from "vue"; import { computed, defineComponent, ref, watch } from "vue";
import { getDay, gethour, getminute, gettime, getweek } from "@/utils/date"; import { getDay, gethour, getminute, gettime, getweek } from "@/utils/date";
import store from '@/store'; import store from '@/store';
import { getdatelist, userinfo } from '@/api'; import { getdatelist, userinfo } from '@/api';
@ -260,11 +260,12 @@ import { useRoute } from 'vue-router';
export default defineComponent({ export default defineComponent({
props: {}, props: {},
setup() { setup() {
const userinfo = computed(()=>store.state.userinfo)
const zhou = ref(0); const zhou = ref(0);
const time: any = useRoute().query.time; const time: any = useRoute().query.time;
const week = ref<any>(getweek(time, store.state.userinfo.zoneValue)); let userid = userinfo.value.memberid;
const userid = store.state.userinfo.memberid; const week = ref<any>(getweek(time, userinfo.value.zoneValue));
console.log(week.value);
function getdates(userid: number){ function getdates(userid: number){
getdatelist(week.value.start, week.value.end, userid).then((res: any)=>{ getdatelist(week.value.start, week.value.end, userid).then((res: any)=>{
console.log(res) console.log(res)
@ -287,6 +288,13 @@ export default defineComponent({
console.log(week.value) console.log(week.value)
}) })
} }
watch(userinfo,()=>{
userid = userinfo.value.memberid;
getdates(userid);
week.value = getweek(time, userinfo.value.zoneValue);
})
console.log(week.value);
getdates(userid); getdates(userid);
@ -301,7 +309,7 @@ export default defineComponent({
dayjs.extend(utc) dayjs.extend(utc)
dayjs.extend(timezone) dayjs.extend(timezone)
const days: any = dayjs; const days: any = dayjs;
const now = days().tz(store.state.userinfo.zoneValue) const now = days().tz(userinfo.value.zoneValue)
const xiaoshi = now.hour() const xiaoshi = now.hour()
const fenzhong = now.minute() const fenzhong = now.minute()
top.value = (xiaoshi + (fenzhong / 60)) * 0.63; top.value = (xiaoshi + (fenzhong / 60)) * 0.63;
@ -310,7 +318,7 @@ export default defineComponent({
}, 2000) }, 2000)
watch(zhou, (value) => { watch(zhou, (value) => {
week.value = getweek(time, store.state.userinfo.zoneValue, value); week.value = getweek(time, userinfo.value.zoneValue, value);
console.log(week.value); console.log(week.value);
getdates(userid) getdates(userid)
}); });
@ -341,6 +349,7 @@ export default defineComponent({
console.log(url) console.log(url)
router.push(url) router.push(url)
} }
return { return {
zhou, zhou,
week, week,