Commit 582ccd04 authored by chenwei's avatar chenwei

Merge branch 'feature' into 'dev'

Feature

See merge request !3
parents 79ebf587 21f6d118
import request from '@/utils/request'
// 获取地址列表
export function addresslist(params) {
return request({
url: '/app-api/member/user-address/member/list',
method: 'get',
params
})
}
// 新增地址信息
export function addressadd(data) {
return request({
url: '/app-api/member/user-address/create',
method: 'post',
data
})
}
// 编辑地址信息
export function addressedit(data) {
return request({
url: '/app-api/member/user-address/update',
method: 'post',
data
})
}
// 根据id获取地址信息
export function addressinfo(params) {
return request({
url: '/app-api/member/user-address/get',
method: 'get',
params
})
}
// 删除地址信息
export function addressdelete(id) {
return request({
url: `/app-api/member/user-address/delete?id=${id}`,
method: 'post'
})
}
import request from "@/utils/request";
// 获取礼品列表
export function integralList(data) {
return request({
url: "/app-api/ecw/reward/list",
method: "post",
data,
});
}
// 获得礼品详情
export function rewardDetails(params) {
return request({
url: "/app-api/ecw/reward/get",
method: "get",
params,
});
}
// 获取网点列表
export function getBranchList(params) {
return request({
url: "/admin-api/ecw/node/get-node-tree-region",
method: "get",
params,
});
}
// 获取积分活动列表
export function integralActivityList(data) {
return request({
url: "/app-api/member/score-rule/list",
method: "post",
data,
});
}
// 获取会员信息
export function getMemberInfo(data) {
return request({
url: `/app-api/member/user-score/info?id=${data.id}`,
method: "post",
data,
});
}
// 获取活动详情
export function integralActivityDetail(data) {
return request({
url: "/app-api/member/score-rule/get",
method: "post",
data,
});
}
//兑换发送验证码
export function exchangeSMSCode(data) {
return request({
url: "/app-api/reward/redeem/send-sms-code",
method: "post",
data,
});
}
//兑换礼品
export function redeemSingleReward(data) {
return request({
url: "/app-api/reward/redeem/single",
method: "post",
data,
});
}
import request from '@/utils/request'
// 获取积分日志列表
export function logList(data) {
return request({
url: '/app-api/member/user-score/log',
method: 'post',
data
})
}
// 获取兑换日志列表 礼品
export function exchangeLogList(data) {
return request({
url: '/app-api/reward/redeem/record/list',
method: 'post',
data
})
}
// 获取礼品详情
export function exchangeLogDetail(data) {
return request({
url: '/app-api/reward/redeem/record/detail',
method: 'post',
data
})
}
import request from '@/utils/request' import request from "@/utils/request";
export function login(data) { export function login(data) {
return request({ return request({
url: '/app-api/member/login', url: "/app-api/member/login",
method: 'post', method: "post",
data data,
}) });
} }
export function reg(data) { export function reg(data) {
return request({ return request({
url: '/app-api/member/reg', url: "/app-api/member/reg",
method: 'post', method: "post",
data data,
}) });
} }
export function smsLogin(data) { export function smsLogin(data) {
return request({ return request({
url: '/app-api/member/sms-login', url: "/app-api/member/sms-login",
method: 'post', method: "post",
data data,
}) });
} }
export function resetPwd(data) { export function resetPwd(data) {
return request({ return request({
url: '/app-api/member/reset-password', url: "/app-api/member/reset-password",
method: 'post', method: "post",
data data,
}) });
} }
export function getInfo(query) { export function getInfo(query) {
return request({ return request({
url: '/app-api/member/user/get', url: "/app-api/member/user/get",
method: 'get', method: "get",
params: query params: query,
}) });
} }
export function getCompanyInfo(query) { export function getCompanyInfo(query) {
return request({ return request({
url: '/app-api/member/user/getCompanyInfo', url: "/app-api/member/user/getCompanyInfo",
method: 'get', method: "get",
params: query params: query,
}) });
} }
export function logout() { export function logout() {
return request({ return request({
url: '/vue-element-admin/user/logout', url: "/vue-element-admin/user/logout",
method: 'post' method: "post",
}) });
} }
export function getCode(data) { export function getCode(data) {
return request({ return request({
url: '/app-api/member/send-sms-code', url: "/app-api/member/send-sms-code",
method: 'post', method: "post",
data data,
}) });
} }
export function updatePwd(data) { export function updatePwd(data) {
return request({ return request({
url: '/app-api/member/update-password', url: "/app-api/member/update-password",
method: 'post', method: "post",
data data,
}) });
} }
export function update(data) { export function update(data) {
return request({ return request({
url: '/app-api/member/user/update', url: "/app-api/member/user/update",
method: 'put', method: "put",
data data,
}) });
} }
export function createCompanyInfo(data) { export function createCompanyInfo(data) {
return request({ return request({
url: '/app-api/member/user/createCompanyInfo', url: "/app-api/member/user/createCompanyInfo",
method: 'post', method: "post",
data data,
}) });
} }
export function updateCompanyInfo(data) { export function updateCompanyInfo(data) {
return request({ return request({
url: '/app-api/member/user/updateCompanyInfo', url: "/app-api/member/user/updateCompanyInfo",
method: 'put', method: "put",
data data,
}) });
} }
export function getCountryList(query) { export function getCountryList(query) {
return request({ return request({
url: '/app-api/ecw/country/list-all', url: "/app-api/ecw/country/list-all",
method: 'get', method: "get",
params: query params: query,
}) });
} }
export function updateMobile(data) { export function updateMobile(data) {
return request({ return request({
url: '/app-api/member/user/update-mobile', url: "/app-api/member/user/update-mobile",
method: 'post', method: "post",
data data,
}) });
} }
export function authIdCard(data) { export function authIdCard(data) {
return request({ return request({
url: '/app-api/member/user/auth-idcard', url: "/app-api/member/user/auth-idcard",
method: 'put', method: "put",
data data,
}) });
} }
export function uploadFile(data) { export function uploadFile(data) {
return request({ return request({
url: '/app-api/file/upload', url: "/app-api/file/upload",
method: 'post', method: "post",
data: data data: data,
}) });
} }
export function upNamefile(data) { export function upNamefile(data) {
return request({ return request({
url: '/app-api/file/org-name/up', url: "/app-api/file/org-name/up",
method: 'post', method: "post",
data: data data: data,
}) });
} }
export function getIdCard(query) { export function getIdCard(query) {
return request({ return request({
url: '/app-api/member/user/get-auth-idcard-info', url: "/app-api/member/user/get-auth-idcard-info",
method: 'get', method: "get",
params: query params: query,
}) });
} }
export function updateAvatar(data) { export function updateAvatar(data) {
return request({ return request({
url: '/app-api/member/user/new/update-Avatar?avatar=' + data, url: "/app-api/member/user/new/update-Avatar?avatar=" + data,
method: 'put' method: "put",
}) });
} }
export function sendEmailCode(data) { export function sendEmailCode(data) {
return request({ return request({
url: '/app-api/member/send-email-code', url: "/app-api/member/send-email-code",
method: 'post', method: "post",
data: data data: data,
}) });
} }
export function bindEmail(data) { export function bindEmail(data) {
return request({ return request({
url: '/app-api/member/user/bind-email', url: "/app-api/member/user/bind-email",
method: 'post', method: "post",
data: data data: data,
}) });
} }
export function getMark(query) { export function getMark(query) {
return request({ return request({
url: '/app-api/member/user/angle-mark', url: "/app-api/member/user/angle-mark",
method: 'get', method: "get",
params: query params: query,
}) });
} }
// 重置控货密码 // 重置控货密码
export function resetControlPwd(data) { export function resetControlPwd(data) {
return request({ return request({
url: '/app-api/member/reset-control-password', url: "/app-api/member/reset-control-password",
method: 'post', method: "post",
data data,
}) });
} }
// 检查是否有设置控货密码,按订单id // 检查是否有设置控货密码,按订单id
export function checkControlPwd(orderId) { export function checkControlPwd(orderId) {
return request({ return request({
url: '/app-api/order/order-cargo-control/controlPassword/' + orderId, url: "/app-api/order/order-cargo-control/controlPassword/" + orderId,
method: 'get' method: "get",
}) });
}
//获取城市
export function getCityListByParent(query) {
return request({
url: "/admin-api/ecw/region/getCityListByParent",
method: "get",
params: query,
});
}
//获取国家
export function getTradeCountryList(query) {
return request({
url: "/admin-api/ecw/region/getTradeCountryList",
method: "get",
params: query,
});
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -15,6 +15,8 @@ const getters = { ...@@ -15,6 +15,8 @@ const getters = {
// 数据字典 // 数据字典
dict_datas: state => state.dict.dictDatas, dict_datas: state => state.dict.dictDatas,
// 用户信息 // 用户信息
loginUser: state => state.user.loginUser loginUser: state => state.user.loginUser,
// 用户id
id: state => state.user.id
} }
export default getters export default getters
...@@ -8,7 +8,8 @@ const state = { ...@@ -8,7 +8,8 @@ const state = {
avatar: '', avatar: '',
introduction: '', introduction: '',
roles: [], roles: [],
loginUser: null loginUser: null,
id: null
} }
const mutations = { const mutations = {
...@@ -29,6 +30,9 @@ const mutations = { ...@@ -29,6 +30,9 @@ const mutations = {
}, },
SET_USER: (state, data) => { SET_USER: (state, data) => {
state.loginUser = data state.loginUser = data
},
SET_ID: (state, id) => {
state.id = id
} }
} }
...@@ -73,13 +77,14 @@ const actions = { ...@@ -73,13 +77,14 @@ const actions = {
} }
// eslint-disable-next-line // eslint-disable-next-line
const { roles, nickname, avatar, introduction } = {...data, roles: ['admin']} const { roles, id, nickname, avatar, introduction } = { ...data, roles: ['admin'] }
// roles must be a non-empty array // roles must be a non-empty array
if (!roles || roles.length <= 0) { if (!roles || roles.length <= 0) {
reject('getInfo: roles must be a non-null array!') reject('getInfo: roles must be a non-null array!')
} }
commit('SET_ID', id)
commit('SET_ROLES', roles) commit('SET_ROLES', roles)
commit('SET_NAME', nickname) commit('SET_NAME', nickname)
localStorage.setItem('nickname', nickname) localStorage.setItem('nickname', nickname)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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