文件

980 行
32 KiB
HTML
可执行文件

<!--[1.8.73]-->
<style>
.auth-box {
width: 100%;
min-width: 950px;
height: auto;
background: white;
box-sizing: border-box;
padding: 0 30px 30px;
overflow: hidden;
}
.auth-top {
width: 100%;
height: 200px;
box-sizing: border-box;
margin-top: 50px;
display: flex;
align-items: center;
justify-content: center;
}
.auth-top-left {
width: 440px;
height: 100%;
border-right: 1px solid #1e9fff;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
padding-right: 60px;
}
.auth-top-left-title {
width: 100%;
height: 80px;
border: 2px dashed #1e9fff;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
cursor: pointer;
margin-bottom: 22px;
}
.auth-top-left-title > span {
font-size: 24px;
color: #1e9fff;
margin-left: 20px;
}
.auth-top-left-title > img {
width: 52px;
height: 52px;
border-radius: 50%;
}
.auth-top-left-list-box {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.auth-top-left-list {
display: flex;
align-items: center;
font-size: 14px;
}
.auth-top-left-label {
color: #2f4056;
width: 80px;
}
.auth-top-left-info {
color: #009688;
max-width: 200px;
overflow: hidden;
white-space: nowrap;
word-break: keep-all;
text-overflow: ellipsis;
}
.auth-top-left-info-more {
font-size: 12px;
cursor: pointer;
color: #333;
}
.auth-top-left-info-more:hover {
color: #666;
}
.auth-top-left-btn-box > .el-button,
.auth-examine-btn-box > .el-button {
margin: 0 5px;
}
.auth-top-right {
width: 440px;
height: 100%;
box-sizing: border-box;
padding-left: 60px;
}
.auth-top-right-title {
font-size: 24px;
color: #1e9fff;
margin-bottom: 16px;
}
.auth-top-right-info {
width: 300px;
font-size: 14px;
line-height: 22px;
color: #666666;
margin-bottom: 4px;
}
.auth-top-right-info > a {
color: #23ccef;
text-decoration: none;
}
.auth-bottom {
width: 100%;
height: 200px;
border: 1px solid #1e9fff;
margin-top: 60px;
position: relative;
display: flex;
justify-content: center;
}
.auth-bottom-title {
position: absolute;
left: 0;
right: 0;
margin: auto;
top: -20px;
background: white;
width: 200px;
height: 40px;
color: #1e9fff;
text-align: center;
font-size: 20px;
}
.auth-bottom-list {
width: 30%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.auth-bottom-list-title {
color: #666666;
font-size: 14px;
margin-top: 10px;
margin-bottom: 10px;
}
.auth-bottom-list-info {
color: #666666;
font-size: 12px;
}
.auth-examine-box {
margin: 20px 0;
padding: 30px 0 20px;
background-color: #ecf5ff;
}
.experience-code {
height: 312px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.experience-code > img {
width: 260px;
height: 260px;
margin-bottom: 20px;
}
.auth-examine-btn-box {
width: 100%;
text-align: center;
margin: 40px 0 0;
}
.auth-examine-version {
font-size: 20px;
text-align: center;
margin-bottom: 40px;
}
.preview-box {
text-align: center;
}
#xcxConfigApp .el-radio + .el-radio {
margin: 5px 10px;
}
#xcxConfigApp .el-radio {
margin: 5px 10px;
}
#xcxConfigApp .el-radio-group {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.clear-authorization .title {
font-size: 16px;
}
.clear-authorization .tips {
font-size: 12px;
color: #999;
}
</style>
<div id="xcxConfigApp" v-cloak>
<div class="auth-box" v-loading="loading">
<div v-if="examineData.id" class="auth-examine-box">
<div v-if="examineData.version" class="auth-examine-version">V{{examineData.version}}</div>
<el-steps :active="examine_step" align-center>
<el-step title="提交申请" :status="examine_step==0?'success':''"></el-step>
<el-step title="审核中" :status="examine_step==1?'success':''"></el-step>
<el-step
title="审核通过"
:status="examine_step==2?'success':''"
v-if="examineData.status!=1&&examineData.status!=3"
:description="examineData.status==0?'您现在可以点击发布按钮进行发布了':''"
></el-step>
<el-step
v-if="examineData.status==3"
status="error"
title="审核撤回"
description="您可以重新提交审核"
></el-step>
<el-step v-if="examineData.status==1" status="error" title="审核驳回" :description="examineData.reject_msg">
</el-step>
<el-step
v-if="examineData.status!=1&&examineData.status!=3"
title="发布成功"
:status="examineData.status==4?'success':''"
></el-step>
</el-steps>
<div class="auth-examine-btn-box">
<if condition="$authArr['submitAudit']">
<el-button v-if="examineData.status==0" type="success" size="medium" @click="release">发布</el-button>
<el-button v-if="examineData.status==4" type="success" size="medium" @click="reBack">版本回退 </el-button>
<el-button v-if="examineData.status==2" size="medium" @click="undoCodeAudit">撤销审核</el-button>
<el-button
v-if="examineData.status==1||examineData.status==3"
size="medium"
type="primary"
@click="examine(1)"
>重新提交审核{{open_count}}
</el-button>
<el-button v-else-if="new_version==1||open_count>1" size="medium" @click="examine(2)">提交新版本 </el-button>
</if>
</div>
</div>
<div class="auth-top">
<div class="auth-top-left">
<template v-if="authData.id && authData.authorizer_appid">
<div class="auth-top-left-title">
<img :src="authData.head_img" />
<span>小程序已授权</span>
</div>
<div class="auth-top-left-list-box">
<div class="auth-top-left-list">
<div class="auth-top-left-label">小程序名称:</div>
<div class="auth-top-left-info" :title="authData.nick_name" v-text="authData.nick_name"></div>
</div>
</div>
<div class="auth-top-left-list-box">
<div class="auth-top-left-list">
<div class="auth-top-left-label">小程序简介:</div>
<div class="auth-top-left-info" v-text="authData.signature"></div>
</div>
<div class="auth-top-left-info-more" @click="showDetail = true">查看更多详情</div>
</div>
<hr />
<div class="auth-top-left-btn-box">
<el-button type="danger" size="small" @click="auth(1)">重新授权 </el-button>
<el-button type="primary" size="small" @click="seePreview">二维码预览 </el-button>
<if condition="$authArr['submitAudit']">
<el-button v-if="!examineData.id" type="success" size="small" @click="examine(0)">提交审核 </el-button>
</if>
<el-button type="text" size="mini" @click="clearAuthorization">清空授权</el-button>
<el-button type="text" size="small" @click="setPrivacy()">设置隐私指引 </el-button>
</div>
<div class="auth-top-left-list-box" style="margin-top: 20px">
<div class="auth-top-left-list">
<label class="auth-top-left-label" style="width: 120px">是否显示充值入口</label>
<div class="auth-input-inline">
<el-switch
@change="changeOnlineStatus"
v-model="online_status"
:inactive-value="0"
:active-value="1"
:active-value="online_status==1?'显示':'不显示'"
>
</el-switch>
</div>
</div>
</div>
</template>
<template v-else>
<div class="auth-top-left-title">
<img src="__PUBLIC__/auth/images/public-wx.png" />
<span>小程序未授权</span>
</div>
<hr />
<el-button type="primary" size="medium" @click="auth()">点击授权</el-button>
</template>
</div>
<div class="auth-top-right">
<div class="auth-top-right-title">小程序授权</div>
<div class="auth-top-right-info">为了保证您能正常使小程序所有功能,请使用已认证服务号进行小程序授权</div>
<div class="auth-top-right-info">第三方为你提供信息托管</div>
<div class="auth-top-right-info">为商户提供统一的公众管理平台,包括小程序模板的提交</div>
<div class="auth-top-right-info">
<span>还没有小程序?</span>
<a target="_blank" href="https://mp.weixin.qq.com/cgi-bin/readtemplate?t=register/step1_tmpl&lang=zh_CN"
>立即申请</a
>
</div>
</div>
</div>
<div class="auth-bottom">
<div class="auth-bottom-title">小程序管理</div>
<div class="auth-bottom-list">
<img src="__PUBLIC__/auth/images/public-wxgf.png" />
<div class="auth-bottom-list-title">微信官方许可</div>
<div class="auth-bottom-list-info">微信官方推出的小程序授权</div>
</div>
<div class="auth-bottom-list">
<img src="__PUBLIC__/auth/images/public-gz.png" />
<div class="auth-bottom-list-title">小程序免繁琐设置</div>
<div class="auth-bottom-list-info">小程序运营者不再需要理解繁琐参数设置</div>
</div>
<div class="auth-bottom-list">
<img src="__PUBLIC__/auth/images/public-anquan.png" />
<div class="auth-bottom-list-title">安全可靠的授权</div>
<div class="auth-bottom-list-info">机密数据传输,保证小程序安全</div>
</div>
</div>
</div>
<el-dialog
title="加急审核选择"
:modal-append-to-body="false"
v-if="type==1"
:visible.sync="showChooseUrgent"
:width="'600px'"
:close-on-click-modal="false"
>
<el-form label-width="150px">
<el-form-item label="quota剩余值">
<span>{{quota.rest}}</span>
</el-form-item>
<el-form-item label="当月分配quota">
<span>{{quota.limit}}</span>
</el-form-item>
<el-form-item label="剩余加急次数">
<span>{{quota.speedup_rest}}</span>
</el-form-item>
<el-form-item label="当月分配加急次数">
<span>{{quota.speedup_limit}}</span>
</el-form-item>
<el-form-item label="是否加急审核">
<el-radio v-model="urgent_state" :label="0">不加急</el-radio>
<el-radio v-model="urgent_state" :disabled="quota.speedup_rest<=0?true:false" :label="1">加急审核</el-radio>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="showChooseUrgent = false">取 消</el-button>
<el-button size="small" type="primary" @click="toSubmitAudit">提交审核</el-button>
</div>
</el-dialog>
<el-dialog
title="授权提示"
:append-to-body="true"
:visible.sync="showAuthTips"
:width="'400px'"
:show-close="false"
:close-on-click-modal="false"
>
<div style="padding: 0 20px">是否授权成功,如授权成功则刷新查看</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="showAuthTips = false">关 闭</el-button>
<el-button size="small" type="primary" @click="refresh">刷 新</el-button>
</div>
</el-dialog>
<el-dialog
title="请用手机微信扫码预览"
:append-to-body="true"
:visible.sync="showCode"
:width="'520px'"
:close-on-click-modal="false"
>
<div class="preview-box" v-if="open_count>1">
<el-alert title="每个APPID获取预览码建不要切换过快,否则微信官方可能会返回错误" :closable="false"></el-alert>
<el-alert title="无直播版在审核通过后开启直播是无法跳转的,需要重新提交审核" :closable="false"></el-alert>
<div style="margin: 20px auto 10px; text-align: left">
<el-form label-width="100px" size="mini">
<el-form-item label="商城模板">
<el-radio-group v-model="preview_code_model" @change="choosePreviewModel()" size="mini">
<el-radio v-if="open_default" :label="1">普通版(无直播)</el-radio>
<el-radio v-if="open_diy" :label="2">DIY版(无直播)</el-radio>
<el-radio v-if="open_default_live" :label="3">普通版(有直播)</el-radio>
<el-radio v-if="open_diy_live" :label="4">DIY版(有直播)</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</div>
</div>
<div class="experience-code" v-loading="loading_code">
<img :src="preview_path" />
<el-button type="primary" size="small" @click="add">添加体验者</el-button>
</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="showCode = false">关 闭</el-button>
</div>
</el-dialog>
<el-dialog
title="选择提交模板"
:append-to-body="true"
:visible.sync="showChooseModel"
:width="'400px'"
:close-on-click-modal="false"
>
<div class="preview-box">
<el-alert title="请选择要提交的商城模板" :closable="false"></el-alert>
<div style="margin: 20px auto 40px; text-align: left">
<el-form label-width="100px" size="mini">
<el-form-item label="商城模板">
<el-radio-group v-model="choose_examine_model" size="mini" type="primary" plain>
<el-radio v-if="open_default" :label="1">普通版(无直播)</el-radio>
<el-radio v-if="open_diy" :label="2">DIY版(无直播)</el-radio>
<el-radio v-if="open_default_live" :label="3">普通版(有直播)</el-radio>
<el-radio v-if="open_diy_live" :label="4">DIY版(有直播)</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
</div>
<el-button type="primary" size="small" @click="sureSubmitAudit">提交审核</el-button>
</div>
</el-dialog>
<el-dialog
title="小程序详情"
:append-to-body="true"
v-if="authData.id"
:visible.sync="showDetail"
:width="'600px'"
:close-on-click-modal="false"
>
<div>
<div style="margin: 0 auto; text-align: center">
<img style="max-width: 100px; height: auto" :src="authData.head_img" />
<h3 class="layui-col-md12" style="text-align: center">{{authData.nick_name}}</h3>
<br />
</div>
<div style="clear: both"></div>
<hr />
<div class="layui-row" style="line-height: 30px">
<div class="layui-col-md3">介绍:</div>
<div class="layui-col-md8">{{authData.signature}}</div>
<div class="layui-col-md3">APPID:</div>
<div class="layui-col-md8">{{authData.authorizer_appid}}</div>
<div class="layui-col-md3">原始ID:</div>
<div class="layui-col-md8">{{authData.user_name}}</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="showDetail = false">关 闭</el-button>
</div>
</el-dialog>
</div>
<script>
new Vue({
el: '#xcxConfigApp',
data: function () {
return {
preview_code_model: 1, //预览码模板 1普通版(无直播) 2diy版(无直播) 3普通版(有直播) 4diy版(有直播)
choose_examine_model: 1, //选择的提交审核的模板类型 1普通版(无直播) 2diy版(无直播) 3普通版(有直播) 4diy版(有直播)
authData: {}, //授权信息
examineData: {}, //提交审核信息
showAuthTips: false,
showCode: false,
showDetail: false,
examine_step: 0,
preview_path: '', //当前预览的小程序地址
open_default: false, //合伙人是否配置普通版(无直播)
open_diy: false, //合伙人是否配置diy版(无直播)
open_default_live: false, //合伙人是否配置普通版(有直播)
open_diy_live: false, //合伙人是否配置diy版(有直播)
open_count: 0, //开启的模板数量
new_version: 0, //是否有新版本可更新
merchant_id: '{$merchant_id}', //商户id
type: '{$type}', //1合伙人 2代理商 3商户
postHeader: '{$type}' == 1 ? 'Admin/Merchant/' : '{$type}' == 2 ? 'Agent/Merchant/' : 'Retail/XcxConfig/', //请求路径前半部分路由
urgent_state: 0, //是否加急审核 0否 1是
examine_type: 0, //0第一次提交审核 1重新提交审核 2提交新版本审核
showChooseUrgent: false, //是否显示加急审核弹框
online_status: 0, //是否显示充值入口
quota: {
rest: 0, //quota剩余值
limit: 0, //当月分配quota
speedup_rest: 0, //剩余加急次数
speedup_limit: 0 //当月分配加急次数
}, //提审与加急次数
loading: false, //页面加载状态
loading_code: false, //预览码是否在加载中
showChooseModel: false //是否显示选择提交审核的模板
};
},
methods: {
//刷新页面
refresh() {
this.showAuthTips = false;
this.getBaseData();
},
//授权
auth(type) {
let url = '/index.php/' + this.postHeader + 'authIndex?' + 'merchant_id=' + this.merchant_id;
if (type == 1) {
this.$confirm('确定要重新授权小程序吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info'
})
.then(() => {
window.open(url);
this.showAuthTips = true;
})
.catch(() => {});
} else {
window.open(url);
this.showAuthTips = true;
}
},
setPrivacy() {
this.sendRequest(this.postHeader + 'setPrivacy', {
data: {
merchant_id: this.merchant_id
},
success: (res) => {
console.log(res);
}
});
},
//添加体验者
add() {
this.$prompt('请输入体验者微信号', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
})
.then(({ value }) => {
this.$loading({
lock: true,
text: '添加中,请等待',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
});
this.sendRequest(this.postHeader + 'bindUser', {
data: {
id: value,
merchant_id: this.merchant_id
},
success: (res) => {
this.$loading().close();
if (res.status) {
this.$confirm('绑定成功', '提示', {
confirmButtonText: '关闭',
showCancelButton: false,
type: 'success'
})
.then(() => {})
.catch(() => {});
} else {
this.$confirm(res.message, '错误提示', {
confirmButtonText: '关闭',
showCancelButton: false,
type: 'error'
})
.then(() => {})
.catch(() => {});
}
}
});
})
.catch(() => {});
},
//提交审核
examine(type) {
if (this.verifyModel()) {
this.examine_type = type;
if (this.type == 1) {
//合伙人提交版本审核,可以选择是否加急审核
this.getUrgentAuditCount();
this.urgent_state = 0;
this.showChooseUrgent = true;
} else {
this.toSubmitAudit();
}
}
},
//查询当月提审与加急次数
getUrgentAuditCount() {
this.sendRequest('Super/Config/getUrgentAuditCount', {
data: {
merchant_id: this.merchant_id
},
success: (res) => {
if (res.status == 1) {
this.quota = res.quota;
} else {
this.$message.error(res.message);
}
}
});
},
//确认提交审核
toSubmitAudit() {
if (this.open_count > 1) {
this.showChooseModel = true;
} else {
this.sureSubmitAudit();
}
},
sureSubmitAudit() {
var tips = '确定要提交代码审核吗?';
if (this.examine_type == 1) {
tips = '确定重新提交审核小程序版本?';
} else if (this.examine_type == 2) {
tips = '确定无误提交审核小程序新版本?';
}
this.$confirm(tips, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info'
})
.then(() => {
this.$loading({
lock: true,
text: '提交审核中,请等待',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
});
this.sendRequest(this.postHeader + 'submitAudit', {
data: {
merchant_id: this.merchant_id,
urgent_state: this.urgent_state,
model: this.choose_examine_model
},
success: (res) => {
this.$loading().close();
this.showChooseUrgent = false;
this.showChooseModel = false;
this.urgent_state = 0;
if (res.status == 1) {
this.$message({
message: res.message,
type: 'success',
duration: 1000,
onClose: () => {
this.refresh();
}
});
} else {
if (res.data && res.data.errcode == '85009') {
this.$confirm('版本已经提交过审核了,请勿重复提交', '错误提示', {
confirmButtonText: '关闭',
showCancelButton: false,
type: 'warning'
})
.then(() => {})
.catch(() => {});
} else {
this.$confirm(res.data && res.data.errmsg ? res.data.errmsg : res.message, '错误提示', {
confirmButtonText: '关闭',
showCancelButton: false,
type: 'error'
})
.then(() => {})
.catch(() => {});
}
}
}
});
})
.catch(() => {});
},
//撤销审核
undoCodeAudit() {
this.$confirm('确定要撤销审核吗?', '提示', {
confirmButtonText: '撤销审核',
cancelButtonText: '再想想',
type: 'info'
})
.then(() => {
this.$loading({
lock: true,
text: '撤销中,请等待',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
});
this.sendRequest(this.postHeader + 'undoCodeAudit', {
data: {
merchant_id: this.merchant_id
},
success: (res) => {
this.$loading().close();
if (res.status) {
this.$message.success(res.message);
this.examineData = {};
} else {
this.$confirm(res.message, '错误提示', {
confirmButtonText: '关闭',
showCancelButton: false,
type: 'error'
})
.then(() => {})
.catch(() => {});
}
}
});
})
.catch(() => {});
},
//发布小程序
release() {
this.$confirm('确定要发布新版本吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info'
})
.then(() => {
this.$loading({
lock: true,
text: '小程序发布中,请等待',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
});
this.sendRequest(this.postHeader + 'release', {
data: {
merchant_id: this.merchant_id
},
success: (res) => {
this.$loading().close();
if (res.status) {
this.$message({
message: res.message,
type: 'success',
onClose: () => {
this.refresh();
}
});
} else {
this.$confirm(res.message, '错误提示', {
confirmButtonText: '关闭',
showCancelButton: false,
type: 'error'
})
.then(() => {})
.catch(() => {});
}
}
});
})
.catch(() => {});
},
//版本回退
reBack() {
this.$confirm('在发布成功之后,每个版本只能回退一次,不能无限回退,确认回退?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info'
})
.then(() => {
this.$loading({
lock: true,
text: '小程序版本回退中,请等待',
spinner: 'el-icon-loading',
background: 'rgba(255, 255, 255, 0.7)'
});
this.sendRequest(this.postHeader + 'reBack', {
data: {
merchant_id: this.merchant_id
},
success: (res) => {
this.$loading().close();
if (res.status) {
this.$message({
message: res.message,
type: 'success',
onClose: () => {
this.refresh();
}
});
} else {
this.$confirm(res.message, '错误提示', {
confirmButtonText: '关闭',
showCancelButton: false,
type: 'error'
})
.then(() => {})
.catch(() => {});
}
}
});
})
.catch(() => {});
},
changeStep(status) {
console.log(status);
switch (status) {
case '0':
//审核通过
this.examine_step = 2;
break;
case '1':
//审核驳回
this.examine_step = 2;
break;
case '2':
//审核中
this.examine_step = 1;
break;
case '3':
//审核撤回
this.examine_step = 2;
break;
case '4':
//发布成功
this.examine_step = 3;
break;
}
console.log(this.examine_step);
},
//查看预览码
seePreview() {
if (this.verifyModel()) {
this.showCode = true;
if (!this.preview_path) {
this.choosePreviewModel();
}
}
},
//验证是否配置模板
verifyModel() {
if (this.open_count == 0) {
this.$confirm('系统未配置商城模板,需要进行配置后才能操作哦', '错误提示', {
confirmButtonText: '确定',
showCancelButton: false,
type: 'warning'
})
.then(() => {})
.catch(() => {});
return false;
} else {
return true;
}
},
//获取小程序预览码
choosePreviewModel() {
this.loading_code = true;
this.sendRequest(this.postHeader + 'getPreviewQrImg', {
data: {
model: this.preview_code_model,
merchant_id: this.merchant_id
},
success: (res) => {
this.loading_code = false;
this.preview_path = res.preview_path;
}
});
},
//获取基本数据
getBaseData() {
this.loading = true;
this.sendRequest(this.postHeader + 'getBaseData', {
data: {
merchant_id: this.merchant_id
},
success: (res) => {
this.preview_code_model = res.data.preview_code_model;
this.choose_examine_model = res.data.preview_code_model;
this.open_default = res.data.open_default;
this.open_diy = res.data.open_diy;
this.open_default_live = res.data.open_default_live;
this.open_diy_live = res.data.open_diy_live;
this.open_count = res.data.open_count;
this.authData = res.data.authData;
this.examineData = res.data.examine;
this.new_version = res.data.new_version;
this.online_status = res.data.online_status;
this.$nextTick(() => {
this.loading = false;
if (this.examineData && this.examineData.id) {
this.changeStep(this.examineData.status);
}
});
}
});
},
//修改充值入口显示状态
changeOnlineStatus() {
this.loading = true;
this.sendRequest(this.postHeader + 'changeOnlineStatus', {
data: {
merchant_id: this.merchant_id,
online_status: this.online_status
},
success: (res) => {
this.loading = false;
this.$message.success(res.message);
}
});
},
//清空授权
clearAuthorization() {
this.$confirm(
`<div class="clear-authorization"><p class="title">确认清空小程序的授权记录吗?</p><p class="tips">清空后微信商家券、微信支付代金券将无法核销,无法下载门店二维码!</p></div>`,
'温馨提示',
{
type: 'warning',
dangerouslyUseHTMLString: true
}
)
.then(() => {
this.loading = true;
this.sendRequest(this.postHeader + 'clearAuthInfo', {
data: {
merchant_id: this.merchant_id
},
success: (response) => {
this.loading = false;
if (response.status == 1) {
this.$message.success(response.message);
this.refresh();
} else {
this.$message.error(response.message);
}
}
});
})
.catch(() => {});
}
},
created() {
this.getBaseData();
},
watch: {
examineData: {
handler(n, o) {
this.changeStep(n.status);
},
deep: true // 必须加这个属性
}
}
});
</script>