pujiaming преди 2 години
родител
ревизия
a4a98f2026

+ 1 - 1
.env.development

@@ -1,5 +1,5 @@
 ENV = development,
 ENV = development,
 VITE_PROJECT_NAME = 朱雀游戏中心
 VITE_PROJECT_NAME = 朱雀游戏中心
-VITE_API_HOST = http://gm.rose.nei.nkfzs.com/api/web
+VITE_API_HOST = http://gm.coolpad.nkfzs.com/api/web
 # VITE_LOGO_VISIBLE: 'QingQue'
 # VITE_LOGO_VISIBLE: 'QingQue'
 VITE_LOGO_VISIBLE: 'KuPai'
 VITE_LOGO_VISIBLE: 'KuPai'

+ 61 - 61
src/store/user.ts

@@ -2,68 +2,68 @@ import { defineStore } from 'pinia'
 import { userProfile } from '@/api/index'
 import { userProfile } from '@/api/index'
 
 
 const userInfo = defineStore({
 const userInfo = defineStore({
-    id: 'userInfo',
-    state: () => ({
-        UserInfo: {
-            account: '',
-            password: ''
-        },
-        profile:{} as any,
-        routes:[
-            { id: 0, path: '/p_index', title: '首页' },
-            // { id: 1, path: '/p_rank', title: '排行' },
-            { id: 2, path: '/p_categroy', title: '分类' },
-            { id: 4, path: '/p_order', title: '订单' },
-            { id: 3, path: '/p_mine', title: '我的' }
-        ] as {id:number,path:string,title:string}[],
-        menuPath:[
-            { text: '首页', value: 1, url: 'm_index' },
-            // { text: '排行', value: 2, url: 'm_rank' },
-            { text: '分类', value: 3, url: 'm_categroy' },
-            { text: '我的游戏', value: 4, url: 'm_mine' },
-        ]
-    }),
-    actions: {
-        setUerInfo(data: any) {
-            this.UserInfo = data
-            console.log('UserInfo', this.UserInfo);
-        },
-        setProfile(info:any){
-            this.profile = info
-        },
-        async getUserProfile(){
-            // from 2 手机登录   1密码登录
-            await userProfile({from: parseInt(localStorage.getItem('from') as string)}).then((res) => {
-                console.log(res)
-                this.setProfile(res.data.data)
-                this.routes = [
-                    { id: 0, path: '/p_index', title: '首页' },
-                    // { id: 1, path: '/p_rank', title: '排行' },
-                    { id: 2, path: '/p_categroy', title: '分类' },
-                    { id: 4, path: '/p_order', title: '订单' },
-                    { id: 5, path: '/p_ecoin', title: this.profile.ecoinName },
-                    { id: 6, path: '/p_ncoin', title: this.profile.ncoinName },
-                    { id: 3, path: '/p_mine', title: '我的' }
-                ]
-                this.menuPath = [
-                    { text: '首页', value: 1, url: 'm_index' },
-                    // { text: '排行', value: 2, url: 'm_rank' },
-                    { text: '分类', value: 3, url: 'm_categroy' },
-                    { text: '订单', value: 5, url: 'm_order' },
-                    { text: this.profile.ecoinName, value: 6, url: 'm_ecoin' },
-                    { text: this.profile.ncoinName, value: 7, url: 'm_ncoin' },
-                    { text: '我的游戏', value: 4, url: 'm_mine' },
-                ]
-            }).catch((error) => {
-                console.log(error)
-            })
-        }
+  id: 'userInfo',
+  state: () => ({
+    UserInfo: {
+      account: '',
+      password: ''
+    },
+    profile: {} as any,
+    routes: [
+      { id: 0, path: '/p_index', title: '首页' },
+      // { id: 1, path: '/p_rank', title: '排行' },
+      { id: 2, path: '/p_categroy', title: '分类' },
+      { id: 4, path: '/p_order', title: '订单' },
+      { id: 3, path: '/p_mine', title: '我的' }
+    ] as {id:number, path:string, title:string}[],
+    menuPath: [
+      { text: '首页', value: 1, url: 'm_index' },
+      // { text: '排行', value: 2, url: 'm_rank' },
+      { text: '分类', value: 3, url: 'm_categroy' },
+      { text: '我的游戏', value: 4, url: 'm_mine' }
+    ]
+  }),
+  actions: {
+    setUerInfo(data: any) {
+      this.UserInfo = data
+      console.log('UserInfo', this.UserInfo)
+    },
+    setProfile(info:any) {
+      this.profile = info
     },
     },
-    getters: {
-        getAccount(state){
-            return state.UserInfo.account
-        }
+    async getUserProfile() {
+      // from 2 手机登录   1密码登录
+      await userProfile({ from: parseInt(localStorage.getItem('from') as string) }).then((res) => {
+        console.log(res)
+        this.setProfile(res.data.data)
+        this.routes = [
+          { id: 0, path: '/p_index', title: '首页' },
+          // { id: 1, path: '/p_rank', title: '排行' },
+          { id: 2, path: '/p_categroy', title: '分类' },
+          { id: 4, path: '/p_order', title: '订单' },
+          { id: 5, path: '/p_ecoin', title: this.profile.ecoinName + ':' + this.profile.ecoin },
+          { id: 6, path: '/p_ncoin', title: this.profile.ncoinName + ':' + this.profile.ncoin },
+          { id: 3, path: '/p_mine', title: '我的' }
+        ]
+        this.menuPath = [
+          { text: '首页', value: 1, url: 'm_index' },
+          // { text: '排行', value: 2, url: 'm_rank' },
+          { text: '分类', value: 3, url: 'm_categroy' },
+          { text: '订单', value: 5, url: 'm_order' },
+          { text: this.profile.ecoinName + ':' + this.profile.ecoin, value: 6, url: 'm_ecoin' },
+          { text: this.profile.ncoinName + ':' + this.profile.ncoin, value: 7, url: 'm_ncoin' },
+          { text: '我的游戏', value: 4, url: 'm_mine' }
+        ]
+      }).catch((error) => {
+        console.log(error)
+      })
+    }
+  },
+  getters: {
+    getAccount(state) {
+      return state.UserInfo.account
     }
     }
+  }
 })
 })
 
 
