张雄 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",

@ -20,11 +20,11 @@
<div class="login-input" v-if="activeName === '1'">
<a-input placeholder="请输入手机号码"></a-input>
<a-input type="password" placeholder="请输入密码"></a-input>
<a-row>
<!-- <a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-row>
</a-row> -->
<a-button
type="primary"
@click="login"
@ -34,7 +34,7 @@
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="14">
<a-checkbox></a-checkbox>&nbsp;&nbsp;
<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
@ -46,6 +46,7 @@
</a-col>
</a-row>
</div>
<div class="login-input" v-else-if="activeName === '2'">
<a-cascader
:options="cityList"
@ -85,11 +86,11 @@
></a-input>
</span>
<a-button type="primary" @click="getCode"></a-button>
<a-row>
<!-- <a-row>
<a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
>
</a-row>
</a-row> -->
<a-button
type="primary"
@click="login"
@ -105,7 +106,7 @@
</a-button>
<a-row style="margin-top: 20px; margin-left: 23px">
<a-col :span="14">
<a-checkbox></a-checkbox>&nbsp;&nbsp;
<a-checkbox v-model="isChecked"></a-checkbox>&nbsp;&nbsp;我已同意<a href="/#/rule" target="tar">用户协议</a>
</a-col>
<a-col :span="10">
<span class="logintext" @click="status = 3">忘记密码</span
@ -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