Browse Source

增加登陆页,注册页,找回密码页,首页,tabBar页面,修改部分uview代码

master
[liang] 3 years ago
parent
commit
ac9816ca6b
  1. 18
      App.vue
  2. 143
      components/navigation/navigation.vue
  3. 286
      components/tabBar/tabBar.vue
  4. 6
      main.js
  5. 2
      manifest.json
  6. 12
      package-lock.json
  7. 4
      package.json
  8. 28
      pages.json
  9. 259
      pages/index/index.vue
  10. 161
      pages/login/forget.vue
  11. 120
      pages/login/index.vue
  12. 237
      pages/login/register.vue
  13. 0
      pages/register/index.vue
  14. 13
      readme.md
  15. BIN
      static/home/ic_arrow_down.png
  16. BIN
      static/home/ic_arrow_up.png
  17. BIN
      static/home/ic_increase.png
  18. BIN
      static/home/ic_ma_arrow_down.png
  19. BIN
      static/home/ic_play.png
  20. BIN
      static/home/ic_proclamation.png
  21. BIN
      static/home/img_Mine.png
  22. BIN
      static/home/img_People.png
  23. BIN
      static/home/img_Speaker.png
  24. BIN
      static/home/img_Subcription.png
  25. BIN
      static/home/img_recharge.png
  26. BIN
      static/login/Checkbox_de.png
  27. BIN
      static/login/Checkbox_pr.png
  28. BIN
      static/login/Invitation_de.png
  29. BIN
      static/login/Invitation_pr.png
  30. BIN
      static/login/Password_de.png
  31. BIN
      static/login/Password_pr.png
  32. BIN
      static/login/WithdrawalPassword_de.png
  33. BIN
      static/login/WithdrawalPassword_pr.png
  34. BIN
      static/login/code_de.png
  35. BIN
      static/login/code_pr.png
  36. BIN
      static/login/email_de.png
  37. BIN
      static/login/email_pr.png
  38. BIN
      static/login/ic_tips.png
  39. BIN
      static/public/BG.png
  40. BIN
      static/public/back.png
  41. BIN
      static/tabBar/ic_charity_de.png
  42. BIN
      static/tabBar/ic_charity_pr.png
  43. BIN
      static/tabBar/ic_chart_de.png
  44. BIN
      static/tabBar/ic_chart_pr.png
  45. BIN
      static/tabBar/ic_home_de.png
  46. BIN
      static/tabBar/ic_home_pr.png
  47. BIN
      static/tabBar/ic_me_de.png
  48. BIN
      static/tabBar/ic_me_pr.png
  49. BIN
      static/tabBar/ic_subcription_de.png
  50. BIN
      static/tabBar/ic_subcription_pr.png
  51. BIN
      static/tabbar/dorder.png
  52. BIN
      static/tabbar/dorderS.png
  53. BIN
      static/tabbar/[email protected]
  54. BIN
      static/tabbar/[email protected]
  55. BIN
      static/tabbar/[email protected]
  56. BIN
      static/tabbar/[email protected]
  57. BIN
      static/tabbar/[email protected]
  58. BIN
      static/tabbar/[email protected]
  59. BIN
      static/tabbar/[email protected]
  60. BIN
      static/tabbar/[email protected]
  61. BIN
      static/tabbar/[email protected]
  62. BIN
      static/tabbar/[email protected]
  63. BIN
      static/tongyonh/Profile_icon.png
  64. BIN
      static/tongyonh/Profile_icona.png
  65. BIN
      static/tongyonh/Union.png
  66. BIN
      static/tongyonh/Uniona.png
  67. BIN
      static/tongyonh/market_icona.png
  68. BIN
      static/tongyonh/nft_icon.png
  69. BIN
      static/tongyonh/nft_icon2.png
  70. 9
      uni.scss
  71. 97
      utils/api.js
  72. 201
      utils/axios.js
  73. 14
      utils/constant.js
  74. 100
      utils/index.js
  75. 66
      utils/language/en.js
  76. 36
      utils/language/zh.js
  77. 110
      uview-ui/README.md
  78. 18
      uview-ui/changelog.md
  79. 2
      uview-ui/components/u--input/u--input.vue
  80. 4
      uview-ui/components/u-button/u-button.vue
  81. 5
      uview-ui/components/u-code-input/props.js
  82. 1
      uview-ui/components/u-code-input/u-code-input.vue
  83. 1
      uview-ui/components/u-form/u-form.vue
  84. 4
      uview-ui/components/u-image/u-image.vue
  85. 2
      uview-ui/components/u-line/props.js
  86. 4
      uview-ui/components/u-list/u-list.vue
  87. 5
      uview-ui/components/u-loading-page/props.js
  88. 7
      uview-ui/components/u-loading-page/u-loading-page.vue
  89. 16
      uview-ui/components/u-loadmore/props.js
  90. 11
      uview-ui/components/u-loadmore/u-loadmore.vue
  91. 4
      uview-ui/components/u-parse/node/node.vue
  92. 5
      uview-ui/components/u-picker/props.js
  93. 3
      uview-ui/components/u-picker/u-picker.vue
  94. 32
      uview-ui/components/u-row-notice/u-row-notice.vue
  95. 2
      uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue
  96. 2
      uview-ui/components/u-tooltip/u-tooltip.vue
  97. 4
      uview-ui/libs/config/config.js
  98. 1
      uview-ui/libs/config/props/codeInput.js
  99. 1
      uview-ui/libs/config/props/loadingPage.js
  100. 5
      uview-ui/libs/config/props/loadmore.js

18
App.vue

