Commit a9f9a33d by shibukun

合并冲突

parents a36ddfbb 0df0b1e0
<script>
<script>
import Vue from 'vue'
export default {
onLaunch: function() {
console.log('App Launch')
console.log('App Launch')
let that = this
uni.getSystemInfo({
success: function(e) {
Vue.prototype.StatusBarHeight = e.statusBarHeight;
let custom = uni.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom;
Vue.prototype.CustomBarHeight = custom.height + (custom.top - e.statusBarHeight) * 2;
Vue.prototype.BarPadding = custom.top;
Vue.prototype.SafeAreaBottom = e.safeAreaInsets.top>20 && e.platform!='android' ? 28 : 0
Vue.prototype.LRScreenWidth = e.screenWidth;
Vue.prototype.LRScreenHeight = e.screenHeight;
}
})
uni.hideShareMenu({});
},
onShow: function() {
console.log('App Show')
......
......@@ -23,7 +23,9 @@
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"enablePullDownRefresh": false,
"navigationStyle": "custom",
"backgroundColor":"#F5F5F5"
}
}
......
<template>
<view>
<view class="container">
<view class="mine-header">
<view class="header-top">
<!--navBar-->
<view class="nav-bar" :style="{ height: height + 'px', 'padding-top': statusBarHeight + 'px' }"><text class="person-center">我的</text></view>
<view class="user-info">
<view class="top">
<image class="avator" :src="userInfo.avatar" mode=""></image>
<view class="info">
<view class="name">{{userInfo.staffName}}</view>
<view class="shop">{{userInfo.staffName}}</view>
</view>
<view class="select-acccount">
切换行号
<image class="img" src="../../static/arrow-right-w.png" mode=""></image>
</view>
</view>
<view class="line"></view>
<view class="user-integral">
<view class="item">
<view class="num">3000</view>
<view class="bottom">累计积分</view>
</view>
<view class="item">
<view class="num">3000</view>
<view class="bottom">当前积分</view>
</view>
<view class="item">
<view class="num">3000</view>
<view class="bottom">消费积分</view>
</view>
</view>
</view>
</view>
<view class="bottom-setting">
<view class="item">
<view class="left">
<image class="left-img" src="../../static/coupon.png" mode=""></image>
<view class="title">卡片回收</view>
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
<view class="item">
<view class="left">
<image class="left-img" src="../../static/integral.png" mode=""></image>
<view class="title">积分明细</view>
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
<view class="item">
<view class="left">
<image class="left-img" src="../../static/customer.png" mode=""></image>
<view class="title">联系客服</view>
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
<view class="item last-item">
<view class="left">
<image class="left-img" src="../../static/setting.png" mode=""></image>
<view class="title">设置</view>
</view>
<image class="right-arrow" src="../../static/arrow-right.png" mode=""></image>
</view>
</view>
</view>
</view>
</template>
......@@ -8,7 +71,9 @@
export default {
data() {
return {
height: this.CustomBarHeight,
statusBarHeight: this.StatusBarHeight,
userInfo: {}
};
},
created() {
......@@ -17,7 +82,12 @@
methods: {
getUserInfo() {
this.$net.get('/staff/detail').then(res => {
if (res.code === 200) {
this.userInfo = res.data
this.$store.commit('refreshUserInfo', this.userInfo)
} else {
this.toast(res.message)
}
})
},
getImg() {
......@@ -36,6 +106,152 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.container {
width: 100%;
height: 100%;
background-color: #F5F5F5;
position: fixed;
top: 0;
left: 0;
.mine-header {
width: 100%;
height: 392rpx;
display: flex;
flex-direction: column;
background-image: url(../../static/mine-bg.png);
background-size: 100% 100%;
.header-top {
top: 0;
position: sticky;
z-index: 999;
.nav-bar {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.person-center {
color: #ffffff;
font-size: 36upx;
text-align: center;
flex: 0.8;
}
}
}
.user-info {
margin: 30rpx auto 0;
// height: 312rpx;
padding-bottom: 34rpx;
width: 700rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
.top {
display: flex;
position: relative;
height: 174rpx;
.avator {
margin-top: 30rpx;
margin-left: 30rpx;
height: 110rpx;
width: 110rpx;
border-radius: 110rpx;
}
.info {
margin-top: 50rpx;
margin-left: 20rpx;
width: 380rpx;
.name {
font-size: 32rpx;
color: #333333;
font-weight: bolder;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.shop {
margin-top: 20rpx;
font-size: 24rpx;
color: #999999;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
}
.select-acccount {
top: 54rpx;
position: absolute;
right: 0;
width: 160rpx;
height: 50rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
color: #FFFFFF;
background-color: #FF7272;
border-radius: 25rpx 0 0 25rpx;
.img {
margin-left: 14rpx;
height: 20rpx;
width: 12rpx;
}
}
}
.user-integral {
margin: 0 70rpx;
display: flex;
justify-content: space-between;
border-top: 2rpx solid #F5F5F5;
.item {
text-align: center;
margin-top: 34rpx;
.num {
font-size: 36rpx;
color: #333333;
font-weight: bolder;
}
.bottom {
margin-top: 16rpx;
font-size: 24rpx;
color: #666666;
}
}
}
}
}
.bottom-setting {
margin: 30rpx 25rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
.last-item {
border: none;
}
.item {
display: flex;
padding: 26rpx 30rpx;
align-items: center;
justify-content: space-between;
border-bottom: 2rpx solid#F5F5F5;
.left {
display: flex;
align-items: center;
.left-img {
height: 56rpx;
width: 56rpx;
display: block;
}
.title {
margin-left: 30rpx;
font-size: 30rpx;
color: #333333;
}
}
.right-arrow {
height: 20rpx;
width: 12rpx;
display: block;
}
}
}
}
</style>
......@@ -98,10 +98,10 @@
this.toast('请输入验证码')
return
}
this.loading.showLoading('登录中...')
this.loading.loadingShow('登录中...')
let params = {'authType':'code','authAccount':this.phone,'authPasswd':this.code, 'resetToken':'not'}
this.$net.post('/auth/authorization', params).then(res => {
this.loading.hideLoading()
this.loading.loadingHide()
if (res.code === 200) {
this.$net.tokenSave(res.data.token || '')
if (res.date&&res.date.list) {
......@@ -115,10 +115,10 @@
},
liteLogin(liteCode) {
this.showGetPhoneBtn = false
this.loading.showLoading('登录中...')
this.loading.loadingShow('登录中...')
let params = {'authType':'lite','authAccount':liteCode, 'resetToken':'not'}
this.$net.post('/auth/authorization', params).then(res => {
this.loading.hideLoading()
this.loading.loadingHide()
if (res.code === 200) {
this.$net.tokenSave(res.data.token || '')
if (res.date&&res.date.list) {
......
......@@ -9,11 +9,17 @@ const store = new Vuex.Store({
import { createStore } from 'vuex'
const store = createStore({
// #endif
state: {
state: {
isLogin: false,
userInfo: {}
},
mutations: {
refreshUserLogin(state, isLogin) {
state.isLogin = isLogin
},
refreshUserInfo(state, info) {
state.userInfo = info
},
},
getters: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment