Commit acce30d2 authored by zhengyi's avatar zhengyi

Merge branch 'release'

parents 0ffea389 0a21e094
......@@ -2,7 +2,7 @@
NODE_ENV = 'development'
# base api
#VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com'
VUE_APP_BASE_API = 'http://127.0.0.1:48080'
#VUE_APP_BASE_API = 'https://apitest.groupage.cn'
VUE_APP_BASE_API = 'http://apitest.groupage.cn'
VUE_APP_HOME_API = 'https://www.groupage.cn'
\ No newline at end of file
VUE_APP_HOME_API = 'https://apitest.groupage.cn'
......@@ -3,7 +3,7 @@ ENV = 'development'
NODE_ENV = 'development'
# base api
#VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com'
VUE_APP_BASE_API = 'http://127.0.0.1:48080'
#VUE_APP_BASE_API = 'https://apitest.groupage.cn'
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
ENV = 'staging'
# 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'
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() {
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) {
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) {
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) {
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,
});
}
export function memberSystemStatus() {
return request({
url: "/admin-api/member/score-rule/switch/get",
method: "get"
});
}
<template>
<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-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-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-select>
</div>
......@@ -19,7 +19,8 @@ export default {
country: Number,
city: Number,
province: Number,
readonly: Boolean
readonly: Boolean,
inputWidth: String
},
data() {
return {
......@@ -60,20 +61,24 @@ export default {
},
'formData.country'(country) {
this.$emit('countryChange', country)
this.formData.province = null
this.formData.city = null
},
'formData.province'(province) {
this.$emit('provinceChange', province)
this.formData.city = null
}
},
created() {
getListTree({ treeType: 1 }).then(response => {
getListTree({ treeType: 1 }).then(async response => {
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>
This diff is collapsed.
This diff is collapsed.
<template>
<div style="display: flex;justify-content: space-between;align-items: flex-end;">
<div style="display: flex;align-items: flex-end;">
<img src="@/assets/navbar/index.png" alt style="width: 26px;height: 26px;margin-top:12px">
<div
style="display: flex; justify-content: space-between; align-items: flex-end"
>
<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=">">
<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
v-if="item.redirect==='noRedirect'||index==levelList.length-1"
v-if="
item.redirect === 'noRedirect' || index == levelList.length - 1
"
class="no-redirect"
>{{ generateTitle(item.meta.title) }}</span>
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a>
>{{ generateTitle(item.meta.title) }}</span
>
<a v-else @click.prevent="handleLink(item)">{{
generateTitle(item.meta.title)
}}</a>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
</div>
<div>
<el-select v-model="language" size="mini" placeholder="" class="lang" @change="handleSetLanguage">
<div slot="prefix" style="padding: 4px;">
<img src="@/assets/lang.png" style="width:20px;height:20px;">
<el-select
v-model="language"
size="mini"
placeholder=""
class="lang"
@change="handleSetLanguage"
>
<div slot="prefix" style="padding: 4px">
<img src="@/assets/lang.png" style="width: 20px; height: 20px" />
</div>
<el-option
v-for="item in locale"
......@@ -28,110 +48,112 @@
</el-select>
</div>
</div>
</template>
<script>
import { generateTitle } from '@/utils/i18n'
import pathToRegexp from 'path-to-regexp'
import { locale } from '@/api/country'
import { langData } from '@/data/lang'
import { generateTitle } from "@/utils/i18n";
import pathToRegexp from "path-to-regexp";
import { locale } from "@/api/country";
import { langData } from "@/data/lang";
export default {
data() {
return {
levelList: null,
locale: [],
apiLang: '',
langData: langData
}
apiLang: "",
langData: langData,
};
},
computed: {
language: {
get() {
return this.$store.getters.language
return this.$store.getters.language;
},
set(val) {
this.handleSetLanguage(val)
}
}
this.handleSetLanguage(val);
},
},
},
watch: {
$route(route) {
// if you go to the redirect page, do not update the breadcrumbs
if (route.path.startsWith('/redirect/')) {
return
if (route.path.startsWith("/redirect/")) {
return;
}
this.getBreadcrumb()
this.getBreadcrumb();
},
language() {
this.getCode = this.$t('login.getCode')
this.apiLang = this.langData[this.language]
}
this.getCode = this.$t("login.getCode");
this.apiLang = this.langData[this.language];
},
},
created() {
this.apiLang = this.langData[this.language]
this.getBreadcrumb()
locale().then(r => {
this.locale = r.data
})
this.apiLang = this.langData[this.language];
this.getBreadcrumb();
locale().then((r) => {
this.locale = r.data;
});
},
methods: {
generateTitle,
handleSetLanguage(lang) {
this.$i18n.locale = lang
this.$store.dispatch('app/setLanguage', lang)
this.$i18n.locale = lang;
this.$store.dispatch("app/setLanguage", lang);
},
getBreadcrumb() {
// only show routes with meta.title
let matched = this.$route.matched.filter(
item => item.meta && item.meta.title
)
const first = matched[0]
(item) => item.meta && item.meta.title
);
const first = matched[0];
if (!this.isDashboard(first)) {
matched = [{ path: '/dashboard', meta: { title: 'dashboard' }}].concat(
matched = [{ path: "/dashboard", meta: { title: "dashboard" } }].concat(
matched
)
);
}
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) {
const name = route && route.name
const name = route && route.name;
if (!name) {
return false
return false;
}
return name.trim().toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
return (
name.trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase()
);
},
pathCompile(path) {
// To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
const { params } = this.$route
var toPath = pathToRegexp.compile(path)
return toPath(params)
const { params } = this.$route;
var toPath = pathToRegexp.compile(path);
return toPath(params);
},
handleLink(item) {
const { redirect, path } = item
const { redirect, path } = item;
if (redirect) {
this.$router.push(redirect)
return
this.$router.push(redirect);
return;
}
if (item.meta.title == 'dashboard' && process.env.VUE_APP_HOME_API) {
window.open(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);
} else {
this.$router.push(this.pathCompile(path))
}
}
this.$router.push(this.pathCompile(path));
}
}
},
},
};
</script>
<style lang="scss" scoped>
.lang{
.lang {
width: 150px;
::v-deep .el-input__inner{
::v-deep .el-input__inner {
border-radius: 34px;
}
}
......
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.
......@@ -6,7 +6,7 @@
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:label=" isChinese ? item.labelZh : item.labelEn "
:value="item.value"
/>
</el-select>
......@@ -77,6 +77,12 @@ export default {
]
}
},
computed: {
isChinese() {
this.getCode = this.$t("login.getCode");
return this.$i18n.locale === "zh_CN";
},
},
created() {
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