Jelajahi Sumber

菜单修改

tyler 2 tahun lalu
induk
melakukan
48c6d5a8ea

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 .DS_Store
 node_modules/
 dist/
+dist.zip
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
   "author": "Pan <panfree23@gmail.com>",
   "scripts": {
-    "dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
+    "dev": "vue-cli-service serve",
     "lint": "eslint --ext .js,.vue src",
     "build:prod": "vue-cli-service build",
     "build:stage": "vue-cli-service build --mode staging",

+ 3 - 3
src/lang/en.js

@@ -11,7 +11,7 @@ export default {
     indexShop: 'Products list',
     shopReconsume: 'Reconsume List',
     memberManagement: 'Member management',
-    personalInfo: 'Personal Information',
+    personalInfo: 'Personal Info',
     documentation: 'Documentation',
     guide: 'Guide',
     permission: 'Permission',
@@ -97,7 +97,7 @@ export default {
     monthBonus: 'Month Bonus',
     // 二级菜单/接口-shoppingMall
     repeatPurchase: 'Repeat Purchase',
-    ownOrder: 'ownOrder',
+    ownOrder: 'my Order',
     carFundProducts: 'Car Fund Products',
     villaFundProducts: 'Villa Fund Products',
     welcomePack: 'Member Welcome Pack',
@@ -110,7 +110,7 @@ export default {
     brandAmbassador: 'Brand Ambassador',
     BAOrderList: 'Brand Ambassador Order',
     // 二级菜单/接口-memberManagement
-    personalInfo: 'Personal Information',
+    personalInfo: 'Personal Info',
     resetPassword: 'Reset Password',
     // 二级菜单/接口-networkChart
     placementNetwork: 'Placement Network',

+ 4 - 6
src/permission.js

@@ -1,11 +1,9 @@
-import router, { selfAddRoutes, resetRouter } from './router'
-import store from './store'
-import { Message } from 'element-ui'
-import NProgress from 'nprogress' // progress bar
-import 'nprogress/nprogress.css' // progress bar style
-import { getToken } from '@/utils/auth' // get token from cookie
 import getPageTitle from '@/utils/get-page-title'
 import usersInfo from '@/utils/usersInfo'
+import NProgress from 'nprogress'; // progress bar
+import 'nprogress/nprogress.css'; // progress bar style
+import router, { resetRouter } from './router'
+import store from './store'
  
 NProgress.configure({ showSpinner: false }) // NProgress Configuration
 

+ 11 - 11
src/router/index.js

@@ -1,24 +1,24 @@
-import Vue from 'vue'
-import Router from 'vue-router'
+import Vue from 'vue';
+import Router from 'vue-router';
 
 Vue.use(Router)
 
 /* Layout */
-import Layout from '@/layout'
+import Layout from '@/layout';
 
 /* Router Modules */
-import componentsRouter from './modules/components';
-import chartsRouter from './modules/charts';
-import tableRouter from './modules/table';
-import nestedRouter from './modules/nested';
-import shopRouter from '@/router/modules/shop';
-import profileRouter from "@/router/modules/profile";
-import configRouter from "@/router/modules/config";
-import atlasRouter from "@/router/modules/atlas";
 import articleRouter from "@/router/modules/article";
+import atlasRouter from "@/router/modules/atlas";
 import bonusRouter from "@/router/modules/bonus";
+import configRouter from "@/router/modules/config";
 import financeRouter from "@/router/modules/finance";
+import profileRouter from "@/router/modules/profile";
+import shopRouter from '@/router/modules/shop';
 import userRouter from "@/router/modules/user";
+import chartsRouter from './modules/charts';
+import componentsRouter from './modules/components';
+import nestedRouter from './modules/nested';
+import tableRouter from './modules/table';
 
 /**
  * Note: sub-menu only appear when route children.length >= 1

+ 1 - 1
src/router/modules/shop.js

@@ -44,7 +44,7 @@ const shopRouter = {
       path: 'own-order', // 订单列表
       component: () => import('@/views/shop/order-list'),
       name: 'OrderList',
-      meta: { title: 'Order List', icon: 'el-icon-goods' }
+      meta: { title: 'My Order', icon: 'el-icon-goods' }
     },
     {
       path: 'ba-dec-order-list', // BA报单列表

+ 3 - 4
src/utils/request.js

@@ -1,9 +1,8 @@
 import axios from 'axios'
-import { MessageBox, Message } from 'element-ui'
-import store from '@/store'
-import usersInfo from './usersInfo'
+import { Message } from 'element-ui'
+import Cookies from "js-cookie"
 import tool from './tool'
-import Cookies from "js-cookie";
+import usersInfo from './usersInfo'
 
 // create an axios instance
 const service = axios.create({

+ 36 - 29
src/views/profile/index.vue

@@ -1,33 +1,33 @@
 <template>
   <div class="app-container">
     <div v-if="user">
-      <el-row :gutter="20">
+      <el-row :gutter="20" class="el_c">
 
         <el-col :span="8" :xs="24">
           <user-card :user="user" />
 
-					<account :user="user" />
+          <account :user="user" />
 
-					<login-password />
+          <login-password />
 
-					<payment-password />
+          <payment-password />
         </el-col>
 
-<!--        <el-col :span="8" :xs="24">-->
-<!--          <el-card style="margin: 2px 1px;">-->
-<!--            <el-tabs v-model="activeTab">-->
-<!--              <el-tab-pane :label="$t('profile.account')" name="account">-->
-<!--                <account :user="user" />-->
-<!--              </el-tab-pane>-->
-<!--              <el-tab-pane :label="$t('profile.loginPassword')" name="loginPassword">-->
-<!--                <login-password />-->
-<!--              </el-tab-pane>-->
-<!--              <el-tab-pane :label="$t('profile.paymentPassword')" name="paymentPassword">-->
-<!--                <payment-password />-->
-<!--              </el-tab-pane>-->
-<!--            </el-tabs>-->
-<!--          </el-card>-->
-<!--        </el-col>-->
+        <!--        <el-col :span="8" :xs="24">-->
+        <!--          <el-card style="margin: 2px 1px;">-->
+        <!--            <el-tabs v-model="activeTab">-->
+        <!--              <el-tab-pane :label="$t('profile.account')" name="account">-->
+        <!--                <account :user="user" />-->
+        <!--              </el-tab-pane>-->
+        <!--              <el-tab-pane :label="$t('profile.loginPassword')" name="loginPassword">-->
+        <!--                <login-password />-->
+        <!--              </el-tab-pane>-->
+        <!--              <el-tab-pane :label="$t('profile.paymentPassword')" name="paymentPassword">-->
+        <!--                <payment-password />-->
+        <!--              </el-tab-pane>-->
+        <!--            </el-tabs>-->
+        <!--          </el-card>-->
+        <!--        </el-col>-->
 
       </el-row>
     </div>
@@ -35,18 +35,18 @@
 </template>
 
 <script>
+import usersInfo from '@/utils/usersInfo'
+import LoginPassword from '@/views/profile/components/LoginPassword'
+import PaymentPassword from '@/views/profile/components/PaymentPassword'
 import { mapGetters } from 'vuex'
-import UserCard from './components/UserCard'
+import Account from './components/Account'
 import Activity from './components/Activity'
 import Timeline from './components/Timeline'
-import Account from './components/Account'
-import usersInfo from '@/utils/usersInfo'
-import LoginPassword from '@/views/profile/components/LoginPassword'
-import PaymentPassword from "@/views/profile/components/PaymentPassword";
+import UserCard from './components/UserCard'
 
 export default {
   name: 'Profile',
-  components: {PaymentPassword, LoginPassword, UserCard, Activity, Timeline, Account },
+  components: { PaymentPassword, LoginPassword, UserCard, Activity, Timeline, Account },
   data() {
     return {
       user: {},
@@ -61,7 +61,7 @@ export default {
       'mobile',
       'realName',
       'decLv',
-      'crownLv',
+      'crownLv'
     ])
 
   },
@@ -71,18 +71,25 @@ export default {
   methods: {
     getUser() {
       this.user = {
-				role: this.roles.join(' | '),
+        role: this.roles.join(' | '),
         name: usersInfo.userName(),
         email: usersInfo.userEmail(),
         mobile: usersInfo.baseData().MOBILE,
         realName: usersInfo.baseData().REAL_NAME,
         // avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
-				decLv: usersInfo.getBaseInfo().decLevels[usersInfo.baseData().DEC_LV].LEVEL_NAME,
+        decLv: usersInfo.getBaseInfo().decLevels[usersInfo.baseData().DEC_LV].LEVEL_NAME,
         empLv: usersInfo.getBaseInfo().empLevels[usersInfo.baseData().EMP_LV].LEVEL_NAME,
         crownLv: usersInfo.getBaseInfo().crownLevels[usersInfo.baseData().CROWN_LV].LEVEL_NAME,
-				periodNum: usersInfo.getBaseInfo().periodNum,
+        periodNum: usersInfo.getBaseInfo().periodNum
       }
     }
   }
 }
 </script>
+
+<style lang="scss" scoped>
+.el_c{
+  display: flex;
+  justify-content: center;
+}
+</style>

+ 8 - 8
src/views/shop/reconsume.vue

@@ -253,11 +253,11 @@
 
 <script>
 import {
-  createApproachReconsumeOrder,
-  createReconsumeOrder,
-  deleteApproachOrder,
-  fetchReconsumeProductList,
-  fetchShoppingCart
+createApproachReconsumeOrder,
+createReconsumeOrder,
+deleteApproachOrder,
+fetchReconsumeProductList,
+fetchShoppingCart
 } from '@/api/shop'
 import { fetchFullInfo } from '@/api/user'
 import Pagination from '@/components/Pagination'
@@ -680,7 +680,7 @@ export default {
               type: 'success',
               duration: 5 * 1000
             })
-            this.$router.push({ path: `/shop/order-list` })
+            this.$router.push({ path: `/shop/member-order` })
           }).catch(err => {
             this.$message({
               message: err,
@@ -790,7 +790,7 @@ export default {
     },
     // 倒计时结束跳转
     handleOrderList() {
-      this.$router.push({ path: `/shop/order-list` })
+      this.$router.push({ path: `/shop/member-order` })
     },
     // 启动倒计时
     handleCountdown() {
@@ -800,7 +800,7 @@ export default {
         this.countdown--
         if (this.countdown === 0) {
           // 倒计时结束,跳转到订单列表
-          this.$router.push({ path: `/shop/order-list` })
+          this.$router.push({ path: `/shop/member-order` })
         }
       }, 1000)
     },

+ 5 - 5
src/views/shop/standard-products.vue

@@ -220,11 +220,11 @@
 </template>
 
 <script>
-import { fetchProductList, createApproachOrder, deleteApproachOrder, fetchShoppingCart, createOrder } from '@/api/shop'
+import { createApproachOrder, createOrder, deleteApproachOrder, fetchProductList, fetchShoppingCart } from '@/api/shop'
+import Pagination from '@/components/Pagination'
 import waves from '@/directive/waves'
 import { getScreenWidth } from '@/utils'
 import tool from '@/utils/tool'
-import Pagination from '@/components/Pagination'
 import usersInfo from '@/utils/usersInfo'
 import paystack from 'vue-paystack'
 
@@ -600,7 +600,7 @@ export default {
               type: 'success',
               duration: 5 * 1000
             })
-            this.$router.push({ path: `/shop/order-list` })
+            this.$router.push({ path: `/shop/own-order` })
           }).catch(err => {
             this.$message({
               message: err,
@@ -710,7 +710,7 @@ export default {
     },
     // 倒计时结束跳转
     handleOrderList() {
-      this.$router.push({ path: `/shop/order-list` })
+      this.$router.push({ path: `/shop/own-order` })
     },
     // 启动倒计时
     handleCountdown() {
@@ -720,7 +720,7 @@ export default {
         this.countdown--
         if (this.countdown === 0) {
           // 倒计时结束,跳转到订单列表
-          this.$router.push({ path: `/shop/order-list` })
+          this.$router.push({ path: `/shop/own-order` })
         }
       }, 1000)
     },