File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,19 +27,14 @@ export default {
2727 },
2828 methods: {},
2929 created : function () {
30- if (! User .isLogin ()) {
31- this .$message .error (" 请先登录" );
32- setTimeout (() => {
33- User .toLogin ();
34- }, 1000 );
35- return ;
30+ if (User .isLogin ()) {
31+ this .$store .dispatch (" mallNew/getAsset" ).catch ((err ) => {
32+ this .$message .error (" 获取资产失败" );
33+ });
34+ this .$store .dispatch (" mallNew/getCart" ).catch ((err ) => {
35+ this .$message .error (" 获取购物车失败" );
36+ });
3637 }
37- this .$store .dispatch (" mallNew/getAsset" ).catch ((err ) => {
38- this .$message .error (" 获取资产失败" );
39- });
40- this .$store .dispatch (" mallNew/getCart" ).catch ((err ) => {
41- this .$message .error (" 获取购物车失败" );
42- });
4338 },
4439};
4540 </script >
Original file line number Diff line number Diff line change @@ -246,8 +246,7 @@ export default {
246246 },
247247 changeSelectItem (item ) {
248248 if (item .id === this .selectItem ? .id ) return ;
249- // this.$router.replace({ params: { id: item.id } });
250- this .getData (item);
249+ this .$router .push ({ name: " mall_list_new_id" , params: { id: item .id } });
251250 },
252251 handleResize () {
253252 const width = window .innerWidth < 1550 ? 5 : 10 ;
You can’t perform that action at this time.
0 commit comments