123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- <template>
- <view class="myBox">
- <view class="myhead">
- <view @click="goinfor" class="myheadImg">
- <uni-icon color="#fff" size="22" type="chat"></uni-icon>
- </view>
- <view class="myNmae">
- <view class="myNmaeLeft">
- <view class="myNmaeImg" v-if="successlogion&&hasLogin || !successlogion && hasLogin">
- <image :src="userInfo.avatarUrl"></image>
- </view>
-
- <view class="myNmaeImg" v-if="!successlogion && !hasLogin|| successlogion && !hasLogin">
- <image src=""></image>
- </view>
-
- <view v-if="successlogion&&hasLogin">
- <view style="font-size: 34upx;margin-bottom: 32upx;">{{userInfo.nickName}}</view>
- <view style="font-size: 24upx" @click="goAdress(3)" >圈币{{member_points}}></view>
- </view>
-
- <view v-if="!successlogion && hasLogin">
- <view style="font-size: 34upx;margin-bottom: 32upx;">{{userInfo.nickName}}</view>
- <view style="font-size: 24upx" @click="goAdress(3)" >请绑定手机号></view>
- </view>
-
- <view v-if="!successlogion && !hasLogin|| successlogion && !hasLogin">
- <view style="font-size: 34upx;margin-bottom: 32upx;" @click="goAdress(3)">请登录</view>
- <view style="font-size: 24upx" @click="goAdress(3)" >圈币***></view>
- </view>
- </view>
- <view class="myNmaeRight" @click="writeday" v-if="menberinfo.has_sign == 0">每日签到></view>
- <view class="myNmaeRight" @click="iswriteday" v-if="menberinfo.has_sign == 1">您已签到</view>
- </view>
- </view>
- <van-cell @click="gomyorder(0)" title="我的订单" is-link />
- <view class="myorder">
- <view class="orderList">
- <view class="orderOne" @click="gomyorder(1)">
- <image class="imagewidth" src="../../static/order_wat_pay.png" ></image>
- <view>待付款</view>
- <block v-if="num.waiting_count>0">
- <text v-if="num.waiting_count<=99">{{num.waiting_count}}</text>
- <text v-else>99+</text>
- </block>
- </view>
- <view class="orderOne" @click="gomyorder(2)">
- <image class="imagewidth" src="../../static/order_handle.png"></image>
- <view>处理中</view>
- <block v-if="num.payed_count>0">
- <text v-if="num.payed_count<=99">{{num.payed_count}}</text>
- <text v-else>99+</text>
- </block>
- </view>
- <view class="orderOne" @click="gomyorder(3)">
- <image class="imagewidth" src="../../static/order_comment.png"></image>
- <view>已收货</view>
- </view>
- <view class="orderOne" @click="gomyorder(4)">
- <image class="imagewidth" src="../../static/order_cancel.png"></image>
- <view>已取消</view>
- </view>
- <view class="orderOne" @click="gomyorder(5)">
- <image class="imagewidth" src="../../static/order_wat_pay.png"></image>
- <view>退款/售后</view>
- </view>
- </view>
- </view>
- <view style="border-bottom: 20upx solid #F5F5F5;"></view>
- <van-cell title="我的服务"/>
- <van-cell @click="goAdress(0)" title="圈在网代理" is-link>
- <template slot="icon">
- <image style="width: 29upx;height: 29upx;
- margin-right: 8upx;
- vertical-align:middle"
- src="../../static/ab.png" />
- </template>
- </van-cell>
-
- <van-cell @click="goAdress(2)" title="圈在网入驻" is-link>
- <template slot="icon">
- <image style="width: 33upx;height: 33upx;
- margin-right: 8upx;
- vertical-align:middle"
- src="../../static/bb.png" />
- </template>
- </van-cell>
-
- <van-cell @click="goAdress(3)" title="圈币明细" is-link>
- <template slot="icon">
- <image style="width: 29upx;height: 29upx;
- margin-right: 8upx;
- vertical-align:middle"
- src="../../static/exchange.png" />
- </template>
- </van-cell>
-
- <van-cell @click="goAdress(1)" title="我的地址" is-link>
- <template slot="icon">
- <image style="width: 29upx;height: 29upx;
- margin-right: 8upx;
- vertical-align:middle"
- src="../../static/local.png" />
- </template>
- </van-cell>
-
- <van-cell @click="goAdress(9)" title="我的收藏" is-link>
- <template slot="icon">
- <image style="width: 29upx;height: 29upx;
- margin-right: 8upx;
- vertical-align:middle"
- src="../../static/favorite.png" />
- </template>
- </van-cell>
-
- <van-cell @click="goAdress(8)" title="意见反馈" is-link>
- <template slot="icon">
- <image style="width: 29upx;height: 29upx;
- margin-right: 8upx;
- vertical-align:middle"
- src="../../static/service.png" />
- </template>
- </van-cell>
-
- <van-cell @click="goAdress(7)" title="商务合作" is-link>
- <template slot="icon">
- <image style="width: 29upx;height: 29upx;
- margin-right: 8upx;
- vertical-align:middle"
- src="../../static/setting.png" />
- </template>
- </van-cell>
- </view>
- </template>
- <script>
- import uniIcon from '@/component/uni-icon/uni-icon.vue'
- import logionDialog from '@/component/loginDialog.vue'
- import {
- mapMutations,mapState
- } from 'vuex'
- export default {
- components: {
- uniIcon,
- logionDialog
- },
- data() {
- return {
- member_points: 0,
- showdialog: false,
- ishow: false,
- menberinfo: {},
- num:{},//我的订单数量统计
- }
- },
- computed:{
- ...mapState([
- 'hasLogin',
- 'successlogion',
- 'getcode',
- 'userInfo'
-
- ]),
- },
- onShow() {
- this.getuserinfo();
- this.getNum();
- },
- onLoad() {
- if(this.successlogion && this.hasLogin) {
- this.getuserinfo();
- }else {
- uni.navigateTo({
- url: './logion'
- })
- //this.showdialog = true;
- }
-
- },
- watch:{
- 'hasLogin':function(val) {
- if(val) {
- this.getuserinfo();
- }else {
- uni.navigateTo({
- url: './logion'
- })
- }
- },
- 'successlogion':function(val) {
- if(val) {
- this.getuserinfo();
- }else {
- uni.navigateTo({
- url: './logion'
- })
- }
- },
-
- },
-
- methods: {
- // 跳转到我的订单
- gomyorder(e) {
- if(this.successlogion && this.hasLogin) {
- let state = '';
- if(e == 0) {
- state = 'all';
- uni.navigateTo({
- url: `/pages/myCenter/orderdetail?state=${state}` // 我的消息通知
- })
- }else if(e == 1) {
- state = 'waiting';
- uni.navigateTo({
- url: `/pages/myCenter/orderdetail?state=${state}` // 我的消息通知
- })
-
- }else if(e == 2) {
- state = 'payed';
- uni.navigateTo({
- url: `/pages/myCenter/orderdetail?state=${state}` // 我的消息通知
- })
- }else if(e == 3) {
- state = 'complete';
- uni.navigateTo({
- url: `/pages/myCenter/orderdetail?state=${state}` // 我的消息通知
- })
- }else if(e == 4) {
- state = 'cancel';
- uni.navigateTo({
- url: `/pages/myCenter/orderdetail?state=${state}` // 我的消息通知
- })
- }else if(e == 5) {
- state = 'refund';
- uni.navigateTo({
- url: '/pages/myOrder/refuend' // 我的消息通知
- });
- }
-
- }else {
- uni.navigateTo({
- url: './logion'
- })
- }
-
- },
- getuserinfo() {
- this.request({
- url:'/v2/member/info',
- method:'GET',
- success: (res)=>{
- let { data } = res.data;
- // userinfo
- this.menberinfo = data;
- this.member_points =data.member_points
- }
- })
- },
- getNum(){
- this.request({
- url:'/v1/order/statistics',
- method:'GET',
- success: (res)=>{
- this.num=res.data.data
- }
- })
- },
- // // 关闭弹窗
- // cancelDiaolog() {
- // this.showdialog = false;
- // },
- // // 确定
- // confirmDiaolog() {
- // this.showdialog = false;
- // },
- // changeDiaolog() {
- // this.showdialog = false;
- // },
- // keepdialog() {
- // this.showdialog = true;
- // },
- // 签到
- writeday() {
- this.request({
- url: '/v1/member/point',
- method: 'POST',
- data: {
- stage: 'sign'
- },
- success: (res) => {
- if(res.data.code == 1000) {
- this.$msg("签到成功")
- }
- this.getuserinfo();
- }
- })
- },
- iswriteday() {
- this.$msg("今天已经签过到")
- },
- goAdress(e) {
- if(this.successlogion && this.hasLogin) {
- if(e == 1) {
- let a = 1;
- uni.navigateTo({
- url: `/pages/myOrder/adress?isform=${a}` // 我的地址
- })
- }else if(e == 0) {
- uni.navigateTo({
- url: './applyfor' // 我的申请
- })
-
- }else if(e == 2) {
- uni.navigateTo({
- url: './Settled' // 酒店入驻
- })
-
- }else if(e == 3) {
-
- uni.navigateTo({
- url: './definite' // 圈币明细
- })
-
- }else if(e == 7) {
-
- uni.navigateTo({
- url: './business' // 商务合作
- })
-
- }else if(e == 8) {
-
- uni.navigateTo({
- url: './commentback' // 意见反馈
- })
-
-
- }else if(e == 9) {
- uni.navigateTo({
- url: './myCollect' // 我的收藏
- })
- }
- }else {
- uni.navigateTo({
- url: './logion'
- })
- //this.showdialog = true;
- }
- },
-
- goinfor() {
- if(this.successlogion && this.hasLogin) {
- uni.navigateTo({
- url: './information' // 我的xiaoxi
- })
- }else {
- uni.navigateTo({
- url: './logion'
- })
- // this.showdialog = true;
- }
-
- }
- }
- }
- </script>
- <style lang="scss">
- .myBox {
- height: 100vh;
- width: 100%;
- background-color: #fff;
- .myhead {
- height: 290upx;
- background-color: #D9332E;
- .myheadImg {
- padding: 10upx 32upx 0 0;
- height: 85upx;
- text-align: right;
- line-height: 85upx;
- }
- .myNmae {
- display: flex;
- justify-content: space-between;
- flex-direction: row;
- align-items: center;
- padding: 20upx 32upx 0 32upx;
- .myNmaeLeft {
- display: flex;
- flex-direction: row;
- align-items: center;
- color: #fff;
- .myNmaeImg {
- width: 128upx;
- height: 128upx;
- border-radius: 50%;
- padding-right: 32upx;
- image {
- width: 100%;
- height: 100%;
- border-radius: 50%;
- background-color: #fff;
- }
- }
- }
- .myNmaeRight {
- width:144upx;
- height: 52upx;
- background:rgba(255,255,255,0.27);
- border-radius: 44upx;
- border:2upx solid rgb(255,255,255);
- color: #fff;
- line-height: 52upx;
- text-align: center;
- font-size: 24upx;;
- }
- }
- }
- .myorder {
- padding: 0 32upx;
- .orderList {
- padding: 28upx 0;
- display: flex;
- }
- .orderOne {
- flex: 1;
- flex-direction: column;
- text-align: center;
- position: relative;
- .imagewidth {
- width: 44upx;
- height: 44upx;
- }
- text{
- position: absolute;
- font-size: 20upx;
- color: #fff;
- background-color: #D9332E;
- border-radius: 50upx;
- top: 0;
- right: -10upx;
- padding: 0 4upx;
- box-sizing: border-box;
- white-space: nowrap;
- text-align: center;
- min-width:30upx;
- }
- }
- }
-
- }
- </style>
|