商家认证功能调整

master
钟海欣 5 years ago
parent 702dce68f0
commit 1c61cebf7d
  1. 7
      src/api/coin.js
  2. 3
      src/locales/lang/exchange.en.js
  3. 3
      src/locales/lang/exchange.zh-CN.js
  4. 3
      src/locales/lang/exchange.zh-HK.js
  5. 39
      src/pages/exchange.vue
  6. 18
      src/pages/index.vue
  7. 24
      src/views/personal/profile.vue

@ -68,3 +68,10 @@ export function getCancelApply() {
method: 'post', method: 'post',
}); });
} }
// 查询用户市商状态
export function cheackApply() {
return request({
url: c2cApi + '/marketUser/getStatusByUserId',
method: 'get',
});
}

@ -148,6 +148,9 @@ export default {
success: 'Cancellation Successful', success: 'Cancellation Successful',
deled: 'Cancelled', deled: 'Cancelled',
yue: 'Insufficient wallet balance', yue: 'Insufficient wallet balance',
market: 'The merchant has been certified.',
marketcancel: 'Merchant cancellation.',
bemarket: 'Business application successful!',
}, },
}, },
}; };

@ -139,6 +139,9 @@ export default {
success: '取消成功', success: '取消成功',
deled: '已取消', deled: '已取消',
yue: '钱包余额不足', yue: '钱包余额不足',
market: '商家已认证',
marketcancel: '商家取消中',
bemarket: '申请商家成功!',
}, },
}, },
}; };

@ -139,6 +139,9 @@ export default {
success: '取消成功', success: '取消成功',
deled: '已取消', deled: '已取消',
yue: '錢包余額不足', yue: '錢包余額不足',
market: '商家已認證',
marketcancel: '商家取消中',
bemarket: '申請商家成功!',
}, },
}, },
}; };

