Browse Source

添加登录记录页面

master
前端-胡立永 9 months ago
parent
commit
8cc187c18d
9 changed files with 178 additions and 6 deletions
  1. +38
    -1
      README.md
  2. +18
    -0
      components/center/center.vue
  3. +8
    -1
      locale/en.js
  4. +8
    -1
      locale/es.js
  5. +7
    -0
      pages.json
  6. +94
    -0
      pages/loginRecord/loginRecord.vue
  7. +2
    -2
      pages/winningRecord/winningRecord.vue
  8. BIN
      static/center/login.png
  9. +3
    -1
      utils/shop.js

+ 38
- 1
README.md View File

@ -1,2 +1,39 @@
# uav-uniapp-240725
# mobile-shop-uniapp
#### 介绍
{**以下是 Gitee 平台说明,您可以替换此简介**
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

+ 18
- 0
components/center/center.vue View File

@ -157,6 +157,16 @@
{{ $t('page.center.customer_serivce') }}
</view>
</u-cell>
<!-- 登录记录 -->
<u-cell @click="toLoginRecord" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/login.png" width="23rpx" />
</view>
<view slot="title" style="color: #eee;padding: 20rpx 0;">
{{ $t('page.center.loginRecord') }}
</view>
</u-cell>
<!-- 退出登录 -->
<u-cell @click="logout" color="#fff" isLink>
<view slot="icon">
@ -345,6 +355,14 @@
})
},
//
toLoginRecord(){
this.$play()
uni.navigateTo({
url: '/pages/loginRecord/loginRecord'
})
},
//
toWinningRecord(){
this.$play()


+ 8
- 1
locale/en.js View File

@ -126,7 +126,14 @@ export default {
"save": "Save",
"fanList": "Fan List",
"cannotModified": "Cannot be modified",
"winningRecord": "Winning Record"
"winningRecord": "Winning Record",
"loginRecord" : "Entry record"
},
"loginRecord" : {
"title" : "Entry record",
"Norecord" : "No record",
"login_time" : "login time",
"login_address" : "login address",
},
"purse": {
"recharge": "Recharge",


+ 8
- 1
locale/es.js View File

@ -126,7 +126,14 @@ export default {
"save": "guardar",
"fanList": "Lista de fans",
"cannotModified": "No puede ser modificado",
"winningRecord": "Registro de ganancias"
"winningRecord": "Registro de ganancias",
"loginRecord" : "Registro de entrada"
},
"loginRecord" : {
"title" : "Registro de entrada",
"Norecord" : "No hay registro",
"login_time" : "Tiempo de inicio de sesión",
"login_address" : "Dirección de inicio de sesión",
},
"purse": {
"recharge": "recarga",


+ 7
- 0
pages.json View File

@ -113,6 +113,13 @@
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/loginRecord/loginRecord",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"globalStyle": {


+ 94
- 0
pages/loginRecord/loginRecord.vue View File

@ -0,0 +1,94 @@
<template>
<view class="loginRecord">
<navbar :leftClick="leftClick" :title="$t('page.loginRecord.title')"></navbar>
<u-list
@scrolltolower="scrolltolower"
height="calc(100vh - 90rpx)">
<u-cell color="#fff"
v-for="(item, index) in loginRecord">
<view slot="title" class="title">
<view>
{{ $t('page.loginRecord.login_time') }}
</view>
<view>
{{ $t('page.loginRecord.login_address') }}
</view>
</view>
<view slot="value" class="value">
<view>
{{ item.createTime }}
</view>
<view>
{{ item.loginIp }}
</view>
</view>
</u-cell>
</u-list>
<view v-if="!loginRecord.length" class="noFans">
{{ $t('page.loginRecord.Norecord') }}
</view>
</view>
</template>
<script>
import navbar from '@/components/base/m-navbar.vue'
export default {
components : { navbar },
data() {
return {
loginRecord : [],
total : 0,
queryParams: {
pageNo: 1,
pageSize: 10
},
};
},
onShow(){
this.getIpLogPage()
},
methods : {
leftClick() {
uni.navigateTo({
url: '/pages/home/home'
})
},
//
getIpLogPage(){
this.request('getIpLogPage', {}, this.queryParams)
.then(res => {
if (res.code == 200) {
this.loginRecord = res.result.records
this.total = res.result.total
}
})
},
scrolltolower(){
this.queryParams.pageSize += 10
this.getIpLogPage()
},
}
}
</script>
<style lang="scss" scoped>
.loginRecord{
.title,
.value{
color: #fff;
&>view{
padding: 10rpx;
}
}
.noFans{
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff80;
}
}
</style>

+ 2
- 2
pages/winningRecord/winningRecord.vue View File

@ -64,8 +64,8 @@
//
getTurntableDetail(id, key) {
const item = this.winningRecordList.find(item => item.id === id);
return item ? item[key] : {}; //
const item = this.winningRecordList.find(item => item.id === id);
return item ? item[key] : {}; //
}
}
}


BIN
static/center/login.png View File

Before After
Width: 200  |  Height: 200  |  Size: 3.7 KiB

+ 3
- 1
utils/shop.js View File

@ -58,5 +58,7 @@ export default {
//获取提示签到说明
getTips : { url : '/index/getTips' , method : 'GET' , auth : true },
//获取banner列表
getAppBanner : { url : '/shop/getAppBanner' , method : 'GET' , auth : true }
getAppBanner : { url : '/shop/getAppBanner' , method : 'GET' , auth : true },
//获取banner列表
getIpLogPage : { url : '/info/getIpLogPage' , method : 'GET' , auth : true },
}

Loading…
Cancel
Save