添加:添加 赠送升级名额让某个普通用户直接升级到指定等级的经销商
This commit is contained in:
parent
3c89ee040d
commit
b985e5e65b
|
|
@ -10377,7 +10377,15 @@ const routes = [
|
|||
foot: true
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
path: "/member/use_upgrade_quota",
|
||||
name: "use_upgrade_quota",
|
||||
component:()=>import("../views/member/weight_value/use_upgrade_quota"),
|
||||
meta: {
|
||||
title: "使用升级名额",
|
||||
foot: true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,9 @@ export default {
|
|||
// 统计明细跳转处理
|
||||
detailsGoToPage(info){
|
||||
let _this = this;
|
||||
if(info.key_name){
|
||||
if(info.key_name === 'give_limit'){
|
||||
this.goToPage('use_upgrade_quota',{},{ team_level_id: _this.page_params.team_level_id });
|
||||
}else{
|
||||
let query = {
|
||||
key_name: info.key_name || '',
|
||||
team_level_id: _this.page_params.team_level_id
|
||||
|
|
|
|||
|
|
@ -0,0 +1,269 @@
|
|||
<template>
|
||||
<div id="balance_recharge">
|
||||
<c-title :hide="false" :text="'使用' + info.level_name + '升级名额'" tolink="detailed"></c-title>
|
||||
<div class="transfer-content">
|
||||
<div class="main-content">
|
||||
<div class="hold-num">剩余名额({{ info.level_name }}名额):{{ info.surplus_quota }}</div>
|
||||
<div class="operate">
|
||||
<div class="transfer-id">
|
||||
<div class="title">受让人ID:</div>
|
||||
<input type="text" v-model="transfer_id" placeholder="请输入受让人用户ID" />
|
||||
</div>
|
||||
<div class="transfer-info" v-if="Object.values(memberInfo).length > 0">
|
||||
<div class="user-avatar">
|
||||
<img class="avatar-image" :src="memberInfo.avatar_image" />
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<div class="user-nickname">昵称:{{memberInfo.nickname || ''}}</div>
|
||||
<div class="user-status">姓名:{{memberInfo.realname || ''}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submit-btn" @click="beforeConfirm">确认赠送</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
page_params: {},
|
||||
// 转账信息
|
||||
info: {
|
||||
level_name: '',// 等级名称
|
||||
surplus_quota: 0,// 剩余名额
|
||||
},
|
||||
// 受让人信息
|
||||
transfer_id: 0,
|
||||
memberInfo: {},
|
||||
timeout_id: null,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
transfer_id: function() {
|
||||
let _this = this;
|
||||
clearTimeout(_this.timeout_id);
|
||||
_this.timeout_id = setTimeout(() => {
|
||||
_this.getTransferUser();
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
computed:{ },
|
||||
activated() {
|
||||
let _this = this;
|
||||
_this.page_params = Object.assign(_this.$route.params, _this.$route.query);
|
||||
_this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 获取基本信息
|
||||
getData() {
|
||||
let _this = this;
|
||||
let params = {
|
||||
team_level_id: _this.page_params.team_level_id
|
||||
};
|
||||
$http.get("plugin.weight-value.api.index.use-upgrade-info", params, "加载中...")
|
||||
.then(response => {
|
||||
if (response.result === 1) {
|
||||
_this.info = response.data;
|
||||
} else {
|
||||
_this.$dialog.alert({message: response.msg}).then(() => {
|
||||
_this.$router.push(_this.fun.getUrl('weight_value', {}, params));
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 获取受让人信息
|
||||
getTransferUser(){
|
||||
let _this = this;
|
||||
if(parseInt(_this.transfer_id) <= 0 || isNaN(parseInt(_this.transfer_id))) {
|
||||
_this.memberInfo = {};
|
||||
return;
|
||||
}
|
||||
$http.get("member.member.memberInfo", { uid: _this.transfer_id }, "加载中...")
|
||||
.then(response => {
|
||||
if (response.result === 1) {
|
||||
_this.memberInfo = response.data;
|
||||
} else {
|
||||
_this.$dialog.alert({message: response.msg});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
// 点击确认
|
||||
beforeConfirm() {
|
||||
let _this = this;
|
||||
let msg = `您确定消耗一个升级名额将${_this.memberInfo.nickname}升级到${_this.info.level_name}`;
|
||||
let params = {
|
||||
transfer_id: _this.transfer_id,
|
||||
team_level_id: _this.page_params.team_level_id
|
||||
};
|
||||
_this.$dialog.confirm({message: msg}).then(() => {
|
||||
$http.get("plugin.weight-value.api.index.use-upgrade-handle", params, "加载中...")
|
||||
.then(response => {
|
||||
_this.$dialog.alert({message: response.msg}).then(() => {
|
||||
history.go(0);
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.transfer-content {
|
||||
width: 100vw;
|
||||
min-height: 50vh;
|
||||
background-image: linear-gradient(#fe9a51, #f5f5f5);
|
||||
background-size: 100% 390px;
|
||||
background-repeat: no-repeat;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
|
||||
.main-content {
|
||||
width: calc(100vw - 30px);
|
||||
padding-top: 110px;
|
||||
|
||||
.hold-num {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.operate {
|
||||
margin-top: 5px;
|
||||
background: #fff;
|
||||
-webkit-box-shadow: 0 0.0625rem 0.25rem 0 rgba(7, 11, 33, .11);
|
||||
box-shadow: 0 0.0625rem 0.25rem 0 rgba(7, 11, 33, .11);
|
||||
border-radius: 0.3125rem;
|
||||
padding: 1.25rem 1.3438rem;
|
||||
padding-top: 0;
|
||||
|
||||
.transfer-id {
|
||||
height: 2.9063rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
flex-shrink: 0;
|
||||
font-size: 0.8125rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
border: none;
|
||||
width: 15.625rem;
|
||||
margin-left: 1rem;
|
||||
border-bottom: #f5f6f8 1px solid;
|
||||
}
|
||||
}
|
||||
|
||||
.transfer-info {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
height: 80px;
|
||||
width: 100%;
|
||||
|
||||
.user-avatar {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
margin-right: 5px;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
|
||||
.avatar-image {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-info {
|
||||
height: 50px;
|
||||
text-align: left;
|
||||
|
||||
.user-nickname {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.user-status {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.transfer-num {
|
||||
margin-top: 1rem;
|
||||
|
||||
.title {
|
||||
font-size: 0.8125rem;
|
||||
color: #333;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.transfer-input {
|
||||
border-bottom: 1px solid #f5f6f8;
|
||||
padding-top: 1.5625rem;
|
||||
display: flex;
|
||||
|
||||
input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
border: none;
|
||||
width: 15.625rem;
|
||||
margin-left: 1rem;
|
||||
font-size: 1.5625rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
width: 17.4688rem;
|
||||
height: 2.4375rem;
|
||||
background: #f15353;
|
||||
border-radius: 0.375rem;
|
||||
font-size: 0.9688rem;
|
||||
text-align: center;
|
||||
line-height: 2.4375rem;
|
||||
color: #fff;
|
||||
margin: 0 auto;
|
||||
margin-top: 2.4063rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.confirm-transfer-popup{
|
||||
padding: 1rem;
|
||||
.confirm-transfer-popup-li{
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.confirm-transfer-popup-warn{
|
||||
text-align: center;
|
||||
color: #f15353;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue