Authored by wenjiekong

地区接口

... ... @@ -123,6 +123,7 @@ exports.getProviceList = (req, res, next) => {
// let uid = '8039836';
console.info(req.query.id);
// 真实数据输出
userService.getProviceList(req.query.id).then(result => {
res.json(result);
... ...
... ... @@ -268,7 +268,7 @@ const getProviceCityInfo = (parentId, checkValue) => {
const getUserInfo = (channel, uid) => {
return co(function*(){
return co(function*() {
let result = yield api.all([
headerModel.requestHeaderData(channel),
... ... @@ -411,7 +411,7 @@ const getUserInfo = (channel, uid) => {
areaCode = result[3].data.area_code || '';
console.info(areaCode);
let proviceOpts = yield getProviceCityInfo(0, areaCode.substr(0, 2)),
cityOpts = [{value: 0, text: '请选择市'}],
areaOpts = [{value: 0, text: '请选择区县'}];
... ... @@ -422,7 +422,7 @@ const getUserInfo = (channel, uid) => {
if (areaCode.length > 4) {
areaOpts = yield getProviceCityInfo(areaCode.substr(0, 4), areaCode);
}
}
finalResult.contactInfo = {
subTitle: '联系信息',
... ... @@ -689,13 +689,13 @@ const isBrandName = (req) => {
code: 200,
message: '',
data: brandInfo
}
}else {
};
} else {
return {
code: 400,
message: '很抱歉,您要添加的品牌不在我们的品牌库中。',
data: ''
}
};
}
});
... ... @@ -704,7 +704,7 @@ const isBrandName = (req) => {
const getProviceList = (pid) => {
return co(function*() {
let proList = yield userApi.getProviceCityInfo(pid);
return proList.data;
})();
};
... ...