123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <view>
- <view class="bg theme_bg_bg"></view>
- <view class="top">
- <view class="box list dar3">
- <view class="r hr" @click="navigate('/pages/user/info')">
- <view class="r20"><image :src="user == '' ? '../../static/ls.jpg' : user.head" class="head"></image></view>
- <view class="r50">
- <view class="nickName" v-if="user == ''">登陆/注册</view>
- <view class="nickName" v-else>
- {{ user.nickName }}
- <text class="icon bo"></text>
- </view>
- </view>
- <view class="clear"></view>
- </view>
- <view class="item hr">
- <button @click="navigate('/pages/order/list')">
- <text class="icon ic"></text>
- 我的订单
- <text class="icon arrow"></text>
- </button>
- </view>
- <view class="item hr">
- <button open-type="feedback">
- <text class="icon ic"></text>
- 意见反馈
- <text class="icon arrow"></text>
- </button>
- </view>
- <view class="item hr">
- <button open-type="contact">
- <text class="icon ic"></text>
- 客服会话
- <text class="icon arrow"></text>
- </button>
- </view>
- <view class="item">
- <button open-type="share">
- <text class="icon ic"></text>
- 分享到
- <text class="icon arrow"></text>
- </button>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- user: this.$getUser()
- };
- },
- onShow() {
- this.user = this.$getUser();
- },
- methods: {
- navigate(url) {
- if (this.$hasLogin()) {
- uni.navigateTo({ url: url });
- } else {
- uni.navigateTo({ url: '/pages/user/login' });
- }
- }
- }
- };
- </script>
- <style lang="scss">
- .top {
- padding: 15px;
- margin-top: -50px;
- }
- .bg {
- height: 70px;
- }
- .r {
- padding-bottom: 7px;
- .head {
- width: 60px;
- height: 60px;
- border-radius: 50%;
- margin-top: -50px;
- margin-left: 10px;
- border: 3px solid white;
- }
- }
- .list {
- background-color: white;
- margin-top: 10px;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- .nickName {
- font-size: 13px;
- color: $dar2;
- padding: 5px;
- }
- .item {
- padding: 7px;
- .ic {
- font-weight: bold;
- font-size: 20px;
- padding-right: 10px;
- }
- .arrow {
- margin-top: 6px;
- font-size: 20px;
- }
- }
- }
- button {
- text-align: left;
- background-color: white;
- color: #2e2e2e !important;
- font-size: 14px;
- }
- </style>
|