Parcourir la source

细节修改

packages
HolyKnightIX il y a 2 ans
Parent
révision
5f53f2bbe3
9 fichiers modifiés avec 60 ajouts et 30 suppressions
  1. BIN
      assets/images/avatar2.png
  2. BIN
      assets/images/avatar3.png
  3. BIN
      assets/images/avatar8.png
  4. BIN
      assets/images/avatar9.png
  5. +27
    -10
      pages/setUserInfo/index.js
  6. +2
    -1
      pages/setUserInfo/index.wxml
  7. +3
    -0
      pages/setUserInfo/index.wxss
  8. +2
    -2
      pages/theme/index1/index.wxml
  9. +26
    -17
      pages/theme/index1/index.wxss

BIN
assets/images/avatar2.png Voir le fichier

Avant Après
Largeur: 200  |  Hauteur: 200  |  Taille: 8.2 KiB

BIN
assets/images/avatar3.png Voir le fichier

Avant Après
Largeur: 200  |  Hauteur: 200  |  Taille: 6.3 KiB

BIN
assets/images/avatar8.png Voir le fichier

Avant Après
Largeur: 200  |  Hauteur: 200  |  Taille: 6.4 KiB

BIN
assets/images/avatar9.png Voir le fichier

Avant Après
Largeur: 200  |  Hauteur: 200  |  Taille: 6.0 KiB

+ 27
- 10
pages/setUserInfo/index.js Voir le fichier

@@ -59,15 +59,32 @@ Page({
}
}).then(res => {
console.log(res, 'res')

let avatarUrl = null
if (res.data.avatarUrl) {
avatarUrl = res.data.avatarUrl
} else {
avatarUrl = defaultAvatarUrl
}

let gender = null
if (1 * res.data.sex) {
gender = res.data.sex - 1
} else {
gender = res.data.sex
}

let adress = null
if (res.data.address) {
adress = JSON.parse(res.data.address)
}


this.setData({
avatarUrl: res.data.avatarUrl,
avatarUrl: avatarUrl,
nickName: res.data.nickName,
username: res.data.name,
gender: res.data.sex,
gender: gender,
sexFlag: 2,
date: util.fmtDate(parseInt(res.data.birthdate)),
dateFlag: res.data.birthdate ? 2 : 1,
@@ -136,7 +153,7 @@ Page({
avatarUrl: that.data.avatarUrl,
nickName: e.detail.value.nickname,
name: e.detail.value.username,
sex: that.data.gender,
sex: 1 * that.data.gender + 1,
birthdate: birthdate,
height: e.detail.value.height ? e.detail.value.height : that.data.height,
weight: e.detail.value.weight ? e.detail.value.weight : that.data.weight,
@@ -162,14 +179,13 @@ Page({
}).then(res => {
if (res.code == 200) {
wx.showToast({
title: "信息提交成功,将在3分钟内生效",
icon: 'none',
duration: 2000,
mask: false
title: "信息提交成功",
icon: 'success',
duration: 1500,
})
setTimeout(() => {
wx.navigateBack()
}, 2000)
}, 1500)
}
}).catch(err => {
console.log(err);
@@ -237,9 +253,9 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
// onShareAppMessage() {

},
// },

onChooseAvatar(e) {
const that = this
@@ -255,6 +271,7 @@ Page({
that.setData({
avatarUrl: JSON.parse(res.data).data.url
})
console.log(that.data.avatarUrl);
}
})



+ 2
- 1
pages/setUserInfo/index.wxml Voir le fichier

@@ -1,5 +1,5 @@
<view>
<navbar home back color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="头像和昵称"></navbar>
<navbar home back color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="个人信息"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class="container">
<view class="avatar">
@@ -97,6 +97,7 @@
</view>

<button class="submit" type="primary" form-type='submit'>确定</button>
<!-- <button class="submit" type="primary" bindtap="test">测试</button> -->
</form>
</view>
</view>

+ 3
- 0
pages/setUserInfo/index.wxss Voir le fichier

@@ -61,6 +61,9 @@
text-align: right;
padding-left: 20rpx;
width: 400rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.greyFont {


+ 2
- 2
pages/theme/index1/index.wxml Voir le fichier

@@ -15,8 +15,8 @@
<view class='infoLeft' style="{{typeLsit.sy_xxb.styleClass}}">
<view class="user-avatar1">
<!-- <open-data class="open" type="userAvatarUrl"></open-data> -->
<image wx:if="{{userAvatarUrl!=''}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl}}"></image>
<image wx:if="{{userAvatarUrl==''}}" class="userAvatarUrl" src="../../../assets/images/default.png"></image>
<image wx:if="{{userAvatarUrl}}" class="userAvatarUrl" bindtap="goSetAvatar" src="{{userAvatarUrl }}"></image>
<image wx:else class="userAvatarUrl" bindtap="goSetAvatar" src="https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0"></image>
</view>
<!-- 成长值-->
<view class="user-data1 fl" style="{{typeLsit.sy_xxb.styleClass}}">


+ 26
- 17
pages/theme/index1/index.wxss Voir le fichier

@@ -3,11 +3,13 @@
page {
background: #f4f5f9;
}
.temp{

.temp {
width: 100rpx;
height: 100rpx;
background-color: darkcyan
}

.xia {
width: 24rpx;
height: 14rpx;
@@ -18,7 +20,7 @@ page {
left: 0;
right: 0;
bottom: 0;
/* margin: auto; */
}

@@ -26,21 +28,22 @@ page {
display: flex;
justify-content: space-around;
}

.goSqunar1 {
display: flex;
justify-content: center;
}

.title {
font-size: 32rpx;
font-family: OPPOSans;
font-weight: bold;
}

.title1 {
max-width:320rpx;
max-width: 320rpx;
font-size: 32rpx;
font-family: OPPOSans;
font-weight: bold;
@@ -53,9 +56,9 @@ page {
width: 24rpx;
/* height: 15rpx; */
}
.marketName{

}
.marketName {}

.f {
float: left;
}
@@ -75,6 +78,7 @@ page {
line-height: 26rpx;
font-size: 24rpx;
padding: 4rpx 10rpx;
margin-left: 20rpx;
}

.integralNum {
@@ -95,7 +99,8 @@ page {
}

.color_box {
/* padding-top: 20rpx; *//* background-image: linear-gradient(#DC143C, #F4F5F9); */
/* padding-top: 20rpx; */
/* background-image: linear-gradient(#DC143C, #F4F5F9); */
background-color: #f4f5f9;
}

@@ -209,18 +214,20 @@ page {
padding: 0 38rpx;
}

.section >view, .sellsection>view {
.section>view,
.sellsection>view {
width: 25%;
display: inline-block;
position: relative;
}

.section >view image, .sellsection>view image {
.section>view image,
.sellsection>view image {
display: block;
margin: 0 auto;
}

.section >view image {
.section>view image {
width: 55rpx;
height: 55rpx;
margin-top: 20rpx;
@@ -360,12 +367,14 @@ page {
width: 100%;
height: 100%;
}
.noAccredit{
text-align: center;
height: 80rpx;
font-size: 20rpx;
background-color: rgba(0, 0, 0, 0.3)

.noAccredit {
text-align: center;
height: 80rpx;
font-size: 20rpx;
background-color: rgba(0, 0, 0, 0.3)
}

.user-data {
letter-spacing: 0.64rpx;
line-height: 46rpx;
@@ -828,4 +837,4 @@ i-tabs i-tabs-scroll {
right: 20rpx;
position: fixed;
z-index: 1000000;
}
}

Chargement…
Annuler
Enregistrer