张雄 3 years ago
parent 28504d792b
commit eb381eda7d

@ -85,6 +85,12 @@ const router = [
...setting,
]
},
{
path: "/rule",
name: "Rule",
title: "用户协议",
component: resolve => require(['@/views/Rule'], resolve)
},
{
path: "/login",
name: "Login",

@ -11,163 +11,164 @@
</a-col> -->
<!-- <a-col :span="1" class="box-cen"></a-col> -->
<!-- 登录 -->
<a-col class="box-b" v-if="status === 1">
<a-tabs v-model="activeName" @change="tabsSwitch">
<!-- <a-tab-pane key="1" tab="密码登录">
</a-tab-pane> -->
<a-tab-pane key="2" tab="验证码登录"> </a-tab-pane>
</a-tabs>
<div class="login-input" v-if="activeName === '1'">
<a-input placeholder="请输入手机号码"></a-input>
<a-input type="password" placeholder="请输入密码"></a-input>
<a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-row>
<a-button
type="primary"
@click="login"
style="width: 90%; margin: 30px"
>
登录
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="14">
<a-checkbox></a-checkbox>&nbsp;&nbsp;
</a-col>
<a-col :span="10">
<span class="logintext" @click="status = 3">忘记密码</span
>&nbsp;&nbsp;&nbsp;&nbsp;<span
class="logintext"
@click="status = 2"
>免费注册</span
<a-col class="box-b" v-if="status === 1">
<a-tabs v-model="activeName" @change="tabsSwitch">
<!-- <a-tab-pane key="1" tab="密码登录">
</a-tab-pane> -->
<a-tab-pane key="2" tab="验证码登录"> </a-tab-pane>
</a-tabs>
<div class="login-input" v-if="activeName === '1'">
<a-input placeholder="请输入手机号码"></a-input>
<a-input type="password" placeholder="请输入密码"></a-input>
<!-- <a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-col>
</a-row>
</div>
<div class="login-input" v-else-if="activeName === '2'">
<a-cascader
:options="cityList"
placeholder="请选择城市"
v-model="cityvalue"
:show-search="{ filter }"
@change="onChange"
:field-names="{
label: 'name',
value: 'id',
children: 'cityList',
}"
/>
<span class="form">
<a-select
v-model="communityCode"
notFoundContent="该城市无可选择小区"
:disabled="cityvalue.length === 0"
placeholder="请选择小区"
</a-row> -->
<a-button
type="primary"
@click="login"
style="width: 90%; margin: 30px"
>
<a-select-option
v-for="item in communityList"
:key="item.id"
:value="item.code"
>{{ item.name }}</a-select-option
登录
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="14">
<a-checkbox></a-checkbox>&nbsp;&nbsp;我已同意<a href="/#/rule" target="tar">用户协议</a>
</a-col>
<a-col :span="10">
<span class="logintext" @click="status = 3">忘记密码</span
>&nbsp;&nbsp;&nbsp;&nbsp;<span
class="logintext"
@click="status = 2"
>免费注册</span
>
</a-col>
</a-row>
</div>
<div class="login-input" v-else-if="activeName === '2'">
<a-cascader
:options="cityList"
placeholder="请选择城市"
v-model="cityvalue"
:show-search="{ filter }"
@change="onChange"
:field-names="{
label: 'name',
value: 'id',
children: 'cityList',
}"
/>
<span class="form">
<a-select
v-model="communityCode"
notFoundContent="该城市无可选择小区"
:disabled="cityvalue.length === 0"
placeholder="请选择小区"
>
</a-select>
<a-input
placeholder="请输入手机号码"
v-model="form.tel"
></a-input>
<a-input
placeholder="请输入验证码"
v-model="form.code"
style="width: 60%"
></a-input>
</span>
<a-button type="primary" @click="getCode"></a-button>
<a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-row>
<a-button
type="primary"
@click="login"
style="
width: 90%;
margin-left: 30px;
margin-top: 20px;
height:38px;
margin-bottom: 10px;
"
>
登录
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="14">
<a-checkbox></a-checkbox>&nbsp;&nbsp;
</a-col>
<a-col :span="10">
<span class="logintext" @click="status = 3">忘记密码</span
>&nbsp;&nbsp;&nbsp;&nbsp;<span
class="logintext"
@click="status = 2"
>免费注册</span
<a-select-option
v-for="item in communityList"
:key="item.id"
:value="item.code"
>{{ item.name }}</a-select-option
>
</a-select>
<a-input
placeholder="请输入手机号码"
v-model="form.tel"
></a-input>
<a-input
placeholder="请输入验证码"
v-model="form.code"
style="width: 60%"
></a-input>
</span>
<a-button type="primary" @click="getCode"></a-button>
<!-- <a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-col>
</a-row>
</div>
</a-col>
<!-- 注册 -->
<a-col class="box-b" v-if="status === 2">
<div class="cardTitle">新建账号</div>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item ref="tel" label="手机号码" prop="tel">
<a-input
v-model="form.tel"
style="width: 100%"
placeholder="请输入手机号"
@blur="
() => {
$refs.tel.onFieldBlur();
}
</a-row> -->
<a-button
type="primary"
@click="login"
style="
width: 90%;
margin-left: 30px;
margin-top: 20px;
height:38px;
margin-bottom: 10px;
"
/>
<a-row style="margin-top: 20px">
<a-col :span="16" style="margin-right: 10px">
<a-input
style="width: 100%"
v-model="form.verificationCode"
placeholder="请输入验证码"
/>
>
登录
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="14">
<a-checkbox v-model="isChecked"></a-checkbox>&nbsp;&nbsp;我已同意<a href="/#/rule" target="tar">用户协议</a>
</a-col>
<a-col :span="6">
<a-button type="primary" @click="getCode"
>获取验证码</a-button
<a-col :span="10">
<span class="logintext" @click="status = 3">忘记密码</span
>&nbsp;&nbsp;&nbsp;&nbsp;<span
class="logintext"
@click="status = 2"
>免费注册</span
>
</a-col>
</a-row>
</a-form-model-item>
<a-form-model-item label="设置密码" prop="psw">
<a-input placeholder="请输入密码" />
</a-form-model-item>
<a-form-model-item label="确认密码" prop="confirmPsw">
<a-input placeholder="请再次输入密码" />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" style="width: 100%"> 确定 </a-button>
</a-form-model-item>
<a-form-model-item>
<span>已有账号</span
><span class="logintext" @click="status = 1">登录</span>
</a-form-model-item>
</a-form-model>
</a-col>
</div>
</a-col>
<!-- 注册 -->
<a-col class="box-b" v-if="status === 2">
<div class="cardTitle">新建账号</div>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
layout="vertical"
>
<a-form-model-item ref="tel" label="手机号码" prop="tel">
<a-input
v-model="form.tel"
style="width: 100%"
placeholder="请输入手机号"
@blur="
() => {
$refs.tel.onFieldBlur();
}
"
/>
<a-row style="margin-top: 20px">
<a-col :span="16" style="margin-right: 10px">
<a-input
style="width: 100%"
v-model="form.verificationCode"
placeholder="请输入验证码"
/>
</a-col>
<a-col :span="6">
<a-button type="primary" @click="getCode"
>获取验证码</a-button
>
</a-col>
</a-row>
</a-form-model-item>
<a-form-model-item label="设置密码" prop="psw">
<a-input placeholder="请输入密码" />
</a-form-model-item>
<a-form-model-item label="确认密码" prop="confirmPsw">
<a-input placeholder="请再次输入密码" />
</a-form-model-item>
<a-form-model-item>
<a-button type="primary" style="width: 100%"> 确定 </a-button>
</a-form-model-item>
<a-form-model-item>
<span>已有账号</span
><span class="logintext" @click="status = 1">登录</span>
</a-form-model-item>
</a-form-model>
</a-col>
<!-- 找回密码 -->
<a-col class="box-b" v-if="status === 3">
<div class="cardTitle">找回密码</div>
@ -235,6 +236,7 @@ export default {
tel: "",
code: "",
},
isChecked: false,
communityCode: undefined,
rules: {
tel: [
@ -334,7 +336,11 @@ export default {
if (this.communityCode === undefined) {
this.$message.error("先选择小区");
return;
}
};
if (this.isChecked == false) {
this.$message.error("请阅读并同意《用户协议》");
return;
};
loginTel(this.form).then((res) => {
if (res.code === 200) {
this.$message.success(res.msg);
@ -352,10 +358,10 @@ export default {
this.$message.error("先选择小区");
return;
}
console.log(this.getCommunityCode);
sendTelCode(this.form).then((res) => {
if (res) {
this.$message.success(res.msg + " " + res.data);
console.log(res)
this.$message.success(res.msg);
}
});
},

@ -10,7 +10,7 @@ export const form = {
}
const handleConfirm = (rule,value,callback) => {
if(value.length != 20) {
if(value.length != 18) {
callback('请输入正确的格式')
};
callback();
@ -21,7 +21,7 @@ export const rules = {
contact:[{required:true,message:'请输入联系方式',trigger:'blur'}],
tel:[{required:true,message:'请输入',trigger:'blur'}],
idType:[{required:true,message:'请选择',trigger:'change'}],
idNumber:[{required:true,message:'请输入证件号码',trigger:['blur','change']},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
idNumber:[{required:true,message:'请输入证件号码',trigger:'blur'},{validator: (rule,value,callback) => handleConfirm(rule,value,callback)}],
remarks:[{required:true,message:'请输入备注',trigger:'blur'}],
}
export const options = {

@ -118,6 +118,7 @@ export default {
this.addClose()
},
submit() {
// console.log(this.form)
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if(this.editId === null) {
@ -153,6 +154,7 @@ export default {
if(val!==null){
this.title = '修改话题'
this.form.id = val
this.form.imgUrls = [];
topicInfo({topicId:val}).then(res=>{
let data = res.data
this.form.title = data.title
@ -161,7 +163,6 @@ export default {
this.form.isPublic = data.isPublic
this.form.isRating = data.isRating
if(data.imgList.length>0){
console.log(data.imgList);
const pic = []
for(let item of data.imgList){
let obj = {
@ -174,6 +175,7 @@ export default {
pic.push(obj)
}
this.fileList = pic
// this.form.imgUrls.push(pic[0].name)
}
})
}else{

@ -2,7 +2,7 @@
<div>
<div class="cardTitle">品牌管理</div>
<searchForm :formItem="formItem" @getSearch="search($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
<a-button style="margin: 10px" class="add-btn" @click="handlerAdd"
>新增品牌</a-button
>
<a-table
@ -41,7 +41,7 @@
</span>
</div>
<a-drawer
:title="drawer.title"
:title="activeMode==1?'新增品牌':'修改品牌'"
:width="720"
:visible="drawer.show"
:body-style="{ paddingBottom: '80px' }"
@ -102,6 +102,8 @@ export default {
pagination,
// index
selectedRowKeys: [],
//
activeMode: 1, //12
};
},
mounted() {
@ -123,10 +125,10 @@ export default {
this.selectedRowKeys = [];
},
edit(data) {
this.activeMode = 2;
this.form.brandName = data.brandName
this.form.id = data.id
this.drawer.show = true;
this.drawer.title = '修改品牌';
},
del(ids) {
this.$confirm({
@ -165,16 +167,19 @@ export default {
this.pagination = pager;
this.getData();
},
//
handlerAdd() {
this.activeMode = 1;
this.drawer.show = true
},
addClose() {
this.$refs.ruleForm.resetFields();
this.drawer.show = false;
this.drawer.title = '新增品牌';
},
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
if (this.activeMode == 1) {
let res = await brandInsert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);
@ -183,8 +188,7 @@ export default {
} else {
this.$message.error(res.msg);
}
} else {
console.log(this.form);
} else if (this.activeMode == 2) {
let res = await brandUpdate(this.form);
if (res.code === 200) {
this.$message.success(res.msg);

@ -25,7 +25,7 @@
>
<span slot="action" slot-scope="text, row">
<a-space>
<a v-if="row.status == 1" class="ant-dropdown-link" @click="push(row.id)"></a>
<a v-if="row.status == 0 && row.appShopPush == 0" class="ant-dropdown-link" @click="push(row.id)"></a>
</a-space>
</span>
<span slot="mainPhoto" slot-scope="text, row">

@ -2,7 +2,7 @@
<div>
<div class="cardTitle">店铺管理</div>
<searchForm :formItem="formItem" @getSearch="search($event)"></searchForm>
<a-button style="margin: 10px" class="add-btn" @click="drawer.show = true"
<a-button style="margin: 10px" class="add-btn" @click="handlerAdd"
>新增店铺</a-button
>
<a-table
@ -41,7 +41,7 @@
</span>
</div>
<a-drawer
:title="drawer.title"
:title="activeMode == 1?'新增店铺':'修改店铺'"
:width="720"
:visible="drawer.show"
:body-style="{ paddingBottom: '80px' }"
@ -102,6 +102,7 @@ export default {
pagination,
// index
selectedRowKeys: [],
activeMode: 1,//12
};
},
mounted() {
@ -123,10 +124,10 @@ export default {
this.selectedRowKeys = [];
},
edit(data) {
this.activeMode = 2;
this.form.shopName = data.shopName
this.form.id = data.id
this.drawer.show = true;
this.drawer.title = '修改店铺';
},
del(ids) {
this.$confirm({
@ -156,6 +157,13 @@ export default {
this.del(this.selectedRowKeys);
}
},
//
handlerAdd() {
this.activeMode = 1;
this.form.shopName = '';
this.form.id = undefined;
this.drawer.show = true
},
//
handleTableChange(pagination) {
console.log(pagination);
@ -168,13 +176,12 @@ export default {
addClose() {
this.$refs.ruleForm.resetFields();
this.drawer.show = false;
this.drawer.title = '新增店铺';
},
submit() {
console.log(this.form);
this.$refs.ruleForm.validate(async (valid) => {
if (valid) {
if (this.form.id === null) {
if (this.activeMode == 1) {
let res = await shopInsert(this.form);
if (res.code === 200) {
this.$message.success(res.msg);

Binary file not shown.
Loading…
Cancel
Save