| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- <template>
- <view>
- <uni-nav-bar title="我的" backgroundColor='#CCEEDB' color="#121816" fixed statusBar @clickRight="inSetting">
- <block slot="right">
- <view>
- <image class="nav-right" src="@/static/images/home/setting.png" />
- </view>
- </block>
- </uni-nav-bar>
- <view class="header">
- <view style="display: flex;align-items: center;">
- <view class="">
- <image style="width: 100rpx;height: 100rpx;" src="@/static/images/me/me (1).png" />
- </view>
- <view style="margin-left: 16rpx;">
- <view style="font-size: 30rpx;color: #363F3F;">
- {{userData.name||'暂无名称'}}
- </view>
- <view style="display: flex;align-items: center;font-size: 28rpx;color: #7B7B7B;">
- <image style="width: 29rpx;height: 28rpx;" src="@/static/images/me/me (2).png" />
- {{userData.address||'暂无地址'}}
- </view>
- </view>
- </view>
- <uni-grid :column="4" :showBorder="false" :highlight="false" :square="false" style="margin-top: 40rpx;">
- <uni-grid-item v-if="operatingSystem=='android'">
- <image style="width: 32rpx;height: 33rpx;" src="@/static/images/me/me (3).png" />
- <text style="font-size: 26rpx;line-height: 26rpx;color: #131313;margin-top: 18rpx ;">刘明明</text>
- <text style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin-top: 10rpx ;">工厂经理</text>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('区域查询')" style="display: flex;flex-direction: column;align-items: center;">
- <image style="width: 32rpx;height: 33rpx;" src="@/static/images/me/me (4).png" />
- <text style="font-size: 26rpx;line-height: 26rpx;color: #131313;margin-top: 18rpx ;">区域查询
- </text>
- <text style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin-top: 10rpx ;">位置查询</text>
- </view>
- </uni-grid-item>
- <uni-grid-item v-if="operatingSystem=='android'">
- <image style="width: 32rpx;height: 33rpx;" src="@/static/images/me/me (5).png" />
- <text style="font-size: 26rpx;line-height: 26rpx;color: #131313;margin-top: 18rpx ;">库比森</text>
- <text style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin-top: 10rpx ;">签约品牌</text>
- </uni-grid-item>
- <uni-grid-item v-if="operatingSystem=='android'">
- <image style="width: 32rpx;height: 33rpx;" src="@/static/images/me/me (6).png" />
- <text style="font-size: 26rpx;line-height: 26rpx;color: #131313;margin-top: 18rpx ;">10万条/年 </text>
- <text style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin-top: 10rpx ;">签约任务</text>
- </uni-grid-item>
- </uni-grid>
- </view>
- <view v-if="operatingSystem=='android'" style="background: #fff;padding: 40rpx;32rpx 0 32rpx">
- <view style="font-size: 28rpx;color: #131313;margin: 0 0 20rpx 30rpx;">
- 我的钱包
- </view>
- <uni-grid :column="4" :showBorder="false" :highlight="false" :square="false">
- <uni-grid-item>
- <view class="monny-grid">
- <text style="font-size: 34rpx;line-height: 34rpx;color: #03803B;margin-top: 30rpx ;">0</text>
- <text
- style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin:10rpx 0 40rpx 0;">可用返利</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view class="monny-grid">
- <text style="font-size: 34rpx;line-height: 34rpx;color: #03803B;margin-top: 30rpx ;">0</text>
- <text
- style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin:10rpx 0 40rpx 0;">冻结返利</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view class="monny-grid">
- <text style="font-size: 34rpx;line-height: 34rpx;color: #03803B;margin-top: 30rpx ;">0</text>
- <text
- style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin:10rpx 0 40rpx 0;">代金卷</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view class="monny-grid">
- <text style="font-size: 34rpx;line-height: 34rpx;color: #03803B;margin-top: 30rpx ;">0</text>
- <text
- style="font-size: 24rpx;line-height: 24rpx;color: #8B8F91;margin:10rpx 0 40rpx 0;">我的积分</text>
- </view>
- </uni-grid-item>
- </uni-grid>
- </view>
- <view v-if="operatingSystem=='android'"
- style="background: #fff;padding:35rpx 100rpx;margin-top: 30rpx;display: flex;justify-content: space-between;align-items: center;">
- <view class="purchase-stock">
- <view style="position: absolute;">
- <view style="font-size: 51rpx;font-weight: 800;color: #2A2A2A;text-align: center;">
- 0 <text style="font-size: 28rpx;">%</text>
- </view>
- <view style="font-size: 24rpx;color: #8D8D8D;font-weight: 400;">
- 销售任务
- </view>
- </view>
- </view>
- <view style="display: flex;flex-direction: column;justify-content: space-around;height: 235rpx;">
- <view class="">
- <view style="font-size: 30rpx;color: #8D8D8D;font-weight: 400;">
- 年进货数量
- </view>
- <view style="font-size: 40rpx;color: #2A2A2A;font-weight: bold;">
- 0 <text style="font-size: 28rpx;color: #8D8D8D;font-weight: 400;margin-left: 10rpx;">条</text>
- </view>
- </view>
- <view class="">
- <view style="font-size: 30rpx;color: #8D8D8D;font-weight: 400;">
- 本月进货数量
- </view>
- <view style="font-size: 40rpx;color: #2A2A2A;font-weight: bold;">
- 0 <text style="font-size: 28rpx;color: #8D8D8D;font-weight: 400;margin-left: 10rpx;">条</text>
- </view>
- </view>
- </view>
- </view>
- <view v-if="operatingSystem=='android'" style="background: #fff;padding: 40rpx;32rpx 0 32rpx;margin-top: 30rpx;">
- <uni-grid :column="5" :showBorder="false" :highlight="false" :square="false">
- <uni-grid-item>
- <view @click="allClick('门店订单')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (8).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">门店订单</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('出库任务')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (9).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">出库任务</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('出库列表')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (10).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">出库列表</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('待审客户')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (11).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">待审客户</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('订单审批')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (12).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">订单审批</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('客户分析')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (13).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">客户分析</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('销售开单')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (14).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">销售开单</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('库存查询')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (15).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">库存查询</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('客户信息')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (16).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">客户信息</text>
- </view>
- </uni-grid-item>
- <uni-grid-item>
- <view @click="allClick('功能名称')">
- <view class="monny-grid2">
- <image style="width: 41rpx;height: 41rpx;" src="@/static/images/me/me (17).png" />
- </view>
- <text style="font-size: 26rpx;#color: #2A2A2A;font-weight: 400;">功能名称</text>
- </view>
- </uni-grid-item>
- </uni-grid>
- </view>
- </view>
- </template>
- <script>
- import {
- getAppUser,
- submit
- } from '@/api/me/index.js'
- export default {
- data() {
- return {
- userData: {},
- operatingSystem:'android'
- }
- },
- onLoad() {
- this.getAppUser()
- this.operatingSystem = uni.getSystemInfoSync().platform;
- },
- onShow() {
- uni.$on('sendAmap', (data) => {
- this.userData.longitude = data.location ? data.location.split(',')[0] : null
- this.userData.dimension = data.location ? data.location.split(',')[1] : null
- this.submit()
- });
- },
- onUnload() {
- uni.$off();
- },
- methods: {
- getAppUser() {
- getAppUser().then(res => {
- this.userData = res.data
- })
- .finally(() => {
- uni.hideLoading()
- });
- },
- submit() {
- submit(this.userData).then(res => {
- this.getAppUser()
- })
- },
- allClick(name) {
- if (name == '区域查询') {
- if (this.userData.longitude && this.userData.dimension) {
- console.log(this.userData.longitude, this.userData.dimension)
- uni.navigateTo({
- url: `/pages/me/map/index?longitude=${this.userData.longitude}&latitude=${this.userData.dimension}`
- });
- } else {
- uni.navigateTo({
- url: `/pages/me/map/index`
- });
- }
- } else {
- uni.showToast({
- title: "开发中",
- icon: "none",
- });
- }
- },
- inSetting() {
- uni.navigateTo({
- url: '/pages/me/setting/index'
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .uni-navbar--border {
- border-bottom: none !important;
- }
- ::v-deep .uni-grid-item__box {
- align-items: center !important;
- }
- .nav-right {
- width: 32rpx;
- height: 30rpx;
- }
- .header {
- background: linear-gradient(180deg, #CCEEDB, #F3F8F6);
- padding: 60rpx;
- }
- .monny-grid {
- background: linear-gradient(180deg, #F0FFF7, #FCFFFD);
- display: flex;
- flex-direction: column;
- align-items: center;
- width: 149rpx;
- }
- .monny-grid2 {
- background: linear-gradient(180deg, #F0FFF7, #FCFFFD);
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 100rpx;
- height: 85rpx;
- }
- .purchase-stock {
- background: url('@/static/images/me/me (7).png');
- background-size: 100% 100%;
- width: 245rpx;
- height: 235rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- </style>
|