Browse Source

修复bug

master
longjieli 8 months ago
parent
commit
6b05596e9d
15 changed files with 449 additions and 102 deletions
  1. +25
    -18
      App.vue
  2. +1
    -1
      components/base/m-navbar.vue
  3. +2
    -2
      components/base/tabBar.vue
  4. +65
    -55
      components/popUpWindow/popUpWindow.vue
  5. +270
    -0
      components/virtualScroll/virtualScroll.vue
  6. +6
    -1
      locale/ar.js
  7. +6
    -1
      locale/en.js
  8. +15
    -10
      locale/es.js
  9. +6
    -1
      locale/fr.js
  10. +9
    -5
      locale/ru.js
  11. +7
    -5
      pages/home/home.vue
  12. +1
    -0
      pages/login/login.vue
  13. +1
    -1
      pages/loginRecord/loginRecord.vue
  14. +35
    -1
      pages/purse/purse.vue
  15. +0
    -1
      pages/withdraw/withdraw.vue

+ 25
- 18
App.vue View File

@ -2,55 +2,62 @@
export default {
onLaunch: function() {
if(!uni.getStorageSync('language')){
if (!uni.getStorageSync('language')) {
this.$i18n.locale = 'en'
//#ifdef H5
this.$router.go(0);
this.$router.go(0);
//#endif
//#ifdef APP-PLUS
//#endif
uni.setStorage({
key: 'language',
data: 'en'
})
uni.setLocale('en')
}
uni.$resMessage = this.$t('message')
},
onShow: function() {
},
onHide: function() {
}
onShow: function() {},
onHide: function() {}
}
</script>
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uview-ui/theme.scss';
body{
body {
// background-color: #000;
}
uni-toast {
z-index: 100000000;
}
.u-modal{
.u-modal {
// background-color: #000;
}
.u-modal__title{
.u-modal__title {
// color: #fff !important;
}
@media screen and (min-width: 960px) {
.bx{ //
// max-width: 960px;
.bx {
//
max-width: 375px;
// max-width: 765px;
margin: 0px auto;
}
}
</style>
@media screen and (min-width: 960px) {
.popup-bx {
left: 50% !important;
transform: translateX(-50%);
}
}
</style>

+ 1
- 1
components/base/m-navbar.vue View File

@ -3,7 +3,7 @@
<div class="leftClick"
v-if="leftClick"
@click="leftClick();$play()">
<uni-icons color="#B0C73B" type="left" size="30rpx"></uni-icons>
<uni-icons color="#000" type="left" size="30rpx"></uni-icons>
</div>
<div>{{ title }}</div>
</view>


+ 2
- 2
components/base/tabBar.vue View File

@ -1,5 +1,5 @@
<template>
<view class="list">
<view class="list bx popup-bx">
<view
:class="{item : true, active : select == index}"
@click="toPath(item, index)"
@ -78,7 +78,6 @@
.list{
position: fixed;
width: 100vw;
// background-color: #aec438;
background-color: #fff;
display: flex;
justify-content: center;
@ -91,6 +90,7 @@
line-height: 50rpx;
color: #000;
box-shadow: 0px 0rpx 10rpx 10rpx #00000022;
width: 750rpx;
.item:nth-child(2){
// .icon{
// .icon-image{


+ 65
- 55
components/popUpWindow/popUpWindow.vue View File

@ -1,16 +1,21 @@
<!-- 弹窗组件 -->
<template>
<view v-if="show" class="popup-windown">
<view v-if="show" class="popup-windown bx popup-bx">
<div class="popup-content">
<div class="popup-close">x</div>
<div class="bg">
<image src="../../static/popUpWindow/bg.png" mode="widthFix"></image>
</div>
<view class="popup-desc">
Important note: At present, the number of people who recharge is large, and the recharge will fail due to congestion. If payment fails, please contact customer service assistance. Join Tik Tok shop and get a part-time allowance. After completing the tasks of regular employees, you can join the regular employees and receive at least 100-5000USDT commission and salary income per day.
</view>
<view class="popup-btn">
<view @click="close" class="">ok</view>
<uni-icons class="popup-close" type="closeempty" size="20" color="#000"></uni-icons>
<view class="popup-main">
<div class="bg">
<image src="../../static/popUpWindow/bg.png" mode="widthFix"></image>
</div>
<view class="popup-desc">
Important note: At present, the number of people who recharge is large, and the recharge will fail
due to congestion. If payment fails, please contact customer service assistance. Join Tik Tok shop
and get a part-time allowance. After completing the tasks of regular employees, you can join the
regular employees and receive at least 100-5000USDT commission and salary income per day.
</view>
<view class="popup-btn">
<view @click="close" class="">ok</view>
</view>
</view>
</div>
</view>
@ -18,19 +23,20 @@
<script>
export default {
data(){
data() {
return {
}
},
props : {
show : {
type : Boolean,
default : false
props: {
show: {
type: Boolean,
default: false
}
},
methods : {
close(){
methods: {
close() {
uni.setStorageSync('clickPopUp', {}); //
this.$emit('close')
}
}
@ -38,70 +44,74 @@
</script>
<style lang="scss" scoped>
.popup-windown{
.popup-windown {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
height: 100vh;
width: 750rpx;
background: rgba(0,0,0,.1);
background: rgba(0, 0, 0, .1);
left: 0;
top: 0;
z-index: 1000;
.popup-content{
margin: 0rpx auto;
.popup-content {
position: relative;
width: 96%;
margin: 0rpx auto;
background: white;
border-radius: 15rpx;
overflow: hidden;
.popup-close{
.popup-close {
position: absolute;
right: -20rpx;
top: -20rpx;
width: 20rpx;
height: 20rpx;
background: pink;
border-radius: 50%;
z-index: 200;
background: white;
border-radius: 50%;
}
.bg{
height: 200rpx;
.popup-main {
border-radius: 15rpx;
overflow: hidden;
image{
width: 100%;
.bg {
height: 200rpx;
overflow: hidden;
image {
width: 100%;
}
}
}
.popup-desc{
box-sizing: border-box;
padding: 20rpx;
}
.popup-btn{
display: flex;
align-items: center;
justify-content: center;
height: 140rpx;
box-shadow: 0rpx 10rpx 20rpx rgba(0,0,0,.1);
view{
.popup-desc {
box-sizing: border-box;
padding: 20rpx;
}
.popup-btn {
display: flex;
align-items: center;
justify-content: center;
width: 96%;
margin: 0rpx auto;
height: 80rpx;
background: $uni-bg-color-app;
border-radius: 40rpx;
color: $uni-bg-color;
height: 140rpx;
box-shadow: 0rpx 10rpx 20rpx rgba(0, 0, 0, .1);
view {
display: flex;
align-items: center;
justify-content: center;
width: 96%;
margin: 0rpx auto;
height: 80rpx;
background: $uni-bg-color-app;
border-radius: 40rpx;
color: $uni-bg-color;
}
}
}
}
}
</style>

+ 270
- 0
components/virtualScroll/virtualScroll.vue View File

@ -0,0 +1,270 @@
<!-- 首页虚拟滚动 -->
<template>
<view class="virtualScroll content">
<view class="success_info_body">
<!-- 标准title可以调用组件 -->
<view class="title_view">
{{ $t('page.virtualScroll.title') }}
</view>
<!-- 参数名称列数根据实际情况调整 -->
<view class="table_body">
<view class="table_main_body">
<view class="table_inner_body" :class="{ animate }" :style="{top: tableTop + 'px'}">
<view class="table_tr" v-for="(item,index) in tableList" :key="index">
<view class="tr1 tr">{{item.planNo}}</view>
<view class="tr2 tr">{{item.type}}</view>
<view class="tr3 tr" v-if="item.startDate!='-'">{{item.startDate}} ~ {{item.endDate}}</view>
<view class="tr3 tr" v-else>-</view>
<view class="tr4 tr" v-if="item.process!='-'">{{Number(item.process).toFixed(2)}} %</view>
<view class="tr4 tr" v-else>-</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
tableTimer: null,
tableTop: 0,
tableList: [{
"process": 0.0000,
"planNo": "BP2022060701",
"endDate": "2022-06-07",
"type": "砌块",
"startDate": "2022-06-07"
},
{
"process": 0.0000,
"planNo": "WP2022061301",
"endDate": "2022-06-13",
"type": "墙板",
"startDate": "2022-06-13"
},
{
"process": 0.0000,
"planNo": "WP2022061301",
"endDate": "2022-06-13",
"type": "墙板",
"startDate": "2022-06-13"
},
{
"process": 0.0000,
"planNo": "WP2022061301",
"endDate": "2022-06-13",
"type": "墙板",
"startDate": "2022-06-13"
},
{
"process": 0.0000,
"planNo": "WP2022061301",
"endDate": "2022-06-13",
"type": "墙板",
"startDate": "2022-06-13"
},
{
"process": 0.0000,
"planNo": "WP2022061301",
"endDate": "2022-06-13",
"type": "墙板",
"startDate": "2022-06-13"
},
{
"process": 0.0000,
"planNo": "WP2022061301",
"endDate": "2022-06-13",
"type": "墙板",
"startDate": "2022-06-13"
}
],
tableListSize: 0,
componentTimer: null,
//
visibleSize: 3, //
lineHeight: this.getRpxToPx(162), //margin-top/bottom,border
componentTimerInterval: 3600000, //
tableTimerInterval: 1000, // 1px 100
animate : true
}
},
//watchmounted
props: ["activeFactoryId"],
watch: {
activeFactoryId(val, oldVal) {
clearInterval(this.componentTimer);
this.bsGetProductProcess();
this.componentTimerFun();
}
},
mounted() {
clearInterval(this.componentTimer);
this.bsGetProductProcess();
this.componentTimerFun();
},
beforeDestroy() {
clearInterval(this.componentTimer);
clearInterval(this.tableTimer);
},
methods: {
//
bsGetProductProcess() {
clearInterval(this.tableTimer);
this.tableTop = 0;
if (this.activeFactoryId != "") {
// this.request('forgetPass').then(res => {
// if(res.code == 200){
// this.serverList = res.result
// }
// })
this.tableActionFun();
}
},
tableActionFun() {
this.tableListSize = this.tableList.length; //
if (this.tableListSize > this.visibleSize) { //
this.tableList = this.tableList.concat(this.tableList); //
this.tableTimerFun();
} else {
this.fillTableList();
}
},
//
fillTableList() {
var addLength = this.visibleSize - this.tableListSize;
for (var i = 0; i < addLength; i++) {
this.tableList.push({
planNo: "-",
type: "-",
startDate: "-",
endDate: "-",
process: "-"
});
}
},
//
tableTimerFun() {
var count = 0;
this.tableTimer = setInterval(() => {
if (count < (this.tableList.length / 2) * this.lineHeight) {
this.animate = true
this.tableTop -= this.lineHeight;
count += this.lineHeight;
} else {
this.animate = false
this.tableTop = 0;
count = 0;
}
}, this.tableTimerInterval);
},
//
componentTimerFun() {
this.componentTimer = setInterval(() => {
this.bsGetProductProcess();
}, this.componentTimerInterval);
},
//rpx
getRpxToPx(rpx) {
// 使uni.getSystemInfoSync
const systemInfo = uni.getSystemInfoSync();
// 稿750rpx
const designWidth = 750;
// px
const screenWidth = systemInfo.screenWidth;
// 1rpxpx
const rpxToPx = screenWidth / (designWidth / rpx);
console.log(rpxToPx);
return rpxToPx;
}
}
}
</script>
<style lang="scss" scoped>
.virtualScroll {
width: 100%;
height: 560rpx;
}
.content {
width: 96%;
margin: 0 auto;
color: $uni-bg-color-app;
}
.title_view {
width: 100%;
font-size: 32rpx;
}
.table_body {
width: 100%;
margin-top: 15rpx;
}
.tr {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
box-sizing: border-box;
padding: 0 5px;
text-align: center;
font-size: 30rpx;
}
.tr1 {
width: 28%;
}
.tr2 {
width: 15%;
}
.tr3 {
width: 35%;
font-size: 24rpx;
}
.tr4 {
flex: 1;
}
.table_main_body {
width: 100%;
height: 480rpx;
overflow: hidden;
position: relative;
}
.table_inner_body {
width: 98%;
position: absolute;
left: 1%;
}
.animate{
transition: all .3s;
}
.table_tr {
display: flex;
align-items: center;
height: 140rpx;
color: $uni-bg-color-app;
font-size: 30rpx;
margin-bottom: 20rpx;
// box-shadow: 2rpx 2rpx 6rpx 1rpx rgba(0, 0, 0, .1),
// -2rpx -2rpx 6rpx 1rpx rgba(0, 0, 0, .1);
border-radius: 10rpx;
background: $uni-bg-color;
border: 2rpx solid #ccc;
}
</style>

+ 6
- 1
locale/ar.js View File

@ -144,7 +144,9 @@ export default {
"success": "إعادة الشحن نجحت",
"moneyEmpty": "يرجى ملء مبلغ الإعادة الشحن",
"AmountThan0": "يجب أن يكون مبلغ الإعادة الشحن أكبر من 0",
"payPassEmpty": "يرجى ملء رمز الدفع"
"payPassEmpty": "يرجى ملء رمز الدفع",
"copyAddress" : "نسخ العنوان",
"copySuccess" : "نسخ ناجح"
},
"withdraw": {
"title": "سحب",
@ -295,6 +297,9 @@ export default {
"10": "نوفمبر ",
"11": "ديسمبر ",
"day": "الإنجليزية اليوم{0}"
},
"virtualScroll" : {
"title" : "عرض الإيرادات للمكتب أو الوكالة"
}
}
}

+ 6
- 1
locale/en.js View File

@ -145,7 +145,9 @@ export default {
"moneyEmpty": "Please fill in the recharge amount",
"AmountThan0": "The recharge amount must be greater than 0",
"payPassEmpty": "Please fill in the payment code",
"orderId" : "Order number"
"orderId" : "Order number",
"copyAddress" : "Copy address",
"copySuccess" : "Successful replication"
},
"withdraw": {
"title": "Withdrawal",
@ -299,6 +301,9 @@ export default {
"10" : "November ",
"11" : "December ",
"day" : "Day {0}"
},
"virtualScroll" : {
"title" : "Agency revenue display"
}
}
}

+ 15
- 10
locale/es.js View File

@ -127,13 +127,13 @@ export default {
"fanList": "Lista de fans",
"cannotModified": "No puede ser modificado",
"winningRecord": "Registro de ganancias",
"loginRecord" : "Registro de entrada"
"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",
"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",
@ -145,7 +145,9 @@ export default {
"moneyEmpty": "Por favor, ingresa la cantidad de recarga",
"AmountThan0": "La cantidad de recarga debe ser mayor a 0",
"payPassEmpty": "Por favor, ingresa el código de pago",
"orderId" : "Número de pedido"
"orderId": "Número de pedido",
"copyAddress": "Copiar dirección",
"copySuccess": "Replicación exitosa"
},
"withdraw": {
"title": "Retiro",
@ -165,7 +167,7 @@ export default {
"warn": "Advertencia",
"warn-detail": "Debido a que sus fondos son grandes y exceden la cantidad de retiro de usuarios comunes, ¡considere actualizar su nivel VIP!",
"ok": "OK",
"address" : "Dirección de retiro"
"address": "Dirección de retiro"
},
"login": {
"username": "Nombre de usuario",
@ -301,7 +303,7 @@ export default {
"signIn": {
"title": "arcsky",
"sign": "{0} días consecutivos de fichajes este mes",
"SignSuccessfully" : "Registro exitoso",
"SignSuccessfully": "Registro exitoso",
"0": "Enero ",
"1": "Febrero ",
"2": "Marzo ",
@ -314,7 +316,10 @@ export default {
"9": "Octubre ",
"10": "Noviembre ",
"11": "Diciembre ",
"day" : "el {0} día"
"day": "el {0} día"
},
"virtualScroll": {
"title": "Mostrar ingresos de la agencia"
}
}
}

+ 6
- 1
locale/fr.js View File

@ -144,7 +144,9 @@ export default {
"success": "Recharge réussie",
"moneyEmpty": "Veuillez remplir le montant de recharge",
"AmountThan0": "Le montant de recharge doit être supérieur à 0",
"payPassEmpty": "Veuillez remplir le code de paiement"
"payPassEmpty": "Veuillez remplir le code de paiement",
"copyAddress" : "Copier l'adresse",
"copySuccess" : "Réplication réussie"
},
"withdraw": {
"title": "Retrait",
@ -295,6 +297,9 @@ export default {
"10": "Novembre ",
"11": "Décembre ",
"day": "Jour {0}"
},
"virtualScroll": {
"title": "Affichage des revenus de l'agence"
}
}
}

+ 9
- 5
locale/ru.js
File diff suppressed because it is too large
View File


+ 7
- 5
pages/home/home.vue View File

@ -36,6 +36,9 @@
<view class="menu-descript">{{ $t(`page.home.${menuTitles[index]}`) }}</view>
</view>
</view>
<!-- 虚拟滚动 -->
<virtualScroll></virtualScroll>
<!-- 会员等级信息 -->
<view class="member-list content">
@ -97,13 +100,15 @@
import center from '@/components/center/center.vue'
import serviceList from '@/components/serviceList/serviceList.vue'
import popUpWindow from '../../components/popUpWindow/popUpWindow.vue'
import virtualScroll from '../../components/virtualScroll/virtualScroll.vue'
export default {
components: {
sTabbar,
center,
serviceList,
popUpWindow
popUpWindow,
virtualScroll
},
data() {
return {
@ -123,7 +128,7 @@
es: "keySpanish",
"zh": "keyChinese"
},
showPopUp : true
showPopUp : uni.getStorageSync('clickPopUp') ? false : true
}
},
onShow() {
@ -264,11 +269,8 @@
width: 750rpx;
min-height: 100vh;
margin: 0 auto;
// background-color: black;
// background-image: url('@/static/home/bg.png');
background-size: 100%;
background-repeat: no-repeat;
// color: white;
padding-bottom: 200rpx;
.content {


+ 1
- 0
pages/login/login.vue View File

@ -111,6 +111,7 @@
if (res.code == 200) {
localStorage.setItem("userInfo", JSON.stringify(res.result.userInfo))
localStorage.setItem("token", res.result.token)
uni.removeStorageSync('clickPopUp'); //key
uni.navigateTo({
url: '/pages/home/home'
})


+ 1
- 1
pages/loginRecord/loginRecord.vue View File

@ -78,7 +78,7 @@
.loginRecord{
.title,
.value{
color: #fff;
color: $uni-bg-color-app;
&>view{
padding: 10rpx;
}


+ 35
- 1
pages/purse/purse.vue View File

@ -30,6 +30,12 @@
<view class="input content">
<input v-model="form.payPass" class="input content" type="password" :placeholder="$t('page.purse.security-pin')" />
</view>
<view class="input content">
<view class="address-info" style="margin-top: 20rpx;">
{{ userInfo.moneyAddress }}
</view>
<view @click="copy(userInfo.moneyAddress)" class="btn content">{{ $t('page.purse.copyAddress') }}</view>
</view>
<view class="input content" style="display: flex;">
@ -74,7 +80,8 @@
image : ''
},
serverList : [],
showService : false
showService : false,
userInfo: {}
}
},
onShow() {
@ -111,6 +118,7 @@
getUserInfo(){
this.request('userInfo').then(res => {
if(res.code == 200){
this.userInfo = res.result.userInfo
this.money = res.result.userInfo.money
}
})
@ -183,6 +191,19 @@
//
cleanForm(){
this.form = {}
},
//
copy(content) {
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: this.$t('page.purse.copySuccess'),
icon: 'none'
})
}
})
}
}
@ -296,6 +317,19 @@
align-items: center;
margin-left: 10rpx;
}
.address-info{
display: flex;
align-items: center;
box-sizing: border-box;
padding-left: 20rpx;
height: 80rpx;
border-radius: 10rpx;
background: #e9ecef;
font-size: 34rpx;
width: 96%;
margin: 0rpx auto 20rpx auto;
}
}
.btn{


+ 0
- 1
pages/withdraw/withdraw.vue View File

@ -260,7 +260,6 @@
border-radius: 10rpx;
background: #e9ecef;
font-size: 34rpx;
}
input{


Loading…
Cancel
Save