From 59ecc56247e01525011933ea1cf9faf45600d2a6 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Tue, 30 Apr 2019 19:47:03 +0800 Subject: [PATCH 001/201] =?UTF-8?q?fix[litemall-wx-api]:=20=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=95=B0=E9=87=8F=E6=A0=A1=E9=AA=8C=E9=9D=9E=E8=B4=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/linlinjava/litemall/wx/web/WxCartController.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCartController.java b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCartController.java index 7be1148b..a478381c 100644 --- a/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCartController.java +++ b/litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxCartController.java @@ -111,6 +111,9 @@ public class WxCartController { if (!ObjectUtils.allNotNull(productId, number, goodsId)) { return ResponseUtil.badArgument(); } + if(number <= 0){ + return ResponseUtil.badArgument(); + } //判断商品是否可以购买 LitemallGoods goods = goodsService.findById(goodsId); @@ -177,6 +180,9 @@ public class WxCartController { if (!ObjectUtils.allNotNull(productId, number, goodsId)) { return ResponseUtil.badArgument(); } + if(number <= 0){ + return ResponseUtil.badArgument(); + } //判断商品是否可以购买 LitemallGoods goods = goodsService.findById(goodsId); @@ -239,6 +245,9 @@ public class WxCartController { if (!ObjectUtils.allNotNull(id, productId, number, goodsId)) { return ResponseUtil.badArgument(); } + if(number <= 0){ + return ResponseUtil.badArgument(); + } //判断是否存在该订单 // 如果不存在,直接返回错误 From e77ce462ee26f9b0eee7afbbe3d49599dd0a7184 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Tue, 30 Apr 2019 22:54:41 +0800 Subject: [PATCH 002/201] =?UTF-8?q?chore[litemall-vue]:=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7=E5=8F=8D=E9=A6=88=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-vue/src/api/api.js | 42 ++- litemall-vue/src/api/goods.js | 40 --- litemall-vue/src/api/order.js | 7 - litemall-vue/src/api/promotion.js | 1 - litemall-vue/src/api/shop.js | 17 -- litemall-vue/src/api/user.js | 44 ---- litemall-vue/src/router/user.js | 6 + litemall-vue/src/store/modules/user.js | 62 +---- litemall-vue/src/views/items/tabbar-class.vue | 6 +- .../src/views/user/module-address/index.vue | 11 +- .../src/views/user/module-feedback/index.vue | 94 +++++++ .../src/views/user/module-help/index.vue | 7 +- .../src/views/user/module-server/index.vue | 2 +- .../src/views/user/refund-list/index.vue | 2 +- .../views/user/user-information-set/index.vue | 8 +- .../user-information-set/set-mobile/index.vue | 242 +++++++++--------- .../set-nickname/index.vue | 116 ++++----- .../set-password/index.vue | 19 +- 18 files changed, 352 insertions(+), 374 deletions(-) delete mode 100755 litemall-vue/src/api/goods.js delete mode 100755 litemall-vue/src/api/order.js delete mode 100755 litemall-vue/src/api/promotion.js delete mode 100755 litemall-vue/src/api/shop.js delete mode 100755 litemall-vue/src/api/user.js create mode 100644 litemall-vue/src/views/user/module-feedback/index.vue diff --git a/litemall-vue/src/api/api.js b/litemall-vue/src/api/api.js index b0fb64cc..64775505 100644 --- a/litemall-vue/src/api/api.js +++ b/litemall-vue/src/api/api.js @@ -43,10 +43,38 @@ export function authLogout() { method: 'post' }) } - +const AuthInfo='wx/auth/info'; //用户信息 +export function authInfo() { + return request({ + url: AuthInfo, + method: 'get' + }) +} +const AuthProfile='wx/auth/profile'; //验证码 +export function authProfile(data) { + return request({ + url: AuthProfile, + method: 'post', + data + }) +} const AuthRegister='wx/auth/register'; //账号注册 const AuthReset='wx/auth/reset'; //账号密码重置 +export function authReset(data) { + return request({ + url: AuthReset, + method: 'post', + data + }) +} const AuthRegisterCaptcha='wx/auth/regCaptcha'; //验证码 +export function authRegisterCaptcha(data) { + return request({ + url: AuthRegisterCaptcha, + method: 'post', + data + }) +} const AuthBindPhone='wx/auth/bindPhone'; //绑定微信手机号 const GoodsCount='wx/goods/count'; //统计商品总数 @@ -282,6 +310,14 @@ const OrderGoods='wx/order/goods'; // 代评价商品信息 const OrderComment='wx/order/comment'; // 评价订单商品信息 const FeedbackAdd='wx/feedback/submit'; //添加反馈 +export function feedbackAdd(data) { + return request({ + url: FeedbackAdd, + method: 'post', + data + }) +} + const FootprintList='wx/footprint/list'; //足迹列表 const FootprintDelete='wx/footprint/delete'; //删除足迹 @@ -350,4 +386,6 @@ export function getList(api, query) { method: 'get', params: query }) -} \ No newline at end of file +} + +export const REFUND_LIST = ''; \ No newline at end of file diff --git a/litemall-vue/src/api/goods.js b/litemall-vue/src/api/goods.js deleted file mode 100755 index a2b25faa..00000000 --- a/litemall-vue/src/api/goods.js +++ /dev/null @@ -1,40 +0,0 @@ -import request from '@/utils/request' - -// export const GOODS_CATEGORY = '/category'; -export const GOODS_CATEGORY = '/wx/catalog/index'; -export const GOODS_CHANNGE_CATEGORY = '/wx/catalog/current?id='; -export const GOODS_SEARCH = '/moreGoods'; -export const GOODS_DETAIL = '/details'; - -export function goodsCategory(query) { - return request({ - url: '/wx/catalog/index', - method: 'get', - params: query - }) -} - -export function goodsChannelCategory(query) { - return request({ - url: '/wx/catalog/index', - method: 'get', - params: query - }) -} - -export function goodsSearch(query) { - return request({ - url: '/wx/catalog/current?id=', - method: 'get', - params: query - }) -} - -export function goodsDetail(query) { - return request({ - url: '/wx/catalog/index', - method: 'get', - params: query - }) -} - \ No newline at end of file diff --git a/litemall-vue/src/api/order.js b/litemall-vue/src/api/order.js deleted file mode 100755 index 885a6e93..00000000 --- a/litemall-vue/src/api/order.js +++ /dev/null @@ -1,7 +0,0 @@ -import request from '@/utils/request' - -export const ORDER_LIST = '/order-list'; - -export const ELE_COUPON_LIST = '/electronic-list'; - -export const REFUND_LIST = '/refund-list'; diff --git a/litemall-vue/src/api/promotion.js b/litemall-vue/src/api/promotion.js deleted file mode 100755 index 543ea86b..00000000 --- a/litemall-vue/src/api/promotion.js +++ /dev/null @@ -1 +0,0 @@ -import request from '@/utils/request' diff --git a/litemall-vue/src/api/shop.js b/litemall-vue/src/api/shop.js deleted file mode 100755 index 2e193590..00000000 --- a/litemall-vue/src/api/shop.js +++ /dev/null @@ -1,17 +0,0 @@ -import request from '@/utils/request' - -export const HOME_module = '/home'; -export const ALL_GOODS = '/moreGoods'; - -export const SHOPINFO = '/shop-info'; - -// 运费模板 -export const POST_FEE = ''; - -export function getHome(query) { - return request({ - url: '/wx/home/index', - method: 'get', - params: query - }) -} diff --git a/litemall-vue/src/api/user.js b/litemall-vue/src/api/user.js deleted file mode 100755 index e4602fce..00000000 --- a/litemall-vue/src/api/user.js +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 登录 -export const USER_LOGIN = '/wx/auth/login'; -export const USER_LOGOUT = ''; - -// 用户信息 -export const USER_PROFILE = '/user-profile'; -export const USER_MODIFY_PASSWORD = ''; -export const USER_CHANGE_MOBILE = ''; - -// 验证码 -export const USER_SENDCODE = ''; - -// 地址 -export const ADDRESS = '/address'; -export const ADDRESS_DEFAULT = '/address-default'; - -// 收藏 -export const GOODS_COLLECT_LIST = '/moreGoods'; - -export function loginByUsername(data) { - return request({ - url: '/wx/auth/login', - method: 'post', - data - }) -} - - -export function logout() { - return request({ - url: '/auth/logout', - method: 'post' - }) -} - -export function getUserInfo(token) { - return request({ - url: '/auth/info', - method: 'get', - params: { token } - }) -} \ No newline at end of file diff --git a/litemall-vue/src/router/user.js b/litemall-vue/src/router/user.js index 4dee465d..a7d09065 100644 --- a/litemall-vue/src/router/user.js +++ b/litemall-vue/src/router/user.js @@ -4,6 +4,7 @@ const UserAddress = () => import('@/views/user/module-address'); const UserAddressEdit = () => import('@/views/user/module-address-edit'); const UserServer = () => import('@/views/user/module-server'); const UserHelp = () => import('@/views/user/module-help'); +const UserFeedback = () => import('@/views/user/module-feedback'); const UserInformation = () => import('@/views/user/user-information-set'); const UserInfo_SetBg = () => import('@/views/user/user-information-set/set-bg'); @@ -61,6 +62,11 @@ export default [ name: 'user-help', component: UserHelp }, + { + path: '/user/feedback', + name: 'user-feedback', + component: UserFeedback + }, { path: '/user/information', name: 'user-information', diff --git a/litemall-vue/src/store/modules/user.js b/litemall-vue/src/store/modules/user.js index 6d5bf63c..6b344ee6 100644 --- a/litemall-vue/src/store/modules/user.js +++ b/litemall-vue/src/store/modules/user.js @@ -1,4 +1,4 @@ -import { loginByUsername, logout, getUserInfo } from '@/api/user' +import { authLoginByAccount, authLogout, authInfo } from '@/api/api' import { getToken, setToken, removeToken } from '@/utils/auth' const user = { @@ -52,7 +52,7 @@ const user = { LoginByUsername({ commit }, userInfo) { const username = userInfo.username.trim() return new Promise((resolve, reject) => { - loginByUsername(username, userInfo.password).then(response => { + authLoginByAccount(username, userInfo.password).then(response => { const token = response.data.data commit('SET_TOKEN', token) setToken(token) @@ -69,12 +69,6 @@ const user = { getUserInfo(state.token).then(response => { const data = response.data.data - if (data.perms && data.perms.length > 0) { // 验证返回的perms是否是一个非空数组 - commit('SET_PERMS', data.perms) - } else { - reject('getInfo: perms must be a non-null array !') - } - commit('SET_ROLES', data.roles) commit('SET_NAME', data.name) commit('SET_AVATAR', data.avatar) @@ -86,60 +80,22 @@ const user = { }) }, - // 第三方验证登录 - // LoginByThirdparty({ commit, state }, code) { - // return new Promise((resolve, reject) => { - // commit('SET_CODE', code) - // loginByThirdparty(state.status, state.email, state.code).then(response => { - // commit('SET_TOKEN', response.data.token) - // setToken(response.data.token) - // resolve() - // }).catch(error => { - // reject(error) - // }) - // }) - // }, - + // 登出 LogOut({ commit, state }) { return new Promise((resolve, reject) => { - logout(state.token).then(() => { - commit('SET_TOKEN', '') - commit('SET_ROLES', []) - commit('SET_PERMS', []) + authLogout(state.token).then(() => { + commit('Authorization', '') + commit('avatar', '') + commit('background_image', []) + commit('nickName', []) + removeToken() resolve() }).catch(error => { reject(error) }) }) - }, - - // 前端 登出 - FedLogOut({ commit }) { - return new Promise(resolve => { - commit('SET_TOKEN', '') - removeToken() - resolve() - }) - }, - - // 动态修改权限 - ChangeRoles({ commit, dispatch }, role) { - return new Promise(resolve => { - commit('SET_TOKEN', role) - setToken(role) - getUserInfo(role).then(response => { - const data = response.data - commit('SET_ROLES', data.roles) - commit('SET_PERMS', data.perms) - commit('SET_NAME', data.name) - commit('SET_AVATAR', data.avatar) - commit('SET_INTRODUCTION', data.introduction) - dispatch('GenerateRoutes', data) // 动态修改权限后 重绘侧边菜单 - resolve() - }) - }) } } } diff --git a/litemall-vue/src/views/items/tabbar-class.vue b/litemall-vue/src/views/items/tabbar-class.vue index 94631ec3..28eb17ab 100755 --- a/litemall-vue/src/views/items/tabbar-class.vue +++ b/litemall-vue/src/views/items/tabbar-class.vue @@ -18,7 +18,7 @@ + + + diff --git a/litemall-vue/src/views/user/module-help/index.vue b/litemall-vue/src/views/user/module-help/index.vue index 716a006f..bcab93d0 100644 --- a/litemall-vue/src/views/user/module-help/index.vue +++ b/litemall-vue/src/views/user/module-help/index.vue @@ -1,6 +1,6 @@ - - + + + + + + diff --git a/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue b/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue index 1482835d..be5017df 100755 --- a/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue +++ b/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue @@ -1,58 +1,58 @@ - - - - - - - + + + + + + + diff --git a/litemall-vue/src/views/user/user-information-set/set-password/index.vue b/litemall-vue/src/views/user/user-information-set/set-password/index.vue index 0cda89a6..81a7a716 100755 --- a/litemall-vue/src/views/user/user-information-set/set-password/index.vue +++ b/litemall-vue/src/views/user/user-information-set/set-password/index.vue @@ -34,7 +34,7 @@ - - - diff --git a/litemall-vue/src/views/home/tabbar-home-sign-board.vue b/litemall-vue/src/views/home/tabbar-home-sign-board.vue deleted file mode 100755 index 4ea0bec1..00000000 --- a/litemall-vue/src/views/home/tabbar-home-sign-board.vue +++ /dev/null @@ -1,69 +0,0 @@ - - - - - diff --git a/litemall-vue/src/views/login/login.vue b/litemall-vue/src/views/login/login.vue index c4868936..6ff4d9c6 100755 --- a/litemall-vue/src/views/login/login.vue +++ b/litemall-vue/src/views/login/login.vue @@ -13,7 +13,6 @@ icon="username" placeholder="请输入测试账号 user123" right-icon="clear-full" - v-validate="'required'" name="user" data-vv-as="帐号" @right-click="clearText" @@ -25,7 +24,6 @@ placeholder="请输入测试密码 user123" :type="visiblePass ? 'text' : 'password'" :right-icon="visiblePass ? 'eye-open' : 'eye-close'" - v-validate="'required'" data-vv-as="密码" name="password" @right-click="visiblePass = !visiblePass" @@ -82,13 +80,8 @@ export default { this.account = ''; }, - async validate() { - const result = await this.$validator.validate(); - if (!result) { - const errMsg = this.errors.items[0].msg; - Toast(errMsg); - throw new Error(`表单验证: ${errMsg}`); - } + validate() { + }, login() { @@ -96,19 +89,22 @@ export default { authLoginByAccount(loginData).then(res => { this.userInfo = res.data.data.userInfo; setLocalStorage({ - Authorization: res.data.data.token + Authorization: res.data.data.token, + avatar: this.userInfo.avatarUrl, + nickName: this.userInfo.nickName }); - this.getUserProfile(); + + this.routerRedirect(); }).catch(error => { Toast.fail(error.data.errmsg); }); }, - async loginSubmit() { + loginSubmit() { this.isLogining = true; try { - await this.validate(); - await this.login(); + this.validate(); + this.login(); this.isLogining = false; } catch (err) { console.log(err.message); @@ -116,19 +112,6 @@ export default { } }, - getUserProfile() { - // const { - // data: { data } - // } = await this.$reqGet(USER_PROFILE); - setLocalStorage({ - avatar: this.userInfo.avatarUrl, - // background_image: data.background_image, - nickName: this.userInfo.nickName - }); - - this.routerRedirect(); - }, - routerRedirect() { // const { query } = this.$route; // this.$router.replace({ diff --git a/litemall-vue/src/views/order/payment/index.vue b/litemall-vue/src/views/order/payment/index.vue index b51a2b02..8b4f87d6 100755 --- a/litemall-vue/src/views/order/payment/index.vue +++ b/litemall-vue/src/views/order/payment/index.vue @@ -41,7 +41,6 @@ import { Radio, RadioGroup, Dialog } from 'vant'; import { orderDetail, orderPrepay } from '@/api/api'; import _ from 'lodash'; -import md5 from 'js-md5'; export default { name: 'payment', diff --git a/litemall-vue/src/views/user/tabbar-user-header.vue b/litemall-vue/src/views/user/tabbar-user-header.vue index 48303068..185df051 100755 --- a/litemall-vue/src/views/user/tabbar-user-header.vue +++ b/litemall-vue/src/views/user/tabbar-user-header.vue @@ -39,20 +39,14 @@ export default { getUserInfo() { const infoData = getLocalStorage( 'nickName', - 'background_image', 'avatar' ); this.avatar = avatar_default; this.nickName = infoData.nickName || '昵称'; - this.background_image = infoData.background_image || bg_default; }, toSetting() { this.$router.push({ name: 'user-information' }); } - // toLogin() { - // !this.isLogin && - // this.$router.push({ name: 'login', query: { redirect: 'user' } }); - // } } }; diff --git a/litemall-vue/src/views/user/tabbar-user.vue b/litemall-vue/src/views/user/tabbar-user.vue index 2699d72a..1d4eb0ab 100755 --- a/litemall-vue/src/views/user/tabbar-user.vue +++ b/litemall-vue/src/views/user/tabbar-user.vue @@ -31,12 +31,6 @@ export default { methods: { quit() { authLogout(); - removeLocalStorage( - 'Authorization', - 'avatar', - 'background_image', - 'nickName' - ); this.$router.push({ name: 'login' }); }, getLoginStatus() { diff --git a/litemall-vue/src/views/user/user-information-set/index.vue b/litemall-vue/src/views/user/user-information-set/index.vue index 81b9f9fc..127c66c2 100755 --- a/litemall-vue/src/views/user/user-information-set/index.vue +++ b/litemall-vue/src/views/user/user-information-set/index.vue @@ -14,16 +14,10 @@ - - - - - - - - - - + + + + 退出登录 @@ -42,7 +36,7 @@ import { Uploader, Picker, Popup, Button } from 'vant'; import { removeLocalStorage } from '@/utils/local-storage'; import { getLocalStorage } from '@/utils/local-storage'; -import { authLogout } from '@/api/api'; +import { authInfo, authLogout, authProfile } from '@/api/api'; export default { data() { @@ -56,7 +50,7 @@ export default { showSex: false, avatar: '', nickName: '', - gender: -1, + gender: 0, mobile: '' }; }, @@ -77,28 +71,18 @@ export default { console.log(file); }, onSexConfirm(value, index) { - + this.showSex = false; }, getUserInfo() { - const infoData = getLocalStorage( - 'nickName', - 'background_image', - 'avatar' - ); - // debugger; - this.avatar = infoData.avatar; - this.nickName = infoData.nickName; - // this.gender = infoData.gender; - // this.mobile = infoData.mobile; + authInfo().then(res => { + this.avatar = res.data.data.avatar; + this.nickName = res.data.data.nickName; + this.gender = res.data.data.gender; + this.mobile = res.data.data.mobile; + }) }, loginOut() { authLogout(); - removeLocalStorage( - 'Authorization', - 'avatar', - // 'background_image', - 'nickName' - ); this.$router.push({ name: 'home' }); } }, diff --git a/litemall-vue/src/views/user/user-information-set/set-bg/index.vue b/litemall-vue/src/views/user/user-information-set/set-bg/index.vue deleted file mode 100755 index 25d9698a..00000000 --- a/litemall-vue/src/views/user/user-information-set/set-bg/index.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/litemall-vue/src/views/user/user-information-set/set-mobile/index.vue b/litemall-vue/src/views/user/user-information-set/set-mobile/index.vue index 3a5014c3..6b3a8ab1 100755 --- a/litemall-vue/src/views/user/user-information-set/set-mobile/index.vue +++ b/litemall-vue/src/views/user/user-information-set/set-mobile/index.vue @@ -6,13 +6,13 @@ v-model="password" type="password" placeholder="请输入登录密码" - :error="!!$vuelidation.error('password')" /> + /> + /> -import { authRegisterCaptcha } from '@/api/api'; +import { authCaptcha } from '@/api/api'; import { Field } from 'vant'; export default { data: () => ({ password: '', - new_mobile: '', + mobile: '', code: '', counting: false }), - vuelidation: { - data: { - password: { - required: true - }, - new_mobile: { - required: true, - mobile: true - } - } - }, - methods: { getCode() { - if (!this.counting && this.vuelidat()) { - authRegisterCaptcha({ - mobile: this.new_mobile, - operation: 'changeMobile' + if (!this.counting && this.vuelidate()) { + authCaptcha({ + mobile: this.mobile, + type: 'bind-mobile' }).then(() => { this.$toast.success('发送成功'); this.counting = true; - }); + }).catch(error => { + this.$toast.fail(error.data.errmsg); + this.counting = false; + }) + } }, countdownend() { this.counting = false; }, - vuelidat() { - this.$vuelidation.valid(); - if (this.$vuelidation.error('new_mobile')) { - const msg = this.$vuelidation.error('new_mobile'); - this.$toast(msg == 'Required' ? '请输入手机号' : msg); + vuelidate() { + if(this.mobile === ''){ + this.$toast.fail('请输入号码'); return false; } return true; diff --git a/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue b/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue index be5017df..48e1b8f7 100755 --- a/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue +++ b/litemall-vue/src/views/user/user-information-set/set-nickname/index.vue @@ -1,7 +1,7 @@ - - From a756578b4afb08250964ddce7fbd25535f9046ca Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Mon, 1 Jul 2019 14:30:18 +0800 Subject: [PATCH 081/201] =?UTF-8?q?refact[litemall-vue]:=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4infinity-scroll=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E8=80=8C=E6=98=AF=E9=87=87=E7=94=A8vant=20Li?= =?UTF-8?q?st=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/infinity-scroll/index.vue | 104 ------------ litemall-vue/src/views/items/list/index.vue | 1 - .../src/views/user/coupon-list/index.vue | 120 ++++++++------ .../views/user/order-entity-list/index.vue | 152 ++++++++++-------- .../src/views/user/refund-list/index.vue | 42 ++--- 5 files changed, 170 insertions(+), 249 deletions(-) delete mode 100644 litemall-vue/src/components/infinity-scroll/index.vue diff --git a/litemall-vue/src/components/infinity-scroll/index.vue b/litemall-vue/src/components/infinity-scroll/index.vue deleted file mode 100644 index 87e66b82..00000000 --- a/litemall-vue/src/components/infinity-scroll/index.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - diff --git a/litemall-vue/src/views/items/list/index.vue b/litemall-vue/src/views/items/list/index.vue index 9912a50e..fe0654a3 100755 --- a/litemall-vue/src/views/items/list/index.vue +++ b/litemall-vue/src/views/items/list/index.vue @@ -32,7 +32,6 @@ diff --git a/litemall-vue/src/components/item-card-vert/index.vue b/litemall-vue/src/components/item-card-vert/index.vue deleted file mode 100644 index 154ff9e3..00000000 --- a/litemall-vue/src/components/item-card-vert/index.vue +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - diff --git a/litemall-vue/src/components/item-group/index.vue b/litemall-vue/src/components/item-group/index.vue deleted file mode 100644 index 5c0c42ca..00000000 --- a/litemall-vue/src/components/item-group/index.vue +++ /dev/null @@ -1,152 +0,0 @@ - - - - diff --git a/litemall-vue/src/views/items/list/index.vue b/litemall-vue/src/views/items/list/index.vue index fe0654a3..6edd32d4 100755 --- a/litemall-vue/src/views/items/list/index.vue +++ b/litemall-vue/src/views/items/list/index.vue @@ -101,6 +101,9 @@ export default { this.loading = false; this.finished = res.data.data.page >= res.data.data.pages; }); + }, + itemClick(id) { + this.$router.push(`/items/detail/${id}`); } }, diff --git a/litemall-vue/src/views/items/search/index.vue b/litemall-vue/src/views/items/search/index.vue index ce405583..fe0dc69a 100755 --- a/litemall-vue/src/views/items/search/index.vue +++ b/litemall-vue/src/views/items/search/index.vue @@ -1,53 +1,52 @@ diff --git a/litemall-vue/src/views/user/module-collect/index.vue b/litemall-vue/src/views/user/module-collect/index.vue index a6260850..1bd3d3bc 100644 --- a/litemall-vue/src/views/user/module-collect/index.vue +++ b/litemall-vue/src/views/user/module-collect/index.vue @@ -1,28 +1,24 @@ From 272d43a9c313862eb823579f878c42f43ff1aa15 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 11 Jul 2019 10:14:14 +0800 Subject: [PATCH 094/201] =?UTF-8?q?chore[litemall-admin-api]:=20bean?= =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=EF=BC=8C=E5=8F=AF=E8=83=BD=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E6=BD=9C=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/linlinjava/litemall/admin/config/ShiroConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/config/ShiroConfig.java b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/config/ShiroConfig.java index 1495d62a..fb5c124a 100644 --- a/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/config/ShiroConfig.java +++ b/litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/config/ShiroConfig.java @@ -25,7 +25,7 @@ public class ShiroConfig { } @Bean - public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) { + public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager) { ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean(); shiroFilterFactoryBean.setSecurityManager(securityManager); Map filterChainDefinitionMap = new LinkedHashMap(); @@ -50,7 +50,7 @@ public class ShiroConfig { } @Bean - public DefaultWebSecurityManager securityManager() { + public DefaultWebSecurityManager defaultWebSecurityManager() { DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); securityManager.setRealm(realm()); securityManager.setSessionManager(sessionManager()); From 36085337d8e7e69138c1d33526087f2190bc51c2 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 11 Jul 2019 10:28:58 +0800 Subject: [PATCH 095/201] =?UTF-8?q?chore[litemall-vue]:=20=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-vue/src/views/home/tabbar-home.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/litemall-vue/src/views/home/tabbar-home.vue b/litemall-vue/src/views/home/tabbar-home.vue index 33700c71..95191d34 100755 --- a/litemall-vue/src/views/home/tabbar-home.vue +++ b/litemall-vue/src/views/home/tabbar-home.vue @@ -267,17 +267,17 @@ export default { .goods-channel img { display: block; - width: 30px; - height: 30px; + width: 20px; + height: 20px; margin: 0 auto; } .goods-channel span { display: block; - font-size: 15px; + font-size: 14px; text-align: center; - margin: 0 auto; - line-height: 1; + margin-top: 5px; + margin-bottom: 10px; color: #333; } .van-coupon-cell--selected { From 4756f0168f074b437848ec2d8f36f0797a2c9ffc Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 11 Jul 2019 11:06:39 +0800 Subject: [PATCH 096/201] =?UTF-8?q?chore[litemall-vue]:=20=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-vue/src/views/items/detail/index.vue | 109 ++++++++---------- 1 file changed, 50 insertions(+), 59 deletions(-) diff --git a/litemall-vue/src/views/items/detail/index.vue b/litemall-vue/src/views/items/detail/index.vue index f93b04e2..81e413fc 100755 --- a/litemall-vue/src/views/items/detail/index.vue +++ b/litemall-vue/src/views/items/detail/index.vue @@ -36,7 +36,7 @@ :goods="skuGoods" :goodsId="goods.info.id" @buy-clicked="buyGoods" - @add-cart="addCart" + @add-cart="addCart" /> @@ -83,13 +83,13 @@ export default { goods: { userHasCollect: 0, info: { - gallery:[] + gallery: [] } }, sku: { tree: [], list: [], - price: '1.00', // 默认价格(单位元) + price: '1.00' // 默认价格(单位元) }, skuGoods: { // 商品标题 @@ -109,8 +109,7 @@ export default { }; }, - -computed: { + computed: { props_str() { let props_arr = []; _.each(this.goods.attribute, json => { @@ -129,17 +128,14 @@ computed: { this.showSku = true; }, initData() { - goodsDetail({id: this.itemId}).then( - res => { - this.goods = res.data.data; - this.skuAdapter(); - } - ); + goodsDetail({ id: this.itemId }).then(res => { + this.goods = res.data.data; + this.skuAdapter(); + }); cartGoodsCount().then(res => { this.cartInfo = res.data.data; }); - }, toCart() { this.$router.push({ @@ -147,18 +143,16 @@ computed: { }); }, addCollect() { - collectAddOrDelete({valueId: this.itemId, type: 0}).then(res => { - if(this.goods.userHasCollect === 1){ - this.goods.userHasCollect = 0 - } - else{ - this.goods.userHasCollect = 1 + collectAddOrDelete({ valueId: this.itemId, type: 0 }).then(res => { + if (this.goods.userHasCollect === 1) { + this.goods.userHasCollect = 0; + } else { + this.goods.userHasCollect = 1; this.$toast({ message: '收藏成功', duration: 1500 - }); + }); } - }); }, getProductId(s1, s2) { @@ -169,8 +163,7 @@ computed: { _.each(specification.valueList, specValue => { if (specValue.id === s1) { s1_name = specValue.value; - } - else if (specValue.id === s2) { + } else if (specValue.id === s2) { s2_name = specValue.value; } }); @@ -216,18 +209,16 @@ computed: { message: '目前仅支持两规格', duration: 1500 }); - return - } - else if (_.has(data.selectedSkuComb, 's2')) { + return; + } else if (_.has(data.selectedSkuComb, 's2')) { params.productId = this.getProductId( data.selectedSkuComb.s1, data.selectedSkuComb.s2 ); + } else { + params.productId = this.getProductIdByOne(data.selectedSkuComb.s1); } - else { - params.productId = this.getProductIdByOne(data.selectedSkuComb.s1) - } - cartAdd(params).then(() => { + cartAdd(params).then(() => { this.cartInfo = this.cartInfo + data.selectedNum; this.$toast({ message: '已添加至购物车', @@ -248,22 +239,20 @@ computed: { message: '目前仅支持两规格', duration: 1500 }); - return - } - else if (_.has(data.selectedSkuComb, 's2')) { + return; + } else if (_.has(data.selectedSkuComb, 's2')) { params.productId = this.getProductId( data.selectedSkuComb.s1, data.selectedSkuComb.s2 ); + } else { + params.productId = this.getProductIdByOne(data.selectedSkuComb.s1); } - else { - params.productId = this.getProductIdByOne(data.selectedSkuComb.s1) - } - cartFastAdd(params).then(res => { - let cartId = res.data.data; - setLocalStorage({CartId: cartId}) - that.showSku = false; - this.$router.push({ name: 'placeOrderEntity'}); + cartFastAdd(params).then(res => { + let cartId = res.data.data; + setLocalStorage({ CartId: cartId }); + that.showSku = false; + this.$router.push({ name: 'placeOrderEntity' }); }); }, skuAdapter() { @@ -284,23 +273,23 @@ computed: { this.skuGoods = { title: this.goods.info.name, picture: this.goods.info.picUrl - } + }; }, setSkuList() { var sku_list = []; - _.each(this.goods.productList, v => { - var sku_list_obj = {}; - _.each(v.specifications, (specificationName, index) => { - sku_list_obj[ - 's' + (~~index + 1) - ] = this.findSpecValueIdByName(specificationName); - }); - - sku_list_obj.price = v.price * 100; - sku_list_obj.stock_num = v.number; - sku_list.push(sku_list_obj); + _.each(this.goods.productList, v => { + var sku_list_obj = {}; + _.each(v.specifications, (specificationName, index) => { + sku_list_obj['s' + (~~index + 1)] = this.findSpecValueIdByName( + specificationName + ); }); - + + sku_list_obj.price = v.price * 100; + sku_list_obj.stock_num = v.number; + sku_list.push(sku_list_obj); + }); + return sku_list; }, findSpecValueIdByName(name) { @@ -312,7 +301,7 @@ computed: { return; } }); - if(id !== 0){ + if (id !== 0) { return; } }); @@ -329,7 +318,7 @@ computed: { id: vv.id, name: vv.value, imUrl: vv.picUrl - }) + }); }); specifications.push({ @@ -341,7 +330,7 @@ computed: { return specifications; } - }, + }, components: { [Popup.name]: Popup, @@ -351,9 +340,9 @@ computed: { [GoodsAction.name]: GoodsAction, [GoodsActionButton.name]: GoodsActionButton, [GoodsActionIcon.name]: GoodsActionIcon, - [popupProps.name]: popupProps + [popupProps.name]: popupProps } -} +}; \ No newline at end of file diff --git a/litemall-vue/src/views/items/topic/index.vue b/litemall-vue/src/views/items/topic/index.vue new file mode 100644 index 00000000..665efb28 --- /dev/null +++ b/litemall-vue/src/views/items/topic/index.vue @@ -0,0 +1,87 @@ + + + + + \ No newline at end of file From 8d82b1202a607cebdf5ba32ea1c2322c673d6064 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 11 Jul 2019 14:30:36 +0800 Subject: [PATCH 098/201] =?UTF-8?q?fix[litemall-vue]:=20=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-vue/src/views/items/tabbar-catalog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litemall-vue/src/views/items/tabbar-catalog.vue b/litemall-vue/src/views/items/tabbar-catalog.vue index d5e2ac26..f15cd4da 100644 --- a/litemall-vue/src/views/items/tabbar-catalog.vue +++ b/litemall-vue/src/views/items/tabbar-catalog.vue @@ -71,7 +71,7 @@ export default { }, toItemList(id) { this.$router.push({ - name: 'list', + name: 'category', query: { keyword: '', itemClass: id } }); } From b785a6ff0521c9a89b0cd1d850918088c3b32e4c Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 11 Jul 2019 15:30:16 +0800 Subject: [PATCH 099/201] fix[litemall-vue]: fix bug --- litemall-vue/src/views/user/coupon-list/index.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/litemall-vue/src/views/user/coupon-list/index.vue b/litemall-vue/src/views/user/coupon-list/index.vue index 465f02f7..a7b2f165 100644 --- a/litemall-vue/src/views/user/coupon-list/index.vue +++ b/litemall-vue/src/views/user/coupon-list/index.vue @@ -89,8 +89,7 @@ export default { this.finished = res.data.data.page >= res.data.data.pages; }); }, - handleTabClick(index) { - this.activeIndex = index; + handleTabClick() { this.page = 0; this.couponList = []; this.getCouponList(); From cc2fb64a6eb61dca6b767886dd18e8b8f1e5618a Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 11 Jul 2019 15:30:53 +0800 Subject: [PATCH 100/201] =?UTF-8?q?chore[litemall-vue]:=20=E9=80=80?= =?UTF-8?q?=E5=87=BA=E6=8C=89=E9=92=AE=E7=A7=BB=E5=88=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/user/tabbar-user-header.vue | 6 ++---- litemall-vue/src/views/user/tabbar-user.vue | 8 -------- .../views/user/user-information-set/index.vue | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/litemall-vue/src/views/user/tabbar-user-header.vue b/litemall-vue/src/views/user/tabbar-user-header.vue index 185df051..cd633c0a 100755 --- a/litemall-vue/src/views/user/tabbar-user-header.vue +++ b/litemall-vue/src/views/user/tabbar-user-header.vue @@ -41,7 +41,7 @@ export default { 'nickName', 'avatar' ); - this.avatar = avatar_default; + this.avatar = infoData.avatar || avatar_default; this.nickName = infoData.nickName || '昵称'; }, toSetting() { @@ -53,17 +53,15 @@ export default { From 488c7ed80f20391ef6da9c503cffd4c7cfabbc3c Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Fri, 12 Jul 2019 20:05:14 +0800 Subject: [PATCH 101/201] =?UTF-8?q?chore:=20=E9=87=87=E7=94=A8logback?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-all/src/main/resources/application.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/litemall-all/src/main/resources/application.yml b/litemall-all/src/main/resources/application.yml index 3abd1ad5..fad6875d 100644 --- a/litemall-all/src/main/resources/application.yml +++ b/litemall-all/src/main/resources/application.yml @@ -8,12 +8,4 @@ server: port: 8080 logging: - level: - root: ERROR - org.springframework: ERROR - org.mybatis: ERROR - org.linlinjava.litemall.core: INFO - org.linlinjava.litemall.db: INFO - org.linlinjava.litemall.admin: INFO - org.linlinjava.litemall.wx: INFO - org.linlinjava.litemall: INFO \ No newline at end of file + config: classpath:logback-spring.xml \ No newline at end of file From ac15da981fd0544972593796d317f2d414595ceb Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Fri, 12 Jul 2019 20:05:32 +0800 Subject: [PATCH 102/201] =?UTF-8?q?chore:=20=E9=87=87=E7=94=A8logback?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/logback-spring.xml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 litemall-all/src/main/resources/logback-spring.xml diff --git a/litemall-all/src/main/resources/logback-spring.xml b/litemall-all/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..ff4f67ac --- /dev/null +++ b/litemall-all/src/main/resources/logback-spring.xml @@ -0,0 +1,58 @@ + + + logback + + + + + debug + + + %d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n + + + + + + ${log.path}/log.log + + ${log.path}/log-%d{yyyy-MM-dd}.log + + + + %date %level [%thread] %logger{36} [%file : %line] %msg%n + + + + + + ${log.path}/error.log + + ${log.path}/error-%d{yyyy-MM-dd}.log + + + + %date %level [%thread] %logger{36} [%file : %line] %msg%n + + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + \ No newline at end of file From 99e8e88151ad57b7bb6bc51ac2c3b81520d80ebf Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Fri, 12 Jul 2019 20:08:42 +0800 Subject: [PATCH 103/201] =?UTF-8?q?chore:=20=E9=87=87=E7=94=A8logback?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/litemall/application-admin.yml | 0 deploy/litemall/application-core.yml | 107 ------------------- deploy/litemall/application-db.yml | 26 ----- deploy/litemall/application-wx.yml | 0 deploy/litemall/application.yml | 144 ++++++++++++++++++++++++-- 5 files changed, 133 insertions(+), 144 deletions(-) delete mode 100644 deploy/litemall/application-admin.yml delete mode 100644 deploy/litemall/application-core.yml delete mode 100644 deploy/litemall/application-db.yml delete mode 100644 deploy/litemall/application-wx.yml diff --git a/deploy/litemall/application-admin.yml b/deploy/litemall/application-admin.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/deploy/litemall/application-core.yml b/deploy/litemall/application-core.yml deleted file mode 100644 index a8140385..00000000 --- a/deploy/litemall/application-core.yml +++ /dev/null @@ -1,107 +0,0 @@ -litemall: - # 开发者应该设置成自己的wx相关信息 - wx: - app-id: wxa5b486c6b918ecfb - app-secret: e04004829d4c383b4db7769d88dfbca1 - mch-id: 111111 - mch-key: xxxxxx - notify-url: http://118.24.0.153:8080/wx/order/pay-notify - # 商户证书文件路径 - # 请参考“商户证书”一节 https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=4_3 - key-path: xxxxx - - #通知相关配置 - notify: - mail: - # 邮件通知配置,邮箱一般用于接收业务通知例如收到新的订单,sendto 定义邮件接收者,通常为商城运营人员 - enable: false - host: smtp.exmail.qq.com - username: ex@ex.com.cn - password: XXXXXXXXXXXXX - sendfrom: ex@ex.com.cn - sendto: ex@qq.com - - # 短消息模版通知配置 - # 短信息用于通知客户,例如发货短信通知,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值 - sms: - enable: false - appid: 111111111 - appkey: xxxxxxxxxxxxxx - template: - - name: paySucceed - templateId: 156349 - - name: captcha - templateId: 156433 - - name: ship - templateId: 158002 - - name: refund - templateId: 159447 - - # 微信模版通知配置 - # 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值 - wx: - enable: false - template: - - name: paySucceed - templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - - name: captcha - templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - - name: ship - templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - - name: refund - templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - - # 快鸟物流查询配置 - express: - enable: false - appId: "XXXXXXXXX" - appKey: "XXXXXXXXXXXXXXXXXXXXXXXXX" - vendors: - - code: "ZTO" - name: "中通快递" - - code: "YTO" - name: "圆通速递" - - code: "YD" - name: "韵达速递" - - code: "YZPY" - name: "邮政快递包裹" - - code: "EMS" - name: "EMS" - - code: "DBL" - name: "德邦快递" - - code: "FAST" - name: "快捷快递" - - code: "ZJS" - name: "宅急送" - - code: "TNT" - name: "TNT快递" - - code: "UPS" - name: "UPS" - - code: "DHL" - name: "DHL" - - code: "FEDEX" - name: "FEDEX联邦(国内件)" - - code: "FEDEX_GJ" - name: "FEDEX联邦(国际件)" - - # 对象存储配置 - storage: - # 当前工作的对象存储模式,分别是local、aliyun、tencent - active: local - # 本地对象存储配置信息 - local: - storagePath: storage - address: http://118.24.0.153:8080/wx/storage/fetch/ - # 阿里云对象存储配置信息 - aliyun: - endpoint: oss-cn-shenzhen.aliyuncs.com - accessKeyId: 111111 - accessKeySecret: xxxxxx - bucketName: xxxxxx - # 腾讯对象存储配置信息 - # 请参考 https://cloud.tencent.com/document/product/436/6249 - tencent: - secretId: 111111 - secretKey: xxxxxx - region: xxxxxx - bucketName: xxxxxx \ No newline at end of file diff --git a/deploy/litemall/application-db.yml b/deploy/litemall/application-db.yml deleted file mode 100644 index ef526211..00000000 --- a/deploy/litemall/application-db.yml +++ /dev/null @@ -1,26 +0,0 @@ -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -spring: - datasource: - druid: - url: jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false - driver-class-name: com.mysql.jdbc.Driver - username: litemall - password: litemall123456 - initial-size: 10 - max-active: 50 - min-idle: 10 - max-wait: 60000 - pool-prepared-statements: true - max-pool-prepared-statement-per-connection-size: 20 - validation-query: SELECT 1 FROM DUAL - test-on-borrow: false - test-on-return: false - test-while-idle: true - time-between-eviction-runs-millis: 60000 - filters: stat,wall - diff --git a/deploy/litemall/application-wx.yml b/deploy/litemall/application-wx.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/deploy/litemall/application.yml b/deploy/litemall/application.yml index 3802b74f..cf216d00 100644 --- a/deploy/litemall/application.yml +++ b/deploy/litemall/application.yml @@ -1,19 +1,141 @@ spring: - profiles: - active: db, core, admin, wx message: encoding: UTF-8 + datasource: + druid: + url: jdbc:mysql://localhost:3306/litemall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC&allowPublicKeyRetrieval=true&verifyServerCertificate=false&useSSL=false + driver-class-name: com.mysql.jdbc.Driver + username: litemall + password: litemall123456 + initial-size: 10 + max-active: 50 + min-idle: 10 + max-wait: 60000 + pool-prepared-statements: true + max-pool-prepared-statement-per-connection-size: 20 + validation-query: SELECT 1 FROM DUAL + test-on-borrow: false + test-on-return: false + test-while-idle: true + time-between-eviction-runs-millis: 60000 + filters: stat,wall server: port: 8080 logging: - level: - root: ERROR - org.springframework: ERROR - org.mybatis: ERROR - org.linlinjava.litemall.core: ERROR - org.linlinjava.litemall.db: ERROR - org.linlinjava.litemall.admin: ERROR - org.linlinjava.litemall.wx: ERROR - org.linlinjava.litemall: ERROR \ No newline at end of file + config: classpath:logback-spring.xml + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +litemall: + # 开发者应该设置成自己的wx相关信息 + wx: + app-id: wxa5b486c6b918ecfb + app-secret: e04004829d4c383b4db7769d88dfbca1 + mch-id: 111111 + mch-key: xxxxxx + notify-url: http://118.24.0.153:8080/wx/order/pay-notify + # 商户证书文件路径 + # 请参考“商户证书”一节 https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=4_3 + key-path: xxxxx + + #通知相关配置 + notify: + mail: + # 邮件通知配置,邮箱一般用于接收业务通知例如收到新的订单,sendto 定义邮件接收者,通常为商城运营人员 + enable: false + host: smtp.exmail.qq.com + username: ex@ex.com.cn + password: XXXXXXXXXXXXX + sendfrom: ex@ex.com.cn + sendto: ex@qq.com + + # 短消息模版通知配置 + # 短信息用于通知客户,例如发货短信通知,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值 + sms: + enable: false + appid: 111111111 + appkey: xxxxxxxxxxxxxx + template: + - name: paySucceed + templateId: 156349 + - name: captcha + templateId: 156433 + - name: ship + templateId: 158002 + - name: refund + templateId: 159447 + + # 微信模版通知配置 + # 微信模版用于通知客户或者运营者,注意配置格式;template-name,template-templateId 请参考 NotifyType 枚举值 + wx: + enable: false + template: + - name: paySucceed + templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + - name: captcha + templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + - name: ship + templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + - name: refund + templateId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + + # 快鸟物流查询配置 + express: + enable: false + appId: "XXXXXXXXX" + appKey: "XXXXXXXXXXXXXXXXXXXXXXXXX" + vendors: + - code: "ZTO" + name: "中通快递" + - code: "YTO" + name: "圆通速递" + - code: "YD" + name: "韵达速递" + - code: "YZPY" + name: "邮政快递包裹" + - code: "EMS" + name: "EMS" + - code: "DBL" + name: "德邦快递" + - code: "FAST" + name: "快捷快递" + - code: "ZJS" + name: "宅急送" + - code: "TNT" + name: "TNT快递" + - code: "UPS" + name: "UPS" + - code: "DHL" + name: "DHL" + - code: "FEDEX" + name: "FEDEX联邦(国内件)" + - code: "FEDEX_GJ" + name: "FEDEX联邦(国际件)" + + # 对象存储配置 + storage: + # 当前工作的对象存储模式,分别是local、aliyun、tencent + active: local + # 本地对象存储配置信息 + local: + storagePath: storage + address: http://118.24.0.153:8080/wx/storage/fetch/ + # 阿里云对象存储配置信息 + aliyun: + endpoint: oss-cn-shenzhen.aliyuncs.com + accessKeyId: 111111 + accessKeySecret: xxxxxx + bucketName: xxxxxx + # 腾讯对象存储配置信息 + # 请参考 https://cloud.tencent.com/document/product/436/6249 + tencent: + secretId: 111111 + secretKey: xxxxxx + region: xxxxxx + bucketName: xxxxxx \ No newline at end of file From d2dc7345d1b0fbb47fc4b48b9476ee89c7eb5e95 Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Fri, 12 Jul 2019 20:20:37 +0800 Subject: [PATCH 104/201] =?UTF-8?q?chore:=20=E9=87=87=E7=94=A8logback?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-all/src/main/resources/logback-spring.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litemall-all/src/main/resources/logback-spring.xml b/litemall-all/src/main/resources/logback-spring.xml index ff4f67ac..e7e9e3c5 100644 --- a/litemall-all/src/main/resources/logback-spring.xml +++ b/litemall-all/src/main/resources/logback-spring.xml @@ -1,7 +1,7 @@ logback - + From f6bb713bc09e5421342c7c961f71b69c1f14511a Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Sat, 13 Jul 2019 20:04:04 +0800 Subject: [PATCH 105/201] fix[litemall-core]: #230 --- .../org/linlinjava/litemall/core/storage/TencentStorage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litemall-core/src/main/java/org/linlinjava/litemall/core/storage/TencentStorage.java b/litemall-core/src/main/java/org/linlinjava/litemall/core/storage/TencentStorage.java index c5f9b023..d899f671 100644 --- a/litemall-core/src/main/java/org/linlinjava/litemall/core/storage/TencentStorage.java +++ b/litemall-core/src/main/java/org/linlinjava/litemall/core/storage/TencentStorage.java @@ -77,7 +77,7 @@ public class TencentStorage implements Storage { } private String getBaseUrl() { - return "https://" + bucketName + ".cos-website." + region + ".myqcloud.com/"; + return "https://" + bucketName + ".cos." + region + ".myqcloud.com/"; } @Override From d10336db6469bbc00555558461175ca78563b94d Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Sat, 13 Jul 2019 20:22:00 +0800 Subject: [PATCH 106/201] fix[litemall-vue]: fix bug --- .../src/views/user/coupon-list/index.vue | 22 +++---------------- .../views/user/order-entity-list/index.vue | 2 +- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/litemall-vue/src/views/user/coupon-list/index.vue b/litemall-vue/src/views/user/coupon-list/index.vue index a7b2f165..c63a0bf3 100644 --- a/litemall-vue/src/views/user/coupon-list/index.vue +++ b/litemall-vue/src/views/user/coupon-list/index.vue @@ -1,7 +1,8 @@