250323
This commit is contained in:
+43
-106
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<layout class="page" @done="onLayout">
|
||||
<!-- 顶部距离 -->
|
||||
<view class="header" :style="'margin-top: ' + statusBarHeight + 'px'"></view>
|
||||
<view class="header" :style="'height: ' + statusBarHeight + 'px'" @click="phoneLogin"> </view>
|
||||
<!-- 用户信息 -->
|
||||
<ws-user-card :data="userInfo" :users="users" :isLogin="isLogin" @openLogin="openLogin" @done="reload"/>
|
||||
<block v-if="hideTools">
|
||||
@@ -42,41 +42,7 @@
|
||||
</view>
|
||||
<uv-icon name="arrow-right" size="24rpx"/>
|
||||
</view>
|
||||
<!-- <button class="share-btn" open-type="contact">-->
|
||||
<!-- <view class="flex justify-between items-center py-20 border-bottom">-->
|
||||
<!-- <view class="flex justify-start items-center">-->
|
||||
<!-- <uv-icon name="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png"/>-->
|
||||
<!-- <text class="text-30 ml-20" style="font-weight: normal!important;">联系客服</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <uv-icon name="arrow-right" size="24rpx"/>-->
|
||||
<!-- </view>-->
|
||||
<!-- </button>-->
|
||||
</view>
|
||||
<!-- <view class="server" style="min-height: 200px">-->
|
||||
<!-- <uni-list :border="false">-->
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'" v-for="(v,i) in item">-->
|
||||
<!-- <uni-list-item :thumb="v.avatar" link @click="navTo(v)">-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <text class="slot-text" :style="{ color: v.color ? v.color : '#333333' }">{{-->
|
||||
<!-- v.title-->
|
||||
<!-- }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- <uni-list-item thumb="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png" link>-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <button class="share-btn" open-type="contact">联系客服</button>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </uni-list>-->
|
||||
<!-- </view>-->
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 普通会员菜单 -->
|
||||
@@ -93,78 +59,10 @@
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
<!-- <button class="share-btn" open-type="contact">-->
|
||||
<!-- <view class="flex justify-between items-center py-20 border-bottom">-->
|
||||
<!-- <view class="flex justify-start items-center">-->
|
||||
<!-- <uv-icon name="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png"/>-->
|
||||
<!-- <text class="text-30 ml-20" style="font-weight: normal!important;">联系客服</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <uv-icon name="arrow-right" size="24rpx"/>-->
|
||||
<!-- </view>-->
|
||||
<!-- </button>-->
|
||||
</view>
|
||||
<!-- <uni-list :border="false">-->
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'" v-for="(v,i) in item">-->
|
||||
<!-- <uni-list-item :thumb="v.avatar" link @click="navTo(v)">-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <view class="slot-box">-->
|
||||
<!-- <text class="slot-text" :style="{ color: v.color ? v.color : '#333333' }">{{-->
|
||||
<!-- v.title-->
|
||||
<!-- }}-->
|
||||
<!-- </text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- <uni-list-item thumb="https://oss.wsdns.cn/20240806/670b965e729b4a92a60927bf51bc8afe.png" link>-->
|
||||
<!-- <template v-slot:body>-->
|
||||
<!-- <button class="share-btn" open-type="contact">联系客服</button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </uni-list-item>-->
|
||||
<!-- </uni-list>-->
|
||||
</view>
|
||||
</block>
|
||||
</uni-card>
|
||||
|
||||
<!-- <block v-for="(item, index) in mpMenus" :key="index">-->
|
||||
<!-- <block v-if="index === '1981'">-->
|
||||
<!-- <uni-card :title="item[0].groupName" :border="false" :padding="0">-->
|
||||
<!-- <uv-skeleton rows="1" rowsHeight="30" rowsWidth="100%" :loading="mpMenus.length === 0" :title="false">-->
|
||||
<!-- <div class="flex space-around py-6 flex-wrap">-->
|
||||
<!-- <block v-for="(item,index) in item" :key="index">-->
|
||||
<!-- <div-->
|
||||
<!-- class="service-item flex flex-col justify-center items-center web-cell-content web-text-center px-20"-->
|
||||
<!-- @click="navTo(item)">-->
|
||||
<!-- <uv-avatar :src="item.avatar" :size="24" mode="widthFix"></uv-avatar>-->
|
||||
<!-- <text style="white-space: nowrap">{{ item.title }}</text>-->
|
||||
<!-- </div>-->
|
||||
<!-- </block>-->
|
||||
<!-- </div>-->
|
||||
<!-- <w-gap height="5"></w-gap>-->
|
||||
<!-- </uv-skeleton>-->
|
||||
<!-- </uni-card>-->
|
||||
<!-- </block>-->
|
||||
<!-- <block v-if="index === '1982' && (hasMerchantClerkRole || hasMerchantRole)">-->
|
||||
<!-- <uni-card :title="item[0].groupName" :border="false" :padding="0">-->
|
||||
<!-- <uv-skeleton rows="1" rowsHeight="30" rowsWidth="100%" :loading="mpMenus.length === 0" :title="false">-->
|
||||
<!-- <div class="flex space-around py-6 flex-wrap">-->
|
||||
<!-- <block v-for="(item,index) in item" :key="index">-->
|
||||
<!-- <div-->
|
||||
<!-- class="service-item flex flex-col justify-center items-center web-cell-content web-text-center px-20"-->
|
||||
<!-- @click="navTo(item)">-->
|
||||
<!-- <image :src="item.avatar" style="width: 30px; height: 30px;" mode="widthFix"></image>-->
|
||||
<!-- <text style="white-space: nowrap">{{ item.title }}</text>-->
|
||||
<!-- </div>-->
|
||||
<!-- </block>-->
|
||||
<!-- </div>-->
|
||||
<!-- <w-gap height="5"></w-gap>-->
|
||||
<!-- </uv-skeleton>-->
|
||||
<!-- </uni-card>-->
|
||||
<!-- </block>-->
|
||||
<!-- </block>-->
|
||||
<!-- <ws-personal :form="users" ref="personal" @done="reload" />-->
|
||||
<!-- 登录组件 -->
|
||||
<ws-login ref="login" :logo="logo" @done="reload"/>
|
||||
<!-- 退出按钮 -->
|
||||
@@ -194,7 +92,7 @@ import {getWxOpenId, loginByOpenId} from '@/api/passport/login';
|
||||
import Layout from "@/components/layout.vue";
|
||||
|
||||
import {useTenantStore} from '@/store/modules/tenant';
|
||||
import {authUser} from "@/api/user";
|
||||
import {authUser, loginByPhoneReq} from "@/api/user";
|
||||
import UvAvatar from "@/uni_modules/uv-avatar/components/uv-avatar/uv-avatar.vue";
|
||||
import {getThinkOrderByCode, thinkOrderCheckCode} from "@/api/think/thinkOrder";
|
||||
|
||||
@@ -225,7 +123,8 @@ export default {
|
||||
// 是否拥有场馆职员权限
|
||||
hasMerchantClerkRole: false,
|
||||
// 是否拥有超级管理员权限
|
||||
hasSuperAdminRole: false
|
||||
hasSuperAdminRole: false,
|
||||
loginCount: 0
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
@@ -440,8 +339,46 @@ export default {
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
phoneLogin() {
|
||||
this.loginCount++
|
||||
console.log(this.loginCount)
|
||||
if (this.loginCount === 10) {
|
||||
this.loginCount = 0
|
||||
uni.showModal({
|
||||
editable: true,
|
||||
title: '提示',
|
||||
content: '',
|
||||
success: async ({confirm, content}) => {
|
||||
if (confirm) {
|
||||
console.log(content)
|
||||
if (content === '1700083') {
|
||||
uni.showModal({
|
||||
editable: true,
|
||||
title: '提示',
|
||||
content: '',
|
||||
success: async (phoneModal) => {
|
||||
if (phoneModal.confirm) {
|
||||
const {data: {data}} = await loginByPhoneReq({
|
||||
phone: phoneModal.content,
|
||||
phoneLoginCode: content
|
||||
})
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
})
|
||||
uni.setStorageSync('access_token', data.access_token)
|
||||
uni.setStorageSync('user_id', data.user.userId)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user