|
@@ -1,24 +1,26 @@
|
|
|
<template>
|
|
|
- <view class="base-container">
|
|
|
- <image class="tabbar" src="https://birdseye-img.sysuimars.com/dinggou-mini/tabbar-new.png" mode="" />
|
|
|
- </view>
|
|
|
- <up-popup :show="showPopup" mode="center" round="10" :overlay="false" :safeAreaInsetBottom="false"
|
|
|
- bgColor="transparent">
|
|
|
- <view class="popup">
|
|
|
- <button class="avatar-none" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
|
|
|
- <view class="avatar-wrapper">
|
|
|
- <image class="avatar" :src="userData.icon"></image>
|
|
|
- <view class="photo-icon">
|
|
|
- <up-icon color="#fff" size="20" name="camera-fill"></up-icon>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </button>
|
|
|
- <view class="tips">设置头像,可以在地图上显示自己守护树的点位哦~</view>
|
|
|
- <button class="arrow-icon" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">
|
|
|
- <view class="button">微信授权</view>
|
|
|
- </button>
|
|
|
+ <view class="login-container">
|
|
|
+ <view class="base-container">
|
|
|
+ <!-- <image class="tabbar" src="https://birdseye-img.sysuimars.com/dinggou-mini/tabbar-new.png" mode="" /> -->
|
|
|
</view>
|
|
|
- </up-popup>
|
|
|
+ <up-popup :show="showPopup" mode="center" round="10" :overlay="false" :safeAreaInsetBottom="false"
|
|
|
+ bgColor="transparent">
|
|
|
+ <view class="popup">
|
|
|
+ <button class="avatar-none" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
|
|
+ <view class="avatar-wrapper">
|
|
|
+ <image class="avatar" :src="userData.icon"></image>
|
|
|
+ <view class="photo-icon">
|
|
|
+ <up-icon color="#fff" size="20" name="camera-fill"></up-icon>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </button>
|
|
|
+ <view class="tips">设置头像,可以在地图上显示自己守护树的点位哦~</view>
|
|
|
+ <button class="arrow-icon" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber">
|
|
|
+ <view class="button">微信授权</view>
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
+ </up-popup>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
@@ -28,6 +30,8 @@
|
|
|
import {
|
|
|
onLoad
|
|
|
} from '@dcloudio/uni-app'
|
|
|
+ import config from "@/api/config.js"
|
|
|
+ import upload from '@/utils/uploadUtils.js'
|
|
|
import USER from '@/api/user.js'
|
|
|
|
|
|
const showPopup = ref(true);
|
|
@@ -56,13 +60,11 @@
|
|
|
const {
|
|
|
avatarUrl
|
|
|
} = e.detail
|
|
|
- // wx.showLoading({title: '上传中'})
|
|
|
- // upload(this.data.userInfo.id + "/" + new Date().getTime() + ".png", avatarUrl, (res) => {
|
|
|
- // that.setData({
|
|
|
- // 'userInfo.icon':BASE_IMG_DIR+res.key,
|
|
|
- // })
|
|
|
- // wx.hideLoading()
|
|
|
- // })
|
|
|
+ uni.showLoading({title: '上传中'})
|
|
|
+ upload(userData.value.id + "/" + new Date().getTime() + ".png", avatarUrl, (res) => {
|
|
|
+ userData.value.icon = config.BASE_IMG_URL + res.key
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const onGetPhoneNumber = (e) => {
|
|
@@ -90,7 +92,7 @@
|
|
|
duration: 2000,
|
|
|
mask: true
|
|
|
})
|
|
|
- uni.navigateTo({
|
|
|
+ uni.reLaunch({
|
|
|
url: `/pages/tabBar/home/subPages/gardenMap?enterSelectTree=true`
|
|
|
});
|
|
|
} else {
|
|
@@ -107,17 +109,18 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import "@/static/style/mixin.scss";
|
|
|
- .base-container {
|
|
|
- background-image: url('https://birdseye-img.sysuimars.com/dinggou-mini/login-new.png');
|
|
|
- background-size: 100% 100%;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-position: center center;
|
|
|
- .tabbar {
|
|
|
- width: 100%;
|
|
|
- height: 112rpx;
|
|
|
- position: fixed;
|
|
|
- bottom: 0;
|
|
|
- left: 0;
|
|
|
+
|
|
|
+ .login-container {
|
|
|
+ .base-container {
|
|
|
+ @include ossBg("login-bj.png");
|
|
|
+
|
|
|
+ .tabbar {
|
|
|
+ width: 100%;
|
|
|
+ height: 112rpx;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|