1 Star 0 Fork 3

yang1984/洗车服务-共享洗车

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.vue 2.68 KB
一键复制 编辑 原始数据 按行查看 历史
道法合一(qq:1126919503) 提交于 2023-03-15 20:16 . tijia
<template>
<view>
<!-- <u-notice-bar v-if="newShow" @click="goNew" mode="horizontal" :list="notice"></u-notice-bar> -->
<view v-if="role==2 || role ==3"
style="background: linear-gradient(180deg,#e0f4ff, #f8f9f9);display: inline-block;width: 100%;padding-bottom: 40rpx;">
<view style="display: flex;justify-content: flex-end;margin: 20rpx;">
<u-button v-if="role==3" @click="$Go('/pages/my/store')" type="primary" size="mini"
:custom-style="{backgroundColor:'#fff',fontSize:'24rpx',color:'#2D9AFE'}" shape="circle"> 我要提现
</u-button>
</view>
<view class="u-flex u-row-around u-text-center u-margin-top-60" style="color: #333;">
<view>
<view style="font-size: 40rpx;font-weight: bold;">
{{menony}}
</view>
<view class="u-margin-top-20">余额</view>
</view>
<view>
<view style="font-size: 40rpx;font-weight: bold;">
{{user_num}}
</view>
<view class="u-margin-top-20">会员数量</view>
</view>
</view>
</view>
<List :list="list" v-if="role" @go='go'></List>
<!-- <u-loadmore :status="initial.status" /> -->
</view>
</template>
<script>
import loader from '@/common/loadPage.js';
import List from '@/pages/store/components/list';
import wxLocation from '@/common/location.js';
export default {
components: {
List
},
mixins: [loader],
data() {
return {
nav: [{
name: '车位'
}, {
name: '订单'
}],
current: 0,
list: [],
initial: {
page: 1,
geturl: "/alliance/store",
parm: {
lat: '',
lng: ""
},
isPage: true
},
menony: "",
user_num: '',
role: '',
newShow: false
}
},
methods: {
message() {
this.$u.post('/Alliance/message ', {}).then(res => {
if (res.length) {
this.newShow = true
}
}).catch(err => {})
},
infomation() {
return new Promise((resolve, reject) => {
this.$u.api.userInfo().then(res => {
this.role = res.role;
resolve(res)
}).catch(err => {
})
})
},
jiazai() {
this.$u.post('/alliance/info', {}).then(res => {
this.menony = res.balance;
this.user_num = res.userNum
}).catch(err => {})
},
change(index) {
this.current = index;
},
go(e) {
uni.navigateTo({
url: '/pages/myStore/detail?id=' + e.id
})
}
},
onLoad() {
},
async onShow() {
await this.infomation()
const wx = new wxLocation();
wx.getAddress().then(res => {
this.initial.parm.lat = res.result.location.lat;
this.initial.parm.lng = res.result.location.lng;
this.getGoods();
}).catch(err => {
})
this.jiazai()
this.message()
}
}
</script>
<style>
</style>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yang1984/share-car-wash.git
git@gitee.com:yang1984/share-car-wash.git
yang1984
share-car-wash
洗车服务-共享洗车
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385