初始化

This commit is contained in:
2024-07-10 13:50:01 +08:00
commit e30966c6c5
1073 changed files with 143076 additions and 0 deletions
@@ -0,0 +1,161 @@
<template>
<view class="user-card">
<view class="userinfo" @click="openLogin">
<view class="avatar" @click="navTo('/package/user/personal')">
<image v-if="isLogin" :src="data.avatar ? data.avatar : data.avatarUrl" mode="aspectFill"></image>
<!-- <uni-icons v-else type="contact-filled" color="#f3f3f3" size="100"></uni-icons> -->
</view>
<view class="nickname-box" v-if="isLogin">
<view class="nickname">
<text class="nickname-text">{{ data.nickname }}</text>
</view>
<view class="userid">
<view class="text">{{ data.mobile }}</view>
<!-- <uni-icons custom-prefix="iconfont" color="#333333" type="icon-erweima" size="20"></uni-icons> -->
</view>
</view>
<view class="nickname-box" v-else>
<view class="nickname">点击登录</view>
</view>
</view>
<view class="tool-btn" v-if="merchantList">
<uni-data-select :clear="false" style="background-color: #fff; width: 300rpx;" v-model="value" :localdata="merchantList" @change="change"></uni-data-select>
</view>
</view>
</template>
<script>
import { getUserInfo } from '@/uni_modules/ws-common/api/layout';
import { useUserStore } from '@/uni_modules/ws-common/store/modules/user';
const userStore = useUserStore();
export default {
name: 'ws-user-card',
emits: ['openLogin'],
props: {
isLogin: {
type: Boolean,
default: false
},
data: {
type: Object,
default: {}
},
merchantList: {
type: Array,
default: []
},
merchantId: {
type: Number,
default: 0
}
},
data() {
return {
value: 3034
};
},
methods: {
openLogin() {
this.$emit('openLogin');
},
navTo(url) {
console.log('url99: ',url);
if (!this.isLogin) {
return false;
}
return uni.navigateTo({
url
});
},
change(index) {
console.log(index);
},
reload() {
this.$emit('done');
}
}
};
</script>
<style lang="scss" scoped>
.user-card {
width: 750rpx;
display: flex;
justify-content: space-between;
.userinfo {
display: flex;
flex-direction: row;
margin: 0 20rpx;
.avatar {
width: 156rpx;
height: 156rpx;
border-radius: 100rpx;
background-color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
image {
width: 156rpx;
height: 156rpx;
border-radius: 100rpx;
background-color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
}
}
.nickname-box {
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
.nickname {
font-size: 42rpx;
font-weight: 500;
display: flex;
align-items: center;
.nickname-text {
margin-right: 26rpx;
}
.role-name {
font-size: 24rpx;
}
}
.userid {
display: flex;
align-items: center;
.text {
font-size: 24rpx;
color: #797979;
margin-right: 30rpx;
}
}
.grade {
display: flex;
font-size: 24rpx;
color: $uni-text-color-placeholder;
.item {
margin-right: 30rpx;
color: $uni-text-color-placeholder;
}
}
}
}
.tool-btn {
display: flex;
align-items: center;
margin-right: 40rpx;
}
}
</style>
@@ -0,0 +1,83 @@
{
"id": "ws-admin-card",
"displayName": "ws-admin-card",
"version": "1.0.0",
"description": "ws-admin-card",
"keywords": [
"ws-admin-card"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u",
"alipay": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u",
"app-uvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}
+1
View File
@@ -0,0 +1 @@
# ws-admin-card