| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- <template>
- <view>
- <view :class="'mine' + (skinNotColor ? ' not-color' : '')">
- <image src="/static/images/wdbg.png" class="wdbg"
- @click="jumpUrl('mine/userinfo/userinfo')"></image>
- <view class="minec">
- <image :src="userInfos.avatar ? userInfos.avatar : '/static/images/userimg.png'" mode="aspectFit"
- class="user" @click="jumpUrl('mine/userinfo/userinfo')"></image>
- <view class="mines" @click="jumpUrl('mine/userinfo/userinfo')" v-if="isLogin">
- <view class="ddflex">{{userInfos.nickName}}
- </view>
- <text class="edu" v-if="userInfos.mobile">{{userInfos.mobile}}</text>
- </view>
- <view class="flex" v-else>
- <text class="login-btn" @click="jumpUrl('')">点击登录</text>
- </view>
-
- </view>
- </view>
- <view class="yichang-box ddflex">
- <view class="yichang-item fflex" @click="jumpUrl('warning/abnormalAlarm/abnormalAlarm')">
- <view class="yichang-title">异常告警</view>
- <view class="yichang-data">{{alarmCount}}<text class="symbol">条</text></view>
- <view class="yichang-btn">去查看</view>
- <image src="../../static/images/ycjg.png"></image>
- </view>
- <view class="yichang-item fflex" style="margin-left: 26rpx;" @click="jumpUrl('warning/orderAlarm/orderAlarm')">
- <view class="yichang-title">异常处理</view>
- <view class="yichang-data">{{exceptionOrderCount}}<text class="symbol">个</text></view>
- <view class="yichang-btn">去处理</view>
- <image src="../../static/images/yccl.png"></image>
- </view>
- </view>
-
- <view class="order">
- <view class="tits dflex">
- <view class="flex">我的服务</view>
- </view>
- <view class="list2 dflex">
- <navigator url="" hover-class="none" class="li" @click="jumpUrl('mine/order/order')">
- <image src="../../static/pages/images/user_service1.png"></image>
- <text>我的订单</text>
- </navigator>
- <navigator url="" hover-class="none" class="li" @click="jumpUrl('pages/myStore/myStore')">
- <image src="../../static/pages/images/user_service2.png"></image>
- <text>我的商家</text>
- </navigator>
- <navigator url="" hover-class="none" class="li" @click="jumpUrl('pages/myMerchant/myMerchant')">
- <image src="../../static/pages/images/user_service3.png"></image>
- <text>我的门店</text>
- </navigator>
- <navigator url="" hover-class="none" class="li" @click="jumpUrl('pages/operationData/operationData')">
- <image src="../../static/pages/images/user_service4.png"></image>
- <text>运营数据</text>
- </navigator>
- <view class="li">
- <contact-button img-url="../../static/pages/images/user_service5.png" img-style='width: 74rpx;height: 74rpx;margin: 0 auto 12rpx;' button-text="官方客服" styles="line-height:initial;"></contact-button>
- </view>
- <navigator url="/pages/about/about" hover-class="none" class="li">
- <image src="../../static/pages/images/user_service6.png"></image>
- <text>关于我们</text>
- </navigator>
- <navigator url="/mine/feedback/feedback" hover-class="none" class="li">
- <image src="../../static/pages/images/user_service7.png"></image>
- <text>建议反馈</text>
- </navigator>
- <navigator url="/mine/feedback/feedback" hover-class="none" class="li">
- <image src="../../static/pages/images/user_service8.png"></image>
- <text>退出登录</text>
- </navigator>
- </view>
- </view>
-
- <footer-copyright></footer-copyright>
- <foot channel="user" :isUpdate="isUpdate"></foot>
- </view>
- </template>
- <script>
- // pages/user/user.js
- const app = getApp();
- const req = require("../../utils/request.js");
- const route = require("../../utils/route");
- import foot from "../../components/nav-bar/index";
- import footerCopyright from "../../components/footer-copyright/footer-copyright";
- export default {
- data() {
- return {
- skinNotColor: req.public.skinNotColor,
- picUrlss: req.public.picUrls,
- bottomBlankHeignt: app.globalData.isIPhoneX ? 68 : 0,
- // merchantId: '',
- iconSrc: req.public.iconSrc,
-
- isLogin:false,
-
- userInfos: null,
-
- alarmCount:0,
- exceptionOrderCount:0
- };
- },
- components: {
- foot,
- footerCopyright
- },
- props: {},
- onLoad(options) {
-
- this.userInfos = req.getStorage('userInfo');
- if(this.userInfos){
- this.isLogin = true
- }else{
- this.isLogin = false
- }
-
- },
- onShow: function() {
- this.setData({
- isUpdate: !this.isUpdate
- });
- this.userInfos = req.getStorage('userInfo');
- if(this.userInfos){
- this.isLogin = true
- this.getUserInfo()
- this.getWarningData()
- }else{
- this.isLogin = false
- }
- },
- methods: {
- jumpUrl(url) {
- if (!req.isLogin()) return false;
- app.globalData.navigateTo(url);
- },
- getUserInfo(){
- req.getRequest('/admin/v2/userInfo',{},res=>{
-
- })
- },
- getWarningData(){
- req.getRequest('/admin/v2/alarm/alarmCount',{},res=>{
- this.alarmCount = res.alarmCount?res.alarmCount:0
- this.exceptionOrderCount = res.exceptionOrderCount?res.exceptionOrderCount:0
- })
- }
- }
- };
- </script>
- <style>
- @import "./user.css";
- </style>
|