mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-26 04:38:34 +08:00
圣诞快乐
# v1.3 更新列表
1. 【新增】砍价
2. 【新增】拼团
3. 【新增】一号通
4. 【修复】商品sku 编辑时出现商品属性对应错误的问题
5. 【修复】商品推广海报生成二维码可能会出错的问题【小程序调试中】
6. 【修复】微信公众号和小程序头像可能获取不到的问题
7. 【修复】下单时可能会出错的问题
8. 【修复】pc管理端用户访问量
9. 【修复】微信退款
10. 【修复】管理端订单状态可能出现不正确的情况
11. 【修复】WEB管理端-菜单色调,短信API更新,首页用户访问量,系统设置tab是自动选择下一及表单
12. 【修复】系统设置出现更新不正确的问题
This commit is contained in:
228
admin/src/views/sms/smsConfig/components/forgetPassword.vue
Normal file
228
admin/src/views/sms/smsConfig/components/forgetPassword.vue
Normal file
@@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<el-steps :active="current" align-center>
|
||||
<el-step title="验证账号信息"></el-step>
|
||||
<el-step title="修改账户密码"></el-step>
|
||||
<el-step title="登录"></el-step>
|
||||
</el-steps>
|
||||
<el-form ref="formInline" :model="formInline" size="medium" :rules="ruleInline" class="login-form" autocomplete="on" label-position="left">
|
||||
<template v-if="current === 0">
|
||||
<el-form-item prop="phone">
|
||||
<el-input type="text" v-model="formInline.phone" prefix="ios-contact-outline"
|
||||
placeholder="请输入手机号" size="large"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" class="captcha">
|
||||
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||
<el-input
|
||||
ref="username"
|
||||
v-model="formInline.code"
|
||||
placeholder="验证码"
|
||||
name="username"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
autocomplete="off"
|
||||
prefix-icon="el-icon-message"
|
||||
style="width: 90%"
|
||||
/>
|
||||
<el-button size="mini" :disabled=!this.canClick @click="cutDown">{{cutNUm}}</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="current === 1">
|
||||
<el-form-item prop="password" class="maxInpt">
|
||||
<el-input type="password" v-model="formInline.password" prefix="ios-lock-outline"
|
||||
placeholder="请输入新密码" size="large"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="checkPass" class="maxInpt">
|
||||
<el-input type="password" v-model="formInline.checkPass" prefix="ios-lock-outline"
|
||||
placeholder="请验证新密码" size="large"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="current === 2">
|
||||
<el-form-item prop="phone" class="maxInpt">
|
||||
<el-input type="text" v-model="formInline.phone" prefix="ios-contact-outline"
|
||||
placeholder="请输入手机号"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password" class="maxInpt">
|
||||
<el-input type="password" v-model="formInline.password" prefix="ios-lock-outline"
|
||||
placeholder="请输入密码"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item class="maxInpt">
|
||||
<el-button v-if="current === 0" type="primary" @click="handleSubmit1('formInline',current)" class="mb20 width100">下一步</el-button>
|
||||
<el-button v-if="current === 1" type="primary" @click="handleSubmit2('formInline',current)" class="mb20 width100">提交</el-button>
|
||||
<el-button v-if="current === 2" type="primary" @click="handleSubmit('formInline',current)" class="mb20 width100">登录</el-button>
|
||||
<el-button @click="returns('formInline')" class="width100" style="margin-left: 0px;">返回</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-button v-if="current === 0" size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" @click="handleSubmit('formInline')">注册</el-button>-->
|
||||
<!--<el-button size="mini" type="primary" style="width:100%;margin-bottom:20px;" @click="changelogo">立即登录</el-button>-->
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updatePasswordApi, captchaApi, configApi } from '@/api/sms';
|
||||
export default {
|
||||
name: 'forgetPassword',
|
||||
data () {
|
||||
const validatePhone = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请填写手机号'));
|
||||
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||
callback(new Error('手机号格式不正确!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePass = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请输入密码'));
|
||||
}else {
|
||||
if(this.current === 1){
|
||||
if (this.formInline.checkPass !== '') {
|
||||
this.$refs.formInline.validateField('checkPass');
|
||||
}
|
||||
callback();
|
||||
}else{
|
||||
if(value !== this.formInline.checkPass){
|
||||
callback(new Error('请输入正确密码!'));
|
||||
}
|
||||
callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
var validatePass2 = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请再次输入密码'));
|
||||
} else if (value !== this.formInline.password) {
|
||||
callback(new Error('两次输入密码不一致!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
cutNUm: '获取验证码',
|
||||
canClick: true,
|
||||
current: 0,
|
||||
formInline: {
|
||||
account: '',
|
||||
phone: '',
|
||||
code: '',
|
||||
password: '',
|
||||
checkPass: '',
|
||||
},
|
||||
ruleInline: {
|
||||
phone: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ validator: validatePass, trigger: 'blur' }
|
||||
],
|
||||
checkPass: [
|
||||
{ validator: validatePass2, trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 短信验证码
|
||||
cutDown () {
|
||||
if (this.formInline.phone) {
|
||||
if (!this.canClick) return;
|
||||
this.canClick = false;
|
||||
this.cutNUm = 60;
|
||||
let data = {
|
||||
phone: this.formInline.phone,
|
||||
types: 1
|
||||
};
|
||||
captchaApi(data).then(async res => {
|
||||
this.$message.success(res.msg);
|
||||
})
|
||||
let time = setInterval(() => {
|
||||
this.cutNUm--;
|
||||
if (this.cutNUm === 0) {
|
||||
this.cutNUm = '获取验证码';
|
||||
this.canClick = true;
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$message.warning('请填写手机号!');
|
||||
}
|
||||
},
|
||||
handleSubmit1 (name, current) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.current = 1;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmit2(name) {
|
||||
this.formInline.account = this.formInline.phone
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
updatePasswordApi(this.formInline).then(async res => {
|
||||
this.$message.success('修改成功');
|
||||
this.current = 2;
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
//登录
|
||||
handleSubmit (name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
configApi({
|
||||
account: this.formInline.account,
|
||||
password: this.formInline.password
|
||||
}).then(async res => {
|
||||
this.$message.success('登录成功!');
|
||||
this.$emit('on-Login');
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
returns () {
|
||||
this.current === 0 ? this.$emit('goback'): this.current = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.login-form {
|
||||
flex: 1;
|
||||
padding: 32px 0;
|
||||
text-align: center;
|
||||
width: 384px;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.width100{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.maxInpt{
|
||||
max-width:400px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
.code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.ivu-steps-item:last-child{
|
||||
width: unset!important;
|
||||
}
|
||||
</style>
|
||||
217
admin/src/views/sms/smsConfig/components/forgetPhone.vue
Normal file
217
admin/src/views/sms/smsConfig/components/forgetPhone.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div class="login-container">
|
||||
<el-steps :active="current" align-center>
|
||||
<el-step title="验证账号信息"></el-step>
|
||||
<el-step title="修改手机号码"></el-step>
|
||||
<el-step title="登录"></el-step>
|
||||
</el-steps>
|
||||
<el-form ref="formInline" :model="formInline" size="medium" :rules="ruleInline" class="login-form" autocomplete="on" label-position="left">
|
||||
<template v-if="current === 0">
|
||||
<el-form-item prop="account">
|
||||
<el-input type="text" v-model="formInline.account" prefix="ios-contact-outline"
|
||||
placeholder="请输入当前手机号" size="large"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input type="password" v-model="formInline.password" prefix="ios-contact-outline"
|
||||
placeholder="请输入密码" size="large"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="current === 1">
|
||||
<el-form-item prop="phone" class="maxInpt">
|
||||
<el-input type="text" v-model="formInline.phone" prefix="ios-lock-outline"
|
||||
placeholder="请输入新手机号" size="large"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" class="captcha">
|
||||
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||
<el-input
|
||||
ref="username"
|
||||
v-model="formInline.code"
|
||||
placeholder="验证码"
|
||||
name="username"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
autocomplete="off"
|
||||
prefix-icon="el-icon-message"
|
||||
style="width: 90%"
|
||||
/>
|
||||
<el-button size="mini" :disabled=!this.canClick @click="cutDown">{{cutNUm}}</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-if="current === 2">
|
||||
<el-form-item prop="phone" class="maxInpt">
|
||||
<el-input type="text" v-model="formInline.phone" prefix="ios-contact-outline"
|
||||
placeholder="请输入手机号"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password" class="maxInpt">
|
||||
<el-input type="password" v-model="formInline.password" prefix="ios-lock-outline"
|
||||
placeholder="请输入密码"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item class="maxInpt">
|
||||
<el-button v-if="current === 0" type="primary" @click="handleSubmit1('formInline',current)" class="mb20 width100">下一步</el-button>
|
||||
<el-button v-if="current === 1" type="primary" @click="handleSubmit2('formInline',current)" class="mb20 width100">提交</el-button>
|
||||
<el-button v-if="current === 2" type="primary" @click="handleSubmit('formInline',current)" class="mb20 width100">登录</el-button>
|
||||
<el-button @click="returns('formInline')" class="width100" style="margin-left: 0px;">返回</el-button>
|
||||
</el-form-item>
|
||||
|
||||
<!--<el-button v-if="current === 0" size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" @click="handleSubmit('formInline')">注册</el-button>-->
|
||||
<!--<el-button size="mini" type="primary" style="width:100%;margin-bottom:20px;" @click="changelogo">立即登录</el-button>-->
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { captchaApi, configApi, updateHoneApi } from '@/api/sms';
|
||||
export default {
|
||||
name: 'forgetPhone',
|
||||
props: {
|
||||
isIndex: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
const validatePhone = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请填写手机号'));
|
||||
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||
callback(new Error('手机号格式不正确!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
var validatePass = (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请输入密码'));
|
||||
} else {
|
||||
if (this.formInline.checkPass !== '') {
|
||||
this.$refs.formInline.validateField('checkPass');
|
||||
}
|
||||
callback();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
cutNUm: '获取验证码',
|
||||
canClick: true,
|
||||
current: 0,
|
||||
formInline: {
|
||||
account: '',
|
||||
phone: '',
|
||||
code: '',
|
||||
password: '',
|
||||
},
|
||||
ruleInline: {
|
||||
phone: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' }
|
||||
],
|
||||
account: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 短信验证码
|
||||
cutDown () {
|
||||
if (this.formInline.phone) {
|
||||
if (!this.canClick) return;
|
||||
this.canClick = false;
|
||||
this.cutNUm = 60;
|
||||
let data = {
|
||||
phone: this.formInline.phone,
|
||||
types: 1
|
||||
};
|
||||
captchaApi(data).then(async res => {
|
||||
this.$message.success(res.msg);
|
||||
})
|
||||
let time = setInterval(() => {
|
||||
this.cutNUm--;
|
||||
if (this.cutNUm === 0) {
|
||||
this.cutNUm = '获取验证码';
|
||||
this.canClick = true;
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$message.warning('请填写手机号!');
|
||||
}
|
||||
},
|
||||
handleSubmit1 (name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.handleSubmit(name,1);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmit2(name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
updateHoneApi(this.formInline).then(async res => {
|
||||
this.$message.success('操作成功')
|
||||
this.current = 2;
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
//登录
|
||||
handleSubmit (name,num) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
configApi({
|
||||
account: this.formInline.account,
|
||||
password: this.formInline.password
|
||||
}).then(async res => {
|
||||
num===1?this.$message.success("原手机号密码正确"):this.$message.success("登录成功");
|
||||
num===1?this.current = 1:this.$emit('on-Login');
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
returns () {
|
||||
this.current === 0 ? this.$emit('gobackPhone'): this.current = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.login-form {
|
||||
flex: 1;
|
||||
padding: 32px 0;
|
||||
text-align: center;
|
||||
width: 384px;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
.width100{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.maxInpt{
|
||||
max-width:400px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
.code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.ivu-steps-item:last-child{
|
||||
width: unset!important;
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-form ref="formInline" size="small" :model="formInline" :rules="ruleInline" class="login-form"
|
||||
autocomplete="on" label-position="left">
|
||||
<div class="title-container">
|
||||
<h3 class="title">短信账户登录</h3>
|
||||
<h3 class="title mb15">短信账户登录</h3>
|
||||
</div>
|
||||
<el-form-item prop="account">
|
||||
<el-input
|
||||
@@ -19,14 +19,14 @@
|
||||
autocomplete="off"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="token">
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
:key="passwordType"
|
||||
ref="token"
|
||||
v-model="formInline.token"
|
||||
ref="password"
|
||||
v-model="formInline.password"
|
||||
:type="passwordType"
|
||||
placeholder="密码"
|
||||
name="token"
|
||||
name="password"
|
||||
tabindex="2"
|
||||
auto-complete="off"
|
||||
prefix-icon="el-icon-lock"
|
||||
@@ -38,7 +38,7 @@
|
||||
<el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;"
|
||||
@click="handleSubmit('formInline')">登录
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" style="width: 100%;" @click="changeReg">注册账户</el-button>
|
||||
<el-button size="mini" type="text" style="width: 100%;margin-left: 0" @click="changeReg">注册账户</el-button>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -53,13 +53,13 @@ export default {
|
||||
return {
|
||||
formInline: {
|
||||
account: '',
|
||||
token: ''
|
||||
password: ''
|
||||
},
|
||||
ruleInline: {
|
||||
account: [
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
token: [
|
||||
password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
@@ -90,12 +90,14 @@ export default {
|
||||
handleSubmit(name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
configApi(this.formInline).then(async res => {
|
||||
this.$message.success('登录成功!')
|
||||
this.$store.dispatch('user/isLogin')
|
||||
this.$emit('on-Login')
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
this.loading = false;
|
||||
}).catch(()=>{
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -2,28 +2,21 @@
|
||||
<div class="login-container">
|
||||
<el-form ref="formInline" size="small" :model="formInline" :rules="ruleInline" class="login-form" autocomplete="on" label-position="left">
|
||||
<div class="title-container">
|
||||
<h3 class="title">短信账户注册</h3>
|
||||
<h3 class="title mb15">一号通账户注册</h3>
|
||||
</div>
|
||||
<el-form-item prop="account">
|
||||
<el-form-item prop="phone">
|
||||
<el-input
|
||||
ref="account"
|
||||
v-model="formInline.account"
|
||||
placeholder="请输入短信平台账号"
|
||||
prefix-icon="el-icon-user"
|
||||
name="username"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
auto-complete="off"
|
||||
v-model="formInline.phone"
|
||||
placeholder="请输入您的手机号"
|
||||
prefix-icon="el-icon-phone-outline"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
:key="passwordType"
|
||||
ref="password"
|
||||
v-model="formInline.password"
|
||||
:type="passwordType"
|
||||
placeholder="请输入短信平台密码/token"
|
||||
name="password"
|
||||
tabindex="2"
|
||||
auto-complete="off"
|
||||
prefix-icon="el-icon-lock"
|
||||
@@ -34,38 +27,16 @@
|
||||
</el-form-item>
|
||||
<el-form-item prop="domain">
|
||||
<el-input
|
||||
ref="password"
|
||||
v-model="formInline.domain"
|
||||
placeholder="请输入网址域名"
|
||||
name="password"
|
||||
prefix-icon="el-icon-position"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="phone">
|
||||
<el-input
|
||||
ref="password"
|
||||
v-model="formInline.phone"
|
||||
placeholder="请输入您的手机号"
|
||||
prefix-icon="el-icon-phone-outline"
|
||||
name="password"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sign">
|
||||
<el-input
|
||||
ref="password"
|
||||
v-model="formInline.sign"
|
||||
placeholder="请输入短信签名,例如:CRMEB"
|
||||
name="password"
|
||||
prefix-icon="el-icon-price-tag"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" class="captcha">
|
||||
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||
<el-input
|
||||
ref="username"
|
||||
v-model="formInline.code"
|
||||
placeholder="验证码"
|
||||
name="username"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
autocomplete="off"
|
||||
@@ -75,8 +46,8 @@
|
||||
<el-button size="mini" :disabled=!this.canClick @click="cutDown">{{cutNUm}}</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-button size="mini" :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" @click="handleSubmit('formInline')">注册</el-button>
|
||||
<el-button size="mini" type="primary" style="width:100%;margin-bottom:20px;" @click="changelogo">立即登录</el-button>
|
||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:20px;" @click="handleSubmit('formInline')">注册</el-button>
|
||||
<el-button type="primary" style="width:100%;margin-bottom:20px;" @click="changelogo">立即登录</el-button>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
@@ -106,13 +77,9 @@ export default {
|
||||
code: '',
|
||||
domain: '',
|
||||
phone: '',
|
||||
sign: '',
|
||||
password: ''
|
||||
},
|
||||
ruleInline: {
|
||||
account: [
|
||||
{ required: true, message: '请输入短信平台账号', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: '请输入短信平台密码/token', trigger: 'blur' }
|
||||
],
|
||||
@@ -122,9 +89,6 @@ export default {
|
||||
phone: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
sign: [
|
||||
{ required: true, message: '请输入短信签名', trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||
]
|
||||
@@ -148,8 +112,11 @@ export default {
|
||||
if (!this.canClick) return
|
||||
this.canClick = false
|
||||
this.cutNUm = 60
|
||||
captchaApi(this.formInline.phone).then(async res => {
|
||||
this.$message.success(res.data.message)
|
||||
captchaApi({
|
||||
phone: this.formInline.phone,
|
||||
types: 0
|
||||
}).then(async res => {
|
||||
this.$message.success('发送成功')
|
||||
})
|
||||
const time = setInterval(() => {
|
||||
this.cutNUm--
|
||||
@@ -165,13 +132,18 @@ export default {
|
||||
},
|
||||
// 注册
|
||||
handleSubmit(name) {
|
||||
this.formInline.account = this.formInline.phone
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
registerApi(this.formInline).then(async res => {
|
||||
this.$message.success('注册成功')
|
||||
setTimeout(() => {
|
||||
this.changelogo()
|
||||
}, 1000)
|
||||
this.loading = false;
|
||||
}).catch(()=>{
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div class="filter-container mb20">
|
||||
<div>
|
||||
<el-tabs v-model="tableFrom.type" @tab-click="onChangeType">
|
||||
<el-tab-pane label="短信" name="sms"></el-tab-pane>
|
||||
<el-tab-pane label="商品采集" name="copy"></el-tab-pane>
|
||||
<el-tab-pane label="物流查询" name="expr_query"></el-tab-pane>
|
||||
<el-tab-pane label="电子面单打印" name="expr_dump"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<!--短信列表-->
|
||||
<div class="note" v-if="(tableFrom.type==='sms' && sms.open === 1) || (tableFrom.type==='expr_query' && query.open === 1) || (tableFrom.type==='copy' && copy.open === 1) || (tableFrom.type==='expr_dump' && dump.open === 1)">
|
||||
<div class="filter-container mb20" v-if="tableFrom.type === 'sms'">
|
||||
<div class="demo-input-suffix">
|
||||
<span class="seachTiele">短信状态:</span>
|
||||
<el-radio-group v-model="tableFrom.resultCode" size="small" @change="getList">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button label="100">成功</el-radio-button>
|
||||
<el-radio-button label="130">失败</el-radio-button>
|
||||
<el-radio-button label="131">空号</el-radio-button>
|
||||
<el-radio-button label="132">停机</el-radio-button>
|
||||
<el-radio-button label="133">关机</el-radio-button>
|
||||
<el-radio-button label="134">无状态</el-radio-button>
|
||||
<el-radio-button label="400">黑名单</el-radio-button>
|
||||
<el-radio-group v-model="tableFrom.status" size="small" @change="getList" class="mr20">
|
||||
<el-radio-button label="3">全部</el-radio-button>
|
||||
<el-radio-button label="1">成功</el-radio-button>
|
||||
<el-radio-button label="2">失败</el-radio-button>
|
||||
<el-radio-button label="0">发送中</el-radio-button>
|
||||
</el-radio-group>
|
||||
<router-link :to="{path: '/operation/systemSms/template'}">
|
||||
<el-button type="primary" size="mini" class="mr20">短信模板</el-button>
|
||||
</router-link>
|
||||
<el-button size="mini" @click="editSign">修改签名</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
@@ -24,40 +31,17 @@
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column
|
||||
prop="id"
|
||||
label="ID"
|
||||
min-width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="phone"
|
||||
label="手机号"
|
||||
min-width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="content"
|
||||
label="模板内容"
|
||||
min-width="450"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="template"
|
||||
label="模板ID"
|
||||
min-width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="memo"
|
||||
label="备注"
|
||||
min-width="200"
|
||||
/>
|
||||
<el-table-column
|
||||
label="发送时间"
|
||||
min-width="150"
|
||||
prop="createTime"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="resultcode"
|
||||
label="状态码"
|
||||
min-width="100"
|
||||
/>
|
||||
v-for="(item, index) in columns2" :key="index"
|
||||
:prop="item.key"
|
||||
:label="item.title"
|
||||
:min-width="item.minWidth">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="['content'].indexOf(item.key) > -1" class="demo-image__preview">
|
||||
<span>{{scope.row[item.key].num}}</span>
|
||||
</div>
|
||||
<span v-else>{{ scope.row[item.key] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@@ -70,18 +54,170 @@
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<!--无开通-->
|
||||
<div v-else>
|
||||
<!--开通按钮-->
|
||||
<div v-if="(tableFrom.type==='sms' && !isSms) || (tableFrom.type==='expr_dump' && !isDump) || ((tableFrom.type==='copy' || tableFrom.type==='expr_query') && !isCopy)" class="wuBox acea-row row-column-around row-middle">
|
||||
<div class="wuTu"><img src="../../../../assets/imgs/wutu.png"></div>
|
||||
<div class="mb15">
|
||||
<span class="wuSp1">{{tableFrom.type | onePassTypeFilter}}未开通哦</span>
|
||||
<span class="wuSp2">点击立即开通按钮,即可使用{{tableFrom.type | onePassTypeFilter}}服务哦~~~</span>
|
||||
</div>
|
||||
<el-button size="medium" type="primary" @click="onOpenIndex(tableFrom.type)">立即开通</el-button>
|
||||
</div>
|
||||
<!--短信立即开通/开通电子面单服务-->
|
||||
<div class="smsBox" v-if="(isDump && tableFrom.type==='expr_dump') || (isSms && tableFrom.type==='sms')">
|
||||
<div class="index_from page-account-container">
|
||||
<div class="page-account-top">
|
||||
<span class="page-account-top-tit">开通电子面单服务</span>
|
||||
</div>
|
||||
<el-form ref="formInlineDump" :model="formInlineDump" :rules="ruleInline" @submit.native.prevent @keyup.enter="handleSubmitDump('formInlineDump')">
|
||||
<el-form-item prop="sign" class="maxInpt" v-if="isSms && tableFrom.type==='sms'" key="1">
|
||||
<el-input type="text" v-model="formInlineDump.sign" prefix="ios-contact-outline" placeholder="请输入短信签名"/>
|
||||
</el-form-item>
|
||||
<template v-if="isDump && tableFrom.type==='expr_dump'">
|
||||
<el-form-item prop="com" class="maxInpt">
|
||||
<el-select v-model="formInlineDump.com" filterable placeholder="请选择快递公司" @change="onChangeExport" style="text-align: left;" class="width10">
|
||||
<el-option v-for="(item,index) in exportList" :value="item.code" :key="index" :label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="temp_id" class="tempId maxInpt">
|
||||
<div class="acea-row">
|
||||
<el-select v-model="formInlineDump.tempId" placeholder="请选择电子面单模板" style="text-align: left;" :class="[formInlineDump.tempId?'width9':'width10']" @change="onChangeImg">
|
||||
<el-option v-for="(item, index) in exportTempList" :value="item.temp_id" :key="index" :label="item.title"></el-option>
|
||||
</el-select>
|
||||
<div v-if="formInlineDump.tempId" style="position: relative;">
|
||||
<!--<span class="tempImg" @click="">预览</span>-->
|
||||
<div class="tempImgList ml10">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
style="width: 36px; height: 36px"
|
||||
:src="tempImg"
|
||||
:preview-src-list="[tempImg]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item prop="toName" class="maxInpt">
|
||||
<el-input type="text" v-model="formInlineDump.toName" prefix="ios-contact-outline"
|
||||
placeholder="请填写寄件人姓名"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="toTel" class="maxInpt">
|
||||
<el-input type="text" v-model="formInlineDump.toTel" prefix="ios-contact-outline"
|
||||
placeholder="请填写寄件人电话"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="toAddress" class="maxInpt">
|
||||
<el-input type="text" v-model="formInlineDump.toAddress" prefix="ios-contact-outline"
|
||||
placeholder="请填写寄件人详细地址"/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="siid" class="maxInpt">
|
||||
<el-input type="text" v-model="formInlineDump.siid" prefix="ios-contact-outline"
|
||||
placeholder="请填写云打印编号"/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<el-form-item class="maxInpt">
|
||||
<el-button type="primary" size="medium" :loading="loading" @click="handleSubmitDump('formInlineDump')" class="btn width10">立即开通</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--修改签名-->
|
||||
<el-dialog
|
||||
title="短信账户签名修改"
|
||||
:visible.sync="dialogVisible"
|
||||
width="500px"
|
||||
:before-close="handleClose">
|
||||
<el-form ref="formInline" size="small" :model="formInline" :rules="ruleInlineSign" class="login-form" autocomplete="on" label-position="left">
|
||||
<el-form-item>
|
||||
<el-input v-model="formInline.account" :disabled="true" prefix-icon="el-icon-user">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sign">
|
||||
<el-input
|
||||
v-model="formInline.sign"
|
||||
placeholder="请输入短信签名,例如:CRMEB"
|
||||
prefix-icon="el-icon-document"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="phone">
|
||||
<el-input
|
||||
v-model="formInline.phone"
|
||||
placeholder="请输入您的手机号"
|
||||
prefix-icon="el-icon-phone-outline"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" class="captcha">
|
||||
<div class="acea-row" style="flex-wrap: nowrap;">
|
||||
<el-input
|
||||
ref="username"
|
||||
v-model="formInline.code"
|
||||
placeholder="验证码"
|
||||
name="username"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
autocomplete="off"
|
||||
prefix-icon="el-icon-message"
|
||||
style="width: 90%"
|
||||
/>
|
||||
<el-button size="mini" :disabled=!this.canClick @click="cutDown">{{cutNUm}}</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleSubmit('formInline')">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { smsLstApi } from '@/api/sms'
|
||||
import { smsLstApi, serviceOpenApi, exportTempApi, expressAllApi, captchaApi, smsSignApi } from '@/api/sms'
|
||||
import * as commFilter from '@/filters/commFilter';
|
||||
import Template from "../../../appSetting/wxAccount/wxTemplate/index";
|
||||
export default {
|
||||
name: 'TableList',
|
||||
props: {
|
||||
copy: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
dump: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
query: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
sms: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
accountInfo: {
|
||||
type: Object,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
components: {Template},
|
||||
data() {
|
||||
const validatePhone = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请填写手机号'));
|
||||
} else if (!/^1[3456789]\d{9}$/.test(value)) {
|
||||
callback(new Error('手机号格式不正确!'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
dialogVisible: false,
|
||||
listLoading: false,
|
||||
tableData: {
|
||||
data: [],
|
||||
@@ -90,20 +226,333 @@ export default {
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
resultCode: ''
|
||||
}
|
||||
status: '',
|
||||
type: 'sms'
|
||||
},
|
||||
columns2: [],
|
||||
isSms: false, // 是否开通短信
|
||||
isDump: false, // 是否开通电子面单,是否开通物流查询
|
||||
isCopy: false, // 是否开通商品采集
|
||||
modals: false,
|
||||
loading: false,
|
||||
formInlineDump: {
|
||||
tempId: '',
|
||||
sign: '',
|
||||
com: '',
|
||||
toName: '',
|
||||
toTel: '',
|
||||
siid: '',
|
||||
toAddress: '',
|
||||
type: ''
|
||||
},
|
||||
ruleInline: {
|
||||
sign: [
|
||||
{ required: true, message: '请输入短信签名', trigger: 'blur' }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||
],
|
||||
com: [
|
||||
{ required: true, message: '请选择快递公司', trigger: 'change' }
|
||||
],
|
||||
tempId: [
|
||||
{ required: true, message: '请选择打印模板', trigger: 'change' }
|
||||
],
|
||||
toName: [
|
||||
{ required: true, message: '请输寄件人姓名', trigger: 'blur' }
|
||||
],
|
||||
toTel: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
siid: [
|
||||
{ required: true, message: '请输入云打印机编号', trigger: 'blur' }
|
||||
],
|
||||
toAddress: [
|
||||
{ required: true, message: '请输寄件人地址', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
tempImg: '', // 图片
|
||||
exportTempList: [], // 电子面单模板
|
||||
exportList: [], // 快递公司列表
|
||||
formInline: {
|
||||
phone: '',
|
||||
code: '',
|
||||
sign: ''
|
||||
},
|
||||
ruleInlineSign: {
|
||||
sign: [
|
||||
{ required: true, message: '请输入短信签名', trigger: 'blur' }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, validator: validatePhone, trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '请输入验证码', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
cutNUm: '获取验证码',
|
||||
canClick: true,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
sms (n) {
|
||||
if (n.open === 1) this.getList();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
if (this.isChecked === '1' && this.sms.open === 1) this.getList();
|
||||
},
|
||||
methods: {
|
||||
editSign(){
|
||||
this.formInline.account = this.accountInfo.account;
|
||||
this.formInline.sign = this.accountInfo.sms.sign;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
//修改签名
|
||||
handleSubmit (name) {
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
smsSignApi(this.formInline).then(async res => {
|
||||
this.$message.success('修改成功!');
|
||||
this.dialogVisible = false;
|
||||
this.$refs[formName].resetFields();
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 短信验证码
|
||||
cutDown () {
|
||||
if (this.formInline.phone) {
|
||||
if (!this.canClick) return;
|
||||
this.canClick = false;
|
||||
this.cutNUm = 60;
|
||||
let data = {
|
||||
phone: this.formInline.phone,
|
||||
types: 1
|
||||
};
|
||||
captchaApi(data).then(async res => {
|
||||
this.$message.success(res.msg);
|
||||
})
|
||||
let time = setInterval(() => {
|
||||
this.cutNUm--;
|
||||
if (this.cutNUm === 0) {
|
||||
this.cutNUm = '获取验证码';
|
||||
this.canClick = true;
|
||||
clearInterval(time)
|
||||
}
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$message.warning('请填写手机号!');
|
||||
}
|
||||
},
|
||||
handleClose(){
|
||||
this.dialogVisible = false
|
||||
this.$refs['formInline'].resetFields();
|
||||
},
|
||||
// 首页去开通
|
||||
onOpenIndex (val) {
|
||||
this.tableFrom.type = val;
|
||||
switch (val) {
|
||||
case 'sms':
|
||||
this.isSms = true;
|
||||
break;
|
||||
case 'expr_dump':
|
||||
this.openDump();
|
||||
break;
|
||||
default:
|
||||
this.openOther();
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 开通其他
|
||||
openOther () {
|
||||
this.$confirm(`确定开通${commFilter.onePassTypeFilter(this.tableFrom.type)}吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// this.handleSubmitDump('formInlineDump');
|
||||
serviceOpenApi({type: this.tableFrom.type}).then(async res => {
|
||||
this.$message.success('开通成功!');
|
||||
this.getList();
|
||||
this.$emit('openService')
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 开通电子面单
|
||||
openDump () {
|
||||
this.exportTempAllList();
|
||||
this.isDump = true;
|
||||
},
|
||||
// 物流公司
|
||||
exportTempAllList () {
|
||||
expressAllApi().then(async res => {
|
||||
this.exportList = res;
|
||||
})
|
||||
},
|
||||
// 快递公司选择
|
||||
onChangeExport (val) {
|
||||
this.formInlineDump.tempId = '';
|
||||
this.exportTemp(val);
|
||||
},
|
||||
// 电子面单模板
|
||||
exportTemp (val) {
|
||||
exportTempApi({ com: val }).then(async res => {
|
||||
this.exportTempList = res.data.data || [];
|
||||
})
|
||||
},
|
||||
onChangeImg (item) {
|
||||
this.exportTempList.map(i => {
|
||||
if (i.temp_id === item) this.tempImg = i.pic
|
||||
})
|
||||
},
|
||||
handleSubmitDump (name) {
|
||||
this.formInlineDump.type = this.tableFrom.type;
|
||||
this.$refs[name].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
serviceOpenApi(this.formInlineDump).then(async res => {
|
||||
this.$emit('openService');
|
||||
this.$message.success('开通成功!');
|
||||
this.getList();
|
||||
this.loading = false;
|
||||
}).catch(()=>{
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
},
|
||||
onChangeType () {
|
||||
this.tableFrom.page = 1
|
||||
this.getList()
|
||||
},
|
||||
// 列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
smsLstApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.list
|
||||
this.tableData.total = res.total
|
||||
this.tableData.data = res.data
|
||||
this.tableData.total = res.count
|
||||
switch (this.tableFrom.type) {
|
||||
case 'sms':
|
||||
this.columns2 = [
|
||||
{
|
||||
title: '手机号',
|
||||
key: 'phone',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
title: '模板内容',
|
||||
key: 'content',
|
||||
minWidth: 590
|
||||
},
|
||||
|
||||
{
|
||||
title: '发送时间',
|
||||
key: 'add_time',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
title: '状态码',
|
||||
key: '_resultcode',
|
||||
minWidth: 100
|
||||
}
|
||||
]
|
||||
break;
|
||||
case 'expr_dump':
|
||||
this.columns2 = [
|
||||
// {
|
||||
// title: '订单号',
|
||||
// slot: 'num',
|
||||
// minWidth: 150
|
||||
// },
|
||||
{
|
||||
title: '发货人',
|
||||
key: 'from_name',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '收货人',
|
||||
key: 'to_name',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '快递单号',
|
||||
key: 'num',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '快递公司编码',
|
||||
key: 'code',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
key: '_resultcode',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
title: '打印时间',
|
||||
key: 'add_time',
|
||||
minWidth: 150
|
||||
}
|
||||
]
|
||||
break;
|
||||
case 'expr_query':
|
||||
this.columns2 = [
|
||||
{
|
||||
title: '快递单号',
|
||||
key: 'content',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '快递公司编码',
|
||||
key: 'code',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
key: '_resultcode',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '添加时间',
|
||||
key: 'add_time',
|
||||
minWidth: 150
|
||||
}
|
||||
]
|
||||
break;
|
||||
default:
|
||||
this.columns2 = [
|
||||
{
|
||||
title: '复制URL',
|
||||
key: 'url',
|
||||
minWidth: 400
|
||||
},
|
||||
{
|
||||
title: '请求状态',
|
||||
key: '_resultcode',
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '添加时间',
|
||||
key: 'add_time',
|
||||
minWidth: 150
|
||||
}
|
||||
]
|
||||
break;
|
||||
}
|
||||
this.listLoading = false
|
||||
}).catch(res => {
|
||||
this.listLoading = false
|
||||
@@ -121,6 +570,87 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
/*@aaa: ~'>>>';*/
|
||||
.order_box /deep/.ivu-form-item-content{
|
||||
margin-left: 50px!important;
|
||||
}
|
||||
.maxInpt{
|
||||
max-width:400px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
.smsBox .page-account-top{
|
||||
text-align: center;
|
||||
margin: 70px 0 30px 0;
|
||||
}
|
||||
.note{
|
||||
margin-top: 15px;
|
||||
}
|
||||
.tempImg{
|
||||
cursor: pointer;
|
||||
margin-left: 11px;
|
||||
color: #1890FF;
|
||||
}
|
||||
.tempImgList{
|
||||
// opacity: 1;
|
||||
width: 38px !important;
|
||||
height: 30px !important;
|
||||
// margin-top: -30px;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
z-index: 11;
|
||||
img{
|
||||
width: 38px !important;
|
||||
height: 30px !important;
|
||||
}
|
||||
}
|
||||
.width9{
|
||||
width: 90%;
|
||||
}
|
||||
.width10{
|
||||
width: 100%;
|
||||
}
|
||||
.wuBox{
|
||||
width: 100%;
|
||||
}
|
||||
.wuSp1{
|
||||
display: block;
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
font-size: 21px;
|
||||
font-weight: 500;
|
||||
line-height: 32px;
|
||||
margin-top: 23px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.wuSp2{
|
||||
opacity: 45%;
|
||||
font-weight: 400;
|
||||
color: #000000;
|
||||
line-height: 22px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.page-account-top-tit{
|
||||
font-size: 21px;
|
||||
color: #1890FF;
|
||||
}
|
||||
.wuTu{
|
||||
width: 295px;
|
||||
height: 164px;
|
||||
margin-top: 54px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
+ span {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
.tempId{
|
||||
.ivu-form-item-content{
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card v-if="isShowList" v-loading="fullscreenLoading" class="box-card">
|
||||
<el-card v-if="isShowList" v-loading="fullscreenLoading" class="box-card mb20">
|
||||
<div class="content acea-row row-middle">
|
||||
<div class="demo-basic--circle acea-row row-middle">
|
||||
<div class="circleUrl mr20"><img :src="circleUrl"></div>
|
||||
@@ -8,41 +8,48 @@
|
||||
<div class="dashboard-workplace-header-tip">
|
||||
<div class="dashboard-workplace-header-tip-title">{{ smsAccount }},祝您每一天开心!</div>
|
||||
<div class="dashboard-workplace-header-tip-desc">
|
||||
<!--<span class="mr10">修改密码</span>-->
|
||||
<span @click="signOut">退出登录</span>
|
||||
<span class="mr10" @click="onChangePassswordIndex">修改密码</span>
|
||||
<span class="mr10" @click="onChangePhone">修改手机号</span>
|
||||
<span @click="signOut" class="mr10">退出登录</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-workplace-header-extra">
|
||||
<el-row type="flex" justify="center" align="middle" :gutter="12">
|
||||
<el-col :span="8">
|
||||
<span class="pfont acea-row row-middle">
|
||||
<el-avatar icon="el-icon-user-solid" size="small" class="mr10" />
|
||||
<span>剩余条数</span>
|
||||
</span>
|
||||
<span class="rR" v-text="numbers" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="pfont acea-row row-middle">
|
||||
<el-avatar icon="el-icon-user-solid" size="small" class="mr10" />
|
||||
<span>已发送</span>
|
||||
</span>
|
||||
<span class="rR" v-text="sendTotal" />
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="pfont acea-row row-middle">
|
||||
<el-avatar icon="el-icon-user-solid" size="small" class="mr10" />
|
||||
<span>总条数</span>
|
||||
</span>
|
||||
<span class="rR" v-text="amount" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="dashboard">
|
||||
<div class="dashboard-workplace-header-extra">
|
||||
<div class="acea-row">
|
||||
<div class="header-extra">
|
||||
<p class="mb5"><span>短信条数</span></p>
|
||||
<p class="mb5">{{sms.num || 0}}</p>
|
||||
<el-button size="mini" type="primary" @click="sms.open ===0?onOpen('sms'):mealPay('sms')" v-text="sms.open ===0?'开通服务':'套餐购买'"></el-button>
|
||||
</div>
|
||||
<div class="header-extra">
|
||||
<p class="mb5"><span>采集次数</span></p>
|
||||
<p class="mb5">{{copy.num || 0}}</p>
|
||||
<el-button size="mini" type="primary" @click="copy.open ===0?onOpen('copy'):mealPay('copy')" v-text="copy.open ===0?'开通服务':'套餐购买'"></el-button>
|
||||
</div>
|
||||
<div class="header-extra">
|
||||
<p class="mb5"><span>物流查询次数</span></p>
|
||||
<p class="mb5">{{query.num || 0}}</p>
|
||||
<el-button size="mini" type="primary" @click="query.open ===0?onOpen('expr_query'):mealPay('expr_query')" v-text="query.open ===0?'开通服务':'套餐购买'"></el-button>
|
||||
</div>
|
||||
<div class="header-extra" style="border: none;">
|
||||
<p class="mb5"><span>面单打印次数</span> </p>
|
||||
<p class="mb5">{{dump.num || 0}}</p>
|
||||
<el-button size="mini" type="primary" @click="dump.open ===0?onOpen('expr_dump'):mealPay('expr_dump')" v-text="dump.open ===0?'开通服务':'套餐购买'"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<table-list v-if="isShowList" />
|
||||
<login-from v-if="isShowLogn" @on-changes="onChangeReg" @on-Login="onLogin" />
|
||||
<register-from v-if="isShowReg" @on-change="logoup" />
|
||||
<el-card class="box-card" v-loading="loading">
|
||||
<table-list v-if="isShowList" ref="tableLists" :sms="sms" :copy="copy" :dump="dump" :query="query" :accountInfo="accountInfo" @openService="openService"/>
|
||||
<login-from v-if="isShowLogn" @on-changes="onChangeReg" @on-Login="onLogin" />
|
||||
<forget-password v-if="isShow" @goback="goback" @on-Login="onLogin" :isIndex="isIndex"></forget-password>
|
||||
<forget-phone v-if="isForgetPhone" @gobackPhone="gobackPhone" @on-Login="onLogin"></forget-phone>
|
||||
<register-from v-if="isShowReg" @on-change="logoup" />
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -50,24 +57,31 @@
|
||||
import tableList from './components/tableList'
|
||||
import loginFrom from './components/loginFrom'
|
||||
import registerFrom from './components/register'
|
||||
import forgetPassword from './components/forgetPassword';
|
||||
import forgetPhone from './components/forgetPhone';
|
||||
import { logoutApi, smsNumberApi, smsInfoApi } from '@/api/sms'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'SmsConfig',
|
||||
components: { tableList, loginFrom, registerFrom },
|
||||
components: { tableList, loginFrom, registerFrom, forgetPassword, forgetPhone },
|
||||
data() {
|
||||
return {
|
||||
fullscreenLoading: false,
|
||||
loading: false,
|
||||
smsAccount: '',
|
||||
circleUrl: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
|
||||
accountInfo:{},
|
||||
spinShow: false,
|
||||
isShowLogn: false,
|
||||
isShow: false,
|
||||
isShowReg: false,
|
||||
isShowList: false,
|
||||
amount: 0,
|
||||
numbers: 0,
|
||||
sendTotal: 0
|
||||
isForgetPhone: false, // 修改手机号
|
||||
isIndex: false, // 判断忘记密码返回的路径
|
||||
isShowLogn: false, // 登录
|
||||
isShow: false, // 修改密码
|
||||
isShowReg: false, // 注册
|
||||
isShowList: false, // 登录之后列表
|
||||
sms: { open: 0 }, // 短信信息
|
||||
query: { open: 0 }, // 物流查询
|
||||
dump: { open: 0 }, // 电子面单打印
|
||||
copy: { open: 0 } // 商品采集
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -84,14 +98,78 @@ export default {
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
// 开通服务
|
||||
openService (val) {
|
||||
this.getNumber();
|
||||
},
|
||||
onOpen (val) {
|
||||
this.$refs.tableLists.onOpenIndex(val);
|
||||
},
|
||||
// 手机号返回
|
||||
gobackPhone () {
|
||||
this.isShowList = true;
|
||||
this.isForgetPhone = false;
|
||||
},
|
||||
onChangePhone () {
|
||||
this.isForgetPhone = true
|
||||
this.isShowLogn = false;
|
||||
this.isShowList = false;
|
||||
},
|
||||
// 密码返回
|
||||
goback () {
|
||||
if (this.isIndex) {
|
||||
this.isShowList = true;
|
||||
this.isShow = false;
|
||||
} else {
|
||||
this.isShowLogn = true;
|
||||
this.isShow = false;
|
||||
}
|
||||
},
|
||||
// 修改密码
|
||||
onChangePassswordIndex () {
|
||||
this.isIndex = true;
|
||||
this.passsword();
|
||||
},
|
||||
passsword () {
|
||||
this.isShowLogn = false;
|
||||
this.isShow = true;
|
||||
this.isShowList = false;
|
||||
},
|
||||
mealPay (val) {
|
||||
this.$router.push({ path:'/operation/systemSms/pay',query:{type:val}});
|
||||
},
|
||||
// 剩余条数
|
||||
getNumber() {
|
||||
this.loading = true;
|
||||
smsInfoApi().then(async res => {
|
||||
const data = res
|
||||
this.numbers = data.num
|
||||
this.sendTotal = data.surp
|
||||
this.amount = data.num + data.surp
|
||||
this.smsAccount = data.account
|
||||
let data = res;
|
||||
this.sms = {
|
||||
num: data.sms.num,
|
||||
open: data.sms.open,
|
||||
surp: data.sms.open
|
||||
};
|
||||
this.query = {
|
||||
num: data.query.num,
|
||||
open: data.query.open,
|
||||
surp: data.query.open
|
||||
};
|
||||
this.dump = {
|
||||
num: data.dump.num,
|
||||
open: data.dump.open,
|
||||
surp: data.dump.open
|
||||
};
|
||||
this.copy = {
|
||||
num: data.copy.num,
|
||||
open: data.copy.open,
|
||||
surp: data.copy.open
|
||||
};
|
||||
this.loading = false;
|
||||
this.smsAccount = data.account;
|
||||
this.accountInfo = data;
|
||||
}).catch(res => {
|
||||
this.isShowLogn = true;
|
||||
this.isShowList = false;
|
||||
this.loading = false;
|
||||
})
|
||||
},
|
||||
// 登录跳转
|
||||
@@ -100,6 +178,7 @@ export default {
|
||||
if (url) {
|
||||
this.$router.replace(url)
|
||||
} else {
|
||||
this.getNumber()
|
||||
this.isShowLogn = false
|
||||
this.isShow = false
|
||||
this.isShowReg = false
|
||||
@@ -115,8 +194,8 @@ export default {
|
||||
this.isShowList = data.status
|
||||
if (data.status) {
|
||||
this.smsAccount = data.info
|
||||
this.getNumber()
|
||||
}
|
||||
this.getNumber()
|
||||
this.fullscreenLoading = false
|
||||
}).catch(res => {
|
||||
this.fullscreenLoading = false
|
||||
@@ -129,8 +208,6 @@ export default {
|
||||
this.isShowLogn = true
|
||||
this.isShowList = false
|
||||
this.$store.dispatch('user/isLogin')
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
// 立即注册
|
||||
@@ -150,6 +227,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.dashboard{
|
||||
width: auto !important;
|
||||
min-width: 300px;
|
||||
}
|
||||
.header-extra{
|
||||
/*width: 25%;*/
|
||||
border-right: 1px solid #E9E9E9;
|
||||
text-align: center;
|
||||
padding: 0 18px;
|
||||
}
|
||||
$cursor: #1890ff;
|
||||
.content{
|
||||
justify-content: space-between;
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<router-link :to="{path:'/operation/onePass'}">
|
||||
<el-button class="mb35" size="mini" icon="el-icon-arrow-left">返回</el-button>
|
||||
</router-link>
|
||||
|
||||
<el-tabs v-model="tableFrom.type" @tab-click="onChangeType" class="mb20">
|
||||
<el-tab-pane label="短信" name="sms"></el-tab-pane>
|
||||
<el-tab-pane label="商品采集" name="copy"></el-tab-pane>
|
||||
<el-tab-pane label="物流查询" name="expr_query"></el-tab-pane>
|
||||
<el-tab-pane label="电子面单打印" name="expr_dump"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-row v-loading="fullscreenLoading" :gutter="16">
|
||||
<el-col :span="24" class="ivu-text-left mb20">
|
||||
<el-col :xs="12" :sm="6" :md="4" :lg="3" class="mr20">
|
||||
@@ -101,7 +111,10 @@ export default {
|
||||
current: 0,
|
||||
checkList: {},
|
||||
fullscreenLoading: false,
|
||||
code: {}
|
||||
code: {},
|
||||
tableFrom: {
|
||||
type: 'sms'
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -109,19 +122,24 @@ export default {
|
||||
'isLogin'
|
||||
])
|
||||
},
|
||||
created () {
|
||||
this.tableFrom.type = this.$route.query.type;
|
||||
this.onIsLogin();
|
||||
},
|
||||
mounted() {
|
||||
this.getNumber()
|
||||
this.getPrice()
|
||||
return
|
||||
|
||||
if (!this.isLogin) {
|
||||
this.$router.push('/operation/systemSms/config?url=' + this.$route.path)
|
||||
this.$router.push('/operation/onePass?url=' + this.$route.path)
|
||||
} else {
|
||||
this.getNumber()
|
||||
this.getPrice()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChangeType (val) {
|
||||
this.current = 0;
|
||||
this.getPrice();
|
||||
this.getNumber()
|
||||
},
|
||||
// 查看是否登录
|
||||
onIsLogin() {
|
||||
this.fullscreenLoading = true
|
||||
@@ -129,29 +147,42 @@ export default {
|
||||
const data = res
|
||||
if (!data.status) {
|
||||
this.$message.warning('请先登录')
|
||||
this.$router.push('/operation/systemSms/config?url=' + this.$route.path)
|
||||
this.$router.push('/operation/onePass?url=' + this.$route.path)
|
||||
} else {
|
||||
this.getNumber()
|
||||
this.getPrice()
|
||||
}
|
||||
this.fullscreenLoading = false
|
||||
}).catch(res => {
|
||||
this.$router.push('/operation/systemSms/config?url=' + this.$route.path)
|
||||
this.$router.push('/operation/onePass?url=' + this.$route.path)
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
// 剩余条数
|
||||
getNumber() {
|
||||
smsInfoApi().then(async res => {
|
||||
const data = res
|
||||
this.numbers = data.number
|
||||
this.account = data.account
|
||||
let data = res;
|
||||
this.account = data.account;
|
||||
switch (this.tableFrom.type) {
|
||||
case 'sms':
|
||||
this.numbers = data.sms.num
|
||||
break;
|
||||
case 'copy':
|
||||
this.numbers = data.copy.num
|
||||
break;
|
||||
case 'expr_dump':
|
||||
this.numbers = data.dump.num
|
||||
break;
|
||||
default:
|
||||
this.numbers = data.query.num
|
||||
break;
|
||||
}
|
||||
})
|
||||
},
|
||||
// 支付套餐
|
||||
getPrice() {
|
||||
this.fullscreenLoading = true
|
||||
smsPriceApi({ page: 1, limit: 9999}).then(async res => {
|
||||
smsPriceApi(this.tableFrom).then(async res => {
|
||||
setTimeout(() => {
|
||||
this.fullscreenLoading = false
|
||||
}, 800)
|
||||
@@ -178,7 +209,9 @@ export default {
|
||||
const data = {
|
||||
payType: 'weixin',
|
||||
mealId: item.id,
|
||||
price: item.price
|
||||
price: item.price,
|
||||
num: item.num,
|
||||
type: this.tableFrom.type
|
||||
}
|
||||
payCodeApi(data).then(async res => {
|
||||
this.code = res
|
||||
|
||||
@@ -4,26 +4,9 @@
|
||||
<el-card v-loading="fullscreenLoading" class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="模板状态:" class="mr10">
|
||||
<el-select v-model="tableFrom.status" placeholder="请选择" clearable class="filter-item selWidth mr20" @change="userSearchs">
|
||||
<el-option value="1" label="可用"></el-option>
|
||||
<el-option value="0" label="不可用"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板类型:" class="mr10">
|
||||
<el-select v-model="tableFrom.type" placeholder="请选择" clearable class="filter-item selWidth mr20" @change="userSearchs">
|
||||
<el-option value="1" label="验证码"></el-option>
|
||||
<el-option value="2" label="通知"></el-option>
|
||||
<el-option value="3" label="推广"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模板名称:" class="mr10">
|
||||
<el-input v-model="tableFrom.title" placeholder="请输入模板名称" class="selWidth">
|
||||
<el-button slot="append" icon="el-icon-search" @click="userSearchs" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<router-link :to="{path:'/operation/onePass'}">
|
||||
<el-button class="mb35" size="mini" icon="el-icon-arrow-left">返回</el-button>
|
||||
</router-link>
|
||||
</div>
|
||||
<el-button size="mini" type="primary" @click="add">添加短信模板</el-button>
|
||||
</div>
|
||||
@@ -40,7 +23,7 @@
|
||||
min-width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="templateid"
|
||||
prop="temp_id"
|
||||
label="模板ID"
|
||||
min-width="80"
|
||||
/>
|
||||
@@ -59,7 +42,7 @@
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="{row}">
|
||||
<span>{{ row.type | typesFilter }}</span>
|
||||
<span>{{ row.temp_type | typesFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模板状态">
|
||||
@@ -67,11 +50,6 @@
|
||||
<span>{{ row.status | statusFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="add_time"
|
||||
label="添加时间"
|
||||
min-width="150"
|
||||
/>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@@ -142,10 +120,7 @@ export default {
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
status: '',
|
||||
title: '',
|
||||
type: ''
|
||||
limit: 20
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -156,7 +131,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
if (!this.isLogin) {
|
||||
this.$router.push('/operation/systemSms/config?url=' + this.$route.path)
|
||||
this.$router.push('/operation/onePass?url=' + this.$route.path)
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
@@ -187,13 +162,13 @@ export default {
|
||||
const data = res
|
||||
if (!data.status) {
|
||||
this.$message.warning('请先登录')
|
||||
this.$router.push( '/operation/systemSms/config?url=' + this.$route.path)
|
||||
this.$router.push( '/operation/onePass?url=' + this.$route.path)
|
||||
} else {
|
||||
this.getList()
|
||||
}
|
||||
this.fullscreenLoading = false
|
||||
}).catch(res => {
|
||||
this.$router.push( '/operation/systemSms/config?url=' + this.$route.path)
|
||||
this.$router.push( '/operation/onePass?url=' + this.$route.path)
|
||||
this.fullscreenLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user