Commit acce30d2 authored by zhengyi's avatar zhengyi

Merge branch 'release'

parents 0ffea389 0a21e094
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
NODE_ENV = 'development' NODE_ENV = 'development'
# base api # base api
#VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com' #VUE_APP_BASE_API = 'https://apitest.groupage.cn'
VUE_APP_BASE_API = 'http://127.0.0.1:48080' VUE_APP_BASE_API = 'http://apitest.groupage.cn'
VUE_APP_HOME_API = 'https://www.groupage.cn' VUE_APP_HOME_API = 'https://apitest.groupage.cn'
\ No newline at end of file
...@@ -3,7 +3,7 @@ ENV = 'development' ...@@ -3,7 +3,7 @@ ENV = 'development'
NODE_ENV = 'development' NODE_ENV = 'development'
# base api # base api
#VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com' #VUE_APP_BASE_API = 'https://apitest.groupage.cn'
VUE_APP_BASE_API = 'http://127.0.0.1:48080' VUE_APP_BASE_API = 'http://apitest.groupage.cn'
VUE_APP_HOME_API = 'https://www.groupage.cn' VUE_APP_HOME_API = 'https://apitest.groupage.cn'
...@@ -4,5 +4,6 @@ NODE_ENV = production ...@@ -4,5 +4,6 @@ NODE_ENV = production
ENV = 'staging' ENV = 'staging'
# base api # base api
VUE_APP_BASE_API = '/stage-api' VUE_APP_BASE_API = 'https://api.jd.qipx.top'
VUE_APP_HOME_API = 'https://api.jd.qipx.top'
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"clipboard": "2.0.4", "clipboard": "2.0.4",
"codemirror": "5.45.0", "codemirror": "5.45.0",
"core-js": "3.6.5", "core-js": "3.6.5",
"decimal.js": "^10.4.3",
"driver.js": "0.9.5", "driver.js": "0.9.5",
"dropzone": "5.5.1", "dropzone": "5.5.1",
"echarts": "4.2.1", "echarts": "4.2.1",
......
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'
})
}
...@@ -13,3 +13,11 @@ export function locale() { ...@@ -13,3 +13,11 @@ export function locale() {
method: 'get' method: 'get'
}) })
} }
export function checkCountryCode(params){
return request({
url: '/app-api/ecw/region/check/dest-currency/area-code/',
method: 'get',
params
})
}
...@@ -135,3 +135,20 @@ export function checkKycStatus(query) { ...@@ -135,3 +135,20 @@ export function checkKycStatus(query) {
params: query params: query
}) })
} }
// 获取城市
export function getCityData(query) {
return request({
url: '/app-api/ecw/region/get',
method: 'get',
params: query
})
}
// 获取仓库区域并行国家、城市、仓库列表
export function getGuojiaAndShiAndWarehouseList(query = {}) {
return request({
url: '/app-api/ecw/warehouse/getGuojiaAndShiAndWarehouseList',
method: 'get',
params: query
})
}
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 getWarehouseList(params) {
return request({
url: "/admin-api/member/score-rule/warehouse-tree-region-list",
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,
});
}
// 创建复制记录
export function shareRecordCreate(data) {
return request({
url: "/app-api/member/score-rule/share-record/create",
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
})
}
...@@ -265,3 +265,11 @@ export function getOfferCheck(params) { ...@@ -265,3 +265,11 @@ export function getOfferCheck(params) {
params params
}) })
} }
// 复制订单/my/order/copy/{copyOrderId}
export function copyOrder(copyOrderId) {
return request({
url: '/app-api/my/order/copy/' + copyOrderId,
method: 'post'
})
}
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,
});
}
export function memberSystemStatus() {
return request({
url: "/admin-api/member/score-rule/switch/get",
method: "get"
});
} }
<template> <template>
<div> <div>
<el-select v-model="formData.country" :disabled="readonly"> <el-select v-model="formData.country" :disabled="readonly" :style="{width: inputWidth}">
<el-option v-for="(item) in treeList" :key="item.id" :value="item.id" :label="$l(item, 'title')" /> <el-option v-for="(item) in treeList" :key="item.id" :value="item.id" :label="$l(item, 'title')" />
</el-select> </el-select>
<el-select v-model="formData.province" class="ml-10" :disabled="readonly"> <el-select v-model="formData.province" class="ml-10" :disabled="readonly" :style="{width: inputWidth}">
<el-option v-for="(item) in provinceList" :key="item.id" :value="item.id" :label="$l(item, 'title')" /> <el-option v-for="(item) in provinceList" :key="item.id" :value="item.id" :label="$l(item, 'title')" />
</el-select> </el-select>
<el-select v-model="formData.city" class="ml-10" :disabled="readonly"> <el-select v-model="formData.city" class="ml-10" :disabled="readonly" :style="{width: inputWidth}">
<el-option v-for="(item) in cityList" :key="item.id" :value="item.id" :label="$l(item, 'title')" /> <el-option v-for="(item) in cityList" :key="item.id" :value="item.id" :label="$l(item, 'title')" />
</el-select> </el-select>
</div> </div>
...@@ -19,7 +19,8 @@ export default { ...@@ -19,7 +19,8 @@ export default {
country: Number, country: Number,
city: Number, city: Number,
province: Number, province: Number,
readonly: Boolean readonly: Boolean,
inputWidth: String
}, },
data() { data() {
return { return {
...@@ -60,20 +61,24 @@ export default { ...@@ -60,20 +61,24 @@ export default {
}, },
'formData.country'(country) { 'formData.country'(country) {
this.$emit('countryChange', country) this.$emit('countryChange', country)
this.formData.province = null
this.formData.city = null
}, },
'formData.province'(province) { 'formData.province'(province) {
this.$emit('provinceChange', province) this.$emit('provinceChange', province)
this.formData.city = null
} }
}, },
created() { created() {
getListTree({ treeType: 1 }).then(response => { getListTree({ treeType: 1 }).then(async response => {
this.treeList = response.data this.treeList = response.data
this.formData.country = this.country
await this.$nextTick()
this.formData.province = this.province
await this.$nextTick()
this.formData.city = this.city
}) })
this.formData = {
country: this.country,
province: this.province,
city: this.city
}
} }
} }
</script> </script>
This diff is collapsed.
This diff is collapsed.
<template> <template>
<div style="display: flex;justify-content: space-between;align-items: flex-end;"> <div
<div style="display: flex;align-items: flex-end;"> style="display: flex; justify-content: space-between; align-items: flex-end"
<img src="@/assets/navbar/index.png" alt style="width: 26px;height: 26px;margin-top:12px"> >
<div style="display: flex; align-items: flex-end">
<img
src="@/assets/navbar/index.png"
alt
style="width: 26px; height: 26px; margin-top: 12px"
/>
<el-breadcrumb class="app-breadcrumb" separator=">"> <el-breadcrumb class="app-breadcrumb" separator=">">
<transition-group name="breadcrumb"> <transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path"> <el-breadcrumb-item
v-for="(item, index) in levelList"
:key="item.path"
>
<span <span
v-if="item.redirect==='noRedirect'||index==levelList.length-1" v-if="
item.redirect === 'noRedirect' || index == levelList.length - 1
"
class="no-redirect" class="no-redirect"
>{{ generateTitle(item.meta.title) }}</span> >{{ generateTitle(item.meta.title) }}</span
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a> >
<a v-else @click.prevent="handleLink(item)">{{
generateTitle(item.meta.title)
}}</a>
</el-breadcrumb-item> </el-breadcrumb-item>
</transition-group> </transition-group>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div> <div>
<el-select v-model="language" size="mini" placeholder="" class="lang" @change="handleSetLanguage"> <el-select
<div slot="prefix" style="padding: 4px;"> v-model="language"
<img src="@/assets/lang.png" style="width:20px;height:20px;"> size="mini"
placeholder=""
class="lang"
@change="handleSetLanguage"
>
<div slot="prefix" style="padding: 4px">
<img src="@/assets/lang.png" style="width: 20px; height: 20px" />
</div> </div>
<el-option <el-option
v-for="item in locale" v-for="item in locale"
...@@ -28,110 +48,112 @@ ...@@ -28,110 +48,112 @@
</el-select> </el-select>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { generateTitle } from '@/utils/i18n' import { generateTitle } from "@/utils/i18n";
import pathToRegexp from 'path-to-regexp' import pathToRegexp from "path-to-regexp";
import { locale } from '@/api/country' import { locale } from "@/api/country";
import { langData } from '@/data/lang' import { langData } from "@/data/lang";
export default { export default {
data() { data() {
return { return {
levelList: null, levelList: null,
locale: [], locale: [],
apiLang: '', apiLang: "",
langData: langData langData: langData,
} };
}, },
computed: { computed: {
language: { language: {
get() { get() {
return this.$store.getters.language return this.$store.getters.language;
}, },
set(val) { set(val) {
this.handleSetLanguage(val) this.handleSetLanguage(val);
} },
} },
}, },
watch: { watch: {
$route(route) { $route(route) {
// if you go to the redirect page, do not update the breadcrumbs // if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) { if (route.path.startsWith("/redirect/")) {
return return;
} }
this.getBreadcrumb() this.getBreadcrumb();
}, },
language() { language() {
this.getCode = this.$t('login.getCode') this.getCode = this.$t("login.getCode");
this.apiLang = this.langData[this.language] this.apiLang = this.langData[this.language];
} },
}, },
created() { created() {
this.apiLang = this.langData[this.language] this.apiLang = this.langData[this.language];
this.getBreadcrumb() this.getBreadcrumb();
locale().then(r => { locale().then((r) => {
this.locale = r.data this.locale = r.data;
}) });
}, },
methods: { methods: {
generateTitle, generateTitle,
handleSetLanguage(lang) { handleSetLanguage(lang) {
this.$i18n.locale = lang this.$i18n.locale = lang;
this.$store.dispatch('app/setLanguage', lang) this.$store.dispatch("app/setLanguage", lang);
}, },
getBreadcrumb() { getBreadcrumb() {
// only show routes with meta.title // only show routes with meta.title
let matched = this.$route.matched.filter( let matched = this.$route.matched.filter(
item => item.meta && item.meta.title (item) => item.meta && item.meta.title
) );
const first = matched[0] const first = matched[0];
if (!this.isDashboard(first)) { if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat( matched = [{ path: "/dashboard", meta: { title: "dashboard" } }].concat(
matched matched
) );
} }
this.levelList = matched.filter( this.levelList = matched.filter(
item => item.meta && item.meta.title && item.meta.breadcrumb !== false (item) => item.meta && item.meta.title && item.meta.breadcrumb !== false
) );
console.log("9999", this.levelList);
}, },
isDashboard(route) { isDashboard(route) {
const name = route && route.name const name = route && route.name;
if (!name) { if (!name) {
return false return false;
} }
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase() return (
name.trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase()
);
}, },
pathCompile(path) { pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561 // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route const { params } = this.$route;
var toPath = pathToRegexp.compile(path) var toPath = pathToRegexp.compile(path);
return toPath(params) return toPath(params);
}, },
handleLink(item) { handleLink(item) {
const { redirect, path } = item const { redirect, path } = item;
if (redirect) { if (redirect) {
this.$router.push(redirect) this.$router.push(redirect);
return return;
} }
if (item.meta.title == 'dashboard' && process.env.VUE_APP_HOME_API) { if (item.meta.title == "dashboard" && process.env.VUE_APP_HOME_API) {
window.open(process.env.VUE_APP_HOME_API) window.open(process.env.VUE_APP_HOME_API);
} else { } else {
this.$router.push(this.pathCompile(path)) this.$router.push(this.pathCompile(path));
}
}
} }
} },
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.lang{ .lang {
width: 150px; width: 150px;
::v-deep .el-input__inner{ ::v-deep .el-input__inner {
border-radius: 34px; border-radius: 34px;
} }
} }
......
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.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
:label="item.label" :label=" isChinese ? item.labelZh : item.labelEn "
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
...@@ -77,6 +77,12 @@ export default { ...@@ -77,6 +77,12 @@ export default {
] ]
} }
}, },
computed: {
isChinese() {
this.getCode = this.$t("login.getCode");
return this.$i18n.locale === "zh_CN";
},
},
created() { created() {
this.getList() this.getList()
}, },
......
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