yurong/.svn/pristine/e8/e8231471e2b059a80eac63cf15e...

160 lines
5.6 KiB
Plaintext

<template>
<view>
<uni-nav-bar :border="false" fixed backgroundColor="rgba(0,0,0,0)"></uni-nav-bar>
<view class="relative zi-2 rowsb pl-34 pr-34">
<view v-if="app.userInfo && app.userInfo.id && app.token" class="rows f-7" @tap="goUserInfo">
<!-- <view class="rows"></view> -->
<image :src="URL + app.userInfo.avatar" mode="aspectFill" class="w-112 h-112 br-56"></image>
<view class="rowsal pl-22 h-112 fs-30 pt-16 pb-16">
<view>{{ app.userInfo.username}}</view>
<view>{{ app.userInfo.mobile }}</view>
</view>
</view>
<view v-else class="rows f-7" @tap="goLogin">
<image src="/static/wd_gr.png" class="w-112 h-112 br-56"></image>
<view class="rowscl pl-22 h-112">
<view class="fs-30 colfff">未授权</view>
</view>
</view>
<view class="f-3 rowse pt-20">
<view class="tct">
<image @tap="goNext('/pages/me/pagesOne/set/set')" src="/static/saoyisao.png" class="w-40 h-40"></image>
<view class="fs-24 mt-6 colfff">扫一扫</view>
</view>
</view>
</view>
<image src="/static/beijingda.png" class="w-750 h-440 absolute" style="top: 0;"></image>
<view class="w-710 ml-20 pt-70 relative" style="z-index: 1;">
<image src="/static/baihxu.png" class="w-710 mt-48 mb-20" mode="widthFix"></image>
<view class="bgff br-12">
<view class="h-80 rowsb rowsm fs-28 fw-600 pl-40 pr-40">
<text>我的订单</text>
<view @tap="goNext('/pages/me/pagesOne/order/order?value=0')" class="rows rowsm fs-24 col999" style="font-weight: normal;">
<text class="mr-6">查看全部</text>
<uni-icons type="right" size="20rpx" color="#999"></uni-icons>
</view>
</view>
<view class="rowsa pb-20 ">
<navigator :url="`/pages/me/pagesOne/order/order?value=${item.id}`" v-for="(item,index) in orderList" :key="index"
class="tct">
<view class="">
<image :src="item.image" class="w-84 h-84"></image>
<view class="fs-26 col333 relative" style="bottom: 10rpx;color: #aba7a7;">{{item.title}}</view>
</view>
</navigator>
</view>
</view>
<!-- <image src="/static/banner.png" class="w-710 h-176"></image> -->
<view class="bgff br-20 mt-20 ">
<view class="fs-28 col333 pb-24 pl-20 pr-20 pt-20 pb-20">我的工具</view>
<view class="rowsa rowsm rowsw pl-20 pr-20">
<view class="fs-26 w-160 tct mb-36" @tap="goPath(item.path)" v-for="(item,index) in list" :key="index">
<image class="w-80 h-80" :src="item.image"></image>
<view class="mt-8 fs-24">{{ item.title }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
onselect: 0,
orderList: [
{id:'1',title:'待付款',image:'/static/daifukuan.png'},
{id:'2',title:'待核销',image:'/static/daipeisong.png'},
{id:'3',title:'待发货',image:'/static/peisongzhog.png'},
{id:'4',title:'待收货',image:'/static/peisongzhog.png'},
{id:'4',title:'退款/售后',image:'/static/peison.png'},
],
list: [
{image: '/static/wode.png', title: ' 我的工分', path: '/pages/me/pagesOne/couponList/couponList'},
{image: '/static/wideji.png', title: '我的农分', path: '/pages/me/pagesOne/tui/tui'},
{image: '/static/wodekwf.png', title: '农分订单', path: '/pages/me/pagesOne/shopJoin/shopJoin'},
{image: '/static/wodeua.png', title: '我的团队', path: '/pages/me/myTeam/myTeam'},
{image: '/static/shocabjgdf.png', title: '我的收藏', path: 'kefu'},
{image: '/static/hexiaodsisdg.png', title: '核销记录', path: 'pagesOne/feedBack/feedBack'},
{image: '/static/jifenhuzhuan.png', title: ' 合伙人申请', path: '/pages/me/pagesOne/couponList/couponList'},
{image: '/static/shjiaruzhu.png', title: '区域经理申请', path: '/pages/me/pagesOne/tui/tui'},
{image: '/static/shujutndv.png', title: '联系客服', path: '/pages/me/pagesOne/shopJoin/shopJoin'},
{image: '/static/shoid.png', title: '我的地址', path: '/pages/me/address/addressEdit/addressEdit'},
{image: '/static/hsenhe.png', title: '意见反馈', path: 'kefu'},
{image: '/static/sf.png', title: '设置', path: '/pages/me/set/set'},
],
system: {},
mallList: [{title:'',id:''}],//门店列表
}
},
onLoad() {
this.system = uni.getStorageSync('system')
},
onShow() {
// this.getUserInfo()
},
methods: {
selectMall(e) {//改变门店
this.onselect = e.detail.value
},
goPath(path) {
if (path == 'kefu') {
let phoneNumber = this.app.system.service
console.log(phoneNumber)
uni.makePhoneCall({
phoneNumber,//电话号码
})
} else if (path) {
this.goNext(path)
} else {
this.goTui()
}
},
goLogin() {
let that = this
uni.showModal({
content: "请先授权登录再进行此操作",
title: "未登录",
success(res) {
if (res.confirm) {
that.$tools.goNext('/pages/login/login')
}
}
})
},
goTui() {//
this.showtt('该功能暂未开放,敬请谅解')
},
goUserInfo() {
this.$tools.goNext('pagesOne/userInfoChange/userInfoChange')
},
//获取用户信息
getUserInfo() {
this.axiosFromToken('POST', 'user/userinfo', {
token: this.app.token
}).then(res => {
if (res.code == 1) {
this.app.userInfo = res.data
uni.setStorageSync('userInfo', res.data)
this.$forceUpdate()
} else {
uni.removeStorageSync('userInfo')
this.$tools.showtt(res.msg)
}
})
},
}
}
</script>
<style>
page {
background: #f7f6fa;
}
</style>