提交 7f5e1fa4 authored 作者: 赵明's avatar 赵明

关联小区 域名登录

上级 716de8b3
import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'
import Vue from 'vue' import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
export const loginUrlCheck = (params)=>postAction("/sys/loginUrlCheck",params);
// 首页统计 // 首页统计
const homeDataStatistics = (params)=>getAction("/community/homepage/dataStatistics",params); const homeDataStatistics = (params)=>getAction("/community/homepage/dataStatistics",params);
const companyNoticeList = (params)=>getAction("/property-company/notice/companyNotice/list",params); const companyNoticeList = (params)=>getAction("/property-company/notice/companyNotice/list",params);
......
...@@ -14,7 +14,7 @@ import { axios } from '@/utils/request' ...@@ -14,7 +14,7 @@ import { axios } from '@/utils/request'
*/ */
export function login(parameter) { export function login(parameter) {
return axios({ return axios({
url: '/sys/login', url: 'property-system/sys/shopLogin',
method: 'post', method: 'post',
data: parameter data: parameter
}) })
...@@ -22,7 +22,7 @@ export function login(parameter) { ...@@ -22,7 +22,7 @@ export function login(parameter) {
export function phoneLogin(parameter) { export function phoneLogin(parameter) {
return axios({ return axios({
url: '/sys/phoneLogin', url: 'property-system/sys/shopLogin',
method: 'post', method: 'post',
data: parameter data: parameter
}) })
...@@ -48,7 +48,7 @@ export function getSmsCaptcha(parameter) { ...@@ -48,7 +48,7 @@ export function getSmsCaptcha(parameter) {
export function logout(logoutToken) { export function logout(logoutToken) {
return axios({ return axios({
url: '/sys/logout', url: 'property-system/sys/shopLogout',
method: 'post', method: 'post',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
......
<template> <template>
<div id="userLayout" :class="['user-layout-wrapper', device]"> <div id="userLayout" :class="['user-layout-wrapper', device]">
<div class="container"> <div class="container" v-if="isPageUrlTrue">
<div class="top"> <div class="top">
<div class="header"> <div class="header">
<a href="/"> <a href="/">
<!-- <img src="~@/assets/logo.svg" class="logo" alt="logo"> --> <!-- <img src="~@/assets/logo.svg" class="logo" alt="logo"> -->
<img src="~@/assets/logo.png" class="logo" alt="logo"> <img v-if="pageImage" :src="pageImage" class="logo" alt="logo">
<img v-else src="~@/assets/logo.png" class="logo" alt="logo">
<span class="title">欢迎登陆</span> <span class="title">欢迎登陆</span>
</a> </a>
</div> </div>
<div class="desc"> <div class="desc">{{pageTitle}}</div>
湖北汉江之星科技有限公司
</div>
</div> </div>
<route-view></route-view> <route-view></route-view>
...@@ -27,20 +26,26 @@ ...@@ -27,20 +26,26 @@
</div> </div>
</div> --> </div> -->
</div> </div>
<div v-else>
<err-page />
</div>
</div> </div>
</template> </template>
<script> <script>
import RouteView from "@/components/layouts/RouteView" import RouteView from "@/components/layouts/RouteView"
import { mixinDevice } from '@/utils/mixin.js' import { mixinDevice } from '@/utils/mixin.js'
import { mapGetters } from 'vuex'
import errPage from './urlErr.vue'
export default { export default {
name: "UserLayout", name: "UserLayout",
components: { RouteView }, components: { RouteView, errPage },
mixins: [mixinDevice], mixins: [mixinDevice],
data () { data () {
return {} return {}
}, },
computed: mapGetters(["isPageUrlTrue", "pageTitle", "pageImage"]),
mounted () { mounted () {
document.body.classList.add('userLayout') document.body.classList.add('userLayout')
}, },
......
<template>
<div class="exception">
<div class="img">
<img src="https://gw.alipayobjects.com/zos/rmsportal/KpnpchXsobRgLElEozzI.svg"/>
</div>
<div class="content">
<h1>404</h1>
<div class="desc">抱歉,你访问的页面地址错误</div>
<!-- <div class="action">
<a-button type="primary" @click="handleToHome">返回首页</a-button>
</div> -->
</div>
</div>
</template>
<script>
export default {
name: "ErrPage",
data() {
return {}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.exception {
min-height: 500px;
height: 80%;
align-items: center;
text-align: center;
margin-top: 150px;
.img {
display: inline-block;
padding-right: 52px;
zoom: 1;
img {
height: 360px;
max-width: 430px;
}
}
.content {
display: inline-block;
flex: auto;
h1 {
color: #434e59;
font-size: 72px;
font-weight: 600;
line-height: 72px;
margin-bottom: 24px;
}
.desc {
color: rgba(0, 0, 0, .45);
font-size: 20px;
line-height: 28px;
margin-bottom: 16px;
}
}
}
.mobile {
.exception {
margin-top: 30px;
.img {
padding-right: unset;
img {
height: 40%;
max-width: 80%;
}
}
}
}
</style>
\ No newline at end of file
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
} }
}, },
data() { data() {
return { return {
...@@ -143,10 +143,13 @@ export default { ...@@ -143,10 +143,13 @@ export default {
} }
.house-content-box { .house-content-box {
display: flex; display: flex;
flex-wrap: wrap;
justify-content: space-between;
.box { .box {
box-sizing: border-box; box-sizing: border-box;
flex: none; flex: none;
width: 300px; width: 300px;
margin-bottom: 30px;
height: 300px; height: 300px;
border-radius: 10px; border-radius: 10px;
margin-right: 20px; margin-right: 20px;
......
...@@ -18,7 +18,9 @@ const getters = { ...@@ -18,7 +18,9 @@ const getters = {
return state.enhance.enhanceJs[code] return state.enhance.enhanceJs[code]
}, },
sysSafeMode: state => state.user.sysSafeMode, sysSafeMode: state => state.user.sysSafeMode,
isPageUrlTrue: state => state.loginurl.isPageUrlTrue,
pageTitle: state => state.loginurl.pageTitle,
pageImage: state => state.loginurl.pageImage
} }
export default getters export default getters
...@@ -5,6 +5,7 @@ import app from './modules/app' ...@@ -5,6 +5,7 @@ import app from './modules/app'
import user from './modules/user' import user from './modules/user'
import permission from './modules/permission' import permission from './modules/permission'
import enhance from './modules/enhance' import enhance from './modules/enhance'
import loginurl from './modules/loginurl'
import online from './modules/online' import online from './modules/online'
import getters from './getters' import getters from './getters'
...@@ -17,6 +18,7 @@ export default new Vuex.Store({ ...@@ -17,6 +18,7 @@ export default new Vuex.Store({
permission, permission,
enhance, enhance,
online, online,
loginurl
}, },
state: { state: {
......
import {loginUrlCheck} from '@/api/api'
import { getFileAccessHttpUrl } from '@/api/manage'
const enhance = {
state: {
isPageUrlTrue: true,
pageTitle: '湖北汉江之星科技有限公司',
pageImage: ''
},
mutations: {
SET_PAGE_URL_FLAG: (state, flag) => {
state.isPageUrlTrue = flag
},
SET_PAGE_TITLE: (state, name) => {
state.pageTitle = name
},
SET_PAGE_IMAGE: (state, image) => {
state.pageImage = image
}
},
actions: {
onLoginUrlCheck({ commit }, record) {
loginUrlCheck({platformType: 'shop'}).then(res=> {
if(res.result && res.result.logoUrl) {
commit('SET_PAGE_TITLE', res.result.name)
commit('SET_PAGE_IMAGE', getFileAccessHttpUrl(res.result.logoUrl))
} else {
commit('SET_PAGE_URL_FLAG', false)
}
})
}
}
}
export default enhance
\ No newline at end of file
...@@ -47,3 +47,7 @@ export const isValidPermit = permit=> { ...@@ -47,3 +47,7 @@ export const isValidPermit = permit=> {
const reg = /^[HMhm]{1}([0-9]{10}|[0-9]{8})$/; //港澳通行证 const reg = /^[HMhm]{1}([0-9]{10}|[0-9]{8})$/; //港澳通行证
return reg.test(permit) return reg.test(permit)
} }
/* 校验字母*/
export function alphanumeric(s) {
return /^[a-zA-Z]+$/.test(s)
}
\ No newline at end of file
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- <a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button> --> <!-- <a-button type="primary" icon="download" @click="handleExportXls('t_property_settled')">导出</a-button> -->
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"> <a-menu-item key="1" @click="batchDels">
<a-icon type="delete"/> <a-icon type="delete"/>
删除关联 删除关联
</a-menu-item> </a-menu-item>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
size="middle" size="middle"
:scroll="{x:true}" :scroll="{x:true}"
bordered bordered
rowKey="id" rowKey="communityCode"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
// import { getPropertyListApi, getSystemSubmenu, getSystemSubmenuBatch } from '@/api/api' // import { getPropertyListApi, getSystemSubmenu, getSystemSubmenuBatch } from '@/api/api'
import {JeecgListMixin} from '@/mixins/JeecgListMixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import NoticeModal from './modules/NoticeModal' import NoticeModal from './modules/NoticeModal'
import {deleteAction} from '@/api/manage'
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil' import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
const columns = [ const columns = [
...@@ -138,8 +139,8 @@ const columns = [ ...@@ -138,8 +139,8 @@ const columns = [
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTime', dataIndex: 'updateTime',
key: 'createTime', key: 'updateTime',
align: 'center' align: 'center'
}, },
{ {
...@@ -162,47 +163,11 @@ export default { ...@@ -162,47 +163,11 @@ export default {
// 表头 // 表头
columns: columns, columns: columns,
deteleId: '', deteleId: '',
dataSource: [
{
accessAddress: "hanjiangzhixing",
addressInfo: "十堰市电饭锅",
adminAvatar:"scott/pic/img01_1687743526373.png",
adminName: "扫地僧",
adminPassword:"123456",
adminPhone:"15586468632",
buildingNum:123,
chargingStation: 23423,
communityArea:"郧阳区",
communityCode:"P00082",
communityImage:"scott/pic/8b9eaa6e92ad56895430be936cc03896_1687746009641.jpg",
communityIntro:"",
communityName:"汉江之星小区",
completedDate:"2021-06-16",
councilsCode:null,
councilsName:null,
coverArea:23412,
createBy:"13177461177",
createTime:"2023-06-26 09:38:48",
delFlag:0,
houseNum:4532242,
id:"1673143741424750593",
lastPermissionIds:null,
parkingSpace:2334,
permissionIds:null,
platformCode:"P00081",
platformName:"汉江之星物业公司",
platformType:"company",
roleId:"1673143741215137794",
updateBy:"汉江之星物业公司管理员",
updateTime:"2023-07-20 14:35:35",
useTo:1,
userId:"1673143740938313730",
}
],
url: { url: {
// list: "/property-company/community/companyCommunity/list", list: "/property-central/shop/shopCommunity/getShopCommunity",
// delete: '/property-company/community/companyCommunity/delete', delete: '/property-central/shop/shopCommunity/deleteByCommunityCode',
// deleteBatch: '/property-company/community/companyCommunity/deleteBatch' deleteBatch: '/property-central/shop/shopCommunity/deleteBatch'
}, },
} }
...@@ -212,20 +177,57 @@ export default { ...@@ -212,20 +177,57 @@ export default {
this.$refs.modalUserRole.show(roleId); this.$refs.modalUserRole.show(roleId);
}, },
showDeleteConfirm(record) { showDeleteConfirm(record) {
this.deteleId = record.id; var that = this;
this.$confirm({ this.$confirm({
title: '确定是否删除关联小区?', title: '确定是否删除关联小区?',
okText: '删除', okText: '删除',
okType: 'danger', okType: 'danger',
cancelText: '否', cancelText: '否',
onOk() { onOk() {
console.log(record); return deleteAction(that.url.delete, {communityCode: record.communityCode}).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.searchQuery()
}
})
}, },
onCancel() { onCancel() {
console.log('Cancel'); console.log('Cancel');
}, },
}); });
}, },
batchDels() {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning('请选择一条记录!');
return;
} else {
var ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
var that = this;
this.$confirm({
title: "确认删除",
content: "是否删除选中数据?",
onOk: function () {
that.loading = true;
deleteAction(that.url.deleteBatch, {communityCodes: ids}).then((res) => {
if (res.success) {
//重新计算分页问题
that.reCalculatePage(that.selectedRowKeys.length)
that.$message.success(res.message);
that.loadData();
that.onClearSelected();
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.loading = false;
});
}
});
}
}
} }
} }
......
...@@ -113,7 +113,7 @@ import { httpAction, getAction } from '@/api/manage' ...@@ -113,7 +113,7 @@ import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api' import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
import { isMobile,alphanumeric } from '@/utils/validate' import { isMobile,alphanumeric } from '@/utils/validate'
import LoginSwitchHouse from '@/components/tools/LoginSwitchHouse'
export default { export default {
name: 'PropertyChargruleForm', name: 'PropertyChargruleForm',
components: { components: {
...@@ -191,9 +191,7 @@ export default { ...@@ -191,9 +191,7 @@ export default {
adminAvatar: [{ required: true, message: '请上传管理员头像', trigger: 'blur' }] adminAvatar: [{ required: true, message: '请上传管理员头像', trigger: 'blur' }]
}, },
url: { url: {
add: "/property-company/community/companyCommunity/add", add: "/property-central/shop/shopCommunity/add"
edit: "/property-company/community/companyCommunity/edit",
queryById: "/property-company/community/companyCommunity/queryById"
}, },
dictOptions: [ dictOptions: [
{label: '商用', value: 1}, {label: '商用', value: 1},
...@@ -227,18 +225,16 @@ export default { ...@@ -227,18 +225,16 @@ export default {
submitForm () { submitForm () {
const that = this; const that = this;
// 触发表单验证 // 触发表单验证
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
console.log(this.model)
if (valid) { if (valid) {
that.confirmLoading = true; that.confirmLoading = true;
let httpurl = ''; let httpurl = '';
let method = ''; let method = '';
if(!this.model.id){ httpurl+=this.url.add;
httpurl+=this.url.add; method = 'post';
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{ httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){ if(res.success){
that.$message.success(res.message); that.$message.success(res.message);
......
...@@ -43,44 +43,8 @@ export default { ...@@ -43,44 +43,8 @@ export default {
}) })
}, },
async updateCurrentDepart(){ async updateCurrentDepart(){
// let { result } = await getAction('/property-company/community/companyCommunity/getCommunityList',{ }) let { result } = await getAction('/property-company/community/companyCommunity/getList',{ })
let result =[
{
accessAddress: "hanjiangzhixing",
addressInfo: "十堰市电饭锅",
adminAvatar:"scott/pic/img01_1687743526373.png",
adminName: "扫地僧",
adminPassword:"123456",
adminPhone:"15586468632",
buildingNum:123,
chargingStation: 23423,
communityArea:"郧阳区",
communityCode:"P00082",
communityImage:"scott/pic/8b9eaa6e92ad56895430be936cc03896_1687746009641.jpg",
communityIntro:"",
communityName:"汉江之星小区",
completedDate:"2021-06-16",
councilsCode:null,
councilsName:null,
coverArea:23412,
createBy:"13177461177",
createTime:"2023-06-26 09:38:48",
delFlag:0,
houseNum:4532242,
id:"1673143741424750593",
lastPermissionIds:null,
parkingSpace:2334,
permissionIds:null,
platformCode:"P00081",
platformName:"汉江之星物业公司",
platformType:"company",
roleId:"1673143741215137794",
updateBy:"汉江之星物业公司管理员",
updateTime:"2023-07-20 14:35:35",
useTo:1,
userId:"1673143740938313730",
}
]
this.$refs.loginSelect.show(result) this.$refs.loginSelect.show(result)
}, },
loginSelectOk(res) { loginSelectOk(res) {
......
...@@ -64,10 +64,9 @@ ...@@ -64,10 +64,9 @@
</a-col> </a-col>
</a-row> </a-row>
<index-chart></index-chart> <index-chart></index-chart>
<a-modal :visible="visible" title="商铺二维码" @ok="handleOk"> <a-modal :visible="visible" title="商铺二维码" @ok="handleOk" @cancel="handleCancel" okText="下载">
<a-space> <a-space style='width: 100%'>
<img :src="shopQrcode" alt="商铺二维码" class="shopQrcode">
</a-space> </a-space>
</a-modal> </a-modal>
</div> </div>
...@@ -78,6 +77,9 @@ import IndexChart from './IndexChart' ...@@ -78,6 +77,9 @@ import IndexChart from './IndexChart'
import Bar from '@/components/chart/Bar' import Bar from '@/components/chart/Bar'
import Pie from '@/components/chart/Pie' import Pie from '@/components/chart/Pie'
import { homeDataStatistics } from '@/api/api' import { homeDataStatistics } from '@/api/api'
import {axios} from '@/utils/request'
import {downloadFile} from '@/api/manage'
// const barData = [] // const barData = []
// for (let i = 0; i < 12; i += 1) { // for (let i = 0; i < 12; i += 1) {
...@@ -101,11 +103,13 @@ export default { ...@@ -101,11 +103,13 @@ export default {
typeCode: 'SFLX00001', typeCode: 'SFLX00001',
noticeTitle: '', noticeTitle: '',
noticeContent: '', noticeContent: '',
shopQrcode:'',
visible: false, visible: false,
} }
}, },
created() { created() {
this.onDetail() this.onDetail()
this.shopQrcodes()
}, },
methods: { methods: {
async onDetail(typeCode) { async onDetail(typeCode) {
...@@ -113,6 +117,12 @@ export default { ...@@ -113,6 +117,12 @@ export default {
this.pageForm = { ...result } this.pageForm = { ...result }
this.loading = !this.loading this.loading = !this.loading
}, },
shopQrcodes() {
axios('/property-central/shop/shopInfo/getQrCode?shopCode=shop&platformType=shop',{ responseType: 'blob'}).then(res=>{
this.shopQrcode = window.URL.createObjectURL(new Blob([res]))
console.log(this.shopQrcode)
})
},
toQuick(type) { toQuick(type) {
if (type == 1) { if (type == 1) {
this.clickQRcode() this.clickQRcode()
...@@ -131,11 +141,19 @@ export default { ...@@ -131,11 +141,19 @@ export default {
} }
}, },
clickQRcode() { clickQRcode() {
this.visible=true this.visible = true
}, },
handleOk (){ handleOk (){
downloadFile('/property-central/shop/shopInfo/getQrCode','商铺二维码.png')
this.visible=false this.visible=false
} this.$message.success('下载成功')
},
handleCancel () {
this.visible=false
},
}, },
...@@ -279,4 +297,11 @@ export default { ...@@ -279,4 +297,11 @@ export default {
height: auto; height: auto;
} }
} }
.ant-space-item{
width: 100%;
}
.shopQrcode{
display: block;
margin: 0 auto;
}
</style> </style>
\ No newline at end of file
...@@ -38,7 +38,7 @@ import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types' ...@@ -38,7 +38,7 @@ import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
import LoginSelectHouse from "@/components/tools/LoginSelectHouse"; import LoginSelectHouse from "@/components/tools/LoginSelectHouse";
import { getEncryptedString } from '@/utils/encryption/aesEncrypt' import { getEncryptedString } from '@/utils/encryption/aesEncrypt'
import { timeFix } from '@/utils/util' import { timeFix } from '@/utils/util'
import { mapActions } from 'vuex'
import LoginAccount from './LoginAccount' import LoginAccount from './LoginAccount'
import LoginPhone from './LoginPhone' import LoginPhone from './LoginPhone'
...@@ -64,8 +64,10 @@ export default { ...@@ -64,8 +64,10 @@ export default {
Vue.ls.remove(ACCESS_TOKEN) Vue.ls.remove(ACCESS_TOKEN)
this.getRouterData(); this.getRouterData();
this.rememberMe = true this.rememberMe = true
this.onLoginUrlCheck()
}, },
methods:{ methods:{
...mapActions(["onLoginUrlCheck"]),
handleTabClick(key){ handleTabClick(key){
this.customActiveKey = key this.customActiveKey = key
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论