Commit 4a20d3fd by gyfnice

handleEslint

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