st 2 months ago
parent
commit
0899f123a4

+ 2 - 2
.env.development

@@ -1,9 +1,9 @@
 # 环境变量 (命名必须以 VITE_ 开头)
 # 接口前缀
-VITE_API_PREFIX = '/api'
+VITE_API_PREFIX = '/web'
 
 # 接口地址
-VITE_API_BASE_URL = 'http://xoyozi9walh9.xiaomiqiu.com/'
+VITE_API_BASE_URL = 'http://xoyozi9walh9.xiaomiqiu.com/web'
 
 # 接口地址 (WebSocket)
 VITE_API_WS_URL = 'ws://localhost:8000'

+ 4 - 4
.github/ISSUE_TEMPLATE/bug_report.yml

@@ -6,7 +6,7 @@ body:
   - type: markdown
     attributes:
       value: |
-        感谢您使用 ContiNew Admin!请您花些时间填写这份 Bug 报告。
+        感谢您使用 tg机器人!请您花些时间填写这份 Bug 报告。
   - type: textarea
     id: bug-description
     attributes:
@@ -37,8 +37,8 @@ body:
       label: 环境信息
       description: |
         examples:
-          - **ContiNew Admin version(s)**: v3.0.1
-      value: "ContiNew Admin version(s):"
+          - **tg机器人 version(s)**: v3.0.1
+      value: "tg机器人 version(s):"
       render: markdown
     validations:
       required: true
@@ -58,4 +58,4 @@ body:
         - label: 根据报错信息百度或 Google 一下
           required: true
         - label: 搜索是否有其他人提交过类似的 issue,如果对应 issue 尚未解决,您可以先订阅关注该 issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 issue)
-          required: true
+          required: true

+ 2 - 2
.github/ISSUE_TEMPLATE/feature_request.yml

@@ -6,7 +6,7 @@ body:
   - type: markdown
     attributes:
       value: |
-        感谢您使用 ContiNew Admin!请您花些时间填写这份 Feature 调查。
+        感谢您使用 tg机器人!请您花些时间填写这份 Feature 调查。
   - type: textarea
     id: feature-description
     attributes:
@@ -43,4 +43,4 @@ body:
         - label: 搜索是否有其他人提交过类似的 issue,如果对应 issue 尚未解决,您可以先订阅关注该 issue(为了方便后来者查找问题解决方法,请尽量避免创建重复的 issue)
           required: true
         - label: 您是否愿意为您提出的 Feature 提交 PR?
-          required: false
+          required: false

+ 7 - 7
README.md

@@ -1,4 +1,4 @@
-# ContiNew Admin UI
+# tg机器人 UI
 
 <a href="https://github.com/Charles7c/continew-admin-ui/blob/dev/LICENSE" target="_blank">
 <img src="https://img.shields.io/badge/License-Apache--2.0-blue.svg" alt="License" />
@@ -35,9 +35,9 @@
 
 ## 简介
 
-全新 3.0 版本,基于 Gi Demo 前端模板开发的 ContiNew Admin 前端适配项目。
+全新 3.0 版本,基于 Gi Demo 前端模板开发的 tg机器人 前端适配项目。
 
-ContiNew Admin(Continue New Admin)持续迭代优化的前后端分离中后台管理系统框架。开箱即用,重视每一处代码规范,重视每一种解决方案细节,持续提供舒适的前、后端开发体验。
+tg机器人(Continue New Admin)持续迭代优化的前后端分离中后台管理系统框架。开箱即用,重视每一处代码规范,重视每一种解决方案细节,持续提供舒适的前、后端开发体验。
 
 当前采用的技术栈:Spring Boot3(Java17)、Vue3 & Arco Design & TS & Vite、Sa-Token、MyBatis Plus、Redisson、JetCache、JustAuth、Crane4j、EasyExcel、Liquibase、Hutool 等。
 
@@ -318,13 +318,13 @@ continew-admin-ui
 
 ## 贡献指南
 
-ContiNew Admin 致力于提供开箱即用,持续舒适的开发体验。作为一个开源项目,Creator 的初心是希望 ContiNew Admin 依托开源协作模式,提升技术透明度、放大集体智慧、共创优秀实践,源源不断地为企业级项目开发提供助力。
+tg机器人 致力于提供开箱即用,持续舒适的开发体验。作为一个开源项目,Creator 的初心是希望 tg机器人 依托开源协作模式,提升技术透明度、放大集体智慧、共创优秀实践,源源不断地为企业级项目开发提供助力。
 
