Commit 4a20d3fd by gyfnice

handleEslint

parent 727e9315
...@@ -7,7 +7,10 @@ ...@@ -7,7 +7,10 @@
"scripts": { "scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev", "start": "npm run dev",
"build": "node build/build.js" "build": "node build/build.js",
"lint": "eslint src",
"lint:create": "eslint --init",
"lint:fix": "eslint src --fix"
}, },
"transformModules": { "transformModules": {
"cube-ui": { "cube-ui": {
...@@ -61,6 +64,7 @@ ...@@ -61,6 +64,7 @@
"copy-webpack-plugin": "^4.5.0", "copy-webpack-plugin": "^4.5.0",
"cross-env": "^5.0.1", "cross-env": "^5.0.1",
"css-loader": "^0.28.0", "css-loader": "^0.28.0",
"eslint": "^5.9.0",
"eventsource-polyfill": "^0.9.6", "eventsource-polyfill": "^0.9.6",
"extract-text-webpack-plugin": "^3.0.0", "extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4", "file-loader": "^1.1.4",
......
...@@ -2,185 +2,185 @@ ...@@ -2,185 +2,185 @@
* config * config
* @global variable * @global variable
*/ */
import axios from 'axios' import axios from "axios";
import { Toast } from 'vant'; import { Toast } from "vant";
const devMode = false; //一键切换开发环境 const devMode = false; //一键切换开发环境
//后端路径 //后端路径
const router = { const router = {
WxShare: { WxShare: {
sign: 'WxShare/sign' sign: "WxShare/sign"
}, },
uploader: { uploader: {
upload: 'file/sigleImgUpload', upload: "file/sigleImgUpload",
safeUpload: 'file/sigleImgUploadSafe', safeUpload: "file/sigleImgUploadSafe",
download: 'file/imgDownload?subFilePath=' download: "file/imgDownload?subFilePath="
}, },
systemMsg: { systemMsg: {
findAllOnCAPP: 'systemMsg/findAllOnCAPP', //系统消息列表查询 findAllOnCAPP: "systemMsg/findAllOnCAPP", //系统消息列表查询
findDetailOnCAPP: 'systemMsg/findDetailOnCAPP', //系统消息详情 findDetailOnCAPP: "systemMsg/findDetailOnCAPP", //系统消息详情
}, },
UserMessageRecord: { UserMessageRecord: {
businessFindPage: 'UserMessageRecord/businessFindPage', //业务消息列表查询 businessFindPage: "UserMessageRecord/businessFindPage", //业务消息列表查询
}, },
RepairType: { RepairType: {
linkageQuery: 'RepairType/linkageQuery' //维保类型 linkageQuery: "RepairType/linkageQuery" //维保类型
}, },
RepairManage: { RepairManage: {
cPayment: 'RepairManage/cPayment', //维保支付 cPayment: "RepairManage/cPayment", //维保支付
cLaunchRepair: 'RepairManage/cLaunchRepair', cLaunchRepair: "RepairManage/cLaunchRepair",
getDetails: 'RepairManage/getDetails', getDetails: "RepairManage/getDetails",
cFindpage: 'RepairManage/cFindpage', cFindpage: "RepairManage/cFindpage",
cGetDetails: 'RepairManage/cGetDetails', cGetDetails: "RepairManage/cGetDetails",
cRevokeRepair: 'RepairManage/cRevokeRepair', //撤销维保 cRevokeRepair: "RepairManage/cRevokeRepair", //撤销维保
cEvaluate: 'RepairManage/cEvaluate', //维保评价 cEvaluate: "RepairManage/cEvaluate", //维保评价
cAgainMake: 'RepairManage/cAgainMake' //重新预约时间 cAgainMake: "RepairManage/cAgainMake" //重新预约时间
}, },
wellCustomer: { wellCustomer: {
insert: 'wellCustomer/cInsert', insert: "wellCustomer/cInsert",
cmyReservationPage: 'wellCustomer/cmyReservationPage', cmyReservationPage: "wellCustomer/cmyReservationPage",
cselectDetail: 'wellCustomer/cselectDetail', cselectDetail: "wellCustomer/cselectDetail",
}, },
system: { system: {
login: 'system/login', login: "system/login",
wxPhoneLogin: 'system/wxPhoneLogin', wxPhoneLogin: "system/wxPhoneLogin",
wxPoneLoginCallBack: 'system/wxPoneLoginCallBack', wxPoneLoginCallBack: "system/wxPoneLoginCallBack",
wxPoneLoginInfo: 'system/wxPoneLoginInfo', wxPoneLoginInfo: "system/wxPoneLoginInfo",
wxLogin: 'system/wxLogin', wxLogin: "system/wxLogin",
wxLoginInfo: 'system/wxLoginInfo', wxLoginInfo: "system/wxLoginInfo",
logout: 'system/logout' //退出登录 logout: "system/logout" //退出登录
}, },
ComplaintSuggest: { ComplaintSuggest: {
addComplaint: 'ComplaintSuggest/addComplaint' addComplaint: "ComplaintSuggest/addComplaint"
}, },
FsAbnormal: { FsAbnormal: {
addComplaint: 'FsAbnormal/addComplaint' addComplaint: "FsAbnormal/addComplaint"
}, },
customer: { customer: {
updatePasswordSecond: 'customer/updatePasswordSecond', updatePasswordSecond: "customer/updatePasswordSecond",
updatePasswordSms: 'customer/updatePasswordSms', updatePasswordSms: "customer/updatePasswordSms",
smsverification: 'customer/smsverification', //注册获取手机验证码 smsverification: "customer/smsverification", //注册获取手机验证码
register: 'customer/register', //用户注册 register: "customer/register", //用户注册
bindHouseFirst: 'customer/bindHouseFirst', //绑定房源--获取房源信息(实名认证) bindHouseFirst: "customer/bindHouseFirst", //绑定房源--获取房源信息(实名认证)
bindHouseSecond: 'customer/bindHouseSecond', //绑定房源--确定绑定 bindHouseSecond: "customer/bindHouseSecond", //绑定房源--确定绑定
myHouseInfo: 'customer/myHouseInfo', //查看租户详细情况 myHouseInfo: "customer/myHouseInfo", //查看租户详细情况
outBindHouse: 'customer/outBindHouse', outBindHouse: "customer/outBindHouse",
//myHouseInfo: 'customer/myHouseInfo', //查询租户的同住人 //myHouseInfo: 'customer/myHouseInfo', //查询租户的同住人
updatePhone: 'customer/updatePhone', //修改手机号码 updatePhone: "customer/updatePhone", //修改手机号码
updatePassword: 'customer/updatePassword', //修改密码 updatePassword: "customer/updatePassword", //修改密码
updateUser: 'customer/updateUser', //修改用户昵称/头像/实名认证 updateUser: "customer/updateUser", //修改用户昵称/头像/实名认证
updatePasswordthird:'customer/updatePasswordthird' //确认修改密码 updatePasswordthird:"customer/updatePasswordthird" //确认修改密码
}, },
cAPPHouse: { cAPPHouse: {
applyLiveCancel: 'cAPPHouse/applyLiveCancel', applyLiveCancel: "cAPPHouse/applyLiveCancel",
checkLiveWith: 'cAPPHouse/checkLiveWith', checkLiveWith: "cAPPHouse/checkLiveWith",
regions: 'cAPPHouse/regions', regions: "cAPPHouse/regions",
buildingNums: 'cAPPHouse/buildingNums', buildingNums: "cAPPHouse/buildingNums",
units: 'cAPPHouse/units', units: "cAPPHouse/units",
floors: 'cAPPHouse/floors', floors: "cAPPHouse/floors",
houses: 'cAPPHouse/houses', houses: "cAPPHouse/houses",
commitBindHouse: 'cAPPHouse/commitBindHouse', commitBindHouse: "cAPPHouse/commitBindHouse",
myStewards: 'cAPPHouse/myStewards', // 服务团队 myStewards: "cAPPHouse/myStewards", // 服务团队
applyLiveFirst: 'cAPPHouse/applyLiveFirst', applyLiveFirst: "cAPPHouse/applyLiveFirst",
applyLiveFirstInfo: 'cAPPHouse/applyLiveFirstInfo', applyLiveFirstInfo: "cAPPHouse/applyLiveFirstInfo",
applyLiveCommit: 'cAPPHouse/applyLiveCommit', applyLiveCommit: "cAPPHouse/applyLiveCommit",
applyLiveList: 'cAPPHouse/applyLiveList', applyLiveList: "cAPPHouse/applyLiveList",
applyLiveDetail: 'cAPPHouse/applyLiveDetail', applyLiveDetail: "cAPPHouse/applyLiveDetail",
buildingNumsNotRent: 'cAPPHouse/buildingNumsNotRent', buildingNumsNotRent: "cAPPHouse/buildingNumsNotRent",
unitsNotRent: 'cAPPHouse/unitsNotRent', unitsNotRent: "cAPPHouse/unitsNotRent",
housesNotRent: 'cAPPHouse/housesNotRent', housesNotRent: "cAPPHouse/housesNotRent",
chooseHouseCommit: 'cAPPHouse/chooseHouseCommit', chooseHouseCommit: "cAPPHouse/chooseHouseCommit",
deleteLiveWith: 'cAPPHouse/deleteLiveWith', deleteLiveWith: "cAPPHouse/deleteLiveWith",
newapplyLiveList:'cAPPHouse/newapplyLiveList', //申请列表新接口 newapplyLiveList:"cAPPHouse/newapplyLiveList", //申请列表新接口
newapplyLiveDetail:'cAPPHouse/newapplyLiveDetail', //申请详情新接口 newapplyLiveDetail:"cAPPHouse/newapplyLiveDetail", //申请详情新接口
newchooseHouseCommit:'cAPPHouse/newchooseHouseCommit', //在线选房新接口 newchooseHouseCommit:"cAPPHouse/newchooseHouseCommit", //在线选房新接口
getPayUrl:'cAPPHouse/getPayUrl',// 根据ID获取支付链接 getPayUrl:"cAPPHouse/getPayUrl",// 根据ID获取支付链接
}, },
Region: { Region: {
findMoreRegions : 'Region/findMoreRegions', // 热门项目列表/查看更多 findMoreRegions : "Region/findMoreRegions", // 热门项目列表/查看更多
findDetialOnCApp : 'Region/findDetialOnCApp', // 项目详情 findDetialOnCApp : "Region/findDetialOnCApp", // 项目详情
selectListRegion : 'Region/selectListRegion' //户型列表项目下拉 selectListRegion : "Region/selectListRegion" //户型列表项目下拉
}, },
houseLayout: { houseLayout: {
findAllOnCApp : 'houseLayout/findAllOnCApp', //热门户型列表/查看更多 findAllOnCApp : "houseLayout/findAllOnCApp", //热门户型列表/查看更多
finddetailOnCApp : 'houseLayout/finddetailOnCApp', // 户型详情 finddetailOnCApp : "houseLayout/finddetailOnCApp", // 户型详情
listSelect : 'houseLayout/listSelect', // 户型列表下拉户型 listSelect : "houseLayout/listSelect", // 户型列表下拉户型
findAllModelOnCApp: 'houseLayout/findAllModelOnCApp', //查询所有样板间 findAllModelOnCApp: "houseLayout/findAllModelOnCApp", //查询所有样板间
findModelDetail: 'houseLayout/findModelDetail' //样板间详情 findModelDetail: "houseLayout/findModelDetail" //样板间详情
}, },
CommonProblem: { CommonProblem: {
cfindpage :'CommonProblem/cfindpage', //常见问题查询列表 cfindpage :"CommonProblem/cfindpage", //常见问题查询列表
cgetDetails:'CommonProblem/cgetDetails',//常见问题详情 cgetDetails:"CommonProblem/cgetDetails",//常见问题详情
}, },
collectionRecord: { collectionRecord: {
addCollection : 'collectionRecord/addCollection', //用户收藏项目、户型 addCollection : "collectionRecord/addCollection", //用户收藏项目、户型
findUserCollection : 'collectionRecord/findUserCollection', //获取用户的收藏 findUserCollection : "collectionRecord/findUserCollection", //获取用户的收藏
cancelCollection : 'collectionRecord/cancelCollection' // 用户取消收藏项目、户型 cancelCollection : "collectionRecord/cancelCollection" // 用户取消收藏项目、户型
}, },
area:{ area:{
findAllCounty : 'area/findAllCounty' //获取户型列表页下拉地区 findAllCounty : "area/findAllCounty" //获取户型列表页下拉地区
}, },
search:{ search:{
listSelect : 'search/listSelect' // 简洁搜索结果 listSelect : "search/listSelect" // 简洁搜索结果
}, },
activity:{ activity:{
payAppyCostOnCAPP: 'activity/payAppyCostOnCAPP', //活动支付 payAppyCostOnCAPP: "activity/payAppyCostOnCAPP", //活动支付
findAllActivity : 'activity/findAllActivity', // 社区活动查看更多 findAllActivity : "activity/findAllActivity", // 社区活动查看更多
findAllONCApp : 'activity/findAllONCApp', //社区活动 findAllONCApp : "activity/findAllONCApp", //社区活动
findActivityDetail : 'activity/findActivityDetail', //社区活动详情 findActivityDetail : "activity/findActivityDetail", //社区活动详情
findApplyDetail: 'activity/findApplyDetail', //查看活动报名详情 findApplyDetail: "activity/findApplyDetail", //查看活动报名详情
addApply: 'activity/addApply', //活动报名 addApply: "activity/addApply", //活动报名
cancelApply: 'activity/cancelApply', //取消报名 cancelApply: "activity/cancelApply", //取消报名
deleteApply: 'activity/deleteApply', //删除报名 deleteApply: "activity/deleteApply", //删除报名
findUserActicity: 'activity/findUserActicity' //查询用户参与的活动列表 findUserActicity: "activity/findUserActicity" //查询用户参与的活动列表
}, },
content:{ content:{
choiceness : 'content/choiceness', //精选活动列表 choiceness : "content/choiceness", //精选活动列表
detail : 'content/detail' // 精选活动详情 detail : "content/detail" // 精选活动详情
}, },
coupon: { coupon: {
findCouponDetails : 'coupon/findCouponDetails', //查看优惠券详情 findCouponDetails : "coupon/findCouponDetails", //查看优惠券详情
userGetCoupon : 'coupon/userGetCoupon', // 领取优惠券 userGetCoupon : "coupon/userGetCoupon", // 领取优惠券
findUsersCoupons : 'coupon/findUsersCoupons' //查看我的优惠券 findUsersCoupons : "coupon/findUsersCoupons" //查看我的优惠券
}, },
dictionary: { dictionary: {
selectByPCode: 'dictionary/selectByPCode', selectByPCode: "dictionary/selectByPCode",
}, },
device:{ device:{
remoteOpen: 'remoteOpen', //远程门锁 remoteOpen: "remoteOpen", //远程门锁
}, },
parameterSetting:{ parameterSetting:{
selectServiceTel: 'parameterSetting/selectServiceTel',//查询客户电话 selectServiceTel: "parameterSetting/selectServiceTel",//查询客户电话
}, },
houseLive:{ houseLive:{
findUserCurrentBillOnCAPP:'houseLive/findUserCurrentBillOnCAPP', //查询用户当前账单 findUserCurrentBillOnCAPP:"houseLive/findUserCurrentBillOnCAPP", //查询用户当前账单
selectAllBillsOnCAPP:'houseLive/selectAllBillsOnCAPP', //查询用户所有账单 selectAllBillsOnCAPP:"houseLive/selectAllBillsOnCAPP", //查询用户所有账单
findBillDetailOnCAPP:'houseLive/findBillDetailOnCAPP', //查询账单详情 findBillDetailOnCAPP:"houseLive/findBillDetailOnCAPP", //查询账单详情
livePayBillOnCAPP:'houseLive/livePayBillOnCAPP', //我的账单缴费 livePayBillOnCAPP:"houseLive/livePayBillOnCAPP", //我的账单缴费
payBillOnCAPPOnZero:'houseLive/payBillOnCAPPOnZero' //账单支付 支付金额为0的情况 payBillOnCAPPOnZero:"houseLive/payBillOnCAPPOnZero" //账单支付 支付金额为0的情况
}, },
WEGMeter: { WEGMeter: {
findUserHouseMeterDetail:'WEGMeter/findUserHouseMeterDetail', //当前水电表余量读数 findUserHouseMeterDetail:"WEGMeter/findUserHouseMeterDetail", //当前水电表余量读数
findMeterReding:'WEGMeter/findMeterReding',//刷新水,电表余量 findMeterReding:"WEGMeter/findMeterReding",//刷新水,电表余量
findHistoryDetailOnCAPP:'WEGMeter/findHistoryDetailOnCAPP',//缴费历史 findHistoryDetailOnCAPP:"WEGMeter/findHistoryDetailOnCAPP",//缴费历史
payOnCAPP:'WEGMeter/payOnCAPP',//水电费缴费 payOnCAPP:"WEGMeter/payOnCAPP",//水电费缴费
}, },
scanningPay:{ // 定金缴费 scanningPay:{ // 定金缴费
selHouseOrder:'scanningPay/selHouseOrder', selHouseOrder:"scanningPay/selHouseOrder",
newCcbOrderByWx:'scanningPay/newCcbOrderByWx',// 新账单缴费 龙支付 newCcbOrderByWx:"scanningPay/newCcbOrderByWx",// 新账单缴费 龙支付
}, },
wxpay:{ wxpay:{
getPayInfo:'wxpay/getPayInfo' // 微信 getPayInfo:"wxpay/getPayInfo" // 微信
}, },
houseSailWebsite:{ houseSailWebsite:{
listRegion:'houseSailWebsite/listRegion' //查询意向客户项目 listRegion:"houseSailWebsite/listRegion" //查询意向客户项目
} }
} };
function interceptorsMethod(store, context) { function interceptorsMethod(store, context) {
//全局Ajax监控 //全局Ajax监控
axios.interceptors.response.use((response) => { axios.interceptors.response.use((response) => {
response.Toast = Toast response.Toast = Toast;
// console.log(response.data) // console.log(response.data)
if( response.data.code === 20007) { if( response.data.code === 20007) {
...@@ -195,7 +195,7 @@ function interceptorsMethod(store, context) { ...@@ -195,7 +195,7 @@ function interceptorsMethod(store, context) {
// // }) // // })
// } // }
// }) // })
store.commit('loginModule/CLEAR_LOGIN_INFO') store.commit("loginModule/CLEAR_LOGIN_INFO");
// setTimeout(()=> { // setTimeout(()=> {
// context.$router.push({path: "/login"}) // context.$router.push({path: "/login"})
// }, 1000) // }, 1000)
...@@ -204,46 +204,46 @@ function interceptorsMethod(store, context) { ...@@ -204,46 +204,46 @@ function interceptorsMethod(store, context) {
if( response.data.code !== 10000) { if( response.data.code !== 10000) {
//console.log('error') //console.log('error')
//context.$message.success(response.data.message) //你没有相关账单!如有疑问请联系赛领团队 //context.$message.success(response.data.message) //你没有相关账单!如有疑问请联系赛领团队
if(response.data.msg.indexOf('你没有相关账单') > -1||response.data.msg.indexOf('或者已经主动退出') > -1 || response.data.msg.indexOf('你没有承租过任何房源') > -1 || response.data.msg.indexOf('未绑定房源') > -1) { if(response.data.msg.indexOf("你没有相关账单") > -1||response.data.msg.indexOf("或者已经主动退出") > -1 || response.data.msg.indexOf("你没有承租过任何房源") > -1 || response.data.msg.indexOf("未绑定房源") > -1) {
return response; return response;
} }
Toast.fail(response.data.msg || '服务器异常'); Toast.fail(response.data.msg || "服务器异常");
return; return;
} }
// console.log('response--->', response) // console.log('response--->', response)
return response return response;
}, (error) => { }, (error) => {
//console.log(333, Toast) //console.log(333, Toast)
setTimeout(() => { setTimeout(() => {
Toast.fail('服务器异常'); Toast.fail("服务器异常");
}, 400) }, 400);
console.log(error.response) console.log(error.response);
Promise.resolve(error.response) Promise.resolve(error.response);
}) });
axios.interceptors.request.use((request) => { axios.interceptors.request.use((request) => {
return request return request;
}, (error) => { }, (error) => {
//store.dispatch('displayErrorLoad'); //store.dispatch('displayErrorLoad');
console.log(error); console.log(error);
Promise.reject(error) Promise.reject(error);
}) });
} }
function requestMethod(method, url, data = null) { function requestMethod(method, url, data = null) {
if (!method) { if (!method) {
console.error('API function call requires method argument') console.error("API function call requires method argument");
return return;
} }
if (!url) { if (!url) {
console.error('API function call requires url argument') console.error("API function call requires url argument");
return return;
} }
const [path, subPath] = url.match(/\w+/g); const [path, subPath] = url.match(/\w+/g);
if(devMode) { if(devMode) {
method = 'get'; method = "get";
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
setTimeout(() => { setTimeout(() => {
axios({ axios({
...@@ -252,17 +252,17 @@ function requestMethod(method, url, data = null) { ...@@ -252,17 +252,17 @@ function requestMethod(method, url, data = null) {
data, data,
timeout: 50000 timeout: 50000
}).then((res) => { }).then((res) => {
resolve(res) resolve(res);
}) });
}, 100) }, 100);
}) });
} }
if(method === 'get' || method === 'delete') { if(method === "get" || method === "delete") {
return axios[method](url, { return axios[method](url, {
params: data, params: data,
timeout: 10000, timeout: 10000,
withCredentials: true //跨域需要 withCredentials: true //跨域需要
}) });
} }
return axios({ return axios({
method, method,
...@@ -270,22 +270,18 @@ function requestMethod(method, url, data = null) { ...@@ -270,22 +270,18 @@ function requestMethod(method, url, data = null) {
data, data,
timeout: 10000, timeout: 10000,
withCredentials: true withCredentials: true
}) });
} }
// let pathURI = "http://47.93.117.57/sail-web" // let pathURI = "http://47.93.117.57/sail-web"
let pathURI = "http://c.sailapartment.com" let pathURI = "http://c.sailapartment.com";
let apiUrl = '/' let apiUrl = "/";
//let pathURI = "http://192.168.32.130:8081/sail-web" //let pathURI = "http://192.168.32.130:8081/sail-web"
if(location.host.indexOf('192.168.31.202') > -1 || location.host.indexOf('120.79.43.11') > -1 || location.host.indexOf('gyf') > -1 || location.host.indexOf('localhost') > -1) { if(location.host.indexOf("192.168.31.202") > -1 || location.host.indexOf("120.79.43.11") > -1 || location.host.indexOf("gyf") > -1 || location.host.indexOf("localhost") > -1) {
pathURI = "http://192.168.31.202:8080/sail-web" pathURI = "http://192.168.31.202:8080/sail-web";
apiUrl = '/sail-web/' apiUrl = "/sail-web/";
//pathURI = "http://192.168.32.130:8081/sail-web" //pathURI = "http://192.168.32.130:8081/sail-web"
} }
if(location.host.indexOf('139.159.190.0') > -1) {
pathURI = "http://139.159.190.0:8080/sail-web"
apiUrl = '/sail-web/'
}
export default { export default {
//serverHost:serverHost, //serverHost:serverHost,
//serverURI: '', //serverURI: '',
...@@ -301,7 +297,7 @@ export default { ...@@ -301,7 +297,7 @@ export default {
return webroot + devPath + ".json"; return webroot + devPath + ".json";
} }
//return '/assessment-web/' + router[path][subPath] //return '/assessment-web/' + router[path][subPath]
return apiUrl + router[path][subPath] return apiUrl + router[path][subPath];
//return 'http://192.168.31.202:8080/sail-web/' + router[path][subPath] //return 'http://192.168.31.202:8080/sail-web/' + router[path][subPath]
//return 'http://192.168.32.130:8081/sail-web/' + router[path][subPath] //return 'http://192.168.32.130:8081/sail-web/' + router[path][subPath]
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
.cube-view { .cube-view {
// transform: translate(0, 0) // transform: translate(0, 0)
} }
// .page-move-enter, .page-move-leave-active { .page-move-enter, .page-move-leave-active {
// transform: translate(100%, 0) transform: translate(100%, 0)
// } }
// .page-move-enter-active, .page-move-leave-active { .page-move-enter-active, .page-move-leave-active {
// transition: transform .3s transition: transform .3s
// } }
</style> </style>
\ No newline at end of file
...@@ -15,29 +15,29 @@ Date.prototype.Format = function(fmt) { ...@@ -15,29 +15,29 @@ Date.prototype.Format = function(fmt) {
fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
for(var k in o) for(var k in o)
if(new RegExp("("+ k +")").test(fmt)) if(new RegExp("("+ k +")").test(fmt))
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
return fmt; return fmt;
}; };
export function currency (value) { export function currency (value) {
return i18n.toCurrency(value).replace('$','¥ ') // $1,000.00 return i18n.toCurrency(value).replace("$","¥ "); // $1,000.00
} }
export function onlyCurrency (value) { export function onlyCurrency (value) {
return i18n.toCurrency(value).replace('$','') // $1,000.00 return i18n.toCurrency(value).replace("$",""); // $1,000.00
} }
export function convertCurrency(money) { export function convertCurrency(money) {
//汉字的数字 //汉字的数字
var cnNums = new Array('零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'); var cnNums = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖");
//基本单位 //基本单位
var cnIntRadice = new Array('', '拾', '佰', '仟'); var cnIntRadice = new Array("", "拾", "佰", "仟");
//对应整数部分扩展单位 //对应整数部分扩展单位
var cnIntUnits = new Array('', '万', '亿', '兆'); var cnIntUnits = new Array("", "万", "亿", "兆");
//对应小数部分单位 //对应小数部分单位
var cnDecUnits = new Array('角', '分', '毫', '厘'); var cnDecUnits = new Array("角", "分", "毫", "厘");
//整数金额时后面跟的字符 //整数金额时后面跟的字符
var cnInteger = '整'; var cnInteger = "整";
//整型完以后的单位 //整型完以后的单位
var cnIntLast = '元'; var cnIntLast = "元";
//最大处理的数字 //最大处理的数字
var maxNum = 999999999999999.9999; var maxNum = 999999999999999.9999;
//金额整数部分 //金额整数部分
...@@ -45,26 +45,26 @@ export function convertCurrency(money) { ...@@ -45,26 +45,26 @@ export function convertCurrency(money) {
//金额小数部分 //金额小数部分
var decimalNum; var decimalNum;
//输出的中文金额字符串 //输出的中文金额字符串
var chineseStr = ''; var chineseStr = "";
//分离金额后用的数组,预定义 //分离金额后用的数组,预定义
var parts; var parts;
if (money == '') { return ''; } if (money === "") { return ""; }
money = parseFloat(money); money = parseFloat(money);
if (money >= maxNum) { if (money >= maxNum) {
//超出最大处理数字 //超出最大处理数字
return ''; return "";
} }
if (money == 0) { if (money === 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger; chineseStr = cnNums[0] + cnIntLast + cnInteger;
return chineseStr; return chineseStr;
} }
//转换为字符串 //转换为字符串
money = money.toString(); money = money.toString();
if (money.indexOf('.') == -1) { if (money.indexOf(".") === -1) {
integerNum = money; integerNum = money;
decimalNum = ''; decimalNum = "";
} else { } else {
parts = money.split('.'); parts = money.split(".");
integerNum = parts[0]; integerNum = parts[0];
decimalNum = parts[1].substr(0, 4); decimalNum = parts[1].substr(0, 4);
} }
...@@ -77,7 +77,7 @@ export function convertCurrency(money) { ...@@ -77,7 +77,7 @@ export function convertCurrency(money) {
var p = IntLen - i - 1; var p = IntLen - i - 1;
var q = p / 4; var q = p / 4;
var m = p % 4; var m = p % 4;
if (n == '0') { if (n === "0") {
zeroCount++; zeroCount++;
} else { } else {
if (zeroCount > 0) { if (zeroCount > 0) {
...@@ -87,32 +87,32 @@ export function convertCurrency(money) { ...@@ -87,32 +87,32 @@ export function convertCurrency(money) {
zeroCount = 0; zeroCount = 0;
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]; chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
} }
if (m == 0 && zeroCount < 4) { if (m === 0 && zeroCount < 4) {
chineseStr += cnIntUnits[q]; chineseStr += cnIntUnits[q];
} }
} }
chineseStr += cnIntLast; chineseStr += cnIntLast;
} }
//小数部分 //小数部分
if (decimalNum != '') { if (decimalNum !== "") {
var decLen = decimalNum.length; var decLen = decimalNum.length;
for (var i = 0; i < decLen; i++) { for (var i = 0; i < decLen; i++) {
var n = decimalNum.substr(i, 1); var n = decimalNum.substr(i, 1);
if (n != '0') { if (n !== "0") {
chineseStr += cnNums[Number(n)] + cnDecUnits[i]; chineseStr += cnNums[Number(n)] + cnDecUnits[i];
} }
} }
} }
if (chineseStr == '') { if (chineseStr === "") {
chineseStr += cnNums[0] + cnIntLast + cnInteger; chineseStr += cnNums[0] + cnIntLast + cnInteger;
} else if (decimalNum == '') { } else if (decimalNum === "") {
chineseStr += cnInteger; chineseStr += cnInteger;
} }
return chineseStr; return chineseStr;
} }
export function accurateTime(timeStramp) { export function accurateTime(timeStramp) {
if(!timeStramp) { if(!timeStramp) {
return '-' return "-";
} }
let date = new Date(timeStramp); let date = new Date(timeStramp);
var year = date.getFullYear(); var year = date.getFullYear();
...@@ -121,20 +121,20 @@ export function accurateTime(timeStramp) { ...@@ -121,20 +121,20 @@ export function accurateTime(timeStramp) {
var hour = date.getHours(); var hour = date.getHours();
var minute = date.getMinutes(); var minute = date.getMinutes();
var second = date.getSeconds(); var second = date.getSeconds();
month = month < 10 ? '0' + month : month; month = month < 10 ? "0" + month : month;
day = day < 10 ? '0' + day : day; day = day < 10 ? "0" + day : day;
hour = hour < 10 ? '0' + hour : hour; hour = hour < 10 ? "0" + hour : hour;
minute = minute < 10 ? '0' + minute : minute; minute = minute < 10 ? "0" + minute : minute;
second = second < 10 ? '0' + second : second; second = second < 10 ? "0" + second : second;
date = year + '/' + month + '/' + day + ' ' + hour + ':' + minute + ':' + second; // + '分' + second + '秒'; date = year + "/" + month + "/" + day + " " + hour + ":" + minute + ":" + second; // + '分' + second + '秒';
return date; return date;
} }
export function normalDate (timeStramp) { export function normalDate (timeStramp) {
if(!timeStramp) { if(!timeStramp) {
return '没有数据' return "没有数据";
} }
let date = new Date(timeStramp) let date = new Date(timeStramp);
return date.Format("yyyy/MM/dd") return date.Format("yyyy/MM/dd");
// var year = date.getFullYear(); // var year = date.getFullYear();
// var month = date.getMonth() + 1; // var month = date.getMonth() + 1;
// var day = date.getDate(); // var day = date.getDate();
...@@ -152,18 +152,18 @@ export function normalDate (timeStramp) { ...@@ -152,18 +152,18 @@ export function normalDate (timeStramp) {
//2017年12月19日 21:38:49 //2017年12月19日 21:38:49
export function chinaDate (timeStramp) { export function chinaDate (timeStramp) {
let date = new Date(timeStramp) let date = new Date(timeStramp);
var year = date.getFullYear(); var year = date.getFullYear();
var month = date.getMonth() + 1; var month = date.getMonth() + 1;
var day = date.getDate(); var day = date.getDate();
var hour = date.getHours(); var hour = date.getHours();
var minute = date.getMinutes(); var minute = date.getMinutes();
var second = date.getSeconds(); var second = date.getSeconds();
month = month < 10 ? '0' + month : month; month = month < 10 ? "0" + month : month;
day = day < 10 ? '0' + day : day; day = day < 10 ? "0" + day : day;
hour = hour < 10 ? '0' + hour : hour; hour = hour < 10 ? "0" + hour : hour;
minute = minute < 10 ? '0' + minute : minute; minute = minute < 10 ? "0" + minute : minute;
second = second < 10 ? '0' + second : second; second = second < 10 ? "0" + second : second;
date = year + '年' + month + '月' + day + '日 ' + hour + ':' + minute + ':' + second; date = year + "年" + month + "月" + day + "日 " + hour + ":" + minute + ":" + second;
return date; return date;
} }
\ No newline at end of file
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue' import Vue from "vue";
//import WechatAuth from '@/utils/auth'; //import WechatAuth from '@/utils/auth';
//import './pollyjs' //import './pollyjs'
import FastClick from 'fastclick' import FastClick from "fastclick";
import VueLazyload from 'vue-lazyload' import VueLazyload from "vue-lazyload";
import Vant from 'vant'; import Vant from "vant";
import '@/assets/css/vant_index.css'; import "@/assets/css/vant_index.css";
import '@/assets/font/font_sail_client' import "@/assets/font/font_sail_client";
import getQueryString from '@/utils/getQueryString' import getQueryString from "@/utils/getQueryString";
// Import Helpers for filters // Import Helpers for filters
import { currency, onlyCurrency, convertCurrency, normalDate, chinaDate, accurateTime } from '@/filter' import { currency, onlyCurrency, convertCurrency, normalDate, chinaDate, accurateTime } from "@/filter";
// Import Install and register helper items // Import Install and register helper items
Vue.filter('currency', currency) Vue.filter("currency", currency);
Vue.filter('onlyCurrency', onlyCurrency) Vue.filter("onlyCurrency", onlyCurrency);
Vue.filter('convertCurrency', convertCurrency) Vue.filter("convertCurrency", convertCurrency);
Vue.filter('normalDate', normalDate) Vue.filter("normalDate", normalDate);
Vue.filter('accurateTime', accurateTime) Vue.filter("accurateTime", accurateTime);
Vue.filter('chinaDate', chinaDate) Vue.filter("chinaDate", chinaDate);
import { Toast } from 'vant'; import { Toast } from "vant";
Vue.use(Vant); Vue.use(Vant);
// By default we import all the components. // By default we import all the components.
...@@ -60,28 +60,28 @@ import { ...@@ -60,28 +60,28 @@ import {
//IndexList, //IndexList,
//Swipe, //Swipe,
Upload Upload
} from 'cube-ui' } from "cube-ui";
import {sync} from 'vuex-router-sync' import {sync} from "vuex-router-sync";
//import {INIT_ADD_HOT} from './store/mutation_types.js' //import {INIT_ADD_HOT} from './store/mutation_types.js'
import locStore from '@/utils/store'; import locStore from "@/utils/store";
import Api from '@/api/index.js' import Api from "@/api/index.js";
import store from './store' import store from "./store";
import App from './App' import App from "./App";
import router from './router' import router from "./router";
import { List } from 'vant' import { List } from "vant";
Vue.use(List) Vue.use(List);
import { Cell, CellGroup } from 'vant'; import { Cell, CellGroup } from "vant";
Vue.use(Cell).use(CellGroup); Vue.use(Cell).use(CellGroup);
//import { Popup } from 'vant' //import { Popup } from 'vant'
import { Search } from 'vant'; import { Search } from "vant";
Vue.use(Search); Vue.use(Search);
//Vue.use(Toolbar) //Vue.use(Toolbar)
//Vue.use(CheckboxGroup) //Vue.use(CheckboxGroup)
Vue.use(Radio) Vue.use(Radio);
//Vue.use(Input) //Vue.use(Input)
//Vue.use(Textarea) //Vue.use(Textarea)
//Vue.use(Select) //Vue.use(Select)
...@@ -89,14 +89,14 @@ Vue.use(Radio) ...@@ -89,14 +89,14 @@ Vue.use(Radio)
//Vue.use(Rate) //Vue.use(Rate)
//Vue.use(Validator) //Vue.use(Validator)
//Vue.use(Form) //Vue.use(Form)
Vue.use(Loading) Vue.use(Loading);
Vue.use(Tip) Vue.use(Tip);
//Vue.use(Toast) //Vue.use(Toast)
//Vue.use(Picker) //Vue.use(Picker)
Vue.use(CascadePicker) Vue.use(CascadePicker);
Vue.use(DatePicker) Vue.use(DatePicker);
Vue.use(SegmentPicker) Vue.use(SegmentPicker);
Vue.use(TimePicker) Vue.use(TimePicker);
//Vue.use(Dialog) //Vue.use(Dialog)
//Vue.use(ActionSheet) //Vue.use(ActionSheet)
//Vue.use(Drawer) //Vue.use(Drawer)
...@@ -104,18 +104,18 @@ Vue.use(TimePicker) ...@@ -104,18 +104,18 @@ Vue.use(TimePicker)
//Vue.use(Slide) //Vue.use(Slide)
//Vue.use(IndexList) //Vue.use(IndexList)
//Vue.use(Swipe) //Vue.use(Swipe)
Vue.use(Upload) Vue.use(Upload);
Vue.config.productionTip = false Vue.config.productionTip = false;
//匹配要渲染的视图后,再获取数据: //匹配要渲染的视图后,再获取数据:
Vue.mixin({ Vue.mixin({
beforeMount () { beforeMount () {
const { asyncData, initData } = this.$options const { asyncData, initData } = this.$options;
setTimeout(()=> { setTimeout(()=> {
window.scrollTo(0, 0) window.scrollTo(0, 0);
}, 10) }, 10);
if (asyncData) { if (asyncData) {
// 将获取数据操作分配给 promise // 将获取数据操作分配给 promise
// 以便在组件中,我们可以在数据准备就绪后 // 以便在组件中,我们可以在数据准备就绪后
...@@ -124,8 +124,8 @@ Vue.mixin({ ...@@ -124,8 +124,8 @@ Vue.mixin({
const toast = Toast.loading({ const toast = Toast.loading({
duration: 0, // continuous display toast duration: 0, // continuous display toast
forbidClick: true, // forbid click background forbidClick: true, // forbid click background
loadingType: 'spinner', loadingType: "spinner",
message: '正在加载...' message: "正在加载..."
}); });
this.dataPromise = asyncData({ this.dataPromise = asyncData({
store: this.$store, store: this.$store,
...@@ -133,70 +133,84 @@ Vue.mixin({ ...@@ -133,70 +133,84 @@ Vue.mixin({
}).then(() => { }).then(() => {
Toast.clear(); Toast.clear();
//store.commit('UPDATE_LOADING_STATUS', false) //store.commit('UPDATE_LOADING_STATUS', false)
}) });
} }
if(initData) { if(initData) {
initData({ initData({
store: this.$store, store: this.$store,
route: this.$route route: this.$route
}) });
} }
} }
}) });
// Some middleware to help us ensure the user is authenticated. // Some middleware to help us ensure the user is authenticated.
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
let cUrl = location.href let cUrl = location.href;
if(cUrl.indexOf('login') === -1 && cUrl.indexOf('code') === -1 && cUrl.indexOf('state') === -1) { if(cUrl.indexOf("login") === -1 && cUrl.indexOf("code") === -1 && cUrl.indexOf("state") === -1) {
locStore('lastPage', location.href) locStore("lastPage", location.href);
} }
//console.log('location-href------------>', location.href) //console.log('location-href------------>', location.href)
let code = getQueryString('code'); let code = getQueryString("code");
//console.log('--->code', code) //console.log('--->code', code)
let state = getQueryString('state'); let state = getQueryString("state");
if(code && !state) { if(code && !state) {
console.log('正在登录') console.log("正在登录");
store.dispatch('loginModule/wxLoginInfo', code).then(res => { store.dispatch("loginModule/wxLoginInfo", code).then(res => {
//console.log('loginInfo', res.data) //console.log('loginInfo', res.data)
//console.log(res, '2222222222') //console.log(res, '2222222222')
if(res.data.code !== 10000) { if(res.data.code !== 10000) {
// next({ // next({
// path: '/login' // path: '/login'
// }) // })
location.href = "/wx/index.html#/login" location.href = "/wx/index.html#/login";
return; return;
} }
if(to.matched.some(record => record.meta.requiresLogin) && if(to.matched.some(record => record.meta.requiresLogin) &&
(!router.app.$store.state.loginModule.loginInfo.phone (!router.app.$store.state.loginModule.loginInfo.phone
|| router.app.$store.state.loginModule.loginInfo.phone === '')){ || router.app.$store.state.loginModule.loginInfo.phone === "")){
next({ next({
path: '/login' path: "/login"
}) });
} }
}) });
} }
if(code && state) { if(code && state) {
store.dispatch('loginModule/wxPoneLoginCallBack', { store.dispatch("loginModule/wxPoneLoginCallBack", {
code, code,
state state
}).then(res => { }).then(res => {
//console.log('to.matched.some(record => record.meta.requiresLogind', to.matched.some(record => record.meta.requiresLogin))
if(to.matched.some(record => record.meta.requiresLogin) && if(to.matched.some(record => record.meta.requiresLogin) &&
(!router.app.$store.state.loginModule.loginInfo.phone (!router.app.$store.state.loginModule.loginInfo.phone
|| router.app.$store.state.loginModule.loginInfo.phone === '')){ || router.app.$store.state.loginModule.loginInfo.phone === "")){
// let hasLogout = locStore('hasLogout')
// if(hasLogout) {
// }
next({ next({
path: '/login' path: "/login"
}) });
return; return;
//console.log('router.app.$store.state.loginModule.loginInfo.phone', router.app.$store.state.loginModule.loginInfo.phone)
// store.dispatch('loginModule/wxLogin').then(res => {
// if(res) {
// location.href = res.data.data
// }else {
// next({
// path: '/login'
// })
// }
// })
} }
//console.log('loginInfo', res.data) //console.log('loginInfo', res.data)
}) });
} }
//console.log('code-------->', code) //console.log('code-------->', code)
if(!code && !state && to.matched.some(record => record.meta.requiresLogin) && if(!code && !state && to.matched.some(record => record.meta.requiresLogin) &&
(!router.app.$store.state.loginModule.loginInfo.phone (!router.app.$store.state.loginModule.loginInfo.phone
|| router.app.$store.state.loginModule.loginInfo.phone === '')){ || router.app.$store.state.loginModule.loginInfo.phone === "")){
//console.log('router.app.$store.state.loginModule.loginInfo.phone', router.app.$store.state.loginModule.loginInfo.phone) //console.log('router.app.$store.state.loginModule.loginInfo.phone', router.app.$store.state.loginModule.loginInfo.phone)
// let hasLogout = locStore('hasLogout') // let hasLogout = locStore('hasLogout')
// if(hasLogout === true) { // if(hasLogout === true) {
...@@ -205,39 +219,39 @@ router.beforeEach((to, from, next) => { ...@@ -205,39 +219,39 @@ router.beforeEach((to, from, next) => {
// }) // })
// return; // return;
// } // }
next({ // next({
path: '/login' // path: '/login'
})
// store.dispatch('loginModule/wxLogin').then(res => {
// if(res) {
// location.href = res.data.data
// }else {
// }
// }) // })
store.dispatch("loginModule/wxLogin").then(res => {
if(res) {
location.href = res.data.data;
}else {
}
});
} }
if (to.matched.some(record => record.meta.requiresAuth) && if (to.matched.some(record => record.meta.requiresAuth) &&
(!router.app.$store.state.loginModule.loginInfo.cardCode (!router.app.$store.state.loginModule.loginInfo.cardCode
|| router.app.$store.state.loginModule.loginInfo.cardCode === '')) { || router.app.$store.state.loginModule.loginInfo.cardCode === "")) {
// this route requires auth, check if logged in // this route requires auth, check if logged in
// if not, redirect to login page. // if not, redirect to login page.
next({ next({
path: '/RealNameCheck/auth' path: "/RealNameCheck/auth"
}) });
} else { } else {
next() next();
} }
}) });
sync(store, router); sync(store, router);
/* eslint-disable no-new */ /* eslint-disable no-new */
let vm = new Vue({ let vm = new Vue({
el: '#app', el: "#app",
store, store,
router, router,
template: '<App/>', template: "<App/>",
components: { App } components: { App }
}) });
Api.interceptorsMethod(store, vm) Api.interceptorsMethod(store, vm);
...@@ -149,18 +149,20 @@ ...@@ -149,18 +149,20 @@
}, },
onSubmit() { onSubmit() {
this.loading = true this.loading = true
this.$store.dispatch('applyModule/depositGetPayUrl',{ // this.$store.dispatch('applyModule/depositGetPayUrl',{
applyLiveId:store('depositInfo').applyLiveId // applyLiveId:store('depositInfo').applyLiveId
}).then(res => { // }).then(res => {
this.loading = false // this.loading = false
if(res.data.code === 10000 ){ // console.log('res==',res.data)
location.href= res.data.data.ccbPaymentUrl // //return
} // if(res.data.code === 10000 ){
}) // location.href= res.data.data.ccbPaymentUrl
// setTimeout(() => { // }
// this.loading = false // })
// location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbc03a72497d53424&redirect_uri=http%3a%2f%2fc.sailapartment.com%2fwx%2fwxuser.html&response_type=code&scope=snsapi_base&state=${store('depositInfo').paymentPo.orderCode}&connect_redirect=1#wechat_redirect` setTimeout(() => {
// },500) this.loading = false
location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbc03a72497d53424&redirect_uri=http%3a%2f%2fc.sailapartment.com%2fwx%2fwxuser.html&response_type=code&scope=snsapi_base&state=${store('depositInfo').paymentPo.orderCode}&connect_redirect=1#wechat_redirect`
},500)
......
import {Polly} from "@pollyjs/core"; import {Polly} from "@pollyjs/core";
const polly = new Polly('<Recording Name>'); const polly = new Polly("<Recording Name>");
const { server } = polly; const { server } = polly;
// Events & Middleware // Events & Middleware
server server
.any() .any()
.on('request', (req, res) => { .on("request", (req, res) => {
req.headers['X-Auth-Token'] = 'abc123'; req.headers["X-Auth-Token"] = "abc123";
}); });
//console.log('--------gyf') //console.log('--------gyf')
// Intercept requests // Intercept requests
server.get('/sail-web/parameterSetting/selectServiceTel').intercept((req, res) => { server.get("/sail-web/parameterSetting/selectServiceTel").intercept((req, res) => {
res.status(200).json({"code":10000,"msg":"操作成功","data":{"id":11,"phone":"gyf0851-85637098"}}); res.status(200).json({"code":10000,"msg":"操作成功","data":{"id":11,"phone":"gyf0851-85637098"}});
}); });
// Passthrough requests // Passthrough requests
server.get('/coverage').passthrough(); server.get("/coverage").passthrough();
\ No newline at end of file \ No newline at end of file
import Vue from 'vue' import Vue from "vue";
import Router from 'vue-router' import Router from "vue-router";
import HelloWorld from '@/components/HelloWorld' import HelloWorld from "@/components/HelloWorld";
const SubscribeHouse = () => import('@/pages/form/subscribeHouse'); //预约看房 const SubscribeHouse = () => import("@/pages/form/subscribeHouse"); //预约看房
const RealNameCheck = () => import('@/pages/form/realNameCheck'); //实名认证 const RealNameCheck = () => import("@/pages/form/realNameCheck"); //实名认证
const BindHouseCheck = () => import('@/pages/form/bindHouseCheck'); //绑定房之实名认证 const BindHouseCheck = () => import("@/pages/form/bindHouseCheck"); //绑定房之实名认证
const ApplyCheckIn = () => import('@/pages/form/applyCheckIn'); //申请入住 const ApplyCheckIn = () => import("@/pages/form/applyCheckIn"); //申请入住
const ApplyUpload = () => import('@/pages/form/applyUpload'); //申请入住证件上传 const ApplyUpload = () => import("@/pages/form/applyUpload"); //申请入住证件上传
const MaintenanceApply = () => import('@/pages/form/maintenanceApply'); //申请维保 const MaintenanceApply = () => import("@/pages/form/maintenanceApply"); //申请维保
const Feedback = () => import('@/pages/form/feedback'); //功能异常与产品建议 const Feedback = () => import("@/pages/form/feedback"); //功能异常与产品建议
const ComplainSuggest = () => import('@/pages/form/complainSuggest'); //投诉建议 const ComplainSuggest = () => import("@/pages/form/complainSuggest"); //投诉建议
const EvaluateRepair = () => import('@/pages/maintenance/evaluateRepair'); //维保评价 const EvaluateRepair = () => import("@/pages/maintenance/evaluateRepair"); //维保评价
const UserApplyList = () => import('@/pages/apply/userApplyList'); //我的申请 const UserApplyList = () => import("@/pages/apply/userApplyList"); //我的申请
const UserMaintenanceList = () => import('@/pages/maintenance/usermaintenanceList'); //我的维保 const UserMaintenanceList = () => import("@/pages/maintenance/usermaintenanceList"); //我的维保
const SubscribeList = () => import('@/pages/subscribe/subscribeList'); //我的预约 const SubscribeList = () => import("@/pages/subscribe/subscribeList"); //我的预约
const ActivityList = () => import('@/pages/activity/activityList'); //我的活动 const ActivityList = () => import("@/pages/activity/activityList"); //我的活动
const ActivityDetail = () => import('@/pages/activity/activityDetail'); //活动详情 const ActivityDetail = () => import("@/pages/activity/activityDetail"); //活动详情
const ActivityJoin = () => import('@/pages/activity/activityJoin'); //活动报名 const ActivityJoin = () => import("@/pages/activity/activityJoin"); //活动报名
const SubscribeDetail = () => import('@/pages/subscribe/subscribeDetail'); //预约详情 const SubscribeDetail = () => import("@/pages/subscribe/subscribeDetail"); //预约详情
const ApplyDetail = () => import('@/pages/apply/applyDetail'); //申请详情 const ApplyDetail = () => import("@/pages/apply/applyDetail"); //申请详情
const MaintenanceDetail = () => import('@/pages/maintenance/maintenanceDetail'); //维保详情 const MaintenanceDetail = () => import("@/pages/maintenance/maintenanceDetail"); //维保详情
const OnlineSelectHouse = () => import('@/pages/house/onlineSelectHouse'); //维保详情 const OnlineSelectHouse = () => import("@/pages/house/onlineSelectHouse"); //维保详情
const CleanProjectSearchList = () => import('@/pages/house/CleanProjectSearchList'); const CleanProjectSearchList = () => import("@/pages/house/CleanProjectSearchList");
const MixSearchList = () => import('@/pages/house/mixSearchList'); const MixSearchList = () => import("@/pages/house/mixSearchList");
//const Home = () => import('@/pages/home');//首页 //const Home = () => import('@/pages/home');//首页
import Home from '@/pages/home';//首页 import Home from "@/pages/home";//首页
const Login = () => import('@/pages/login/login');//登录注册 const Login = () => import("@/pages/login/login");//登录注册
const Forget = () => import('@/pages/login/forgetPassword');//登录注册 const Forget = () => import("@/pages/login/forgetPassword");//登录注册
const ProjectList = () => import('@/pages/house/projectList'); //项目列表 const ProjectList = () => import("@/pages/house/projectList"); //项目列表
const ProjectDetails = () => import('@/pages/house/projectDetails'); //项目详情 const ProjectDetails = () => import("@/pages/house/projectDetails"); //项目详情
const HousingTypeList = () => import('@/pages/house/housingTypeList'); //户型列表 const HousingTypeList = () => import("@/pages/house/housingTypeList"); //户型列表
const HousingTypeDetails = () => import('@/pages/house/housingTypeDetails'); //户型详情 const HousingTypeDetails = () => import("@/pages/house/housingTypeDetails"); //户型详情
const SampleRoomList = () => import('@/pages/house/sampleRoomList'); //样板间列表 const SampleRoomList = () => import("@/pages/house/sampleRoomList"); //样板间列表
const SampleRoomDetails = () => import('@/pages/house/sampleRoomDetails'); //样板间详情 const SampleRoomDetails = () => import("@/pages/house/sampleRoomDetails"); //样板间详情
//const CommunityActivityHome = () => import('@/pages/activity/communityActivityHome'); //社区首页 //const CommunityActivityHome = () => import('@/pages/activity/communityActivityHome'); //社区首页
import CommunityActivityHome from '@/pages/activity/communityActivityHome' //社区首页 import CommunityActivityHome from "@/pages/activity/communityActivityHome"; //社区首页
const CommunityActivityList = () => import('@/pages/activity/communityActivityList'); //社区活动列表 const CommunityActivityList = () => import("@/pages/activity/communityActivityList"); //社区活动列表
const CommunityActivityDetail = () => import('@/pages/activity/communityActivityDetail'); //社区活动列表 const CommunityActivityDetail = () => import("@/pages/activity/communityActivityDetail"); //社区活动列表
//const ServiceHome = () => import('@/pages/service/serviceHome'); //服务首页 //const ServiceHome = () => import('@/pages/service/serviceHome'); //服务首页
import ServiceHome from '@/pages/service/serviceHome' //服务首页 import ServiceHome from "@/pages/service/serviceHome"; //服务首页
const MobilePhoneOpenDoor = () => import('@/pages/service/mobilePhoneOpenDoor'); //手机开门页面 const MobilePhoneOpenDoor = () => import("@/pages/service/mobilePhoneOpenDoor"); //手机开门页面
const CheckInGuide = () => import('@/pages/service/checkInGuide'); //入住指南 const CheckInGuide = () => import("@/pages/service/checkInGuide"); //入住指南
const SelectionOfActivityList = () => import('@/pages/activity/selectionOfActivityList'); //精选活动列表页 const SelectionOfActivityList = () => import("@/pages/activity/selectionOfActivityList"); //精选活动列表页
const SelectionOfActivityDetails = () => import('@/pages/activity/selectionOfActivityDetails'); //精选活动详情 const SelectionOfActivityDetails = () => import("@/pages/activity/selectionOfActivityDetails"); //精选活动详情
const HelloHouseKeeper = () => import('@/pages/service/helloHouseKeeper'); //管家你好 const HelloHouseKeeper = () => import("@/pages/service/helloHouseKeeper"); //管家你好
const MyCollections = () => import('@/pages/personalCenter/myCollections'); //我的收藏 const MyCollections = () => import("@/pages/personalCenter/myCollections"); //我的收藏
const ProtectClean = () => import('@/pages/service/protectClean'); //保洁 const ProtectClean = () => import("@/pages/service/protectClean"); //保洁
const MoveHouse = () => import('@/pages/service/moveHouse'); //保洁 const MoveHouse = () => import("@/pages/service/moveHouse"); //保洁
const AutoBindHouse = () => import('@/pages/bindHouse/autoBindHouse'); //绑定房源信息 const AutoBindHouse = () => import("@/pages/bindHouse/autoBindHouse"); //绑定房源信息
const SwitchBindHouse = () => import('@/pages/bindHouse/switchBindHouse'); //选择绑定房源 const SwitchBindHouse = () => import("@/pages/bindHouse/switchBindHouse"); //选择绑定房源
//const MyPage = () => import('@/pages/personalCenter/MyPage'); //我的主页面 //const MyPage = () => import('@/pages/personalCenter/MyPage'); //我的主页面
import MyPage from '@/pages/personalCenter/MyPage'; //我的主页面 import MyPage from "@/pages/personalCenter/MyPage"; //我的主页面
const MyPersonalInfor = () => import('@/pages/personalCenter/MyPersonalInfor'); //我的个人信息 const MyPersonalInfor = () => import("@/pages/personalCenter/MyPersonalInfor"); //我的个人信息
const SetUpPage = () => import('@/pages/personalCenter/setUpPage'); //设置 const SetUpPage = () => import("@/pages/personalCenter/setUpPage"); //设置
const MyNewsPage = () => import('@/pages/personalCenter/MyNewsPage'); //消息 const MyNewsPage = () => import("@/pages/personalCenter/MyNewsPage"); //消息
const NickName = () => import('@/pages/personalCenter/personalMessageChildren/NickName'); //昵称 const NickName = () => import("@/pages/personalCenter/personalMessageChildren/NickName"); //昵称
const ModifyPassword = () => import('@/pages/personalCenter/personalMessageChildren/ModifyPassword'); //修改密码 const ModifyPassword = () => import("@/pages/personalCenter/personalMessageChildren/ModifyPassword"); //修改密码
const ModifyTelephone = () => import('@/pages/personalCenter/personalMessageChildren/ModifyTelephone'); //修改手机号 const ModifyTelephone = () => import("@/pages/personalCenter/personalMessageChildren/ModifyTelephone"); //修改手机号
const UserProtocol = () => import('@/pages/personalCenter/setChildren/userProtocol'); //用户协议 const UserProtocol = () => import("@/pages/personalCenter/setChildren/userProtocol"); //用户协议
const Copyright = () => import('@/pages/personalCenter/setChildren/copyright'); //版权信息 const Copyright = () => import("@/pages/personalCenter/setChildren/copyright"); //版权信息
const BusinessMessage = () => import('@/pages/personalCenter/newsChildren/businessMessage'); //业务消息 const BusinessMessage = () => import("@/pages/personalCenter/newsChildren/businessMessage"); //业务消息
const SystemMessage = () => import('@/pages/personalCenter/newsChildren/systemMessage'); //系统消息 const SystemMessage = () => import("@/pages/personalCenter/newsChildren/systemMessage"); //系统消息
const SystemMessageDetail = () => import('@/pages/personalCenter/newsChildren/systemMessageDetail'); //系统消息详情 const SystemMessageDetail = () => import("@/pages/personalCenter/newsChildren/systemMessageDetail"); //系统消息详情
const ManageOwnedHouse = () => import('@/pages/personalCenter/ownedHouse/manageOwnedHouse'); //我的房屋 const ManageOwnedHouse = () => import("@/pages/personalCenter/ownedHouse/manageOwnedHouse"); //我的房屋
const FellowResident = () => import('@/pages/personalCenter/fellowResident/fellowResident'); //我的同住人 const FellowResident = () => import("@/pages/personalCenter/fellowResident/fellowResident"); //我的同住人
const Relevant = () => import('@/pages/personalCenter/relevant/relevant'); //关于我们 const Relevant = () => import("@/pages/personalCenter/relevant/relevant"); //关于我们
const FullBill = () => import('@/pages/personalCenter/detailsBill/fullBill'); //全部账单 const FullBill = () => import("@/pages/personalCenter/detailsBill/fullBill"); //全部账单
const PayAccount = () => import('@/pages/personalCenter/detailsBill/payAccount'); //缴清账单 const PayAccount = () => import("@/pages/personalCenter/detailsBill/payAccount"); //缴清账单
const ServiceTeam = () => import('@/pages/personalCenter/serviceTeam/serviceTeam'); //服务团队 const ServiceTeam = () => import("@/pages/personalCenter/serviceTeam/serviceTeam"); //服务团队
const Coupon = () => import('@/pages/personalCenter/coupon/coupon'); //我的优惠券 const Coupon = () => import("@/pages/personalCenter/coupon/coupon"); //我的优惠券
const GetCoupon = () => import('@/pages/personalCenter/coupon/getCoupon'); //领取优惠券 const GetCoupon = () => import("@/pages/personalCenter/coupon/getCoupon"); //领取优惠券
/*const BillFrame = () => import('@/pages/personalCenter/detailsBill/billFrame'); //抵用券*/ /*const BillFrame = () => import('@/pages/personalCenter/detailsBill/billFrame'); //抵用券*/
const AllBillList= () => import('@/pages/personalCenter/detailsBill/allBillList'); //我的全部账单 const AllBillList= () => import("@/pages/personalCenter/detailsBill/allBillList"); //我的全部账单
const BillDetails= () => import('@/pages/personalCenter/detailsBill/billDetails'); //我的账单详情页 const BillDetails= () => import("@/pages/personalCenter/detailsBill/billDetails"); //我的账单详情页
const DetailsOccupancy= () => import('@/pages/personalCenter/detailsOccupancy/detailsOccupancy'); //我的申请 const DetailsOccupancy= () => import("@/pages/personalCenter/detailsOccupancy/detailsOccupancy"); //我的申请
const myIntegral= () => import('@/pages/personalCenter/myIntegral'); //我的积分 const myIntegral= () => import("@/pages/personalCenter/myIntegral"); //我的积分
const myFair= () => import('@/pages/personalCenter/myFair'); //我的市集 const myFair= () => import("@/pages/personalCenter/myFair"); //我的市集
const myCars= () => import('@/pages/personalCenter/myCars'); //我的车辆 const myCars= () => import("@/pages/personalCenter/myCars"); //我的车辆
// const sailUserAgreement= () => import('@/pages/login/sailUserAgreement'); //用户使用协议 // const sailUserAgreement= () => import('@/pages/login/sailUserAgreement'); //用户使用协议
const lifePayManage= () => import('@/pages/service/lifePayManage'); //生活缴费 const lifePayManage= () => import("@/pages/service/lifePayManage"); //生活缴费
const payMoneyRecord= () => import('@/pages/service/payMoneyRecord'); //缴费记录 const payMoneyRecord= () => import("@/pages/service/payMoneyRecord"); //缴费记录
const advanceDepositManage= () => import('@/pages/service/advanceDepositManage'); //预存电费 const advanceDepositManage= () => import("@/pages/service/advanceDepositManage"); //预存电费
const payDepositBill= () => import('@/pages/personalCenter/detailsBill/payDepositBill'); //缴纳定金 const payDepositBill= () => import("@/pages/personalCenter/detailsBill/payDepositBill"); //缴纳定金
const reservationProtocol= () => import('@/pages/apply/reservationProtocol'); //预定协议 const reservationProtocol= () => import("@/pages/apply/reservationProtocol"); //预定协议
Vue.use(Router) Vue.use(Router);
export default new Router({ export default new Router({
routes: [ routes: [
{ {
path: '/', path: "/",
name: 'rootHome', name: "rootHome",
component: Home, component: Home,
meta: { description: "首页", requiresAuth: false } meta: { description: "首页", requiresAuth: false }
}, },
{ {
path: '/bindHouseCheck', path: "/bindHouseCheck",
name: "bindHouseCheck", name: "bindHouseCheck",
component: BindHouseCheck, component: BindHouseCheck,
meta: { description: "绑定房源", requiresAuth: false, requiresLogin: true } meta: { description: "绑定房源", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/complainSuggest', path: "/complainSuggest",
name: "complainSuggest", name: "complainSuggest",
component: ComplainSuggest, component: ComplainSuggest,
meta: { description: "投诉建议", requiresAuth: false, requiresLogin: false } meta: { description: "投诉建议", requiresAuth: false, requiresLogin: false }
}, },
{ {
path: '/onlineSelectHouse/:id', path: "/onlineSelectHouse/:id",
name: "onlineSelectHouse", name: "onlineSelectHouse",
component: OnlineSelectHouse, component: OnlineSelectHouse,
meta: { description: "在线选房", requiresAuth: false, requiresLogin: true } meta: { description: "在线选房", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/activityJoin', path: "/activityJoin",
name: "activityJoin", name: "activityJoin",
component: ActivityJoin, component: ActivityJoin,
meta: { description: "活动报名", requiresAuth: false, requiresLogin: true } meta: { description: "活动报名", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/activityDetail/:id/:name', path: "/activityDetail/:id/:name",
name: "activityDetail", name: "activityDetail",
component: ActivityDetail, component: ActivityDetail,
meta: { description: "报名详情", requiresAuth: false, requiresLogin: true } meta: { description: "报名详情", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/feedback', path: "/feedback",
name: "feedback", name: "feedback",
component: Feedback, component: Feedback,
meta: { description: "首页", requiresAuth: false, requiresLogin: false } meta: { description: "首页", requiresAuth: false, requiresLogin: false }
}, },
{ {
path: '/switchBindHouse', path: "/switchBindHouse",
name: "switchBindHouse", name: "switchBindHouse",
component: SwitchBindHouse, component: SwitchBindHouse,
meta: { description: "绑定房源", requiresAuth: false, requiresLogin: true } meta: { description: "绑定房源", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/autoBindHouse', path: "/autoBindHouse",
name: "autoBindHouse", name: "autoBindHouse",
component: AutoBindHouse, component: AutoBindHouse,
meta: { description: "绑定房源", requiresAuth: false, requiresLogin: true } meta: { description: "绑定房源", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/maintenanceApply/:id/:code', path: "/maintenanceApply/:id/:code",
name: "maintenanceApply", name: "maintenanceApply",
component: MaintenanceApply, component: MaintenanceApply,
meta: { description: "申请维保", requiresAuth: false, requiresLogin: true } meta: { description: "申请维保", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/evaluateRepair/:id', path: "/evaluateRepair/:id",
name: "evaluateRepair", name: "evaluateRepair",
component: EvaluateRepair, component: EvaluateRepair,
meta: { description: "维保评价", requiresAuth: false, requiresLogin: true } meta: { description: "维保评价", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/maintenanceDetail/:id', path: "/maintenanceDetail/:id",
name: "maintenanceDetail", name: "maintenanceDetail",
component: MaintenanceDetail, component: MaintenanceDetail,
meta: { description: "维保详情", requiresAuth: false, requiresLogin: true } meta: { description: "维保详情", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/applyDetail/:id', path: "/applyDetail/:id",
name: "applyDetail", name: "applyDetail",
component: ApplyDetail, component: ApplyDetail,
meta: { description: "申请详情", requiresAuth: false, requiresLogin: true } meta: { description: "申请详情", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/subscribeDetail/:id', path: "/subscribeDetail/:id",
name: "subscribeDetail", name: "subscribeDetail",
component: SubscribeDetail, component: SubscribeDetail,
meta: { description: "预约详情", requiresAuth: false, requiresLogin: true} meta: { description: "预约详情", requiresAuth: false, requiresLogin: true}
}, },
{ {
path: '/activityList', path: "/activityList",
name: "activityList", name: "activityList",
component: ActivityList, component: ActivityList,
meta: { description: "我的活动", requiresAuth: false, requiresLogin: true } meta: { description: "我的活动", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/userMaintenanceList', path: "/userMaintenanceList",
name: "userMaintenanceList", name: "userMaintenanceList",
component: UserMaintenanceList, component: UserMaintenanceList,
meta: { description: "我的维保", requiresAuth: false, requiresLogin: true } meta: { description: "我的维保", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/subscribeList', path: "/subscribeList",
name: "subscribeList", name: "subscribeList",
component: SubscribeList, component: SubscribeList,
meta: { description: "我的预约", requiresAuth: false, requiresLogin: true } meta: { description: "我的预约", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/userApplyList', path: "/userApplyList",
name: "userApplyList", name: "userApplyList",
component: UserApplyList, component: UserApplyList,
meta: { description: "首页", requiresAuth: false, requiresLogin: true } meta: { description: "首页", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/applyCheckIn', path: "/applyCheckIn",
name: "applyCheckIn", name: "applyCheckIn",
component: ApplyCheckIn, component: ApplyCheckIn,
meta: { description: "申请入住", requiresAuth: true, requiresLogin: true } meta: { description: "申请入住", requiresAuth: true, requiresLogin: true }
}, },
{ {
path: '/applyUpload', path: "/applyUpload",
name: "applyUpload", name: "applyUpload",
component: ApplyUpload, component: ApplyUpload,
meta: { description: "首页", requiresAuth: false, requiresLogin: true } meta: { description: "首页", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/realNameCheck/:flag', path: "/realNameCheck/:flag",
name: "realNameCheck", name: "realNameCheck",
component: RealNameCheck, component: RealNameCheck,
meta: { description: "实名认证", requiresAuth: false, requiresLogin: true } meta: { description: "实名认证", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/subscribeHouse', path: "/subscribeHouse",
name: "subscribeHouse", name: "subscribeHouse",
component: SubscribeHouse, component: SubscribeHouse,
meta: { description: "预约房源", requiresAuth: false, requiresLogin: true } meta: { description: "预约房源", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/cleanProjectSearchList', path: "/cleanProjectSearchList",
name: "cleanProjectSearchList", name: "cleanProjectSearchList",
component: CleanProjectSearchList, component: CleanProjectSearchList,
meta: { description: "首页", requiresAuth: false } meta: { description: "首页", requiresAuth: false }
}, },
{ {
path: '/mixSearchList/:keyWords', path: "/mixSearchList/:keyWords",
name: "mixSearchList", name: "mixSearchList",
component: MixSearchList, component: MixSearchList,
meta: { description: "首页", requiresAuth: false } meta: { description: "首页", requiresAuth: false }
}, },
{ {
path: '/home', path: "/home",
name: "home", name: "home",
component: Home, component: Home,
meta: { description: "首页", requiresAuth: false } meta: { description: "首页", requiresAuth: false }
}, },
{ {
path: '/forget', path: "/forget",
name: "forget", name: "forget",
component: Forget, component: Forget,
meta: { description: "忘记密码", requiresAuth: false } meta: { description: "忘记密码", requiresAuth: false }
}, },
{ {
path: '/login', path: "/login",
name: "login", name: "login",
component: Login, component: Login,
meta: { description: "首页", requiresAuth: false } meta: { description: "首页", requiresAuth: false }
}, },
{ {
path: '/MyPage', path: "/MyPage",
name: "MyPage", name: "MyPage",
component: MyPage, component: MyPage,
meta: { description: "首页", requiresAuth: false } meta: { description: "首页", requiresAuth: false }
}, },
{ {
path: '/MyPersonalInfor', path: "/MyPersonalInfor",
name: "MyPersonalInfor", name: "MyPersonalInfor",
component: MyPersonalInfor, component: MyPersonalInfor,
meta: { description: "首页", requiresAuth: false, requiresLogin: true } meta: { description: "首页", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/setUpPage', path: "/setUpPage",
name: "setUpPage", name: "setUpPage",
component: SetUpPage, component: SetUpPage,
meta: { description: "我的设置", requiresAuth: false, requiresLogin: false } meta: { description: "我的设置", requiresAuth: false, requiresLogin: false }
}, },
{ {
path: '/MyNewsPage', path: "/MyNewsPage",
name: "MyNewsPage", name: "MyNewsPage",
component: MyNewsPage, component: MyNewsPage,
meta: { description: "我的消息", requiresAuth: false,requiresLogin: true } meta: { description: "我的消息", requiresAuth: false,requiresLogin: true }
}, },
{ {
path: '/projectList', path: "/projectList",
name: "projectList", name: "projectList",
component: ProjectList, component: ProjectList,
meta: { description: "热门项目", requiresAuth: false } meta: { description: "热门项目", requiresAuth: false }
}, },
{ {
path: '/projectDetails/:id', path: "/projectDetails/:id",
name: "projectDetails", name: "projectDetails",
component: ProjectDetails, component: ProjectDetails,
meta: { description: "项目详情", requiresAuth: false } meta: { description: "项目详情", requiresAuth: false }
}, },
{ {
path: '/housingTypeList', path: "/housingTypeList",
name: "housingTypeList", name: "housingTypeList",
component: HousingTypeList, component: HousingTypeList,
meta: { description: "热门户型", requiresAuth: false } meta: { description: "热门户型", requiresAuth: false }
}, },
{ {
path: '/housingTypeDetails/:id', path: "/housingTypeDetails/:id",
name: "housingTypeDetails", name: "housingTypeDetails",
component: HousingTypeDetails, component: HousingTypeDetails,
meta: { description: "户型详情", requiresAuth: false } meta: { description: "户型详情", requiresAuth: false }
}, },
{ {
path: '/sampleRoomList', path: "/sampleRoomList",
name: "sampleRoomList", name: "sampleRoomList",
component: SampleRoomList, component: SampleRoomList,
meta: { description: "样板间列表", requiresAuth: false } meta: { description: "样板间列表", requiresAuth: false }
}, },
{ {
path: '/sampleRoomDetails/:id', path: "/sampleRoomDetails/:id",
name: "sampleRoomDetails", name: "sampleRoomDetails",
component: SampleRoomDetails, component: SampleRoomDetails,
meta: { description: "样板间详情", requiresAuth: false } meta: { description: "样板间详情", requiresAuth: false }
}, },
{ {
path: '/NickName', path: "/NickName",
name: "NickName", name: "NickName",
component: NickName, component: NickName,
meta: { description: "昵称", requiresAuth: false } meta: { description: "昵称", requiresAuth: false }
}, },
{ {
path: '/ModifyPassword', path: "/ModifyPassword",
name: "ModifyPassword", name: "ModifyPassword",
component: ModifyPassword, component: ModifyPassword,
meta: { description: "修改密码", requiresAuth: false } meta: { description: "修改密码", requiresAuth: false }
}, },
{ {
path: '/ModifyTelephone', path: "/ModifyTelephone",
name: "ModifyTelephone", name: "ModifyTelephone",
component: ModifyTelephone, component: ModifyTelephone,
meta: { description: "修改手机号", requiresAuth: false } meta: { description: "修改手机号", requiresAuth: false }
}, },
{ {
path: '/userProtocol', path: "/userProtocol",
name: "userProtocol", name: "userProtocol",
component: UserProtocol, component: UserProtocol,
meta: { description: "用户协议", requiresAuth: false } meta: { description: "用户协议", requiresAuth: false }
}, },
{ {
path: '/copyright', path: "/copyright",
name: "copyright", name: "copyright",
component: Copyright, component: Copyright,
meta: { description: "版权信息", requiresAuth: false } meta: { description: "版权信息", requiresAuth: false }
}, },
{ {
path: '/businessMessage', path: "/businessMessage",
name: "businessMessage", name: "businessMessage",
component: BusinessMessage, component: BusinessMessage,
meta: { description: "业务消息", requiresAuth: false } meta: { description: "业务消息", requiresAuth: false }
}, },
{ {
path: '/systemMessage', path: "/systemMessage",
name: "systemMessage", name: "systemMessage",
component: SystemMessage, component: SystemMessage,
meta: { description: "系统消息", requiresAuth: false } meta: { description: "系统消息", requiresAuth: false }
}, },
{ {
path: '/systemMessageDetail/:id/:userRecordId', path: "/systemMessageDetail/:id/:userRecordId",
name: "systemMessageDetail", name: "systemMessageDetail",
component: SystemMessageDetail, component: SystemMessageDetail,
meta: { description: "系统消息详情", requiresAuth: false } meta: { description: "系统消息详情", requiresAuth: false }
}, },
{ {
path: '/manageOwnedHouse', path: "/manageOwnedHouse",
name: "manageOwnedHouse", name: "manageOwnedHouse",
component: ManageOwnedHouse, component: ManageOwnedHouse,
meta: { description: "我的房屋", requiresAuth: false, requiresLogin: true } meta: { description: "我的房屋", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/fellowResident', path: "/fellowResident",
name: "fellowResident", name: "fellowResident",
component: FellowResident, component: FellowResident,
meta: { description: "首页", requiresAuth: false, requiresLogin: true } meta: { description: "首页", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/relevant', path: "/relevant",
name: "relevant", name: "relevant",
component: Relevant, component: Relevant,
meta: { description: "关于我们", requiresAuth: false } meta: { description: "关于我们", requiresAuth: false }
}, },
{ {
path: '/fullBill', path: "/fullBill",
name: "fullBill", name: "fullBill",
component: FullBill, component: FullBill,
meta: { description: "我的账单", requiresAuth: false, requiresLogin: true } meta: { description: "我的账单", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/serviceTeam', path: "/serviceTeam",
name: "serviceTeam", name: "serviceTeam",
component: ServiceTeam, component: ServiceTeam,
meta: { description: "服务团队", requiresAuth: false } meta: { description: "服务团队", requiresAuth: false }
}, },
{ {
path: '/communityActivityHome', path: "/communityActivityHome",
name: "communityActivityHome", name: "communityActivityHome",
component: CommunityActivityHome, component: CommunityActivityHome,
meta: { description: "社区首页", requiresAuth: false } meta: { description: "社区首页", requiresAuth: false }
}, },
{ {
path: '/communityActivityList', path: "/communityActivityList",
name: "communityActivityList", name: "communityActivityList",
component: CommunityActivityList, component: CommunityActivityList,
meta: { description: "社区活动列表", requiresAuth: false } meta: { description: "社区活动列表", requiresAuth: false }
}, },
{ {
path: '/communityActivityDetail/:id', path: "/communityActivityDetail/:id",
name: "communityActivityDetail", name: "communityActivityDetail",
component: CommunityActivityDetail, component: CommunityActivityDetail,
meta: { description: "活动详情", requiresAuth: false } meta: { description: "活动详情", requiresAuth: false }
}, },
{ {
path: '/serviceHome', path: "/serviceHome",
name: "serviceHome", name: "serviceHome",
component: ServiceHome, component: ServiceHome,
meta: { description: "服务首页", requiresAuth: false } meta: { description: "服务首页", requiresAuth: false }
}, },
{ {
path: '/mobilePhoneOpenDoor', path: "/mobilePhoneOpenDoor",
name: "mobilePhoneOpenDoor", name: "mobilePhoneOpenDoor",
component: MobilePhoneOpenDoor, component: MobilePhoneOpenDoor,
meta: { description: "手机开门页面", requiresAuth: false, requiresLogin:true } meta: { description: "手机开门页面", requiresAuth: false, requiresLogin:true }
}, },
{ {
path: '/checkInGuide', path: "/checkInGuide",
name: "checkInGuide", name: "checkInGuide",
component: CheckInGuide, component: CheckInGuide,
meta: { description: "入住指南", requiresAuth: false } meta: { description: "入住指南", requiresAuth: false }
}, },
{ {
path: '/selectionOfActivityList', path: "/selectionOfActivityList",
name: "selectionOfActivityList", name: "selectionOfActivityList",
component: SelectionOfActivityList, component: SelectionOfActivityList,
meta: { description: "精选活动列表页", requiresAuth: false } meta: { description: "精选活动列表页", requiresAuth: false }
}, },
{ {
path: '/helloHouseKeeper', path: "/helloHouseKeeper",
name: "helloHouseKeeper", name: "helloHouseKeeper",
component: HelloHouseKeeper, component: HelloHouseKeeper,
meta: { description: "管家你好", requiresAuth: false } meta: { description: "管家你好", requiresAuth: false }
}, },
{ {
path: '/selectionOfActivityDetails/:id', path: "/selectionOfActivityDetails/:id",
name: "selectionOfActivityDetails", name: "selectionOfActivityDetails",
component: SelectionOfActivityDetails, component: SelectionOfActivityDetails,
meta: { description: "精选活动详情", requiresAuth: false } meta: { description: "精选活动详情", requiresAuth: false }
}, },
{ {
path: '/myCollections', path: "/myCollections",
name: "myCollections", name: "myCollections",
component: MyCollections, component: MyCollections,
meta: { description: "我的收藏", requiresAuth: false, requiresLogin: true } meta: { description: "我的收藏", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/protectClean', path: "/protectClean",
name: "protectClean", name: "protectClean",
component: ProtectClean, component: ProtectClean,
meta: { description: "保洁", requiresAuth: false } meta: { description: "保洁", requiresAuth: false }
}, },
{ {
path: '/moveHouse', path: "/moveHouse",
name: "moveHouse", name: "moveHouse",
component: MoveHouse, component: MoveHouse,
meta: { description: "搬家", requiresAuth: false } meta: { description: "搬家", requiresAuth: false }
}, },
{ {
path: '/allBillList', path: "/allBillList",
name: "allBillList", name: "allBillList",
component: AllBillList, component: AllBillList,
meta: { description: "全部账单", requiresAuth: false, requiresLogin: true } meta: { description: "全部账单", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/billDetails/:id', path: "/billDetails/:id",
name: "billDetails", name: "billDetails",
component: BillDetails, component: BillDetails,
meta: { description: "账单详情", requiresAuth: false, requiresLogin: true } meta: { description: "账单详情", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/coupon', path: "/coupon",
name: "coupon", name: "coupon",
component: Coupon, component: Coupon,
meta: { description: "优惠券", requiresAuth: false, requiresLogin: true } meta: { description: "优惠券", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/getCoupon/:id', path: "/getCoupon/:id",
name: "getCoupon", name: "getCoupon",
component: GetCoupon, component: GetCoupon,
meta: { description: "优惠券详情", requiresAuth: false, requiresLogin: true } meta: { description: "优惠券详情", requiresAuth: false, requiresLogin: true }
}, },
{ {
path: '/detailsOccupancy', path: "/detailsOccupancy",
name: "detailsOccupancy", name: "detailsOccupancy",
component: DetailsOccupancy, component: DetailsOccupancy,
meta: { description: "申请入住", requiresAuth: false} meta: { description: "申请入住", requiresAuth: false}
}, },
{ {
path: '/payAccount', path: "/payAccount",
name: "payAccount", name: "payAccount",
component: PayAccount, component: PayAccount,
meta: { description: "账单缴清", requiresAuth: false } meta: { description: "账单缴清", requiresAuth: false }
}, },
{ {
path: '/myIntegral', path: "/myIntegral",
name: "myIntegral", name: "myIntegral",
component: myIntegral, component: myIntegral,
meta: { description: "我的积分", requiresAuth: false} meta: { description: "我的积分", requiresAuth: false}
}, },
{ {
path: '/myFair', path: "/myFair",
name: "myFair", name: "myFair",
component: myFair, component: myFair,
meta: { description: "我的市集", requiresAuth: false } meta: { description: "我的市集", requiresAuth: false }
}, },
{ {
path: '/myCars', path: "/myCars",
name: "myCars", name: "myCars",
component: myCars, component: myCars,
meta: { description: "我的车辆", requiresAuth: false } meta: { description: "我的车辆", requiresAuth: false }
}, },
{ {
path: '/lifePayManage', path: "/lifePayManage",
name: "lifePayManage", name: "lifePayManage",
component: lifePayManage, component: lifePayManage,
meta: { description: "生活缴费", requiresAuth: false,requiresLogin: true } meta: { description: "生活缴费", requiresAuth: false,requiresLogin: true }
}, },
{ {
path: '/payMoneyRecord', path: "/payMoneyRecord",
name: "payMoneyRecord", name: "payMoneyRecord",
component: payMoneyRecord, component: payMoneyRecord,
meta: { description: "缴费记录", requiresAuth: false } meta: { description: "缴费记录", requiresAuth: false }
}, },
{ {
path: '/advanceDepositManage/:type', path: "/advanceDepositManage/:type",
name: "advanceDepositManage", name: "advanceDepositManage",
component: advanceDepositManage, component: advanceDepositManage,
meta: { description: "预存费用", requiresAuth: false } meta: { description: "预存费用", requiresAuth: false }
}, },
{ {
path: '/payDepositBill/:type', path: "/payDepositBill/:type",
name: "payDepositBill", name: "payDepositBill",
component: payDepositBill, component: payDepositBill,
meta: { description: "缴纳定金", requiresAuth: false } meta: { description: "缴纳定金", requiresAuth: false }
}, },
{ {
path: '/reservationProtocol', path: "/reservationProtocol",
name: "reservationProtocol", name: "reservationProtocol",
component: reservationProtocol, component: reservationProtocol,
meta: { description: "预定协议", requiresAuth: false } meta: { description: "预定协议", requiresAuth: false }
...@@ -584,4 +584,4 @@ export default new Router({ ...@@ -584,4 +584,4 @@ export default new Router({
//meta: { description: "首页", requiresAuth: false } //meta: { description: "首页", requiresAuth: false }
// } // }
] ]
}) });
...@@ -52,7 +52,7 @@ import myBillModule from "./modules/billStore/myBillStore"; //我的账单 ...@@ -52,7 +52,7 @@ import myBillModule from "./modules/billStore/myBillStore"; //我的账单
import api from '@/api/index.js' import api from "@/api/index.js";
import weixin from "@/utils/wx.config.js"; import weixin from "@/utils/wx.config.js";
...@@ -92,56 +92,56 @@ export default new Vuex.Store({ ...@@ -92,56 +92,56 @@ export default new Vuex.Store({
filterOption: { filterOption: {
region: { region: {
visible: false, visible: false,
selected: '', selected: "",
options: [] options: []
}, },
room: { room: {
visible: false, visible: false,
selected: '', selected: "",
options: [] options: []
}, },
unit: { unit: {
visible: false, visible: false,
selected: '', selected: "",
options: [] options: []
}, },
floor: { floor: {
visible: false, visible: false,
selected: '', selected: "",
options: [] options: []
}, },
roomNumber: { roomNumber: {
visible: false, visible: false,
selected: '', selected: "",
options: [] options: []
}, },
relation: { relation: {
visible: false, visible: false,
selected: 'parent', selected: "parent",
options: [ options: [
{ {
label: '父母', label: "父母",
value: 'em_contact_re_parent' value: "em_contact_re_parent"
}, },
{ {
label: '子女', label: "子女",
value: 'em_contact_re_children' value: "em_contact_re_children"
}, },
{ {
label: '配偶', label: "配偶",
value: 'em_contact_re_spouse' value: "em_contact_re_spouse"
}, },
{ {
label: '朋友', label: "朋友",
value: 'em_contact_re_firend' value: "em_contact_re_firend"
}, },
{ {
label: '同事', label: "同事",
value: 'em_contact_re_workmate' value: "em_contact_re_workmate"
}, },
{ {
label: '其他', label: "其他",
value: 'em_contact_re_other' value: "em_contact_re_other"
} }
] ]
} }
...@@ -149,25 +149,25 @@ export default new Vuex.Store({ ...@@ -149,25 +149,25 @@ export default new Vuex.Store({
}, },
actions: { actions: {
initWxShare({commit, state}) { initWxShare({commit, state}) {
let url = location.href.split('#')[0]; let url = location.href.split("#")[0];
console.log('-------share---', url) console.log("-------share---", url);
return api return api
.request("get",api.getURL("WxShare/sign"), { .request("get",api.getURL("WxShare/sign"), {
url: url url: url
}).then(res =>{ }).then(res =>{
console.log('res.data--share--', res.data) console.log("res.data--share--", res.data);
//commit('SET_GLOBAL_PHONE', res.data.data.phone) //commit('SET_GLOBAL_PHONE', res.data.data.phone)
weixin.init(res.data) weixin.init(res.data);
return res return res;
}) });
}, },
selectServiceTel({commit,state}){ selectServiceTel({commit,state}){
return api return api
.request("get",api.getURL("parameterSetting/selectServiceTel")).then(res =>{ .request("get",api.getURL("parameterSetting/selectServiceTel")).then(res =>{
//console.log('tele',res) //console.log('tele',res)
commit('SET_GLOBAL_PHONE', res.data.data.phone) commit("SET_GLOBAL_PHONE", res.data.data.phone);
return res return res;
}) });
},/* },/*
delete({ commit, state }, info) { delete({ commit, state }, info) {
return api.request("get", api.getURL("systemMsg/delete"), { return api.request("get", api.getURL("systemMsg/delete"), {
...@@ -179,7 +179,7 @@ export default new Vuex.Store({ ...@@ -179,7 +179,7 @@ export default new Vuex.Store({
},*/ },*/
fetchSelectDataType({ commit, state }, typeName) { fetchSelectDataType({ commit, state }, typeName) {
//if (state.columsOptions.length > 0) return; //if (state.columsOptions.length > 0) return;
if(typeName !== 'LayoutIntent'){ // 特殊情况 选择户型 判断渔安新城无单间 if(typeName !== "LayoutIntent"){ // 特殊情况 选择户型 判断渔安新城无单间
if(state[typeName]) return; //对已缓存的数据无需发送请求 if(state[typeName]) return; //对已缓存的数据无需发送请求
} }
return api return api
...@@ -196,31 +196,31 @@ export default new Vuex.Store({ ...@@ -196,31 +196,31 @@ export default new Vuex.Store({
text: item.name || item.remark text: item.name || item.remark
}; };
}); });
commit('GET_SELECT_HOUSE_TYPE', { commit("GET_SELECT_HOUSE_TYPE", {
list: opt, list: opt,
keyName: typeName keyName: typeName
}); });
}); });
}, },
commitBindHouse( { commit, state }, params) { commitBindHouse( { commit, state }, params) {
return api.request("post", api.getURL('cAPPHouse/commitBindHouse'), { return api.request("post", api.getURL("cAPPHouse/commitBindHouse"), {
houseId: state.houseId, houseId: state.houseId,
relationship: state.filterOption['relation'].selected relationship: state.filterOption["relation"].selected
}).then(res => { }).then(res => {
return res; return res;
}) });
}, },
sendDiffList( { commit, state }, payload) { sendDiffList( { commit, state }, payload) {
let urlMap = { let urlMap = {
region: { region: {
url: api.getURL('cAPPHouse/regions'), url: api.getURL("cAPPHouse/regions"),
params: { params: {
pn: 1, pn: 1,
pageSize: 2000 * payload.times pageSize: 2000 * payload.times
} }
}, },
room: { room: {
url: api.getURL('cAPPHouse/buildingNums'), url: api.getURL("cAPPHouse/buildingNums"),
params: { params: {
pn: 1, pn: 1,
pageSize: 2000 * payload.times, pageSize: 2000 * payload.times,
...@@ -228,7 +228,7 @@ export default new Vuex.Store({ ...@@ -228,7 +228,7 @@ export default new Vuex.Store({
} }
}, },
unit: { unit: {
url: api.getURL('cAPPHouse/units'), url: api.getURL("cAPPHouse/units"),
params: { params: {
pn: 1, pn: 1,
pageSize: 2000 * payload.times, pageSize: 2000 * payload.times,
...@@ -237,7 +237,7 @@ export default new Vuex.Store({ ...@@ -237,7 +237,7 @@ export default new Vuex.Store({
} }
}, },
floor: { floor: {
url: api.getURL('cAPPHouse/floors'), url: api.getURL("cAPPHouse/floors"),
params: { params: {
pn: 1, pn: 1,
pageSize: 2000 * payload.times, pageSize: 2000 * payload.times,
...@@ -247,7 +247,7 @@ export default new Vuex.Store({ ...@@ -247,7 +247,7 @@ export default new Vuex.Store({
} }
}, },
roomNumber: { roomNumber: {
url: api.getURL('cAPPHouse/houses'), url: api.getURL("cAPPHouse/houses"),
params: { params: {
pn: 1, pn: 1,
pageSize: 2000 * payload.times, pageSize: 2000 * payload.times,
...@@ -260,59 +260,59 @@ export default new Vuex.Store({ ...@@ -260,59 +260,59 @@ export default new Vuex.Store({
// relation: { // relation: {
// } // }
} };
return api.request("get", urlMap[payload.type].url, urlMap[payload.type].params).then(res => { return api.request("get", urlMap[payload.type].url, urlMap[payload.type].params).then(res => {
if(payload.type === 'room') { if(payload.type === "room") {
res.data.data.list.map(item => { res.data.data.list.map(item => {
item.name = item.buildingNum item.name = item.buildingNum;
item.id = item.buildingNum item.id = item.buildingNum;
}) });
} }
if(payload.type === 'unit') { if(payload.type === "unit") {
res.data.data.list.map(item => { res.data.data.list.map(item => {
item.name = item.unit item.name = item.unit;
item.id = item.unit item.id = item.unit;
}) });
} }
if(payload.type === 'floor') { if(payload.type === "floor") {
res.data.data.list.map(item => { res.data.data.list.map(item => {
item.name = item.floor item.name = item.floor;
item.id = item.floor item.id = item.floor;
}) });
} }
if(payload.type === 'roomNumber') { if(payload.type === "roomNumber") {
res.data.data.list.map(item => { res.data.data.list.map(item => {
item.name = item.houseCode item.name = item.houseCode;
item.id = item.houseId item.id = item.houseId;
}) });
} }
commit('UPDATE_FILTER_OPTION_LIST', { commit("UPDATE_FILTER_OPTION_LIST", {
type: payload.type, type: payload.type,
list: res.data.data.list list: res.data.data.list
}) });
return res.data.data; return res.data.data;
}) });
} }
}, },
mutations: { mutations: {
SET_GLOBAL_PHONE(state, phone) { SET_GLOBAL_PHONE(state, phone) {
console.log('phone', phone) console.log("phone", phone);
Vue.set(state, 'telephone', phone) Vue.set(state, "telephone", phone);
}, },
GET_SELECT_HOUSE_TYPE(state, data) { GET_SELECT_HOUSE_TYPE(state, data) {
//console.log('data.list', data.list) //console.log('data.list', data.list)
Vue.set(state, data.keyName, data.list) Vue.set(state, data.keyName, data.list);
}, },
UPDATE_LOADING_STATUS(state, status) { UPDATE_LOADING_STATUS(state, status) {
state.loading = status state.loading = status;
//更新全局loading状态 //更新全局loading状态
}, },
UPDATE_STATUS_VISIBLE(state, type) { UPDATE_STATUS_VISIBLE(state, type) {
state.modalData[type].visible = !state.modalData[type].visible state.modalData[type].visible = !state.modalData[type].visible;
}, },
UPDATE_FILTER_HOUSE_OPTION(state, type) { UPDATE_FILTER_HOUSE_OPTION(state, type) {
state.filterOption[type].visible = !state.filterOption[type].visible state.filterOption[type].visible = !state.filterOption[type].visible;
}, },
UPDATE_FILTER_OPTION_LIST(state, payload) { UPDATE_FILTER_OPTION_LIST(state, payload) {
state.filterOption[payload.type].options = payload.list; state.filterOption[payload.type].options = payload.list;
...@@ -321,23 +321,23 @@ export default new Vuex.Store({ ...@@ -321,23 +321,23 @@ export default new Vuex.Store({
// }) // })
}, },
SET_CURRENT_REGION_ID(state, payload) { SET_CURRENT_REGION_ID(state, payload) {
state.regionName = payload.name state.regionName = payload.name;
state.regionId = payload.id; state.regionId = payload.id;
}, },
SET_CURRENT_BUILDINGNUM(state, payload) { SET_CURRENT_BUILDINGNUM(state, payload) {
state.buildNumName = payload.name state.buildNumName = payload.name;
state.buildingNum = payload.id state.buildingNum = payload.id;
}, },
SET_CURRENT_UNIT(state, payload) { SET_CURRENT_UNIT(state, payload) {
state.unitName = payload.name state.unitName = payload.name;
state.unit = payload.id state.unit = payload.id;
}, },
SET_CURRENT_FLOOR(state, payload) { SET_CURRENT_FLOOR(state, payload) {
state.floorName = payload.name state.floorName = payload.name;
state.floor = payload.id state.floor = payload.id;
}, },
SET_CURRENT_HOUSEID(state, payload) { SET_CURRENT_HOUSEID(state, payload) {
state.houseCode = payload.name state.houseCode = payload.name;
state.houseId = payload.id; state.houseId = payload.id;
} }
}, },
......
...@@ -53,42 +53,42 @@ export default { ...@@ -53,42 +53,42 @@ export default {
}, },
actions: { actions: {
activityApplyList( { commit, state }, params) { activityApplyList( { commit, state }, params) {
return api.request("get", api.getURL('activity/findUserActicity'), { return api.request("get", api.getURL("activity/findUserActicity"), {
pn:1, pn:1,
pageSize: 10000 pageSize: 10000
}).then(res => { }).then(res => {
commit('SET_APPLY_ACTIVITY_LIST', res.data.data.list) commit("SET_APPLY_ACTIVITY_LIST", res.data.data.list);
return res; return res;
}) });
}, },
cancelApply( { commit, state }, id) { cancelApply( { commit, state }, id) {
return api.request("get", api.getURL('activity/cancelApply'), { return api.request("get", api.getURL("activity/cancelApply"), {
id, id,
}).then(res => { }).then(res => {
return res; return res;
}) });
}, },
deleteApply( { commit, state }, id) { deleteApply( { commit, state }, id) {
return api.request("get", api.getURL('activity/deleteApply'), { return api.request("get", api.getURL("activity/deleteApply"), {
id, id,
}).then(res => { }).then(res => {
if(res) { if(res) {
res.Toast.success('活动删除成功') res.Toast.success("活动删除成功");
} }
return res; return res;
}) });
}, },
addApplyOther( { commit, state, rootState }) { addApplyOther( { commit, state, rootState }) {
state.activityForm = Object.assign({}, state.activityForm, state.applyActivityDetailInfo) state.activityForm = Object.assign({}, state.activityForm, state.applyActivityDetailInfo);
delete state.activityForm.id delete state.activityForm.id;
return api.request("post", api.getURL('activity/addApply'), state.activityForm).then(res => { return api.request("post", api.getURL("activity/addApply"), state.activityForm).then(res => {
return res; return res;
}) });
}, },
payAppyCostOnCAPP( { commit, state }, params) { payAppyCostOnCAPP( { commit, state }, params) {
return api.request("post", api.getURL('activity/payAppyCostOnCAPP'), params).then(res => { return api.request("post", api.getURL("activity/payAppyCostOnCAPP"), params).then(res => {
return res; return res;
}) });
}, },
addApply({ commit, state, rootState }) { addApply({ commit, state, rootState }) {
state.activityForm = Object.assign({}, state.activityForm, state.communityActivityDetailInfo); state.activityForm = Object.assign({}, state.activityForm, state.communityActivityDetailInfo);
...@@ -101,18 +101,18 @@ export default { ...@@ -101,18 +101,18 @@ export default {
state.activityForm.applicantHouseId = rootState.loginModule.loginInfo.cappUserInfo.houseId; state.activityForm.applicantHouseId = rootState.loginModule.loginInfo.cappUserInfo.houseId;
state.activityForm.applicantHouseName = rootState.loginModule.loginInfo.cappUserInfo.houseCode; state.activityForm.applicantHouseName = rootState.loginModule.loginInfo.cappUserInfo.houseCode;
//console.log('state.activityForm', state.activityForm) //console.log('state.activityForm', state.activityForm)
state.activityForm.platform = 1 state.activityForm.platform = 1;
return api.request("post", api.getURL("activity/addApply"), state.activityForm).then(res => { return api.request("post", api.getURL("activity/addApply"), state.activityForm).then(res => {
return res; return res;
}) });
}, },
findApplyDetail( { commit, state }, id) { findApplyDetail( { commit, state }, id) {
return api.request("get", api.getURL('activity/findApplyDetail'), { return api.request("get", api.getURL("activity/findApplyDetail"), {
id, id,
}).then(res => { }).then(res => {
commit("SET_APPLY_ACTIVITY_INFO", res.data.data); commit("SET_APPLY_ACTIVITY_INFO", res.data.data);
return res; return res;
}) });
}, },
getCommunityActivityInfo({ commit, state }, payload) { getCommunityActivityInfo({ commit, state }, payload) {
// 社区活动列表 // 社区活动列表
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
Vue.set(state, "communityActivityDetailInfo", data); Vue.set(state, "communityActivityDetailInfo", data);
}, },
SET_APPLY_ACTIVITY_LIST(state, data) { SET_APPLY_ACTIVITY_LIST(state, data) {
console.log('activityList----', data) console.log("activityList----", data);
Vue.set(state, "activityList", data); Vue.set(state, "activityList", data);
}, },
SET_ACTIVITY_LIST_ADD_INFO(state, data) { SET_ACTIVITY_LIST_ADD_INFO(state, data) {
...@@ -164,13 +164,13 @@ export default { ...@@ -164,13 +164,13 @@ export default {
Vue.set(state, "applyActivityDetailInfo", data); Vue.set(state, "applyActivityDetailInfo", data);
}, },
CLEAN_NAME(state,data) { CLEAN_NAME(state,data) {
state.activityForm.applicantName = '' state.activityForm.applicantName = "";
}, },
CLEAN_PHONE(state,data) { CLEAN_PHONE(state,data) {
state.activityForm.applicantPhone = '' state.activityForm.applicantPhone = "";
}, },
CLEAN_APPLY_NUM(state,data) { CLEAN_APPLY_NUM(state,data) {
state.activityForm.activityParticipants = 1 state.activityForm.activityParticipants = 1;
}, },
INTE_NEW_PAY_FORM(state,data){ INTE_NEW_PAY_FORM(state,data){
state.newPayForm.billId = null, state.newPayForm.billId = null,
...@@ -179,7 +179,7 @@ export default { ...@@ -179,7 +179,7 @@ export default {
state.newPayForm.orderAmount = "", state.newPayForm.orderAmount = "",
state.newPayForm.orderTitle = "", state.newPayForm.orderTitle = "",
state.newPayForm.orderType = "", state.newPayForm.orderType = "",
state.newPayForm.remark = "" state.newPayForm.remark = "";
} }
}, },
getters: {} getters: {}
......
...@@ -4,16 +4,16 @@ import api from "@/api/index.js"; ...@@ -4,16 +4,16 @@ import api from "@/api/index.js";
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
title: '我是活动详情nice', title: "我是活动详情nice",
detail: { detail: {
}, },
loading: false, loading: false,
num : '1' num : "1"
}, },
actions: { actions: {
fetchActivityDetail({ commit, state }, ids) { fetchActivityDetail({ commit, state }, ids) {
console.log('fetchActivityDetail--->') console.log("fetchActivityDetail--->");
// return api.request("get", api.getURL("houseLayout/delete"), { // return api.request("get", api.getURL("houseLayout/delete"), {
// ids: ids.join(",") // ids: ids.join(",")
// }); // });
...@@ -22,10 +22,10 @@ export default { ...@@ -22,10 +22,10 @@ export default {
return api.request("get", api.getURL("houseLayout/delete"), { return api.request("get", api.getURL("houseLayout/delete"), {
ids: ids.join(",") ids: ids.join(",")
}).then((res) => { }).then((res) => {
console.log('后端返回的数据', res) console.log("后端返回的数据", res);
commit('CHANGE_ACTIVITY_DETAIL', res) commit("CHANGE_ACTIVITY_DETAIL", res);
return res; return res;
}) });
}, },
}, },
mutations: { mutations: {
...@@ -36,7 +36,7 @@ export default { ...@@ -36,7 +36,7 @@ export default {
state.detail = data; state.detail = data;
}, },
CHANGE_TITLE_TXT(state) { CHANGE_TITLE_TXT(state) {
state.title = Date.now() state.title = Date.now();
}, },
CHANGE_NUM(state) { CHANGE_NUM(state) {
state.num ++; state.num ++;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
//9.复审不通过 10.待支付 11.待缴费 12.交易关闭 13.待退款 14.已退款 15.支付失效 //9.复审不通过 10.待支付 11.待缴费 12.交易关闭 13.待退款 14.已退款 15.支付失效
import Vue from "vue"; import Vue from "vue";
import api from "@/api/index.js"; import api from "@/api/index.js";
import store from '@/utils/store' import store from "@/utils/store";
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
...@@ -15,9 +15,9 @@ export default { ...@@ -15,9 +15,9 @@ export default {
education: "", education: "",
spousePhone: "", spousePhone: "",
spouseCardCode: "", spouseCardCode: "",
spouseSex: '1', spouseSex: "1",
company:'', company:"",
regionId:'' regionId:""
}, },
applyList: [], applyList: [],
applyDetail: {}, applyDetail: {},
...@@ -28,19 +28,19 @@ export default { ...@@ -28,19 +28,19 @@ export default {
depositForm:{ depositForm:{
businessId:0, businessId:0,
orderAmount:0,  orderAmount:0, 
orderTitle:'选房定金',  orderTitle:"选房定金", 
orderType:4,  orderType:4, 
remark:'',  remark:"", 
wxCode:'' wxCode:""
} }
}, },
actions: { actions: {
cancelApply( { commit, state }, id) { cancelApply( { commit, state }, id) {
return api.request("get", api.getURL('cAPPHouse/applyLiveCancel'), { return api.request("get", api.getURL("cAPPHouse/applyLiveCancel"), {
id, id,
}).then(res => { }).then(res => {
return res; return res;
}) });
}, },
applyLiveDetail({ commit, state }, id) { applyLiveDetail({ commit, state }, id) {
return api return api
...@@ -86,8 +86,8 @@ export default { ...@@ -86,8 +86,8 @@ export default {
}); });
}, },
commitApply({ commit, state }, params) { commitApply({ commit, state }, params) {
let imgs = state.applyInfo.liveProps let imgs = state.applyInfo.liveProps;
state.applyInfo = Object.assign({}, state.applyInfo, store('applyInfo')) state.applyInfo = Object.assign({}, state.applyInfo, store("applyInfo"));
state.applyInfo.applicantPhone = state.applyInfo.phone; state.applyInfo.applicantPhone = state.applyInfo.phone;
delete state.applyInfo.id; delete state.applyInfo.id;
delete state.applyInfo.flag; delete state.applyInfo.flag;
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
return api return api
.request("post", api.getURL("scanningPay/selHouseOrder"),depositForm) .request("post", api.getURL("scanningPay/selHouseOrder"),depositForm)
.then(res => { .then(res => {
console.log('deposit-',res.data) console.log("deposit-",res.data);
return res; return res;
}); });
}, },
...@@ -130,19 +130,19 @@ export default { ...@@ -130,19 +130,19 @@ export default {
mutations: { mutations: {
INIT_DATA_STATUS(state, data) {}, INIT_DATA_STATUS(state, data) {},
SET_APPLY_OCCUPATION(state, data) { SET_APPLY_OCCUPATION(state, data) {
state.applyInfo.occupation = data state.applyInfo.occupation = data;
}, },
SET_APPLY_EDUCATION(state, data) { SET_APPLY_EDUCATION(state, data) {
state.applyInfo.education = data state.applyInfo.education = data;
}, },
SET_APPLY_REGIONID(state, data) { SET_APPLY_REGIONID(state, data) {
state.applyInfo.regionId = data state.applyInfo.regionId = data;
}, },
SET_APPLY_INFO(state, data) { SET_APPLY_INFO(state, data) {
let loginInfo = store('login') let loginInfo = store("login");
state.applyInfo = Object.assign({}, state.applyInfo, data); state.applyInfo = Object.assign({}, state.applyInfo, data);
if(!state.applyInfo.userName) { if(!state.applyInfo.userName) {
state.applyInfo.userName = loginInfo.zhName state.applyInfo.userName = loginInfo.zhName;
} }
console.log("state.applyInfo-->", state.applyInfo); console.log("state.applyInfo-->", state.applyInfo);
}, },
...@@ -155,13 +155,13 @@ export default { ...@@ -155,13 +155,13 @@ export default {
spouseName: "", spouseName: "",
spousePhone: "", spousePhone: "",
spouseCardCode: "", spouseCardCode: "",
spouseSex: '1', spouseSex: "1",
regionId:'' regionId:""
} };
}, },
ADD_IMG_INFO(state, data) { ADD_IMG_INFO(state, data) {
state.applyInfo.liveProps.push(data); state.applyInfo.liveProps.push(data);
console.log('state.applyInfo.liveProps--',state.applyInfo.liveProps) console.log("state.applyInfo.liveProps--",state.applyInfo.liveProps);
}, },
REMOVE_IMG_INFO(state, url) { REMOVE_IMG_INFO(state, url) {
let targetIndex = 0; let targetIndex = 0;
...@@ -177,13 +177,13 @@ export default { ...@@ -177,13 +177,13 @@ export default {
}, },
CHANGE_APPLY_DETAIL_STATUS(state, status) { CHANGE_APPLY_DETAIL_STATUS(state, status) {
state.applyDetail.status = 8; state.applyDetail.status = 8;
state.applyDetail.cancelTime = Date.now() state.applyDetail.cancelTime = Date.now();
}, },
SET_APPLY_DETAIL(state, data) { SET_APPLY_DETAIL(state, data) {
Vue.set(state, "applyDetail", data); Vue.set(state, "applyDetail", data);
}, },
SET_APPLY_MARRYSTATUS(state, data) { SET_APPLY_MARRYSTATUS(state, data) {
state.applyInfo.marryStatus = data state.applyInfo.marryStatus = data;
} }
}, },
getters: {} getters: {}
......
...@@ -36,12 +36,12 @@ export default { ...@@ -36,12 +36,12 @@ export default {
if(res) { if(res) {
//console.log(res.data) //console.log(res.data)
commit('SET_CURRENT_BILL_INFO', res.data.data) commit("SET_CURRENT_BILL_INFO", res.data.data);
state.payForm.billId = res.data.data.id; state.payForm.billId = res.data.data.id;
state.payForm.mustGetMoney = res.data.data.mustGetMoney; state.payForm.mustGetMoney = res.data.data.mustGetMoney;
}else { }else {
//console.log('未绑定房源20000') //console.log('未绑定房源20000')
commit('SET_CURRENT_BILL_INFO', '') commit("SET_CURRENT_BILL_INFO", "");
} }
return res; return res;
}); });
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
// } // }
// }) // })
//console.log(state.billList) //console.log(state.billList)
commit('SET_ALL_BILL_INFO', res.data.data) commit("SET_ALL_BILL_INFO", res.data.data);
} }
return res; return res;
}); });
...@@ -73,12 +73,12 @@ export default { ...@@ -73,12 +73,12 @@ export default {
).then(res => { ).then(res => {
//console.log(res.data) //console.log(res.data)
if(res) { if(res) {
commit('SET_USER_BILL_DETAIL_INFO', res.data.data) commit("SET_USER_BILL_DETAIL_INFO", res.data.data);
state.payForm.billId = res.data.data.id; state.payForm.billId = res.data.data.id;
state.payForm.mustGetMoney = res.data.data.mustGetMoney; state.payForm.mustGetMoney = res.data.data.mustGetMoney;
}else { }else {
//console.log('未绑定房源20000') //console.log('未绑定房源20000')
commit('SET_USER_BILL_DETAIL_INFO', '') commit("SET_USER_BILL_DETAIL_INFO", "");
} }
return res; return res;
}); });
...@@ -124,29 +124,29 @@ export default { ...@@ -124,29 +124,29 @@ export default {
}, },
mutations: { mutations: {
SET_CURRENT_BILL_INFO(state, data) { SET_CURRENT_BILL_INFO(state, data) {
Vue.set(state,'userCurrentBillInfo',data) Vue.set(state,"userCurrentBillInfo",data);
}, },
SET_USER_BILL_DETAIL_INFO(state, data) { SET_USER_BILL_DETAIL_INFO(state, data) {
Vue.set(state,'userBillDetailInfo',data) Vue.set(state,"userBillDetailInfo",data);
}, },
SET_COUPON_PRICE(state,data) { SET_COUPON_PRICE(state,data) {
Vue.set(state,'couponPrice',data) Vue.set(state,"couponPrice",data);
}, },
SET_ALL_BILL_INFO(state,data) { SET_ALL_BILL_INFO(state,data) {
Vue.set(state,'allBillListInfo',data) Vue.set(state,"allBillListInfo",data);
}, },
SET_COUPON_FEE(state,payMinus) { SET_COUPON_FEE(state,payMinus) {
state.payForm.payMinus = payMinus state.payForm.payMinus = payMinus;
}, },
SET_COUPON_ID(state,couponId) { SET_COUPON_ID(state,couponId) {
state.payForm.couponId = couponId state.payForm.couponId = couponId;
}, },
SET_ACTUALGETMONEY(state, actualGetMoney){ SET_ACTUALGETMONEY(state, actualGetMoney){
state.payForm.actualGetMoney = actualGetMoney state.payForm.actualGetMoney = actualGetMoney;
}, },
CLEAN_COUPONPRICE(state, couponPrice) { CLEAN_COUPONPRICE(state, couponPrice) {
state.couponPrice = 0 state.couponPrice = 0;
}, },
INTE_NEW_PAY_FORM(state,data){ INTE_NEW_PAY_FORM(state,data){
state.newPayForm.billId = null, state.newPayForm.billId = null,
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
state.newPayForm.orderAmount = "", state.newPayForm.orderAmount = "",
state.newPayForm.orderTitle = "", state.newPayForm.orderTitle = "",
state.newPayForm.orderType = "", state.newPayForm.orderType = "",
state.newPayForm.remark = "" state.newPayForm.remark = "";
} }
......
...@@ -5,31 +5,31 @@ import store from "@/utils/store.js"; ...@@ -5,31 +5,31 @@ import store from "@/utils/store.js";
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
info: store('bindHouseInfo'), info: store("bindHouseInfo"),
houseInfo: store('houseInfo'), houseInfo: store("houseInfo"),
myInfo: { myInfo: {
} }
}, },
actions: { actions: {
checkLiveWith( { commit, state }, id) { checkLiveWith( { commit, state }, id) {
return api.request("get", api.getURL('cAPPHouse/checkLiveWith'), { return api.request("get", api.getURL("cAPPHouse/checkLiveWith"), {
id id
}).then(res => { }).then(res => {
return res; return res;
}) });
}, },
deleteLiveWith( { commit, state }, id) { deleteLiveWith( { commit, state }, id) {
return api.request("get", api.getURL('cAPPHouse/deleteLiveWith'), { return api.request("get", api.getURL("cAPPHouse/deleteLiveWith"), {
id, id,
}).then(res => { }).then(res => {
return res; return res;
}) });
}, },
outBindHouse( { commit, state }, params) { outBindHouse( { commit, state }, params) {
return api.request("get", api.getURL('customer/outBindHouse')).then(res => { return api.request("get", api.getURL("customer/outBindHouse")).then(res => {
return res; return res;
}) });
}, },
bindHouseFirst({ commit, state }, userInfo) { bindHouseFirst({ commit, state }, userInfo) {
return api.request("post", api.getURL("customer/bindHouseFirst"), userInfo).then(res => { return api.request("post", api.getURL("customer/bindHouseFirst"), userInfo).then(res => {
...@@ -43,16 +43,16 @@ export default { ...@@ -43,16 +43,16 @@ export default {
}).then(res => { }).then(res => {
//commit('INIT_BIND_HOUSE_INFO', res.data.data) //commit('INIT_BIND_HOUSE_INFO', res.data.data)
return res; return res;
}) });
}, },
viewHouseInfo( { commit, state, rootState }, params) { viewHouseInfo( { commit, state, rootState }, params) {
return api.request("get", api.getURL('customer/myHouseInfo')).then(res => { return api.request("get", api.getURL("customer/myHouseInfo")).then(res => {
if(res) { if(res) {
commit('INIT_SELF_INFO', res.data.data) commit("INIT_SELF_INFO", res.data.data);
rootState.loginModule.loginInfo.cappUserInfo = res.data.data rootState.loginModule.loginInfo.cappUserInfo = res.data.data;
} }
return res; return res;
}) });
} }
}, },
mutations: { mutations: {
...@@ -60,19 +60,19 @@ export default { ...@@ -60,19 +60,19 @@ export default {
}, },
INIT_BIND_HOUSE_INFO(state, data) { INIT_BIND_HOUSE_INFO(state, data) {
data.houseInfo.normalStartTime = new Date(data.houseInfo.liveStartTime).Format('yyyy/MM/dd') data.houseInfo.normalStartTime = new Date(data.houseInfo.liveStartTime).Format("yyyy/MM/dd");
data.houseInfo.normalEndTime = new Date(data.houseInfo.liveEndTime).Format('yyyy/MM/dd') data.houseInfo.normalEndTime = new Date(data.houseInfo.liveEndTime).Format("yyyy/MM/dd");
//console.log('data.houseInfo.normalEndTime-->', data.houseInfo.normalEndTime) //console.log('data.houseInfo.normalEndTime-->', data.houseInfo.normalEndTime)
data.houseInfo.outputDate = data.houseInfo.normalStartTime + ' - ' + data.houseInfo.normalEndTime data.houseInfo.outputDate = data.houseInfo.normalStartTime + " - " + data.houseInfo.normalEndTime;
data.houseInfo.fullName = `${data.houseInfo.regionName} ${data.houseInfo.houseCode.slice(0, 2)}${data.houseInfo.houseCode.slice(2)}` data.houseInfo.fullName = `${data.houseInfo.regionName} ${data.houseInfo.houseCode.slice(0, 2)}${data.houseInfo.houseCode.slice(2)}`;
Vue.set(state, 'info', data) Vue.set(state, "info", data);
Vue.set(state, 'houseInfo', data.houseInfo) Vue.set(state, "houseInfo", data.houseInfo);
store('houseInfo', data.houseInfo) store("houseInfo", data.houseInfo);
store('bindHouseInfo', data) store("bindHouseInfo", data);
}, },
INIT_SELF_INFO(state, data) { INIT_SELF_INFO(state, data) {
Vue.set(state, 'myInfo', data) Vue.set(state, "myInfo", data);
} }
}, },
getters: {} getters: {}
......
import Vue from "vue"; import Vue from "vue";
import api from "@/api/index.js"; import api from "@/api/index.js";
import { Toast } from 'vant'; import { Toast } from "vant";
export default { export default {
namespaced: true, namespaced: true,
...@@ -11,22 +11,22 @@ export default { ...@@ -11,22 +11,22 @@ export default {
findpage({ commit, state }, commonProblem) { findpage({ commit, state }, commonProblem) {
return api.request("get", api.getURL("CommonProblem/cfindpage"), commonProblem).then(res => { return api.request("get", api.getURL("CommonProblem/cfindpage"), commonProblem).then(res => {
if(res) { if(res) {
commit('SET_PROBLEM_LIST', res.data.data.list) commit("SET_PROBLEM_LIST", res.data.data.list);
}else { }else {
setTimeout(() => { setTimeout(() => {
Toast.fail('未登录') Toast.fail("未登录");
}, 500) }, 500);
} }
return res; return res;
}); });
}, },
getDetails({commit,state},details){ getDetails({commit,state},details){
return api.request('get',api.getURL('CommonProblem/cgetDetails'),{ return api.request("get",api.getURL("CommonProblem/cgetDetails"),{
id:details id:details
}).then(res =>{ }).then(res =>{
console.log('sssss',res) console.log("sssss",res);
return res; return res;
}) });
} }
}, },
mutations: { mutations: {
...@@ -34,8 +34,8 @@ export default { ...@@ -34,8 +34,8 @@ export default {
}, },
SET_PROBLEM_LIST(state, data) { SET_PROBLEM_LIST(state, data) {
console.log('---list', data) console.log("---list", data);
Vue.set(state, 'commonProblemList', data) Vue.set(state, "commonProblemList", data);
} }
}, },
getters: {} getters: {}
......
...@@ -14,18 +14,18 @@ export default { ...@@ -14,18 +14,18 @@ export default {
actions: { actions: {
getCouponDetailInfo({ commit, state }, payload) { // 优惠券详情 getCouponDetailInfo({ commit, state }, payload) { // 优惠券详情
return api.request("get", api.getURL("coupon/findCouponDetails"), payload).then(res => { return api.request("get", api.getURL("coupon/findCouponDetails"), payload).then(res => {
commit('SET_LOADING_FLAG',false) commit("SET_LOADING_FLAG",false);
commit('SET_DISABLE_FLAG',false) commit("SET_DISABLE_FLAG",false);
if(res) { if(res) {
commit('SET_COUPON_DETAIL_INFO',res.data.data) commit("SET_COUPON_DETAIL_INFO",res.data.data);
if(res.data.data.getStatus == 0) { if(res.data.data.getStatus === 0) {
state.couponDetailInfo.couponButton = '领取优惠券' state.couponDetailInfo.couponButton = "领取优惠券";
}else if(res.data.data.getStatus == 1) { }else if(res.data.data.getStatus === 1) {
state.couponDetailInfo.couponButton = '未到领用时间' state.couponDetailInfo.couponButton = "未到领用时间";
}else if(res.data.data.getStatus == 2) { }else if(res.data.data.getStatus === 2) {
state.couponDetailInfo.couponButton = '已经过期' state.couponDetailInfo.couponButton = "已经过期";
}else if(res.data.data.getStatus == 3) { }else if(res.data.data.getStatus === 3) {
state.couponDetailInfo.couponButton = '已领完' state.couponDetailInfo.couponButton = "已领完";
} }
} }
return res; return res;
...@@ -33,13 +33,13 @@ export default { ...@@ -33,13 +33,13 @@ export default {
}, },
getCoupon({ commit, state }, payload) { // 领取优惠券 getCoupon({ commit, state }, payload) { // 领取优惠券
return api.request("get", api.getURL("coupon/userGetCoupon"), payload).then(res => { return api.request("get", api.getURL("coupon/userGetCoupon"), payload).then(res => {
commit('SET_LOADING_FLAG',false) commit("SET_LOADING_FLAG",false);
commit('SET_DISABLE_FLAG',true) commit("SET_DISABLE_FLAG",true);
if(res) { if(res) {
res.Toast.success({ res.Toast.success({
duration: 1000, duration: 1000,
message: '领取成功' message: "领取成功"
}); });
...@@ -53,9 +53,9 @@ export default { ...@@ -53,9 +53,9 @@ export default {
return api.request("get", api.getURL("coupon/findUsersCoupons"), payload).then(res => { return api.request("get", api.getURL("coupon/findUsersCoupons"), payload).then(res => {
//console.log('res--',res.data.data.list) //console.log('res--',res.data.data.list)
if(res) { if(res) {
commit('SET_COUPON_LIST_ADD_INFO',res.data.data.list) commit("SET_COUPON_LIST_ADD_INFO",res.data.data.list);
}else { }else {
commit('SET_COUPON_LIST_ADD_INFO',[]) commit("SET_COUPON_LIST_ADD_INFO",[]);
} }
return res; return res;
...@@ -64,16 +64,16 @@ export default { ...@@ -64,16 +64,16 @@ export default {
}, },
mutations: { mutations: {
SET_COUPON_DETAIL_INFO(state,data) { SET_COUPON_DETAIL_INFO(state,data) {
Vue.set(state,'couponDetailInfo',data) Vue.set(state,"couponDetailInfo",data);
}, },
SET_MY_GET_COUPON_INFO(state,data) { SET_MY_GET_COUPON_INFO(state,data) {
Vue.set(state,'myGetCouponInfo',data) Vue.set(state,"myGetCouponInfo",data);
}, },
SET_USE_COUPON_INFO(state,data) { SET_USE_COUPON_INFO(state,data) {
Vue.set(state,'userCouponList',data) Vue.set(state,"userCouponList",data);
}, },
SET_COUPON_LIST_ADD_INFO(state, data) { SET_COUPON_LIST_ADD_INFO(state, data) {
Vue.set(state,'myGetCouponListInfo',data) Vue.set(state,"myGetCouponListInfo",data);
// data.map(item => { // data.map(item => {
// state.myGetCouponListInfo.push(item) // state.myGetCouponListInfo.push(item)
// }) // })
...@@ -82,10 +82,10 @@ export default { ...@@ -82,10 +82,10 @@ export default {
//state.homeProjectListInfo = [...state.homeProjectListInfo, ...data] //state.homeProjectListInfo = [...state.homeProjectListInfo, ...data]
}, },
SET_LOADING_FLAG(state,data) { SET_LOADING_FLAG(state,data) {
Vue.set(state,'loadingFlag',data) Vue.set(state,"loadingFlag",data);
}, },
SET_DISABLE_FLAG(state,data) { SET_DISABLE_FLAG(state,data) {
Vue.set(state,'disable',data) Vue.set(state,"disable",data);
} }
}, },
......
...@@ -10,7 +10,7 @@ export default { ...@@ -10,7 +10,7 @@ export default {
remoteOpen({ commit, state }, payload) { //智能门开锁 remoteOpen({ commit, state }, payload) { //智能门开锁
return api.request("get", api.getURL("device/remoteOpen"),payload).then(res => { return api.request("get", api.getURL("device/remoteOpen"),payload).then(res => {
return res; return res;
}) });
}, },
}, },
mutations: { mutations: {
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
status: 0, status: 0,
systomInfo: "", systomInfo: "",
version: "" version: ""
} };
}, },
CLEAR_COMPLAIN_INFO(state) { CLEAR_COMPLAIN_INFO(state) {
state.complainInfo = { state.complainInfo = {
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
id: 0, id: 0,
remark: "", remark: "",
suggestProps: [] suggestProps: []
} };
}, },
INIT_DATA_STATUS(state, data) {}, INIT_DATA_STATUS(state, data) {},
ADD_IMG_INFO(state, files) { ADD_IMG_INFO(state, files) {
......
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
return api.request("get", api.getURL("Region/findMoreRegions"), payload).then(res => { return api.request("get", api.getURL("Region/findMoreRegions"), payload).then(res => {
// //
if(res) { if(res) {
commit('SET_HOME_PROJECT_LIST_INFO', res.data.data.list) commit("SET_HOME_PROJECT_LIST_INFO", res.data.data.list);
} }
return res; return res;
}); });
...@@ -30,12 +30,12 @@ export default { ...@@ -30,12 +30,12 @@ export default {
if(res) { if(res) {
//console.log(res.data.data.list) //console.log(res.data.data.list)
if(res.data.data.list.length === 1) { if(res.data.data.list.length === 1) {
res.data.data.list.push(res.data.data.list[0],res.data.data.list[0]) res.data.data.list.push(res.data.data.list[0],res.data.data.list[0]);
} }
if(res.data.data.list.length === 2) { if(res.data.data.list.length === 2) {
res.data.data.list.push(res.data.data.list[0]) res.data.data.list.push(res.data.data.list[0]);
} }
commit('SET_HOME_LAYOUT_LIST_INFO', res.data.data.list) commit("SET_HOME_LAYOUT_LIST_INFO", res.data.data.list);
} }
return res; return res;
}); });
...@@ -47,18 +47,18 @@ export default { ...@@ -47,18 +47,18 @@ export default {
}, },
SET_HOME_PROJECT_LIST_ADD_INFO(state, data) { SET_HOME_PROJECT_LIST_ADD_INFO(state, data) {
data.map(item => { data.map(item => {
state.homeAddList.push(item) state.homeAddList.push(item);
}) });
//state.homeProjectListInfo = state.homeProjectListInfo.concat(data) //state.homeProjectListInfo = state.homeProjectListInfo.concat(data)
console.log('state.homeProjectListInfo.length', state.homeAddList.length) console.log("state.homeProjectListInfo.length", state.homeAddList.length);
//state.homeProjectListInfo = [...state.homeProjectListInfo, ...data] //state.homeProjectListInfo = [...state.homeProjectListInfo, ...data]
}, },
SET_HOME_PROJECT_LIST_INFO(state, data) { SET_HOME_PROJECT_LIST_INFO(state, data) {
//[1,2,3] = [4,5,6] //[1,2,3] = [4,5,6]
Vue.set(state, 'homeProjectListInfo', data) Vue.set(state, "homeProjectListInfo", data);
}, },
SET_HOME_LAYOUT_LIST_INFO(state, data) { SET_HOME_LAYOUT_LIST_INFO(state, data) {
Vue.set(state, 'homeLayoutListInfo', data) Vue.set(state, "homeLayoutListInfo", data);
} }
}, },
......
...@@ -33,9 +33,9 @@ export default { ...@@ -33,9 +33,9 @@ export default {
if(res) { if(res) {
// //
if(payload.type === 1) { if(payload.type === 1) {
commit('SET_COLLECTION_REGION_INFO', res.data.data.list) commit("SET_COLLECTION_REGION_INFO", res.data.data.list);
}else { }else {
commit('SET_COLLECTION_LAYOUT_INFO', res.data.data.list) commit("SET_COLLECTION_LAYOUT_INFO", res.data.data.list);
} }
} }
...@@ -49,10 +49,10 @@ export default { ...@@ -49,10 +49,10 @@ export default {
}, },
SET_COLLECTION_REGION_INFO(state, data) { SET_COLLECTION_REGION_INFO(state, data) {
Vue.set(state,"collectionRegionInfo",data) Vue.set(state,"collectionRegionInfo",data);
}, },
SET_COLLECTION_LAYOUT_INFO(state, data) { SET_COLLECTION_LAYOUT_INFO(state, data) {
Vue.set(state,"collectionLayoutInfo",data) Vue.set(state,"collectionLayoutInfo",data);
} }
......
...@@ -13,27 +13,27 @@ export default { ...@@ -13,27 +13,27 @@ export default {
if(res) { if(res) {
res.data.data.imgList = res.data.data.props.filter(item => { res.data.data.imgList = res.data.data.props.filter(item => {
if(item.propCode == 'showImage') { if(item.propCode === "showImage") {
return true; return true;
} }
}) });
res.data.data.supList = res.data.data.props.filter(item => { res.data.data.supList = res.data.data.props.filter(item => {
if(item.propCode == 'suppo') { if(item.propCode === "suppo") {
return true; return true;
} }
}) });
res.data.data.regionToggle = true; res.data.data.regionToggle = true;
if(res.data.data.collectionId != null) { if(res.data.data.collectionId !== null) {
res.data.data.regionToggle = false; res.data.data.regionToggle = false;
} }
if(res.data.data.layoutListPos.length === 1) { if(res.data.data.layoutListPos.length === 1) {
res.data.data.layoutListPos.push(res.data.data.layoutListPos[0],res.data.data.layoutListPos[0]) res.data.data.layoutListPos.push(res.data.data.layoutListPos[0],res.data.data.layoutListPos[0]);
} }
if(res.data.data.layoutListPos.length === 2) { if(res.data.data.layoutListPos.length === 2) {
res.data.data.layoutListPos.push(res.data.data.layoutListPos[0]) res.data.data.layoutListPos.push(res.data.data.layoutListPos[0]);
} }
// //
commit('SET_PROJECT_DETAIL_INFO_INFO', res.data.data) commit("SET_PROJECT_DETAIL_INFO_INFO", res.data.data);
} }
return res; return res;
}); });
...@@ -43,22 +43,22 @@ export default { ...@@ -43,22 +43,22 @@ export default {
if(res) { if(res) {
res.data.data.imgList = res.data.data.prop.filter(item => { res.data.data.imgList = res.data.data.prop.filter(item => {
if(item.propCode == 'showImg') { if(item.propCode === "showImg") {
return true; return true;
} }
}) });
res.data.data.supList = res.data.data.prop.filter(item => { res.data.data.supList = res.data.data.prop.filter(item => {
if(item.propCode == 'suppo') { if(item.propCode === "suppo") {
return true; return true;
} }
}) });
// //
res.data.data.layoutToggle = true; res.data.data.layoutToggle = true;
if(res.data.data.collectionId != null) { if(res.data.data.collectionId !== null) {
res.data.data.layoutToggle = false; res.data.data.layoutToggle = false;
} }
commit('SET_HOUSE_DETAIL_INFO_INFO', res.data.data) commit("SET_HOUSE_DETAIL_INFO_INFO", res.data.data);
} }
return res; return res;
...@@ -71,10 +71,10 @@ export default { ...@@ -71,10 +71,10 @@ export default {
}, },
SET_PROJECT_DETAIL_INFO_INFO(state, data) { SET_PROJECT_DETAIL_INFO_INFO(state, data) {
Vue.set(state, 'projectDetailInfo', data) Vue.set(state, "projectDetailInfo", data);
}, },
SET_HOUSE_DETAIL_INFO_INFO(state, data){ SET_HOUSE_DETAIL_INFO_INFO(state, data){
Vue.set(state, 'houseDetailInfo', data) Vue.set(state, "houseDetailInfo", data);
} }
}, },
......
...@@ -11,39 +11,39 @@ export default { ...@@ -11,39 +11,39 @@ export default {
selectListPriceInfo: [ selectListPriceInfo: [
{ {
price_id:0, price_id:0,
name:'不限' name:"不限"
}, },
{ {
price_id:1, price_id:1,
name:'500元以下' name:"500元以下"
}, },
{ {
price_id:2, price_id:2,
name:'500-1000元' name:"500-1000元"
}, },
{ {
price_id:3, price_id:3,
name:'1000-1500元' name:"1000-1500元"
}, },
{ {
price_id:4, price_id:4,
name:'1500-2000元' name:"1500-2000元"
}, },
{ {
price_id:5, price_id:5,
name:'2000-2500元' name:"2000-2500元"
}, },
{ {
price_id:6, price_id:6,
name:'2500-3000元' name:"2500-3000元"
}, },
{ {
price_id:7, price_id:7,
name:'3000-3500元' name:"3000-3500元"
}, },
{ {
price_id:8, price_id:8,
name:'3500-4000元' name:"3500-4000元"
} }
], ],
}, },
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
if(res) { if(res) {
// //
commit('SET_LAYOUT_REGION_SELECT_INFO', res.data.data) commit("SET_LAYOUT_REGION_SELECT_INFO", res.data.data);
} }
return res; return res;
}); });
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
if(res) { if(res) {
// //
commit('SET_LAYOUT_AREA_SELECT_INFO', res.data.data) commit("SET_LAYOUT_AREA_SELECT_INFO", res.data.data);
} }
return res; return res;
}); });
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
if(res) { if(res) {
// //
commit('SET_LAYOUT_HOUSE_TYPE_SELECT_INFO', res.data.data) commit("SET_LAYOUT_HOUSE_TYPE_SELECT_INFO", res.data.data);
} }
return res; return res;
}); });
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
return api.request("get", api.getURL("houseLayout/findAllOnCApp"), payload).then(res => { return api.request("get", api.getURL("houseLayout/findAllOnCApp"), payload).then(res => {
// //
if(res) { if(res) {
commit('SET_HOME_LAYOUT_LIST_INFO', res.data.data.list) commit("SET_HOME_LAYOUT_LIST_INFO", res.data.data.list);
} }
return res; return res;
}); });
...@@ -95,40 +95,40 @@ export default { ...@@ -95,40 +95,40 @@ export default {
}, },
SET_LAYOUT_REGION_SELECT_INFO(state, data) { //项目下拉数据 SET_LAYOUT_REGION_SELECT_INFO(state, data) { //项目下拉数据
Vue.set(state,"selectListRegionInfo",data) Vue.set(state,"selectListRegionInfo",data);
}, },
SET_LAYOUT_AREA_SELECT_INFO(state,data) { //地区下拉数据 SET_LAYOUT_AREA_SELECT_INFO(state,data) { //地区下拉数据
Vue.set(state,"selectListAreaInfo",data) Vue.set(state,"selectListAreaInfo",data);
}, },
SET_LAYOUT_HOUSE_TYPE_SELECT_INFO(state,data) { //户型下拉数据 SET_LAYOUT_HOUSE_TYPE_SELECT_INFO(state,data) { //户型下拉数据
Vue.set(state,"selectListHouseTypeInfo",data) Vue.set(state,"selectListHouseTypeInfo",data);
}, },
REGION_MARK_SELECTED_ITEM(state, curIndex) { //先清空选中状态,后设置选中状态 REGION_MARK_SELECTED_ITEM(state, curIndex) { //先清空选中状态,后设置选中状态
state.selectListRegionInfo.map(item => { state.selectListRegionInfo.map(item => {
item.selected = false; item.selected = false;
}) });
state.selectListRegionInfo[curIndex].selected = true state.selectListRegionInfo[curIndex].selected = true;
}, },
PRICE_MARK_SELECTED_ITEM(state, curIndex) { PRICE_MARK_SELECTED_ITEM(state, curIndex) {
state.selectListPriceInfo.map(item => { state.selectListPriceInfo.map(item => {
item.selected = false; item.selected = false;
}) });
state.selectListPriceInfo[curIndex].selected = true state.selectListPriceInfo[curIndex].selected = true;
}, },
AREA_MARK_SELECTED_ITEM(state, curIndex) { AREA_MARK_SELECTED_ITEM(state, curIndex) {
state.selectListAreaInfo.map(item => { state.selectListAreaInfo.map(item => {
item.selected = false; item.selected = false;
}) });
state.selectListAreaInfo[curIndex].selected = true state.selectListAreaInfo[curIndex].selected = true;
}, },
HOUSE_MARK_SELECTED_ITEM(state, curIndex) { HOUSE_MARK_SELECTED_ITEM(state, curIndex) {
state.selectListHouseTypeInfo.map(item => { state.selectListHouseTypeInfo.map(item => {
item.selected = false; item.selected = false;
}) });
state.selectListHouseTypeInfo[curIndex].selected = true state.selectListHouseTypeInfo[curIndex].selected = true;
}, },
SET_HOME_LAYOUT_LIST_INFO(state, data) { SET_HOME_LAYOUT_LIST_INFO(state, data) {
Vue.set(state, 'homeLayoutListInfo', data) Vue.set(state, "homeLayoutListInfo", data);
} }
......
...@@ -4,7 +4,7 @@ import api from "@/api/index.js"; ...@@ -4,7 +4,7 @@ import api from "@/api/index.js";
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
house:'', house:"",
regionId: null, regionId: null,
layoutId: null, layoutId: null,
buildingNum: null, buildingNum: null,
...@@ -30,14 +30,14 @@ export default { ...@@ -30,14 +30,14 @@ export default {
data: { data: {
data: state.regionColums data: state.regionColums
} }
} };
} }
return api.request("get", api.getURL("houseSailWebsite/listRegion"), payload).then(res => { return api.request("get", api.getURL("houseSailWebsite/listRegion"), payload).then(res => {
if(res) { if(res) {
// //
console.log(res.data.data) console.log(res.data.data);
commit('SET_REGION_LIST', res.data.data) commit("SET_REGION_LIST", res.data.data);
} }
return res; return res;
}); });
...@@ -49,27 +49,27 @@ export default { ...@@ -49,27 +49,27 @@ export default {
// //
if(res) { if(res) {
// //
commit('SET_LAYOUT_LIST', res.data.data) commit("SET_LAYOUT_LIST", res.data.data);
} }
return res; return res;
}); });
}, },
getBuildingNum( { commit, state }) { getBuildingNum( { commit, state }) {
return api.request("get", api.getURL('cAPPHouse/buildingNumsNotRent'), { return api.request("get", api.getURL("cAPPHouse/buildingNumsNotRent"), {
pn: 1, pn: 1,
pageSize: 30000, pageSize: 30000,
regionId: state.regionId, regionId: state.regionId,
layoutId: state.layoutId layoutId: state.layoutId
}).then(res => { }).then(res => {
if(res && res.data.data.list.length > 0) { if(res && res.data.data.list.length > 0) {
commit('SET_CURRENT_BUILDINGNUM', res.data.data.list[0].buildingNum) commit("SET_CURRENT_BUILDINGNUM", res.data.data.list[0].buildingNum);
} }
commit('SET_BUILD_NUMS', res.data.data.list) commit("SET_BUILD_NUMS", res.data.data.list);
return res; return res;
}) });
}, },
getUnit( { commit, state }) { getUnit( { commit, state }) {
return api.request("get", api.getURL('cAPPHouse/unitsNotRent'), { return api.request("get", api.getURL("cAPPHouse/unitsNotRent"), {
pn: 1, pn: 1,
pageSize: 30000, pageSize: 30000,
regionId: state.regionId, regionId: state.regionId,
...@@ -77,14 +77,14 @@ export default { ...@@ -77,14 +77,14 @@ export default {
buildingNum: state.buildingNum buildingNum: state.buildingNum
}).then(res => { }).then(res => {
if(res && res.data.data.list.length > 0) { if(res && res.data.data.list.length > 0) {
commit('SET_CURRENT_UNIT', res.data.data.list[0].unit) commit("SET_CURRENT_UNIT", res.data.data.list[0].unit);
} }
commit('SET_UNIT_NUMS', res.data.data.list) commit("SET_UNIT_NUMS", res.data.data.list);
return res; return res;
}) });
}, },
getHouseList( { commit, state }, params) { getHouseList( { commit, state }, params) {
return api.request("get", api.getURL('cAPPHouse/housesNotRent'), { return api.request("get", api.getURL("cAPPHouse/housesNotRent"), {
pn: params.currentPage, pn: params.currentPage,
pageSize: 10, pageSize: 10,
regionId: state.regionId, regionId: state.regionId,
...@@ -93,20 +93,20 @@ export default { ...@@ -93,20 +93,20 @@ export default {
unit: state.unit unit: state.unit
}).then(res => { }).then(res => {
if(res && res.data.data.list.length > 0 && !params.isScroll) { if(res && res.data.data.list.length > 0 && !params.isScroll) {
commit('SET_HOUSE_DETAIL', res.data.data.list[0]) commit("SET_HOUSE_DETAIL", res.data.data.list[0]);
} }
if(params.isScroll) { if(params.isScroll) {
commit('SET_SCROLL_HOUSE_LIST', res.data.data.list) commit("SET_SCROLL_HOUSE_LIST", res.data.data.list);
}else { }else {
commit('SET_HOUSE_LIST', res.data.data.list) commit("SET_HOUSE_LIST", res.data.data.list);
} }
return res; return res;
}) });
}, },
chooseHouseCommit( { commit, state, rootState }, params) { chooseHouseCommit( { commit, state, rootState }, params) {
return api.request("post", api.getURL('cAPPHouse/newchooseHouseCommit'), params).then(res => { return api.request("post", api.getURL("cAPPHouse/newchooseHouseCommit"), params).then(res => {
return res; return res;
}) });
} }
}, },
mutations: { mutations: {
...@@ -116,61 +116,61 @@ export default { ...@@ -116,61 +116,61 @@ export default {
SET_REGION_LIST(state, list) { SET_REGION_LIST(state, list) {
list.map(item => { list.map(item => {
item.text = item.name; item.text = item.name;
}) });
Vue.set(state, 'regionColums', list) Vue.set(state, "regionColums", list);
}, },
SET_LAYOUT_LIST(state, list) { SET_LAYOUT_LIST(state, list) {
//console.log('list-->', list) //console.log('list-->', list)
list.map(item => { list.map(item => {
item.text = item.layoutName item.text = item.layoutName;
}) });
Vue.set(state, 'layoutColums', list) Vue.set(state, "layoutColums", list);
}, },
SET_CURRENT_REGION_ID(state, id) { SET_CURRENT_REGION_ID(state, id) {
Vue.set(state, 'regionId', id) Vue.set(state, "regionId", id);
}, },
SET_CURRENT_LAYOUT_ID(state, id) { SET_CURRENT_LAYOUT_ID(state, id) {
Vue.set(state, 'layoutId', id) Vue.set(state, "layoutId", id);
}, },
SET_BUILD_NUMS(state, list) { SET_BUILD_NUMS(state, list) {
list.map(item => { list.map(item => {
item.buildingNumText = item.buildingNum + '栋' item.buildingNumText = item.buildingNum + "栋";
}) });
Vue.set(state, 'buildNums', list) Vue.set(state, "buildNums", list);
}, },
SET_UNIT_NUMS(state, list) { SET_UNIT_NUMS(state, list) {
list.map(item => { list.map(item => {
item.unitText = item.unit + '单元' item.unitText = item.unit + "单元";
}) });
Vue.set(state, 'units', list) Vue.set(state, "units", list);
}, },
SET_CURRENT_BUILDINGNUM(state, num) { SET_CURRENT_BUILDINGNUM(state, num) {
Vue.set(state, 'buildingNum', num) Vue.set(state, "buildingNum", num);
}, },
SET_CURRENT_UNIT(state, unit) { SET_CURRENT_UNIT(state, unit) {
Vue.set(state, 'unit', unit) Vue.set(state, "unit", unit);
}, },
SET_SCROLL_HOUSE_LIST(state, list) { SET_SCROLL_HOUSE_LIST(state, list) {
list.map(item => { list.map(item => {
state.houseList.push(item) state.houseList.push(item);
}) });
}, },
SET_HOUSE_LIST(state, list) { SET_HOUSE_LIST(state, list) {
Vue.set(state, 'houseList', list) Vue.set(state, "houseList", list);
}, },
CLEAR_HOUSE_LIST(state,data) { CLEAR_HOUSE_LIST(state,data) {
state.houseList = [] state.houseList = [];
}, },
CLEAR_BUILDNUMS(state,data) { CLEAR_BUILDNUMS(state,data) {
state.buildNums = [] state.buildNums = [];
}, },
CLEAR_UNINTS(state,data) { CLEAR_UNINTS(state,data) {
state.units = [] state.units = [];
}, },
SET_HOUSE_DETAIL(state, house) { SET_HOUSE_DETAIL(state, house) {
Vue.set(state, 'houseDetail', house) Vue.set(state, "houseDetail", house);
} }
}, },
getters: {} getters: {}
......
...@@ -8,7 +8,7 @@ export default { ...@@ -8,7 +8,7 @@ export default {
imgTab: [], imgTab: [],
sampleRoomDetail: { sampleRoomDetail: {
tabMap: { tabMap: {
'厨房': { "厨房": {
list: [] list: []
} }
} }
...@@ -20,17 +20,17 @@ export default { ...@@ -20,17 +20,17 @@ export default {
pn: 1, pn: 1,
pageSize: 100000 pageSize: 100000
}).then(res => { }).then(res => {
commit('SET_SAMPE_ROOM_LISE', res.data.data.list) commit("SET_SAMPE_ROOM_LISE", res.data.data.list);
return res; return res;
}) });
}, },
findModelDetail( { commit, state }, id) { findModelDetail( { commit, state }, id) {
return api.request("get", api.getURL('houseLayout/findModelDetail'), { return api.request("get", api.getURL("houseLayout/findModelDetail"), {
id id
}).then(res => { }).then(res => {
commit('SET_SAMPLE_ROOM_DETAIL', res.data.data) commit("SET_SAMPLE_ROOM_DETAIL", res.data.data);
return res; return res;
}) });
} }
}, },
mutations: { mutations: {
...@@ -42,34 +42,34 @@ export default { ...@@ -42,34 +42,34 @@ export default {
if(item.houselayouts) { if(item.houselayouts) {
return true; return true;
} }
}) });
console.log('ListRoom-->', ListRoom) console.log("ListRoom-->", ListRoom);
Vue.set(state, 'sampleRoomList', ListRoom) Vue.set(state, "sampleRoomList", ListRoom);
}, },
SET_SAMPLE_ROOM_DETAIL(state, data) { SET_SAMPLE_ROOM_DETAIL(state, data) {
data.tabMap = { data.tabMap = {
}; };
data.prop.map(item => { data.prop.map(item => {
if(item.propCode === 'Sample-room') { if(item.propCode === "Sample-room") {
item.name = item.propName.slice(4) item.name = item.propName.slice(4);
if(!data.tabMap[item.name]) { if(!data.tabMap[item.name]) {
data.tabMap[item.name] = { data.tabMap[item.name] = {
list: [] list: []
} };
//data.tabMap[item.name].list = [] //data.tabMap[item.name].list = []
} }
data.tabMap[item.name].list.push(item) data.tabMap[item.name].list.push(item);
} }
}) });
state.imgTab = []; state.imgTab = [];
for(let key in data.tabMap) { for(let key in data.tabMap) {
state.imgTab.push({ state.imgTab.push({
list: data.tabMap[key].list list: data.tabMap[key].list
}) });
} }
console.log('state.imgTab', state.imgTab) console.log("state.imgTab", state.imgTab);
Vue.set(state, 'sampleRoomDetail', data) Vue.set(state, "sampleRoomDetail", data);
} }
}, },
getters: {} getters: {}
......
import Vue from "vue"; import Vue from "vue";
import api from "@/api/index.js"; import api from "@/api/index.js";
import {Toast} from 'vant'; import {Toast} from "vant";
import store from '@/utils/store'; import store from "@/utils/store";
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
loginInfo: store('login') loginInfo: store("login")
}, },
actions: { actions: {
wxPoneLoginCallBack({ commit, state }, params) { wxPoneLoginCallBack({ commit, state }, params) {
console.log('state.loginInfo.phone', state.loginInfo.phone) console.log("state.loginInfo.phone", state.loginInfo.phone);
if(state.loginInfo.phone) { if(state.loginInfo.phone) {
return; return;
} }
Toast.loading({ Toast.loading({
duration: 0, // continuous display toast duration: 0, // continuous display toast
forbidClick: true, // forbid click background forbidClick: true, // forbid click background
loadingType: 'spinner', loadingType: "spinner",
message: '正在加载登录信息...' message: "正在加载登录信息..."
}) });
return api.request("get", api.getURL('system/wxPoneLoginCallBack'), { return api.request("get", api.getURL("system/wxPoneLoginCallBack"), {
code: params.code, code: params.code,
state: params.state state: params.state
}).then(res => { }).then(res => {
Toast.clear(); Toast.clear();
//console.log('lll-->res', res.data.code, res) //console.log('lll-->res', res.data.code, res)
if(res && res.data.code === 10000) { if(res && res.data.code === 10000) {
commit('INIT_LOGIN_INFO', res.data.data) //初始化登陆信息 commit("INIT_LOGIN_INFO", res.data.data); //初始化登陆信息
} }
return res; return res;
}) });
}, },
wxPoneLoginInfo( { commit, state }, params) { wxPoneLoginInfo( { commit, state }, params) {
console.log('state.loginInfo.phone', state.loginInfo) console.log("state.loginInfo.phone", state.loginInfo);
if(state.loginInfo.phone) { if(state.loginInfo.phone) {
return; return;
} }
return api.request("get", api.getURL('system/wxPoneLoginInfo')).then(res => { return api.request("get", api.getURL("system/wxPoneLoginInfo")).then(res => {
//console.log('lll-->res', res.data.code) //console.log('lll-->res', res.data.code)
if(res && res.data.code === 10000) { if(res && res.data.code === 10000) {
commit('INIT_LOGIN_INFO', res.data.data) //初始化登陆信息 commit("INIT_LOGIN_INFO", res.data.data); //初始化登陆信息
} }
return res; return res;
}) });
}, },
wxLoginInfo( { commit, state }, code) { wxLoginInfo( { commit, state }, code) {
if(state.loginInfo.phone) { if(state.loginInfo.phone) {
return; return;
} }
return api.request("get", api.getURL('system/wxLoginInfo'), { return api.request("get", api.getURL("system/wxLoginInfo"), {
code: code code: code
}).then(res => { }).then(res => {
if(res && res.data.code === 10000) { if(res && res.data.code === 10000) {
commit('INIT_LOGIN_INFO', res.data.data) //初始化登陆信息 commit("INIT_LOGIN_INFO", res.data.data); //初始化登陆信息
} }
return res; return res;
}) });
}, },
wxLogin( { commit, state }) { wxLogin( { commit, state }) {
return api.request("get", api.getURL('system/wxLogin'), { return api.request("get", api.getURL("system/wxLogin"), {
toUrl: 'wx/index.html' toUrl: "wx/index.html"
}).then(res => { }).then(res => {
console.log('wxLogin------->', res) console.log("wxLogin------->", res);
return res; return res;
}) });
}, },
submitPassword( { commit, state }, params) { submitPassword( { commit, state }, params) {
return api.request("post", api.getURL('customer/updatePasswordthird'), params).then(res => { return api.request("post", api.getURL("customer/updatePasswordthird"), params).then(res => {
return res; return res;
}) });
}, },
submitForgetPhoneCode( { commit, state }, info) { submitForgetPhoneCode( { commit, state }, info) {
//console.log('忘记提交验证') //console.log('忘记提交验证')
return api.request("post", api.getURL('customer/updatePasswordSecond'), info).then(res => { return api.request("post", api.getURL("customer/updatePasswordSecond"), info).then(res => {
return res; return res;
}) });
}, },
sendForgetCode( { commit, state }, phone) { sendForgetCode( { commit, state }, phone) {
return api.request("get", api.getURL('customer/updatePasswordSms'), { return api.request("get", api.getURL("customer/updatePasswordSms"), {
phone, phone,
}).then(res => { }).then(res => {
return res; return res;
}) });
}, },
sendLogin({ commit, state, dispatch }, loginInfo) { sendLogin({ commit, state, dispatch }, loginInfo) {
// let lastPage = store('lastPage') // let lastPage = store('lastPage')
...@@ -101,11 +101,14 @@ export default { ...@@ -101,11 +101,14 @@ export default {
return api.request("post", api.getURL("system/login"), loginInfo).then(res => { return api.request("post", api.getURL("system/login"), loginInfo).then(res => {
if(res) { if(res) {
store('hasLogout', false) //location.href = res.data.data
commit('INIT_LOGIN_INFO', res.data.data) //初始化登陆信息 // dispatch('wxPoneLoginInfo').then(over => {
// })
store("hasLogout", false);
commit("INIT_LOGIN_INFO", res.data.data); //初始化登陆信息
} }
return res return res;
}) });
}, },
sendLogout({ commit, state }) { sendLogout({ commit, state }) {
return api return api
...@@ -115,25 +118,25 @@ export default { ...@@ -115,25 +118,25 @@ export default {
}); });
}, },
sendRegister({ commit, state }, payload) { sendRegister({ commit, state }, payload) {
payload.toUrl = "wx/index.html#/bindHouseCheck" payload.toUrl = "wx/index.html#/bindHouseCheck";
return api return api
.request("post", api.getURL("customer/register"), payload) .request("post", api.getURL("customer/register"), payload)
.then(res => { .then(res => {
if(res) { if(res) {
location.href = res.data.data location.href = res.data.data;
} }
return res; return res;
}); });
}, },
sendVerficationCode( { commit, state }, code) { sendVerficationCode( { commit, state }, code) {
return api.request("get", api.getURL('customer/smsverification'), { return api.request("get", api.getURL("customer/smsverification"), {
mobileNumber: code mobileNumber: code
}).then(res => { }).then(res => {
if(res) { if(res) {
Toast.success('验证码发送成功') Toast.success("验证码发送成功");
} }
return res; return res;
}) });
} }
}, },
mutations: { mutations: {
...@@ -142,10 +145,10 @@ export default { ...@@ -142,10 +145,10 @@ export default {
}, },
INIT_LOGIN_INFO(state, data) { INIT_LOGIN_INFO(state, data) {
if(!data.cappUserInfo) { if(!data.cappUserInfo) {
data.cappUserInfo = {} data.cappUserInfo = {};
} }
store('login', data) //设置浏览器缓存 localStorage store("login", data); //设置浏览器缓存 localStorage
Vue.set(state, 'loginInfo', data) Vue.set(state, "loginInfo", data);
}, },
INIT_LOGIN_NAME_CART(state, data) { INIT_LOGIN_NAME_CART(state, data) {
state.loginInfo = Object.assign({}, state.loginInfo, { state.loginInfo = Object.assign({}, state.loginInfo, {
...@@ -153,40 +156,40 @@ export default { ...@@ -153,40 +156,40 @@ export default {
cappUserInfo: { cappUserInfo: {
userName: null userName: null
} }
}) });
store('login', state.loginInfo) store("login", state.loginInfo);
}, },
CHANGE_NICK_NAME(state, name) { CHANGE_NICK_NAME(state, name) {
state.loginInfo.nickname = name state.loginInfo.nickname = name;
store('login', state.loginInfo) store("login", state.loginInfo);
}, },
CLEAR_LOGIN_INFO(state) { CLEAR_LOGIN_INFO(state) {
state.loginInfo = { state.loginInfo = {
cappUserInfo: { cappUserInfo: {
} }
} };
store('login', { store("login", {
cappUserInfo: { cappUserInfo: {
} }
}) });
}, },
CLEAR_LOGIN_HOUSE_INFO(state) { CLEAR_LOGIN_HOUSE_INFO(state) {
state.loginInfo.cappUserInfo = {} state.loginInfo.cappUserInfo = {};
store('login', state.loginInfo) store("login", state.loginInfo);
}, },
SET_LOGIN_HOUSE_INFO(state, data) { SET_LOGIN_HOUSE_INFO(state, data) {
state.loginInfo.cappUserInfo = data state.loginInfo.cappUserInfo = data;
store('login', state.loginInfo) store("login", state.loginInfo);
}, },
SET_LOGIN_HEADE_IMG(state, url) { SET_LOGIN_HEADE_IMG(state, url) {
state.loginInfo.headImg = url state.loginInfo.headImg = url;
store('login', state.loginInfo) store("login", state.loginInfo);
}, },
updateUserInfo(state, data) { updateUserInfo(state, data) {
state.loginInfo = Object.assign({}, state.loginInfo, data) state.loginInfo = Object.assign({}, state.loginInfo, data);
store('login', state.loginInfo) store("login", state.loginInfo);
} }
}, },
getters: {} getters: {}
......
orderStore.js orderStore.js;
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ export default { ...@@ -9,7 +9,7 @@ export default {
actions: { actions: {
updatePassword({ commit, state }, password) { updatePassword({ commit, state }, password) {
return api.request("post", api.getURL("customer/updatePassword"), password).then(res => { return api.request("post", api.getURL("customer/updatePassword"), password).then(res => {
console.log('==>res',res) console.log("==>res",res);
return res; return res;
}); });
}, },
......
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
.then(res => { .then(res => {
return res; return res;
}); });
} else { }
return api return api
.request("get", api.getURL("RepairManage/cAgainMake"), { .request("get", api.getURL("RepairManage/cAgainMake"), {
id: state.repairForm.id, id: state.repairForm.id,
...@@ -195,7 +195,7 @@ export default { ...@@ -195,7 +195,7 @@ export default {
.then(res => { .then(res => {
return res; return res;
}); });
}
}, },
fetchData({ commit, state }, ids) { fetchData({ commit, state }, ids) {
return api.request("get", api.getURL("houseLayout/delete"), { return api.request("get", api.getURL("houseLayout/delete"), {
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
return api.request("get", api.getURL("search/listSelect"), payload).then(res => { return api.request("get", api.getURL("search/listSelect"), payload).then(res => {
if(res) { if(res) {
commit('SET_CLEAN_SEARCH_INFO', res.data.data) commit("SET_CLEAN_SEARCH_INFO", res.data.data);
} }
return res; return res;
...@@ -24,7 +24,7 @@ export default { ...@@ -24,7 +24,7 @@ export default {
}, },
SET_CLEAN_SEARCH_INFO(state, data) { SET_CLEAN_SEARCH_INFO(state, data) {
Vue.set(state,'searchListInfo',data) Vue.set(state,"searchListInfo",data);
}, },
......
...@@ -12,26 +12,26 @@ export default { ...@@ -12,26 +12,26 @@ export default {
}, },
actions: { actions: {
findDetailOnCAPP( { commit, state }, params) { findDetailOnCAPP( { commit, state }, params) {
return api.request("get", api.getURL('systemMsg/findDetailOnCAPP'), params).then(res => { return api.request("get", api.getURL("systemMsg/findDetailOnCAPP"), params).then(res => {
if(res) { if(res) {
commit('SET_SYSTEM_DETAIL_INFO', res.data.data) commit("SET_SYSTEM_DETAIL_INFO", res.data.data);
} }
return res; return res;
}) });
}, },
findAllOnCAPP( { commit, state }, noCache) { findAllOnCAPP( { commit, state }, noCache) {
// if(state.businessList.length > 0 && !noCache) { // if(state.businessList.length > 0 && !noCache) {
// return; // return;
// } // }
return api.request("get", api.getURL('systemMsg/findAllOnCAPP'), { return api.request("get", api.getURL("systemMsg/findAllOnCAPP"), {
pn: 1, pn: 1,
pageSize: 10000 pageSize: 10000
}).then(res => { }).then(res => {
if(res) { if(res) {
commit('SET_SYSTEM_LIST', res.data.data.list) commit("SET_SYSTEM_LIST", res.data.data.list);
} }
return res; return res;
}) });
}, },
businessFindPage({ commit, state }, noCache) { businessFindPage({ commit, state }, noCache) {
// if(state.systemList.length > 0 && !noCache) { // if(state.systemList.length > 0 && !noCache) {
...@@ -43,10 +43,10 @@ export default { ...@@ -43,10 +43,10 @@ export default {
}).then(res => { }).then(res => {
//console.log('res.data.data.list',res.data.data.list) //console.log('res.data.data.list',res.data.data.list)
if(res) { if(res) {
commit('SET_BUSINESS_LIST', res.data.data.list) commit("SET_BUSINESS_LIST", res.data.data.list);
} }
return res; return res;
}) });
}, },
}, },
mutations: { mutations: {
...@@ -54,13 +54,13 @@ export default { ...@@ -54,13 +54,13 @@ export default {
}, },
SET_SYSTEM_DETAIL_INFO(state, data) { SET_SYSTEM_DETAIL_INFO(state, data) {
Vue.set(state, 'systemDetail', data) Vue.set(state, "systemDetail", data);
}, },
SET_BUSINESS_LIST(state, list) { SET_BUSINESS_LIST(state, list) {
Vue.set(state, 'businessList', list) Vue.set(state, "businessList", list);
}, },
SET_SYSTEM_LIST(state, list) { SET_SYSTEM_LIST(state, list) {
Vue.set(state, 'systemList', list) Vue.set(state, "systemList", list);
} }
}, },
getters: {} getters: {}
......
import Vue from "vue"; import Vue from "vue";
import api from "@/api/index.js"; import api from "@/api/index.js";
import store from '@/utils/store'; import store from "@/utils/store";
export default { export default {
namespaced : true, namespaced : true,
state:{ state:{
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
return api.request("get", api.getURL("content/choiceness"), payload).then(res => { return api.request("get", api.getURL("content/choiceness"), payload).then(res => {
if(res) { if(res) {
commit('SET_SELECTION_ACTIVITY_INFO',res.data.data.list) commit("SET_SELECTION_ACTIVITY_INFO",res.data.data.list);
} }
return res; return res;
}); });
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
return api.request("get", api.getURL("content/detail"), payload).then(res => { return api.request("get", api.getURL("content/detail"), payload).then(res => {
if(res) { if(res) {
commit('SET_SELECTION_ACTIVITY_DETAIL_INFO',res.data.data) commit("SET_SELECTION_ACTIVITY_DETAIL_INFO",res.data.data);
let couponList = res.data.data.contentProps; let couponList = res.data.data.contentProps;
// console.log(couponList) // console.log(couponList)
// couponList.map(item => { // couponList.map(item => {
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
return api.request("get", api.getURL("coupon/findCouponDetails"), payload).then(res => { return api.request("get", api.getURL("coupon/findCouponDetails"), payload).then(res => {
if(res) { if(res) {
commit('SET_COUPON_DETAIL_INFO',res.data.data) commit("SET_COUPON_DETAIL_INFO",res.data.data);
} }
return res; return res;
}); });
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
return api.request("get", api.getURL("cAPPHouse/myStewards"), payload).then(res => { return api.request("get", api.getURL("cAPPHouse/myStewards"), payload).then(res => {
if(res) { if(res) {
commit('SET_SERVICE_TEAM_INFO',res.data.data) commit("SET_SERVICE_TEAM_INFO",res.data.data);
} }
return res; return res;
}); });
...@@ -74,8 +74,8 @@ export default { ...@@ -74,8 +74,8 @@ export default {
if(res.data.code === 10000) { if(res.data.code === 10000) {
// console.log(res.data) // console.log(res.data)
commit('SET_CURRENT_ELEWATER_DATAINFO',res.data.data) commit("SET_CURRENT_ELEWATER_DATAINFO",res.data.data);
store('payForm',res.data.data) store("payForm",res.data.data);
} }
return res; return res;
}); });
...@@ -84,12 +84,12 @@ export default { ...@@ -84,12 +84,12 @@ export default {
return api.request("get", api.getURL("WEGMeter/findMeterReding"), payload).then(res => { return api.request("get", api.getURL("WEGMeter/findMeterReding"), payload).then(res => {
//console.log(res.data) //console.log(res.data)
if(res.data.code === 10000){ if(res.data.code === 10000){
if(res.data.data.meterType === '40') { //电表 if(res.data.data.meterType === "40") { //电表
commit('SET_CURRENT_AMMETERBALANCE_DATA',res.data.data.balance) commit("SET_CURRENT_AMMETERBALANCE_DATA",res.data.data.balance);
commit('SET_CURRENT_AMMETERREAD_DATA',res.data.data.thisRead) commit("SET_CURRENT_AMMETERREAD_DATA",res.data.data.thisRead);
}else { }else {
commit('SET_CURRENT_WATERMETERBALANCE_DATA',res.data.data.balance) commit("SET_CURRENT_WATERMETERBALANCE_DATA",res.data.data.balance);
commit('SET_CURRENT_WATERMETERREAD_DATA',res.data.data.thisRead) commit("SET_CURRENT_WATERMETERREAD_DATA",res.data.data.thisRead);
} }
} }
//commit('SET_CURRENT_ELECTRICITY_DATA',res.data.data) //commit('SET_CURRENT_ELECTRICITY_DATA',res.data.data)
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
if(res.data.code === 10000) { if(res.data.code === 10000) {
//console.log(res.data.data) //console.log(res.data.data)
commit('SET_PAYMONEY_RECORD_DATA',res.data.data.list) commit("SET_PAYMONEY_RECORD_DATA",res.data.data.list);
} }
return res; return res;
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
payForm payForm
).then(res => { ).then(res => {
if(res.data.code === 10000) { if(res.data.code === 10000) {
console.log(res.data) console.log(res.data);
//commit('SET_PAYMONEY_RECORD_DATA',res.data.data.list) //commit('SET_PAYMONEY_RECORD_DATA',res.data.data.list)
} }
...@@ -123,55 +123,55 @@ export default { ...@@ -123,55 +123,55 @@ export default {
}, },
mutations: { mutations: {
SET_SELECTION_ACTIVITY_INFO(state,data) { SET_SELECTION_ACTIVITY_INFO(state,data) {
Vue.set(state,'selectionActivityInfo',data) Vue.set(state,"selectionActivityInfo",data);
}, },
SET_SELECTION_ACTIVITY_DETAIL_INFO(state,data) { SET_SELECTION_ACTIVITY_DETAIL_INFO(state,data) {
Vue.set(state,'selectionActivityDetail',data) Vue.set(state,"selectionActivityDetail",data);
}, },
SET_COUPON_DETAIL_INFO(state,data) { SET_COUPON_DETAIL_INFO(state,data) {
//Vue.set(state,'selectionActivityDetail',state.selectionActivityDetail) //Vue.set(state,'selectionActivityDetail',state.selectionActivityDetail)
state.selectionActivityDetail.contentProps.map(item => { state.selectionActivityDetail.contentProps.map(item => {
if(item.propValueInt === data.id) { if(item.propValueInt === data.id) {
item.getStartTime = data.getStartTime item.getStartTime = data.getStartTime;
item.getEndTime = data.getEndTime item.getEndTime = data.getEndTime;
item.couponFee = data.couponFee item.couponFee = data.couponFee;
item.couponNum = data.couponNum item.couponNum = data.couponNum;
item.minimumFee = data.minimumFee item.minimumFee = data.minimumFee;
} }
}) });
}, },
SET_SERVICE_TEAM_INFO(state, data) { SET_SERVICE_TEAM_INFO(state, data) {
Vue.set(state,'serviceTeamInfo',data) Vue.set(state,"serviceTeamInfo",data);
}, },
SET_CURRENT_ELEWATER_DATAINFO(state,data) { SET_CURRENT_ELEWATER_DATAINFO(state,data) {
Vue.set(state,'waterElectricityInfo',data) Vue.set(state,"waterElectricityInfo",data);
}, },
SET_CURRENT_AMMETERBALANCE_DATA(state,data) { SET_CURRENT_AMMETERBALANCE_DATA(state,data) {
state.waterElectricityInfo.ammeterBalance = data state.waterElectricityInfo.ammeterBalance = data;
}, },
SET_CURRENT_AMMETERREAD_DATA(state,data) { SET_CURRENT_AMMETERREAD_DATA(state,data) {
state.waterElectricityInfo.ammeterRead = data state.waterElectricityInfo.ammeterRead = data;
}, },
SET_CURRENT_WATERMETERBALANCE_DATA(state,data) { SET_CURRENT_WATERMETERBALANCE_DATA(state,data) {
state.waterElectricityInfo.watermeterBalance = data state.waterElectricityInfo.watermeterBalance = data;
}, },
SET_CURRENT_WATERMETERREAD_DATA(state,data) { SET_CURRENT_WATERMETERREAD_DATA(state,data) {
state.waterElectricityInfo.watermeterRead = data state.waterElectricityInfo.watermeterRead = data;
}, },
SET_PAYMONEY_RECORD_DATA(state,data) { SET_PAYMONEY_RECORD_DATA(state,data) {
Vue.set(state,'payMoneyRecordData',data) Vue.set(state,"payMoneyRecordData",data);
}, },
CLEAR_PAY_FORM(state,data) { CLEAR_PAY_FORM(state,data) {
state.payForm.billType = "" state.payForm.billType = "";
state.payForm.billTypeName = "" state.payForm.billTypeName = "";
state.payForm.houseCode = "" state.payForm.houseCode = "";
state.payForm.houseId = 0 state.payForm.houseId = 0;
state.payForm.payMoney = 0 state.payForm.payMoney = 0;
state.payForm.payStatus = 0 state.payForm.payStatus = 0;
state.payForm.payWay = 0 state.payForm.payWay = 0;
state.payForm.regionId = 0 state.payForm.regionId = 0;
state.payForm.regionName = "" state.payForm.regionName = "";
} }
}, },
......
...@@ -64,12 +64,12 @@ export default { ...@@ -64,12 +64,12 @@ export default {
}, },
actions: { actions: {
cselectDetail( { commit, state }, id) { cselectDetail( { commit, state }, id) {
return api.request("get", api.getURL('wellCustomer/cselectDetail'), { return api.request("get", api.getURL("wellCustomer/cselectDetail"), {
id, id,
}).then(res => { }).then(res => {
commit('SET_SUBSCRIBE_DETAIL', res.data.data) commit("SET_SUBSCRIBE_DETAIL", res.data.data);
return res; return res;
}) });
}, },
fetchData({ commit, state }, ids) { fetchData({ commit, state }, ids) {
return api.request("get", api.getURL("houseLayout/delete"), { return api.request("get", api.getURL("houseLayout/delete"), {
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
pageSize: 19000 pageSize: 19000
}) })
.then(res => { .then(res => {
commit('SET_SUBSCRIBE_LIST', res.data.data.list) commit("SET_SUBSCRIBE_LIST", res.data.data.list);
return res; return res;
}); });
}, },
...@@ -151,11 +151,11 @@ export default { ...@@ -151,11 +151,11 @@ export default {
state.subscribeForm.planLiveTime = data; state.subscribeForm.planLiveTime = data;
}, },
SET_SUBSCRIBE_LIST(state, data) { SET_SUBSCRIBE_LIST(state, data) {
Vue.set(state, 'subscribeList', data) Vue.set(state, "subscribeList", data);
}, },
SET_SUBSCRIBE_DETAIL(state, data) { SET_SUBSCRIBE_DETAIL(state, data) {
//console.log('-000000', data) //console.log('-000000', data)
Vue.set(state, 'subscribeDetail', data) Vue.set(state, "subscribeDetail", data);
}, },
}, },
getters: {} getters: {}
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
* ------------------------------------------------------------------ * ------------------------------------------------------------------
*/ */
import WeChatAuth from './wechat-auth' import WeChatAuth from "./wechat-auth";
import url from 'url' import url from "url";
import querystring from 'querystring' import querystring from "querystring";
//const setWechatTitle = function(title) { //const setWechatTitle = function(title) {
...@@ -33,44 +33,44 @@ import querystring from 'querystring' ...@@ -33,44 +33,44 @@ import querystring from 'querystring'
export default { export default {
install (Vue, options) { install (Vue, options) {
console.log(options); console.log(options);
let weChatAuth = new WeChatAuth(options) let weChatAuth = new WeChatAuth(options);
let router = options.router let router = options.router;
let store = options.store let store = options.store;
if (!router) return false if (!router) return false;
function urlCodeQueryFilter (code) { function urlCodeQueryFilter (code) {
if (code) { if (code) {
weChatAuth.setAuthCode(code) weChatAuth.setAuthCode(code);
weChatAuth.removeUrlCodeQuery() weChatAuth.removeUrlCodeQuery();
} }
} }
function checkRouterAuth (to, from, next) { function checkRouterAuth (to, from, next) {
let authCode = weChatAuth.getAuthCode() let authCode = weChatAuth.getAuthCode();
if ((!to.meta || !to.meta.wxauth) && !authCode) return true if ((!to.meta || !to.meta.wxauth) && !authCode) return true;
if (!authCode && !weChatAuth.getAccessToken()) { if (!authCode && !weChatAuth.getAccessToken()) {
weChatAuth.openAuthPage(window.location.href) weChatAuth.openAuthPage(window.location.href);
return false return false;
} else if (authCode && !weChatAuth.getAccessToken()) { } else if (authCode && !weChatAuth.getAccessToken()) {
weChatAuth.getCodeCallback(next) weChatAuth.getCodeCallback(next);
return false return false;
} }
return true return true;
} }
function beforeEach (to, from, next) { function beforeEach (to, from, next) {
let query = querystring.parse(url.parse(window.location.href).query) let query = querystring.parse(url.parse(window.location.href).query);
let code = query.code let code = query.code;
//console.log('coded-d-d-d-d->', code) //console.log('coded-d-d-d-d->', code)
urlCodeQueryFilter(code) urlCodeQueryFilter(code);
//setWechatTitle(to.meta.description); //setWechatTitle(to.meta.description);
if (!code && !checkRouterAuth(to, from, next)) { if (!code && !checkRouterAuth(to, from, next)) {
return false return false;
} }
//next() //next()
//store.commit('updateLoadingStatus', {isLoading: true, type: 'load', text: '正在加载'}) //store.commit('updateLoadingStatus', {isLoading: true, type: 'load', text: '正在加载'})
//console.log('toName', to.name); //console.log('toName', to.name);
if(to.name === 'NotFoundView') { if(to.name === "NotFoundView") {
next(); next();
return; return;
} }
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
} }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
beforeEach(to, from, next) beforeEach(to, from, next);
}) });
} }
} };
\ No newline at end of file \ No newline at end of file
class WeChatAuth { class WeChatAuth {
constructor (config) { constructor (config) {
let defaultConfig = { let defaultConfig = {
appid: '', appid: "",
responseType: 'code', responseType: "code",
scope: 'snsapi_base ', scope: "snsapi_base ",
getCodeCallback: () => {} getCodeCallback: () => {}
} };
this.config = Object.assign(defaultConfig, config) this.config = Object.assign(defaultConfig, config);
} }
openAuthPage (redirectUri = window.location.href) { openAuthPage (redirectUri = window.location.href) {
let redirectUriArr = redirectUri.split('#') let redirectUriArr = redirectUri.split("#");
window.sessionStorage.setItem('redirect_path', redirectUriArr[1]) window.sessionStorage.setItem("redirect_path", redirectUriArr[1]);
redirectUri = encodeURIComponent(redirectUriArr[0]) redirectUri = encodeURIComponent(redirectUriArr[0]);
this.removeAccessToken() this.removeAccessToken();
this.removeAuthCode() this.removeAuthCode();
let authPageBaseUri = 'https://open.weixin.qq.com/connect/oauth2/authorize' let authPageBaseUri = "https://open.weixin.qq.com/connect/oauth2/authorize";
let authParams = `?appid=${this.config.appid}&redirect_uri=${redirectUri}&response_type=${this.config.responseType}&scope=${this.config.scope}#wechat_redirect` let authParams = `?appid=${this.config.appid}&redirect_uri=${redirectUri}&response_type=${this.config.responseType}&scope=${this.config.scope}#wechat_redirect`;
window.location.href = authPageBaseUri + authParams window.location.href = authPageBaseUri + authParams;
} }
setAuthCode (code) { setAuthCode (code) {
if (!code) return false if (!code) return false;
window.sessionStorage.setItem('auth_code', code) window.sessionStorage.setItem("auth_code", code);
return true return true;
} }
getAuthCode () { getAuthCode () {
let codeValue = window.sessionStorage.getItem('auth_code') let codeValue = window.sessionStorage.getItem("auth_code");
if (!codeValue) return '' if (!codeValue) return "";
return codeValue return codeValue;
} }
removeAuthCode () { removeAuthCode () {
window.sessionStorage.removeItem('auth_code') window.sessionStorage.removeItem("auth_code");
} }
removeUrlCodeQuery () { removeUrlCodeQuery () {
let location = window.location let location = window.location;
let search = location.search let search = location.search;
if (search) { if (search) {
search = search.substr(1) search = search.substr(1);
} }
let href = location.origin let href = location.origin;
let pathName = location.pathname let pathName = location.pathname;
if (pathName) { if (pathName) {
href += pathName href += pathName;
} }
let searchArr = search.split('&').filter(item => { let searchArr = search.split("&").filter(item => {
if (item.indexOf('code=') !== -1) { if (item.indexOf("code=") !== -1) {
return false return false;
} }
if (item.indexOf('state=') !== -1) { if (item.indexOf("state=") !== -1) {
return false return false;
} }
return true return true;
}) });
if (searchArr.length > 0) { if (searchArr.length > 0) {
href += '?' + searchArr.join('&') href += "?" + searchArr.join("&");
} }
let hash = location.hash let hash = location.hash;
if (hash) { if (hash) {
href += hash href += hash;
} }
window.location.href = href window.location.href = href;
} }
setAccessToken (accessToken) { setAccessToken (accessToken) {
if (!accessToken) return false if (!accessToken) return false;
window.localStorage.setItem('access_token_openid', accessToken) window.localStorage.setItem("access_token_openid", accessToken);
return true return true;
} }
getAccessToken () { getAccessToken () {
return window.localStorage.getItem('access_token_openid') return window.localStorage.getItem("access_token_openid");
} }
removeAccessToken () { removeAccessToken () {
window.localStorage.removeItem('access_token_openid') window.localStorage.removeItem("access_token_openid");
} }
next (next) { next (next) {
let self = this let self = this;
return (accessToken, to) => { return (accessToken, to) => {
if (accessToken) { if (accessToken) {
self.setAccessToken(accessToken) self.setAccessToken(accessToken);
to to
? next(to) ? next(to)
: next() : next();
} else { } else {
self.removeAccessToken() self.removeAccessToken();
to && next(to) to && next(to);
} }
self.removeAuthCode() self.removeAuthCode();
} };
} }
getCodeCallback (next) { getCodeCallback (next) {
return this.config.getCodeCallback(this.getAuthCode(), this.next(next), window.sessionStorage.getItem('redirect_path')) return this.config.getCodeCallback(this.getAuthCode(), this.next(next), window.sessionStorage.getItem("redirect_path"));
} }
} }
export default WeChatAuth export default WeChatAuth;
\ No newline at end of file \ No newline at end of file
export default function(name) { export default function(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg); var r = window.location.search.substr(1).match(reg);
if (r != null) { if (r !== null) {
return unescape(r[2]); return unescape(r[2]);
} }
return null; return null;
......
export default function (namespace, data) { export default function (namespace, data) {
if (arguments.length > 1) { if (arguments.length > 1) {
return localStorage.setItem(namespace, JSON.stringify(data)); return localStorage.setItem(namespace, JSON.stringify(data));
} else { }
var store = localStorage.getItem(namespace); var store = localStorage.getItem(namespace);
return (store && JSON.parse(store)) || {}; return (store && JSON.parse(store)) || {};
}
} }
function sonsTree(obj, arr) { function sonsTree(obj, arr) {
var children = new Array(); var children = new Array();
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
if (arr[i].pId == obj.id) { if (arr[i].pId === obj.id) {
//pid等于加入数组 //pid等于加入数组
sonsTree(arr[i], arr); //递归出子元素 sonsTree(arr[i], arr); //递归出子元素
arr[i].text = arr[i].typeName; arr[i].text = arr[i].typeName;
...@@ -21,7 +21,7 @@ function treeUtils(data) { ...@@ -21,7 +21,7 @@ function treeUtils(data) {
// console.log('2222',data) // console.log('2222',data)
// return; // return;
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
if (data[i].pId == null||data[i].pId==0) { if (data[i].pId === null || data[i].pId === 0) {
//获取父元素 //获取父元素
let o = sonsTree(data[i], data); let o = sonsTree(data[i], data);
o.text = o.typeName; o.text = o.typeName;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
export default { export default {
init: function (data) { init: function (data) {
//this.getToken(); //this.getToken();
console.log('res.data---------->share', data) console.log("res.data---------->share", data);
wx.config({ wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId: data.appid,//appId通过微信服务号后台查看 appId: data.appid,//appId通过微信服务号后台查看
...@@ -13,18 +13,18 @@ export default { ...@@ -13,18 +13,18 @@ export default {
nonceStr: data.noncestr,//生成签名的随机字符串 nonceStr: data.noncestr,//生成签名的随机字符串
signature: data.signature,//签名 signature: data.signature,//签名
jsApiList: [ jsApiList: [
'getLocation', "getLocation",
'openLocation', "openLocation",
'getNetworkType', "getNetworkType",
'onMenuShareTimeline', "onMenuShareTimeline",
'onMenuShareAppMessage' "onMenuShareAppMessage"
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2 ] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
}); });
this._shareDefault = { this._shareDefault = {
title: '赛领公寓', title: "赛领公寓",
desc: '赛领公寓', desc: "赛领公寓",
link: location.href, link: location.href,
imgUrl: 'http://spread.static.diditaxi.com.cn/bus/spread/static/static/img/logo_diditaxi_a918fd1.jpg' imgUrl: "http://spread.static.diditaxi.com.cn/bus/spread/static/static/img/logo_diditaxi_a918fd1.jpg"
}; };
this.initShareMessage(); this.initShareMessage();
this.initShareTimeline(); this.initShareTimeline();
...@@ -42,8 +42,8 @@ export default { ...@@ -42,8 +42,8 @@ export default {
link: _settings.link, // 分享链接 link: _settings.link, // 分享链接
imgUrl: _settings.imgUrl, // 分享图标 imgUrl: _settings.imgUrl, // 分享图标
desc: _settings.desc, // 分享描述 desc: _settings.desc, // 分享描述
type: '', // 分享类型,music、video或link,不填默认为link type: "", // 分享类型,music、video或link,不填默认为link
dataUrl: '', // 如果type是music或video,则要提供数据链接,默认为空 dataUrl: "", // 如果type是music或video,则要提供数据链接,默认为空
success: function () { success: function () {
options.callback && options.callback(); options.callback && options.callback();
// 用户确认分享后执行的回调函数 // 用户确认分享后执行的回调函数
...@@ -86,4 +86,4 @@ export default { ...@@ -86,4 +86,4 @@ export default {
}); });
}); });
} }
} };
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment