Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui into dev-gl
commit
a5e2ae9a4d
|
@ -1 +1 @@
|
|||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.2.1 .
|
||||
|
|
|
@ -3,10 +3,7 @@
|
|||
<!-- 顶部logo -->
|
||||
<div class="top-content" @click='$refs.verify.show = false'>
|
||||
<div class="logo-box">
|
||||
<img
|
||||
:src="$store.state.logoImg"
|
||||
@click="$router.push('/')"
|
||||
/>
|
||||
<img :src="$store.state.logoImg" @click="$router.push('/')" />
|
||||
<div>欢迎登录</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,9 +13,7 @@
|
|||
<Carousel loop :autoplay-speed="5000" class="login-carousel" arrow="never">
|
||||
<CarouselItem>
|
||||
<div class="demo-carousel" @click='$refs.verify.show = false'>
|
||||
<img
|
||||
src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680"
|
||||
/>
|
||||
<img src="https://wanmi-b2b.oss-cn-shanghai.aliyuncs.com/201811141632252680" />
|
||||
</div>
|
||||
</CarouselItem>
|
||||
</Carousel>
|
||||
|
@ -32,99 +27,65 @@
|
|||
<div @click="$router.push('signUp')">立即注册</div>
|
||||
</div>
|
||||
<!-- 账号密码登录 -->
|
||||
<Form
|
||||
ref="formInline"
|
||||
:model="formData"
|
||||
:rules="ruleInline"
|
||||
v-show="type === true"
|
||||
@click.self='$refs.verify.show = false'
|
||||
>
|
||||
<Form ref="formInline" :model="formData" :rules="ruleInline" v-show="type === true"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
<FormItem prop="username">
|
||||
<i-input
|
||||
type="text"
|
||||
v-model="formData.username"
|
||||
clearable
|
||||
placeholder="用户名"
|
||||
>
|
||||
<i-input type="text" v-model="formData.username" clearable placeholder="用户名">
|
||||
<Icon type="md-person" slot="prepend"></Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem prop="password">
|
||||
<i-input
|
||||
type="password"
|
||||
v-model="formData.password"
|
||||
clearable
|
||||
placeholder="密码"
|
||||
>
|
||||
<i-input type="password" v-model="formData.password" clearable placeholder="密码">
|
||||
<Icon type="md-lock" slot="prepend"> </Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button
|
||||
type="error"
|
||||
@click.stop="handleSubmit('formInline')"
|
||||
long
|
||||
>登录</Button>
|
||||
<Button type="error" @click.stop="handleSubmit('formInline')" long>登录</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<!-- 验证码登录 -->
|
||||
<Form
|
||||
ref="formSms"
|
||||
:model="formSms"
|
||||
:rules="ruleInline"
|
||||
v-show="type === false"
|
||||
@click.self='$refs.verify.show = false'
|
||||
>
|
||||
<Form ref="formSms" :model="formSms" :rules="ruleInline" v-show="type === false"
|
||||
@click.self='$refs.verify.show = false'>
|
||||
<FormItem prop="mobile">
|
||||
<i-input
|
||||
type="text"
|
||||
v-model="formSms.mobile"
|
||||
clearable
|
||||
placeholder="手机号"
|
||||
>
|
||||
<i-input type="text" v-model="formSms.mobile" clearable placeholder="手机号">
|
||||
<Icon type="md-lock" slot="prepend"></Icon>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem prop="code">
|
||||
<i-input
|
||||
type="text"
|
||||
v-model="formSms.code"
|
||||
placeholder="手机验证码"
|
||||
>
|
||||
<Icon
|
||||
type="ios-text-outline"
|
||||
style="font-weight: bold"
|
||||
slot="prepend"
|
||||
/>
|
||||
<i-input type="text" v-model="formSms.code" placeholder="手机验证码">
|
||||
<Icon type="ios-text-outline" style="font-weight: bold" slot="prepend" />
|
||||
<Button slot="append" @click="sendCode">{{ codeMsg }}</Button>
|
||||
</i-input>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button @click.stop="verifyBtnClick" long :type="verifyStatus?'success':'default'">{{verifyStatus?'验证通过':'点击完成安全验证'}}</Button>
|
||||
<Button @click.stop="verifyBtnClick" long
|
||||
:type="verifyStatus?'success':'default'">{{verifyStatus?'验证通过':'点击完成安全验证'}}</Button>
|
||||
</FormItem>
|
||||
<FormItem>
|
||||
<Button
|
||||
type="error"
|
||||
@click="handleSubmit('formSms')"
|
||||
long
|
||||
>登录</Button>
|
||||
<Button type="error" @click="handleSubmit('formSms')" long>登录</Button>
|
||||
</FormItem>
|
||||
</Form>
|
||||
<div class="regist">
|
||||
<span @click="$router.push('forgetPassword')">忘记密码</span>
|
||||
</div>
|
||||
<div class="other-login">
|
||||
<Icon custom="icomoon icon-qq" color="" class="icon-hover" @click="handleWebLogin('QQ')"/>
|
||||
<Icon custom="icomoon icon-wechat" color="" class="icon-hover" @click="handleWebLogin('WECHAT_PC')"/>
|
||||
<svg t="1631154795933" class="icon" @click="handleWebLogin('QQ')" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="4969" width="32" height="32">
|
||||
<path
|
||||
d="M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z"
|
||||
p-id="4970" fill="#1296db"></path>
|
||||
</svg>
|
||||
<svg t="1631154766336" class="icon" @click="handleWebLogin('WECHAT_PC')" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3844" width="32" height="32">
|
||||
<path
|
||||
d="M683.058 364.695c11 0 22 1.016 32.943 1.976C686.564 230.064 538.896 128 370.681 128c-188.104 0.66-342.237 127.793-342.237 289.226 0 93.068 51.379 169.827 136.725 229.256L130.72 748.43l119.796-59.368c42.918 8.395 77.37 16.79 119.742 16.79 11 0 21.46-0.48 31.914-1.442a259.168 259.168 0 0 1-10.455-71.358c0.485-148.002 128.744-268.297 291.403-268.297l-0.06-0.06z m-184.113-91.992c25.99 0 42.913 16.79 42.913 42.575 0 25.188-16.923 42.579-42.913 42.579-25.45 0-51.38-16.85-51.38-42.58 0-25.784 25.93-42.574 51.38-42.574z m-239.544 85.154c-25.384 0-51.374-16.85-51.374-42.58 0-25.784 25.99-42.574 51.374-42.574 25.45 0 42.918 16.79 42.918 42.575 0 25.188-16.924 42.579-42.918 42.579z m736.155 271.655c0-135.647-136.725-246.527-290.983-246.527-162.655 0-290.918 110.88-290.918 246.527 0 136.128 128.263 246.587 290.918 246.587 33.972 0 68.423-8.395 102.818-16.85l93.809 50.973-25.93-84.677c68.907-51.93 120.286-119.815 120.286-196.033z m-385.275-42.58c-16.923 0-34.452-16.79-34.452-34.179 0-16.79 17.529-34.18 34.452-34.18 25.99 0 42.918 16.85 42.918 34.18 0 17.39-16.928 34.18-42.918 34.18z m188.165 0c-16.984 0-33.972-16.79-33.972-34.179 0-16.79 16.927-34.18 33.972-34.18 25.93 0 42.913 16.85 42.913 34.18 0 17.39-16.983 34.18-42.913 34.18z"
|
||||
fill="#09BB07" p-id="3845"></path>
|
||||
</svg>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 拼图验证码 -->
|
||||
<verify
|
||||
ref="verify"
|
||||
class="verify-con"
|
||||
verifyType="LOGIN"
|
||||
@change="verifyChange"
|
||||
></verify>
|
||||
<verify ref="verify" class="verify-con" verifyType="LOGIN" @change="verifyChange"></verify>
|
||||
</div>
|
||||
<div class="foot">
|
||||
<Row type="flex" justify="space-around" class="help">
|
||||
|
@ -142,52 +103,53 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import * as RegExp from '@/plugins/RegExp.js';
|
||||
import { md5 } from '@/plugins/md5.js';
|
||||
import * as apiLogin from '@/api/login.js';
|
||||
import { sendSms } from '@/api/common.js';
|
||||
import { webLogin, loginCallback } from '@/api/login.js';
|
||||
import storage from '@/plugins/storage.js';
|
||||
import verify from '@/components/verify';
|
||||
import * as RegExp from "@/plugins/RegExp.js";
|
||||
import { md5 } from "@/plugins/md5.js";
|
||||
import * as apiLogin from "@/api/login.js";
|
||||
import { sendSms } from "@/api/common.js";
|
||||
import { webLogin, loginCallback } from "@/api/login.js";
|
||||
import storage from "@/plugins/storage.js";
|
||||
import verify from "@/components/verify";
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
name: "Login",
|
||||
components: {
|
||||
verify
|
||||
verify,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: true, // true 账号登录 false 验证码登录
|
||||
formData: {
|
||||
// 登录表单
|
||||
username: '',
|
||||
password: ''
|
||||
username: "",
|
||||
password: "",
|
||||
},
|
||||
formSms: { // 手机号登录
|
||||
code: '',
|
||||
mobile: ''
|
||||
formSms: {
|
||||
// 手机号登录
|
||||
code: "",
|
||||
mobile: "",
|
||||
},
|
||||
verifyStatus: false, // 是否图片验证通过
|
||||
ruleInline: {
|
||||
// 验证规则
|
||||
username: [{ required: true, message: '请输入用户名' }],
|
||||
username: [{ required: true, message: "请输入用户名" }],
|
||||
password: [
|
||||
{ required: true, message: '请输入密码' },
|
||||
{ type: 'string', min: 6, message: '密码不能少于6位' }
|
||||
{ required: true, message: "请输入密码" },
|
||||
{ type: "string", min: 6, message: "密码不能少于6位" },
|
||||
],
|
||||
mobile: [
|
||||
{ required: true, message: '请输入手机号码' },
|
||||
{ required: true, message: "请输入手机号码" },
|
||||
{
|
||||
pattern: RegExp.mobile,
|
||||
message: '请输入正确的手机号'
|
||||
}
|
||||
],
|
||||
code: [{ required: true, message: '请输入手机验证码' }]
|
||||
message: "请输入正确的手机号",
|
||||
},
|
||||
codeMsg: '发送验证码', // 验证码文字
|
||||
],
|
||||
code: [{ required: true, message: "请输入手机验证码" }],
|
||||
},
|
||||
codeMsg: "发送验证码", // 验证码文字
|
||||
interval: null, // 定时器
|
||||
time: 60, // 倒计时
|
||||
year: new Date().getFullYear()
|
||||
year: new Date().getFullYear(),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -202,17 +164,20 @@ export default {
|
|||
apiLogin.smsLogin(data).then((res) => {
|
||||
this.$refs.verify.show = false;
|
||||
if (res.success) {
|
||||
this.$Message.success('登录成功');
|
||||
storage.setItem('accessToken', res.result.accessToken);
|
||||
storage.setItem('refreshToken', res.result.refreshToken);
|
||||
this.$Message.success("登录成功");
|
||||
storage.setItem("accessToken", res.result.accessToken);
|
||||
storage.setItem("refreshToken", res.result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
if (res.success) {
|
||||
storage.setItem('userInfo', res.result);
|
||||
storage.setItem("userInfo", res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
this.$router.push({path: query.rePath, query: JSON.parse(query.query)});
|
||||
this.$router.push({
|
||||
path: query.rePath,
|
||||
query: JSON.parse(query.query),
|
||||
});
|
||||
} else {
|
||||
this.$router.push('/');
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -227,27 +192,27 @@ export default {
|
|||
// 发送手机验证码
|
||||
sendCode() {
|
||||
if (this.time === 60) {
|
||||
if (this.formSms.mobile === '') {
|
||||
this.$Message.warning('请先填写手机号');
|
||||
if (this.formSms.mobile === "") {
|
||||
this.$Message.warning("请先填写手机号");
|
||||
return;
|
||||
}
|
||||
if (!this.verifyStatus) {
|
||||
this.$Message.warning('请先完成安全验证');
|
||||
this.$Message.warning("请先完成安全验证");
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
mobile: this.formSms.mobile,
|
||||
verificationEnums: 'LOGIN'
|
||||
verificationEnums: "LOGIN",
|
||||
};
|
||||
sendSms(params).then(res => {
|
||||
sendSms(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('验证码发送成功');
|
||||
this.$Message.success("验证码发送成功");
|
||||
let that = this;
|
||||
this.interval = setInterval(() => {
|
||||
that.time--;
|
||||
if (that.time === 0) {
|
||||
that.time = 60;
|
||||
that.codeMsg = '重新发送';
|
||||
that.codeMsg = "重新发送";
|
||||
that.verifyStatus = false;
|
||||
clearInterval(that.interval);
|
||||
} else {
|
||||
|
@ -260,28 +225,35 @@ export default {
|
|||
});
|
||||
}
|
||||
},
|
||||
verifyChange (con) { // 拼图验证码回显
|
||||
verifyChange(con) {
|
||||
// 拼图验证码回显
|
||||
if (!con.status) return;
|
||||
|
||||
if (this.type === true) { // 账号密码登录
|
||||
if (this.type === true) {
|
||||
// 账号密码登录
|
||||
let data = JSON.parse(JSON.stringify(this.formData));
|
||||
data.password = md5(data.password);
|
||||
this.$refs.verify.show = false;
|
||||
this.$Spin.show();
|
||||
apiLogin.login(data).then((res) => {
|
||||
apiLogin
|
||||
.login(data)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
this.$Message.success('登录成功');
|
||||
storage.setItem('accessToken', res.result.accessToken);
|
||||
storage.setItem('refreshToken', res.result.refreshToken);
|
||||
this.$Message.success("登录成功");
|
||||
storage.setItem("accessToken", res.result.accessToken);
|
||||
storage.setItem("refreshToken", res.result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
this.$Spin.hide();
|
||||
if (res.success) {
|
||||
storage.setItem('userInfo', res.result);
|
||||
storage.setItem("userInfo", res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
this.$router.push({path: query.rePath, query: JSON.parse(query.query)});
|
||||
this.$router.push({
|
||||
path: query.rePath,
|
||||
query: JSON.parse(query.query),
|
||||
});
|
||||
} else {
|
||||
this.$router.push('/');
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -289,8 +261,9 @@ export default {
|
|||
this.$Spin.hide();
|
||||
this.$Message.error(res.message);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$Spin.hide()
|
||||
})
|
||||
.catch(() => {
|
||||
this.$Spin.hide();
|
||||
});
|
||||
} else {
|
||||
this.verifyStatus = true;
|
||||
|
@ -303,27 +276,31 @@ export default {
|
|||
this.$refs.verify.init();
|
||||
}
|
||||
},
|
||||
handleWebLogin (type) { // 第三方登录
|
||||
handleWebLogin(type) {
|
||||
// 第三方登录
|
||||
webLogin(type);
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
let uuid = this.$route.query.state;
|
||||
if (uuid) {
|
||||
storage.setItem('uuid', uuid);
|
||||
loginCallback(uuid).then(res => {
|
||||
storage.setItem("uuid", uuid);
|
||||
loginCallback(uuid).then((res) => {
|
||||
if (res.success) {
|
||||
const result = res.result;
|
||||
storage.setItem('accessToken', result.accessToken);
|
||||
storage.setItem('refreshToken', result.refreshToken);
|
||||
storage.setItem("accessToken", result.accessToken);
|
||||
storage.setItem("refreshToken", result.refreshToken);
|
||||
apiLogin.getMemberMsg().then((res) => {
|
||||
if (res.success) {
|
||||
storage.setItem('userInfo', res.result);
|
||||
storage.setItem("userInfo", res.result);
|
||||
let query = this.$route.query;
|
||||
if (query.rePath) {
|
||||
this.$router.push({path: query.rePath, query: JSON.parse(query.query)});
|
||||
this.$router.push({
|
||||
path: query.rePath,
|
||||
query: JSON.parse(query.query),
|
||||
});
|
||||
} else {
|
||||
this.$router.push('/');
|
||||
this.$router.push("/");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -341,10 +318,10 @@ export default {
|
|||
this.verifyStatus = false;
|
||||
this.$refs.verify.show = false;
|
||||
clearInterval(this.interval);
|
||||
this.codeMsg = '发送验证码';
|
||||
this.codeMsg = "发送验证码";
|
||||
this.time = 60;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
@ -402,7 +379,7 @@ export default {
|
|||
top: 80px;
|
||||
right: 15%;
|
||||
padding: 20px;
|
||||
background:rgba(255,255,255,.8);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
.account-number {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -442,8 +419,11 @@ export default {
|
|||
|
||||
.other-login {
|
||||
margin: 0 auto;
|
||||
.ivu-icon {
|
||||
font-size: 24px;
|
||||
> svg {
|
||||
cursor: pointer;
|
||||
width: 24px;
|
||||
margin-right: 10px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
.regist {
|
||||
|
|
|
@ -29,7 +29,7 @@ let cdn = {
|
|||
"https://cdn.jsdelivr.net/npm/vue@2.6.11/dist/vue.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/vuex@3.1.2/dist/vuex.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/vue-router@3.1.3/dist/vue-router.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/axios@0.19.0/dist/axios.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/axios@0.19.2/dist/axios.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/view-design@4.1.1/dist/iview.min.js",
|
||||
"https://cdn.jsdelivr.net/npm/js-cookie@2.2.1/src/js.cookie.min.js"
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/buyer-ui:4.2.2.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/wap-ui:4.2.2.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.2.1
|
||||
docker push registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.2.1
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui-4.2.0:0.0.2 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/manager-ui:4.2.2.1 .
|
||||
|
|
|
@ -15,6 +15,23 @@ export function unitPrice(val, unit, location) {
|
|||
}
|
||||
return (unit || '') + price
|
||||
}
|
||||
// 转义
|
||||
export function enCode(v1) {
|
||||
var entry = {
|
||||
"'": "'",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
"(": "(",
|
||||
")": ")"
|
||||
};
|
||||
|
||||
v1 = v1.replace(/(')|(<)|(>)|(()|())|\s/gi, function($0) {
|
||||
return entry[$0] || $0;
|
||||
});
|
||||
|
||||
return v1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单来源
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<div class="mb_10">
|
||||
<Button @click="addParent" icon="md-add">添加一级分类</Button>
|
||||
</div>
|
||||
<Table :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData" :columns="columns">
|
||||
<Table class="table" :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData"
|
||||
:columns="columns">
|
||||
<template slot="action" slot-scope="scope">
|
||||
<Dropdown v-show="scope.row.level == 2" trigger="click">
|
||||
<Button size="small">
|
||||
|
@ -32,7 +33,8 @@
|
|||
</DropdownMenu>
|
||||
</Dropdown>
|
||||
|
||||
<Button v-show="scope.row.level != 2" type="primary" @click="addChildren(scope.row)" size="small" icon="md-add" style="margin-right: 5px">添加子分类
|
||||
<Button v-show="scope.row.level != 2" type="primary" @click="addChildren(scope.row)" size="small"
|
||||
icon="md-add" style="margin-right: 5px">添加子分类
|
||||
</Button>
|
||||
</template>
|
||||
|
||||
|
@ -41,7 +43,8 @@
|
|||
</template>
|
||||
|
||||
<template slot="deleteFlag" slot-scope="{row}">
|
||||
<Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
|
||||
<Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'">
|
||||
{{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
|
@ -130,7 +133,7 @@ import {regular} from "@/utils";
|
|||
export default {
|
||||
name: "goods-category",
|
||||
components: {
|
||||
uploadPicInput
|
||||
uploadPicInput,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -168,9 +171,9 @@ export default {
|
|||
// 表单验证规则
|
||||
formValidate: {
|
||||
commissionRate: [
|
||||
{required: true, message: '请填写佣金比例'},
|
||||
{ required: true, message: "请填写佣金比例" },
|
||||
{ pattern: regular.Integer, message: "佣金比例不能为负" },
|
||||
]
|
||||
],
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
|
@ -189,7 +192,6 @@ export default {
|
|||
slot: "commissionRate",
|
||||
},
|
||||
{
|
||||
fixed: "right",
|
||||
title: "操作",
|
||||
key: "action",
|
||||
|
||||
|
@ -466,4 +468,11 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .ivu-table-wrapper {
|
||||
overflow: auto;
|
||||
}
|
||||
.table {
|
||||
min-height: 100vh;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
|
@ -88,7 +88,7 @@ export default {
|
|||
overflow-y: auto;
|
||||
}
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
color: #ed3f14;
|
||||
color: $theme_color;
|
||||
}
|
||||
/deep/.ivu-menu-vertical .ivu-menu-item-group-title {
|
||||
height: 40px;
|
||||
|
|
|
@ -196,8 +196,11 @@ export default {
|
|||
},
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.setData(val);
|
||||
value: {
|
||||
handler: function (val) {
|
||||
// 赋值给富文本
|
||||
this.setData(this.$options.filters.enCode(val));
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
</FormItem>
|
||||
<FormItem label="结算价格" prop="settlementPrice">
|
||||
<Input
|
||||
:disabled="onlyView"
|
||||
type="number"
|
||||
v-model="form.settlementPrice"
|
||||
placeholder="请填写结算价格"
|
||||
|
@ -31,6 +32,7 @@
|
|||
</FormItem>
|
||||
<FormItem label="最低购买金额" prop="purchasePrice">
|
||||
<Input
|
||||
:disabled="onlyView"
|
||||
type="number"
|
||||
v-model="form.purchasePrice"
|
||||
placeholder="请填写最低购买金额"
|
||||
|
@ -40,6 +42,7 @@
|
|||
</FormItem>
|
||||
<FormItem label="最低可砍" prop="lowestPrice">
|
||||
<Input
|
||||
:disabled="onlyView"
|
||||
type="number"
|
||||
v-model="form.lowestPrice"
|
||||
placeholder="请填写最低可砍金额"
|
||||
|
@ -49,6 +52,7 @@
|
|||
</FormItem>
|
||||
<FormItem label="最高可砍" prop="highestPrice">
|
||||
<Input
|
||||
:disabled="onlyView"
|
||||
type="number"
|
||||
v-model="form.highestPrice"
|
||||
placeholder="请填写最高可砍金额"
|
||||
|
@ -59,6 +63,7 @@
|
|||
|
||||
<FormItem label="活动库存" prop="stock">
|
||||
<Input
|
||||
:disabled="onlyView"
|
||||
type="number"
|
||||
v-model="form.stock"
|
||||
placeholder="请填写活动库存"
|
||||
|
@ -69,18 +74,19 @@
|
|||
|
||||
<FormItem label="活动时间" prop="rangeTime">
|
||||
<DatePicker
|
||||
:disabled="onlyView"
|
||||
type="datetimerange"
|
||||
v-model="form.rangeTime"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择"
|
||||
:options="options"
|
||||
style="width: 260px"
|
||||
style="width: 300px"
|
||||
>
|
||||
</DatePicker>
|
||||
</FormItem>
|
||||
<div>
|
||||
<Button type="text" @click="closeCurrentPage">返回</Button>
|
||||
<Button type="primary" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||
<Button type="primary" v-if="!onlyView" :loading="submitLoading" @click="handleSubmit">提交</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -153,6 +159,7 @@
|
|||
goodsSku: {},
|
||||
},
|
||||
id: this.$route.query.id, // 砍价活动id
|
||||
onlyView:this.$route.query.onlyView, // 是否为只读
|
||||
submitLoading: false, // 添加或编辑提交状态
|
||||
formRule: {
|
||||
settlementPrice: [
|
||||
|
|
|
@ -47,7 +47,10 @@
|
|||
<template slot-scope="{ row }" slot="quantity">
|
||||
<div>{{ row.goodsSku.quantity }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="row.promotionStatus != 'NEW'" size="small" style="margin-right: 10px"
|
||||
@click="edit(row,'onlyView')">查看
|
||||
</Button>
|
||||
<Button v-if="row.promotionStatus === 'NEW'" type="info" size="small" style="margin-right: 10px"
|
||||
@click="edit(row)">编辑
|
||||
</Button>
|
||||
|
@ -281,10 +284,14 @@ export default {
|
|||
this.total = this.data.length;
|
||||
this.loading = false;
|
||||
},
|
||||
edit(v) {
|
||||
edit(v,type) {
|
||||
let data = {
|
||||
id:v.id
|
||||
}
|
||||
type ? data.onlyView = true : ''
|
||||
this.$router.push({
|
||||
name: "edit-kanJia-activity-goods",
|
||||
query: { id: v.id },
|
||||
query: data,
|
||||
});
|
||||
},
|
||||
delAll(row) {
|
||||
|
|
|
@ -176,6 +176,7 @@ export default {
|
|||
delete this.form.createTime;
|
||||
delete this.form.updateTime;
|
||||
delete this.form.endTime;
|
||||
delete this.form.seckillApplyList;
|
||||
// 编辑
|
||||
updateSeckill(this.form).then((res) => {
|
||||
this.submitLoading = false;
|
||||
|
|
|
@ -517,6 +517,8 @@ export default {
|
|||
if (res.success) {
|
||||
this.infoResult = res.result;
|
||||
this.shopForm = res.result;
|
||||
this.shopForm.selfOperated ? this.shopForm.selfOperated = 1 : this.shopForm.selfOperated = 0
|
||||
|
||||
this.checkAllGroup = this.shopForm.goodsManagementCategory.split(",");
|
||||
if (this.shopForm.settlementCycle) {
|
||||
this.settlementCycle = this.shopForm.settlementCycle.split(',')
|
||||
|
|
|
@ -60,10 +60,10 @@
|
|||
<div class="title">{{ item.title }}</div>
|
||||
<div class="content">
|
||||
<RadioGroup type="button" button-style="solid" v-model="item.isSuper">
|
||||
<Radio :label="true">
|
||||
<Radio :label="1">
|
||||
<span>操作数据权限</span>
|
||||
</Radio>
|
||||
<Radio :label="false">
|
||||
<Radio :label="0">
|
||||
<span>查看权限</span>
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
|
@ -280,23 +280,23 @@ export default {
|
|||
{
|
||||
props: {
|
||||
color:
|
||||
data.isSuper == true
|
||||
data.isSuper == 1
|
||||
? "red"
|
||||
: data.isSuper == false
|
||||
: data.isSuper == 0
|
||||
? "default"
|
||||
: "default",
|
||||
},
|
||||
style: {
|
||||
"margin-left": "10px",
|
||||
display:
|
||||
data.isSuper == true || data.isSuper == false
|
||||
data.isSuper == 1 || data.isSuper == 0
|
||||
? "inline-block"
|
||||
: "none",
|
||||
},
|
||||
},
|
||||
data.isSuper == true
|
||||
data.isSuper == 1
|
||||
? "操作权限"
|
||||
: data.isSuper == false
|
||||
: data.isSuper == 0
|
||||
? "查看权限"
|
||||
: ""
|
||||
),
|
||||
|
@ -331,7 +331,7 @@ export default {
|
|||
*/
|
||||
setRole(val) {
|
||||
let enable;
|
||||
val == "onlyView" ? (enable = false) : (enable = true);
|
||||
val == "onlyView" ? (enable = 0) : (enable = 1);
|
||||
this.saveRoleWay.map((item) => {
|
||||
item.isSuper = enable;
|
||||
});
|
||||
|
@ -580,19 +580,21 @@ export default {
|
|||
submitPermEdit() {
|
||||
this.saveRoleWay = [];
|
||||
this.selectIsSuperModel = true; //打开选择权限
|
||||
let selectedNodes = this.$refs.tree.getCheckedNodes();
|
||||
let selectedNodes = this.$refs.tree.getCheckedAndIndeterminateNodes();
|
||||
let way = [];
|
||||
selectedNodes.forEach((e) => {
|
||||
|
||||
console.log(e)
|
||||
let perm = {
|
||||
title: e.title,
|
||||
isSuper: e.isSuper,
|
||||
isSuper: e.isSuper ? e.isSuper = 1 : e.isSuper = 0 || 0,
|
||||
menuId: e.id,
|
||||
roleId: this.editRolePermId,
|
||||
};
|
||||
way.push(perm);
|
||||
this.saveRoleWay = way;
|
||||
this.$set(this,'saveRoleWay',way)
|
||||
|
||||
});
|
||||
console.log(this.saveRoleWay)
|
||||
},
|
||||
|
||||
/**保存权限 */
|
||||
|
|
|
@ -1 +1 @@
|
|||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui-4.2.0:0.0.2 .
|
||||
docker build -t registry.cn-beijing.aliyuncs.com/lili-images/seller-ui:4.2.2.1 .
|
||||
|
|
|
@ -8,8 +8,6 @@ import vueQr from "vue-qr";
|
|||
import App from "./App";
|
||||
import { router } from "./router/index";
|
||||
import store from "./store";
|
||||
import config from '@/config/index'
|
||||
|
||||
import {
|
||||
getRequest,
|
||||
postRequest,
|
||||
|
@ -50,8 +48,8 @@ Vue.prototype.setStore = setStore;
|
|||
Vue.prototype.getStore = getStore;
|
||||
Vue.prototype.removeStore = removeStore;
|
||||
Vue.prototype.md5 = md5;
|
||||
const PC_URL = config.PC_URL; // 跳转买家端地址 pc端
|
||||
const WAP_URL = config.WAP_URL; // 跳转买家端地址 wap端
|
||||
const PC_URL = BASE.PC_URL; // 跳转买家端地址 pc端
|
||||
const WAP_URL = BASE.WAP_URL; // 跳转买家端地址 wap端
|
||||
Vue.prototype.linkTo = function(goodsId, skuId) {
|
||||
// 跳转买家端商品
|
||||
window.open(
|
||||
|
|
|
@ -15,6 +15,23 @@ export function unitPrice(val, unit, location) {
|
|||
}
|
||||
return (unit || "") + price;
|
||||
}
|
||||
// 转义
|
||||
export function enCode(v1) {
|
||||
var entry = {
|
||||
"'": "'",
|
||||
"<": "<",
|
||||
">": ">",
|
||||
"(": "(",
|
||||
")": ")"
|
||||
};
|
||||
|
||||
v1 = v1.replace(/(')|(<)|(>)|(()|())|\s/gi, function($0) {
|
||||
return entry[$0] || $0;
|
||||
});
|
||||
|
||||
return v1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单来源
|
||||
|
|
|
@ -250,4 +250,11 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/ .ivu-table-wrapper {
|
||||
overflow: auto;
|
||||
}
|
||||
.table {
|
||||
min-height: 100vh;
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -900,13 +900,13 @@ export default {
|
|||
});
|
||||
});
|
||||
|
||||
this.baseInfoForm.goodsType != "VIRTUAL_GOODS";
|
||||
|
||||
pushData.push(
|
||||
{
|
||||
this.baseInfoForm.goodsType != "VIRTUAL_GOODS"
|
||||
? pushData.push({
|
||||
title: "重量",
|
||||
slot: "weight",
|
||||
},
|
||||
})
|
||||
: "";
|
||||
pushData.push(
|
||||
{
|
||||
title: "货号",
|
||||
slot: "sn",
|
||||
|
@ -928,7 +928,6 @@ export default {
|
|||
slot: "images",
|
||||
}
|
||||
);
|
||||
this.baseInfoForm.goodsType != "VIRTUAL_GOODS" ? pushData.shift() : "";
|
||||
|
||||
this.skuTableColumn = pushData;
|
||||
//克隆所有渲染的数据
|
||||
|
|
|
@ -73,3 +73,8 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.ivu-menu-dark.ivu-menu-vertical .ivu-menu-item-active:not(.ivu-menu-submenu), .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title-active:not(.ivu-menu-submenu){
|
||||
color: $theme_color;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -197,7 +197,7 @@ export default {
|
|||
value: {
|
||||
handler: function (val) {
|
||||
// 赋值给富文本
|
||||
this.setData(val);
|
||||
this.setData(this.$options.filters.enCode(val));
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue