Browse Source

修改

master
453530270@qq.com 2 years ago
parent
commit
9334569851
  1. 16
      src/api/server/index.js
  2. 27
      src/views/setting/login-pwd.vue
  3. 79
      src/views/wallet/exchange-assets.vue
  4. 5
      src/views/wallet/funding.vue

16
src/api/server/index.js

@ -175,15 +175,15 @@ server.interceptors.response.use(
}
// 错误提示
Message({
type: 'error',
duration: 2 * 1000,
message,
callback() {
// 进入catch
// Message({
// type: 'error',
// duration: 2 * 1000,
// message,
// callback() {
// // 进入catch
throw new Error(error);
}
});
// }
// });
return Promise.reject(error)
}
)

27
src/views/setting/login-pwd.vue

@ -20,6 +20,13 @@
:placeholder="$t('setting.pleaseConfirmPassword')"
/>
</div>
<!-- Captcha -->
<div class="form-group">
<label>{{$t('common.GraphicValidation')}}</label>
<input type="text" id="gccode" v-model="user.gc_code" required
:placeholder="$t('common.GraphicValidation')" class="form-control col-6" />
<img class="col-6" :src="Graph_che" @click="gett_gc_code">
</div>
<div class="form-group" v-if="detail.phone_status==1">
<label>{{$t('setting.smsVer')}}</label>
<div class="input-group mb-3">
@ -70,7 +77,9 @@
</template>
<script>
import Member from "@/api/member";
import Setting from "../../api/setting";
export default {
props: ["detail"],
data() {
@ -81,10 +90,26 @@ export default {
sms_code: "",
email_code: "",
google_code: ""
}
},
Graph_che:'', // gc code image
gc_key:'', // tuxiangyanzheng key
};
},
methods: {
// get gc code from api
gett_gc_code(){
Member.sendGCode().then( (res) =>{
this.gc_key = res.key
this.Graph_che = res.img
this.$message({
message: `${type} ${this.$t("login.sendOK")}`,
type: "success",
duration : 2000,
});
}).catch( err =>{
//console.log(err)
});
},
setPassword() {
let data = this.form;
if (utils.validate(".edit-password")) {

79
src/views/wallet/exchange-assets.vue

@ -109,7 +109,7 @@
<div class="mb-2 mr-sm-2">
<input type="text" v-model="keyword" class="form-control mb-2 mr-sm-2" :placeholder="$t('wallet.searchCurrency')" />
<router-link to="/wallet/address" class="btn btn-success rounded-pill mb-2">{{$t('wallet.addressManagement')}}</router-link>
<router-link to="/wallet/address" class="btn btn-primary rounded-pill mb-2">{{$t('wallet.addressManagement')}}</router-link>
</div>
</form>
<div class="tab-content">
@ -142,7 +142,8 @@
<div class="btn-group btn-group-sm" role="group" aria-label="Basic example">
<!-- data-target="#deposite" -->
<button type="button" class="btn btn-outline-primary" data-toggle="modal" @click="enterDeposite(item)" :disabled="!item.is_withdraw">{{$t('wallet.recharge')}}</button>
<button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#withdraw" @click="enterWithdraw(item)" :disabled="!item.is_withdraw">{{$t('wallet.withdrawal')}}</button>
<!-- <button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#withdraw" @click="enterWithdraw(item)" :disabled="!item.is_withdraw">{{$t('wallet.withdrawal')}}</button> -->
<button type="button" class="btn btn-outline-primary" data-target="#withdraw" @click="enterWithdraw(item)" :disabled="!item.is_withdraw">{{$t('wallet.withdrawal')}}</button>
<div class="btn-group btn-group-sm" role="group">
<button id="btnGroupDrop1" type="button" class="btn btn-outline-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{$t('wallet.transaction')}}</button>
@ -358,27 +359,29 @@
<div class="input-group input-group-sm">
<input type="number" v-model="withdraw.amount" step="0.00000001" :placeholder="$t('wallet.enterDrawNum')" class="form-control" />
</div>
<span class="text-right">{{$t('wallet.handlingFee1')}}: {{withdrawCoin=='USDT'&&withdraw.addressType==3?withdrawFee.trc20:withdrawFee.withdrawal_fee }} {{withdrawCoin}}</span>
<div class="input-group input-group-sm password">
<input v-model="withdraw.password" required :placeholder="$t('login.password')" class="form-control" />
</div>
</div>
<div class="form-group mt-2">
<label class="d-flex justify-content-between" for="" style="align-items: center;">
<span>{{$t('login.email-code')}}</span>
<span class="getCodeAA" @click="getEmailCode">
<span v-if="!getEmailCodeLock">{{$t('common.getCode')}}</span>
<span v-else>{{ daojishi }}</span>
</span>
</label>
<div class="input-group input-group-sm">
<input type="text" id="EmailCode" v-model="withdraw.emailcode" :placeholder="$t('common.enterEmailCode')" class="form-control" />
<div class="form-group mt-2">
<label class="d-flex justify-content-between" for="formGroupPWDInput">
<span>{{$t('login.password')}}</span>
</label>
<div class="input-group input-group-sm">
<input type="password" v-model="withdraw.password" :placeholder="$t('common.enterPwd')" class="form-control" id="formGroupPWDInput" />
</div>
</div>
<!-- 提币验证码 -->
<div class="form-group mt-2">
<label class="d-flex justify-content-between" for="" style="align-items: center;">
<span>{{$t('login.email-code')}}</span>
<span class="getCodeAA" @click="getEmailCode">
<span v-if="!getEmailCodeLock">{{$t('common.getCode')}}</span>
<span v-else>{{ daojishi }}</span>
</span>
</label>
<div class="input-group input-group-sm">
<input type="text" id="EmailCode" v-model="withdraw.emailcode" :placeholder="$t('common.enterEmailCode')" class="form-control" />
</div>
</div>
</div>
</form>
</div>
<div class="col-md-6">
@ -624,6 +627,12 @@ export default {
//
enterWithdraw(item) {
// console.log(this.ProfileDetail.status)
if(this.ProfileDetail.status!=2){
this.$router.push("/profile/certification");
return;
}
$('#withdraw').modal('show');
this.withdrawCoin = item.coin_name;
this.withdraw.coin_id = item.coin_id;
//
@ -679,13 +688,22 @@ export default {
this.userInfo = res
});
},
getAuthInfo() {
Profile.getAuthInfo({}).then(res => {
this.ProfileDetail = res;
console.log(this.ProfileDetail, 11111)
});
},
//
PageScrollTo(num){
document.documentElement.scrollTop = num;
},
//
getEmailCode(){
if(!this.withdraw.address){
this.$message({
message: this.$t('wallet.enterDrawAddress'),
// message: 'mlkdfdks',
// type: "warn",
type: "warn",
duration : 2000,
});
return;
@ -693,15 +711,16 @@ export default {
if(!this.withdraw.amount){
this.$message({
message: this.$t('wallet.enterDrawNum'),
// type: "warn",
type: "warn",
duration : 2000,
});
return;
}
if(!this.withdraw.password){
this.$message({
// message: this.$t('login.password'),
message: this.$t('common.enterPwd'),
// type: "warn",
type: "warn",
duration : 2000,
});
return;
@ -717,6 +736,7 @@ export default {
this.JStime--;
}, 1000)
this.getEmailCodeLock = true;
//
// let gdata = {bt:this.withdraw.addressType,baddr:this.withdraw.address,bnum:this.withdraw.amount}
let gdata = {bt:this.withdrawCoin,baddr:this.withdraw.address,bnum:this.withdraw.amount}
Member.getWdcode(gdata).then(res => {
@ -735,7 +755,8 @@ created() {
this.getUserAssets();
this.getCoinAssets();
this.createWalletAddress();
this.getUserInfo()
this.getUserInfo();
this.getAuthInfo();
},
mounted() {
@ -769,6 +790,14 @@ created() {
// console.error('Action:', e.action);
// console.error('Trigger:', e.trigger);
});
//
let isNeedScroll = this.$route.fullPath.split('?buy=')[1];
// console.log(this.$route.fullPath,121212121, isNeedScroll);
if(isNeedScroll){
setTimeout(() => {
this.PageScrollTo(775);
}, 1500);
}
}
};
</script>

5
src/views/wallet/funding.vue

@ -189,7 +189,10 @@ export default {
},
getDepositHistories() {
Wallet.depositHistory().then(data => this.depositHistories = data.data).catch(err => { });
Wallet.depositHistory().then(data => {
this.depositHistories = data.data;
console.log( this.depositHistories, ' this.depositHistories')
}).catch(err => { });
},
getRechargeManualLog() {

Loading…
Cancel
Save