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)
// userinfo()
store.dispatch("setUserInfo");
return true;
}else{
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);
if(res.code==0){
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",
zhanghao: "accounts",
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",
shurumima: "Please enter your password",
wangjimima: "Forget the password?",

View File

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

View File

@ -73,7 +73,12 @@ export function getweek(time: string, id: string,zhou?: number){
dayjs.extend(timezone)
const days: any = dayjs;
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)
if(zhou != undefined){

View File

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

View File

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

View File

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

View File

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

View File

@ -213,13 +213,21 @@ export default defineComponent({
async function getdates(userid: number){
getdatelist(month.value.start, month.value.end, userid).then((res: any)=>{
console.log(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
}
}
}
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(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].list == undefined){
month.value.date[j][k].list = [];

View File

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