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) {
return request({
url: '/app-api/member/login',
method: 'post',
data
})
url: "/app-api/member/login",
method: "post",
data,
});
}
export function reg(data) {
return request({
url: '/app-api/member/reg',
method: 'post',
data
})
url: "/app-api/member/reg",
method: "post",
data,
});
}
export function smsLogin(data) {
return request({
url: '/app-api/member/sms-login',
method: 'post',
data
})
url: "/app-api/member/sms-login",
method: "post",
data,
});
}
export function resetPwd(data) {
return request({
url: '/app-api/member/reset-password',
method: 'post',
data
})
url: "/app-api/member/reset-password",
method: "post",
data,
});
}
export function getInfo(query) {
return request({
url: '/app-api/member/user/get',
method: 'get',
params: query
})
url: "/app-api/member/user/get",
method: "get",
params: query,
});
}
export function getCompanyInfo(query) {
return request({
url: '/app-api/member/user/getCompanyInfo',
method: 'get',
params: query
})
url: "/app-api/member/user/getCompanyInfo",
method: "get",
params: query,
});
}
export function logout() {
return request({
url: '/vue-element-admin/user/logout',
method: 'post'
})
url: "/vue-element-admin/user/logout",
method: "post",
});
}
export function getCode(data) {
return request({
url: '/app-api/member/send-sms-code',
method: 'post',
data
})
url: "/app-api/member/send-sms-code",
method: "post",
data,
});
}
export function updatePwd(data) {
return request({
url: '/app-api/member/update-password',
method: 'post',
data
})
url: "/app-api/member/update-password",
method: "post",
data,
});
}
export function update(data) {
return request({
url: '/app-api/member/user/update',
method: 'put',
data
})
url: "/app-api/member/user/update",
method: "put",
data,
});
}
export function createCompanyInfo(data) {
return request({
url: '/app-api/member/user/createCompanyInfo',
method: 'post',
data
})
url: "/app-api/member/user/createCompanyInfo",
method: "post",
data,
});
}
export function updateCompanyInfo(data) {
return request({
url: '/app-api/member/user/updateCompanyInfo',
method: 'put',
data
})
url: "/app-api/member/user/updateCompanyInfo",
method: "put",
data,
});
}
export function getCountryList(query) {
return request({
url: '/app-api/ecw/country/list-all',
method: 'get',
params: query
})
url: "/app-api/ecw/country/list-all",
method: "get",
params: query,
});
}
export function updateMobile(data) {
return request({
url: '/app-api/member/user/update-mobile',
method: 'post',
data
})
url: "/app-api/member/user/update-mobile",
method: "post",
data,
});
}
export function authIdCard(data) {
return request({
url: '/app-api/member/user/auth-idcard',
method: 'put',
data
})
url: "/app-api/member/user/auth-idcard",
method: "put",
data,
});
}
export function uploadFile(data) {
return request({
url: '/app-api/file/upload',
method: 'post',
data: data
})
url: "/app-api/file/upload",
method: "post",
data: data,
});
}
export function upNamefile(data) {
return request({
url: '/app-api/file/org-name/up',
method: 'post',
data: data
})
url: "/app-api/file/org-name/up",
method: "post",
data: data,
});
}
export function getIdCard(query) {
return request({
url: '/app-api/member/user/get-auth-idcard-info',
method: 'get',
params: query
})
url: "/app-api/member/user/get-auth-idcard-info",
method: "get",
params: query,
});
}
export function updateAvatar(data) {
return request({
url: '/app-api/member/user/new/update-Avatar?avatar=' + data,
method: 'put'
})
url: "/app-api/member/user/new/update-Avatar?avatar=" + data,
method: "put",
});
}
export function sendEmailCode(data) {
return request({
url: '/app-api/member/send-email-code',
method: 'post',
data: data
})
url: "/app-api/member/send-email-code",
method: "post",
data: data,
});
}
export function bindEmail(data) {
return request({
url: '/app-api/member/user/bind-email',
method: 'post',
data: data
})
url: "/app-api/member/user/bind-email",
method: "post",
data: data,
});
}
export function getMark(query) {
return request({
url: '/app-api/member/user/angle-mark',
method: 'get',
params: query
})
url: "/app-api/member/user/angle-mark",
method: "get",
params: query,
});
}
// 重置控货密码
export function resetControlPwd(data) {
return request({
url: '/app-api/member/reset-control-password',
method: 'post',
data
})
url: "/app-api/member/reset-control-password",
method: "post",
data,
});
}
// 检查是否有设置控货密码,按订单id
export function checkControlPwd(orderId) {
return request({
url: '/app-api/order/order-cargo-control/controlPassword/' + orderId,
method: 'get'
})
url: "/app-api/order/order-cargo-control/controlPassword/" + orderId,
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 = {
// 数据字典
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
......@@ -8,7 +8,8 @@ const state = {
avatar: '',
introduction: '',
roles: [],
loginUser: null
loginUser: null,
id: null
}
const mutations = {
......@@ -29,6 +30,9 @@ const mutations = {
},
SET_USER: (state, data) => {
state.loginUser = data
},
SET_ID: (state, id) => {
state.id = id
}
}
......@@ -73,13 +77,14 @@ const actions = {
}
// 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
if (!roles || roles.length <= 0) {
reject('getInfo: roles must be a non-null array!')
}
commit('SET_ID', id)
commit('SET_ROLES', roles)
commit('SET_NAME', 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