@ -25,8 +25,19 @@
</ul> </ul>
<!-- 申请商家 --> <!-- 申请商家 -->
<div class="merchant"> <div class="merchant">
<span class="apply" @click="handleSure()">{{ <!-- 商家已认证 -->
$t('exchangeotc.merchant.name') <span v-if="applyStatus == 'MARKET'">{{
$t('exchangeotc.merchant.market')
}}</span>
<span
v-else-if="(applyStatus = 'null' || applyStatus == 'NOTMARKET')"
class="apply"
@click="handleSure()"
>{{ $t('exchangeotc.merchant.name') }}</span
>
<!-- 商家取消中 -->
<span v-else-if="applyStatus == 'CANCELING'">{{
$t('exchangeotc.merchant.marketcancel')
}}</span> }}</span>
</div> </div>
<!-- 判断点击的时候什么 切换对应的子组件 --> <!-- 判断点击的时候什么 切换对应的子组件 -->
@ -39,7 +50,6 @@
<ExchangeTableSell v-if="hackReset"></ExchangeTableSell> <ExchangeTableSell v-if="hackReset"></ExchangeTableSell>
</div> </div>
</main> </main>
<Footer></Footer> <Footer></Footer>
</div> </div>
</template> </template>
@ -49,7 +59,7 @@ import NavHeader from '@/components/common/header';
import Footer from '@/components/common/footer'; import Footer from '@/components/common/footer';
import ExchangeTableBi from '@/components/exchange/exchange-tabgle-bi'; import ExchangeTableBi from '@/components/exchange/exchange-tabgle-bi';
import ExchangeTableSell from '@/components/exchange/exchange-table-sell'; import ExchangeTableSell from '@/components/exchange/exchange-table-sell';
import {getMarketApplyl} from '@/api/coin'; import {getMarketApplyl, cheackApply} from '@/api/coin';
export default { export default {
name: 'exchange', name: 'exchange',
components: { components: {
@ -64,8 +74,12 @@ export default {
hackResetBuy: true, hackResetBuy: true,
showCommentInput: true, // showCommentInput: true, //
ifCommentInput: false, // ifCommentInput: false, //
applyStatus: '',
}; };
}, },
created() {
this.getcheckApply(); //
},
methods: { methods: {
// table // table
hangdelClickShow() { hangdelClickShow() {
@ -91,7 +105,21 @@ export default {
this.checked = false; this.checked = false;
getMarketApplyl().then(res => { getMarketApplyl().then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
this.$message.success(res.data.msg); //
this.$message.success(this.$t('exchangeotc.merchant.bemarket'));
setInterval(() => {
location.reload(); //
}, 1000);
} else {
this.$message.error(res.data.msg);
}
});
},
//
getcheckApply() {
cheackApply().then(res => {
if (res.data.code === 200) {
this.applyStatus = res.data.data;
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
@ -157,6 +185,7 @@ export default {
position: relative; position: relative;
top: -55px; top: -55px;
left: -38px; left: -38px;
color: #e8494a;
.apply { .apply {
color: #fff; color: #fff;
display: inline-block; display: inline-block;

@ -458,17 +458,17 @@ export default {
if (res.data.code === 200) { if (res.data.code === 200) {
this.rangLoading = false; this.rangLoading = false;
// ,() // ,()
var rightPbj = { // var rightPbj = {
currencyPair: 'HFH-USDT', // currencyPair: 'HFH-USDT',
amount: '0.15', // amount: '0.15',
highest: '0.15', // highest: '0.15',
lowest: '0.15', // lowest: '0.15',
total: '0', // total: '0',
percent: '0', // percent: '0',
}; // };
this.rangeList = res.data.data; this.rangeList = res.data.data;
this.rangeList.push(rightPbj); // this.rangeList.push(rightPbj);
// console.log(this.rangeList); // console.log(this.rangeList);
} }
}); });

@ -4,7 +4,11 @@
<div class="majorTitleBox majorBoxStyle major-fiexd"> <div class="majorTitleBox majorBoxStyle major-fiexd">
<p class="majorTitle">{{ $t('personal.profile.basicInfo.title') }}</p> <p class="majorTitle">{{ $t('personal.profile.basicInfo.title') }}</p>
<!-- 申请取消商家 --> <!-- 申请取消商家 -->
<div class="major-te-two" @click="getMerchant()"> <div
class="major-te-two"
v-if="applyStatus == 'MARKET'"
@click="getMerchant()"
>
<span>{{ $t('exchangeotc.merchant.data_del') }}</span> <span>{{ $t('exchangeotc.merchant.data_del') }}</span>
</div> </div>
</div> </div>
@ -104,7 +108,7 @@
<script> <script>
import Cookie from '@/common/cookie'; import Cookie from '@/common/cookie';
import {rename, getUserData, getLoginLog} from '@/api/user'; import {rename, getUserData, getLoginLog} from '@/api/user';
import {getCancelApply} from '@/api/coin'; import {getCancelApply, cheackApply} from '@/api/coin';
export default { export default {
name: 'profile', name: 'profile',
data() { data() {
@ -115,6 +119,7 @@ export default {
is_dialog: false, is_dialog: false,
// dialogMerchant: false, // dialogMerchant: false,
id: '', id: '',
applyStatus: '',
}; };
}, },
created: function() { created: function() {
@ -122,7 +127,7 @@ export default {
// console.log(userData) // console.log(userData)
this.userName = userData.nickName; this.userName = userData.nickName;
this.id = userData.id; this.id = userData.id;
this.getcheckApply(); //
// //
getLoginLog({ getLoginLog({
userId: this.id, userId: this.id,
@ -142,6 +147,16 @@ export default {
}, },
}, },
methods: { methods: {
//
getcheckApply() {
cheackApply().then(res => {
if (res.data.code === 200) {
this.applyStatus = res.data.data;
} else {
this.$message.error(res.data.msg);
}
});
},
// //
getMerchant() { getMerchant() {
// this.$confirm( // this.$confirm(
@ -160,6 +175,9 @@ export default {
type: 'success', type: 'success',
message: this.$t('exchangeotc.merchant.success'), message: this.$t('exchangeotc.merchant.success'),
}); });
setInterval(() => {
location.reload(); //
}, 1000);
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }

Loading…
Cancel
Save