123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <template>
- <view class="page">
- <view class="top">
- <view class="wd">
- <view class="qw"><image :src="user == '' ? '../../static/ls.jpg' : user.avatarUrl" class="head"></image></view>
- <view class="xs" @click="navigate('/pages/user/info')">
- <view v-if="user == ''">登录 / 注册</view>
- <view class="nickName" v-else>
- <text>{{ user.nickName }}</text>
- <view class="icon"></view>
- </view>
- <view class="nh">{{ user == '' ? '你还未登陆' : ' 你好,欢迎来到智慧旅游' }}</view>
- </view>
- </view>
- <image src="../../static/bj.jpg" mode="aspectFill"></image>
- </view>
- <view class="main">
- <view class="list">
- <view class="item hr" @click="navigate('/pages/order/my')">
- <text class="icon ic" style="background-color: #2979FF;"></text>
- <text>我的预约</text>
- <text class="icon arrow"></text>
- </view>
- <view class="item hr" @click="navigate('/pages/shop/list')">
- <text class="icon ic" style="background-color:red"></text>
- <text>商家中心</text>
- <text class="icon arrow"></text>
- </view>
- </view>
- <view class="list" style="margin-top: 13px;">
- <view class="item hr" @click="call()">
- <text class="icon ic" style="background-color:#366092"></text>
- <text>求助电话</text>
- <text class="icon arrow"></text>
- </view>
- <view class="item hr" @click="navigate('/pages/other/feedback')">
- <text class="icon ic" style="background-color:#FF554B"></text>
- <text>投诉建议</text>
- <text class="icon arrow"></text>
- </view>
- <view class="item hr">
- <button open-type="share">
- <text class="icon ic" style="background-color:#18B566"></text>
- <text>分享朋友</text>
- <text class="icon arrow"></text>
- </button>
- </view>
- <view class="item" @click="navigate('/pages/other/about')">
- <text class="icon ic" style="background-color:#606266"></text>
- <text>关于我们</text>
- <text class="icon arrow"></text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- ip: this.$http.urls.ip,
- user: this.$getUser(),
- aboutUs: { showPictures: [] }
- };
- },
- onLoad() {
- this.aboutUs = uni.getStorageSync('aboutUs');
- },
- onShow() {
- this.user = this.$getUser();
- },
- methods: {
- navigate(url) {
- if (this.$hasLogin()) {
- uni.navigateTo({ url: url });
- } else {
- uni.navigateTo({ url: '/pages/user/login' });
- }
- },
- //拨打求助电话
- call() {
- this.$http.call(this.aboutUs);
- }
- },
- onShareAppMessage: function(res) {
- return {
- title: '谢通门智慧旅游',
- path: '/pages/index/index2',
- imageUrl: '../../static/fx.jpg',
- success: res => {},
- fail: res => {}
- };
- }
- };
- </script>
- <style lang="scss">
- .top {
- position: relative;
- height: 300px;
- color: white;
- .wd {
- position: absolute;
- top: 80px;
- left: 20px;
- z-index: 11;
- .head {
- width: 75px;
- height: 75px;
- border-radius: 50%;
- }
- .xs {
- margin-left: 90px;
- width: 100%;
- font-weight: bold;
- margin-top: 10px;
- .nickName {
- margin-top: 20px;
- }
- .nh {
- font-size: 12px;
- font-weight: normal;
- margin-top: 5px;
- }
- .icon {
- float: right;
- font-size: 25px;
- margin-right: -17px;
- }
- }
- }
- image {
- width: 100%;
- height: 300px;
- position: absolute;
- }
- }
- .main {
- padding: 15px 15px 50px 15px;
- width: 100%;
- overflow: hidden;
- position: absolute;
- margin-top: -100px;
- .list {
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- width: 100%;
- background-color: white;
- border-radius: 5px;
- overflow: hidden;
- .item {
- padding: 16px;
- background-color: white;
- font-size: 16px;
- .ic {
- font-size: 20px;
- background-color: red;
- text-align: center;
- padding: 5px;
- border-radius: 5px;
- margin-right: 9px;
- color: white;
- }
- .arrow {
- font-size: 20px;
- }
- }
- }
- }
- button {
- text-align: left;
- background-color: white;
- color: #2e2e2e !important;
- font-size: 16px;
- padding-left: 0px;
- padding-right: 2px;
- line-height: 20px;
- overflow: initial;
- }
- </style>
|