-export { userInfo }
+export { userInfo }

+ 1 - 0
src/view/m_views/ecoin/index.vue

@@ -54,6 +54,7 @@ const pageConfig = reactive({
 const handleCurrentChange = (val: number) => {
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
   console.log(`current page: ${val}`)
   pageConfig.page = val
   pageConfig.page = val
+  getTableData()
 }
 }
 const status = ref<any[]>([])
 const status = ref<any[]>([])
 const getTableData = async() => {
 const getTableData = async() => {

+ 1 - 0
src/view/m_views/ncoin/index.vue

@@ -58,6 +58,7 @@ const pageConfig = reactive({
 const handleCurrentChange = (val: number) => {
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
   console.log(`current page: ${val}`)
   pageConfig.page = val
   pageConfig.page = val
+  getTableData()
 }
 }
 const getTableData = async() => {
 const getTableData = async() => {
    const params = {
    const params = {

+ 1 - 0
src/view/m_views/order/index.vue

@@ -86,6 +86,7 @@ const pageConfig = reactive({
 const handleCurrentChange = (val: number) => {
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
   console.log(`current page: ${val}`)
   pageConfig.page = val
   pageConfig.page = val
+  getTableData()
 }
 }
 const status = ref<any[]>([])
 const status = ref<any[]>([])
 const getTableData = async() => {
 const getTableData = async() => {

+ 1 - 1
src/view/m_views/resetPwd/resetPwd.vue

@@ -57,7 +57,7 @@
           </div>
           </div>
         </van-form>
         </van-form>
       </van-tab>
       </van-tab>
-      <van-tab title="手机号绑定">
+      <van-tab title="手机号设置">
         <van-form>
         <van-form>
           <van-field
           <van-field
             v-model="ruleForm3.mobile"
             v-model="ruleForm3.mobile"

+ 1 - 0
src/view/p_views/ecoin/index.vue

@@ -41,6 +41,7 @@ const pageConfig = reactive({
 const handleCurrentChange = (val: number) => {
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
   console.log(`current page: ${val}`)
   pageConfig.page = val
   pageConfig.page = val
+  getTableData()
 }
 }
 const status = ref<any[]>([])
 const status = ref<any[]>([])
 const getTableData = async() => {
 const getTableData = async() => {

+ 1 - 1
src/view/p_views/login/index.vue

@@ -147,7 +147,7 @@ const submitForm = async (formEl: FormInstance | undefined) => {
                         localStorage.setItem('from', '2')
                         localStorage.setItem('from', '2')
                         await user.getUserProfile()
                         await user.getUserProfile()
                         setTimeout(() => {
                         setTimeout(() => {
-                            router.push({ path: '/m_mine', query: { account: loginForm.account } })
+                            router.push({ path: '/p_mine', query: { account: loginForm.account } })
                             local.set('headerPath', '我的')
                             local.set('headerPath', '我的')
                         }, 1000);
                         }, 1000);
                     }
                     }

+ 1 - 0
src/view/p_views/ncoin/index.vue

@@ -41,6 +41,7 @@ const pageConfig = reactive({
 const handleCurrentChange = (val: number) => {
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
   console.log(`current page: ${val}`)
   pageConfig.page = val
   pageConfig.page = val
+  getTableData()
 }
 }
 const getTableData = async() => {
 const getTableData = async() => {
    const params = {
    const params = {

+ 1 - 0
src/view/p_views/order/index.vue

@@ -64,6 +64,7 @@ const pageConfig = reactive({
 const handleCurrentChange = (val: number) => {
 const handleCurrentChange = (val: number) => {
   console.log(`current page: ${val}`)
   console.log(`current page: ${val}`)
   pageConfig.page = val
   pageConfig.page = val
+  getTableData()
 }
 }
 const status = ref<any[]>([])
 const status = ref<any[]>([])
 const getTableData = async() => {
 const getTableData = async() => {

+ 1 - 1
src/view/p_views/resetPwd/resetPwd.vue

@@ -50,7 +50,7 @@
                 </el-form>
                 </el-form>
               </div>
               </div>
             </el-tab-pane>
             </el-tab-pane>
-            <el-tab-pane label="手机号绑定">
+            <el-tab-pane label="手机号设置">
               <div class="form-wrapper">
               <div class="form-wrapper">
                 <el-form
                 <el-form
                   ref="ruleFormRef3"
                   ref="ruleFormRef3"