This commit is contained in:
yanran200730
2023-03-17 10:35:40 +08:00
10 changed files with 286 additions and 21 deletions

View File

@@ -4,18 +4,51 @@
/**
常用内外边距样式
*/
@each $padMar, $pm in (mar:margin, pad:padding) {
@each $pos, $p in (l:left, r:right, t:top, b:bottom) {
@each $v in (8, 10, 16, 20, 32, 48, 64) {
@each $v in (8, 10, 12, 14, 16, 20, 24, 32, 48, 56, 64, 80) {
//gap
.gap-#{$v} {
gap: #{$v}px
}
.font-#{$v} {
font-size: #{$v}px;
}
@each $padMar, $pm in (mar:margin, pad:padding) {
.#{$padMar}-#{$v} {
#{$pm}: #{$v}px
}
//纵向
.#{$padMar}-v#{$v} {
#{$pm}-top: #{$v}px;
#{$pm}-bottom: #{$v}px;
}
//横向
.#{$padMar}-h#{$v} {
#{$pm}-left: #{$v}px;
#{$pm}-right: #{$v}px;
}
@each $pos, $p in (l:left, r:right, t:top, b:bottom) {
.#{$padMar}-#{$pos+$v} {
#{$pm}-#{$p}: #{$v}px
}
}
}
}
.bg-fff{
@each $where in (sticky, fixed) {
@each $pos, $p in (l:left, r:right, t:top, b:bottom) {
.#{$where}-#{$pos} {
position: fixed;
#{$p}: 0;
z-index: 202301031019;
width: 100%;
}
}
}
.bg-fff {
background-color: #fff;
}
@font-face {
font-family: 'iconfont';
/* project id 1862352 */
@@ -63,6 +96,7 @@ page {
.bg-hover {
background: #eee !important;
}
.flex {
display: flex;
align-items: center;

View File

@@ -14,10 +14,14 @@ export const user = {
},
},
actions: {
getUserInfo({commit}) {
getUserInfo({commit}, way = "std") {
//获取企业微信后台账号信息
//党员认证状态 partyStatusForWX:0、未认证 1、认证中 2、已认证
return http.post("/app/appwechatuser/check").then(res => {
const actions = {
std: "/app/appwechatuser/check",
qujing: "/app/appwechatuserqujing/check",
}
return http.post(actions[way]).then(res => {
if (res?.data) {
commit('setUser', res.data)
return Promise.all([])

View File

@@ -0,0 +1,143 @@
<template>
<div class="AppWxworkQrcode">
<div class="header-content">
<img src="https://cdn.cunwuyun.cn/dvcp/villgroup/group.png" alt="" class="group-img">
<div class="group-name">{{ info.areaName || '' }}</div>
<p>已有{{ info.peopleNum || 0 }}户居民</p>
<img src="https://cdn.cunwuyun.cn/dvcp/villgroup/head.png" alt="" class="banner-img">
<div v-if="info.codeUrl" class="qrcode-content">
<AiImage :src="info.codeUrl" class="qrcode-img" preview/>
<div>长按识别二维码或扫码入群</div>
</div>
<div v-else class="qrcode-content flex column">
<div>请先去个人中心进行实名认证</div>
<div class="mar-t8 btn pad-v8 pad-h16" @click="goAuth">去实名</div>
</div>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: "AppWxworkQrcode",
appName: "群二维码",
computed: {
...mapState(['user'])
},
data() {
return {
info: {}
}
},
onShow() {
this.getDetail()
},
methods: {
getDetail() {
const {areaId} = this.user
areaId && this.$instance.post(`/app/wxcp/wxgroup/listByAreaId`, null, {
params: {areaId}
}).then(res => {
if (res?.data) {
this.info = res.data
}
})
},
goAuth() {
uni.navigateTo({url: "/mods/AppAuth/AppAuth"})
}
},
onShareAppMessage() {
return {
title: '入群二维码',
path: `/mods/AppWxworkQrcode/AppWxworkQrcode`
}
}
}
</script>
<style scoped lang="scss">
.AppWxworkQrcode {
width: 100vw;
height: auto;
padding-top: 30px;
background-color: #f3f6f9;
padding-bottom: 48px;
.header-content {
padding: 40px 70px 56px;
width: 690px;
background: #FFF;
border-radius: 16px;
margin: 0 0 24px 30px;
box-sizing: border-box;
.group-img {
width: 92px;
height: 96px;
border-radius: 8px;
margin-bottom: 22px;
}
.group-name {
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 50px;
margin-bottom: 4px;
}
p {
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #999;
line-height: 34px;
margin-bottom: 38px;
}
.banner-img {
width: 100%;
height: 110px;
}
.qrcode-content {
width: 100%;
height: 592px;
background: #F6F9FF;
border-radius: 12px;
border: 2px solid #E6EEFF;
padding: 56px 66px;
box-sizing: border-box;
margin-top: -8px;
justify-content: center;
::v-deep .qrcode-img {
width: 420px;
height: 420px;
margin-bottom: 24px;
image {
width: 420px;
height: 420px;
}
}
div {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 36px;
text-align: center;
}
.btn {
background: #26f;
color: #fff;
border-radius: 8px;
}
}
}
}
</style>

View File

@@ -67,16 +67,17 @@ export default {
uni.navigateTo({url: `${app.path}`})
},
getApps() {
this.apps = config.apps.map(e => ({...e, path: e.libPath}))
this.apps = config.apps.map(e => {
if (/\/project\//.test(e.libPath)) {
e.project = e.libPath.replace(/.*project\/([^\/]+)\/.+/, '$1')
}
return {...e, path: e.libPath}
})
},
},
onShow() {
if (this.token) {
this.getUserInfo();
} else {
this.autoLogin().then(() => this.getUserInfo())
}
this.getApps()
Promise.all([this.token ? 0 : this.autoLogin()]).then(() => this.getUserInfo())
},
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -69,12 +69,6 @@ export default {
listGroup() {
return [
[
// {
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png",
// label: "我的家庭",
// path: "./myFamily",
// type: 'idNumber'
// },
{
icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiaxiang.png",
label: "我的家乡",

View File

@@ -1,6 +1,25 @@
<template>
<div class="AppHarvestQR">
<u-navbar :is-back="false" title="我的丰收码" title-color="#000" title-width="300" title-size="32"
:background="backgroundNavbar" :title-bold="true"></u-navbar>
<div class="card">
<div class="myself">
<img class="avatar" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="">
<div class="info">
<div class="name">百里守约</div>
<div class="area">百地社区</div>
</div>
</div>
<div class="qr">
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="">
</div>
<div class="my-qr">我的丰收码</div>
<div class="pic">
<img src="./img-zhuangshi.png" alt="">
</div>
</div>
</div>
</template>
@@ -8,20 +27,90 @@
export default {
name: "AppHarvestQR",
appName: '丰收码',
customNavigation: true,
data() {
return {
backgroundNavbar: {
background: '#FFF'
}
}
},
methods: {
},
onShow() {},
onShow() {
},
}
</script>
<style lang="scss" scoped>
.AppHarvestQR {
padding: 32px;
box-sizing: border-box;
.card {
width: 100%;
height: 100%;
box-sizing: border-box;
background: #FFF;
border-radius: 16px;
.myself {
padding: 72px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.avatar {
width: 108px;
height: 108px;
border-radius: 16px;
}
.info {
width: calc(100% - 128px);
height: 100%;
.name {
color: #333333;
font-size: 34px;
font-weight: 500;
margin-top: 10px;
}
.area {
color: #999999;
font-size: 28px;
font-weight: 400;
margin-top: 10px;
}
}
}
.qr {
margin: 10% auto 24px;
width: 542px;
height: 542px;
border-radius: 32px;
border: 8px solid #f6f5f8;
padding: 36px;
box-sizing: border-box;
img {
width: 100%;
height: 100%;
}
}
.my-qr {
color: #999999;
font-size: 32px;
font-weight: 400;
text-align: center;
}
.pic {
margin-top: 10%;
width: 100%;
height: 234px;
img {
width: 100%;
height: 234px;
}
}
}
}
</style>