-我们非常欢迎广大社区用户为 ContiNew Admin **贡献(开发,测试、文档、答疑等)** 或优化代码,欢迎各位感兴趣的小伙伴儿,[添加微信](https://continew.top/support.html) 讨论或认领任务。
+我们非常欢迎广大社区用户为 tg机器人 **贡献(开发,测试、文档、答疑等)** 或优化代码,欢迎各位感兴趣的小伙伴儿,[添加微信](https://continew.top/support.html) 讨论或认领任务。
 
 ### 分支说明
 
-ContiNew Admin 的分支目前分为下个大版本的开发分支和上个大版本的维护分支,PR 前请注意对应分支是否处于维护状态,版本支持情况请查看 [更新日志/版本支持](https://continew.top/admin/other/changelog.html#%E7%89%88%E6%9C%AC%E6%94%AF%E6%8C%81)。
+tg机器人 的分支目前分为下个大版本的开发分支和上个大版本的维护分支,PR 前请注意对应分支是否处于维护状态,版本支持情况请查看 [更新日志/版本支持](https://continew.top/admin/other/changelog.html#%E7%89%88%E6%9C%AC%E6%94%AF%E6%8C%81)。
 
 | 分支  | 说明                                                         |
 | ----- | ------------------------------------------------------------ |
@@ -345,7 +345,7 @@ ContiNew Admin 的分支目前分为下个大版本的开发分支和上个大
 请记住,如果您有任何疑问或需要帮助,我们将随时提供支持。
 
 > [!IMPORTANT]
-> 欢迎大家为 ContiNew Admin 贡献代码,我们非常感谢您的支持!为了更好地管理项目,维护者有一些要求:
+> 欢迎大家为 tg机器人 贡献代码,我们非常感谢您的支持!为了更好地管理项目,维护者有一些要求:
 >
 > 1. 请确保代码、配置文件的结构和命名规范良好,完善的代码注释
 > 2. 在提交代码前,请按照 [Angular 提交规范](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) 编写 commit 的 message

+ 1 - 1
config/plugins/app-info.ts

@@ -11,7 +11,7 @@ export default function appInfo(): Plugin {
       // eslint-disable-next-line no-console
       console.log(
         boxen(
-          `${bold(green(`${bgGreen('ContiNew Admin v3.4.1')}`))}\n${cyan('在线文档:')}${underline('https://continew.top')}\n${cyan('常见问题:')}${underline('https://continew.top/faq.html')}\n${cyan('持续迭代优化的前后端分离中后台管理系统框架。')}`,
+          `${bold(green(`${bgGreen('tg机器人 v3.4.1')}`))}\n${cyan('在线文档:')}${underline('https://continew.top')}\n${cyan('常见问题:')}${underline('https://continew.top/faq.html')}\n${cyan('持续迭代优化的前后端分离中后台管理系统框架。')}`,
           {
             padding: 1,
             margin: 1,

+ 48 - 0
src/apis/user/type.ts

@@ -0,0 +1,48 @@
+export interface UserListResp {
+  id?: number
+  tgId?: string
+  tgAccount?: string
+  firstName?: string
+  lastName?: string
+  nickname?: string
+  realName?: string
+  avatar?: string
+  languageCode?: string
+  walletAddress?: string
+  ageLimit?: number
+  oldUser?: number
+  checkLanguage?: string
+  loginIp?: string
+  loginTime?: string
+  ipAddressConvert?: string
+  disableFlag?: number
+  channel?: number
+  passengerFlowWay?: number
+  loginTelegram?: string
+  coinAddress?: string
+  password?: string
+  mobile?: string
+  sex?: string
+  inviteCode?: string
+  referrerId?: string
+  inviteReward?: number
+  newUserFlag?: number
+  historyKey?: number
+  keyNum?: number
+  airdropCoin?: number
+  goldCoinAmount?: number
+  goldCoinTotalHis?: number
+  developmentGoldCoin?: number
+  onlineTime?: number
+  userAmount?: number
+  createdTime?: string
+  updatedTime?: string
+}
+
+export interface UserQuery {
+  userName?: string
+  time?: string
+}
+
+export interface UserPageQuery extends UserQuery, PageQuery {
+}

+ 7 - 0
src/apis/user/userlist.ts

@@ -0,0 +1,7 @@
+import type * as T from '@/apis/user/type'
+import http from '@/utils/http'
+
+const BASE_URL = '/tgUser'
+export function listUserTg(query: T.UserPageQuery) {
+  return http.get<PageRes<T.UserListResp[]>>(`${BASE_URL}/getTgUserList`, query)
+}

+ 6 - 6
src/views/dashboard/workplace/components/Project.vue

@@ -74,7 +74,7 @@
 <script setup lang="ts">
 const list = [
   {
-    alias: 'ContiNew Admin',
+    alias: 'tg机器人',
     name: 'continew-admin',
     owner: 'continew-org',
     desc: '🔥Almost最佳后端规范🔥持续迭代优化的前后端分离中后台管理系统框架,开箱即用,持续提供舒适的开发体验。',
@@ -94,20 +94,20 @@ const list = [
     statusColor: 'rgb(var(--primary-6))',
   },
   {
-    alias: 'ContiNew Admin UI',
+    alias: 'tg机器人 UI',
     name: 'continew-admin-ui',
     owner: 'continew-org',
-    desc: '全新 3.x 版本,基于 Gi Demo 前端模板开发的 ContiNew Admin 前端适配项目。',
+    desc: '全新 3.x 版本,基于 Gi Demo 前端模板开发的 tg机器人 前端适配项目。',
     logo: 'https://continew.top/logo.svg',
     url: 'https://gitee.com/continew/continew-admin-ui/stargazers',
     status: '迭代',
     statusColor: 'rgb(var(--primary-6))',
   },
   {
-    alias: 'ContiNew Admin UI Arco',
+    alias: 'tg机器人 UI Arco',
     name: 'continew-admin-ui-arco',
     owner: 'continew-org',
-    desc: '2.5 版本,基于 Arco Design Pro 前端模板开发的 ContiNew Admin 前端适配项目。',
+    desc: '2.5 版本,基于 Arco Design Pro 前端模板开发的 tg机器人 前端适配项目。',
     logo: 'https://continew.top/logo.svg',
     url: 'https://gitee.com/continew/continew-admin-ui-arco/stargazers',
     status: '归档',
@@ -117,7 +117,7 @@ const list = [
     alias: 'ContiNew Cloud',
     name: 'continew-admin',
     owner: 'continew',
-    desc: 'ContiNew Admin 微服务版本。基于 SpringBoot 3.x、Spring Cloud 2023 & Alibaba。',
+    desc: 'tg机器人 微服务版本。基于 SpringBoot 3.x、Spring Cloud 2023 & Alibaba。',
     logo: 'https://continew.top/logo.svg',
     url: '#',
     status: '孵化',

+ 14 - 0
src/views/user/jiangli/index.vue

@@ -0,0 +1,14 @@
+<template>
+  <div>
+    1
+    123
+  </div>
+</template>
+
+<script setup lang="ts">
+
+</script>
+
+<style scoped>
+
+</style>

+ 121 - 0
src/views/user/userlist/index.vue

@@ -0,0 +1,121 @@
+<template>
+  <div class="table-page">
+    <GiTable
+      row-key="id"
+      title="用户列表"
+      :data="dataList"
+      :columns="columns"
+      :loading="loading"
+      :scroll="{ x: '100%', y: '100%', minWidth: 1200 }"
+      :pagination="pagination"
+      :disabled-tools="['size']"
+      :disabled-column-keys="['title']"
+      @refresh="search"
+    >
+      <template #toolbar-left>
+        <a-input-search v-model="queryForm.userName" placeholder="用户昵称" allow-clear @search="search" />
+        <DateRangePicker v-model="queryForm.time" @change="search" />
+        <a-button @click="reset">
+          <template #icon><icon-refresh /></template>
+          <template #default>重置</template>
+        </a-button>
+      </template>
+      <template #toolbar-right>
+        <!--        <a-button v-permission="['system:notice:add']" type="primary" @click="onAdd"> -->
+        <!--          <template #icon><icon-plus /></template> -->
+        <!--          <template #default>新增</template> -->
+        <!--        </a-button> -->
+      </template>
+      <template #avatar="{ record }">
+        <a-avatar v-if="record.avatar">
+          <img :src="record.avatar" />
+        </a-avatar>
+      </template>
+      <template #nickname="{ record }">
+        <span>{{ record.firstName }} {{ record.lastName }}</span>
+      </template>
+      <template #passengerFlowWay="{ record }">
+        <GiCellTag :value="record.passengerFlowWay" :dict="passenger_type" />
+      </template>
+      <template #action="{ record }">
+        <a-space>
+          <a-link v-permission="['system:notice:detail']" title="详情" @click="onDetail(record)">详情</a-link>
+          <a-link v-permission="['system:notice:detail']" title="一级" @click="onDetail(record)">一级</a-link>
+          <a-link v-permission="['system:notice:detail']" title="二级" @click="onDetail(record)">二级</a-link>
+          <a-link v-permission="['system:notice:detail']" title="空投" @click="onDetail(record)">空投</a-link>
+          <a-link v-permission="['system:notice:detail']" title="升级成分销商" @click="onDetail(record)">升级成分销商</a-link>
+          <!--          <a-link v-permission="['system:notice:update']" title="修改" @click="onUpdate(record)">修改</a-link> -->
+          <!--          <a-link v-permission="['system:notice:delete']" status="danger" title="删除" @click="onDelete(record)"> 删除 </a-link> -->
+        </a-space>
+      </template>
+    </GiTable>
+  </div>
+</template>
+
+<script setup lang="ts">
+import type { TableInstanceColumns } from '@/components/GiTable/type'
+import { useTable } from '@/hooks'
+import { useDict } from '@/hooks/app'
+import { isMobile } from '@/utils'
+import has from '@/utils/has'
+import DateRangePicker from '@/components/DateRangePicker/index.vue'
+import type { UserListResp, UserQuery } from '@/apis/user/type'
+import { listUserTg } from '@/apis/user/userlist'
+
+defineOptions({ name: 'SystemNotice' })
+
+const { passenger_type } = useDict('passenger_type')
+
+const router = useRouter()
+const queryForm = reactive<UserQuery>({} as UserQuery)
+
+const {
+  tableData: dataList,
+  loading,
+  pagination,
+  search,
+} = useTable((page) => listUserTg({ ...queryForm, ...page }), { immediate: true })
+const columns: TableInstanceColumns[] = [
+  {
+    title: '序号',
+    width: 66,
+    align: 'center',
+    render: ({ rowIndex }) => h('span', {}, rowIndex + 1 + (pagination.current - 1) * pagination.pageSize),
+  },
+  { title: 'tgId', dataIndex: 'tgId', slotName: 'tgId', align: 'center', width: 180 },
+  { title: '头像', dataIndex: 'avatar', slotName: 'avatar', align: 'center', width: 180 },
+  { title: '名称', dataIndex: 'nickname', slotName: 'nickname', align: 'center', width: 180 },
+  { title: 'TG账号', dataIndex: 'tgAccount', slotName: 'tgAccount', align: 'center', width: 180 },
+  { title: '钱包地址', dataIndex: 'walletAddress', slotName: 'walletAddress', align: 'center', width: 180 },
+  { title: '推荐人', dataIndex: 'referrerId', slotName: 'referrerId', align: 'center', width: 180 },
+  { title: '年限', dataIndex: 'ageLimit', slotName: 'ageLimit', align: 'center', width: 180 },
+  { title: '客流途径', dataIndex: 'passengerFlowWay', slotName: 'passengerFlowWay', align: 'center', width: 180 },
+  { title: '注册日期', dataIndex: 'createdTime', width: 180 },
+  { title: '在线时间', dataIndex: 'onlineTime', width: 180 },
+  { title: '用户地址', dataIndex: 'ipAddressConvert', width: 180 },
+  { title: 'ip地址', dataIndex: 'loginIp', width: 180 },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    slotName: 'action',
+    width: 350,
+    align: 'center',
+    fixed: !isMobile() ? 'right' : undefined,
+    show: has.hasPermOr(['system:notice:detail', 'system:notice:update', 'system:notice:delete']),
+  },
+]
+
+// 重置
+const reset = () => {
+  queryForm.userName = undefined
+  queryForm.time = undefined
+  search()
+}
+
+// 详情
+const onDetail = (record: UserListResp) => {
+  router.push({ path: '/system/notice/detail', query: { id: record.id } })
+}
+</script>
+
+<style scoped lang="scss"></style>

+ 2 - 2
vite.config.ts

@@ -33,11 +33,11 @@ export default defineConfig(({ command, mode }) => {
       open: true,
       // 本地跨域代理 -> 代理到服务器的接口地址
       proxy: {
-        '/api': {
+        '/web': {
           target: env.VITE_API_BASE_URL, // 后台服务器地址
           changeOrigin: true, // 是否允许不同源
           secure: false, // 支持https
-          rewrite: (path) => path.replace(/^\/api/, ''),
+          rewrite: (path) => path.replace(/^\/web/, ''),
         },
       },
     },