@ -19,18 +19,22 @@ export default {
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "uview-ui/index.scss";
/* #ifdef H5 */ /deep/body {
body { // max-width: 828rpx; //
max-width: 828rpx; // // margin: auto !important;
margin: auto !important; background: url(./static/public/BG.png) no-repeat fixed;
background-size: cover;
height: auto;
margin: 0;
} }
/* #endif */
@import "uview-ui/index.scss";
page { page {
margin-top: 50rpx color: #fff;
} }
button::after { button::after {

143
components/navigation/navigation.vue

@ -1,94 +1,93 @@
<template> <template>
<view class="nav-head"> <view class="nav-head">
<slot name="address"></slot> <image src="../../static/public/back.png" mode="aspectFit" class="back" @tap="back()" v-if="showBack"></image>
<slot name="left"></slot>
<slot></slot> <slot></slot>
<slot name="bread"></slot> <slot name="middle"></slot>
<slot name="logo"></slot> <slot name="right"></slot>
<image src="../../static/tongyonh/Vector.png" mode="aspectFit" class="back" @tap="back()" v-if="showBack"></image>
</view> </view>
</template> </template>
<script> <script>
const COMPONENT_NAME = 'navigation' const COMPONENT_NAME = 'navigation'
export default { export default {
name: COMPONENT_NAME, name: COMPONENT_NAME,
props:{ props: {
showBack: { showBack: {
type: Boolean, type: Boolean,
default () { default() {
return true return true
} }
},
bgnum: {
type: Boolean,
default () {
return false
}
},
}, },
data() { bgnum: {
return { type: Boolean,
default() {
return false
} }
}, },
computed: { },
data() {
return {
}, }
mounted() { },
computed: {
}, },
methods: { mounted() {
back(){
// #ifdef H5 },
history.back() methods: {
// #endif back() {
// #ifdef APP-PLUS // #ifdef H5
uni.navigateBack() history.back()
// #endif // #endif
}
// #ifdef APP-PLUS
uni.navigateBack()
// #endif
}
}, },
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.item {
font-size: 28rpx;
text-align: center;
width: 234rpx;
line-height: 60rpx;
}
.item{ .nav-head {
font-size: 28rpx; overflow: hidden;
text-align: center; position: relative;
width: 234rpx; top: 0rpx;
line-height: 60rpx; height: 112rpx;
} // background-color: #fafafa;
// background-color: #fff;
.nav-head{ text-align: center;
height: 40rpx; font-weight: 700;
// background-color: #fafafa; font-size: 36rpx;
// background-color: #fff; color: #fff;
text-align: center; // padding: 40rpx 16rpx;
font-weight: 700; margin-top: 88rpx;
font-size: 36rpx; display: flex;
color: #000; justify-content: center;
padding: 40rpx 16rpx; align-items: center;
// margin-top: 50rpx; width: 100%;
display: flex; z-index: 8;
justify-content: center; border-bottom: 4rpx solid #323045;
flex-direction: row-reverse;
align-items: center;
margin-top: 80rpx;
position: relative;
top: 0rpx;
width: 100%;
z-index: 8;
} }
.back{
width: 30rpx;
height: 30rpx;
position: absolute;
left:36rpx;
top: 50%;
transform: translateY(-50%);
}
.back {
width: 80rpx;
height: 80rpx;
position: absolute;
left: 36rpx;
top: 50%;
transform: translateY(-50%);
}
</style> </style>

286
components/tabBar/tabBar.vue

@ -1,195 +1,215 @@
<template> <template>
<view class="index-header "> <view class="index-header">
<view class="con"> <view class="con">
<view class="tabbar_item" @click="goToPage(1)"> <view class="tabbar_item" @click="goToPage(1)">
<view class="uni-tabbar_bd"> <view class="uni-tabbar_bd">
<view class="uni-tabbar_icon"> <view class="uni-tabbar_icon">
<image :src="'/static/tongyonh/'+(selectActive==1?'Uniona':'Union')+'.png'" mode="aspectFit" class="img1"></image> <image :src="`/static/tabBar/${selectActive == 1 ? 'ic_home_pr' : 'ic_home_de'}.png`"
</view> mode="aspectFit" class="img1"></image>
<view class="uni-tabbar_label" :class="['text', selectActive==1?'active':'']"> </view>
{{i18n.Wallet}} <view class="uni-tabbar_label" :class="['text', selectActive == 1 ? 'active' : '']">
</view> {{ i18n.Home }}
</view> </view>
</view> </view>
<view class="tabbar_item" @click="goToPage(2)" v-if="showNft"> </view>
<view class="tabbar_item" @click="goToPage(2)">
<view class="uni-tabbar_bd"> <view class="uni-tabbar_bd">
<view class="uni-tabbar_icon"> <view class="uni-tabbar_icon">
<image :src="'/static/tongyonh/'+(selectActive==2?'nft_icon2':'nft_icon')+'.png'" mode="aspectFit" class="img1"></image> <image :src="`/static/tabBar/${selectActive == 1 ? 'ic_charity_pr' : 'ic_charity_de'}.png`"
mode="aspectFit" class="img1"></image>
</view> </view>
<view class="uni-tabbar_label" :class="['text', selectActive==2?'active':'']"> <view class="uni-tabbar_label" :class="['text', selectActive == 2 ? 'active' : '']">
{{i18n.NFT}} {{ i18n.Markets }}
</view> </view>
</view> </view>
</view> </view>
<view class="tabbar_item" @click="goToPage(3)"> <view class="tabbar_item" @click="goToPage(3)">
<view class="uni-tabbar_bd"> <view class="uni-tabbar_bd">
<view class="uni-tabbar_icon"> <view class="uni-tabbar_icon">
<image :src="'/static/tongyonh/'+(selectActive==3?'market_icona':'market_icon')+'.png'" mode="aspectFit" class="img1"></image> <image :src="`/static/tabBar/${selectActive == 1 ? 'ic_chart_pr' : 'ic_chart_de'}.png`"
mode="aspectFit" class="img1"></image>
</view> </view>
<view class="uni-tabbar_label" :class="['text', selectActive==3?'active':'']"> <view class="uni-tabbar_label" :class="['text', selectActive == 3 ? 'active' : '']">
{{i18n.Market}} {{ i18n.Charity }}
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="tabbar_item" @click="goToPage(4)"> <view class="tabbar_item" @click="goToPage(4)">
<view class="uni-tabbar_bd"> <view class="uni-tabbar_bd">
<view class="uni-tabbar_icon"> <view class="uni-tabbar_icon">
<image :src="'/static/tongyonh/'+(selectActive==4?'Discover_icona':'Discover_icon')+'.png'" mode="aspectFit" class="img1"></image> <image :src="`/static/tabBar/${selectActive == 1 ? 'ic_home_pr' : 'ic_home_de'}.png`"
mode="aspectFit" class="img1"></image>
</view> </view>
<view class="uni-tabbar_label" :class="['text', selectActive==4?'active':'']"> <view class="uni-tabbar_label" :class="['text', selectActive == 4 ? 'active' : '']">
{{i18n.Discover}} {{ i18n.Subscription }}
</view> </view>
</view> </view>
</view> --> </view>
<view class="tabbar_item" @click="goToPage(5)"> <view class="tabbar_item" @click="goToPage(5)">
<view class="uni-tabbar_bd"> <view class="uni-tabbar_bd">
<view class="uni-tabbar_icon"> <view class="uni-tabbar_icon">
<image :src="'/static/tongyonh/'+(selectActive==5?'Profile_icon':'Profile_icona')+'.png'" mode="aspectFit" class="img1"></image> <image :src="`/static/tabBar/${selectActive == 1 ? 'ic_me_pr' : 'ic_me_de'}.png`"
mode="aspectFit" class="img1"></image>
</view> </view>
<view class="uni-tabbar_label" :class="['text', selectActive==5?'active':'']"> <view class="uni-tabbar_label" :class="['text', selectActive == 5 ? 'active' : '']">
{{i18n.Profile}} {{ i18n.Me }}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
const COMPONENT_NAME = 'tabBar' const COMPONENT_NAME = 'tabBar'
export default { export default {
name: COMPONENT_NAME, name: COMPONENT_NAME,
props: { props: {
selectActive: { selectActive: {
type: Number, type: Number,
default () { default() {
return 1 return 1
} }
}, },
}, },
data() { data() {
return { return {
showNft:null, status: '',
status:'', address: '',
address:'', }
} },
}, computed: {
computed: {
}, },
mounted() { mounted() {
this.showNft=uni.getStorageSync('showNft') },
console.log(this.showNft,78787878787878787878787878787878) methods: {
},
methods: {
goToPage(num) { goToPage(num) {
if(num == 1) { let url = '/pages/index/index';
uni.reLaunch({ switch (+num) {
url: '/pages/menu/wallet/index' case 1:
}) url = '/pages/index/index';
break;
} else if (num == 2) { case 2:
uni.reLaunch({ url = '/pages/markets/index';
url: '/pages/menu/collection/index' break;
}) case 3:
} else if (num == 3) { url = '/pages/charity/index';
uni.reLaunch({ break;
url: '/pages/menu/market/index' case 4:
}) url = '/pages/subscription/index';
}else if (num == 4) { break;
uni.reLaunch({ case 5:
url: '/pages/menu/discover/index' url = '/pages/me/index';
}) break;
}else if (num == 5) {
uni.reLaunch({
url: '/pages/menu/profile/index'
})
}
default:
break;
} }
uni.reLaunch({
url: '/pages/menu/profile/index'
})
}
}, },
computed: { computed: {
i18n() { i18n() {
return this.$t('index') return this.$t('tabBar')
}, },
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.active{ .active {
color: #5B53FF !important; color: $mainColor !important;
}
.uni-tabbar_label {
color: rgb(153, 153, 153);
font-size: 10px;
line-height: normal;
margin-top: 3px;
position: relative;
text-align: center;
font-size: 20rpx !important;
} }
.uni-tabbar_icon{
width: 24px !important; .uni-tabbar_label {
height: 24px !important; color: #A1A0A8;
position: relative; font-size: 10px;
display: inline-block; line-height: normal;
margin-top: 5px; margin-top: 3px;
} position: relative;
.uni-tabbar_icon image { text-align: center;
width: 100%; font-size: 24rpx !important;
height: 100%;
} }
.uni-tabbar_bd{
height: 100rpx; .uni-tabbar_icon {
position: relative; width: 48rpx !important;
-webkit-flex-direction: column; height: 48rpx !important;
flex-direction: column; position: relative;
cursor: pointer; display: inline-block;
} margin-top: 5px;
.con{ }
.uni-tabbar_icon image {
width: 100%;
height: 100%;
}
.uni-tabbar_bd {
height: 100rpx;
position: relative;
-webkit-flex-direction: column;
flex-direction: column;
cursor: pointer;
}
.con {
width: 100%; width: 100%;
background-color: rgb(247, 247, 250); height: 166rpx;
position: fixed; background-color: #323045;
bottom: 0; position: fixed;
left: 0; bottom: 0;
padding-top: 28rpx; left: 0;
padding-bottom: 30rpx ; padding-top: 22rpx;
background-image: -webkit-linear-gradient(bottom, #FAF8F8, #FFFFFF) !important; display: flex;
background-image: linear-gradient(to top, #FAF8F8, #FFFFFF) !important; z-index: 998;
border-top: 2rpx solid #F7F4F4; box-sizing: border-box;
display: flex;
z-index: 998; &::after {
box-sizing: border-box; display: block;
position: absolute;
content: '';
background: #fff;
width: 268rpx;
height: 10rpx;
border-radius: 10rpx;
top: 140rpx;
left: 242rpx;
}
} }
.tabbar_item{
.tabbar_item {
display: -webkit-box; display: -webkit-box;
width: 150rpx; width: 150rpx;
height: 100rpx; height: 100rpx;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
-webkit-box-pack: center; -webkit-box-pack: center;
-webkit-justify-content: center; -webkit-justify-content: center;
justify-content: center; justify-content: center;
-webkit-box-align: center; -webkit-box-align: center;
-webkit-align-items: center; -webkit-align-items: center;
align-items: center; align-items: center;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-box-direction: normal; -webkit-box-direction: normal;
webkit-flex-direction: column; webkit-flex-direction: column;
flex-direction: column; flex-direction: column;
-webkit-box-flex: 1; -webkit-box-flex: 1;
-webkit-flex: 1; -webkit-flex: 1;
flex: 1; flex: 1;
font-size: 0; font-size: 0;
text-align: center; text-align: center;
-webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
</style> </style>

6
main.js

@ -12,10 +12,10 @@ import ZH from './utils/language/zh.js'
// 自定义底部导航栏 // 自定义底部导航栏
// import tabBar from 'components/tabBar/tabBar.vue' import tabBar from 'components/tabBar/tabBar.vue'
// Vue.component('tab-bar', tabBar) Vue.component('tab-bar', tabBar)
Vue.use(uView) Vue.use(uView);
uni.$u.config.unit = 'rpx' uni.$u.config.unit = 'rpx'
Vue.use(VueI18n); Vue.use(VueI18n);

2
manifest.json

@ -1,5 +1,5 @@
{ {
"name" : "massfitnes", "name" : "samehome",
"appid" : "__UNI__2B017B1", "appid" : "__UNI__2B017B1",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",

12
package-lock.json

@ -1,5 +1,5 @@
{ {
"name": "massfitnes", "name": "samehome",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
@ -93,6 +93,11 @@
"mime-types": "^2.1.12" "mime-types": "^2.1.12"
} }
}, },
"js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"mime-db": { "mime-db": {
"version": "1.52.0", "version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
@ -111,6 +116,11 @@
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
}, },
"uview-ui": {
"version": "2.0.33",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.33.tgz",
"integrity": "sha512-M3NsLFAY0z95NGMnTCDUR/TvJb6a/UYZzi1km5Gi6TkBCaoHdbmtQymkc1C4eszeoQOrpEIhit/2V47UglzHRw=="
},
"vue-i18n": { "vue-i18n": {
"version": "9.2.2", "version": "9.2.2",
"resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz", "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-9.2.2.tgz",

4
package.json

@ -1,5 +1,5 @@
{ {
"name": "massfitnes", "name": "samehome",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "main.js", "main": "main.js",
@ -11,6 +11,8 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"js-md5": "^0.7.3",
"uview-ui": "^2.0.33",
"vue-i18n": "^9.2.2" "vue-i18n": "^9.2.2"
} }
} }

28
pages.json

@ -1,14 +1,36 @@
{ {
"easycom": { "easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ //pages "pages": [ //pages
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/login/forget",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/login/register",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@ -19,8 +41,8 @@
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#15141F",
"backgroundColor": "#F8F8F8", "backgroundColor": "#15141F",
"style": { "style": {
"app-plus": { "app-plus": {
"titleNView": false "titleNView": false

259
pages/index/index.vue

@ -1,51 +1,252 @@
<template> <template>
<view class="content"> <view class="main">
<view class="text-area"> <view class="nav-head">
<text class="title">{{title}}</text> <view class="title">{{ i18n.HOME }}</view>
<u-button class="button" color="#323045">{{ i18n.customerService }}</u-button>
</view> </view>
<u-swiper class="swiper" :list="swiperList" previousMargin="48rpx" nextMargin="80rpx" circular :autoplay="true"
radius="32rpx" bgColor="rgba(0,0,0,0)" height="360rpx"></u-swiper>
<view class="message">
<u-icon class="icon" name="../../static/home/ic_proclamation.png" size="60rpx" width="60rpx"></u-icon>
<view class="text">{{ i18n.homeMessage }}</view>
</view>
<view class="btnDiv">
<view class="item">
<u--image class="img" :showLoading="true" src="../../static/home/img_recharge.png" width="144rpx"
height="144rpx" @click="click"></u--image>
<view class="text">{{ i18n.Recharge }}</view>
</view>
<view class="item">
<u--image class="img" :showLoading="true" src="../../static/home/img_Mine.png" width="144rpx"
height="144rpx" @click="click"></u--image>
<view class="text">{{ i18n.Mine }}</view>
</view>
<view class="item">
<u--image class="img" :showLoading="true" src="../../static/home/img_Subcription.png" width="144rpx"
height="144rpx" @click="click"></u--image>
<view class="text">{{ i18n.Subcription }}</view>
</view>
</view>
<view class="steps">
<view class="content">
<view class="title">{{ i18n.TodaySteps }}</view>
<u-button class="button" color="#00E8A2">{{ i18n.ReceiveEarnings }}</u-button>
</view>
</view>
<view v-for="(item, index) in videoList" :key="index">
<video class="video" :id="`video-${index}`" :enable-progress-gesture="false" :src="item.url"
:poster="item.poster" :title="item.title" controls @play="stopOtherVideoPlay" :key="index" ></video>
</view>
<tab-bar :selectActive="1"></tab-bar>
</view> </view>
</template> </template>
<script> <script>
export default { let videoPlayerObj = {};
data() { export default {
return { name: 'home',
title: 'Hello' data() {
} return {
}, swiperList: [
onLoad() { 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
}, 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
methods: { ],
videoList: [
{
url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
title: '昨夜星辰昨夜风,画楼西畔桂堂东',
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
},
{
url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
title: '昨夜星辰昨夜风,画楼西畔桂堂东',
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
},
{
url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
title: '昨夜星辰昨夜风,画楼西畔桂堂东',
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
},
{
url: 'https://cdn.uviewui.com/uview/resources/video.mp4',
title: '昨夜星辰昨夜风,画楼西畔桂堂东',
poster: 'https://cdn.uviewui.com/uview/swiper/swiper1.png'
},
],
}
},
onLoad() {
},
onShow() {
//
this.videoList.forEach((item, index) => {
const VideoPlayer = uni.createVideoContext(`video-${index}`, this)
videoPlayerObj[`video-${index}`] = VideoPlayer
});
},
onHide() {
this.stopAllVideoPlay()
},
computed: {
i18n() {
return this.$t('home')
} }
},
methods: {
/**
* 在播放视频是暂停其他视频
* @param {*} e
*/
stopOtherVideoPlay(e) {
const keyArr = Object.keys(videoPlayerObj)
keyArr.forEach(item => {
if (item !== e.target.id) {
videoPlayerObj[item].pause()
}
});
},
/**
* 在跳转其他页面时是暂停全部视频
* @param {*} e
*/
stopAllVideoPlay() {
const keyArr = Object.keys(videoPlayerObj)
keyArr.forEach(item => {
videoPlayerObj[item].pause()
});
},
} }
}
</script> </script>
<style lang="scss"> <style lang="scss">
.content { .main {
.nav-head {
overflow: hidden;
position: relative;
top: 0rpx;
height: 112rpx;
// text-align: center;
font-weight: 700;
font-size: 36rpx;
color: #fff;
margin-top: 88rpx;
display: flex; display: flex;
flex-direction: column; // justify-content: space-between;
align-items: center; align-items: center;
justify-content: center; width: 100%;
z-index: 8;
border-bottom: 4rpx solid #323045;
.title {
margin-left: 48rpx;
}
.button {
width: 286rpx;
height: 70rpx;
line-height: 70rpx;
border-radius: 90rpx;
font-size: 28rpx;
color: #F2FE8D !important;
padding: 0;
margin-right: 24rpx;
}
} }
.logo { .swiper {
height: 200rpx; margin-top: 32rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
} }
.text-area { .message {
display: flex; margin: 24rpx 24rpx 32rpx;
justify-content: center; height: 96rpx;
background: #211F32;
border-radius: 16rpx;
.icon {
display: inline-block;
vertical-align: top;
margin: 18rpx 20rpx;
}
.text {
display: inline-block;
margin-top: 18rpx;
height: 68rpx;
width: 574rpx;
font-size: 24rpx;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
white-space: normal !important;
//4
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
} }
.title { .btnDiv {
font-size: 36rpx; margin: 32rpx 48rpx;
color: #8f8f94;
.item {
display: inline-block;
width: 218rpx;
text-align: center;
.img {
margin: 0 36rpx 16rpx;
}
}
} }
.steps {
margin: 0 32rpx;
width: 686rpx;
height: 472rpx;
background-color: #211F32;
background-image: url(../../static/home/img_People.png);
background-repeat: no-repeat;
background-size: contain;
border-radius: 16px;
.content {
margin-left: 246rpx;
height: 100%;
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
.title {
font-size: 48rpx;
height: 64rpx;
line-height: 64rpx;
}
.button {
width: 386rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 40rpx;
font-size: 24rpx;
color: #15141F !important;
padding: 0;
margin-right: 24rpx;
}
}
}
.video {
margin: 32rpx 32rpx 0;
width: 686rpx;
height: 360rpx;
border-radius: 32rpx;
}
}
</style> </style>

161
pages/login/forget.vue

@ -0,0 +1,161 @@
<template>
<view class="main">
<navigation>{{ i18n.ForgotPassword }}</navigation>
<view class="body">
<u--form class="form" :model="userInfo" :rules="rules" ref="form1" errorType="toast">
<!-- 邮箱 -->
<u-form-item class="input-item" prop="email" ref="item1">
<u-icon class="icon"
:name="userInfo.email ? '../../static/login/email_pr.png' : '../../static/login/email_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.email" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.emailInputText">
</u-input>
</u-form-item>
<!-- 验证码 -->
<u-form-item class="input-item vCode" prop="verificationCode" ref="item1">
<u-icon class="icon"
:name="userInfo.verificationCode ? '../../static/login/code_pr.png' : '../../static/login/code_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.verificationCode" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.registerWelcomeText" maxlength="6">
</u-input>
<u-button class="getVCodeBtn" color="#323045">Get code</u-button>
</u-form-item>
<!-- 密码 -->
<u-form-item class="input-item" prop="password" ref="item1">
<u-icon class="icon"
:name="userInfo.password ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.password" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.passwordText">
</u-input>
</u-form-item>
<!-- 重复密码 -->
<u-form-item class="input-item" prop="confirmPassword" ref="item1">
<u-icon class="icon"
:name="userInfo.confirmPassword ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.confirmPassword" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.confirmPasswordText">
</u-input>
</u-form-item>
</u--form>
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="!agreeFlag">{{ i18n.Save }}
</u-button>
</view>
</view>
</template>
<script>
import UButton from '../../uview-ui/components/u-button/u-button.vue'
export default {
name: "ForgotPassword",
data() {
return {
userInfo: {
name: "",
password: "",
},
rules: {
email: {
type: "string",
required: true,
message: this.$t("login.emailInputMessage"),
trigger: ["blur", "change"],
},
verificationCode: {
type: "string",
required: true,
message: this.$t("login.verificationCodeMessage"),
trigger: ["blur", "change"]
},
password: {
type: "string",
required: true,
message: this.$t("login.passwordInputMessage"),
trigger: ["blur", "change"]
},
},
agreeFlag: false,
};
},
computed: {
i18n() {
return this.$t("login");
},
},
onLoad() {
// console.log(this.$t('login.emailInputMessage'));
},
onShow() { },
methods: {},
components: { UButton }
}
</script>
<style lang="scss">
.main {
.body {
padding: 0 64rpx;
overflow: hidden;
.form {
font-size: 32rpx;
margin-top: 48rpx;
.input-item {
height: 112rpx;
line-height: 112rpx;
background: #211F32;
margin-bottom: 48rpx;
border-radius: 32rpx;
.icon {
margin: 0 24rpx;
}
/deep/.u-form-item__body {
padding: 0;
}
.input {
height: 112rpx;
}
}
.vCode {
.getVCodeBtn {
// position: absolute;
width: 154rpx;
height: 56rpx;
right: 28rpx;
// top: 14px;
border-radius: 8px;
line-height: 56rpx;
font-size: 24rpx;
color: #00E8A2 !important;
padding: 0;
}
}
}
.button {
margin-top: 64rpx;
height: 112rpx;
line-height: 112rpx;
border-radius: 32rpx;
font-size: 32rpx;
color: #15141F !important;
}
}
}
</style>

120
pages/login/index.vue

@ -1,13 +1,28 @@
<template> <template>
<view class="main"> <view class="main">
111
<view class="welcomeText">{{ i18n.welcomeText }}</view> <view class="welcomeText">{{ i18n.welcomeText }}</view>
<view class="signInText">{{ i18n.signInText }}</view> <view class="signInText">{{ i18n.signInText }}</view>
<u-form labelPosition="left" :model="model1" :rules="rules" ref="form1"> <u--form class="form" :model="userInfo" :rules="rules" ref="form1" errorType="toast">
<u-form-item prop="userInfo.name" borderBottom ref="item1"> <u-form-item class="input-item" prop="email" ref="item1">
<u-input v-model="model1.userInfo.name"></u-input> <u-icon class="icon"
:name="userInfo.email ? '../../static/login/email_pr.png' : '../../static/login/email_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.email" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.emailInputText">
</u-input>
</u-form-item> </u-form-item>
</u-form> <u-form-item class="input-item" prop="password" ref="item1">
<u-icon class="icon"
:name="userInfo.password ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.password" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.passwordInputText">
</u-input>
</u-form-item>
</u--form>
<navigator class="forget" url="./forget">{{ i18n.forgotText }}</navigator>
<u-button class="button" color="#00E8A2">{{ i18n.Login }}</u-button>
<view class="signUp">{{ i18n.notAccountText }}<navigator class="navigator" url="./register">{{ i18n.SignUp }}</navigator></view>
</view> </view>
</template> </template>
@ -17,7 +32,24 @@ export default {
name: 'login', name: 'login',
data() { data() {
return { return {
userInfo: {
name: '',
password: '',
},
rules: {
email: {
type: 'string',
required: true,
message: this.$t('login.emailInputMessage'),
trigger: ['blur', 'change'],
},
password: {
type: 'string',
required: true,
message: this.$t('login.passwordInputMessage'),
trigger: ['blur', 'change']
},
},
} }
}, },
computed: { computed: {
@ -26,7 +58,7 @@ export default {
}, },
}, },
onLoad() { onLoad() {
console.log(this.i18n); // console.log(this.$t('login.emailInputMessage'));
}, },
onShow() { }, onShow() { },
methods: { methods: {
@ -37,4 +69,78 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.main {
padding: 0 64rpx;
overflow: hidden;
.welcomeText {
margin-top: 240rpx;
font-size: 48rpx;
font-weight: 800;
text-align: center;
}
.signInText {
font-size: 32rpx;
text-align: center;
color: #A2A0A8;
}
.form {
font-size: 32rpx;
margin-top: 48rpx;
.input-item {
height: 112rpx;
line-height: 112rpx;
background: #211F32;
margin-bottom: 48rpx;
border-radius: 32rpx;
&:nth-child(2) {
margin-bottom: 38rpx;
}
.icon {
margin: 0 24rpx;
}
/deep/.u-form-item__body {
padding: 0;
}
.input {
height: 112rpx;
}
}
}
.forget {
font-size: 32rpx;
text-align: right;
color: #00E8A2;
cursor: pointer;
}
.button {
margin-top: 64rpx;
height: 112rpx;
line-height: 112rpx;
border-radius: 32rpx;
font-size: 32rpx;
color:#15141F !important;
}
.signUp {
margin: 48rpx 0;
text-align: center;
font-size: 32rpx;
navigator {
display: inline;
color: #00E8A2;
padding: 0 10rpx;
}
}
}
</style> </style>

237
pages/login/register.vue

@ -0,0 +1,237 @@
<template>
<view class="main">
<navigation>{{ i18n.SignUp }}</navigation>
<view class="body">
<view class="welcomeText">{{ i18n.registerWelcomeText }}</view>
<view class="signInText">{{ i18n.registerCreate }}</view>
<u--form class="form" :model="userInfo" :rules="rules" ref="form1" errorType="toast">
<!-- 邮箱 -->
<u-form-item class="input-item" prop="email" ref="item1">
<u-icon class="icon"
:name="userInfo.email ? '../../static/login/email_pr.png' : '../../static/login/email_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.email" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.emailInputText">
</u-input>
</u-form-item>
<!-- 验证码 -->
<u-form-item class="input-item vCode" prop="verificationCode" ref="item1">
<u-icon class="icon"
:name="userInfo.verificationCode ? '../../static/login/code_pr.png' : '../../static/login/code_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.verificationCode" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.registerWelcomeText" maxlength="6">
</u-input>
<u-button class="getVCodeBtn" color="#323045">Get code</u-button>
</u-form-item>
<!-- 密码 -->
<u-form-item class="input-item" prop="password" ref="item1">
<u-icon class="icon"
:name="userInfo.password ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.password" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.passwordText">
</u-input>
</u-form-item>
<!-- 重复密码 -->
<u-form-item class="input-item" prop="confirmPassword" ref="item1">
<u-icon class="icon"
:name="userInfo.confirmPassword ? '../../static/login/Password_pr.png' : '../../static/login/Password_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.confirmPassword" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.confirmPasswordText">
</u-input>
</u-form-item>
<!-- 取款密码 -->
<u-form-item class="input-item" prop="withdrawalPassword" ref="item1">
<u-icon class="icon"
:name="userInfo.withdrawalPassword ? '../../static/login/WithdrawalPassword_pr.png' : '../../static/login/WithdrawalPassword_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.withdrawalPassword" color="#fff" fontSize="32rpx"
border="none" :placeholder="i18n.withdrawalPasswordText">
</u-input>
</u-form-item>
<!-- 邀请码 -->
<u-form-item class="input-item" prop="InvitationCode" ref="item1">
<u-icon class="icon"
:name="userInfo.InvitationCode ? '../../static/login/Invitation_pr.png' : '../../static/login/Invitation_de.png'"
size="48rpx" width="48rpx"></u-icon>
<u-input class="input" v-model="userInfo.InvitationCode" color="#fff" fontSize="32rpx" border="none"
:placeholder="i18n.InvitationCodeText">
</u-input>
</u-form-item>
</u--form>
<view class="agree">
<u-icon class="check" @click="agreeFlag = !agreeFlag"
:name="agreeFlag ? '../../static/login/Checkbox_pr.png' : '../../static/login/Checkbox_de.png'"
size="48rpx" width="48rpx"></u-icon>
<view class="text">{{ i18n.agreeText }}<span>{{ i18n.Terms }}</span>{{ i18n.and }}<span>{{
i18n.Conditions
}}</span></view>
</view>
<u-button class="button" color="#00E8A2" throttleTime="500" :disabled="!agreeFlag">{{ i18n.SignUp }}
</u-button>
<view class="signUp">{{ i18n.haveAccount }}<navigator class="navigator" url="./index">{{ i18n.Login }}
</navigator>
</view>
</view>
</view>
</template>
<script>
import UButton from '../../uview-ui/components/u-button/u-button.vue'
export default {
name: "register",
data() {
return {
userInfo: {
name: "",
password: "",
},
rules: {
email: {
type: "string",
required: true,
message: this.$t("login.emailInputMessage"),
trigger: ["blur", "change"],
},
verificationCode: {
type: "string",
required: true,
message: this.$t("login.verificationCodeMessage"),
trigger: ["blur", "change"]
},
password: {
type: "string",
required: true,
message: this.$t("login.passwordInputMessage"),
trigger: ["blur", "change"]
},
},
agreeFlag: false,
};
},
computed: {
i18n() {
return this.$t("login");
},
},
onLoad() {
// console.log(this.$t('login.emailInputMessage'));
},
onShow() { },
methods: {},
components: { UButton }
}
</script>
<style lang="scss">
.main {
.body {
padding: 0 64rpx;
overflow: hidden;
.welcomeText {
margin-top: 48rpx;
font-size: 48rpx;
font-weight: 800;
text-align: center;
}
.signInText {
font-size: 32rpx;
text-align: center;
color: #A2A0A8;
}
.form {
font-size: 32rpx;
margin-top: 48rpx;
.input-item {
height: 112rpx;
line-height: 112rpx;
background: #211F32;
margin-bottom: 48rpx;
border-radius: 32rpx;
.icon {
margin: 0 24rpx;
}
/deep/.u-form-item__body {
padding: 0;
}
.input {
height: 112rpx;
}
}
.vCode {
.getVCodeBtn {
// position: absolute;
width: 154rpx;
height: 56rpx;
right: 28rpx;
// top: 14px;
border-radius: 8px;
line-height: 56rpx;
font-size: 24rpx;
color: #00E8A2 !important;
padding: 0;
}
}
}
.agree {
font-size: 28rpx;
.check {
display: inline-block;
vertical-align: top;
margin-right: 32rpx;
}
.text {
display: inline-block;
width: 542rpx;
}
span {
cursor: pointer;
color: #00E8A2;
padding: 0 10rpx;
}
}
.button {
margin-top: 64rpx;
height: 112rpx;
line-height: 112rpx;
border-radius: 32rpx;
font-size: 32rpx;
color: #15141F !important;
}
.signUp {
margin: 48rpx 0;
text-align: center;
font-size: 32rpx;
.navigator {
display: inline;
color: #00E8A2;
padding: 0 10rpx;
}
}
}
}
</style>

0
pages/register/index.vue

13
readme.md

@ -0,0 +1,13 @@
从git下拉带代码后
项目中的 \node_modules\uview-ui\components\u-form\u-form.vue 第17行要添加下面这行代码
this.errorType === 'toast' ?uni.$u.toast(errors[0].message):
添加后是这样的:
if (uni.$u.test.array(errors)) {
errorsRes.push(...errors);
childErrors.push(...errors);
}
this.errorType === 'toast' ?uni.$u.toast(errors[0].message):
child.message =
childErrors[0]?.message ?? null;

BIN
static/home/ic_arrow_down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

BIN
static/home/ic_arrow_up.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

BIN
static/home/ic_increase.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/home/ic_ma_arrow_down.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 B

BIN
static/home/ic_play.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
static/home/ic_proclamation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
static/home/img_Mine.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
static/home/img_People.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

BIN
static/home/img_Speaker.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
static/home/img_Subcription.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
static/home/img_recharge.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
static/login/Checkbox_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/login/Checkbox_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/login/Invitation_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/login/Invitation_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/login/Password_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/login/Password_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/login/WithdrawalPassword_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/login/WithdrawalPassword_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/login/code_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/login/code_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/login/email_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/login/email_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/login/ic_tips.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
static/public/BG.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 KiB

BIN
static/public/back.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

BIN
static/tabBar/ic_charity_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tabBar/ic_charity_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tabBar/ic_chart_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

BIN
static/tabBar/ic_chart_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

BIN
static/tabBar/ic_home_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/tabBar/ic_home_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/tabBar/ic_me_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/tabBar/ic_me_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/tabBar/ic_subcription_de.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
static/tabBar/ic_subcription_pr.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

BIN
static/tabbar/dorder.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 847 B

BIN
static/tabbar/dorderS.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 834 B

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1011 B

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

BIN
static/tabbar/[email protected]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
static/tongyonh/Profile_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tongyonh/Profile_icona.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/tongyonh/Union.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tongyonh/Uniona.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/tongyonh/market_icona.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/tongyonh/nft_icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tongyonh/nft_icon2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

9
uni.scss

@ -17,10 +17,11 @@
/* 颜色变量 */ /* 颜色变量 */
$u-type-warning: #F2FE8D;
$u-type-success: #00E8A2; $assistYellow: #F2FE8D;
$u-type-error: #F4506A; $mainColor: #00E8A2;
$u-type-info: #A1A0A8; $assistRed: #F4506A;
$assistGrey: #A1A0A8;
/* 行为相关颜色 */ /* 行为相关颜色 */
$uni-color-primary: #007aff; $uni-color-primary: #007aff;
$uni-color-success: #4cd964; $uni-color-success: #4cd964;

97
utils/api.js

@ -1,28 +1,81 @@
import Vue from 'vue'; import Vue from 'vue';
import qs from 'qs' import qs from 'qs'
const api = { const api = {
//获取NFT项目列表 //---------------------------------account---------------------------------
getNftProjectList: (params) => Vue.prototype.$axios.get('/api/nft/getNftProjectList?' + qs.stringify(params)), siteInfo: () => Vue.prototype.$axios.get('/api/home/siteInfo'),
//添加NFT收藏品 register: (params) => Vue.prototype.$axios.post('/api/home/register',params),
addNftCollection: (params) => Vue.prototype.$axios.post('/api/nft/addNftCollection', qs.stringify(params)), login: (params) => Vue.prototype.$axios.post('/api/user/login',params),
getNftCollectionList: (params) => Vue.prototype.$axios.get('/api/nft/getNftCollectionList?' + qs.stringify( loginOut: (params) => Vue.prototype.$axios.post('/api/user/loginOut',params),
params)), forgotPassword: (params) => Vue.prototype.$axios.post('/api/user/forgotPassword',params),
getContractInfoList: (params) => Vue.prototype.$axios.get('/api/contract/getContractInfoList?' + qs.stringify(params)), updatePassword: (params) => Vue.prototype.$axios.post('/api/user/updatePassword',params),
//获取汇率 userInfo: (params) => Vue.prototype.$axios.post('/api/user/userInfo',params),
getCoinRate: (params) => Vue.prototype.$axios.get('/api/coinRate/getCoinRate?' + qs.stringify(params)), updateNickname: (params) => Vue.prototype.$axios.post('/api/user/updateNickname',params),
getChainDataList: (params) => Vue.prototype.$axios.get('/api/chainData/getChainDataList?' + qs.stringify(params)), updateGender: (params) => Vue.prototype.$axios.post('/api/user/updateGender',params),
getCoinTickerList: (params) => Vue.prototype.$axios.get('/api/coinTicker/getCoinTickerList'),
getBalance: (params) => Vue.prototype.$axios.get('/api/balance/getBalance?' + qs.stringify(params)),
versionUpgrade: (params) => Vue.prototype.$axios.get('/api/home/versionUpgrade?' + qs.stringify(params)), //--------------------------------- free ---------------------------------
checkIp: () => Vue.prototype.$axios.get('/x/resource/ip'), imgCode: () => Vue.prototype.$axios.get('/api/home/imgCode'),
getConfig: (params) => Vue.prototype.$axios.get('/api/home/getConfig?'+ qs.stringify(params)), sendSmsCode: (params) => Vue.prototype.$axios.post('/api/home/sendSmsCode',params),
//--------------------------------- free --------------------------------- article: (params) => Vue.prototype.$axios.post('/api/index/article',params),
getSearchContract: (params) => Vue.prototype.$axios.get('/api/contract/getSearchContract?' + qs.stringify(params)), appVersion: (params) => Vue.prototype.$axios.post('/api/index/appVersion',params),
getAuAdList: (params) => Vue.prototype.$axios.get('/api/home/getAuAdList?'+ qs.stringify(params)), info: () => Vue.prototype.$axios.post('/api/index/info'),
// 令牌token接口 //--------------------------------- bet ---------------------------------
addTokenInfo: (params) => Vue.prototype.$axios.post('/api/token/addTokenInfo', qs.stringify(params)), lotteryClassList: (params) => Vue.prototype.$axios.post('/api/lottery/lotteryClassList',params),
} nextLotteryPeriod: (params) => Vue.prototype.$axios.post('/api/lottery/nextLotteryPeriod',params),
bettingConfig: (params) => Vue.prototype.$axios.post('/api/lottery/bettingConfig',params),
betting: (params) => Vue.prototype.$axios.post('/api/lottery/betting',params),
lotteryRecords: (params) => Vue.prototype.$axios.post('/api/lottery/lotteryRecords',params),
myLotteryRecords: (params) => Vue.prototype.$axios.post('/api/lottery/myLotteryRecords',params),
//--------------------------------- me ---------------------------------
getPayType: (params) => Vue.prototype.$axios.post('/api/recharge/getPayType',params),
rechargeConfig: (params) => Vue.prototype.$axios.post('/api/recharge/rechargeConfig',params),
recharge: (params) => Vue.prototype.$axios.post('/api/recharge/recharge',params),
rechargeList: (params) => Vue.prototype.$axios.post('/api/recharge/rechargeList',params),
toPay: (params) => Vue.prototype.$axios.post('/api/recharge/toPay',params),
withdrawConfig: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawConfig',params),
withdrawServiceCharge: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawServiceCharge',params),
withdraw: (params) => Vue.prototype.$axios.post('/api/withdraw/withdraw',params),
withdrawList: (params) => Vue.prototype.$axios.post('/api/withdraw/withdrawList',params),
billList: (params) => Vue.prototype.$axios.post('/api/summary/billList',params),
//--------------------------------- invite ---------------------------------
inviteCode: (params) => Vue.prototype.$axios.post('/api/user/inviteCode',params),
bonusOut: (params) => Vue.prototype.$axios.post('/api/summary/bonusOut',params),
bonusOutRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusOutRecords',params),
promotionRecords: (params) => Vue.prototype.$axios.post('/api/summary/promotionRecords',params),
bonusRecords: (params) => Vue.prototype.$axios.post('/api/summary/bonusRecords',params),
bonusSummary: (params) => Vue.prototype.$axios.post('/api/summary/bonusSummary',params),
//--------------------------------- bankCard ---------------------------------
bankcardList: (params) => Vue.prototype.$axios.post('/api/user/bankcardList',params),
bindBank: (params) => Vue.prototype.$axios.post('/api/user/bindBank',params),
delBankCard: (params) => Vue.prototype.$axios.post('/api/user/delBankCard',params),
//--------------------------------- address ---------------------------------
addressList: (params) => Vue.prototype.$axios.post('/api/user/addressList',params),
addressSave: (params) => Vue.prototype.$axios.post('/api/user/addressSave',params),
delAddress: (params) => Vue.prototype.$axios.post('/api/user/delAddress',params),
//--------------------------------- goods ---------------------------------
banner: () => Vue.prototype.$axios.get('/api/home/banner'),
goodsList: (params) => Vue.prototype.$axios.post('/api/index/goodsList',params),
goodsDetail: (params) => Vue.prototype.$axios.post('/api/index/goods',params),
//--------------------------------- moni ---------------------------------
// lotteryClassListM: (params) => Vue.prototype.$axios.post('/api/demo/lotteryClassListDemo',params),
nextLotteryPeriodM: (params) => Vue.prototype.$axios.post('/api/demo/nextLotteryPeriodDemo',params),
bettingConfigM: (params) => Vue.prototype.$axios.post('/api/demo/bettingConfigDemo',params),
bettingM: (params) => Vue.prototype.$axios.post('/api/demo/bettingDemo',params),
lotteryRecordsM: (params) => Vue.prototype.$axios.post('/api/demo/lotteryRecordsDemo',params),
myLotteryRecordsM: (params) => Vue.prototype.$axios.post('/api/demo/myLotteryRecordsDemo',params),
//--------------------------------- hongbao ---------------------------------
launchRedEnvelop: (params) => Vue.prototype.$axios.post('/api/user/launchRedEnvelop',params),
redEnvelopList: (params) => Vue.prototype.$axios.post('/api/user/redEnvelopList',params),
cancelRedEnvelop: (params) => Vue.prototype.$axios.post('/api/user/cancelRedEnvelop',params),
redEnvelop: (params) => Vue.prototype.$axios.post('/api/user/redEnvelop',params),
receiveRedEnvelop: (params) => Vue.prototype.$axios.post('/api/user/receiveRedEnvelop',params),
}
export default api export default api

201
utils/axios.js

@ -1,107 +1,202 @@
import Vue from 'vue' import Vue from 'vue'
import axios from 'axios' import axios from 'axios'
import qs from 'qs'
import md5 from 'js-md5';
import constant from './constant.js';
let baseURL = ''; let baseURL = '';
let key = '';
// #ifdef H5
baseURL = constant.H5
key = constant.H5_KEY
// #endif
// #ifdef APP-PLUS
baseURL = constant.APP
key = constant.APP_KEY
// #endif
const service = axios.create({ const service = axios.create({
withCredentials: false, //表示跨域请求时是否需要使用凭证 withCredentials: true,
crossDomain: true, crossDomain: true,
// baseURL, baseURL,
timeout: 160000 timeout: 160000
}) })
// request请求拦截器,在请求之前做一些处理 // request拦截器,在请求之前做一些处理
service.interceptors.request.use( service.interceptors.request.use(
config => { config => {
// console.log('showDialog' + Vue.prototype.$showDialog)
console.log(config,777777777777) if (Vue.prototype.$showDialog) {
let isWallet= uni.getStorageSync('isWallet');
if(!isWallet){
uni.showLoading({ uni.showLoading({
title: 'loading', title: 'loading',
mask: true mask: true
}) })
} }
const ticket = uni.getStorageSync('ticket')
let dataStr = [];
if (config.method == 'get') {
if (config.url.split('?').length > 1) {
dataStr = config.url.split('?')[1].split('&');
}
console.log('============================') }
// if (config.urlType=='eth') { if (config.method == 'post') {
// config.url = config.url dataStr = qs.stringify(config.data).split('&');
// dataStr = JSON.stringify(config.data);
// } else { // dataStr = config.data;
// config.url = baseURL.serverUrl + config.url // dataStr = config.data.name;
// }
if (config.url.indexOf('/x/resource/ip')>-1 ){ }
config.data = {};
dataStr.forEach(function (e) {
console.log(e, 666666)
config.data[e.split('=')[0]] = e.split('=')[1];
});
// console.log(ticket)
if (ticket != '') {
config.data['ticket'] = ticket
}
var keys = [];
let sign = '';
for (var k in config.data)
keys.push(k);
keys.sort(function (a, b) {
return a < b ? -1 : 1;
})
// console.log("keys===========");
keys.forEach(function (e) {
if (config.data[e] || config.data[e] == '') {
sign += e + '=' + config.data[e] + '&'
}
config.baseURL = baseURL.checkIp });
}else{
config.baseURL = baseURL.serverUrl // console.log("签名参数===========");
// console.log(config.url);
// console.log(sign + key);
sign = md5(sign + key);
// console.log("提交参数===========");
// console.log(qs.stringify(config.data));
if (config.method == 'post') {
// console.log(config.data,666666)
config.data['sign'] = sign
config.data = qs.stringify(config.data)
// config.data = config.data.replace(/(\w+)\s*, \s*(\w+)/, "$2 $1");
// if(config.url == ){
// #ifdef H5
if (config.url == '/api/index/goodsList') {
config.data = config.data.replaceAll('20', "");
config.data = config.data.replaceAll('26', "");
config.data = config.data.replaceAll('2F', "/");
config.data = config.data.replaceAll('28', "");
config.data = config.data.replaceAll('29', "");
// config.data = config.data.replaceAll('%C2%AE', "&reg;");
}
// #endif
// #ifdef APP-PLUS
if (config.url == '/api/index/goodsList') {
config.data = config.data.replace(new RegExp('20', "gm"), "");
config.data = config.data.replace(new RegExp('26', "gm"), "");
config.data = config.data.replace(new RegExp('2F', "gm"), "/");
config.data = config.data.replace(new RegExp('28', "gm"), "");
config.data = config.data.replace(new RegExp('29', "gm"), "");
// config.data = config.data.replaceAll('%C2%AE', "&reg;");
}
// #endif
}
config.sslVerify=false
config.url = config.url // config.data = config.data.replaceAll('2528',"(");
// config.data = config.data.replaceAll('2529',")");
// config.data = config.data.replaceAll('252',"%2F");
// if (token) { // }
// // config.headers['Authori-zation'] = token
// config.headers['Authorization'] = token
// }
// console.log(config)
// if (store.state.token) {
// // 给请求头添加user-token
// config.headers["user-token"] = store.state.token;
// }
}
if (config.method == 'get') {
if (ticket != '') {
config.url = config.url + '&ticket=' + ticket + '&sign=' + sign
} else {
config.url = config.url + '?sign=' + sign
}
}
// console.log(config)
return config; return config;
}, },
error => { error => {
console.log(error); // for debug // console.log(error); // for debug
return Promise.reject(error); return Promise.reject(error);
} }
); );
// 配置成功后的响应拦截器 //配置成功后的拦截器
service.interceptors.response.use(res => { service.interceptors.response.use(res => {
console.log('过期了吗')
uni.hideLoading() uni.hideLoading()
console.log(res) // console.log(res)
if (res.status == 200) { // console.log(res.data)
// console.log(res.data.data[0].nameAlias)
if (res.data.success || res.data.errCode === 'USER.0017') {
// console.log(res.data.success)
return res.data return res.data
} else { } else {
return Promise.reject(res.msg); uni.showToast({
title: res.data.errMsg,
icon: 'none',
duration: 1500
})
if (res.data.errCode === 'USER.0010') {
uni.removeStorage({
key: 'logInfo',
success: function (res) {
uni.reLaunch({ url: '/pages/login/index' })
},
fail: (err) => {
}
});
// #ifdef H5
var url = location.href;
if (url.indexOf('pages') > -1) {
uni.setStorage({
key: 'url',
data: url,
success: function () {
console.log('success')
}
});
} else {
uni.removeStorageSync('url')
}
// #endif
}
uni.$emit('refreshQrCode')
return Promise.reject(res.data.errMsg);
} }
}, error => { }, error => {
// if (error.response.status) {
// switch (error.response.status) {
// case 401:
// break;
// default:
// break;
// }
// }
return Promise.reject(error) return Promise.reject(error)
}) })
// 在main.js中放入这段自定义适配器的代码,就可以实现uniapp的app和小程序开发中能使用axios进行跨域网络请求,并支持携带cookie
axios.defaults.adapter = function(config) { //自己定义个适配器,用来适配uniapp的语法 axios.defaults.adapter = function (config) { //自己定义个适配器,用来适配uniapp的语法
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// console.log(config)
console.log(config, '我请求的',config)
var settle = require('axios/lib/core/settle'); var settle = require('axios/lib/core/settle');
var buildURL = require('axios/lib/helpers/buildURL'); var buildURL = require('axios/lib/helpers/buildURL');
uni.request({ uni.request({
method: config.method.toUpperCase(), method: config.method.toUpperCase(),
url: config.baseURL + '/' + buildURL(config.url, config.params, config url: config.baseURL + buildURL(config.url, config.params, config.paramsSerializer),
.paramsSerializer),
header: config.headers, header: config.headers,
data: config.data, data: config.data,
dataType: config.dataType, dataType: config.dataType,
responseType: config.responseType, responseType: config.responseType,
sslVerify: config.sslVerify, sslVerify: config.sslVerify,
complete: function complete(response) { complete: function complete(response) {
//console.log("执行完成:",config.baseURL+'/' + buildURL(config.url, config.params, config.paramsSerializer),response.data) //console.log("执行完成:",config.baseURL + buildURL(config.url, config.params, config.paramsSerializer),response.data)
response = { response = {
data: response.data, data: response.data,
status: response.statusCode, status: response.statusCode,
@ -113,7 +208,6 @@ axios.defaults.adapter = function(config) { //自己定义个适配器,用来
settle(resolve, reject, response); settle(resolve, reject, response);
}, },
fail: res => { fail: res => {
uni.hideLoading()
uni.showToast({ uni.showToast({
title: res, title: res,
icon: 'none', icon: 'none',
@ -123,5 +217,4 @@ axios.defaults.adapter = function(config) { //自己定义个适配器,用来
}) })
}) })
} }
export default service export default service

14
utils/constant.js

@ -0,0 +1,14 @@
const H5 = '/start';
const H5_KEY = 'key=PBcGdWvA7dUintx7WNOR11cOdCrEpasM';
const APP = 'https://api.wingold6.com'; //正式
// const APP = 'https://apitest.luck-work.com'; //测试
const APP_KEY = 'key=PBcGdWvA7dUintx7WNOR11cOdCrEpasM';
const showDialog = true
export default {
H5,
H5_KEY,
APP,
APP_KEY,
showDialog,
}

100
utils/index.js

@ -0,0 +1,100 @@
var utils = {
checkEmail: function(email) {
return RegExp(
/^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/)
.test(email);
},
checkMobile: function(mobile) {
return RegExp(/^1[34578]\d{9}$/).test(mobile);
},
caculateTime: function(timeZome, time) {
return time + (timeZome * 1000 * 60 * 60);
},
formatyymmdd: function(time) {
var date = new Date(time)
console.log(date,5555655)
var localTime = date.getTime();
var localOffset = date.getTimezoneOffset() * 60000 //获得当地时间偏移的毫秒数
var utc = localTime + localOffset //utc即GMT时间
var offset = 8; //东8区
var beijing = utc + (3600000 * offset);
date = new Date(beijing);
var Y = date.getFullYear()
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
console.log( M + '/' + D + '/' + Y,5454545454);
return M + '/' + D + '/' + Y;
},
formatyymmdd2: function(time) {
var date = new Date(time)
var localTime = date.getTime();
var localOffset = date.getTimezoneOffset() * 60000 ; //获得当地时间偏移的毫秒数
var utc = localTime + localOffset; //utc即GMT时间
var offset = 8; //东8区
var beijing = utc + (3600000 * offset);
date = new Date(beijing);
var Y = date.getFullYear()
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return Y + M + D;
},
formatyymmddhhmmss: function(time) {
var date = new Date(time)
var localTime = date.getTime()
var localOffset = date.getTimezoneOffset() * 60000 //获得当地时间偏移的毫秒数
var utc = localTime + localOffset; //utc即GMT时间
var offset = 8 //东8区
var beijing = utc + (3600000 * offset);
date = new Date(beijing)
var Y = date.getFullYear()
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
// return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
return Y + '-' + M + '-' + D + ' ' + h + ':' + m + ':' + s;
},
formathhmm: function(time) {
var date = new Date(time)
var localTime = date.getTime();
var localOffset = date.getTimezoneOffset() * 60000 ; //获得当地时间偏移的毫秒数
var utc = localTime + localOffset; //utc即GMT时间
var offset = 8; //东8区
var beijing = utc + (3600000 * offset);
date = new Date(beijing);
var Y = date.getFullYear()
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1)
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
var h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
var s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
return h + ':' + m;
},
//客户端时间转换为北京时间
getBeijingtime: function() {
//获得当前运行环境时间
let d = new Date();
let currentDate = new Date();
let tmpHours = currentDate.getHours();
//算得时区
let time_zone = -d.getTimezoneOffset() / 60;
if (time_zone < 0) {
time_zone = Math.abs(time_zone) + 8;
currentDate.setHours(tmpHours + time_zone);
} else {
time_zone -= 8;
currentDate.setHours(tmpHours - time_zone);
}
return currentDate;
},
}
export default utils

66
utils/language/en.js

@ -1,16 +1,66 @@
// en.js // en.js
export default { export default {
// tab bar 相关
tabBar:{
Home:'Home',
Markets:'Markets',
Charity:'Charity',
Subscription:'Subscription',
Me:'Me',
},
// 登陆相关页面
login: { login: {
welcomeText:'Hi, Welcome Back!', // 公共字段
signInText:'Sign in to your account.', Login: 'Login',
emailInputText:'Enter email address', SignUp: 'Sign Up',
passwordInputText:'Password', ForgotPassword: 'Forgot password',
forgotText:'Forgot Password?', // login
loginText:'Login', welcomeText: 'Hi, Welcome Back!',
notAccountText:'Don’t have account?', signInText: 'Sign in to your account.',
signUpText:'Sign Up', emailInputText: 'Enter email address',
emailInputMessage: 'Please enter your email address',
passwordInputText: 'Password',
passwordInputMessage: 'Please enter your password',
forgotText: 'Forgot Password?',
notAccountText: 'Don’t have account?',
agreeToBackup: 'Please check the prompt to agree to backup', agreeToBackup: 'Please check the prompt to agree to backup',
checkTheTermsOfService: 'Please review and agree to the terms of service', checkTheTermsOfService: 'Please review and agree to the terms of service',
// register
registerWelcomeText: "Getting Started",
registerCreate: "Create an account to continue!",
verificationCodeText: 'Verification Code',
verificationCodeMessage: 'Please enter verification code',
passwordText: 'Create The Login Password',
passwordMessage: 'Please enter your password',
confirmPasswordText: 'Confirm Login Password',
confirmPasswordMessage: 'Please confirm login password',
withdrawalPasswordText: 'Create The Withdrawal Password',
withdrawalPasswordMessage: 'Please enter the withdrawal password',
InvitationCodeText: 'Invitation code',
InvitationCodeMessage: 'Please enter the invitation code',
agreeText: 'By creating an account, you agree to our ',
Terms: 'Terms',
and: 'and',
Conditions: 'Conditions',
haveAccount: 'Already have an account?',
// forget
Save: 'Save',
},
// 首页相关页面
home: {
// 公共字段
HOME: 'HOME',
// 首页
customerService: 'Customer Service',
homeMessage: `Please contact customer service on the top-left corner for identity verification on your first...
Please contact customer service on the top-left corner for identity verification on your first...Please contact customer service on the top-left corner for identity verification on your first...`,
Recharge: 'Recharge',
Mine: 'Mine',
Subcription: 'Subcription',
TodaySteps:"Today's steps",
ReceiveEarnings:"Receive yesterday's earnings",
} }
} }

36
utils/language/zh.js

@ -1,16 +1,38 @@
// zh.js // zh.js
export default { export default {
login: { login: {
welcomeText:'Hi, Welcome Back!', // 公共字段
signInText:'Sign in to your account.', Login:'Login',
emailInputText:'Enter email address', SignUp:'Sign Up',
passwordInputText:'Password', //login
forgotText:'Forgot Password?', welcomeText:'你好,欢迎回来!',
loginText:'Login', signInText:'请登录您的账户.',
emailInputText:'请输入邮箱',
emailInputMessage:'邮箱密码不能为空',
passwordInputText:'请输入密码',
passwordInputMessage:'密码不能为空',
forgotText:'忘记密码?',
notAccountText:'Don’t have account?', notAccountText:'Don’t have account?',
signUpText:'Sign Up',
agreeToBackup: '请勾选同意备份的提示', agreeToBackup: '请勾选同意备份的提示',
checkTheTermsOfService: '请查看并同意服务条款', checkTheTermsOfService: '请查看并同意服务条款',
// register
registerWelcomeText: "Getting Started",
registerCreate: "Create an account to continue!",
verificationCodeText: 'Verification Code',
verificationCodeMessage: 'Please enter verification code',
passwordText: 'Create The Login Password',
passwordMessage: 'Please enter your password',
confirmPasswordText: 'Confirm Login Password',
confirmPasswordMessage: 'Please confirm login password',
withdrawalPasswordText: 'Create The Withdrawal Password',
withdrawalPasswordMessage: 'Please enter the withdrawal password',
InvitationCodeText: 'Invitation code',
InvitationCodeMessage: 'Please enter the invitation code',
aggreeText :'By creating an account, you aggree to our ',
Terms:'Terms',
and:'and',
Conditions:'Conditions',
} }
} }

110
uview-ui/README.md

@ -1,73 +1,56 @@
<p align="center"> <p align="center">
<img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;"> <img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
</p> </p>
<h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView</h3> <h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView 2.0</h3>
<h3 align="center">多平台快速开发的UI框架</h3> <h3 align="center">多平台快速开发的UI框架</h3>
[![stars](https://img.shields.io/github/stars/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0)
[![forks](https://img.shields.io/github/forks/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0)
[![issues](https://img.shields.io/github/issues/umicro/uView2.0?style=flat-square&logo=GitHub)](https://github.com/umicro/uView2.0/issues)
[![Website](https://img.shields.io/badge/uView-up-blue?style=flat-square)](https://uviewui.com)
[![release](https://img.shields.io/github/v/release/umicro/uView2.0?style=flat-square)](https://gitee.com/umicro/uView2.0/releases)
[![license](https://img.shields.io/github/license/umicro/uView2.0?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)
## 说明 ## 说明
uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水 uView UI,是[uni-app](https://uniapp.dcloud.io/)全面兼容nvue的uni-app生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
## 特性 ## [官方文档:https://uviewui.com](https://uviewui.com)
- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序
- 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨
- 众多的常用页面和布局,让您专注逻辑,事半功倍
- 详尽的文档支持,现代化的演示效果
- 按需引入,精简打包体积
## 预览
## 安装 您可以通过**微信**扫码,查看最佳的演示效果。
<br>
<br>
<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
```bash
# npm方式安装,插件市场导入无需执行此命令
npm i uview-ui
```
## 快速上手 ## 链接
1. `main.js`引入uView库 - [官方文档](https://www.uviewui.com/)
```js - [更新日志](https://www.uviewui.com/components/changelog.html)
// main.js - [升级指南](https://www.uviewui.com/components/changeGuide.html)
import uView from 'uview-ui'; - [关于我们](https://www.uviewui.com/cooperation/about.html)
Vue.use(uView);
```
2. `App.vue`引入基础样式(注意style标签需声明scss属性支持) ## 交流反馈
```css
/* App.vue */
<style lang="scss">
@import "uview-ui/index.scss";
</style>
```
3. `uni.scss`引入全局scss变量文件 欢迎加入我们的QQ群交流反馈:[点此跳转](https://www.uviewui.com/components/addQQGroup.html)
```css
/* uni.scss */
@import "uview-ui/theme.scss";
```
4. `pages.json`配置easycom规则(按需引入) ## 关于PR
```js > 我们非常乐意接受各位的优质PR,但在此之前我希望您了解uView2.0是一个需要兼容多个平台的(小程序、h5、ios app、android app)包括nvue页面、vue页面。
// pages.json > 所以希望在您修复bug并提交之前尽可能的去这些平台测试一下兼容性。最好能携带测试截图以方便审核。非常感谢!
{
"easycom": { ## 安装
// npm安装的方式不需要前面的"@/",下载安装的方式需要"@/"
// npm安装方式 #### **uni-app插件市场链接** —— [https://ext.dcloud.net.cn/plugin?id=1593](https://ext.dcloud.net.cn/plugin?id=1593)
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
// 下载安装方式
// "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
// 此为本身已有的内容
"pages": [
// ......
]
}
```
请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容 请通过[官网安装文档](https://www.uviewui.com/components/install.html)了解更详细的内容
## 快速上手
请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
## 使用方法 ## 使用方法
配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。 配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
@ -78,27 +61,6 @@ Vue.use(uView);
</template> </template>
``` ```
请通过[快速上手](https://www.uviewui.com/components/quickstart.html)了解更详细的内容
## 链接
- [官方文档](https://www.uviewui.com/)
- [更新日志](https://www.www.uviewui.com/components/changelog.html)
- [升级指南](https://www.uviewui.com/components/changelog.html)
- [关于我们](https://www.uviewui.com/cooperation/about.html)
## 预览
您可以通过**微信**扫码,查看最佳的演示效果。
<br>
<br>
<img src="https://uviewui.com/common/weixin_mini_qrcode.png" width="220" height="220" >
## 捐赠uView的研发
uView文档和源码全部开源免费,如果您认为uView帮到了您的开发工作,您可以捐赠uView的研发工作,捐赠无门槛,哪怕是一杯可乐也好(相信这比打赏主播更有意义)。
<img src="https://uviewui.com/common/alipay.png" width="220" ><img style="margin-left: 100px;" src="https://uviewui.com/common/wechat.png" width="220" >
## 版权信息 ## 版权信息
uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。 uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。

18
uview-ui/changelog.md

@ -1,3 +1,21 @@
## 2.0.33(2022-06-17)
# uView2.0重磅发布,利剑出鞘,一统江湖
1. 修复`loadmore`组件`lineColor`类型错误问题
2. 修复`u-parse`组件`imgtap`、`linktap`不生效问题
## 2.0.32(2022-06-16)
# uView2.0重磅发布,利剑出鞘,一统江湖
1. `u-loadmore`新增自定义颜色、虚/实线
2. 修复`u-swiper-action`组件部分平台不能上下滑动的问题
3. 修复`u-list`回弹问题
4. 修复`notice-bar`组件动画在低端安卓机可能会抖动的问题
5. `u-loading-page`添加控制图标大小的属性`iconSize`
6. 修复`u-tooltip`组件`color`参数不生效的问题
7. 修复`u--input`组件使用`blur`事件输出为`undefined`的bug
8. `u-code-input`组件新增键盘弹起时,是否自动上推页面参数`adjustPosition`
9. 修复`image`组件`load`事件无回调对象问题
10. 修复`button`组件`loadingSize`设置无效问题
10. 其他修复
## 2.0.31(2022-04-19) ## 2.0.31(2022-04-19)
# uView2.0重磅发布,利剑出鞘,一统江湖 # uView2.0重磅发布,利剑出鞘,一统江湖

2
uview-ui/components/u--input/u--input.vue

@ -36,7 +36,7 @@
:customStyle="customStyle" :customStyle="customStyle"
:formatter="formatter" :formatter="formatter"
@focus="$emit('focus')" @focus="$emit('focus')"
@blur="$emit('blur')" @blur="e => $emit('blur', e)"
@keyboardheightchange="$emit('keyboardheightchange')" @keyboardheightchange="$emit('keyboardheightchange')"
@change="e => $emit('change', e)" @change="e => $emit('change', e)"
@input="e => $emit('input', e)" @input="e => $emit('input', e)"

4
uview-ui/components/u-button/u-button.vue

@ -28,7 +28,7 @@
<template v-if="loading"> <template v-if="loading">
<u-loading-icon <u-loading-icon
:mode="loadingMode" :mode="loadingMode"
:size="textSize * 1.15" :size="loadingSize * 1.15"
:color="loadingColor" :color="loadingColor"
></u-loading-icon> ></u-loading-icon>
<text <text
@ -75,7 +75,7 @@
<template v-if="loading"> <template v-if="loading">
<u-loading-icon <u-loading-icon
:mode="loadingMode" :mode="loadingMode"
:size="textSize * 1.15" :size="loadingSize * 1.15"
:color="loadingColor" :color="loadingColor"
></u-loading-icon> ></u-loading-icon>
<text <text

5
uview-ui/components/u-code-input/props.js

@ -1,5 +1,10 @@
export default { export default {
props: { props: {
// 键盘弹起时,是否自动上推页面
adjustPosition: {
type: Boolean,
default: uni.$u.props.codeInput.adjustPosition
},
// 最大输入长度 // 最大输入长度
maxlength: { maxlength: {
type: [String, Number], type: [String, Number],

1
uview-ui/components/u-code-input/u-code-input.vue

@ -33,6 +33,7 @@
:focus="focus" :focus="focus"
:value="inputValue" :value="inputValue"
:maxlength="maxlength" :maxlength="maxlength"
:adjustPosition="adjustPosition"
class="u-code-input__input" class="u-code-input__input"
@input="inputHandler" @input="inputHandler"
:style="{ :style="{

1
uview-ui/components/u-form/u-form.vue

@ -169,6 +169,7 @@
errorsRes.push(...errors); errorsRes.push(...errors);
childErrors.push(...errors); childErrors.push(...errors);
} }
this.errorType === 'toast' ?uni.$u.toast(errors[0].message):
child.message = child.message =
childErrors[0]?.message ?? null; childErrors[0]?.message ?? null;
} }

4
uview-ui/components/u-image/u-image.vue

@ -161,10 +161,10 @@
this.$emit('error', err) this.$emit('error', err)
}, },
// loading // loading
onLoadHandler() { onLoadHandler(event) {
this.loading = false this.loading = false
this.isError = false this.isError = false
this.$emit('load') this.$emit('load', event)
this.removeBgColor() this.removeBgColor()
// //
// fadepng // fadepng

2
uview-ui/components/u-line/props.js

@ -24,7 +24,7 @@ export default {
type: [String, Number], type: [String, Number],
default: uni.$u.props.line.margin default: uni.$u.props.line.margin
}, },
// 是否虚线,true-实线,false-虚线 // 是否虚线,true-虚线,false-实线
dashed: { dashed: {
type: Boolean, type: Boolean,
default: uni.$u.props.line.dashed default: uni.$u.props.line.dashed

4
uview-ui/components/u-list/u-list.vue

@ -29,9 +29,7 @@
@scrolltolower="scrolltolower" @scrolltolower="scrolltolower"
@scrolltoupper="scrolltoupper" @scrolltoupper="scrolltoupper"
> >
<view :style="{ <view>
paddingTop: `${offset}px`
}">
<slot /> <slot />
</view> </view>
</scroll-view> </scroll-view>

5
uview-ui/components/u-loading-page/props.js

@ -35,6 +35,11 @@ export default {
type: [String, Number], type: [String, Number],
default: uni.$u.props.loadingPage.fontSize default: uni.$u.props.loadingPage.fontSize
}, },
// 图标大小
iconSize: {
type: [String, Number],
default: uni.$u.props.loadingPage.fontSize
},
// 加载中图标的颜色,只能rgb或者十六进制颜色值 // 加载中图标的颜色,只能rgb或者十六进制颜色值
loadingColor: { loadingColor: {
type: String, type: String,

7
uview-ui/components/u-loading-page/u-loading-page.vue

@ -19,11 +19,15 @@
:src="image" :src="image"
class="u-loading-page__warpper__loading-icon__img" class="u-loading-page__warpper__loading-icon__img"
mode="widthFit" mode="widthFit"
:style="{
width: $u.addUnit(iconSize),
height: $u.addUnit(iconSize)
}"
></image> ></image>
<u-loading-icon <u-loading-icon
v-else v-else
:mode="loadingMode" :mode="loadingMode"
size="28" :size="$u.addUnit(iconSize)"
:color="loadingColor" :color="loadingColor"
></u-loading-icon> ></u-loading-icon>
</view> </view>
@ -55,6 +59,7 @@ import props from "./props.js";
* @property {String} bgColor 背景色 默认 '#ffffff' * @property {String} bgColor 背景色 默认 '#ffffff'
* @property {String} color 文字颜色 默认 '#C8C8C8' * @property {String} color 文字颜色 默认 '#C8C8C8'
* @property {String | Number} fontSize 文字大小 默认 19 * @property {String | Number} fontSize 文字大小 默认 19
* @property {String | Number} iconSize 图标大小 默认 28
* @property {String} loadingColor 加载中图标的颜色只能rgb或者十六进制颜色值 默认 '#C8C8C8' * @property {String} loadingColor 加载中图标的颜色只能rgb或者十六进制颜色值 默认 '#C8C8C8'
* @property {Object} customStyle 自定义样式 * @property {Object} customStyle 自定义样式
* @example <u-loading mode="circle"></u-loading> * @example <u-loading mode="circle"></u-loading>

16
uview-ui/components/u-loadmore/props.js

@ -19,13 +19,17 @@ export default {
fontSize: { fontSize: {
type: [String, Number], type: [String, Number],
default: uni.$u.props.loadmore.fontSize default: uni.$u.props.loadmore.fontSize
},
// 图标大小
iconSize: {
type: [String, Number],
default: uni.$u.props.loadmore.iconSize
}, },
// 字体颜色 // 字体颜色
color: { color: {
type: String, type: String,
default: uni.$u.props.loadmore.color default: uni.$u.props.loadmore.color
}, },
// 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆 // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆
loadingIcon: { loadingIcon: {
type: String, type: String,
@ -75,6 +79,16 @@ export default {
line: { line: {
type: Boolean, type: Boolean,
default: uni.$u.props.loadmore.line default: uni.$u.props.loadmore.line
},
// 线条颜色
lineColor: {
type: String,
default: uni.$u.props.loadmore.lineColor
},
// 是否虚线,true-虚线,false-实线
dashed: {
type: Boolean,
default: uni.$u.props.loadmore.dashed
} }
} }
} }

11
uview-ui/components/u-loadmore/u-loadmore.vue

@ -13,8 +13,9 @@
> >
<u-line <u-line
length="140rpx" length="140rpx"
color="#E6E8EB" :color="lineColor"
:hairline="false" :hairline="false"
:dashed="dashed"
v-if="line" v-if="line"
></u-line> ></u-line>
<!-- 加载中和没有更多的状态才显示两边的横线 --> <!-- 加载中和没有更多的状态才显示两边的横线 -->
@ -28,7 +29,7 @@
> >
<u-loading-icon <u-loading-icon
:color="iconColor" :color="iconColor"
size="17" :size="iconSize"
:mode="loadingIcon" :mode="loadingIcon"
></u-loading-icon> ></u-loading-icon>
</view> </view>
@ -42,8 +43,9 @@
</view> </view>
<u-line <u-line
length="140rpx" length="140rpx"
color="#E6E8EB" :color="lineColor"
:hairline="false" :hairline="false"
:dashed="dashed"
v-if="line" v-if="line"
></u-line> ></u-line>
</view> </view>
@ -60,6 +62,7 @@
* @property {String} bgColor 组件背景颜色在页面是非白色时会用到默认 'transparent' * @property {String} bgColor 组件背景颜色在页面是非白色时会用到默认 'transparent'
* @property {Boolean} icon 加载中时是否显示图标默认 true * @property {Boolean} icon 加载中时是否显示图标默认 true
* @property {String | Number} fontSize 字体大小默认 14 * @property {String | Number} fontSize 字体大小默认 14
* @property {String | Number} iconSize 图标大小默认 17
* @property {String} color 字体颜色默认 '#606266' * @property {String} color 字体颜色默认 '#606266'
* @property {String} loadingIcon 加载图标默认 'circle' * @property {String} loadingIcon 加载图标默认 'circle'
* @property {String} loadmoreText 加载前的提示语默认 '加载更多' * @property {String} loadmoreText 加载前的提示语默认 '加载更多'
@ -67,10 +70,12 @@
* @property {String} nomoreText 没有更多的提示语默认 '没有更多了' * @property {String} nomoreText 没有更多的提示语默认 '没有更多了'
* @property {Boolean} isDot 到上一个相邻元素的距离 默认 false * @property {Boolean} isDot 到上一个相邻元素的距离 默认 false
* @property {String} iconColor 加载中图标的颜色 默认 '#b7b7b7' * @property {String} iconColor 加载中图标的颜色 默认 '#b7b7b7'
* @property {String} lineColor 线条颜色默认 #E6E8EB
* @property {String | Number} marginTop 上边距 默认 10 * @property {String | Number} marginTop 上边距 默认 10
* @property {String | Number} marginBottom 下边距 默认 10 * @property {String | Number} marginBottom 下边距 默认 10
* @property {String | Number} height 高度单位px 默认 'auto' * @property {String | Number} height 高度单位px 默认 'auto'
* @property {Boolean} line 是否显示左边分割线 默认 false * @property {Boolean} line 是否显示左边分割线 默认 false
* @property {Boolean} dashed // 线true-线false-线 false
* @event {Function} loadmore status为loadmore时点击组件会发出此事件 * @event {Function} loadmore status为loadmore时点击组件会发出此事件
* @example <u-loadmore :status="status" icon-type="iconType" load-text="loadText" /> * @example <u-loadmore :status="status" icon-type="iconType" load-text="loadText" />
*/ */

4
uview-ui/components/u-parse/node/node.vue

@ -201,7 +201,7 @@ export default {
// #ifdef H5 || APP-PLUS // #ifdef H5 || APP-PLUS
node.attrs.src = node.attrs.src || node.attrs['data-src'] node.attrs.src = node.attrs.src || node.attrs['data-src']
// #endif // #endif
this.root.$emit('imgtap', node.attrs) this.root.$emit('imgTap', node.attrs)
// //
if (this.root.previewImg) if (this.root.previewImg)
uni.previewImage({ uni.previewImage({
@ -262,7 +262,7 @@ export default {
linkTap(e) { linkTap(e) {
var attrs = e.currentTarget ? this.childs[e.currentTarget.dataset.i].attrs : e, var attrs = e.currentTarget ? this.childs[e.currentTarget.dataset.i].attrs : e,
href = attrs.href href = attrs.href
this.root.$emit('linktap', attrs) this.root.$emit('linkTap', attrs)
if (href) { if (href) {
// //
if (href[0] == '#') if (href[0] == '#')

5
uview-ui/components/u-picker/props.js

@ -50,11 +50,6 @@ export default {
type: String, type: String,
default: uni.$u.props.picker.confirmColor default: uni.$u.props.picker.confirmColor
}, },
// 选择器只有一列时,默认选中项的索引,从0开始
singleIndex: {
type: [String, Number],
default: uni.$u.props.picker.singleIndex
},
// 每列中可见选项的数量 // 每列中可见选项的数量
visibleItemCount: { visibleItemCount: {
type: [String, Number], type: [String, Number],

3
uview-ui/components/u-picker/u-picker.vue

@ -66,7 +66,6 @@
* @property {String} confirmText 确认按钮的文字默认 '确定' * @property {String} confirmText 确认按钮的文字默认 '确定'
* @property {String} cancelColor 取消按钮的颜色默认 '#909193' * @property {String} cancelColor 取消按钮的颜色默认 '#909193'
* @property {String} confirmColor 确认按钮的颜色默认 '#3c9cff' * @property {String} confirmColor 确认按钮的颜色默认 '#3c9cff'
* @property {Array} singleIndex 选择器只有一列时默认选中项的索引从0开始默认 0
* @property {String | Number} visibleItemCount 每列中可见选项的数量默认 5 * @property {String | Number} visibleItemCount 每列中可见选项的数量默认 5
* @property {String} keyName 选项对象中需要展示的属性键名默认 'text' * @property {String} keyName 选项对象中需要展示的属性键名默认 'text'
* @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器默认 false * @property {Boolean} closeOnClickOverlay 是否允许点击遮罩关闭选择器默认 false
@ -161,7 +160,7 @@ export default {
this.setIndexs(value) this.setIndexs(value)
this.$emit('change', { this.$emit('change', {
// #ifndef MP-WEIXIN // #ifndef MP-WEIXIN || MP-LARK
// this // this
picker: this, picker: this,
// #endif // #endif

32
uview-ui/components/u-row-notice/u-row-notice.vue

@ -19,11 +19,17 @@
class="u-notice__content" class="u-notice__content"
ref="u-notice__content" ref="u-notice__content"
> >
<text <view
ref="u-notice__content__text" ref="u-notice__content__text"
class="u-notice__content__text" class="u-notice__content__text"
:style="[textStyle]" :style="[animationStyle]"
>{{text}}</text> >
<text
v-for="(item, index) in innerText"
:key="index"
:style="[textStyle]"
>{{item}}</text>
</view>
</view> </view>
<view <view
class="u-notice__right-icon" class="u-notice__right-icon"
@ -118,11 +124,28 @@
textStyle() { textStyle() {
let style = {} let style = {}
style.color = this.color style.color = this.color
style.fontSize = uni.$u.addUnit(this.fontSize)
return style
},
animationStyle() {
let style = {}
style.animationDuration = this.animationDuration style.animationDuration = this.animationDuration
style.animationPlayState = this.animationPlayState style.animationPlayState = this.animationPlayState
style.fontSize = uni.$u.addUnit(this.fontSize)
return style return style
}, },
// text100
// texttext
innerText() {
let result = [],
// text
len = 20
const textArr = this.text.split('')
for (let i = 0; i < textArr.length; i += len) {
// textslicejoin
result.push(textArr.slice(i, i + len).join(''))
}
return result
}
}, },
mounted() { mounted() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -289,6 +312,7 @@
white-space: nowrap; white-space: nowrap;
animation: u-loop-animation 10s linear infinite both; animation: u-loop-animation 10s linear infinite both;
/* #endif */ /* #endif */
@include flex(row);
} }
} }

2
uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue

@ -148,7 +148,7 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
/* #ifndef APP-NVUE || MP-WEIXIN */ /* #ifndef APP-NVUE || MP-WEIXIN */
touch-action: none; touch-action: pan-y;
/* #endif */ /* #endif */
&__content { &__content {

2
uview-ui/components/u-tooltip/u-tooltip.vue

@ -17,6 +17,7 @@
:selectable="false" :selectable="false"
@longpress.stop="longpressHandler" @longpress.stop="longpressHandler"
:style="{ :style="{
color: color,
backgroundColor: bgColor && showTooltip && tooltipTop !== -10000 ? bgColor : 'transparent' backgroundColor: bgColor && showTooltip && tooltipTop !== -10000 ? bgColor : 'transparent'
}" }"
>{{ text }}</text> >{{ text }}</text>
@ -312,7 +313,6 @@
/* #endif */ /* #endif */
&__text { &__text {
color: $u-content-color;
font-size: 14px; font-size: 14px;
} }

4
uview-ui/libs/config/config.js

@ -1,5 +1,5 @@
// 此版本发布于2022-04-19 // 此版本发布于2022-06-17
const version = '2.0.31' const version = '2.0.33'
// 开发环境才提示,生产环境不会提示 // 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {

1
uview-ui/libs/config/props/codeInput.js

@ -10,6 +10,7 @@
export default { export default {
// codeInput 组件 // codeInput 组件
codeInput: { codeInput: {
adjustPosition: true,
maxlength: 6, maxlength: 6,
dot: false, dot: false,
mode: 'box', mode: 'box',

1
uview-ui/libs/config/props/loadingPage.js

@ -17,6 +17,7 @@ export default {
bgColor: '#ffffff', bgColor: '#ffffff',
color: '#C8C8C8', color: '#C8C8C8',
fontSize: 19, fontSize: 19,
iconSize: 28,
loadingColor: '#C8C8C8' loadingColor: '#C8C8C8'
} }
} }

5
uview-ui/libs/config/props/loadmore.js

@ -14,6 +14,7 @@ export default {
bgColor: 'transparent', bgColor: 'transparent',
icon: true, icon: true,
fontSize: 14, fontSize: 14,
iconSize: 17,
color: '#606266', color: '#606266',
loadingIcon: 'spinner', loadingIcon: 'spinner',
loadmoreText: '加载更多', loadmoreText: '加载更多',
@ -24,6 +25,8 @@ export default {
marginTop: 10, marginTop: 10,
marginBottom: 10, marginBottom: 10,
height: 'auto', height: 'auto',
line: false line: false,
lineColor: '#E6E8EB',
dashed: false,
} }
} }

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save