diff --git a/mini-app/project.config.json b/mini-app/project.config.json index cb2b49b5a..9c56d228e 100644 --- a/mini-app/project.config.json +++ b/mini-app/project.config.json @@ -113,6 +113,13 @@ "pathName": "pages/winery/winery-detail", "query": "", "scene": null + }, + { + "id": 9, + "name": "地址管理", + "pathName": "pages/mall/user/user-address", + "query": "", + "scene": null } ] } diff --git a/mini-app/src/app.wpy b/mini-app/src/app.wpy index b1b5bbd2d..021c08c68 100644 --- a/mini-app/src/app.wpy +++ b/mini-app/src/app.wpy @@ -31,6 +31,7 @@ margin-top: 10px; } + .boom { background-color: #F0F1F2; width: 100%; @@ -101,7 +102,9 @@ pages: [ 'pages/form6', 'pages/mall/index', 'pages/mall/goods-detail', +'pages/mall/user/user-address', 'pages/winery/winery-detail' + ], navigateToMiniProgramAppIdList: [ 'wx88736d7d39e2eda6' @@ -143,7 +146,8 @@ usingComponents: { "van-grid-item": "./vant/grid-item/index", "van-dialog": "./vant/dialog/index", "van-image": "./vant/image/index", -"van-loading": "./vant/loading/index" +"van-loading": "./vant/loading/index", +"van-area": "./vant/area/index" } } diff --git a/mini-app/src/appManager.js b/mini-app/src/appManager.js index 7c8b5d848..5e1360f41 100644 --- a/mini-app/src/appManager.js +++ b/mini-app/src/appManager.js @@ -1,9 +1,10 @@ import store from '@/store' +import eventHub from './common/eventHub' class AppManager { saveOpenid(openid) { - wx.setStorageSync('openid', openid) + store.dispatch('setOpenidAction', openid) } @@ -12,6 +13,16 @@ class AppManager { } navigateTo(url) { + if (!store.state.user.token) { + eventHub.$emit('onShowDialogUserInfo') + return + } + + if (!url) { + this.showToast('建设中') + return + } + wx.navigateTo({ url: url }) diff --git a/mini-app/src/components/mall/tab/mall-home.wpy b/mini-app/src/components/mall/tab/mall-home.wpy index 04ab09ae2..3b1e7da19 100644 --- a/mini-app/src/components/mall/tab/mall-home.wpy +++ b/mini-app/src/components/mall/tab/mall-home.wpy @@ -140,7 +140,7 @@ - 热门活动 + 热门活动 @@ -169,7 +169,7 @@ import defaultMix from '../../../mixins/defaultMix' wepy.component({ store, hooks: {}, - mixins: [defaultMix], + data: { columnRecord: [ { @@ -180,6 +180,8 @@ wepy.component({ ] }, + + mixins: [defaultMix], computed: { ...mapState({ 'imageDefine': state => state.imageDefine, diff --git a/mini-app/src/components/mall/tab/mall-my.wpy b/mini-app/src/components/mall/tab/mall-my.wpy index 1ef56afe3..70a422d28 100644 --- a/mini-app/src/components/mall/tab/mall-my.wpy +++ b/mini-app/src/components/mall/tab/mall-my.wpy @@ -1,38 +1,142 @@ + +{ +navigationBarTitleText: '' +} + diff --git a/mini-app/src/pages/mall/user/user-address.wpy b/mini-app/src/pages/mall/user/user-address.wpy new file mode 100644 index 000000000..f2e1ccf74 --- /dev/null +++ b/mini-app/src/pages/mall/user/user-address.wpy @@ -0,0 +1,230 @@ + + + + + +{ +navigationBarTitleText: '' +} + diff --git a/mini-app/src/store/constant/userAddress.js b/mini-app/src/store/constant/userAddress.js new file mode 100644 index 000000000..9eb25453a --- /dev/null +++ b/mini-app/src/store/constant/userAddress.js @@ -0,0 +1,13 @@ + +export const userAddress = { + records: [ + { + id: '1', + name: '贺兰神', + region: [], + detail: '森林公园XXXXXXXXXX' + } + + ] + +} diff --git a/mini-app/src/store/index.js b/mini-app/src/store/index.js index 353b4378d..329b7165d 100644 --- a/mini-app/src/store/index.js +++ b/mini-app/src/store/index.js @@ -3,12 +3,13 @@ import { wineryForm } from './wineryForm' import { imageDefine } from './constant/imageDefine' import { navDefine } from './constant/navDefine' import { wineryDefine } from './constant/wineryDefine' +import { userAddress } from './constant/userAddress' export default new Vuex.Store({ state: { user: { openid: '', - mobile: '', + mobile: '15595184707', userInfo: { nickName: '未注册用户', avatar: 'https://img.yzcdn.cn/vant/cat.jpeg' @@ -19,7 +20,8 @@ export default new Vuex.Store({ wineryForm, imageDefine, navDefine, - wineryDefine + wineryDefine, + userAddress }, mutations: { @@ -50,12 +52,15 @@ export default new Vuex.Store({ commit('setUser', user) }, setOpenidAction({ commit }, openid) { + wx.setStorageSync('openid', openid) commit('setOpenid', openid) }, - setMobileAction({ commit }, user) { - commit('setMobile', user) + setMobileAction({ commit }, mobile) { + wx.setStorageSync('mobile', mobile) + commit('setMobile', mobile) }, setUserInfoAction({ commit }, userInfo) { + wx.setStorageSync('userInfo', userInfo) commit('setUserInfo', userInfo) }, setTokenAction({ commit }, token) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java index 3136d5ed8..aebc692ac 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java @@ -63,7 +63,7 @@ public class SecurityUtils { public static boolean matchesPassword(String rawPassword, String encodedPassword) { BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); return passwordEncoder.matches(rawPassword, encodedPassword); - } + }o /** * 是否为管理员