app验收反馈
This commit is contained in:
@@ -1,23 +1,33 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='index'>
|
||||
<view class="mine-nav" @click="jump('head')" style=" box-shadow: 0 4rpx 8rpx #e7e7e74c;">
|
||||
<Cn-page :loading="loading">
|
||||
<view slot="body">
|
||||
<view class="index">
|
||||
<view class="mine-nav" @click="jump('head')" style="box-shadow: 0 4rpx 8rpx #e7e7e74c">
|
||||
<view class="mine-nav-label">头像</view>
|
||||
<image style="height: 120rpx;width: 120rpx;border-radius:12rpx" src="/static/head.png"
|
||||
mode="scaleToFill" />
|
||||
<image
|
||||
style="height: 120rpx; width: 120rpx; border-radius: 12rpx"
|
||||
:src="userInfo.avatar"
|
||||
mode="scaleToFill"
|
||||
v-if="userInfo.avatar"
|
||||
/>
|
||||
<image
|
||||
style="height: 120rpx; width: 120rpx; border-radius: 12rpx"
|
||||
src="/static/head.png"
|
||||
mode="scaleToFill"
|
||||
v-else
|
||||
/>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('changeName')" >
|
||||
<view class="mine-nav" @click="jump('changeName')">
|
||||
<view class="mine-nav-label">名字</view>
|
||||
<view class="mine-nav-des">灿能电力</view>
|
||||
<view class="mine-nav-des">{{ userInfo.nickname }}</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('erweima')" style="border-bottom: none; ">
|
||||
<view class="mine-nav" @click="jump('erweima')" style="border-bottom: none">
|
||||
<view class="mine-nav-label">我的二维码</view>
|
||||
<image
|
||||
src="/static/erweima.png"
|
||||
style="height: 50rpx;width: 50rpx;border-radius:12rpx"
|
||||
style="height: 50rpx; width: 50rpx; border-radius: 12rpx"
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
@@ -28,30 +38,34 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
loading: false,
|
||||
userInfo: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
jump(type){
|
||||
console.log(type);
|
||||
jump(type) {
|
||||
console.log(type)
|
||||
uni.navigateTo({
|
||||
url: `/pages/user/${type}`,
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
}
|
||||
console.log(err)
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style lang="scss">
|
||||
.index {
|
||||
padding: 20rpx;
|
||||
|
||||
.mine-nav {
|
||||
padding: 34rpx;
|
||||
padding: 34rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: $uni-theme-white;
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='change-name'>
|
||||
<Cn-page :loading="loading">
|
||||
<view slot="body">
|
||||
<view class="change-name">
|
||||
<view class="content">
|
||||
<uni-easyinput type="text" v-model="name" placeholder="请输入昵称" />
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="btn-wrap-item " @click="submit"> 提交 </view>
|
||||
<view class="btn-wrap-item" @click="submit"> 提交 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import { apiUpdateUser } from '@/common/api/user'
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
// 表单数据
|
||||
@@ -22,20 +23,36 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submit () {
|
||||
console.log(this.name)
|
||||
uni.navigateBack()
|
||||
submit() {
|
||||
apiUpdateUser({
|
||||
name: this.name,
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none',
|
||||
})
|
||||
let userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
userInfo.nickname = this.name
|
||||
uni.setStorageSync(this.$cacheKey.userInfo, userInfo)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.name = uni.getStorageSync(this.$cacheKey.userInfo).nickname
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style lang="scss">
|
||||
.change-name {
|
||||
padding: 34rpx;
|
||||
padding: 34rpx;
|
||||
|
||||
.content {
|
||||
margin-bottom: 20rpx;
|
||||
padding: 34rpx;
|
||||
padding: 34rpx;
|
||||
background: $uni-theme-white;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
@@ -58,4 +75,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -232,7 +232,7 @@ export default {
|
||||
}
|
||||
|
||||
.login-box-input-btn {
|
||||
width: 200rpx;
|
||||
padding:0 40rpx;
|
||||
margin-left: 40rpx;
|
||||
background: $uni-theme-color;
|
||||
color: #fff;
|
||||
|
||||
@@ -224,7 +224,7 @@ export default {
|
||||
}
|
||||
|
||||
.login-box-input-btn {
|
||||
width: 200rpx;
|
||||
padding:0 40rpx;
|
||||
margin-left: 40rpx;
|
||||
background: $uni-theme-color;
|
||||
color: #fff;
|
||||
|
||||
@@ -1,25 +1,84 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='erweima'>
|
||||
二维码
|
||||
<Cn-page :loading="loading">
|
||||
<view slot="body">
|
||||
<view class="transfer">
|
||||
<!-- <div class="transfer-img" ref="qrCodeUrl" /> -->
|
||||
<uqrcode ref="uqrcode" canvas-id="qrcode" :value="content" :options="{ margin: 10 }" :loading="false"></uqrcode>
|
||||
<canvas id="qrcode" width="200" height="200"></canvas>
|
||||
<view class="transfer-text">{{ userInfo.nickname }}</view>
|
||||
<!-- <view class="transfer-btn">
|
||||
<button class="transfer-btn-item" style="background-color: #fff; color: #111" @click="back">
|
||||
返回
|
||||
</button>
|
||||
<button class="transfer-btn-item ml20" @click="home">转移成功</button>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
// import QRCode from 'qrcodejs2'
|
||||
// import UQRCode from '@/uni_modules/Sansnn-uQRCode/js_sdk/uqrcode/uqrcode.js';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
loading: false,
|
||||
content: '',
|
||||
userInfo: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
back() {
|
||||
this.$util.refreshPrePage(2)
|
||||
},
|
||||
home() {
|
||||
this.$util.refreshPrePage(2)
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
this.content = JSON.stringify({
|
||||
type: 'userId',
|
||||
id: this.userInfo.userIndex,
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.index {
|
||||
padding: 20rpx;
|
||||
<style lang="scss">
|
||||
.transfer {
|
||||
padding: 200rpx 34rpx 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.transfer-img {
|
||||
}
|
||||
|
||||
.transfer-text {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.transfer-btn {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
margin-top: 100rpx;
|
||||
width: 100%;
|
||||
|
||||
.transfer-btn-item {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
border-radius: 12rpx;
|
||||
background-color: $uni-theme-color;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -202,7 +202,7 @@ export default {
|
||||
}
|
||||
|
||||
.login-box-input-btn {
|
||||
width: 200rpx;
|
||||
padding:0 40rpx;
|
||||
margin-left: 40rpx;
|
||||
background: $uni-theme-color;
|
||||
color: #fff;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='head'>
|
||||
<image class="head-img" src="/static/head.png"></image>
|
||||
<Cn-page :loading="loading">
|
||||
<view slot="body">
|
||||
<view class="head">
|
||||
<image class="head-img" :src="userInfo.avatar" v-if="userInfo.avatar"></image>
|
||||
<image class="head-img" src="/static/head.png" v-else></image>
|
||||
<view class="head-setup">
|
||||
<view class="head-setup-item" @click="take('album')">从相册选一张</view>
|
||||
<view class="head-setup-item" @click="take('camera')">拍一张照片</view>
|
||||
@@ -12,29 +13,52 @@
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import { uploadImage, getImageUrl } from '@/common/api/basic'
|
||||
import { apiUpdateUser } from '@/common/api/user'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
loading: false
|
||||
loading: false,
|
||||
userInfo: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
take (type) {
|
||||
take(type) {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: [type],
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
uploadImage(res.tempFilePaths[0]).then((res) => {
|
||||
console.log(res)
|
||||
let result = JSON.parse(res[1].data)
|
||||
apiUpdateUser({
|
||||
headSculpture: result.data.minFileUrl,
|
||||
}).then((res) => {
|
||||
console.log(res)
|
||||
getImageUrl(result.data.minFileUrl).then((url) => {
|
||||
console.log(url.data)
|
||||
this.userInfo.headSculpture = result.data.minFileUrl
|
||||
this.userInfo.avatar = url.data
|
||||
console.warn(this.userInfo)
|
||||
uni.setStorageSync(this.$cacheKey.userInfo, this.userInfo)
|
||||
this.$forceUpdate()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style lang="scss">
|
||||
.head {
|
||||
|
||||
.head-img {
|
||||
height: 750rpx;
|
||||
width: 750rpx;
|
||||
@@ -48,7 +72,7 @@ export default {
|
||||
padding-bottom: 60rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.head-setup-item{
|
||||
.head-setup-item {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
@@ -56,4 +80,4 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -111,6 +111,9 @@ export default {
|
||||
components: {},
|
||||
methods: {
|
||||
getCode() {
|
||||
if (!this.checkbox) {
|
||||
return this.$util.toast('请先阅读并同意用户协议和个人信息保护政策!')
|
||||
}
|
||||
if (!this.phone) {
|
||||
return this.$util.toast('请输入手机号!')
|
||||
}
|
||||
@@ -249,7 +252,7 @@ export default {
|
||||
}
|
||||
|
||||
.login-box-input-btn {
|
||||
width: 200rpx;
|
||||
padding: 0 40rpx;
|
||||
margin-left: 40rpx;
|
||||
background: $uni-theme-color;
|
||||
color: #fff;
|
||||
|
||||
@@ -104,6 +104,9 @@ export default {
|
||||
onLoad() {},
|
||||
methods: {
|
||||
getCode() {
|
||||
if (!this.checkbox) {
|
||||
return this.$util.toast('请先阅读并同意用户协议和个人信息保护政策!')
|
||||
}
|
||||
if (!this.formData.phone) {
|
||||
return this.$util.toast('请输入手机号!')
|
||||
}
|
||||
@@ -210,7 +213,7 @@ export default {
|
||||
}
|
||||
|
||||
.login-box-input-btn {
|
||||
width: 200rpx;
|
||||
padding:0 40rpx;
|
||||
margin-left: 40rpx;
|
||||
background: $uni-theme-color;
|
||||
color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user