first commit
This commit is contained in:
393
金壶/appV1/pages/my/my.vue
Normal file
393
金壶/appV1/pages/my/my.vue
Normal file
@@ -0,0 +1,393 @@
|
||||
<template>
|
||||
<!-- 我的 页面 -->
|
||||
<view class="content w-100 h-100 bg_F2F2F2">
|
||||
<view class="info w-100 d-flex bg-linear-gradient">
|
||||
<view class="head_portrait">
|
||||
<!-- <img src="../../static/my/touxiang.png" alt="" class='h-100 w-100'> -->
|
||||
<image src="../../static/my/touxiang.png" alt="" class='h-100 w-100'></image>
|
||||
</view>
|
||||
<view class="d-flex x-text-white info_txt">
|
||||
<view class="" @click="to_login()" v-if="is_login==false">注册/登录</view>
|
||||
<view class="" v-if="is_login==true">{{userPhone}}</view>
|
||||
</view>
|
||||
<image src="../../static/my/shezhi.png" mode="" class="set_up" @click="toSetting()"></image>
|
||||
<image src="../../static/my/message.png" mode="" class="h-100 w-100 mes" @click="to_message()"></image>
|
||||
</view>
|
||||
<view class='padding-zy30'>
|
||||
<view class="x_public_box info_item">
|
||||
<!-- 我的订单 -->
|
||||
<view class="my_order x_margin0auto ">
|
||||
<view class="order_tip d-flex j-sb a-center x-border-hui padding-zy30" @click="to_order(0)">
|
||||
<view class="">我的订单</view>
|
||||
<image src="../../static/my/right.png" mode="" class="order_back"></image>
|
||||
</view>
|
||||
|
||||
<view class="order_items d-flex j-around" style="padding-top: 30upx;">
|
||||
<!-- // 1 待付款 2代发货 6待收货 3已完成 -->
|
||||
<view @click="to_order(1)" class="order_item_box">
|
||||
<image src="../../static/my/bag2.png" mode="" class="order_img"></image>
|
||||
<view>待付款</view>
|
||||
<!-- <view class="order_num" v-if='item.order_status==1'>{{item.count}}</view> -->
|
||||
<view class="order_num" v-if='order_num[0].count'>{{order_num[0].count}}</view>
|
||||
</view>
|
||||
<view @click="to_order(2)" class="order_item_box">
|
||||
<image src="../../static/my/bag1.png" mode="" class="order_img"></image>
|
||||
<view>待发货</view>
|
||||
<!-- <view class="order_num" v-if='item.order_status==2'>{{item.count}}</view> -->
|
||||
<view class="order_num" v-if='order_num[1].count'>{{order_num[1].count}}</view>
|
||||
</view>
|
||||
<view @click="to_order(3)" class="order_item_box">
|
||||
|
||||
<image src="../../static/my/mycar.png" mode="" class="order_img"></image>
|
||||
<view>待收货</view>
|
||||
<view class="order_num" v-if='order_num[2].count'>{{order_num[2].count}}</view>
|
||||
<!-- <view class="order_num" v-if='item.order_status==6'>{{item.count}}</view> -->
|
||||
</view>
|
||||
<view @click="to_order(4)" class="order_item_box">
|
||||
<image src="../../static/my/dui.png" mode="" class="order_img"></image>
|
||||
<view>已完成</view>
|
||||
<view class="order_num" v-if='order_num[3].count'>{{order_num[3].count}}</view>
|
||||
<!-- <view class="order_num" v-if='item.order_status==3'>{{item.count}}</view> -->
|
||||
</view>
|
||||
<!-- <view @click="to_refund()">
|
||||
<image src="../../static/my/qian.png" mode="" class="order_img"></image>
|
||||
<view>退款/售后</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="x_public_box">
|
||||
<!-- 我的服务 -->
|
||||
<view class="my_order x_margin0auto my_service">
|
||||
<view class="order_tip d-flex j-sb a-center x-border-hui padding-zy30">
|
||||
<view class="">我的服务</view>
|
||||
</view>
|
||||
<view class="service_items d-flex j-around">
|
||||
<view @click="Eauthentication()">
|
||||
<image src="../../static/my/add.png" mode="" class="service_img"></image>
|
||||
<view>企业认证</view>
|
||||
</view>
|
||||
<view @click="to_opinion()">
|
||||
<image src="../../static/my/mykefu.png" mode="" class="service_img"></image>
|
||||
<view>专属客服</view>
|
||||
</view>
|
||||
<view @click="pathList()">
|
||||
<image src="../../static/my/location.png" mode="" class="service_img"></image>
|
||||
<view>收货地址</view>
|
||||
</view>
|
||||
<view @click="go_collect()">
|
||||
<image src="../../static/my/star.png" mode="" class="service_img"></image>
|
||||
<view>我的收藏</view>
|
||||
</view>
|
||||
<view @click="duigong()">
|
||||
<image src="../../static/my/gong.png" mode="" class="service_img"></image>
|
||||
<view>对公信息</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="Copyright text-center x_text_hui">
|
||||
<view>Copyright©2014-2020</view>
|
||||
<view>医点医滴平台 版权所有</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {
|
||||
Config
|
||||
} from '../../utils/config.js'
|
||||
import X_login from '../../utils/models/x_login.js'
|
||||
import X_goods from '../../utils/models/goods.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
is_login: false,
|
||||
userPhone: '',
|
||||
order_num:[
|
||||
{"order_status":1,"count":0},
|
||||
{"order_status":2,"count":0},
|
||||
{"order_status":6,"count":0},
|
||||
{"order_status":3,"count":0}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
beforeCreate() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.istell();
|
||||
},
|
||||
onShow() {
|
||||
this.istell();
|
||||
this.get_order_count();
|
||||
},
|
||||
methods: {
|
||||
// 获取订单数量
|
||||
async get_order_count() {
|
||||
let res = await X_goods.x_order_count()
|
||||
this.order_num = res.data
|
||||
|
||||
this.handleError(res, res => {
|
||||
|
||||
})
|
||||
},
|
||||
// 对公信息
|
||||
duigong() {
|
||||
uni.navigateTo({
|
||||
url: './gong_mes'
|
||||
})
|
||||
},
|
||||
async istell() {
|
||||
|
||||
let res = await X_login.x_tell()
|
||||
|
||||
this.userPhone = res.data;
|
||||
if(res.data){
|
||||
this.is_login = true
|
||||
}
|
||||
this.handleError(res, res => {
|
||||
// this.userPhone = res.data;
|
||||
|
||||
})
|
||||
},
|
||||
// 获取用户手机号
|
||||
// async istell() {
|
||||
// uni.getStorage({
|
||||
// key: 'isAuthentication',
|
||||
// success: function(res) {
|
||||
// // console.log(res,'zheshi');
|
||||
// if (res.data == '') {
|
||||
// uni.navigateTo({
|
||||
// url: './x_login'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// let res = await X_login.x_tell()
|
||||
// this.handleError(res, res => {
|
||||
// if (res.data == '') {
|
||||
// uni.getStorage({
|
||||
// key: 'isAuthentication',
|
||||
// success: function(res) {
|
||||
// if (res.data == '') {
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: './x_login'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// this.userPhone = res.data;
|
||||
|
||||
// this.is_login = true
|
||||
// if (this.userPhone == undefined || '') {
|
||||
// uni.navigateTo({
|
||||
// url: './x_login'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
|
||||
// })
|
||||
// },
|
||||
// 认证
|
||||
to_Authentication() {
|
||||
uni.navigateTo({
|
||||
url: 'authentication'
|
||||
})
|
||||
},
|
||||
//意见反馈
|
||||
to_opinion() {
|
||||
uni.navigateTo({
|
||||
url: 'opinion'
|
||||
})
|
||||
},
|
||||
// 退款/售后
|
||||
to_refund() {
|
||||
uni.navigateTo({
|
||||
url: '../refund/refund'
|
||||
})
|
||||
},
|
||||
// 我的订单
|
||||
to_order(index) {
|
||||
uni.navigateTo({
|
||||
url: '../order/index?is_index=' + index
|
||||
})
|
||||
},
|
||||
// 消息
|
||||
to_message() {
|
||||
uni.navigateTo({
|
||||
url: 'is_message'
|
||||
})
|
||||
},
|
||||
// 设置
|
||||
toSetting() {
|
||||
uni.navigateTo({
|
||||
url: './setting'
|
||||
})
|
||||
},
|
||||
// 登录
|
||||
to_login() {
|
||||
uni.navigateTo({
|
||||
url: 'x_login'
|
||||
});
|
||||
},
|
||||
// 收藏
|
||||
go_collect() {
|
||||
uni.navigateTo({
|
||||
url: './collect'
|
||||
})
|
||||
},
|
||||
// 收获地址
|
||||
pathList() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/path-change'
|
||||
})
|
||||
},
|
||||
// 企业认证
|
||||
Eauthentication() {
|
||||
uni.navigateTo({
|
||||
url: '../auth/is_Authentication'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
.info {
|
||||
position: relative;
|
||||
height: 340upx;
|
||||
padding: 0 10upx;
|
||||
|
||||
.head_portrait {
|
||||
height: 128upx;
|
||||
width: 128upx;
|
||||
position: absolute;
|
||||
top: 102upx;
|
||||
left: 30upx;
|
||||
}
|
||||
|
||||
.info_txt {
|
||||
line-height: 122upx;
|
||||
position: absolute;
|
||||
top: 116upx;
|
||||
left: 200upx;
|
||||
font-size: 30upx;
|
||||
}
|
||||
|
||||
.set_up {
|
||||
position: absolute;
|
||||
bottom: 233upx;
|
||||
right: 127upx;
|
||||
height: 41upx;
|
||||
width: 45upx;
|
||||
}
|
||||
|
||||
.mes {
|
||||
width: 44upx;
|
||||
height: 38upx;
|
||||
position: absolute;
|
||||
right: 43upx;
|
||||
top: 72upx;
|
||||
}
|
||||
}
|
||||
|
||||
.info_item {
|
||||
height: 248upx;
|
||||
margin-top: -82upx;
|
||||
position: relative;
|
||||
z-index: 30;
|
||||
|
||||
.the_items {
|
||||
padding-top: 10upx;
|
||||
}
|
||||
}
|
||||
|
||||
.my_order {
|
||||
height: 200upx;
|
||||
margin: 0 auto;
|
||||
|
||||
.order_tip {
|
||||
line-height: 80upx;
|
||||
border-bottom: 2upx solid #F4F4F4;
|
||||
}
|
||||
|
||||
.order_items {
|
||||
text-align: center;
|
||||
|
||||
padding-top: 15upx;
|
||||
|
||||
|
||||
.order_item_box{
|
||||
position: relative;
|
||||
|
||||
|
||||
}
|
||||
.order_img {
|
||||
|
||||
height: 52upx;
|
||||
width: 61upx;
|
||||
|
||||
}
|
||||
.order_num{
|
||||
position: absolute;
|
||||
top:-16upx;
|
||||
right:-16upx;
|
||||
// padding: 2upx 10upx;
|
||||
height:40upx;
|
||||
width:40upx;
|
||||
line-height: 40upx;
|
||||
|
||||
color:#FFFFFF;
|
||||
border-radius: 50%;
|
||||
background-color: red;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.service_items {
|
||||
text-align: center;
|
||||
padding-top: 26upx;
|
||||
}
|
||||
|
||||
.order_back {
|
||||
height: 30upx;
|
||||
width: 19upx;
|
||||
}
|
||||
}
|
||||
|
||||
.my_service {
|
||||
height: 352upx;
|
||||
|
||||
.service_img {
|
||||
height: 91upx;
|
||||
width: 91upx;
|
||||
}
|
||||
}
|
||||
|
||||
.Copyright {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
bottom: 30upx;
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user