Compare commits

...

10 Commits

Author SHA1 Message Date
1a687baeef 1.河南省青企协身份证填写添加规则验证
2.河南省青企协紧急(助理)联系人 字眼更改
3.河南省青企协手机端提交资料,身份证正反面上传入口
2025-04-16 16:11:05 +08:00
573cfcdd35 666444 2025-03-21 16:50:18 +08:00
784136ad6d 666 2025-03-21 16:49:54 +08:00
69abcf0224 123 2024-11-22 16:38:19 +08:00
110a9517ff 123 2024-11-22 16:37:49 +08:00
3d08c0607d 123 2024-11-20 17:33:13 +08:00
042d42e2e6 123 2024-08-20 17:22:43 +08:00
7fb2f9d725 123 2024-08-19 18:15:03 +08:00
36e7ca6ce1 123 2024-07-30 18:16:46 +08:00
796d0a1396 123 2024-07-11 18:17:19 +08:00
477 changed files with 10435 additions and 71477 deletions

View File

@ -1,16 +1,26 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version" : "0.0",
"configurations" : [
{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
},
{
"playground" : "standard",
"type" : "uni-app:app-android"
}
]
}

View File

@ -165,4 +165,4 @@
@import './tuniao-ui/index.scss';
@import './tuniao-ui/iconfont.css';
@import './static/css/my.scss';
</style>
</style>

View File

@ -1,94 +0,0 @@
<template>
<view class="demo-title">
<view>
<view v-if="type === 'first'" class="main_title">
<view v-if="leftIcon" class="main_title__icon main_title__icon--left" :class="[`tn-icon-${leftIcon}`]"></view>
<view class="main_title__content">{{ title }}</view>
<view v-if="rightIcon" class="main_title__icon main_title__icon--right" :class="[`tn-icon-${rightIcon}`]"></view>
</view>
<view v-if="type === 'second'" class="second_title">
<view class="second_title__content">{{ title }}</view>
</view>
</view>
<view class="content" :class="[{
'content--padding': contentPadding
}]">
<slot></slot>
</view>
</view>
</template>
<script>
export default {
name: 'demo-title',
options: {
// Vue(shadow)
virtualHost: true
},
props: {
//
type: {
type: String,
default: 'first'
},
//
title: {
type: String,
default: ''
},
//
leftIcon: {
type: String,
default: 'star'
},
//
rightIcon: {
type: String,
default: 'star'
},
//
contentPadding: {
type: Boolean,
default: true
}
}
}
</script>
<style lang="scss" scoped>
.main_title {
display: flex;
align-items: center;
justify-content: center;
margin-top: 50rpx;
font-size: 36rpx;
font-weight: bold;
&__content {
padding: 0 18rpx;
}
&__icon {
font-size: 34rpx;
}
}
.second_title {
margin: 24rpx 0;
margin-left: 30rpx;
&__content {
font-size: 32rpx;
font-weight: bold;
}
}
.content {
margin-top: 30rpx;
&--padding {
margin-left: 30rpx;
margin-right: 30rpx;
}
}
</style>

View File

@ -1,689 +0,0 @@
<template>
<view class="dynamic-demo">
<!-- 效果预览窗口 -->
<view v-if="!noDemo" class="demo-container" :class="{'demo-container--full': full}">
<view class="demo">
<slot></slot>
</view>
<!-- 提示信息 -->
<view v-if="haveTips">
<view class="demo__tips__icon" @click="demoTipsClick">
<view class="icon tn-icon-help"></view>
</view>
<view class="demo__tips__content"
:class="[showContentTips ? 'demo__tips__content--show' : 'demo__tips__content--hide']">
<view v-for="(item,index) in tipsData" :key="index" class="demo__tips__content--item">{{ item }}</view>
</view>
</view>
</view>
<!-- 模式切换 -->
<view v-if="multiMode" class="mode-switch">
<view class="mode-switch__container">
<view v-for="(item, index) in sectionModeListInfos" :key="index" class="mode-switch__item"
:class="[`mode-switch-item-${index}`,{'mode-switch__item--active': modeIndex === index}]"
@click="switchMode(index)">{{ item.name }}</view>
<!-- 滑块样式 -->
<view class="mode-switch__slider" :style="[modeSwitchSliderStyle]"></view>
</view>
</view>
<!-- 组件对应可选项容器 -->
<view class="section-container">
<scroll-view
class="section__scroll-view"
:class="{'section__scroll-view--auto': sectionScrollViewStyle.height === 'auto'}"
:style="[sectionScrollViewStyle]"
:scroll-y="sectionScrollViewStyle.height !== 'auto'"
>
<block v-for="(item,index) in btnsList" :key="index">
<view class="section__content" :class="{'section__content--visible': item.show}">
<view class="section__content__title">
<view class="section__content__title__left-line" :class="[`tn-main-gradient-${tuniaoColorList[index]}`]"></view>
<view class="section__content__title--text tn-text-ellipsis" :class="[`tn-main-gradient-${tuniaoColorList[index]}`]">{{ item.title }}</view>
<view class="section__content__title__right-line" :class="[`tn-main-gradient-${tuniaoColorList[index]}`]"></view>
</view>
<view class="section__content__btns">
<view v-for="(section_btn,section_index) in item.optional" :key="section_index"
class="section__content__btns__item" :class="[`tn-main-gradient-${tuniaoColorList[index]}--light`]" @click="sectionBtnClick(index, section_index)">
<view class="section__content__btns__item__bg"
:class="[`tn-main-gradient-${tuniaoColorList[index]}`, {'section__content__btns__item__bg--active':sectionIndex[modeIndex][index]['value'] === section_index}]"></view>
<view class="section__content__btns__item--text tn-text-ellipsis"
:class="[sectionIndex[modeIndex][index]['value'] === section_index ? 'section__content__btns__item--text--active' : `tn-color-${tuniaoColorList[index]}`]">{{ section_btn }}</view>
</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
name: 'dynamic-demo-template',
props: {
//
sectionList: {
type: Array,
default() {
return []
}
},
//
tips: {
type: [String, Array],
default: ''
},
//
full: {
type: Boolean,
default: false
},
// 使
customBar: {
type: Boolean,
default: true
},
//
fullWindowsScroll: {
type: Boolean,
default: false
},
//
noDemo: {
type: Boolean,
default: false
}
},
computed: {
tipsData() {
if (typeof this.tips === 'string') {
return [this.tips]
}
return this.tips
},
haveTips() {
return this.tips && this.tips.length > 0
},
multiMode() {
return this.sectionList.length > 1
},
sectionModeList() {
return this.sectionList.map((item) => {
return item.name
})
}
},
data() {
return {
//
tuniaoColorList: this.$tn.color.getTuniaoColorList(),
// prop
_sectionList: [],
//
sectionModeListInfos: [],
//
modeIndex: 0,
//
modeSwitchSliderStyle: {
width: 0,
left: 0
},
//
showContentTips: false,
//
sectionScrollViewStyle: {
height: 0
},
//
btnsList: [],
//
sectionIndex: [],
// 使scroll-view
sectionScrollFlag: true
}
},
watch: {
sectionList: {
handler(value) {
// sectionList
this.initSectionBtns()
},
deep: true
},
sectionScrollFlag(value) {
if (!value) {
this.sectionScrollViewStyle.height = 'auto'
}
},
fullWindowsScroll: {
handler(value) {
if (value) {
this.sectionScrollViewStyle.height = 'auto'
}
},
immediate: true
}
},
created() {
//
this.sectionModeListInfos = this.sectionModeList.map((item) => {
return {
name: item
}
})
//
this.initSectionBtns()
},
mounted() {
//
// setTimeout(() => {
// // scroll-view
// this.initSectionScrollView()
// if (this.multiMode) {
// //
// this.getModeTabsInfo()
// }
// }, 10)
this.$nextTick(() => {
// scroll-view
this.initSectionScrollView()
if (this.multiMode) {
//
this.getModeTabsInfo()
}
})
},
methods: {
//
initSectionScrollView() {
//
if (this.fullWindowsScroll) {
return
}
//
uni.getSystemInfo({
success: (systemInfo) => {
//
const navBarHeight = this.customBar ? 0 : this.vuex_custom_bar_height
if (this.multiMode) {
uni.createSelectorQuery().in(this).select('.mode-switch').boundingClientRect(data => {
if (data.bottom >= systemInfo.safeArea.height) {
this.sectionScrollFlag = false
} else {
this.sectionScrollFlag = true
const containerBaseHeight = systemInfo.safeArea.height - data.bottom
this.sectionScrollViewStyle.height = (containerBaseHeight - navBarHeight) + systemInfo.statusBarHeight - uni.upx2px(75) + 'px'
}
}).exec()
} else {
if (!this.noDemo) {
uni.createSelectorQuery().in(this).select('.demo-container').boundingClientRect(data => {
if (data.bottom >= systemInfo.safeArea.height) {
this.sectionScrollFlag = false
} else {
this.sectionScrollFlag = true
const containerBaseHeight = systemInfo.safeArea.height - data.bottom
this.sectionScrollViewStyle.height = (containerBaseHeight - navBarHeight) + systemInfo.statusBarHeight - uni.upx2px(75) + 'px'
}
}).exec()
} else {
this.sectionScrollFlag = false
}
}
}
})
},
//
updateSectionScrollView() {
this.$nextTick(() => {
this.initSectionScrollView()
})
},
// tab
getModeTabsInfo() {
let view = uni.createSelectorQuery().in(this)
for (let i = 0; i < this.sectionModeListInfos.length; i++) {
view.select('.mode-switch-item-' + i).boundingClientRect()
}
view.exec(res => {
//
if (!res.length) {
setTimeout(() => {
this.getModeTabsInfo()
}, 10)
return
}
// list
res.map((item, index) => {
this.sectionModeListInfos[index].width = item.width
})
//
this.modeSwitchSliderStyle.width = this.sectionModeListInfos[0].width + 'px'
//
this.modeSliderPosition()
})
},
//
modeSliderPosition() {
let left = 0
//
this.sectionModeListInfos.map((item, index) => {
if (index < this.modeIndex) left += item.width
})
this.modeSwitchSliderStyle.left = left + 'px'
},
//
switchMode(index) {
//
if (index === this.modeIndex) return
this.modeIndex = index
this.modeSliderPosition()
this.updateSectionBtns()
this.$emit('modeClick', {
index: index
})
},
//
demoTipsClick() {
this.showContentTips = !this.showContentTips
},
//
initSectionBtns() {
this.sectionIndex = []
this.sectionIndex = this.sectionList.map((item) => {
if (item.hasOwnProperty('section') && item.section.length > 0) {
return Array(item.section.length).fill({
value: 0,
change: false
})
} else {
return []
}
})
this._sectionList = this.$tn.deepClone(this.sectionList)
// show
this._sectionList.map((item) => {
const section = item.section.map((section_item) => {
if (!section_item.hasOwnProperty('show')) {
section_item.show = true
}
return section_item
})
item.section = section
return item
})
//
this.updateSectionBtns()
},
//
updateSectionBtns(sectionIndex = -1, showState = true) {
let sectionOptional = this._sectionList[this.modeIndex]['section']
this.btnsList = sectionOptional.map((item, index) => {
//
let changeValue = this.sectionIndex[this.modeIndex][index]['change'] || false
let currentSectionIndexValue = this.sectionIndex[this.modeIndex][index]['value'] || 0
// (使)
let indexValue = changeValue ? currentSectionIndexValue : item.hasOwnProperty('current') ? item.current : 0
//
let show = (sectionIndex !== -1 && sectionIndex === index) ? showState : item.hasOwnProperty('show') ? item.show : true
//
if (indexValue < 0) {
indexValue = 0
}
if (indexValue >= item.optional.length) {
indexValue = item.optional.length
}
// this.sectionIndex[this.modeIndex][index]['value'] = indexValue
this.$set(this.sectionIndex[this.modeIndex], index, {value: indexValue, change: changeValue})
item.show = show
return item
})
},
//
updateSectionBtnsState(sectionIndex = -1, showState = true) {
// sectionIndex
if (this.$tn.array.isArray(sectionIndex)) {
if (sectionIndex.length === 0) {
return
}
sectionIndex = sectionIndex.filter((item) => item >= 0 && item < this.sectionList[this.modeIndex]['section'].length)
sectionIndex.map((item) => {
this.btnsList[item]['show'] = showState
this._sectionList[this.modeIndex]['section'][item]['show'] = showState
})
} else {
if (sectionIndex < 0 || sectionIndex >= this.sectionList[this.modeIndex]['section'].length) {
return
}
//
this.btnsList[sectionIndex]['show'] = showState
this._sectionList[this.modeIndex]['section'][sectionIndex]['show'] = showState
}
},
//
updateSectionBtnsValue(modeIndex = 0, sectionIndex = -1, value = 0) {
if (sectionIndex < 0 || sectionIndex >= this.sectionList[modeIndex]['section'].length) {
return
}
// showStatefalse
this.sectionIndex[modeIndex][sectionIndex] = {
value,
change: true
}
},
//
sectionBtnClick(index, sectionIndex) {
// if (this.sectionIndex[this.modeIndex][index] === sectionIndex) {
// return
// }
this.$set(this.sectionIndex[this.modeIndex], index, {value: sectionIndex, change: true})
this.$emit('click', {
methods: this.btnsList[index]['methods'],
index: sectionIndex,
name: this.btnsList[index]['optional'][sectionIndex]
})
}
}
}
</script>
<style lang="scss" scoped>
.dynamic-demo {
padding-top: 78rpx;
/* 顶部模式切换start */
.mode-switch {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 75rpx;
padding: 0 30rpx;
&__container {
position: relative;
display: flex;
flex-direction: row;
align-items: center;
width: 476rpx;
height: 62rpx;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
border-radius: 31rpx;
}
&__item {
flex: 1;
height: 62rpx;
width: 100%;
line-height: 62rpx;
text-align: center;
font-size: 28rpx;
color: $tn-font-sub-color;
z-index: 2;
transition: all 0.3s;
&--active {
color: #FFFFFF;
font-weight: bold;
}
}
&__slider {
position: absolute;
height: 62rpx;
border-radius: 31rpx;
// background-image: linear-gradient(-86deg, #FF8359 0%, #FFDF40 100%);
background-image: linear-gradient(-86deg, #00C3FF 0%, #58FFF5 100%);
box-shadow: 1rpx 10rpx 24rpx 0rpx #00C3FF77;
z-index: 1;
transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
}
/* 顶部模式切换end */
/* 演示内容展示start */
.demo-container {
min-height: 327rpx;
width: calc(100% - 60rpx);
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
margin: 0 30rpx 5rpx 30rpx;
border-radius: 20rpx;
position: relative;
display: flex;
justify-content: center;
align-items: center;
&--full {
display: inline-block;
padding-bottom: 20rpx;
min-height: 0rpx;
padding: 10rpx 20rpx 30rpx;
}
.demo {
padding-top: 70rpx;
&__tips {
&__icon {
position: absolute;
top: 20rpx;
right: 16rpx;
width: 39rpx;
height: 39rpx;
line-height: 39rpx;
font-size: 39rpx;
.icon {
background: linear-gradient(-45deg, #FF8359 0%, #FFDF40 100%);
-webkit-background-clip: text;
color: transparent;
text-shadow: 0rpx 10rpx 10rpx rgba(255, 156, 82, 0.2);
}
}
&__content {
position: absolute;
top: 65rpx;
right: 16rpx;
font-size: 20rpx;
margin-left: 20rpx;
word-wrap: normal;
display: flex;
flex-direction: column;
background-color: #E6E6E6;
padding: 20rpx;
border-radius: 10rpx;
transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1);
transform-origin: 0 0;
z-index: 999999;
&--hide {
transform: scaleY(0);
}
&--show {
transform: scaleY(100%);
&::after {
content: "";
width: 0px;
height: 0px;
border-width: 4px;
border-style: solid;
border-color: transparent transparent rgba(149, 149, 149, 0.1) transparent;
position: absolute;
top: -8px;
right: 6px;
}
}
}
}
}
}
/* 演示内容展示end */
/* 可选项start */
.section-container {
width: 100%;
height: auto;
margin-top: 70rpx;
.section {
&__content {
margin-top: 70rpx;
display: none;
&--visible {
display: block;
&:last-child {
padding-bottom: calc(70rpx + env(safe-area-inset-bottom));
}
}
&:nth-child(1) {
margin-top: 0rpx;
}
&__title {
display: flex;
justify-content: center;
align-items: center;
margin: 0 30rpx;
text-align: center;
&__left-line,
&__right-line {
width: 100rpx;
height: 2rpx;
position: relative;
}
&__left-line {
&::after {
content: '';
background: inherit;
width: 12rpx;
height: 12rpx;
position: absolute;
top: -12rpx;
right: 0rpx;
border-radius: 50%;
transform: translateY(50%);
}
}
&__right-line {
&::after {
content: '';
background: inherit;
width: 12rpx;
height: 12rpx;
position: absolute;
top: -12rpx;
left: 0rpx;
border-radius: 50%;
transform: translateY(50%);
}
}
&--text {
-webkit-background-clip: text;
color: transparent;
min-width: 124rpx;
height: 30rpx;
font-size: 32rpx;
line-height: 1;
margin: 0 35rpx;
}
}
&__btns {
width: calc(100% - 60rpx);
margin: 0 30rpx;
margin-top: 29rpx;
padding: 50rpx 30rpx 0rpx 0rpx;
background-color: #FFFFFF;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
border-radius: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
flex-wrap: wrap;
&__item {
max-width: 30%;
padding: 17rpx 36rpx;
border-radius: 10rpx;
margin-bottom: 40rpx;
margin-left: 40rpx;
position: relative;
z-index: 1;
// &::before {
// content: " ";
// position: absolute;
// top: 10rpx;
// left: 1rpx;
// width: 100%;
// height: 100%;
// background: inherit;
// filter: blur(24rpx);
// opacity: 1;
// z-index: -1;
// }
&__bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: inherit;
z-index: -1;
opacity: 0;
transform: scale(0);
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
&--active {
opacity: 1;
transform: scale(1);
}
}
&--text {
font-size: 24rpx;
line-height: 1.2em;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
&--active {
color: #FFFFFF;
}
}
}
}
}
}
}
/* 可选项end */
}
</style>

View File

@ -1,147 +0,0 @@
<template>
<view class="multiple-options">
<view class="list">
<block v-for="(item, index) in listData" :key="index">
<view
class="list__item"
:class="[`tn-main-gradient-${tuniaoColorList[item.bgColorIndex]}--light`]"
@tap="navOptionsPage(item.url)"
>
<view class="list__content">
<view class="list__content__title">{{ item.title }}</view>
<view class="list__content__desc">{{ item.desc }}</view>
</view>
<view class="list__icon">
<view class="list__icon__main" :class="[`tn-icon-${item.mainIcon}`, `tn-main-gradient-${tuniaoColorList[item.bgColorIndex]}`]"></view>
<view class="list__icon__sub" :class="[`tn-icon-${item.subIcon}`, `tn-main-gradient-${tuniaoColorList[item.bgColorIndex]}`]"></view>
</view>
</view>
</block>
</view>
</view>
</template>
<script>
export default {
name: 'multiple-options-demo',
props: {
//
list: {
type: Array,
default() {
return []
}
}
},
data() {
return {
//
tuniaoColorList: [
'red',
'purplered',
'purple',
'bluepurple',
'aquablue',
'blue',
'indigo',
'cyan',
'teal',
'green',
'orange',
'orangered'
],
listData: []
}
},
watch: {
list(val) {
this.initList()
}
},
created() {
this.initList()
},
methods: {
//
initList() {
//
this.listData = this.list.map((item, index) => {
item.bgColorIndex = this.getBgNum()
item.mainIcon = item?.mainIcon || 'computer-fill'
item.subIcon = item?.subIcon || 'share'
return item
})
},
//
navOptionsPage(url) {
uni.navigateTo({
url: url
})
},
//
getBgNum() {
return Math.floor((Math.random() * this.tuniaoColorList.length))
}
}
}
</script>
<style lang="scss" scoped>
.list {
&__item {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: calc(100% - 60rpx);
margin: 108rpx 30rpx 0rpx 30rpx;
box-shadow: 0rpx 10rpx 50rpx 0rpx rgba(0, 3, 72, 0.1);
border-radius: 20rpx;
}
&__content {
flex: 1;
// color: $tn-font-color;
margin: 34rpx 0rpx 27rpx 37rpx;
&__title {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 12rpx;
}
&__desc {
font-size: 28rpx;
}
}
&__icon {
flex: 1;
margin-right: 26rpx;
position: relative;
&__main, &__sub {
-webkit-background-clip: text;
color: transparent;
position: absolute;
transition: transform 0.25s ease;
}
&__main {
font-size: 200rpx;
width: 190rpx;
line-height: 200rpx;
top: 0;
right: 0rpx;
transform: translateY(-60%);
}
&__sub {
font-size: 70rpx;
top: 0;
right: 175rpx;
transform: translateY(-5rpx);
}
}
}
</style>

View File

@ -1,169 +0,0 @@
<template>
<view class="nav-index-button" :style="{bottom: `${bottom}rpx`, right: `${right}rpx`}" @tap.stop="navIndex">
<view class="nav-index-button__content">
<view class="nav-index-button__content--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur tn-cool-bg-color-7">
<view class="tn-icon-home-vertical-fill"></view>
</view>
</view>
<view class="nav-index-button__meteor">
<view class="nav-index-button__meteor__wrapper">
<view v-for="(item,index) in 6" :key="index" class="nav-index-button__meteor__item" :style="{transform: `rotateX(${-60 + (30 * index)}deg) rotateZ(${-60 + (30 * index)}deg)`}">
<view class="nav-index-button__meteor__item--pic"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'nav-index-button',
props: {
//
bottom: {
type: [Number, String],
default: 300
},
//
right: {
type: [Number, String],
default: 75
},
//
indexPath: {
type: String,
default: '/pages/index/index'
}
},
methods: {
//
navIndex() {
//
const pages = getCurrentPages()
if (pages && pages.length > 0) {
const indexPath = this.indexPath || '/pages/index/index'
const firstPage = pages[0]
if (pages.length == 1 && (!firstPage.route || firstPage.route != indexPath.substring(1, indexPath.length))) {
uni.reLaunch({
url: indexPath
})
} else {
uni.navigateBack({
delta: 1
})
}
} else {
uni.reLaunch({
url: indexPath
})
}
}
}
}
</script>
<style lang="scss" scoped>
.nav-index-button {
position: fixed;
animation: suspension 3s ease-in-out infinite;
z-index: 999999;
&__content {
position: absolute;
width: 100rpx;
height: 100rpx;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
&--icon {
width: 100rpx;
height: 100rpx;
font-size: 60rpx;
border-radius: 50%;
margin-bottom: 18rpx;
position: relative;
z-index: 1;
transform: scale(0.85);
&::after {
content: " ";
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
left: 0;
bottom: 0;
border-radius: inherit;
opacity: 1;
transform: scale(1, 1);
background-size: 100% 100%;
background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);
}
}
}
&__meteor {
position: absolute;
top: 50%;
left: 50%;
width: 100rpx;
height: 100rpx;
transform-style: preserve-3d;
transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
&__wrapper {
width: 100rpx;
height: 100rpx;
transform-style: preserve-3d;
animation: spin 20s linear infinite;
}
&__item {
position: absolute;
width: 100rpx;
height: 100rpx;
border-radius: 1000rpx;
left: 0;
top: 0;
&--pic {
display: block;
width: 100%;
height: 100%;
background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc3.png) no-repeat center center;
background-size: 100% 100%;
animation: arc 4s linear infinite;
}
}
}
}
@keyframes suspension {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-0.8rem);
}
}
@keyframes spin {
0% {
transform: rotateX(0deg);
}
100% {
transform: rotateX(-360deg);
}
}
@keyframes arc {
to {
transform: rotate(360deg);
}
}
</style>

View File

@ -1,52 +0,0 @@
/**
* 动态参数演示mixin
*/
module.exports = {
data() {
return {
// 效果显示框top的值
contentContainerTop: '0px',
contentContainerIsTop: false,
// 参数显示框top的值
sectionContainerTop: '0px'
}
},
onReady() {
this.updateSectionContainerTop()
},
methods: {
// 处理演示效果框的位置
async _handleContentConatinerPosition() {
// 获取效果演示框的节点信息
const contentContainer = await this._tGetRect('#content_container')
// 获取参数框的节点信息
this._tGetRect('#section_container').then((res) => {
// 判断参数框是否在移动,如果是则更新效果框的位置
// 如果效果框的顶部已经触控到顶部导航栏就停止跟随
if (res.top - contentContainer.bottom != 15) {
const newTop = res.top - (contentContainer.height + uni.upx2px(20))
const minTop = this.vuex_custom_bar_height + 1
if (newTop < minTop) {
this.contentContainerTop = minTop + 'px'
this.contentContainerIsTop = true
} else {
this.contentContainerTop = newTop + 'px'
this.contentContainerIsTop = false
}
}
})
},
// 更新状态切换栏位置信息
updateSectionContainerTop() {
this._tGetRect('#content_container').then((res) => {
this.contentContainerTop = (this.vuex_custom_bar_height + 148) + 'px'
this.sectionContainerTop = (res.height + 20) + 'px'
})
}
},
// 监听页面滚动
onPageScroll() {
this._handleContentConatinerPosition()
}
}

View File

@ -1,60 +0,0 @@
/**
* 演示页面mixin
*/
module.exports = {
data() {
return {
}
},
onLoad() {
// 更新顶部导航栏信息
this.updateCustomBarInfo()
},
methods: {
// 点击左上角返回按钮时触发事件
goBack() {
// 通过判断当前页面的页面栈信息,是否有上一页进行返回,如果没有则跳转到首页
const pages = getCurrentPages()
if (pages && pages.length > 0) {
const firstPage = pages[0]
if (pages.length == 1 && (!firstPage.route || firstPage.route != 'pages/index/index')) {
uni.reLaunch({
url: '/pages/index/index'
})
} else {
uni.navigateBack({
delta: 1
})
}
} else {
uni.reLaunch({
url: '/pages/index/index'
})
}
},
// 更新顶部导航栏信息
async updateCustomBarInfo() {
// 获取vuex中的自定义顶栏的高度
let customBarHeight = this.vuex_custom_bar_height
let statusBarHeight = this.vuex_status_bar_height
// 如果获取失败则重新获取
if (!customBarHeight) {
try {
const navBarInfo = await this.$tn.updateCustomBar()
customBarHeight = navBarInfo.customBarHeight
statusBarHeight = navBarInfo.statusBarHeight
} catch(e) {
setTimeout(() => {
this.updateCustomBarInfo()
}, 10)
return
}
}
// 更新vuex中的导航栏信息
this.$tn.vuex('vuex_status_bar_height', statusBarHeight)
this.$tn.vuex('vuex_custom_bar_height', customBarHeight)
}
}
}

View File

@ -1,5 +1,5 @@
{
"name" : "智慧云商协",
"name" : "河南省青年企业家协会",
"appid" : "__UNI__F702B81",
"description" : "",
"versionName" : "1.0.0",
@ -52,13 +52,19 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx51c40ff1c6337652",
"appid" : "wxd01d4f0be53a283a",
"requiredPrivateInfos" : [ "chooseLocation" ],
"setting" : {
"urlCheck" : true,
"minified" : true,
"postcss" : true
},
"usingComponents" : true
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "用户选择公司地址"
}
}
},
"mp-alipay" : {
"usingComponents" : true

View File

@ -61,35 +61,17 @@
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "pages/index/user_map",
"style": {
"navigationBarTitleText": "会员地图"
}
}
],
"subPackages": [{
"root": "pages/packageA",
"pages": [{
"path": "info/discovery",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "info/policy",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "info/policy_info",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "info/policy_list",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "user/apply_in",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
@ -125,12 +107,6 @@
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "user/my_edit",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "user/my_idea",
"style": {
@ -202,26 +178,108 @@
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "user/my_collection",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "user/my_add",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "user/sign_in",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "user/sign_details",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
}
]
}, {
"root": "pages/packageB",
"pages": [{
"path": "event/event_info",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
"path": "event/event_info",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
}, {
"path": "news/new_info",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
}, {
"path": "news/new_list",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "paper/add",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "paper/paper_info",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "event/user_area",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "news/suggestions",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
}
}, {
"path": "news/new_info",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
]
}, {
"root": "pages/packageC",
"pages": [{
"path": "info/discovery",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "info/policy",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "info/policy_info",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "info/policy_list",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
},
{
"path": "info/certificate",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
}
}, {
"path": "news/new_list",
"style": {
"navigationBarTitleText": "河南省青年企业家协会"
}
}]
]
}],
"globalStyle": {
"navigationStyle": "custom",

View File

@ -1,116 +1,223 @@
<template>
<view style="background: #F1F2F8;">
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="#ffffff">
<view style="background-color: #ffffff;letter-spacing: 1rpx;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="width: 100%;">
<view
style="text-align: center;font-size: 34rpx;color: #000000;letter-spacing: 1px;font-weight: bold;">
<text>通讯录</text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'河南省青年企业家协会通讯录'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="30"></tn-tabs>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}"
style="background-color: #FFF;padding-bottom: 30rpx;z-index: 200;">
<!-- <view class="tn-flex tn-flex-col-center tn-flex-row-between" @click="selectShow= true"
style="padding: 30rpx;">
<view>
<text>{{HomeTitle}}</text>
<text class="tn-icon-down-triangle"></text>
</view>
<view>
<text>筛选</text>
</view>
</view> -->
</view>
<view style="background-color: #FFF;z-index: 200;">
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin">
<view class="justify-content-item align-content-item" style="width: 100%;position: relative;">
<view class="tn-flex tn-flex-col-center"
style="border-radius: 100rpx;padding: 20rpx;width: 100%;background-color:#F1F2F8;">
style="border-radius: 100rpx;padding: 15rpx;width: 100%;background-color:#F1F2F8;">
<text style="color: #BABDC7;"
class="tn-icon-search justify-content-item tn-padding-right-xs tn-text-lg"></text>
<input v-model="serach_content" class="justify-content-item" placeholder="请会员姓名/手机号进行搜索"
name="input" placeholder-style="color:#BABDC7"
style="width: 100%;padding-right: 200rpx;"></input>
<input v-model="serach_content" class="justify-content-item" placeholder="会员姓名/手机号" name="input"
placeholder-style="color:#BABDC7" style="width: 100%;padding-right: 200rpx;"></input>
</view>
<view style="position: absolute;right: 10rpx;top: 10rpx">
<tn-button backgroundColor="rgba(48,86,211,0.1)" shape="round" padding="20rpx 20rpx"
width="150rpx" @click="serach_do()">
<text style="color:#3056D3;font-weight: bold;"> </text>
<view style="position: absolute;right: 6rpx;top: 6rpx">
<tn-button v-if="!serach_do" backgroundColor="#3056D3" shape="round" padding="10rpx 10rpx"
width="150rpx" @click="serach()" height="60rpx">
<text style="color:#ffffff;font-weight: bold;"> </text>
</tn-button>
<tn-button v-if="serach_do" backgroundColor="#3056D3" shape="round" padding="10rpx 10rpx"
width="150rpx" @click="reset()" height="60rpx">
<text style="color:#ffffff;font-weight: bold;"> </text>
</tn-button>
</view>
</view>
</view>
</view>
<view :class="isFixed?'fixed':'abc'" style="width: 100%;z-index: 200;"
:style="{top:isFixed?vuex_custom_bar_height+'px':'auto'}">
<view class="tn-flex tn-flex-col-center" style="padding: 30rpx;background-color: #ffffff;">
<view @click="openDqShow = !openDqShow" style="margin-right: 40rpx;">
<text :class="openDqShow?'textThis':'textNo'">地区</text>
<text style="color: #BABDC7;"
:class="openDqShow?'tn-icon-up-triangle':'tn-icon-down-triangle'"></text>
<view v-if="pickerIndex==2">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-around" style="padding-bottom: 20rpx;">
<view @click="pickerShow =true">
<text>{{pickerList[pickerIndex].name}}</text>
<text class="tn-icon-down"></text>
</view>
<view @click="openDqShow = !openDqShow" style="margin-right: 40rpx;">
<view :class="openDqShow?'textThis tn-text-ellipsis':'textNo tn-text-ellipsis'"
style="max-width: 120rpx;display: inline-block;vertical-align: middle;">
{{hy_name=='全部'?'行业':hy_name}}
</view>
<text style="color: #BABDC7;vertical-align: middle;"
:class="openDqShow?'tn-icon-up-triangle':'tn-icon-down-triangle'"></text>
</view>
<view @click="openDqShow = !openDqShow" style="margin-right: 40rpx;">
<text :class="openDqShow?'textThis':'textNo'">届数</text>
<text style="color: #BABDC7;"
:class="openDqShow?'tn-icon-up-triangle':'tn-icon-down-triangle'"></text>
</view>
<view @click="openDqShow = !openDqShow" style="margin-right: 40rpx;">
<text :class="openDqShow?'textThis':'textNo'">组织架构</text>
<text style="color: #BABDC7;"
:class="openDqShow?'tn-icon-up-triangle':'tn-icon-down-triangle'"></text>
<view @click="region_show= true">
<text>{{region_name}}</text>
<text class="tn-icon-down"></text>
</view>
</view>
<view v-if="openDqShow">
<view style="border-radius: 0 0 20rpx 20rpx;background-color: #ffffff;padding-bottom: 30rpx;">
<scroll-view scroll-y="" style="height: 500rpx;">
<view v-for="(item,index) in industry_list" @click="clickClassifyNav(index)"
style="padding: 20rpx 30rpx;font-size: 28rpx;">
<view :class="item.id==leftId?'textThis':'textNo'">{{item.industry_name}}</view>
<view v-if="index<industry_list.length-1"
style="width: 100%;height: 1px;background-color: #F1F2F8;margin-top: 30rpx;"></view>
</view>
</scroll-view>
</view>
<view @click="coversShow = true"
style="position: fixed;top: 50%;right: 30rpx;z-index: 1;width: 90rpx;height: 90rpx;background-color: #ffffff;border-radius: 50%;">
<image src="/static/map.png" style="width: 90rpx;height: 90rpx;"></image>
</view>
</view>
<view v-if="openDqShow" @click="openDqShow = false" @touchmove.stop.prevent="() => {}"
style="position: absolute;width: 100%;height:100%;background-color: rgba(0, 0,0, 0.3);z-index: 100;"></view>
<view style="padding:120rpx 30rpx 100rpx 30rpx;">
<view style="overflow: hidden;">
<view v-for="(item,index) in list" :key="index"
style="border-radius: 20rpx;margin-bottom:30rpx;background-color: #ffffff;">
<view
style="border-radius: 20rpx 20rpx 0rpx 0rpx;background: #E6E8F1;text-align: center;font-size: 34rpx;font-weight: bold;height: 110rpx;line-height: 110rpx;">
{{item.position_name}}
</view>
<view>
<view v-if="item.neirong" v-for="(v,k) in item.neirong"
@click="tn('/pages/packageA/user/my_card?id='+v.member_id)"
class="tn-flex tn-flex-center tn-flex-col-center" style="padding: 35rpx;">
<view style="width: 100rpx;height: 100rpx">
<image :src="apiImgUrl+v.photo_image"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;">
<view>
<text
style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">{{v.nikename}}</text>
<tn-tag size="sm" padding="0px 5px" margin="0 0 0 20rpx" width="auto" shape="radius"
backgroundColor="#F1F2F8" fontColor="#888888">{{v.position_name}}</tn-tag>
<map @callouttap="openLock" :style="{width: '100%',height: my_page+'px'}" :scale="scale"
:latitude="latitude" :longitude="longitude" :markers="covers">
</map>
<tn-popup v-model="coversShow" mode="bottom" :mask="false" height="50%" :borderRadius="10">
<view style="padding:30rpx 0rpx 0rpx 0rpx;text-align: center;font-size: 34rpx;font-weight: 600;">
企业数量{{covers.length}}</view>
<scroll-view scroll-y style="height: 85%;">
<view v-for="(item,index) in covers" style="padding:10rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view @click="tn('/pages/packageA/user/my_card?id='+item.id)"
class="tn-classify__content__sub-classify__content__item tn-flex tn-flex-center tn-flex-col-center">
<view style="width: 100rpx;height: 100rpx">
<image v-if="item.photo_image!=''&&item.photo_image!=null"
:src="apiImgUrl+item.photo_image"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
<image v-if="item.photo_image==''||item.photo_image==null" src="/static/def.png"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 28rpx;margin-top: 10rpx;color: #666666;">
<text>{{v.enterprise_name==null?v.work_unit:v.enterprise_name}}</text>
<view style="margin-left: 20rpx;">
<view style="font-size: 28rpx;font-weight: 600;">
<text>{{item.nikename}}</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 24rpx;margin-top: 10rpx;color: #888888;">
<text>{{item.title==null?'':item.title}}</text>
</view>
</view>
</view>
<view @click="openMark(item)">
<image src="/static/make.png" style="height: 60rpx;width: 60rpx;"></image>
</view>
</view>
<view v-if="index<covers.length-1"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 10rpx 40rpx;"></view>
</view>
</scroll-view>
</tn-popup>
</view>
<view v-if="pickerIndex!=2" class="tn-classify__container">
<view class="tn-classify__container__wrap tn-flex tn-flex-nowrap tn-flex-row-around"
:style="{backgroundColor:'#ffffff',height:my_page+'px'}">
<!-- 左边容器 -->
<scroll-view v-if="!serach_do" scroll-y class="tn-classify__left-box left-width">
<view class="tn-classify__tabbar__item tn-flex tn-flex-col-center" style="padding: 30rpx 20rpx;">
<view @click="pickerShow =true" class="tn-classify__tabbar__item__title"
style="text-align: center;width: 100%;">
<text>{{pickerList[pickerIndex].name}}</text>
<text class="tn-icon-down"></text>
</view>
</view>
<view v-if="pickerIndex==1" v-for="(item, index) in industry_list" :key="index"
:id="`tabbar_item_${index}`" class="tn-classify__tabbar__item tn-flex tn-flex-col-center"
:class="[tabbarItemClass(index)]" @tap.stop="clickClassifyNav(index)"
style="padding: 30rpx 20rpx;">
<view class="tn-classify__tabbar__item__title" style="text-align: center;width: 100%;">
{{ item.industry_name }}
</view>
</view>
<view v-if="pickerIndex==0" v-for="(item, index) in zz_list" :key="index"
:id="`tabbar_item_${index}`" class="tn-classify__tabbar__item tn-flex tn-flex-col-center"
:class="[tabbarItemClass(index)]" @tap.stop="clickClassifyNavZZ(index)"
style="padding: 30rpx 20rpx;">
<view class="tn-classify__tabbar__item__title" style="text-align: center;width: 100%;">
{{ item.position_name }}
</view>
</view>
</scroll-view>
<!-- 右边容器 -->
<scroll-view class="tn-classify__right-box" @scrolltolower="rightBottom" @scroll="getScroll"
:scroll-top="top" scroll-y :style="{width: !serach_do?'72%':'100%'}">
<block>
<view class="tn-classify__content">
<!-- 分类内容子栏目 -->
<view class="tn-classify__content__sub-classify__content " style="padding-bottom: 120rpx;">
<view v-for="(item,index) in list" :key="index" style="margin-bottom: 20rpx;">
<view v-if="item.neirong"
style="font-weight: 300;;background-color: #3056D3;color:#ffffff;width: 100%;height: 60rpx;line-height: 60rpx;text-align: center;">
{{item.position_name}}
</view>
<view v-if="item.neirong" v-for="(v,k) in item.neirong">
<view @click="tn('/pages/packageA/user/my_card?id='+v.member_id)"
class="tn-classify__content__sub-classify__content__item tn-flex tn-flex-center tn-flex-col-center">
<!-- 标题有需要可以显示出来 -->
<view style="width: 100rpx;height: 100rpx">
<image :src="apiImgUrl+v.photo_image"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;">
<view style="font-size: 28rpx;font-weight: 600;">
<text>{{v.nikename}}</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 24rpx;margin-top: 10rpx;color: #888888;">
<text>{{v.enterprise_name==null?'':v.enterprise_name}}</text>
</view>
</view>
</view>
<view v-if="k<item.neirong.length-1"
style="height: 1rpx;background-color: #F1F2F8;margin: 0 auto;width: 80%;">
</view>
</view>
</view>
<view v-if="member_list.length>0" style="margin-bottom: 20rpx;">
<view
style="font-weight: 300;;background-color: #3056D3;color:#ffffff;width: 100%;height: 60rpx;line-height: 60rpx;text-align: center;">
会员
</view>
<view v-for="(v,k) in member_list">
<view @click="tn('/pages/packageA/user/my_card?id='+v.member_id)"
class="tn-classify__content__sub-classify__content__item tn-flex tn-flex-center tn-flex-col-center">
<!-- 标题有需要可以显示出来 -->
<view style="width: 100rpx;height: 100rpx">
<image :src="apiImgUrl+v.photo_image"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;">
<view style="font-size: 28rpx;font-weight: 600;">
<text>{{v.nikename}}</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 24rpx;margin-top: 10rpx;color: #888888;">
<text>{{v.enterprise_name==null?'':v.enterprise_name}}</text>
</view>
</view>
</view>
<view v-if="k<member_list.length-1"
style="height: 1rpx;background-color: #F1F2F8;margin: 0 auto;width: 80%;">
</view>
</view>
</view>
<view v-if="list.length==0" style="text-align: center;padding: 20rpx">
暂无
</view>
</view>
</view>
</view>
</view>
<view v-if="showNo" style="margin-top: 30px;text-align: center">暂无数据</view>
</block>
</scroll-view>
</view>
</view>
<tn-select :safeAreaInsetBottom="true" v-model="selectShow" mode="single" :list="selectList"
@confirm="confirm"></tn-select>
<tn-picker mode="selector" v-model="pickerShow" :range="pickerList" rangeKey="name"
@confirm="inPickerList"></tn-picker>
<tn-select :searchShow="false" v-model="region_show" mode="multi-auto" :list="region_list"
@confirm="getDqId"></tn-select>
<!-- <view @click="tn('/pages/index/apply_in')" style="line-height: 40rpx;text-align: center;position: fixed;bottom:15%;right: 20rpx;width: 120rpx;height: 120rpx;border-radius: 50%;background: linear-gradient(270deg, #EE7E45, #EE9657);-->
<!--box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.2);">-->
<!-- <view style="color: #fff;letter-spacing: 2rpx;padding: 20rpx;font-size: 32rpx;">申请入会-->
<!-- </view>-->
<!-- </view>-->
<!-- <tn-select :safeAreaInsetBottom="true" v-model="selectShow" mode="single" :list="selectList"
@confirm="confirm"></tn-select> -->
</view>
</template>
@ -118,20 +225,30 @@
import {
addressList,
associationIndex,
newIndustryIndex
newIndustryIndex,
huiYuanList,
getRegion,
positionList,
latitudeAndLongitude
} from '@/util/api.js';
import store from "@/store";
export default {
data() {
return {
showNo: false,
isFixed: false,
serach_content: '',
list: [],
topCurrent: 0,
tabbarIndex: 0,
// item
tabbarItemInfo: [],
// scrollViewtop
scrollViewBasicTop: 0,
// scrollView
scrollViewHeight: 0,
// scrollView
leftScrollViewTop: 0,
// scrollView
rightScrollViewTop: 0,
// tabbar
currentTabbarIndex: 0,
apiImgUrl: this.$store.state.imgUrl,
@ -140,41 +257,277 @@
selectShow: false,
HomeTitle: '',
selectList: [],
member_list: [],
zz_list: [],
page: 1,
gid: store.state.Gid,
gname: '',
top: 0,
openDqShow: false,
selectTopNumber: 220,
hy_name: '全部',
my_page: 0,
pickerShow: false,
pickerIndex: 0,
pickerList: [{
name: '按职位',
id: 1
}, {
name: '按行业',
id: 2
}, {
name: '按区域',
id: 3
}],
serach_do: false,
covers: [],
coversShow: false,
region_show: false,
region_name: '全部',
region_list: [],
region_id: 0,
scale: 5,
latitude: 34.776787,
longitude: 113.733079
}
},
onLoad(d) {
console.log(d.id);
if (typeof(d.id) != 'undefined') {
this.gid = d.id;
computed: {
tabbarItemClass() {
return index => {
if (index === this.currentTabbarIndex) {
return 'tn-classify__tabbar__item--active tn-bg-my-ccc'
} else {
let clazz = ''
if (this.currentTabbarIndex > 0 && index === this.currentTabbarIndex - 1) {
clazz += ' tn-classify__tabbar__item--active--prev'
}
if (this.currentTabbarIndex < this.industry_list.length && index === this.currentTabbarIndex +
1) {
clazz += ' tn-classify__tabbar__item--active--next'
}
return clazz
}
}
}
this.getIndustryList();
this.getAssociationIndex();
},
// onLoad(d) {
// console.log(d.id);
// if (typeof(d.id) != 'undefined') {
// this.gid = d.id;
// }
// this.getIndustryList();
// this.getAssociationIndex();
// this.getRegionList();
// },
methods: {
serach_do() {
getDqId(d) {
var city = d[0];
var area = d[1];
// var area = d.area;
// var city = d.city;
// var province = d.province;
if (city.value == 0) {
this.region_name = '全部';
} else {
this.region_name = city.label + '/' + area.label;
}
this.region_id = area.value;
this.scale = 5;
this.latitude = 34.776787;
this.longitude = 113.733079;
this.coversShow = false;
this.getLatitudeAndLongitude();
},
openMark(d) {
console.log(d);
this.scale = 15;
this.latitude = d.latitude;
this.longitude = d.longitude;
this.coversShow = false;
},
openLock(d) {
console.log(d);
var id = d.detail.markerId;
const cover = this.covers.find(item => item.id == id);
uni.showModal({
title: '导航提醒',
content: '确定要开启导航吗?',
success: function(res) {
if (res.confirm) {
uni.openLocation({
latitude: cover.latitude,
longitude: cover.longitude,
name: cover.title,
success() {
console.log('导航成功');
},
fail(error) {
console.error('导航失败', error);
}
});
}
}
});
},
getLatitudeAndLongitude() {
latitudeAndLongitude({
region_id: this.region_id,
enterprise_name: this.serach_content,
nikename: this.serach_content,
})
.then(res => {
console.log(res);
var list = res.data;
const transformedSelectList = list.map(item => ({
latitude: parseFloat(item.dimension),
longitude: parseFloat(item.longitude),
id: item.id,
iconPath: '/static/make.png',
width: 30,
height: 30,
company_image: item.company_image,
nikename: item.nikename,
title: item.enterprise_name,
photo_image: item.photo_image,
callout: {
content: item.enterprise_name,
textAlign: 'center',
fontSize: 16,
borderRadius: 5,
color: "#3056D3"
}
}));
console.log(transformedSelectList);
this.covers = transformedSelectList;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
inPickerList(d) {
this.top = 0;
this.currentTabbarIndex = 0;
this.pickerIndex = d[0];
this.leftHyId = 0;
this.member_list = [];
this.list = [];
this.page = 1;
this.getAddressList();
this.getMemberList();
this.scale = 5;
this.latitude = 34.776787;
this.longitude = 113.733079;
this.getLatitudeAndLongitude();
},
preventTouchMove() {
},
rightBottom() {
if (this.leftZzId == 15 || this.pickerIndex == 1) {
uni.showLoading({
title: '加载中...'
});
console.log(1);
this.page = this.page + 1;
//this.getAddressList();
this.getMemberList();
}
},
getScroll(d) {
this.top = d.scrollTop;
},
onload() {
console.log(this.list.length);
console.log(this.member_list.length);
this.serach_content = '';
this.coversShow = false;
this.serach_do = false;
// this.member_list = [];
// this.list = [];
if (this.list.length > 0 || this.member_list.length > 0) {
return;
}
this.currentTabbarIndex = 0;
this.gid = store.state.Gid;
this.gname = store.state.Gname;
this.getIndustryList();
this.getAssociationIndex();
this.getPositionListIndex();
this.getLatitudeAndLongitude();
this.getRegionList();
const key = uni.getSystemInfoSync();
const kk = uni.getWindowInfo();
console.log(kk);
var c = this.sizeDeal(120);
var s = this.sizeDeal(140);
this.my_page = parseInt(key.windowHeight) - parseInt(store.state.vuex_custom_bar_height) - parseInt(s) -
parseInt(c) - parseInt(key.safeAreaInsets.bottom);
//console.log(key);
},
confirm(d) {
var info = d[0];
this.list = [];
this.gid = info.value;
this.getAssociationIndex();
this.getIndustryList();
getPositionListIndex() {
positionList({
association_id: 1
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.zz_list = res.data;
this.zz_list.unshift({
id: 0,
position_name: '全部'
});
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getRegionList() {
getRegion({
association_id: 1,
})
.then(res => {
if (res.code == 1) {
var key = res.data;
// const transformedSelectList = key.map(item => ({
// value: item.id,
// label: item.region_name
// }));
key.unshift({
value: 0,
label: '全部',
children: [{
value: 0,
label: '全部',
}],
});
this.region_list = key;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
// confirm(d) {
// var info = d[0];
// this.list = [];
// this.gid = info.value;
// this.getAssociationIndex();
// this.getIndustryList();
// },
getAssociationIndex() {
associationIndex()
.then(res => {
@ -214,11 +567,12 @@
id: 0,
industry_name: '全部'
});
this.leftId = res.data[0].id;
this.leftHyId = 0;
uni.showLoading({
title: '加载中...'
});
this.getAddressList();
this.getMemberList();
}
})
.catch(error => {
@ -229,17 +583,72 @@
});
})
},
reset() {
this.serach_content = '';
this.coversShow = true;
this.serach_do = false;
this.member_list = [];
this.list = [];
this.page = 1;
this.getAddressList();
this.getMemberList();
this.getLatitudeAndLongitude();
},
serach() {
if (this.serach_content == '') {
this.serach_do = false;
} else {
this.serach_do = true;
}
this.coversShow = true;
this.member_list = [];
this.list = [];
this.page = 1;
this.leftHyId = 0;
this.leftDqId = 0;
this.getAddressList();
this.getMemberList();
this.getLatitudeAndLongitude();
},
getMemberList() {
huiYuanList({
region_id: this.leftDqId,
association_id: this.gid,
industry_id: this.leftHyId,
nikename: this.serach_content,
page: this.page,
size: 15,
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.member_list.push(...res.data[0].neirong);
}
setTimeout(function() {
uni.hideLoading();
}, 2000);
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getAddressList() {
addressList({
position_id: 0,
number_of_sessions: this.leftJsId,
position_id: this.leftZzId,
region_id: this.leftDqId,
association_id: this.gid,
industry_id: this.leftId,
nikename: this.serach_content
industry_id: this.leftHyId,
nikename: this.serach_content,
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.list = res.data.ret;
this.list.push(...res.data);
} else {
this.showNo = true;
}
@ -255,32 +664,76 @@
});
})
},
clickClassifyNav(index) {
clickClassifyNavZZ(index) {
this.top = 0;
uni.showLoading({
title: '加载中...'
});
this.isFixed = false;
this.showNo = false;
this.openDqShow = false;
this.currentTabbarIndex = index;
this.leftId = this.industry_list[index].id;
this.hy_name = this.industry_list[index].industry_name;
this.leftZzId = this.zz_list[index].id;
this.member_list = [];
this.list = [];
this.top = this.randomBetween();
this.page = 1;
this.getAddressList();
},
ReachScroll(e) {
//20
if (e.detail.scrollTop > 100) {
this.isFixed = true;
} else {
this.isFixed = false;
if (this.leftZzId == 15) {
this.getMemberList();
}
//this.getMemberList();
},
clickClassifyNav(index) {
this.top = 0;
console.log(index);
console.log(this.industry_list[index].id);
uni.showLoading({
title: '加载中...'
});
this.currentTabbarIndex = index;
this.leftHyId = this.industry_list[index].id;
this.member_list = [];
this.list = [];
this.top = this.randomBetween();
this.page = 1;
this.getAddressList();
this.getMemberList();
//this.getAddressList();
//this.handleLeftScrollView(index)
//this.switchClassifyContent();
},
randomBetween() {
let baseRandom = Math.random() * (0.99999 - 0.00001) + 0.00001;
return baseRandom.toFixed(5); //
},
// scrollView
handleLeftScrollView(index) {
const tabbarItemTop = this.tabbarItemInfo[index].top - this.scrollViewBasicTop
if (tabbarItemTop > this.scrollViewHeight / 2) {
this.leftScrollViewTop = tabbarItemTop - (this.scrollViewHeight / 2) + this.tabbarItemInfo[index]
.height
} else {
this.leftScrollViewTop = 0
}
},
//
switchClassifyContent() {
this.rightScrollViewTop = 1
this.$nextTick(() => {
this.rightScrollViewTop = 0
})
//this.classifyContent.subClassify[0].title = this.tabbar[this.currentTabbarIndex]
},
tn(url) {
uni.navigateTo({
url: url
})
},
sizeDeal(size) {
// 使uni.upx2px
const pxValue = uni.upx2px(size);
return pxValue;
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
@ -329,7 +782,7 @@
&__left-box {}
&__right-box {
background-color: #FFFFFF;
background-color: #F1F2F8;
}
/* 分类列表和内容 end */
@ -337,8 +790,6 @@
/* 侧边导航 start */
&__tabbar {
&__item {
height: 90rpx;
&:first-child {
border-top-right-radius: 0rpx;
}
@ -348,10 +799,10 @@
}
&--active {
background-color: #FFFFFF;
background-color: #F1F2F8;
position: relative;
// font-weight: bold;
color: #4AA2EF;
font-weight: bold;
color: #3056D3;
&--prev {
border-bottom-right-radius: 26rpx;
@ -394,6 +845,7 @@
&__item {
padding: 20rpx;
background-color: #FFFFFF;
}
}
}
@ -404,25 +856,7 @@
/* 分类内容 end */
}
.my-page {
height: calc(100vh - 286rpx);
padding-bottom: 100rpx;
}
.textThis {
color: #3056D3;
font-weight: bold;
}
.textNo {
color: #000000;
}
.fixed {
position: fixed;
}
.abc {
position: absolute;
.tn-bg-my-ccc {
background-color: #F1F2F8;
}
</style>

View File

@ -26,7 +26,7 @@
</view>
</view>
<view style="padding: 0px 30rpx;">
<swiper class="card-swiper" style="height: 320rpx;margin-top: 20rpx;" current="0" mode="dot"
<swiper class="card-swiper" style="height: 320rpx;margin-top: 20rpx;" mode="dot"
:circular="true" duration="500" interval="5000" @change="cardSwiper" :autoplay="true">
<swiper-item style="border-radius: 0;padding: 0;" v-for="(item,index) in carousel_list" :key="index"
:class="cardCur==index?'cur':''">
@ -34,7 +34,7 @@
:controls="false" loop autoplay object-fit="contain"
style="width: 100%;border-radius: 20rpx 20rpx 0px 0px;height: 100%;"
@error="videoErrorCallback"></video>
<image v-if="item.type==1" :src="apiImgUrl+item.image" mode="scaleToFill"
<image @click="openNewUrl({wx_url:item.url})" v-if="item.type==1" :src="apiImgUrl+item.image" mode="scaleToFill"
style="width: 100%;height: 320rpx;border-radius: 20rpx 20rpx 0px 0px;">
</image>
</swiper-item>
@ -73,7 +73,7 @@
<image class="no-img" src="/static/48098164.png"
style="width: 120rpx;position: absolute; right: 10rpx;bottom: 0;" mode="widthFix"></image>
</view>
<view @click="openUrl('/pages/index/service?type='+3)"
<view @click="openUrl('/pages/packageB/news/new_list?type='+52)"
style="position:relative;margin-top: 20rpx;padding: 20rpx;border-radius: 16rpx;height: 130rpx;background: rgba(255,151,220,0.2);">
<view style="font-size: 32rpx;font-weight: 600;;color: #181818;">品牌活动</view>
<view style="font-size: 24rpx;margin-top: 10rpx;color: rgba(24,24,24,0.5);">Brand activity</view>
@ -97,16 +97,29 @@
</image>
</view>
<view style="width: 100%;margin-left: 20rpx">
<view @click="openUrl('/pages/packageB/news/new_list')"
<view @click="openUrl('/pages/packageB/news/suggestions')"
style="position:relative;padding: 20rpx;border-radius: 16rpx;height: 130rpx;background: rgba(72,219,122,0.2);">
<view style="font-size: 32rpx;font-weight: 600;;color: #181818;">实时资讯</view>
<view style="font-size: 24rpx;margin-top: 10rpx;color: rgba(24,24,24,0.5);">Member map</view>
<view style="font-size: 32rpx;font-weight: 600;;color: #181818;">意见建议</view>
<view style="font-size: 24rpx;margin-top: 10rpx;color: rgba(24,24,24,0.5);">Suggestions</view>
<image class="no-img" src="/static/48098163.png"
style="width: 120rpx;height: 90rpx;position: absolute; right: 10rpx;bottom: 0;" mode="widthFix">
</image>
</view>
</view>
</view>
<!-- <view style="padding:20rpx 30rpx 0rpx 30rpx;" @tap="openUrl('/pages/index/user_map')">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
style="color: #999999;padding-bottom: 10rpx;">
<view>会员地图</view>
<view>
<text>更多</text>
<text class="tn-icon-right"></text>
</view>
</view>
<map class="shadow-content tn-shadow" style="width: 100%;height: 300rpx;border-radius: 16rpx;" :scale="5"
:latitude="34.75" :longitude="113.66" :markers="covers">
</map>
</view> -->
<!-- <view style="margin:20rpx 28rpx">
<view @click="openUrl('/pages/packageA/info/policy')"
style="position:relative;padding: 20rpx;border-radius: 16rpx;height: 130rpx;background: linear-gradient(90deg, #d6eafa 0%, #d4eafe 100%);">
@ -188,8 +201,8 @@
@click="openUrl('/pages/packageB/event/event_info?id='+item.id)"
style="position: relative;;display: inline-block;width: 300rpx;text-align: center;background-color: #FFF;border-radius: 20rpx;overflow: hidden;margin-right: 20rpx;">
<view>
<image :src="apiImgUrl+item.activity_image" mode="aspectFill"
style="width: 350rpx;height: 170rpx;">
<image lazy-load :src="apiImgUrl+item.activity_image" mode="aspectFill"
style="width: 100%;height: 170rpx;">
</image>
</view>
<view style="padding:10rpx;font-weight: 400;min-height: 100rpx;">
@ -201,8 +214,8 @@
<view v-if="item.type=='进行中'" class="my_tag" style="background-color: #13C296">
进行中
</view>
<view v-if="item.type=='未开始'" class="my_tag" style="background-color: rgb(248, 155, 59)">
预告
<view v-if="item.type=='未开始'" class="my_tag" style="background: #BABDC7;">
未开始
</view>
<view v-if="item.type=='已结束'" class="my_tag" style="background-color: #FF5159">
已结束
@ -227,11 +240,11 @@
<view v-for="(item,index) in news_list" :class="{'rounded_corner': index === 0}">
<view class="tn-flex tn-flex-row-between" @click="openNewUrl(item)"
style="padding: 20rpx;min-height: 200rpx;">
<view style="margin-left: 20rpx;" v-if="item.news_image">
<image :src="apiImgUrl+item.news_image" mode="aspectFill"
<view style="margin-left: 20rpx;width: 44%;" v-if="item.news_image">
<image lazy-load :src="apiImgUrl+item.news_image" mode="aspectFill"
style="width: 280rpx;height: 180rpx;border-radius: 20rpx;"></image>
</view>
<view style="position:relative;padding:0rpx 10rpx 10rpx 15rpx">
<view style="position:relative;padding:0rpx 10rpx 10rpx 15rpx; width: 100%;">
<view class="tn-text-ellipsis-2" style="font-size: 32rpx;font-weight: bold;">
{{ item.news_title }}
</view>
@ -251,11 +264,11 @@
</view>
</view>
<!-- <view style="height: 1rpx;background-color: #E6E6E6;width: 90%;margin: 0 auto;margin-top: 30rpx;"></view> -->
<view @click="callPhone"
<!-- <view @click="callPhone"
style="padding-top:70rpx ;text-align: center;padding-bottom: 20rpx;font-size: 24rpx;color: rgba(153,153,153,0.5);letter-spacing: 2rpx;">
<view>技术支持洛阳灵睿网络</view>
<view>电话15503791530</view>
</view>
</view> -->
</view>
</template>
@ -268,7 +281,8 @@
associationIndex,
carouselIndex,
Mailcoent,
getArticlePolicyList
getArticlePolicyList,
latitudeAndLongitude
} from '@/util/api.js';
import store from '@/store/index.js'
@ -277,7 +291,7 @@
return {
topShow: true,
new_top_list: [{
article_title: '河南省青年企业家协会走进省团校开展党史学...'
article_title: '河南省青年企业家协会'
}],
list: [],
selectShow: false,
@ -294,12 +308,13 @@
carousel_list: [],
current: 0,
page: 1,
size: 10,
size: 5,
gory_id: 0,
type: 1,
HomeTitle: '',
apiImgUrl: this.$store.state.imgUrl,
association_id: this.$store.state.Gid,
covers: [],
}
},
mounted() {
@ -324,13 +339,43 @@
this.getAssociationIndex();
this.getCarouselIndex();
this.getMsg();
//this.getLatitudeAndLongitude();
//this.getArticlePolicyListAll();
},
methods: {
getLatitudeAndLongitude() {
latitudeAndLongitude()
.then(res => {
console.log(res);
var list = res.data;
const transformedSelectList = list.map(item => ({
latitude: parseFloat(item.dimension),
longitude: parseFloat(item.longitude),
id: item.id,
iconPath: '/static/make.png',
width: 30,
height: 30,
title: item.enterprise_name,
company_image: item.company_image,
nikename: item.nikename,
}));
console.log(transformedSelectList);
this.covers = transformedSelectList;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
openNewUrl(item) {
//'/pages/packageB/news/new_info?id='+item.news_id
console.log(item);
if (item.wx_url == '') {
if (item.wx_url == '' || item.wx_url == null) {
uni.navigateTo({
url: '/pages/packageB/news/new_info?id=' + item.news_id
})
@ -380,12 +425,12 @@
},
openInfo(d) {
uni.navigateTo({
url: '/pages/packageA/info/policy_info?id=' + d.id,
url: '/pages/packageC/info/policy_info?id=' + d.id,
})
},
openRight() {
uni.navigateTo({
url: '/pages/packageA/info/policy',
url: '/pages/packageC/info/policy',
})
},
async getMsg() {
@ -467,6 +512,7 @@
console.log(res);
if (res.code == 1) {
this.carousel_list = res.data;
//this.new_top_list[0].article_title=this.carousel_list[0].title;
}
})
.catch(error => {
@ -481,7 +527,7 @@
activityList({
association_id: store.state.Gid,
page: 1,
size: 10
size: 5
})
.then(res => {
console.log(res);
@ -548,6 +594,7 @@
})
},
cardSwiper(d) {
//this.new_top_list[0].article_title=this.carousel_list[d.detail.current].title;
this.cardCur = d.detail.current;
},
ReachScroll(d) {

View File

@ -1,5 +1,6 @@
<template>
<view class="index">
<view v-if="tabberPageLoadFlag[0]" :style="{display: currentIndex === 0 ? '' : 'none'}">
<scroll-view @scroll="homeScroll" class="custom-tabbar-page" scroll-y enable-back-to-top
@scrolltolower="tabbarPageScrollLower">
@ -11,10 +12,17 @@
<Service ref="service"></Service>
</scroll-view>
</view> -->
<view v-if=" tabberPageLoadFlag[1]" :style="{display: currentIndex === 1 ? '' : 'none'}">
<scroll-view @scroll="directoryScroll" scroll-y enable-back-to-top :class="tabShow?'custom-tabbar-page':''">
<!-- <view v-if=" tabberPageLoadFlag[1]" :style="{display: currentIndex === 1 ? '' : 'none'}">
<view @scrolltolower="tabbarPageScrollLower" @scroll="directoryScroll" scroll-y enable-back-to-top
:class="tabShow?'custom-tabbar-page':''">
<Directory ref="directory"></Directory>
</scroll-view>
</view>
</view> -->
<view @touchmove="preventTouchMove" v-if=" tabberPageLoadFlag[1]"
:style="{display: currentIndex === 1 ? '' : 'none'}">
<view :class="tabShow?'custom-tabbar-page':''">
<Directory ref="directory"></Directory>
</view>
</view>
<!-- <view v-if="tabberPageLoadFlag[2]" :style="{display: currentIndex === 2 ? '' : 'none'}">
<scroll-view class="custom-tabbar-page" scroll-y enable-back-to-top @scrolltolower="tabbarPageScrollLower">
@ -31,7 +39,33 @@
<User ref="user"></User>
</scroll-view>
</view>
<tn-popup v-model="birthShow" mode="center" height="700rpx" backgroundColor="transparent">
<view
style="width: 85vw;background-color: #ffffff;border-radius: 20rpx;padding:40rpx 30rpx 60rpx 30rpx;text-align: center;">
<image class="no-img" src="/static/birthday.png" style="width: 240rpx;" mode="widthFix"></image>
<view style="color: #FF634F;font-size: 50rpx;">生日快乐</view>
<view style="color: #666666;font-weight: 600;margin-top: 40rpx;font-size: 30rpx;letter-spacing: 3rpx;">
亲爱的{{userInfo.nikename}}今天是您的生日
<br>愿您拥有美好的一天
</view>
<view @click="closeBirth"
style="margin-top: 50rpx;font-size: 32rpx;color: #ffffff;text-align: center;width: 100%;height: 90rpx;border-radius: 90rpx;line-height: 90rpx;background: linear-gradient( 90deg, #FFC065 0%, #FF730A 100%);">
</view>
</view>
</tn-popup>
<tn-popup v-model="testShow" mode="center" height="700rpx" backgroundColor="transparent">
<view
style="width: 85vw;background-color: #ffffff;border-radius: 20rpx;padding:40rpx 30rpx 60rpx 30rpx;text-align: center;">
<view style="font-size: 40rpx;font-weight: 600;color: #000;">系统提示</view>
<view style="color: #000000;font-weight: 600;margin-top: 40rpx;font-size: 34rpx;letter-spacing: 3rpx;">
<view>河南省青年企业家协会</view>
<view>小程序试运营中</view>
</view>
<view @click="closeTestShow"
style="margin-top: 50rpx;font-size: 32rpx;color: #ffffff;text-align: center;width: 100%;height: 90rpx;border-radius: 90rpx;line-height: 90rpx;background: linear-gradient( 90deg, #446BEB 0%, #6ADCF5 100%);">
确定</view>
</view>
</tn-popup>
<tn-tabbar :show="tabShow" :outHeight="140" :height="120" v-model="currentIndex" :list="tabbarList"
activeColor="#000000" inactiveColor="#AAAAAA" activeIconColor="#3377FF" inactiveIconColor="#888888"
:animation="true" :safeAreaInsetBottom="true" :thisIndex="thisIndex" @change="switchTabbar"></tn-tabbar>
@ -101,9 +135,16 @@
icon: '',
name: '',
tabShow: true,
birthShow: false,
userInfo: {},
testShow: false
}
},
onLoad(options) {
console.log(options);
if (typeof(options.id) != 'undefined') {
uni.setStorageSync('recommendation_id', options.id);
}
const index = Number(options.index || 0)
// tabbar
this.tabberPageLoadFlag = this.tabbarList.map((item, tabbar_index) => {
@ -127,27 +168,88 @@
})
uni.setStorageSync('Gid', searchParams.gid);
}
var userInfo = uni.getStorageSync('userInfo');
if (userInfo) {
this.userInfo = userInfo;
} else {
this.birthShow = false;
}
if (uni.getStorageSync('birthDay')) {
this.birthShow = false;
if (!this.isSameMonthDay(userInfo.birth_time)) {
uni.removeStorageSync('birthDay');
}
} else {
if (this.isSameMonthDay(userInfo.birth_time)) {
this.birthShow = true;
}
}
},
mounted() {
//this.wxshare();
},
onShareAppMessage() { //
//
return {
title: this.name,
path: '/pages/index/index?gid=' + store.state.Gid,
imageUrl: this.icon,
onShareAppMessage: async function(data) {
console.log(data);
if (data.from == 'button') {
var info = data.target.dataset.item;
return {
title: info.title,
path: '/pages/packageB/paper/paper_info?id=' + info.id,
imageUrl: this.icon,
}
} else {
return {
title: this.name,
path: '/pages/index/index?gid=' + store.state.Gid,
imageUrl: this.icon,
}
}
},
onShareTimeline() { //
return {
title: this.name,
path: '/pages/index/index?gid=' + store.state.Gid,
imageUrl: this.icon,
onShareTimeline: async function(data) { //
if (data.from == 'button') {
var info = data.target.dataset.item;
return {
title: info.title,
path: '/pages/packageB/paper/paper_info?id=' + info.id,
imageUrl: this.icon,
}
} else {
return {
title: this.name,
path: '/pages/index/index?gid=' + store.state.Gid,
imageUrl: this.icon,
}
}
},
methods: {
closeTestShow() {
this.testShow = false;
},
closeBirth() {
var userInfo = uni.getStorageSync('userInfo');
uni.setStorageSync('birthDay', userInfo.birth_time);
this.birthShow = false;
},
isSameMonthDay(dateString) {
//
const dateParts = dateString.split('-');
if (dateParts.length !== 3) {
throw new Error('Invalid date format. Expected format: YYYY-MM-DD');
}
const birthMonth = parseInt(dateParts[1], 10);
const birthDay = parseInt(dateParts[2], 10);
//
const currentDate = new Date();
const currentMonth = currentDate.getMonth() + 1; // getMonth() 0-111
const currentDay = currentDate.getDate();
//
return currentMonth === birthMonth && currentDay === birthDay;
},
parseQuery(queryStr) {
let params = {};
queryStr.split('&').forEach(param => {
@ -188,6 +290,12 @@
if (this.currentIndex === 0) {
this.$refs.home.ReachBottom();
}
if (this.currentIndex === 1) {
this.$refs.directory.ReachBottom();
}
if (this.currentIndex === 2) {
this.$refs.pizz.ReachBottom();
}
// if (this.currentIndex === 1) {
// this.$refs.service.ReachBottom();
// }
@ -216,6 +324,16 @@
this.$refs.directory.onload();
}, 100)
}
if (index === 2) {
setTimeout(() => {
this.$refs.pizz.onload();
}, 100)
}
if (index === 3) {
setTimeout(() => {
this.$refs.user.onload();
}, 100)
}
// if (index === 2) {
// setTimeout(() => {
// this.$refs.discovery.getNewInfo();

View File

@ -1,5 +1,5 @@
<template>
<view style="background-color: #F1F2F8;letter-spacing: 1rpx;min-height: 100vh;">
<view style="background-color: #F1F2F8;">
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="#ffffff">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="width: 100%;">
@ -10,31 +10,310 @@
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}"
style="background-color: #ffffff;padding-bottom: 10rpx;">
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="padding-bottom: 10rpx;">
<view style="padding: 30rpx;" v-if="!none && quit==0">
<view style="background-color: #ffffff;border-radius: 20rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between" style="padding: 30rpx;">
<view style="font-size: 34rpx;font-weight: bold;">我发布的</view>
<view>
<tn-button @click="tn('/pages/packageB/paper/add')" padding="25rpx 30rpx"
backgroundColor="rgba(48,86,211,0.1)" size="sm" fontColor="#3056D3" shape="round">
<text class="tn-icon-add"></text>
<text>发布</text>
</tn-button>
</view>
</view>
<scroll-view :scroll-x="true" style="padding:0rpx 30rpx;white-space: nowrap;width: 100%">
<view v-for="(item,index) in my_list"
style="width: 185rpx;;display: inline-block;text-align: center;background-color: #FFF;overflow: hidden;margin-right: 20rpx;">
<view style="position: relative;height: 185rpx;width: 185rpx;">
<image v-if="item.files.length>0" :src="apiImgUrl+item.files[0]" mode="aspectFill"
style="border-radius: 20rpx;width: 185rpx;height: 185rpx;position: absolute;left: 0;z-index: 1;">
</image>
<view v-if="item.files.length==0&&index != 0"
style="border-radius: 20rpx;width: 185rpx;height: 185rpx;background-color: rgba(24,24,24,0.3);display: inline-block;">
<text style="color: #FFFFFF;line-height: 185rpx;">暂无图片</text>
</view>
<view @click="tn('/pages/packageA/user/my_add')" v-if="index == 0"
style="border-radius: 20rpx;width: 185rpx;height: 185rpx;background: rgba(24,24,24,0.5);position: absolute;z-index: 1;">
<text style="color: #FFFFFF;line-height: 185rpx;">全部动态</text>
</view>
</view>
<view style="padding:10rpx;font-weight: 400;min-height: 100rpx;">
<view class="tn-text-ellipsis-2"
style="font-weight: 500;text-align: left;font-size: 28rpx">
<text>{{item.title}}</text>
</view>
</view>
</view>
</scroll-view>
</view>
<view style="background-color: #FFFFFF;margin-top: 20rpx;border-radius: 20rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between" style="padding: 30rpx;">
<view style="font-size: 34rpx;font-weight: bold;">圈子动态</view>
</view>
<view v-for="(item,index) in list" style="padding:0rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
style="width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="width: 100%;">
<view @click="tn('/pages/packageA/user/my_card?id='+item.member.id)">
<image v-if="item.member.photo_image==''||item.member.photo_image==null"
src="/static/def.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;">
</image>
<image v-if="item.member.photo_image!=''&&item.member.photo_image!=null"
:src="apiImgUrl+item.member.photo_image"
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
</view>
<view style="margin-left: 10rpx;width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="font-size: 30rpx;color: #181818;font-weight: bold;">
<text
style="vertical-align: middle;margin-right: 10rpx;">{{item.member.nikename}}</text>
</view>
<view>
<tn-button @click="tn('/pages/packageA/user/my_card?id='+item.member.id)"
padding="20rpx 20rpx" backgroundColor="rgba(48,86,211,0.1)" size="sm"
fontColor="#3056D3" shape="round">
<text style="font-size: 24rpx;">联系ta</text>
</tn-button>
</view>
</view>
<view class="tn-text-ellipsis"
style="width: 380rpx;font-size: 26rpx;color: #666666;font-weight: 500;margin-top: 5rpx;">
{{item.member.enterprise_name}}
</view>
</view>
</view>
</view>
<view @click="tn('/pages/packageB/paper/paper_info?id='+item.id)" class="tn-text-ellipsis-2"
style="font-size: 32rpx;font-weight: bold;margin-top: 20rpx;">
{{item.title}}
</view>
<view @click="tn('/pages/packageB/paper/paper_info?id='+item.id)" class="tn-text-ellipsis-2"
style="font-size: 28rpx;color: #666666;margin-top: 20rpx;">
{{item.content}}
</view>
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
style="margin-top: 20rpx;">
<view style="color: #AAAAAA;font-size: 24rpx;">
发布于:{{item.createtime}}
</view>
</view>
<view v-if="item.files.length>0" style="margin-top: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-wrap">
<view class="tn-flex-basic-xs" v-for="(img,img_i) in item.files"
style="text-align: center;">
<view style="padding-right: 10rpx;">
<image :src="apiImgUrl+img" @click="openImg(item,img_i)" mode="aspectFill"
style="width: 200rpx;height: 200rpx;border-radius:20rpx;">
</image>
</view>
</view>
</view>
</view>
<view style="margin-top: 20rpx;padding:30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="text-align: center;font-size: 28rpx;">
<button :data-item="item" hover-class="none" open-type="share">
<text class="tn-icon-send" style="font-size: 32rpx;"></text>
<text style="margin-left: 10rpx;">分享</text>
</button>
</view>
<view style="text-align: center;font-size: 28rpx;" @click="like(index)">
<text v-if="item.is_like==1" class="tn-icon-praise-fill tn-color-red"
style="font-size: 32rpx;"></text>
<text v-if="item.is_like==0" class="tn-icon-praise"
style="font-size: 32rpx;"></text>
<text style="margin-left: 10rpx;">{{item.like_num>0?item.like_num:'点赞'}}</text>
</view>
<view style="text-align: center;font-size: 28rpx;" @click="favs(index)">
<text v-if="item.is_fav==1" class="tn-icon-star-fill tn-color-orangeyellow"
style="font-size: 32rpx;"></text>
<text v-if="item.is_fav==0" class="tn-icon-star" style="font-size: 32rpx;"></text>
<text style="margin-left: 10rpx;">{{item.fav_num>0?item.fav_num:'收藏'}}</text>
</view>
<view style="text-align: center;font-size: 28rpx;">
<text class="tn-icon-comment" style="font-size: 32rpx;"></text>
<text
style="margin-left: 10rpx;">{{item.comment_num>0?item.comment_num:'评论'}}</text>
</view>
</view>
</view>
<view v-if="index<list.length-1"
style="height: 1px;border-top: #BABDC7 1px dashed;margin: 20rpx 0rpx;"></view>
</view>
</view>
</view>
<view style="padding: 30rpx;" v-if="none || quit==1">
<view
style="background-color: #ffffff;border-radius: 20rpx;padding: 30rpx;text-align: center;font-size: 32rpx;font-weight: 600">
请入会后查看
</view>
</view>
</view>
<tn-modal v-model="sqMode" :custom="true">
<view>
<view style="text-align: center;color: #181818;font-size: 34rpx;font-weight: bold;">申请联系方式</view>
<view style="color: #777777;font-size: 28rpx;margin-top: 20rpx;">
点击确定按钮将发送联系方式的申请,等待对方同意后方可展示且发送申请时,对方也将看到你的个人名片信息
</view>
<view style="margin-top: 20rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between" style="width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="width: 100%;">
<view>
<image src="/static/def.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;">
</image>
</view>
<view style="margin-left: 10rpx;width: 100%;">
<view style="font-size: 32rpx;color: #181818;font-weight: bold;">
<text style="vertical-align: middle;">石训</text>
<tn-tag size="sm" padding="0px 5px" margin="0 0 0 10rpx" width="auto" shape="radius"
backgroundColor="#F1F2F8" fontColor="#888888">135********
</tn-tag>
</view>
<view class="tn-text-ellipsis"
style="width: 380rpx;font-size: 26rpx;color: #666666;font-weight: 500;margin-top: 10rpx;">
好想你健康食品股份有限公司
</view>
</view>
</view>
</view>
<view class="tn-flex tn-flex-center tn-flex-row-between" style="margin-top: 40rpx;">
<view>
<tn-button @click="sqMode = false" width="250rpx" :plain="true" shape="round" size="lg"
backgroundColor="#BABDC7" fontColor="#999999">取消
</tn-button>
</view>
<view>
<tn-button width="250rpx" shape="round" margin="0rpx 0 0 30rpx" size="lg"
backgroundColor="#3056D3" fontColor="#ffffff">确定
</tn-button>
</view>
</view>
</view>
</view>
</tn-modal>
</view>
<!-- <view style="background-color: #ffffff;">
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="#ffffff">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="width: 100%;">
<view
style="text-align: center;font-size: 34rpx;color: #000000;letter-spacing: 1px;font-weight: bold;">
<text>规章制度</text>
</view>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="padding-bottom: 10rpx;">
<view data-v-a2114eee=""
style="overflow-wrap: break-word; overflow: hidden;padding: 30rpx;line-height: 50rpx;">
<view style="text-align: start; text-indent: 2ch;">本会是河南省内的青年企业家自愿组成的全省性联合性非营利性社会团体<br></view>
<view style="text-align: start;"><text style="font-weight: 600;">本会宗旨</text></view>
<view style="text-align: start; text-indent: 2ch;">
坚持以习近平新时代中国特色社会主义思想为指导深入学习贯彻党的十九大精神和习近平总书记调研指导河南时的重要讲话全面落实习近平总书记关于青年工作的重要思想围绕中心服务党政工作大局服务青年企业家成长发展充分履行沟通交流促进发展维护权益等职责引导青年企业家爱党爱国爱人民为全面建成小康社会奋力谱写新时代中原更加出彩新篇章贡献青春智慧和力量
</view>
<view style="text-align: start; text-indent: 2ch;">
本会遵守宪法法律法规和国家政策践行社会主义核心价值观遵守社会道德风尚不损害国家利益社会公共利益以及其他组织和公民的合法权益
</view>
<view style="text-align: start;"><text style="font-weight: 600;">轮值会长制度</text></view>
<view style="text-align: start; text-indent: 2ch;">
本会实行会长办公会议制度理事会闭会期间由会长办公会议领导协会日常工作会长办公会议由本会会长常务副会长副会长和秘书长组成由会长或由会长委托一名副会长召集根据需要副秘书长可以列席会长办公会议会长办公会议须经2/3以上组成人员出席方能召开其决议须经到会人员2/3以上表决通过方为有效会长办公会议原则上每半年至少召开一次情况特殊的可采用通讯形式召开
</view>
<view style="text-align: start;"><text style="font-weight: 600;">行业委员会制度</text></view>
<view style="text-align: start;">本会设立行业委员会</view>
<view style="text-align: start; text-indent: 2ch;">
行业委员会设主任1名副主任若干名人选由本会秘书长提名会长办公会议决定各行业委员会在行业范围内按入会条件积极推荐会员推荐人选由本会秘书处审核报会长办公会批准后入会并自动进入该行业委员会行业委员会围绕协会中心任务依照本章程根据会员需要开展工作
</view>
<view style="text-align: start;"><text style="font-weight: 600;">财务管理制度</text></view>
<view style="text-align: start; text-indent: 2ch;">
本会按照国家统一的会计制度确定财务制度制定财务会计报告健全内控机制规范使用票据接受财政部门的监督财产来源于国家资助或社会捐赠资助的应当接受审计机关监督
</view>
<view style="text-align: start;">本会财务收支全部纳入本会开立的银行账户不使用其他组织或者个人的银行账户</view>
<view style="text-align: start;">本会配备具有专业资格的会计人员会计不得兼任出纳会计人员调动工作或者离职时必须与接管人员办清交接手续</view>
<view style="text-align: start;">本会换届或更换法定代表人之前必须进行财务审计</view>
<view style="text-align: start;">本会的全部资产及其增值为本会所有任何单位个人不得侵占私分和挪用也不得在会员中分配</view>
</view>
</view>
</view> -->
</template>
<script>
import {
associationIndex
tweetsList,
likeDo,
favsDo,
likeRevoke,
favsRevoke
} from '@/util/api.js';
import store from '@/store/index.js'
export default {
data() {
return {
topCurrent: 0,
list: [],
apiImgUrl: this.$store.state.imgUrl,
content: ''
content: '',
sqMode: false,
page: 1,
none: false,
my_list: [],
quit: 0,
}
},
mounted() {
this.getAssociationIndex();
var quit = uni.getStorageSync('quit');
this.quit = quit;
this.getTweetsList();
this.getMyTweetsList();
},
methods: {
onload() {
var quit = uni.getStorageSync('quit');
this.quit = quit;
},
getMyTweetsList() {
tweetsList({
me: 1,
association_name: 1,
page: this.page,
state: 2,
size: 10
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.my_list = res.data;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
ReachBottom() {
console.log('home');
this.page = this.page + 1;
this.getTweetsList();
},
openImg(item, index) {
console.log(index);
console.log(item.files);
var img = item.files;
var apiImgUrl = this.apiImgUrl;
const updatedImagePaths = img.map(path => `${apiImgUrl}${path}`);
console.log(updatedImagePaths);
uni.previewImage({
current: index,
urls: updatedImagePaths,
});
},
switchTabbar(d) {
console.log(d);
store.commit('$tStore', {
@ -54,14 +333,19 @@
this.list = [];
this.getAssociationIndex();
},
getAssociationIndex() {
associationIndex({
association_name: this.content
getTweetsList() {
tweetsList({
association_name: 1,
page: this.page,
size: 10
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.none = false;
this.list.push(...res.data);
} else {
this.none = true;
}
})
.catch(error => {
@ -72,6 +356,128 @@
});
})
},
like(index) {
var uid = uni.getStorageSync('uid');
if (!uid) {
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 2000
});
return;
}
var info = this.list[index];
if (info.is_like == 0) {
likeDo({
member_id: uid,
related_id: info.id,
related_type: 'tweets',
member_b_id: info.member_id,
})
.then(res => {
console.log(res);
uni.showToast({
title: '赞成功!',
icon: 'none',
duration: 2000
});
this.list[index].is_like = 1;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
} else {
likeRevoke({
member_id: uid,
related_id: info.id,
related_type: 'tweets',
member_b_id: info.member_id,
})
.then(res => {
console.log(res);
uni.showToast({
title: '取消成功!',
icon: 'none',
duration: 2000
});
this.list[index].is_like = 0;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
}
},
favs(index) {
var uid = uni.getStorageSync('uid');
if (!uid) {
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 2000
});
return;
}
var info = this.list[index];
console.log(info);
if (info.is_fav == 0) {
favsDo({
member_id: uid,
related_id: info.id,
related_type: 'tweets',
member_b_id: info.member_id,
})
.then(res => {
console.log(res);
uni.showToast({
title: '收藏成功!',
icon: 'none',
duration: 2000
});
this.list[index].is_fav = 1;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
} else {
favsRevoke({
member_id: uid,
related_id: info.id,
related_type: 'tweets',
member_b_id: info.member_id,
})
.then(res => {
console.log(res);
uni.showToast({
title: '取消收藏成功!',
icon: 'none',
duration: 2000
});
this.list[index].is_fav = 0;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
}
},
tn(e) {
uni.navigateTo({
url: e
@ -95,4 +501,27 @@
bottom: -12rpx;
z-index: 100;
}
button::after {
border: none;
}
button {
position: relative;
display: block;
margin-left: auto;
margin-right: auto;
padding-left: 0px;
padding-right: 0px;
box-sizing: border-box;
text-align: center;
text-decoration: none;
line-height: 1.35;
-webkit-tap-highlight-color: transparent;
overflow: hidden;
background-color: transparent;
font-size: 28rpx;
width: 100%;
height: 100%;
}
</style>

View File

@ -1,19 +1,50 @@
<template>
<view style="letter-spacing: 1rpx;">
<view style="background-color: #F1F2F8;letter-spacing: 1rpx;min-height: 100vh;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:info.association_name}]" :current="topCurrent" activeColor="#000"
:bold="false" :fontSize="36"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
<text>协会简介</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="position: relative;">
<view style="padding: 30rpx;">
<view
style="padding: 40rpx;;border-radius: 30rpx;background: linear-gradient( 180deg, rgba(48,86,211,0.17) 0%, rgba(255,255,255,0.23) 32%, #FFFFFF 100%);">
<image class="no-img" src="/static/logo.png" style="width: 100%;display: block;" mode="widthFix">
</image>
<view style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin-top: 30rpx;"></view>
<view style="font-size: 34rpx;font-weight: bold;margin-top: 30rpx;">关于我们</view>
<div style="margin-top: 20rpx;color: #666666;" v-html="info.association_desc"></div>
</view>
<view style="margin-top: 30rpx;padding:30rpx 40rpx;;border-radius: 30rpx;background-color: #FFFFFF;">
<view style="font-size: 34rpx;font-weight: bold;">联系方式</view>
<view style="margin-top: 20rpx;font-size: 28rpx;color: #666666;">
<text>联系人</text>
<text>河南省青年企业家协会</text>
</view>
<view style="margin-top: 10rpx;font-size: 28rpx;color: #666666;">
<text>联系电话</text>
<text>{{info.association_phone}}</text>
</view>
<view style="margin-top: 10rpx;font-size: 28rpx;color: #666666;">
<text>邮箱</text>
<text>{{info.association_emal}}</text>
</view>
<view style="margin-top: 10rpx;font-size: 28rpx;color: #666666;">
<text>地址</text>
<text>{{info.association_dizhi}}</text>
</view>
<view style="height: 1rpx;border-top: #CCCCCC 1rpx dashed;margin-top: 30rpx;"></view>
<image :show-menu-by-longpress="true" class="no-img"
style="width: 150rpx;display: block;margin-top: 30rpx;" mode="widthFix" src="/static/tu23.png">
</image>
</view>
</view>
<!-- <view style="position: relative;">
<swiper class="card-swiper" :circular="true" :autoplay="true" duration="500" interval="8000"
@change="cardSwiper" style="height: 370rpx;">
<swiper-item style="padding: 0px;border-radius: 0;">
@ -28,10 +59,9 @@
<text class="tn-icon-qr-code" style="font-size: 40rpx;"></text>
</view>
</view>
</view>
</view>
<view style="padding:20rpx 30rpx;">
</view> -->
<!-- </view> -->
<!-- <view style="padding:20rpx 30rpx;">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-between" style="font-size: 30rpx;">
<view style="min-width: 200rpx;">协会地址</view>
<view>{{info.association_dizhi}}</view>
@ -45,19 +75,13 @@
<view style="min-width: 200rpx;">联系方式</view>
<view>{{info.association_phone}}</view>
</view>
</view>
<view style="height: 10rpx;background-color: #EBF4F7;"></view>
<view style="padding:10rpx 30rpx 200rpx 30rpx;">
<tn-tabs :list="list" :isScroll="false" :activeItemStyle="{'fontWeight':'600','fontSize':'30rpx'}"
</view> -->
<!-- <view style="height: 10rpx;background-color: #EBF4F7;"></view> -->
<!-- <view style="padding:10rpx 30rpx 200rpx 30rpx;"> -->
<!-- <tn-tabs :list="list" :isScroll="false" :activeItemStyle="{'fontWeight':'600','fontSize':'30rpx'}"
style="font-weight: ;" activeColor="#000" :barWidth="50" :barHeight="6"
:barStyle="{'background': 'linear-gradient(-45deg, #4AA2EF, #3A7FF4)','borderRadius': '4rpx'}"
:current="current" name="name" @change="change"></tn-tabs>
<!-- <view style="margin-top: 20rpx;position: relative;">-->
<!-- <image src="/static/b1.png"-->
<!-- style="width: 100rpx;height: 100rpx;position: absolute;left: 0;right: 0;top: 38%;z-index: 10;margin: 0 auto;">-->
<!-- </image>-->
<!-- <image src="/static/t7.jpg" style="width: 100%;border-radius: 20rpx;" mode="widthFix"></image>-->
<!-- </view>-->
<view style="line-height: 50rpx; text-indent: 2em;margin-top: 20rpx;" v-if="current==0">
<div v-html="info.association_desc"></div>
</view>
@ -66,13 +90,13 @@
</view>
<view style="line-height: 50rpx; text-indent: 2em;margin-top: 20rpx;" v-if="current==3">
<div v-html="info.ruhuixizhu"></div>
</view>
<view style="padding: 30rpx;text-align: center; " v-if="current==1">
<view style="width: 100%;background-color: #ffffff;z-index: 1;">
</view> -->
<!-- <view style="padding: 30rpx;text-align: center; " v-if="current==1"> -->
<!-- <view style="width: 100%;background-color: #ffffff;z-index: 1;">
<tn-tabs :list="tab_list" :isScroll="false" :current="tab_current" name="name" activeColor="#000000"
:activeItemStyle="{backgroundColor:'#F2F2F2'}" :showBar='false' @change="tab_change"></tn-tabs>
</view>
<view style="padding: 30rpx 0rpx;text-align: center;padding-top: 30rpx;">
</view> -->
<!-- <view style="padding: 30rpx 0rpx;text-align: center;padding-top: 30rpx;">
<template v-for="(item, index) in architecture" v-if="item.neirong.length>0">
<tn-button backgroundColor="#82B2FF" height="50rpx"
fontColor="#ffffff">{{item.position_name}}</tn-button>
@ -94,8 +118,8 @@
</tn-grid-item>
</tn-grid>
</template>
</view>
<!-- <template v-for="(item, index) in architecture">
</view> -->
<!-- <template v-for="(item, index) in architecture">
<tn-button backgroundColor="#E83A30" height="50rpx" width="250rpx"
fontColor="#ffffff">{{item.position_name}}</tn-button>
<tn-grid align="center" col="5">
@ -114,7 +138,7 @@
</tn-grid-item>
</tn-grid>
</template> -->
</view>
<!-- </view> -->
</view>
<!-- <view style="position: fixed;bottom: 50rpx;width: 100%;">
<view class="tn-flex tn-flex-row-around"> -->
@ -141,8 +165,7 @@
</view>
</view> -->
<!-- </view> -->
<tn-popup :closeBtn="true" v-model="show" mode="center" width="500rpx" height="600rpx">
<!-- <div style="text-align: center;padding: 30rpx;font-size: 32rpx;font-weight: 600;">使用二维码邀请入会</div> -->
<!-- <tn-popup :closeBtn="true" v-model="show" mode="center" width="500rpx" height="600rpx">
<view style="text-align: center;margin-top: 40rpx;">
<image :src="qrcode_url" style="width: 400rpx;height: 400rpx;"></image>
</view>
@ -150,10 +173,10 @@
<tn-button shape="round" backgroundColor="#82B2FF" fontColor="#ffffff"
@click="saveBase64">保存图片</tn-button>
</view>
</tn-popup>
<tn-tabbar :outHeight="140" :height="120" v-model="currentIndex" :list="tabbarList" activeColor="#3377FF"
</tn-popup> -->
<!-- <tn-tabbar :outHeight="140" :height="120" v-model="currentIndex" :list="tabbarList" activeColor="#3377FF"
inactiveColor="#AAAAAA" activeIconColor="#3377FF" inactiveIconColor="#8A8E99" :animation="true"
:safeAreaInsetBottom="true" @change="switchTabbar"></tn-tabbar>
:safeAreaInsetBottom="true" @change="switchTabbar"></tn-tabbar> -->
</view>
</template>
@ -226,7 +249,7 @@
console.log(d);
this.association_id = d.id;
this.getAssociationInfo();
this.getArchitectureList();
//this.getArchitectureList();
},
methods: {
openQrcode() {

View File

@ -38,7 +38,8 @@
<view v-for="(item,index) in actList">
<view @click="openUrl('/pages/packageB/event/event_info?id='+item.id)"
style="margin-bottom: 30rpx;background-color: #FFF;border-radius: 20rpx;">
<view class="tn-flex tn-flex-row-between" style="padding:20rpx 20rpx 10rpx 10rpx;">
<view class="tn-flex tn-flex-row-between"
style="padding:20rpx 20rpx 10rpx 10rpx;position: relative;">
<view style="margin-left: 10rpx;" v-if="item.activity_image">
<image :src="apiImgUrl+item.activity_image" mode="aspectFill"
style="width: 280rpx;height: 180rpx;border-radius: 20rpx;"></image>
@ -49,11 +50,22 @@
</view>
<view style="font-size: 24rpx;margin: 20rpx 0rpx;color: #888888;">
<text class="tn-icon-time"></text>
<text>{{formatTime(item.activity_end_time)}}-{{formatTime(item.activity_start_time)}}</text>
<text>{{formatTime(item.activity_start_time)}}-{{formatTime(item.activity_end_time)}}</text>
</view>
<view class="tn-text-ellipsis" style="font-size:26rpx;color: #888888;">
<text class="tn-icon-location" style="vertical-align: middle;"></text>
<text style="vertical-align: middle;">{{item.activity_name}}</text>
<text style="vertical-align: middle;">{{item.activity_location}}</text>
</view>
</view>
<view style="position: absolute;top: 0rpx;left: 0rpx;">
<view v-if="item.type=='进行中'" class="my_tag" style="background-color: #13C296">
进行中
</view>
<view v-if="item.type=='未开始'" class="my_tag" style="background: #BABDC7;">
未开始
</view>
<view v-if="item.type=='已结束'" class="my_tag" style="background-color: #FF5159">
已结束
</view>
</view>
</view>
@ -64,9 +76,9 @@
<view style="padding-bottom: 120rpx;">
<tn-load-more class="tn-margin-top" :status="load_status"></tn-load-more>
</view>
<tn-tabbar :outHeight="140" :height="120" v-model="currentIndex" :list="tabbarList" activeColor="#3377FF"
<!-- <tn-tabbar :outHeight="140" :height="120" v-model="currentIndex" :list="tabbarList" activeColor="#3377FF"
inactiveColor="#AAAAAA" activeIconColor="#3377FF" inactiveIconColor="#8A8E99" :animation="true"
:safeAreaInsetBottom="true" @change="switchTabbar"></tn-tabbar>
:safeAreaInsetBottom="true" @change="switchTabbar"></tn-tabbar> -->
</view>
</template>
@ -220,4 +232,11 @@
background-color: red;
clip-path: path("M0 0 Q100 200, 200 0");
}
.my_tag {
padding: 8rpx 15rpx;
font-size: 20rpx;
color: rgba(255, 255, 255, 1);
border-radius: 20rpx 0rpx 20rpx 0rpx;
}
</style>

View File

@ -1,219 +1,119 @@
<template>
<view style="background-color: #EBF4F7;letter-spacing: 1rpx;">
<view :style="{paddingTop: vuex_custom_bar_height +40+ 'rpx'}"
style="background: linear-gradient(50deg, #034EF9 0%, #05ACFF 99%);height: 400rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="padding: 30rpx;width: 100%;">
<view v-if="login && userInfo.photo_image">
<image :src="apiImgUrl+userInfo.photo_image"
@click="tn_ru('/pages/packageA/user/my_card?id='+userInfo.member_id)"
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
<view style="background: #F1F2F8;">
<view
style="background: url('https://hnyea.0rui.cn/uploads/1/20240722/7f5a72050b9cbc409fb60fa8d32db76a.png');background-repeat: no-repeat;background-size: 100% 555rpx;">
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="transparent">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="width: 100%;">
<view
style="text-align: center;font-size: 34rpx;color: #000000;letter-spacing: 1px;font-weight: bold;">
<text>我的</text>
</view>
</view>
</view>
<view v-if="!login || !userInfo.photo_image">
<image src="/static/def.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
</view>
<view style="width: 100%;">
<view v-if="login" class="tn-flex tn-flex-col-center tn-flex-row-between">
<view style="margin-left: 20rpx;color: #fff"
@click="tn_ru('/pages/packageA/user/my_card?id='+userInfo.member_id)">
<view style="font-size: 35rpx;">{{ userInfo.nikename }}</view>
<view v-if="userInfo.position_name!=null" style="font-size: 24rpx;margin-top: 10rpx;">
{{userInfo.position_name}}
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<view>
<view v-if="login && userInfo.photo_image">
<image :src="apiImgUrl+userInfo.photo_image"
@click="tn_ru('/pages/packageA/user/my_card?id='+userInfo.member_id)"
style="width: 120rpx;height: 120rpx;border-radius: 50%;"></image>
</view>
<view v-if="!login || !userInfo.photo_image">
<image src="/static/def.png" style="width: 120rpx;height: 120rpx;border-radius: 50%;">
</image>
</view>
</view>
<view @click="tn('/pages/packageA/user/my_edit')">
<image src="/static/ico13.png" style="width: 40rpx ;" mode="widthFix"></image>
</view>
</view>
<view v-if="!login" class="tn-flex tn-flex-col-center tn-flex-row-between">
<view style="margin-left: 20rpx;color: #fff">
<!-- <tn-button @click="loginMod = true">点击登陆</tn-button> -->
<tn-button open-type="getPhoneNumber" @getphonenumber="PhoneLogin">点击登陆</tn-button>
</view>
<!-- <view @click="tn('/pages/index/my_edit')">-->
<!-- <image src="/static/ico13.png" style="width: 40rpx ;" mode="widthFix"></image>-->
<!-- </view>-->
</view>
</view>
</view>
</view>
<view>
<view style="padding: 30rpx;margin-top:-115rpx;background-color: transparent;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
style="text-align: center;padding: 30rpx;background-color: #FFF;border-radius: 20rpx;box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.1);">
<view @click="tn('/pages/index/pizz_info?id='+userInfo.association_id)">
<view>
<image src="/static/ico5.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view style="margin-top: 10rpx;">
<text>所在商/协会</text>
</view>
</view>
<view @click="tn('/pages/packageA/user/events_my')">
<view>
<image src="/static/ico1.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view style="margin-top: 10rpx;">
<text>参与活动</text>
</view>
</view>
<view @click="tn('/pages/packageA/user/my_desc')">
<view>
<image src="/static/02_2.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view style="margin-top: 10rpx;">
<text>协会服务</text>
</view>
</view>
<view @click="tn('/pages/packageA/user/my_card?id='+userInfo.member_id)">
<view>
<image src="/static/ico6.png" style="width: 50rpx;height: 50rpx;"></image>
</view>
<view style="margin-top: 10rpx;">
<text>我的名片</text>
</view>
</view>
</view>
</view>
<view style="background-color: #fff;padding-bottom: 0rpx;">
<view style="padding:0px 20rpx;">
<tn-list-cell v-if="login" :arrow="true" @click="tn('/pages/packageA/user/my_card_holder')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/icon13.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">名片夹</view>
</view>
</tn-list-cell>
<tn-list-cell v-if="login" :arrow="true" @click="tn('/pages/packageA/user/my_edit')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/icon14.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">信息修改</view>
</view>
</tn-list-cell>
<!-- <tn-list-cell :arrow="true" @click="tn('/pages/index/my_pizz')">-->
<!-- <view class="tn-flex tn-flex-center tn-flex-col-center">-->
<!-- <image src="/static/ico7.png" style="width: 50rpx;height: 50rpx"></image>-->
<!-- <view style="margin-left: 20rpx;">所在商/协会</view>-->
<!-- </view>-->
<!-- </tn-list-cell>-->
<tn-list-cell :arrow="true" v-if="userInfo.if_xianshi!=1 || !login"
@click="tn_ru('/pages/packageA/user/apply_in?association_id='+loginData.association_id)">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico8.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">入会申请</view>
</view>
</tn-list-cell>
<tn-list-cell :arrow="true" @click="tn('/pages/packageA/user/my_msg')">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="position: relative;">
<image src="/static/ico9.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">我的消息</view>
<tn-badge v-if="msg()>0" style="position: absolute;right: 40rpx;" backgroundColor="#E83A30"
fontColor="#ffffff">{{msg()}}</tn-badge>
</view>
</tn-list-cell>
<tn-list-cell v-if="login" :arrow="true" @click="tn('/pages/packageA/user/my_invite')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico10.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">邀请入会</view>
</view>
</tn-list-cell>
<!-- <tn-list-cell :arrow="true" @click="tn('/pages/index/my_assist')">-->
<!-- <view class="tn-flex tn-flex-center tn-flex-col-center">-->
<!-- <image src="/static/ico10.png" style="width: 50rpx;height: 50rpx"></image>-->
<!-- <view style="margin-left: 20rpx;">常见问题</view>-->
<!-- </view>-->
<!-- </tn-list-cell>-->
<tn-list-cell v-if="userInfo.shenhe==1&&login" :arrow="true"
@click="tn('/pages/packageA/user/user_auditing')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/icon15.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">内容审核</view>
</view>
</tn-list-cell>
<tn-list-cell v-if="userInfo.shenhe==1&&login" :arrow="true"
@click="tn('/pages/packageA/user/user_activity')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico16.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">发布活动</view>
</view>
</tn-list-cell>
<tn-list-cell :arrow="true" @click="tn('/pages/packageA/user/my_idea')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico12.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">意见反馈</view>
</view>
</tn-list-cell>
<tn-list-cell :arrow="true" @click="tn('/pages/packageA/user/my_invoice')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico12.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">发票申请</view>
</view>
</tn-list-cell>
<!-- <tn-list-cell v-if="userInfo.if_business==1" :arrow="true"
@click="tn('/pages/packageA/user/my_vip')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico12.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">会员卡</view>
</view>
</tn-list-cell> -->
<!-- <tn-list-cell v-if="userInfo.business==1" :arrow="true"
@click="tn('/pages/packageA/user/my_vip_clerk')">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico12.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">店员管理</view>
</view>
</tn-list-cell> -->
<tn-list-cell :arrow="true" @click="loginAut">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<image src="/static/ico11.png" style="width: 50rpx;height: 50rpx"></image>
<view style="margin-left: 20rpx;">退出帐号</view>
</view>
</tn-list-cell>
</view>
</view>
</view>
<tn-popup v-model="loginMod" mode="bottom" :safeAreaInsetBottom="true">
<view class="custom-modal-content">
<view style="font-size: 30rpx;padding: 30rpx 30rpx 0rpx 30rpx;font-weight: 600;letter-spacing: 2rpx">
会员登陆</view>
<view class="text" style="padding: 40rpx;">
<tn-form ref="form" :labelWidth="120">
<tn-form-item prop="phone">
<tn-input placeholder="手机号" :customStyle="{width: '660rpx'}" v-model="loginData.phone" />
</tn-form-item>
<view style="height: 20rpx;"></view>
<tn-form-item prop="password">
<tn-input placeholder="密码" :customStyle="{width: '660rpx'}" :passwordIcon="false"
v-model="loginData.password" type="password" />
</tn-form-item>
<tn-form-item prop="code">
<tn-input v-model="code" :customStyle="{width: '400rpx'}" type="text"
placeholder="请输入验证码"></tn-input>
<view style="margin-left: 20rpx;">
<view style="font-size: 34rpx;color: #181818;font-weight: bold;">
{{login ? userInfo.nikename:'' }}
<view slot="right">
<view @click="getcheckCode"
style="letter-spacing: 2px; font-size: 42rpx; background-color: antiquewhite; padding: 5rpx 15rpx;">
<text v-for="(item,index) in identifyCode" :style="{color:colors[index]}">
{{ item }}
</text>
</view>
<tn-button v-if="!login" open-type="getPhoneNumber"
@getphonenumber="PhoneLogin">点击登陆</tn-button>
</view>
</tn-form-item>
</tn-form>
<view style="text-align: center;margin-top: 50rpx;">
<!-- <tn-button backgroundColor="#E6E6E6" fontColor="#ffffff"
@click="loginMod = false">取消</tn-button> -->
<tn-button style="border-radius: 0px;" height="80rpx" backgroundColor="#EEF0F2" width="100%"
fontColor="#000000" @click="submitLogin">确定</tn-button>
<view v-if="userInfo.if_xianshi==3 && login" style="color: #E83A30;">
<text>会费未缴纳</text>
</view>
</view>
</view>
<view style="margin-top: 30rpx;">
<view style="background-color: #ffffff;padding: 30rpx 0rpx;border-radius: 20rpx;">
<tn-grid align="center" :col="col">
<tn-grid-item style="width: 25%" @click="tn('/pages/packageA/user/my_add')">
<view>
<image class="no-img" src="/static/ico1.png" style="width: 150rpx;"
mode="widthFix"></image>
</view>
<view style="margin-top: -20rpx;font-size: 30rpx;font-weight: 500;">
我的发布
</view>
</tn-grid-item>
<tn-grid-item style="width: 25%" @click="tn('/pages/packageA/user/events_my')">
<view>
<image class="no-img" src="/static/ico2.png" style="width: 150rpx;"
mode="widthFix"></image>
</view>
<view style="margin-top: -20rpx;font-size: 30rpx;font-weight: 500;">
我的活动
</view>
</tn-grid-item>
<tn-grid-item style="width: 25%" @click="tn('/pages/packageA/user/my_collection')">
<view>
<image class="no-img" src="/static/ico3.png" style="width: 150rpx;"
mode="widthFix"></image>
</view>
<view style="margin-top: -20rpx;font-size: 30rpx;font-weight: 500;">
我的收藏
</view>
</tn-grid-item>
<tn-grid-item style="width: 25%"
@click="tn('/pages/packageA/user/apply_in?association_id=1')">
<view>
<image class="no-img" src="/static/ico4.png" style="width: 150rpx;"
mode="widthFix"></image>
</view>
<view style="margin-top: -20rpx;font-size: 30rpx;font-weight: 500;">
入会申请
</view>
</tn-grid-item>
</tn-grid>
</view>
</view>
<view style="margin-top: 30rpx;">
<view style="background-color: #ffffff;border-radius: 20rpx;padding: 20rpx;">
<tn-list-view>
<tn-list-cell padding="35rpx 30rpx" @click="tn('/pages/packageA/user/sign_in')"
fontColor="#181818" fontSize="30rpx" :arrow="true">每日签到</tn-list-cell>
<tn-list-cell padding="35rpx 30rpx" @click="tn('/pages/packageA/user/sign_details')"
fontColor="#181818" fontSize="30rpx" :arrow="true">积分明细</tn-list-cell>
<tn-list-cell padding="35rpx 30rpx" @click="tn('/pages/packageA/user/my_msg')"
fontColor="#181818" fontSize="30rpx" :arrow="true">站内信</tn-list-cell>
<!-- <tn-list-cell padding="35rpx 30rpx" @click="tn('/pages/packageA/user/my_card_holder')"
fontColor="#181818" fontSize="30rpx" :arrow="true">好友申请</tn-list-cell> -->
<tn-list-cell padding="35rpx 30rpx" @click="tn('/pages/packageA/user/my_invoice')"
fontColor="#181818" fontSize="30rpx" :arrow="true">发票开取</tn-list-cell>
<tn-list-cell padding="35rpx 30rpx" @click="tn('/pages/packageA/user/my_invite')"
fontColor="#181818" fontSize="30rpx" :arrow="true">邀请会员</tn-list-cell>
<tn-list-cell padding="35rpx 30rpx" @click="tn('/pages/packageC/info/certificate')"
fontColor="#181818" fontSize="30rpx" :arrow="true">我的证书</tn-list-cell>
<!-- <tn-list-cell padding="35rpx 30rpx" fontColor="#181818" fontSize="30rpx"
:arrow="true">数据资料导出</tn-list-cell> -->
<tn-list-cell v-if="login" @click="loginAut" padding="35rpx 30rpx" fontColor="#181818"
fontSize="30rpx" :arrow="true" :unlined="true">退出账号</tn-list-cell>
</tn-list-view>
</view>
</view>
<view style="text-align: center;font-size: 12px;;color: #CCCCCC;padding: 50rpx;">V{{vuex_version}}
</view>
</view>
</view>
<view style="height: 120rpx;"></view>
</tn-popup>
<view @click="callPhone"
style="text-align: center;padding-bottom: 100rpx;font-size: 24rpx;color: rgba(153,153,153,0.5);letter-spacing: 2rpx;padding-top: 40rpx;">
<view>技术支持洛阳灵睿网络</view>
<view>电话15503791530</view>
</view>
<tn-modal v-model="HfModal.show" :title="HfModal.title" :content="HfModal.content" :button="HfModal.button"
@click="HfModalClick"></tn-modal>
<tn-modal v-model="userEditModal.show" :maskCloseable="false" :title="userEditModal.title"
:content="userEditModal.content" :button="userEditModal.button" @click="userEditModalClick"></tn-modal>
</view>
</template>
@ -228,6 +128,26 @@
export default {
data() {
return {
HfModal: {
show: false,
title: '系统提醒',
content: '您的会费未缴纳,请及时缴纳!',
button: [{
text: '确定',
backgroundColor: '#3056D3',
fontColor: '#FFFFFF'
}]
},
userEditModal: {
show: false,
title: '系统提醒',
content: '您的会员信息不完整,请补充信息!',
button: [{
text: '确定',
backgroundColor: '#3056D3',
fontColor: '#FFFFFF'
}]
},
topCurrent: 0,
login: false,
loginMod: false,
@ -246,21 +166,38 @@
}
},
mounted() {
var uid = uni.getStorageSync('uid');
this.uid = uid;
if (uid) {
this.getUserInfo();
}
this.getcheckCode();
//this.getcheckCode();
},
onShow() {
console.log('show');
},
methods: {
HfModalClick(d) {
console.log(d);
this.HfModal.show = false;
},
onload() {
var quit = uni.getStorageSync('quit');
if (quit == 0) {
var uid = uni.getStorageSync('uid');
this.uid = uid;
if (uid) {
this.getUserInfo();
}
}
},
PhoneLogin(d) {
console.log(d);
var openid = uni.getStorageSync('openid');
var recommendation_id_val = uni.getStorageSync('recommendation_id');
if (!recommendation_id_val) {
recommendation_id_val = '';
}
wxphoneLogin({
code: d.code,
openid: openid
openid: openid,
recommendation_id: recommendation_id_val
})
.then(res => {
console.log(res);
@ -270,9 +207,17 @@
icon: 'none',
duration: 2000
});
uni.setStorageSync('quit', 0);
uni.setStorageSync('uid', res.data.id);
uni.setStorageSync('openid', res.data.openid);
uni.setStorageSync('userInfo', res.data);
this.userInfo = res.data;
if (res.data.if_xianshi == 3) {
this.HfModal.show = true;
}
if (res.data.if_xianshi == 1) {
this.userEditModal.show = true;
}
this.login = true;
this.loginMod = false;
} else {
@ -320,7 +265,18 @@
console.log(res);
if (res.code == 1) {
this.userInfo = res.data;
console.log(res.data.if_xianshi == 3);
if (res.data.if_xianshi == 3) {
this.HfModal.show = true;
}
if (res.data.if_xianshi == 1) {
if (res.data.dimension == '' || res.data.longitude == '' || res.data.dimension ==
null || res.data.longitude == null) {
this.userEditModal.show = true;
}
}
this.login = true;
uni.setStorageSync('userInfo', res.data);
}
})
.catch(error => {
@ -396,7 +352,11 @@
content: '确定要退出吗?',
success: function(res) {
if (res.confirm) {
uni.setStorageSync('quit', 1);
uni.removeStorageSync('birthDay');
uni.removeStorageSync('uid');
//uni.removeStorageSync('openid');
uni.removeStorageSync('userInfo');
that.login = false;
that.loginData.openid = '';
that.loginData.phone = '';
@ -413,6 +373,12 @@
url: e
})
},
userEditModalClick() {
this.userEditModal.show = false;
uni.navigateTo({
url: '/pages/packageB/event/user_area'
})
},
tn(e) {
var uid = uni.getStorageSync('uid');
console.log(this.userInfo);
@ -424,7 +390,7 @@
});
return;
}
if (this.userInfo.if_member == 2) {
if (this.userInfo.if_xianshi != 1) {
if (e == '/pages/packageA/user/my_edit') {
uni.showToast({
title: '请入会后查看',
@ -433,6 +399,30 @@
});
return;
}
if (e.includes("/pages/index/pizz_info")) {
uni.showToast({
title: '请入会后查看',
icon: 'none',
duration: 2000
});
return;
}
if (e.includes("/pages/packageA/user/my_invoice")) {
uni.showToast({
title: '请入会后查看',
icon: 'none',
duration: 2000
});
return;
}
if (e.includes("/pages/packageC/info/certificate")) {
uni.showToast({
title: '请入会后查看',
icon: 'none',
duration: 2000
});
return;
}
if (e.includes("/pages/packageA/user/my_invite")) {
uni.showToast({
title: '请入会后查看',
@ -441,12 +431,10 @@
});
return;
}
if (e.includes("/pages/index/pizz_info")) {
uni.showToast({
title: '请入会后查看',
icon: 'none',
duration: 2000
});
if (e.includes("/pages/packageA/user/my_card_holder")) {
uni.navigateTo({
url: e
})
return;
}
if (e.includes("/pages/packageA/user/my_card")) {
@ -466,7 +454,7 @@
}
</script>
<style>
<style scoped>
.my_input view {
width: 100% !important;
}

275
pages/index/user_map.vue Normal file
View File

@ -0,0 +1,275 @@
<template>
<view style="background-color: #ffffff;letter-spacing: 1rpx;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'会员地图'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}"></view>
<view style="background-color: #FFF;z-index: 200;">
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin">
<view class="justify-content-item align-content-item" style="width: 100%;position: relative;">
<view class="tn-flex tn-flex-col-center"
style="border-radius: 100rpx;padding: 15rpx;width: 100%;background-color:#F1F2F8;">
<text style="color: #BABDC7;"
class="tn-icon-search justify-content-item tn-padding-right-xs tn-text-lg"></text>
<input v-model="serach_content" class="justify-content-item" placeholder="会员姓名/手机号" name="input"
placeholder-style="color:#BABDC7" style="width: 100%;padding-right: 200rpx;"></input>
</view>
<view style="position: absolute;right: 6rpx;top: 6rpx">
<tn-button backgroundColor="#3056D3" shape="round" padding="10rpx 10rpx" width="150rpx"
@click="serach()" height="60rpx">
<text style="color:#ffffff;font-weight: bold;">{{serach_do?'重 置':'搜 索'}}</text>
</tn-button>
</view>
</view>
</view>
</view>
<view>
<view @click="coversShow = true" style="position: fixed;top: 50%;right: 30rpx;z-index: 1;">
<image src="/static/map.png" style="width: 80rpx;height: 80rpx;"></image>
</view>
<map @markertap="openMark" :style="{width: '100%',height: my_page+'px'}" :scale="5" :latitude="34.75"
:longitude="113.66" :markers="covers">
</map>
<tn-popup v-model="coversShow" mode="bottom" :mask="false" height="50%" :borderRadius="10">
<scroll-view>
<view v-for="item in covers" style="padding:20rpx 30rpx;">
<view @click="tn('/pages/packageA/user/my_card?id='+item.id)"
class="tn-classify__content__sub-classify__content__item tn-flex tn-flex-center tn-flex-col-center">
<view style="width: 100rpx;height: 100rpx">
<image v-if="item.company_image!=''&&item.company_image!=null"
:src="apiImgUrl+item.company_image"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
<image v-if="item.company_image==''||item.company_image==null" src="/static/def.png"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;">
<view style="font-size: 28rpx;font-weight: 600;">
<text>{{item.nikename}}</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 24rpx;margin-top: 10rpx;color: #888888;">
<text>{{item.title==null?'':item.title}}</text>
</view>
</view>
</view>
</view>
</scroll-view>
</tn-popup>
</view>
</view>
</template>
<script>
import {
latitudeAndLongitude
} from '@/util/api.js';
import store from "@/store";
export default {
data() {
return {
apiImgUrl: this.$store.state.imgUrl,
my_page: 0,
covers: [],
coversShow: false,
serach_content: '',
}
},
onLoad() {
this.getLatitudeAndLongitude();
const key = uni.getSystemInfoSync();
const kk = uni.getWindowInfo();
var c = this.sizeDeal(120);
var s = this.sizeDeal(0);
this.my_page = parseInt(key.windowHeight) - parseInt(store.state.vuex_custom_bar_height) - parseInt(s) -
parseInt(c);
},
methods: {
openMark(d) {
console.log(d);
},
serach() {
this.coversShow = true;
this.covers = [];
this.getLatitudeAndLongitude();
},
getLatitudeAndLongitude() {
latitudeAndLongitude({
nikename: this.serach_content,
enterprise_name: this.serach_content
})
.then(res => {
console.log(res);
var list = res.data;
const transformedSelectList = list.map(item => ({
latitude: parseFloat(item.dimension),
longitude: parseFloat(item.longitude),
id: item.id,
iconPath: '/static/make.png',
width: 30,
height: 30,
title: item.enterprise_name,
company_image: item.company_image,
nikename: item.nikename,
}));
console.log(transformedSelectList);
this.covers = transformedSelectList;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
tn(url) {
uni.navigateTo({
url: url
})
},
sizeDeal(size) {
// 使uni.upx2px
const pxValue = uni.upx2px(size);
return pxValue;
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
}
}
}
</script>
<style lang="scss" scoped>
/* 自定义导航栏内容 start */
.custom-nav {
height: 100%;
&__back {
margin: auto 30rpx;
margin-right: 10rpx;
flex-basis: 5%;
width: 100rpx;
position: absolute;
}
}
.left-width {
flex-basis: 28%;
}
/* 自定义导航栏内容 end */
.tn-classify {
/* 搜索栏 start */
/* 搜索栏 end */
/* 分类列表和内容 strat */
&__container {}
&__left-box {}
&__right-box {
background-color: #F1F2F8;
}
/* 分类列表和内容 end */
/* 侧边导航 start */
&__tabbar {
&__item {
&:first-child {
border-top-right-radius: 0rpx;
}
&:last-child {
border-bottom-right-radius: 0rpx;
}
&--active {
background-color: #F1F2F8;
position: relative;
font-weight: bold;
color: #3056D3;
&--prev {
border-bottom-right-radius: 26rpx;
}
&--next {
border-top-right-radius: 26rpx;
}
}
}
}
/* 侧边导航 end */
/* 分类内容 start */
&__content {
margin: 18rpx;
/* 推荐商品 start */
&__recomm {
margin-bottom: 40rpx;
&__swiper {}
}
/* 推荐商品 end */
/* 子栏目 start */
&__sub-classify {
margin-bottom: 20rpx;
padding-bottom: 40rpx;
&--title {
font-weight: bold;
margin-bottom: 18rpx;
}
&__content {
&__item {
padding: 20rpx;
background-color: #FFFFFF;
}
}
}
/* 子栏目 end */
}
/* 分类内容 end */
}
.tn-bg-my-ccc {
background-color: #F1F2F8;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +1,46 @@
<template>
<view style="letter-spacing: 1rpx;">
<view style="background-color: #F1F2F8;letter-spacing: 1rpx;min-height: 100vh;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'我参与的活动'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
<text>我的活动</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding:10px 30rpx;">
<view v-for="(item,index) in list" class="tn-flex tn-flex-row-between"
@click="openUrl('/pages/index/event_info?id='+item.activity_id)"
style="background-color: #ffffff;padding: 20rpx;border-radius: 10rpx;margin-bottom: 30rpx;box-shadow: rgba(12, 0, 5, 0.1) 0px 0px 5px 0px;">
<view style="position:relative;">
<view class="tn-text-ellipsis-2" style="font-size: 28rpx;">{{item.activity_name}}</view>
<view class="tn-flex tn-flex-row-between"
style="position: absolute;bottom: 0rpx;width:420rpx;color: #808080;">
<view style="font-size: 24rpx;padding-top: 8rpx;">{{item.application_time}}</view>
<view style="margin-left: 10rpx">
<tn-button v-if="item.type=='未开始'" padding="0px" width="100rpx" height="40rpx" size="sm"
backgroundColor="#6BC7F0 " fontColor="tn-color-white">未开始</tn-button>
<tn-button v-if="item.type=='进行中'" padding="0px" width="100rpx" height="40rpx" size="sm"
backgroundColor="#EE9556 " fontColor="tn-color-white">进行中</tn-button>
<tn-button v-if="item.type=='已结束'" padding="0px" width="100rpx" height="40rpx" size="sm"
backgroundColor="#E12B33 " fontColor="tn-color-white">已结束</tn-button>
<view style="padding: 30rpx;">
<view v-for="(item,index) in list"
style="background-color: #FFF;border-radius: 20rpx;margin-bottom: 20rpx;">
<view style="padding: 20rpx">
<view>
<view @click="openUrl('/pages/packageB/event/event_info?id='+item.id)"
style="background-color: #FFF;border-radius: 20rpx;">
<view class="tn-flex tn-flex-row-between"
style="padding:20rpx 20rpx 10rpx 10rpx;position: relative;">
<view style="margin-left: 10rpx;">
<image :src="apiImgUrl+item.activity_image" mode="aspectFill"
style="width: 250rpx;height: 180rpx;border-radius: 20rpx;"></image>
</view>
<view style="margin-left: 20rpx;width: 54%;">
<view class="tn-text-ellipsis-2" style="font-size: 32rpx;font-weight: bold;">
{{item.activity_name}}
</view>
<view style="font-size: 24rpx;margin: 20rpx 0rpx;color: #888888;">
<text class="tn-icon-time"></text>
<text>{{item.activity_start_time}}-{{item.activity_end_time}}</text>
</view>
<view class="tn-text-ellipsis" style="font-size:26rpx;color: #888888;">
<text class="tn-icon-location" style="vertical-align: middle;"></text>
<text style="vertical-align: middle;">{{item.activity_location}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="margin-left: 20rpx;">
<image :src="apiImgUrl+item.activity_image"
style="width: 200rpx;height: 135rpx;border-radius: 10rpx;">
</image>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1,260 @@
<template>
<view style="background: #F1F2F8;min-height: 100vh;" v-cloak>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>我的发布</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="padding-bottom: 10rpx;">
<view style="background-color: #FFFFFF;">
<tn-tabs :list="tab_list" :current="current" :isScroll="false" name="name" activeColor="#000000"
inactiveColor="#E6E6E6" :barWidth="25" @change="change"></tn-tabs>
</view>
<view style="padding: 30rpx;">
<view style="background-color: #FFFFFF;border-radius: 20rpx;">
<view v-for="(item,index) in list">
<view v-if="current==1"
style="padding-left: 20rpx;border-radius: 20rpx 20rpx 0rpx 0rpx;color: #FF6D66;background: rgba(255,109,102,0.1);height: 100rpx;line-height: 100rpx">
拒绝原因{{item.remark}}</view>
<view style="padding:30rpx;">
<view class="tn-text-ellipsis-2" @click="tn('/pages/packageB/paper/paper_info?id='+item.id)"
style="font-size: 32rpx;font-weight: bold;margin-top: 20rpx;">
{{item.title}}
</view>
<view class="tn-text-ellipsis-2" style="font-size: 28rpx;color: #666666;margin-top: 20rpx;"
@click="tn('/pages/packageB/paper/paper_info?id='+item.id)">
{{item.content}}
</view>
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
style="margin-top: 20rpx;">
<view style="color: #AAAAAA;font-size: 24rpx;">
发布于:{{item.createtime}}
</view>
</view>
<view v-if="item.files.length>0" style="margin-top: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-wrap">
<view class="tn-flex-basic-xs" v-for="(img,img_i) in item.files"
style="text-align: center;">
<view style="padding-right: 10rpx;">
<image :src="apiImgUrl+img" @click="openImg(item,img_i)" mode="aspectFill"
style="width: 200rpx;height: 200rpx;border-radius:20rpx;">
</image>
</view>
</view>
</view>
</view>
<!-- <view style="margin-top: 30rpx;padding:30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="text-align: center;font-size: 28rpx;">
<text class="tn-icon-send" style="font-size: 32rpx;"></text>
<text style="margin-left: 10rpx;">分享</text>
</view>
<view style="text-align: center;font-size: 28rpx;">
<text v-if="item.is_like==1" class="tn-icon-praise-fill tn-color-red"
style="font-size: 32rpx;"></text>
<text v-if="item.is_like==0" class="tn-icon-praise"
style="font-size: 32rpx;"></text>
<text style="margin-left: 10rpx;">{{item.like_num>0?item.like_num:'点赞'}}</text>
</view>
<view style="text-align: center;font-size: 28rpx;">
<text v-if="item.is_fav==1" class="tn-icon-star-fill tn-color-orangeyellow"
style="font-size: 32rpx;"></text>
<text v-if="item.is_fav==0" class="tn-icon-star"
style="font-size: 32rpx;"></text>
<text style="margin-left: 10rpx;">{{item.fav_num>0?item.fav_num:'收藏'}}</text>
</view>
<view style="text-align: center;font-size: 28rpx;">
<text class="tn-icon-comment" style="font-size: 32rpx;"></text>
<text style="margin-left: 10rpx;">评论</text>
</view>
</view>
</view> -->
<view @click="del(item)" style="text-align: right;font-size: 24rpx;color: #AAAAAA">删除
</view>
</view>
<view v-if="index<list.length-1" style="height: 1px;border-top: #BABDC7 1px dashed;"></view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
tweetsList,
tweetsDel
} from '@/util/api.js';
import store from '@/store/index.js'
export default {
data() {
return {
list: [],
apiImgUrl: this.$store.state.imgUrl,
current: 0,
type:2,
tab_list: [{
name: '发布成功',
type:2
},{
name: '审核中',
type:1,
}, {
name: '发布失败',
type:3,
}],
page: 1,
}
},
mounted() {
this.getTweetsList();
},
methods: {
del(item) {
var that = this;
uni.showModal({
title: '提示',
content: '确定要删除吗?',
success: function(res) {
if (res.confirm) {
that.delShow(item);
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
delShow(item) {
tweetsDel({
id: item.id
})
.then(res => {
console.log(res);
if (res.code == 1) {
uni.showToast({
title: '删除成功!',
icon: 'none',
duration: 2000
});
this.page = 1;
this.list = [];
this.getTweetsList();
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
change(index) {
this.current = index;
this.type=this.tab_list[this.current].type;
this.page = 1;
this.list = [];
this.getTweetsList();
},
openImg(item, index) {
console.log(index);
console.log(item.files);
var img = item.files;
var apiImgUrl = this.apiImgUrl;
const updatedImagePaths = img.map(path => `${apiImgUrl}${path}`);
console.log(updatedImagePaths);
uni.previewImage({
current: index,
urls: updatedImagePaths,
});
},
switchTabbar(d) {
console.log(d);
store.commit('$tStore', {
name: 'Gid',
value: d.id
})
uni.setStorageSync('Gid', d.id);
uni.$emit('getGid', {
gid: d.id
})
uni.$emit('depId', {
index: 0
})
},
onsubmit() {
this.page = 1;
this.list = [];
this.getAssociationIndex();
},
getTweetsList() {
tweetsList({
me: 1,
association_name: 1,
page: this.page,
state: this.type,
size: 10
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.list.push(...res.data);
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
tn(e) {
uni.navigateTo({
url: e
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
}
}
}
</script>
<style>
.triangle {
width: 0;
height: 0;
border-top: 20rpx solid #13C296;
border-right: 20rpx solid transparent;
border-left: 20rpx solid transparent;
position: absolute;
left: 0;
right: 0;
margin: 0 auto;
bottom: -12rpx;
z-index: 100;
}
</style>

View File

@ -1,17 +1,151 @@
<template>
<view class="page-c">
<tn-nav-bar :isBack="false" backTitle="" :alpha="true" :bottomShadow="false">
<view
style="background: linear-gradient( 180deg, #3056D3 0%, #F1F2F8 25%);background-repeat: no-repeat;height: 100vh;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="transparent">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;color: #ffffff"></text>
<text class="tn-icon-left" style="font-size: 40rpx;color: #ffffff;"></text>
</view>
<view class="tn-margin-top" @click="goBack()">
<tn-tabs :list="[{name:'会员名片'}]" :current="topCurrent" activeColor="#ffffff" :bold="false"
:fontSize="24"></tn-tabs>
<view style="width: 83%;font-weight: bold;color: #ffffff;">
<text>会员名片</text>
</view>
</view>
</tn-nav-bar>
<view style="height: 550rpx;">
<view :style="{paddingTop: vuex_custom_bar_height +10+ 'px'}">
<view style="padding: 30rpx;padding-bottom: 180rpx;">
<view
style="background: #FFFFFF;box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(175,189,236,0.5);border-radius: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="padding: 30rpx;">
<view>
<image v-if="userThisInfo.photo_image!=null&&userThisInfo.photo_image!=''"
:src="apiImgUrl+userThisInfo.photo_image" mode="aspectFill"
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
<image v-if="userThisInfo.photo_image==null||userThisInfo.photo_image==''"
src="/static/def.png" mode="aspectFill"
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
</view>
<view style="margin-left: 20rpx;">
<view>
<text
style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">{{userThisInfo.nikename}}</text>
<tn-tag size="sm" padding="0px 5px" margin="0 0 0 20rpx" width="auto" shape="radius"
backgroundColor="#82B2FF"
fontColor="#ffffff">{{userThisInfo.position_name==null||userThisInfo.position_name==''?'无':userThisInfo.position_name}}</tn-tag>
<tn-tag size="sm" padding="0px 5px" margin="0 0 0 20rpx" width="auto" shape="radius"
backgroundColor="#13C296"
fontColor="#ffffff">{{userThisInfo.if_tongyi==0?userThisInfo.phone:'***********'}}</tn-tag>
</view>
<view style="color: #666666;font-size: 28rpx;margin-top: 20rpx;">
<text>{{userThisInfo.enterprise_name==null||userThisInfo.enterprise_name==''?'未填写':userThisInfo.enterprise_name}}</text>
<text>{{userThisInfo.unit_position}}</text>
</view>
</view>
</view>
</view>
<view
style="margin-top: 30rpx;background: #FFFFFF;box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(175,189,236,0.5);border-radius: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="padding: 30rpx;">
<view>
<image v-if="userThisInfo.company_image!=''&&userThisInfo.company_image!=null"
:src="apiImgUrl+userThisInfo.company_image" mode="aspectFill"
style="width: 120rpx;height: 120rpx;"></image>
<image src="/static/def.png"
v-if="userThisInfo.company_image==''||userThisInfo.company_image==null"
style="width: 120rpx;height: 120rpx;" mode="aspectFill"></image>
</view>
<view style="margin-left: 20rpx;">
<view>
<text
style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">{{userThisInfo.enterprise_name==null||userThisInfo.enterprise_name==''?'未填写':userThisInfo.enterprise_name}}</text>
</view>
<view style="color: #666666;font-size: 28rpx;margin-top: 10rpx;">
<text class="tn-icon-location" style="vertical-align: middle;"></text>
<text>{{userThisInfo.enterprise_location==null||userThisInfo.enterprise_location==''?'无':userThisInfo.enterprise_location}}</text>
</view>
</view>
</view>
<view style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 10rpx 40rpx;"></view>
<view style="padding: 30rpx;">
<view style="font-size: 34rpx;font-weight: bold;">企业介绍</view>
<view
v-html="userThisInfo.enterprise_Introduction==null||userThisInfo.enterprise_Introduction==''?'无':userThisInfo.enterprise_Introduction"
style="margin-top: 20rpx;"></view>
</view>
<view style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 10rpx 40rpx;"></view>
<view style="padding: 30rpx;">
<view style="font-size: 34rpx;font-weight: bold;">主营业务</view>
<view
v-html="userThisInfo.introdiction==null||userThisInfo.introdiction==''?'无':userThisInfo.introdiction"
style="margin-top: 20rpx;"></view>
</view>
</view>
</view>
<view v-if="uid!=userThisInfo.member_id"
style="position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 40rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-center">
<view
style="line-height: 80rpx;height: 80rpx;text-align: center;width: 40%;;border-radius: 90rpx 0rpx 0rpx 90rpx;background: #FFFFFF;border: 1rpx solid #BABDC7;">
<button open-type="share">
<text class="tn-icon-send"></text>
<text style="margin-left: 10rpx;">分享</text>
</button>
</view>
<view v-if="userThisInfo.if_tongyi!=0" @click="sqMode= true"
style="line-height: 80rpx;height: 80rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius: 0rpx 90rpx 90rpx 0rpx;">
<text>申请查看联系方式</text>
</view>
<view v-if="userThisInfo.if_tongyi==0" @click="addModeShow"
style="line-height: 80rpx;height: 80rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius: 0rpx 90rpx 90rpx 0rpx;">
<text>立刻联系</text>
</view>
</view>
</view>
</view>
<tn-modal v-model="sqMode" :custom="true">
<view>
<view style="text-align: center;color: #181818;font-size: 34rpx;font-weight: bold;">申请联系方式</view>
<view style="color: #777777;font-size: 28rpx;margin-top: 20rpx;">
点击确定按钮将发送联系方式的申请,等待对方同意后方可展示且发送申请时,对方也将看到你的个人名片信息
</view>
<view style="margin-top: 20rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between" style="width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="width: 100%;">
<view>
<image :src="apiImgUrl+userThisInfo.photo_image"
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
</image>
</view>
<view style="margin-left: 10rpx;width: 100%;">
<view style="font-size: 32rpx;color: #181818;font-weight: bold;">
<text style="vertical-align: middle;">{{userThisInfo.nikename}}</text>
<tn-tag size="sm" padding="0px 5px" margin="0 0 0 10rpx" width="auto" shape="radius"
backgroundColor="#F1F2F8"
fontColor="#888888">{{userThisInfo.if_tongyi==0?userThisInfo.phone:'***********'}}
</tn-tag>
</view>
<view class="tn-text-ellipsis"
style="width: 380rpx;font-size: 26rpx;color: #666666;font-weight: 500;margin-top: 10rpx;">
{{userThisInfo.enterprise_name}}
</view>
</view>
</view>
</view>
<view class="tn-flex tn-flex-center tn-flex-row-between" style="margin-top: 40rpx;">
<view>
<tn-button @click="sqMode = false" width="250rpx" :plain="true" shape="round" size="lg"
backgroundColor="#BABDC7" fontColor="#999999">取消
</tn-button>
</view>
<view>
<tn-button @click="add_log" width="250rpx" shape="round" margin="0rpx 0 0 30rpx" size="lg"
backgroundColor="#3056D3" fontColor="#ffffff">确定
</tn-button>
</view>
</view>
</view>
</view>
</tn-modal>
<!-- <view style="height: 550rpx;">
<view style="width: 100%;height: 450rpx;position: absolute;top: 0;">
<image v-if="userThisInfo.background_image==''" src="/static/my.png"
style="width: 100%;height: 450rpx;opacity: 0.8;">
@ -40,9 +174,9 @@
</view>
</view>
</view>
</view>
</view> -->
<view style="padding: 30rpx 30rpx 240rpx 30rpx;">
<!-- <view style="padding: 30rpx 30rpx 240rpx 30rpx;">
<view style="font-size: 30rpx;font-weight: 600;margin-bottom: 20rpx">个人经历</view>
<view style="background-color: #ffffff;border-radius: 15rpx;width: 100%;margin: 0 auto;">
<view style="padding: 20rpx;line-height: 50rpx;">
@ -79,8 +213,8 @@
</view>
</view>
</view>
</view>
<view class="tn-flex" style="width: 100%;position: fixed;bottom: 0;">
</view> -->
<!-- <view class="tn-flex" style="width: 100%;position: fixed;bottom: 0;">
<view style="background: #418ef2;height: 100rpx;text-align: center;line-height: 100rpx;color: #ffffff;"
class="tn-flex-8" @click="addModeShow">
{{userThisInfo.if_tongyi!=0?'申请查看联系方式':'立刻联系'}}
@ -90,8 +224,8 @@
<text class="tn-icon-send-fill" style="color: #418ef2;font-size: 40rpx;"></text>
</tn-button>
</view>
</view>
<view class="bg-tabbar-shadow"></view>
</view> -->
<!-- <view class="bg-tabbar-shadow"></view>
<tn-modal v-model="addMod" :custom="true">
<view class="custom-modal-content">
<view style="text-align: center;font-size: 34rpx;">申请查看</view>
@ -109,8 +243,8 @@
</view>
</view>
</view>
</tn-modal>
<tn-popup v-model="editInfo" mode="right" width="100%">
</tn-modal> -->
<!-- <tn-popup v-model="editInfo" mode="right" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :alpha="true" :bottomShadow="false">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="editInfo = false">
@ -143,7 +277,7 @@
关闭</view>
</view>
</view>
</tn-popup>
</tn-popup> -->
</view>
</template>
@ -157,6 +291,7 @@
export default {
data() {
return {
sqMode: false,
addMod: false,
topCurrent: 0,
uid: 0,
@ -230,6 +365,7 @@
this.callPhone();
return;
}
this.addMod = true;
},
add_log() {
@ -260,6 +396,7 @@
duration: 2000
});
}
this.sqMode = false;
this.addMod = false;
})
.catch(error => {
@ -585,4 +722,27 @@
-webkit-line-clamp: 10;
-webkit-box-orient: vertical;
}
</style>
button::after {
border: none;
}
button {
position: relative;
display: block;
margin-left: auto;
margin-right: auto;
padding-left: 0px;
padding-right: 0px;
box-sizing: border-box;
text-align: center;
text-decoration: none;
line-height: 80rpx;
-webkit-tap-highlight-color: transparent;
overflow: hidden;
background-color: transparent;
font-size: 28rpx;
width: 100%;
height: 100%;
}
</style>

View File

@ -1,67 +1,244 @@
<template>
<view class="template-edit tn-safe-area-inset-bottom">
<!-- 顶部自定义导航 -->
<view style="background: #F1F2F8;min-height: 100vh;" v-cloak>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'名片夹'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
<text>好友验证</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view v-for="(item,index) in list" :key="index" class="wallpaper-shadow tn-margin tn-padding">
<view @click="tn('/pages/packageA/user/my_card?id='+item.id)"
class="tn-classify__content__sub-classify__content__item tn-flex tn-flex-center tn-flex-col-center">
<!-- 标题有需要可以显示出来 -->
<view style="width: 100rpx;height: 100rpx">
<image :src="apiImgUrl+item.photo_image"
style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;">
<view style="font-size: 28rpx;">
<text>{{item.nikename}}</text>
<text style="margin-left: 50rpx;">{{item.phone}}</text>
</view>
<view class="tn-text-ellipsis-2" style="font-size: 24rpx;margin-top: 10rpx;">
<text>{{item.enterprise_name}}</text>
<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 30rpx;">
<view style="background-color: #ffffff;border-radius: 20rpx;padding-bottom: 20rpx;">
<view style="font-size: 34rpx;font-weight: bold;padding:30rpx 0rpx 20rpx 30rpx;">近三天</view>
<view v-for="(item,index) in list">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="padding: 30rpx 20rpx;">
<view style="width: 100rpx;height: 100rpx">
<image src="/static/def.png" style="width: 100rpx;height: 100rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="font-size: 32rpx;color: #181818;font-weight: bold;">
<text style="vertical-align: middle;margin-right: 10rpx;">石训</text>
</view>
<view>
<tn-button @click="textModal= true" padding="20rpx 20rpx"
backgroundColor="rgba(48,86,211,0.1)" size="sm" fontColor="#3056D3"
shape="round">
<text style="font-size: 24rpx;">查看</text>
</tn-button>
</view>
</view>
<view class="tn-text-ellipsis"
style="font-size: 28rpx;margin-top: 10rpx;color: #666666;">
<text>好想你健康食品股份有限公司</text>
</view>
</view>
</view>
<view v-if="index<list.length-1"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 10rpx 40rpx;"></view>
</view>
</view>
</view>
</view>
<view class="tn-tabbar-height"></view>
<!-- <tn-modal v-model="showMode.show" :title="showMode.title" :content="showMode.content" :button="showMode.button"
@click="modeClick"></tn-modal> -->
<tn-modal v-model="textModal" :custom="true">
<view>
<view style="text-align: center;color: #181818;font-size: 34rpx;font-weight: bold;">系统消息</view>
<view style="color: #777777;font-size: 28rpx;margin-top: 20rpx;">
对方向您申请了联系方式的查看,需等待您同意后方可展示
</view>
<view style="margin-top: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between" style="width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="width: 100%;">
<view>
<image src="/static/def.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;">
</image>
</view>
<view style="margin-left: 10rpx;width: 100%;">
<view style="font-size: 32rpx;color: #181818;font-weight: bold;">
<text style="vertical-align: middle;">石训</text>
<tn-tag size="sm" padding="0px 5px" margin="0 0 0 10rpx" width="auto" shape="radius"
backgroundColor="#F1F2F8" fontColor="#888888">135********</tn-tag>
</view>
<view class="tn-text-ellipsis"
style="width: 380rpx;font-size: 26rpx;color: #666666;font-weight: 500;margin-top: 10rpx;">
好想你健康食品股份有限公司
</view>
</view>
</view>
</view>
<view class="tn-flex tn-flex-center tn-flex-row-between" style="margin-top: 40rpx;">
<view>
<tn-button @click="sqMode = false" width="250rpx" :plain="true" shape="round" size="lg"
backgroundColor="#BABDC7" fontColor="#999999">取消</tn-button>
</view>
<view>
<tn-button width="250rpx" shape="round" margin="0rpx 0 0 30rpx" size="lg"
backgroundColor="#3056D3" fontColor="#ffffff">确定</tn-button>
</view>
</view>
</view>
</view>
</tn-modal>
</view>
</template>
<script>
import {
businessCard
MaillogIndex,
MaillogUpdate,
MaillogUpdateState
} from "@/util/api";
import store from "@/store";
export default {
name: 'Message',
data() {
return {
textModal: false,
uid: 0,
apiImgUrl: this.$store.state.imgUrl,
list: []
page: 1,
size: 10,
list: [],
id: 0,
if_tongyi: 0,
}
},
onLoad() {
var uid = uni.getStorageSync('uid');
this.uid = uid;
this.getBusinessCard();
this.getMaillogIndex();
},
onReachBottom() {
this.page = this.page + 1;
this.getMaillogIndex();
},
methods: {
all_upadte_do() {
MaillogUpdateState({
member_b_id: this.uid
})
.then(res => {
console.log(res);
if (res.code == 1) {
store.state.msgCount = 0;
uni.showToast({
title: '操作成功!',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
this.showMode.show = false;
this.page = 1;
this.list = [];
this.getMaillogIndex();
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
all_upadte() {
this.showMode.show = true;
this.showMode.content = '确定修改为全部已读吗?';
this.showMode.title = '操作提示';
this.showMode.key = 2;
},
updateType(type, id) {
this.showMode.show = true;
this.showMode.content = type == 0 ? '确定要通过申请吗?' : '确定要拒绝申请吗?';
this.showMode.title = '操作提示';
this.showMode.key = 1;
this.id = id;
this.if_tongyi = type;
},
setMaillogUpdate() {
MaillogUpdate({
id: this.id,
if_tongyi: this.if_tongyi,
state: 1, //
})
.then(res => {
console.log(res);
if (res.code == 1) {
uni.showToast({
title: '操作成功!',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
this.showMode.show = false;
this.page = 1;
this.list = [];
this.getMaillogIndex();
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getMaillogIndex() {
MaillogIndex({
member_b_id: this.uid,
page: this.page,
size: this.size,
})
.then(res => {
console.log(res.data.length);
this.list.push(...res.data);
if (res.data.length == 0 || this.list.length < 5) {
this.loadingIn = 'nomore';
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
modeClick(i) {
if (i.index == 0) {
this.showMode.show = false;
}
if (this.showMode.key == 1 && i.index == 1) {
this.setMaillogUpdate();
}
if (this.showMode.key == 2 && i.index == 1) {
this.all_upadte_do();
}
},
//
tn(e) {
uni.navigateTo({
url: e
})
url: e,
});
},
goBack() {
if (getCurrentPages().length > 1) {
@ -73,26 +250,93 @@
}
},
getBusinessCard() {
businessCard({
member_id: this.uid
})
.then(res => {
console.log(res);
this.list = res.data;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
}
}
</script>
<style>
<style lang="scss" scoped>
.message {
max-height: 100vh;
}
</style>
/* 自定义导航栏内容 end */
/* 底部安全边距 start*/
.tn-tabbar-height {
min-height: 20rpx;
height: calc(40rpx + env(safe-area-inset-bottom) / 2);
height: calc(40rpx + constant(safe-area-inset-bottom));
}
.tn-color-wallpaper {
color: #1D2541;
}
/* 页面阴影 start*/
.wallpaper-shadow {
border-radius: 15rpx;
box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
}
/* 图标容器15 start */
.icon15 {
&__item {
width: 30%;
background-color: #FFFFFF;
border-radius: 10rpx;
padding: 30rpx;
margin: 20rpx 10rpx;
transform: scale(1);
transition: transform 0.3s linear;
transform-origin: center center;
&--icon {
width: 105rpx;
height: 105rpx;
font-size: 60rpx;
border-radius: 50%;
margin-bottom: 18rpx;
position: relative;
z-index: 1;
&::after {
content: " ";
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
left: 0;
bottom: 0;
border-radius: inherit;
opacity: 1;
transform: scale(1, 1);
background-size: 100% 100%;
}
}
}
}
/* 用户头像 start */
.logo-image {
width: 100rpx;
height: 100rpx;
position: relative;
}
.logo-pic {
background-size: cover;
background-repeat: no-repeat;
// background-attachment:fixed;
background-position: top;
border: 1rpx solid rgba(255, 255, 255, 0.05);
box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.05);
border-radius: 50%;
overflow: hidden;
// background-color: #FFFFFF;
}
</style>

View File

@ -0,0 +1,148 @@
<template>
<view style="background-color: #F1F2F8;letter-spacing: 1rpx;min-height: 100vh;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>我的收藏</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="background-color: #FFFFFF;">
<tn-tabs :list="tab_list" :current="current" :isScroll="false" name="name" activeColor="#000000"
inactiveColor="#999999" :barWidth="25" @change="change"></tn-tabs>
</view>
<view style="padding: 30rpx;">
<view v-for="(item,index) in list"
style="background-color: #FFF;border-radius: 20rpx;margin-bottom: 20rpx;">
<view style="padding: 20rpx">
<view>
<view
@click="openUrl(current==0?'/pages/packageB/event/event_info?id='+item.id:'/pages/packageB/paper/paper_info?id='+item.id)"
style="background-color: #FFF;border-radius: 20rpx;">
<view class="tn-flex" style="position: relative;">
<view style="margin-left: 10rpx;" v-if="item.cover!=''">
<image :src="apiImgUrl+item.cover" mode="aspectFill"
style="width: 250rpx;height: 180rpx;border-radius: 10rpx;"></image>
</view>
<view style="margin-left: 20rpx;">
<view class="tn-text-ellipsis-2" style="font-size: 32rpx;font-weight: bold;">
{{item.title}}
</view>
<view class="tn-text-ellipsis-2" style="font-size: 24rpx;margin-top: 20rpx;">
{{item.content}}
</view>
<view style="font-size: 24rpx;margin-top: 20rpx;color: #999999;">
{{item.time}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
associationInfo,
favsIndex,
} from "@/util/api";
import store from "@/store";
export default {
data() {
return {
current: 0,
tab_list: [{
type: 'article',
name: '活动'
}, {
type: 'tweets',
name: '动态'
}],
list: [],
page: 1,
apiImgUrl: this.$store.state.imgUrl
}
},
onLoad() {
this.getList();
},
methods: {
change(d) {
this.page = 1;
this.list = [];
this.current = d;
this.getList();
},
getList() {
var uid = uni.getStorageSync('uid');
var nw_type = this.tab_list[this.current].type;
favsIndex({
association_id: 1,
page: this.page,
size: 10,
type: nw_type
})
.then(res => {
console.log(res);
var list = res.data.data;
if (nw_type == 'article') {
var transformedSelectList = list.map(item => ({
content: item.related_object.activity_location,
cover: item.related_object.activity_image,
id: item.related_id,
title: item.related_object.activity_name,
time: item.createtime,
}));
console.log(transformedSelectList);
this.list.push(...transformedSelectList);
} else {
var transformedSelectList = list.map(item => ({
content: item.related_object.content,
cover: item.related_object.cover,
id: item.related_id,
title: item.related_object.title,
time: item.createtime,
}));
console.log(transformedSelectList);
this.list.push(...transformedSelectList);
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
openUrl(ulr) {
uni.navigateTo({
url: ulr
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
}
}
}
</script>
<style>
</style>

View File

@ -1,674 +0,0 @@
<template>
<view class="tn-safe-area-inset-bottom" style="background: rgba(242, 241, 246, 1);">
<!-- 顶部自定义导航 -->
<tn-nav-bar :isBack="false" backTitle="" :alpha="true" :bottomShadow="false">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top" @click="goBack()"
style="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'信息修改'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="24"></tn-tabs>
</view>
</view>
</tn-nav-bar>
<view style="width: 100%;height: 450rpx;position: absolute;top: 0;">
<image v-if="addMod.background_image==''" src="/static/my.png" style="width: 100%;height: 450rpx;"></image>
<image v-if="addMod.background_image!=''" :src="apiImgUrl+addMod.background_image"
style="width: 100%;height: 450rpx;"></image>
<view style="bottom: 28rpx;position: absolute;left: 28rpx;">
<view @click="d_img(1)" style="width: 150rpx;height: 150rpx;position: relative;">
<image :src="apiImgUrl+addMod.photo_image" mode="aspectFill"
style="width: 150rpx;height: 150rpx;border-radius: 50%;"></image>
<image src="/static/pic.png"
style="height: 50rpx;width: 50rpx;position: absolute;right: 0;bottom: 0;">
</image>
</view>
</view>
<view style="bottom: 50rpx;right: 28rpx;position: absolute;">
<tn-button @click="d_img(3)" shape="round" padding="10rpx 40rpx" backgroundColor="#ffffff"
fontColor="rgba(65, 142, 242, 1);">更改背景</tn-button>
</view>
</view>
<view class="tn-margin-top" style="padding-top: 450rpx;z-index:1;">
<view style="font-size: 32rpx;color: rgba(119, 119, 119, 1);padding:25rpx 0rpx 30rpx 50rpx;">个人资料</view>
<view style="padding: 0px 30rpx;;">
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx" @click="openMode(0)">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">姓名</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">{{addMod.nikename}}</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
</tn-list-view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx"
@click="position_id_show = true">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">协会职务</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">{{position_id_name}}</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
<tn-select v-model="position_id_show" mode="single" :list="position_list"
@confirm="getpositionId"></tn-select>
</tn-list-view>
<!-- <tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx"
@click="region_id_show = true">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">所属区域</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">{{region_id_name}}</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
<tn-select v-model="region_id_show" mode="single" :list="region_list"
@confirm="getregionId"></tn-select>
</tn-list-view> -->
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">性别</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center"
@click="sex_id_show = true">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">{{addMod.gender==0?'女':'男'}}
</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
<tn-select v-model="sex_id_show" mode="single" :list="sex_list" @confirm="getsexId"></tn-select>
</tn-list-view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx" @click="openMode(1)">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">联系方式</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">{{addMod.phone}}</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
</tn-list-view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx" @click="openMode(4)">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">个人经历</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view
style="font-size: 28rpx; color: rgba(102, 102, 102, 1);width: 400rpx;text-align: right;"
class="tn-text-ellipsis">{{addMod.introduction}}
</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
</tn-list-view>
<view style="font-size: 32rpx;color: rgba(119, 119, 119, 1);padding:25rpx 0rpx 30rpx 30rpx;">公司资料</view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx" @click="openMode(2)">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">公司名称</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">{{addMod.enterprise_name}}
</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
</tn-list-view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">公司行业</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center"
@click="industry_id_show = true">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">{{industry_id_name}}</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
<tn-select v-model="industry_id_show" mode="single" :list="industry_list"
@confirm="getindustryId"></tn-select>
</tn-list-view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between tn-flex-center tn-flex-col-center"
style="padding: 30rpx">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">公司Logo</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center" @click="d_img(2)">
<view>
<view v-if="addMod.company_image==''">暂无</view>
<image v-if="addMod.company_image!=''" :src="apiImgUrl+addMod.company_image"
style="width: 95rpx;" mode="widthFix"></image>
</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
</tn-list-view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx" @click="openMode(3)">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">公司地址</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view
style="font-size: 28rpx; color: rgba(102, 102, 102, 1);width: 400rpx;text-align: right;"
class="tn-text-ellipsis">
{{addMod.enterprise_location}}
</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
</tn-list-view>
<tn-list-view :customTitle="true" backgroundColor="transparent">
<view slot="title" class="tn-flex tn-flex-row-between" style="padding: 30rpx" @click="openMode(5)">
<view style="font-size: 32rpx;color: #000000;font-weight: 500;">公司介绍</view>
<view class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view
style="font-size: 28rpx; color: rgba(102, 102, 102, 1);width: 400rpx;text-align: right;"
class="tn-text-ellipsis">
{{addMod.enterprise_Introduction}}
</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</view>
</tn-list-view>
</view>
<view class="tn-flex">
<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
<tn-button backgroundColor="rgb(65, 142, 242)" shape="round" fontColor="#ffffff" padding="40rpx 0"
width="90%" fontBold @click="setUserEditDo">
<!-- <text class="tn-icon-light tn-padding-right-xs tn-color-black"></text> -->
<text>提交审核</text>
</tn-button>
</view>
</view>
</view>
<tn-modal v-model="editInput" :custom="true">
<view style="text-align: center;margin-top: 30rpx;">
<block v-if="editType==0">
<view style="text-align: center;font-size: 30rpx;margin-bottom: 20rpx;">姓名修改</view>
<tn-input :border="true" v-model="addMod.nikename" placeholder="请填写姓名"
:customStyle="{width:'400rpx'}" />
</block>
<block v-if="editType==1">
<view style="text-align: center;font-size: 30rpx;margin-bottom: 20rpx;">联系方式</view>
<tn-input :border="true" v-model="addMod.phone" placeholder="请填写联系方式"
:customStyle="{width:'400rpx'}" />
</block>
<block v-if="editType==2">
<view style="text-align: center;font-size: 30rpx;margin-bottom: 20rpx;">公司名称</view>
<tn-input :border="true" v-model="addMod.enterprise_name" placeholder="请填写公司名称"
:customStyle="{width:'400rpx'}" />
</block>
<block v-if="editType==3">
<view style="text-align: center;font-size: 30rpx;margin-bottom: 20rpx;">公司地址</view>
<tn-input :border="true" v-model="addMod.enterprise_location" placeholder="请填写公司地址"
:customStyle="{width:'400rpx'}" />
</block>
</view>
<view class="tn-flex tn-flex-row-center" style="margin-top: 50rpx;">
<tn-button @click="editInput = false" width="250rpx" backgroundColor="#82B2FF"
fontColor="#ffffff">确定</tn-button>
</view>
</tn-modal>
<tn-popup v-model="editText" mode="right" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :alpha="true" :bottomShadow="false">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="editText = false">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:editType==4?'编辑个人经历':'编辑公司介绍'}]" :current="topCurrent" activeColor="#000"
:bold="false" :fontSize="24"></tn-tabs>
</view>
</view>
</tn-nav-bar>
<view style="background: rgba(242, 241, 246, 1);height: 100%;">
<view :style="{paddingTop: vuex_custom_bar_height + 20+'px'}"></view>
<view style="margin:30rpx;background-color: #ffffff;border-radius: 40rpx;">
<view style="padding: 30rpx;">
<tn-input v-if="editType==4" :maxLength="1000" v-model="introduction" :clearable="false"
:height="400" type="textarea" :customStyle="{lineHeight:'42rpx',color:'#777777'}" />
<tn-input v-if="editType==5" :maxLength="1000" v-model="enterprise_Introduction"
:clearable="false" :height="400" type="textarea"
:customStyle="{lineHeight:'42rpx',color:'#777777'}" />
</view>
</view>
<view class="tn-flex tn-flex-center tn-flex-row-center" style="color: #ffffff;">
<view @click="editText = false"
style="width: 300rpx;height: 80rpx;background: #d9d9d9;text-align: center;line-height: 80rpx;">
取消</view>
<view @click="editTextDo()"
style="width: 300rpx;height: 80rpx;background: #418EF2;margin-left: 48rpx;text-align: center;line-height: 80rpx;">
确定</view>
</view>
</view>
</tn-popup>
<l-clipper v-if="show" :image-url="imageUrl" @success="caiDo($event,1)" @cancel="show = false" />
<l-clipper v-if="enterprise_show" :image-url="enterpriseImageUrl" @success="caiDo($event,2)"
@cancel="enterprise_show = false" />
<l-clipper v-if="back_show" width="750" height="422" max-width="750" max-height="422" :image-url="backImageUrl"
@success="caiDo($event,3)" @cancel="back_show = false" />
</view>
</template>
<script>
import {
getUserIndex,
setUserEdit,
IndustryList,
getPosition,
getRegion
} from "@/util/api";
import store from "@/store";
export default {
data() {
return {
editInput: false,
editText: false,
show: false,
enterprise_show: false,
back_show: false,
imageUrl: '',
enterpriseImageUrl: '',
backImageUrl: '',
topCurrent: 0,
showAuthorizationModal: false,
index: 0,
date: '2000-01-29',
userInfo: {},
editType: '',
introduction: '',
enterprise_Introduction: '',
addMod: {
photo_image: '',
member_id: '',
nikename: '',
phone: '',
wx_number: '',
introduction: '',
enterprise_name: '',
enterprise_location: '',
enterprise_Introduction: '',
association_id: '',
industry_id: '',
company_image: '',
background_image: '',
background_type: 3,
position_id: '',
gender: 0,
region_id: '',
},
apiImgUrl: this.$store.state.imgUrl,
apiUpUrl: this.$store.state.apiUrl,
industry_id_show: false,
industry_id_name: '',
industry_list: [],
position_id_show: false,
position_id_name: '',
position_list: [],
region_id_show: false,
region_id_name: '',
region_list: [],
sex_id_show: false,
sex_list: [{
label: '女',
value: 0
}, {
label: '男',
value: 1
}],
}
},
onLoad() {
var uid = uni.getStorageSync('uid');
this.uid = uid;
this.getUserInfo();
},
methods: {
openMode(type) {
this.editType = type;
if (type < 4) {
this.editInput = true;
} else {
if (type == 4) {
this.introduction = this.addMod.introduction;
}
if (type == 5) {
this.enterprise_Introduction = this.addMod.enterprise_Introduction;
}
this.editText = true;
}
},
editTextDo() {
if (this.editType == 4) {
this.addMod.introduction = this.introduction;
}
if (this.editType == 5) {
this.addMod.enterprise_Introduction = this.enterprise_Introduction;
}
this.editText = false;
},
getindustryId(d) {
console.log(d);
var info = d[0];
this.industry_id_name = info.label;
this.addMod.industry_id = info.value;
},
getpositionId(d) {
console.log(d);
var info = d[0];
this.position_id_name = info.label;
this.addMod.position_id = info.value;
},
getregionId(d) {
console.log(d);
var info = d[0];
this.region_id_name = info.label;
this.addMod.region_id = info.value;
},
getsexId(d) {
var info = d[0];
this.addMod.gender = info.value;
},
getRegionList() {
getRegion({
association_id: this.addMod.association_id,
})
.then(res => {
if (res.code == 1) {
var key = res.data;
const transformedSelectList = key.map(item => ({
value: item.id,
label: item.region_name
}));
this.region_list = transformedSelectList;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getIndustry() {
IndustryList({
association_id: this.addMod.association_id,
})
.then(res => {
if (res.code == 1) {
var key = res.data;
var transformedSelectList = key.map(item => ({
value: item.id,
label: item.industry_name
}));
transformedSelectList.push({
value: -1,
label: '其他行业'
});
this.industry_list = transformedSelectList;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getPositionList() {
getPosition({
association_id: this.addMod.association_id,
})
.then(res => {
if (res.code == 1) {
var key = res.data;
const transformedSelectList = key.map(item => ({
value: item.id,
label: item.position_name
}));
this.position_list = transformedSelectList;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
caiDo(d, type) {
var that = this;
var url = d.url;
uni.uploadFile({
url: that.apiUpUrl + '/common/upload', //
filePath: url,
name: 'file',
success: (uploadFileRes) => {
var data = JSON.parse(uploadFileRes.data);
console.log(data);
if (type == 1) {
that.addMod.photo_image = data.data.url;
that.show = false;
that.imageUrl = '';
}
if (type == 2) {
that.addMod.company_image = data.data.url;
that.enterprise_show = false;
that.enterpriseImageUrl = '';
}
if (type == 3) {
that.addMod.background_image = data.data.url;
that.back_show = false;
that.backImageUrl = '';
}
}
});
},
d_img(type) {
var that = this;
uni.chooseMedia({
count: 1, //9
mediaType: ['image', 'video'],
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
success: function(res) {
console.log(res);
var url = res.tempFiles[0].tempFilePath;;
if (res.type == 'video') {
uni.showToast({
title: '暂不支持视频',
icon: 'none',
duration: 2000
});
return;
} else {
that.addMod.background_type = 2;
if (type == 1) {
that.imageUrl = url;
that.show = true;
}
if (type == 2) {
that.enterprise_show = true;
that.enterpriseImageUrl = url;
}
if (type == 3) {
that.back_show = true;
that.backImageUrl = url;
}
}
}
});
},
setUserEditDo() {
setUserEdit(this.addMod)
.then(res => {
console.log(res);
if (res.code == 1) {
uni.showToast({
title: '信息已提交审核',
icon: 'none',
duration: 2000
});
} else {
uni.showModal({
title: '提示',
content: res.msg,
});
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getUserInfo() {
getUserIndex({
member_b_id: this.uid,
member_id: this.uid
})
.then(res => {
console.log(res);
this.addMod = {
photo_image: res.data.photo_image,
member_id: res.data.member_id,
nikename: res.data.nikename,
phone: res.data.phone,
wx_number: res.data.wx_number,
introduction: res.data.introduction == null || res.data.introduction == '' ? '无' : res
.data.introduction,
enterprise_name: res.data.enterprise_name == null || res.data.enterprise_name == '' ?
'无' : res.data.enterprise_name,
enterprise_location: res.data.enterprise_location == null || res.data
.enterprise_location == '' ? '无' : res.data
.enterprise_location,
enterprise_Introduction: res.data.enterprise_Introduction == null || res.data
.enterprise_Introduction == '' ? '无' : res.data
.enterprise_Introduction,
association_id: res.data.association_id,
industry_id: res.data.industry_id,
company_image: res.data.company_image,
background_image: res.data.background_image,
background_type: res.data.background_type,
position_id: res.data.position_id,
gender: res.data.gender,
region_id: res.data.region_id,
};
this.region_id_name = res.data.region_name == null ? '无' : res.data.region_name;
this.industry_id_name = res.data.industry_name == null ? '无' : res.data.industry_name;
this.position_id_name = res.data.position_name == null ? '无' : res.data.position_name;
this.getIndustry();
this.getPositionList();
this.getRegionList();
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
//
tn(e) {
uni.navigateTo({
url: e,
});
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
},
}
}
</script>
<style lang="scss" scoped>
/* 授权 */
.login-page {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
/* 授权按钮 */
.submit-btn {
width: 100%;
background-color: #05C160;
color: #FFFFFF;
margin-top: 60rpx;
border-radius: 10rpx;
padding: 25rpx;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
margin: 30rpx;
}
/* 间隔线 start*/
.tn-strip-bottom-min {
width: 100%;
border-bottom: 1rpx solid #F8F9FB;
}
.tn-strip-bottom {
width: 100%;
border-bottom: 20rpx solid rgba(241, 241, 241, 0.8);
}
/* 间隔线 end*/
/* 用户头像 start */
.logo-image {
width: 80rpx;
height: 80rpx;
position: relative;
}
.logo-pic {
background-size: cover;
background-repeat: no-repeat;
// background-attachment:fixed;
background-position: top;
border: 2rpx solid rgba(255, 255, 255, 0.05);
box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
border-radius: 50%;
overflow: hidden;
// background-color: #FFFFFF;
}
/* 底部悬浮按钮 start*/
.tn-tabbar-height {
min-height: 100rpx;
height: calc(120rpx + env(safe-area-inset-bottom) / 2);
}
.tn-footerfixed {
position: fixed;
width: 100%;
bottom: calc(30rpx + env(safe-area-inset-bottom));
z-index: 1024;
box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0);
}
/* 底部悬浮按钮 end*/
</style>

View File

@ -1,48 +1,63 @@
<template>
<view class="template-edit tn-safe-area-inset-bottom">
<!-- 顶部自定义导航 -->
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'邀请入会'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
邀请会员
</view>
</view>
</tn-nav-bar>
<view class="tn-safe-area-inset-bottom" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 50rpx">
<view>
<tn-button @click="openQrcode" backgroundColor="#82B2FF" height="80rpx" :shadow="true"
fontColor="#ffffff" width="100%">生成二维码</tn-button>
<view class="tn-safe-area-inset-bottom" :style="{ paddingTop: vuex_custom_bar_height + 'px' }">
<!-- 顶部卡片 -->
<view class="invite-card tn-shadow-blur">
<view class="card-stats">
<view class="stat-item">
<text class="number">{{ inviteCount}}</text>
<text class="label">已邀请</text>
</view>
</view>
<view style="margin-top: 40rpx">
<tn-button open-type="share" backgroundColor="#82B2FF" height="80rpx" :shadow="true"
fontColor="#ffffff" width="100%">转发到微信好友</tn-button>
<!-- 按钮组 -->
<view class="button-group">
<!-- <tn-button @click="openQrcode" class="invite-btn" backgroundColor="#FFFFFF" height="80rpx"
:shadow="true" fontColor="#5C8FFF">
<text class="tn-icon-qr-code"></text> 生成二维码
</tn-button> -->
<tn-button open-type="share" width="100%" class="invite-btn" backgroundColor="#FFFFFF"
height="80rpx" :shadow="true" fontColor="#5C8FFF">
<text class="tn-icon-share"></text> 邀请好友
</tn-button>
</view>
</view>
<!-- 邀请列表 -->
<view class="invite-list">
<view class="list-header">
<text class="title">邀请记录</text>
<text class="count">{{ inviteCount }}</text>
</view>
<view class="list-content">
<view v-for="(item, index) in inviteList" :key="index" class="list-item tn-flex tn-flex-row">
<image v-if="item.photo_image!=''&&item.photo_image!=null" :src="apiImgUrl+item.photo_image"
class="avatar" mode="aspectFill">
</image>
<image v-if="item.photo_image==''||item.photo_image==null" src="/static/def.png" class="avatar"
mode="aspectFill">
</image>
<view class="info">
<view class="name">{{ item.nikename || '匿名用户' }}</view>
<view class="time">{{ item.createtime || '未知时间' }}</view>
</view>
<view class="status" :class="item.if_xianshi === 1 ? 'success' : 'pending'">
{{ item.if_xianshi === 1 ? '已入会' : '未入会' }}
</view>
</view>
</view>
</view>
<!-- <view style="padding:20rpx 40rpx">-->
<!-- <view style="font-size: 32rpx">我邀请的会员30</view>-->
<!-- <view>-->
<!-- <view class="tn-flex tn-flex-center tn-flex-col-center" style="padding: 30rpx;width: 100%;">-->
<!-- <view>-->
<!-- <image src="/static/def.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;">-->
<!-- </image>-->
<!-- </view>-->
<!-- <view style="width: 100%;">-->
<!-- <view class="tn-flex tn-flex-col-center tn-flex-row-between">-->
<!-- <view style="margin-left: 20rpx;color: #000000">-->
<!-- <view style="font-size: 35rpx;">王小明</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
</view>
<tn-popup :closeBtn="true" v-model="show" mode="center" width="500rpx" height="700rpx">
<div style="text-align: center;padding: 30rpx;font-size: 32rpx;font-weight: 600;">使用二维码邀请入会</div>
@ -61,31 +76,36 @@
<script>
import {
getUserIndex,
getQrcode
getQrcode,
getrecommendationList
} from "@/util/api";
import store from "@/store";
export default {
data() {
return {
apiImgUrl: this.$store.state.imgUrl,
apiUpUrl: this.$store.state.apiUrl,
show: false,
topCurrent: 0,
uid: 0,
userInfo: {},
apiImgUrl: this.$store.state.imgUrl,
qrcode_url: ''
qrcode_url: '',
inviteList: [],
inviteCount: 0,
page: 1
}
},
onShareAppMessage() {
return {
title: this.userInfo.nikename + '邀请你加入【' + this.userInfo.association_name + '】',
path: '/pages/packageA/user/apply_in?id=' + this.uid + "&association_id=" + this.userInfo.association_id,
path: '/pages/index/index?id=' + this.uid,
imageUrl: this.apiImgUrl + this.userInfo.association_image,
}
},
onShareTimeline() { //
return {
title: this.userInfo.nikename + '邀请你加入【' + this.userInfo.association_name + '】',
path: '/pages/packageA/user/apply_in?id=' + this.uid + "&association_id=" + this.userInfo.association_id,
path: '/pages/index/index?id=' + this.uid,
imageUrl: this.apiImgUrl + this.userInfo.association_image,
}
},
@ -93,6 +113,11 @@
var u = uni.getStorageSync('uid');
this.uid = u;
this.getUserInfo();
this.getList();
},
onReachBottom() {
this.page += 1;
this.getList();
},
methods: {
saveBase64() {
@ -171,6 +196,27 @@
});
})
},
getList() {
console.log(1);
getrecommendationList({
page: this.page,
size: 10
})
.then(res => {
console.log(res);
if (res.code == 1) {
this.inviteList.push(...res.data.ret);
this.inviteCount = res.data.count;
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
//
tn(e) {
uni.navigateTo({
@ -224,4 +270,139 @@
}
/* 标签内容 end*/
</style>
/* 邀请卡片 */
.invite-card {
margin: 30rpx;
padding: 40rpx;
background: linear-gradient(45deg, #5C8FFF, #82B2FF);
border-radius: 24rpx;
color: #FFFFFF;
.card-title {
font-size: 32rpx;
font-weight: bold;
margin-bottom: 20rpx;
}
.card-content {
.invite-code {
font-size: 48rpx;
font-weight: bold;
letter-spacing: 4rpx;
}
}
.card-stats {
margin: 30rpx 0;
.stat-item {
text-align: center;
.number {
font-size: 80rpx;
font-weight: bold;
display: block;
}
.label {
font-size: 24rpx;
opacity: 0.8;
}
}
}
.button-group {
display: flex;
gap: 20rpx;
.invite-btn {
width: 100%;
flex: 1;
border-radius: 40rpx;
.tn-icon-qr-code,
.tn-icon-share {
margin-right: 10rpx;
}
}
}
}
/* 邀请列表 */
.invite-list {
margin: 30rpx;
background-color: #FFFFFF;
border-radius: 24rpx;
padding: 30rpx;
.list-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30rpx;
.title {
font-size: 32rpx;
font-weight: bold;
color: #333333;
}
.count {
font-size: 28rpx;
color: #999999;
}
}
.list-content {
.list-item {
display: flex;
align-items: center;
padding: 20rpx 0;
border-bottom: 1rpx solid #F5F5F5;
&:last-child {
border-bottom: none;
}
.avatar {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
margin-right: 20rpx;
}
.info {
flex: 1;
.name {
font-size: 28rpx;
color: #333333;
margin-bottom: 6rpx;
}
.time {
font-size: 24rpx;
color: #999999;
}
}
.status {
font-size: 24rpx;
padding: 4rpx 16rpx;
border-radius: 20rpx;
&.success {
background-color: #E8F3FF;
color: #5C8FFF;
}
&.pending {
background-color: #FFF7E6;
color: #FFA726;
}
}
}
}
}
</style>

View File

@ -1,20 +1,64 @@
<template>
<view class="template-edit tn-safe-area-inset-bottom">
<!-- 顶部自定义导航 -->
<view style="background: #F1F2F8;min-height: 100vh;" v-cloak>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'发票申请'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
<text>发票开取</text>
</view>
</view>
</tn-nav-bar>
<view class="tn-safe-area-inset-bottom" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding:40rpx;">
<view class="tn-safe-area-inset-bottom" :style="{ paddingTop: vuex_custom_bar_height + 'px' }">
<view v-if="allList.length == 0" style="text-align: center;padding-top: 200rpx;">
<image class="no-img" src="/static/_6@2x.png" style="width: 250rpx;" mode="widthFix"></image>
<view style="font-size: 34rpx;font-weight: bold;margin-top: 40rpx;">暂无发票数据</view>
<view style="font-size: 28rpx;color: #BABDC7;margin-top: 20rpx;">未查找到您的发票信息赶快去申请</view>
<view style="margin-top: 80rpx;">
<tn-button @click="addMod = true" width="450rpx" height="85rpx" backgroundColor="#3056D3"
shape="round" fontColor="#ffffff">去申请发票</tn-button>
</view>
</view>
<view style="padding: 30rpx;">
<view v-for="item in allList"
style="margin-bottom: 30rpx;background-color: #FFF;border-radius: 20rpx;padding: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="font-size: 32rpx;font-weight: bold;">{{ item.unit }}</view>
<view v-if="item.if_ssue == 3" style="color: #FF9847;">
<text>待审核</text>
<text class="tn-icon-right"></text>
</view>
<view v-if="item.if_ssue == 2" style="color: #E83A30;">
<text>被拒绝</text>
<text class="tn-icon-right"></text>
</view>
<view v-if="item.if_ssue == 1" style="color: #28B93D;">
<text>已开具</text>
<text class="tn-icon-right"></text>
</view>
</view>
<view class="view_text" style="color: #666666;">
<view>
<text>{{ item.name }} / {{ item.createtime }}</text>
</view>
<view>
<text>发票金额</text>
<text>¥{{ item.money }}</text>
</view>
</view>
<view style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 30rpx 0rpx;"></view>
<view style="text-align: right;">
<tn-button @click="openInfoMod(item)" height="70rpx" width="200rpx" fontColor="#999999"
shape="round" backgroundColor="#999999" :plain="true">查看</tn-button>
</view>
</view>
<view @click="addMod = true"
style="position: fixed;bottom: 10%;right: 0;box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(48,86,211,0.25);text-align: center;color: #FFF;;background-color: #3056D3;border-radius: 80rpx 0 0rpx 80rpx;width: 180rpx;;height: 70rpx;line-height: 70rpx;">
申请发票
</view>
</view>
<!-- <view style="padding:40rpx;">
<view class="tn-flex tn-flex-center tn-flex-row-between ">
<view>
已有发票 {{count}}
@ -49,219 +93,165 @@
</view>
</view>
<view style="width: 100%;height: 1px;background-color: #F8F7F8;margin: 40rpx 0rpx;"></view>
</view>
</view> -->
</view>
<tn-popup v-model="addMod" mode="right" :safeAreaInsetBottom="true" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :alpha="true" :bottomShadow="false">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="addMod = false">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'信息填写'}]" activeColor="#000" :bold="false" :fontSize="34"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
<text>申请发票</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height+'px'}" class="custom-modal-content">
<view style="padding: 30rpx;">
<view @click="tt_show_do" class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view>
<view v-if="header_id_name == ''">请选择开票信息</view>
<view v-if="header_id_name != ''">
<view style="padding: 30rpx 0rpx;">
<view>申请人{{header_id_name.name}}</view>
<view>公司名称{{header_id_name.unit}}</view>
<view>纳税人识别号{{header_id_name.taxpayer_identification_number}}</view>
<view>单位地址{{header_id_name.unit_address}}</view>
<view>单位电话{{header_id_name.telephone}}</view>
<view>银行基本户账号{{header_id_name.bank_basic_account_number}}</view>
<view>开户行{{header_id_name.bank}}</view>
<view :style="{ paddingTop: vuex_custom_bar_height + 'px' }"
style="background-color: #F1F2F8;min-height: 100vh;">
<view class="text" style="padding:30rpx;">
<view style="background-color: #FFF;border-radius: 20rpx;padding:10rpx 30rpx;">
<tn-form ref="form" :labelWidth="150">
<tn-form-item label="申请人" prop="name" required>
<tn-input placeholder="申请人" inputAlign="right" :clearable="false"
:customStyle="{ width: '470rpx' }" v-model="addForm.name" />
</tn-form-item>
<tn-form-item label="公司名称" prop="unit" required>
<tn-input placeholder="公司名称" inputAlign="right" :clearable="false"
:customStyle="{ width: '470rpx' }" v-model="addForm.unit" />
</tn-form-item>
<tn-form-item label="纳税人识别号" required :labelWidth="200"
prop="taxpayer_identification_number">
<tn-input placeholder="纳税人识别号" inputAlign="right" :clearable="false"
:customStyle="{ width: '420rpx' }"
v-model="addForm.taxpayer_identification_number" />
</tn-form-item>
<tn-form-item label="单位地址" prop="unit_address">
<tn-input placeholder="单位地址" inputAlign="right" :clearable="false"
:customStyle="{ width: '470rpx' }" v-model="addForm.unit_address" />
</tn-form-item>
<tn-form-item label="单位电话" prop="telephone">
<tn-input placeholder="单位电话" inputAlign="right" :clearable="false"
:customStyle="{ width: '470rpx' }" v-model="addForm.telephone" />
</tn-form-item>
<tn-form-item label="银行基本户账号" :labelWidth="220" prop="bank_basic_account_number">
<tn-input placeholder="银行基本户账号" :clearable="false" inputAlign="right"
:customStyle="{ width: '410rpx' }" v-model="addForm.bank_basic_account_number" />
</tn-form-item>
<tn-form-item label="开户行" prop="bank">
<tn-input placeholder="开户行" :clearable="false" inputAlign="right"
:customStyle="{ width: '470rpx' }" v-model="addForm.bank" />
</tn-form-item>
<tn-form-item label="发票金额" required prop="bank" :borderBottom="true">
<tn-input placeholder="发票金额" inputAlign="right" :clearable="false"
:customStyle="{ width: '470rpx' }" v-model="addForm.money" />
</tn-form-item>
<tn-form-item label="支付凭证" required prop="bank" :borderBottom="false">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-right">
<view style="text-align: center;">
<image v-if="addForm.voucher != ''" :src="apiImgUrl + addForm.voucher"
style="width: 200rpx;height: 200rpx"></image>
</view>
<view style="margin-left: 20rpx;">
<tn-button @click="upload_img" backgroundColor="#3056D3" fontColor="#ffffff"
size="sm">上传凭证</tn-button>
</view>
</view>
</view>
</view>
<view>
<!-- <tn-button @click="tt_add_show = true" backgroundColor="#3D7EFF" size="sm"
fontColor="#ffffff">添加开票信息</tn-button> -->
<text style="margin-left: 20rpx;" class="tn-icon-right"></text>
</view>
</tn-form-item>
</tn-form>
</view>
<!-- <tn-select v-model="tt_show" mode="single" :list="tt_list" @confirm="tt_confirm"></tn-select> -->
</view>
<view class="text" style="padding:20rpx 40rpx;">
<view style="text-align: center;font-size: 32rpx;font-weight: 600;">申请发票</view>
<tn-form ref="form" :labelWidth="180">
<tn-form-item prop="name" label="发票类型">
<tn-input v-model="invoice_type_name" :customStyle="{width: '450rpx'}"
@click="invoice_type_show = true" inputAlign="right" :disabled="true" />
<tn-action-sheet :list="actionSheetList" v-model="invoice_type_show"
@click="actionSheetCallback"></tn-action-sheet>
</tn-form-item>
<tn-form-item prop="name">
<tn-input placeholder="开票金额" :customStyle="{width: '600rpx'}" v-model="money" />
</tn-form-item>
</tn-form>
<view style="text-align: center;margin-top: 50rpx;">
<tn-button backgroundColor="#E6E6E6" height="70rpx" fontColor="#ffffff" @click="addMod = false"
width="40%">取消</tn-button>
<tn-button backgroundColor="#3D7EFF" height="70rpx" width="40%" fontColor="#ffffff"
style="margin-left: 30rpx;" @click="kp_add_do">提交</tn-button>
<view
style="position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 40rpx 30rpx;">
<view @click="kp_add_do"
style="margin: 0 auto;line-height: 80rpx;height: 80rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius:90rpx;">
<text>申请发票</text>
</view>
</view>
</view>
</tn-popup>
<tn-popup v-model="infoMod" mode="right" :safeAreaInsetBottom="true" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :alpha="true" :bottomShadow="false">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="infoMod = false">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'发票信息查看'}]" activeColor="#000" :bold="false" :fontSize="34"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
<text>开票信息</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height+'px'}" class="custom-modal-content">
<view class="info_text" style="padding:20rpx 40rpx;">
<view>
<text>申请人</text>
<text>{{info.header.name}}</text>
</view>
<view>
<text>公司名称</text>
<text>{{info.header.unit}}</text>
</view>
<view>
<text>纳税人识别号</text>
<text>{{info.header.taxpayer_identification_number}}</text>
</view>
<view>
<text>单位地址</text>
<text>{{info.header.unit_address}}</text>
</view>
<view>
<text>单位电话</text>
<text>{{info.header.telephone}}</text>
</view>
<view>
<text>银行基本账户</text>
<text>{{info.header.bank_basic_account_number}}</text>
</view>
<view>
<text>开户行</text>
<text>{{info.header.bank}}</text>
</view>
<view>
<text>发票金额</text>
<text>{{info.money}}</text>
</view>
<view>
<text>发票类别</text>
<text>{{info.invoice_type==1?'普票':'专票'}}</text>
</view>
<view>
<text>申请状态</text>
<tn-tag v-if="info.if_ssue==1" backgroundColor="#31E749" fontColor="#ffffff"
shape="radius">已通过</tn-tag>
<tn-tag v-if="info.if_ssue==2" backgroundColor="#E83A30" fontColor="#ffffff"
shape="radius">被拒绝</tn-tag>
<tn-tag v-if="info.if_ssue==3" backgroundColor="#FF7043" fontColor="#ffffff"
shape="radius">审核中</tn-tag>
</view>
<view v-if="info.if_ssue==2">
<text>拒绝原因</text>
<text>{{info.reason}}</text>
</view>
<view>
<text>发票图片</text>
<text v-if="info.invoice_image==''||info.invoice_image==null">待上传</text>
<image @click="openImg" v-if="info.invoice_image!=''&&info.invoice_image!=null"
:src="apiImgUrl+info.invoice_image" style="width: 100%;margin-top: 20rpx;" mode="widthFix">
</image>
</view>
<view style="text-align: center;margin-top: 50rpx;">
<tn-button backgroundColor="#E6E6E6" height="70rpx" fontColor="#ffffff" @click="infoMod = false"
width="40%">关闭</tn-button>
<view :style="{ paddingTop: vuex_custom_bar_height + 'px' }"
style="background-color: #F1F2F8;min-height: 100vh;padding-bottom: 100rpx;">
<view style="padding: 30rpx;">
<view style="background-color: #FFF;border-radius: 20rpx;padding: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="font-size: 32rpx;font-weight: bold;">{{ info.unit }}</view>
<view v-if="info.if_ssue == 3" style="color: #FF9847;">
<text>待审核</text>
</view>
<view v-if="info.if_ssue == 2" style="color: #E83A30;">
<text>被拒绝</text>
</view>
<view v-if="info.if_ssue == 1" style="color: #28B93D;">
<text>已开具</text>
</view>
</view>
<view class="view_text" style="font-size: 28rpx;color: #666666;margin-top: 30rpx;">
<view>
<text>申请人</text>
<text>{{ info.name }}</text>
</view>
<view>
<text>申请时间</text>
<text>{{ info.createtime }}</text>
</view>
<view>
<text>单位电话</text>
<text>{{ info.telephone }}</text>
</view>
<view>
<text>单位地址</text>
<text>{{ info.unit_address }}</text>
</view>
<view>
<text>银行基本户账号</text>
<text>{{ info.bank_basic_account_number }}</text>
</view>
<view>
<text>纳税人识别号</text>
<text>{{ info.taxpayer_identification_number }}</text>
</view>
<view>
<text>开户行</text>
<text>{{ info.bank }}</text>
</view>
<view>
<text>发票金额</text>
<text>¥{{ info.money }}</text>
</view>
<view>
<text>支付凭证</text>
<image class="no-img" @click="openImgT(1)" :src="apiImgUrl + info.voucher"
style="width: 100%;" mode="widthFix"></image>
</view>
<view v-if="info.if_ssue == 1">
<text>电子发票</text>
<image class="no-img" @click="openImgT(2)" :src="apiImgUrl + info.invoice_image"
style="width: 100%;" mode="widthFix"></image>
</view>
</view>
</view>
</view>
</view>
</tn-popup>
<tn-popup v-model="tt_add_show" mode="right" :safeAreaInsetBottom="true" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :alpha="true" :bottomShadow="false">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="tt_add_show = false">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'选择开票信息'}]" activeColor="#000" :bold="false" :fontSize="34"></tn-tabs>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height+'px'}" class="custom-modal-content">
<view v-if="!tt_add_show_add" style="padding:0rpx 30rpx 150rpx 30rpx;">
<view style="text-align:right;">
<tn-button @click="tt_add_show_add = true" backgroundColor="#3D7EFF" size="sm"
fontColor="#ffffff">添加开票信息</tn-button>
</view>
<tn-radio-group v-model="header_id" width="100%" wrap @change="radioGroupChange">
<block v-for="(item,index) in tt_list">
<tn-radio :name="item.id+''" :size="40" borderColor="#3D7EFF" activeColor="#3D7EFF">
<view style="padding: 30rpx 0rpx;margin-left: 30px;">
<view>申请人{{item.name}}</view>
<view>公司名称{{item.unit}}</view>
<view>纳税人识别号{{item.taxpayer_identification_number}}</view>
<view>单位地址{{item.unit_address}}</view>
<view>单位电话{{item.telephone}}</view>
<view>银行基本户账号{{item.bank_basic_account_number}}</view>
<view>开户行{{item.bank}}</view>
</view>
</tn-radio>
</block>
</tn-radio-group>
</view>
<view style="position: fixed;bottom: 80rpx;width: 92%;margin: 0 auto;text-align: center;">
<tn-button @click="tt_add_show = false" backgroundColor="#3D7EFF" width="300rpx" height="80rpx"
fontColor="#ffffff">确定</tn-button>
</view>
<view v-if="tt_add_show_add" class="text" style="padding:20rpx 40rpx;">
<view style="text-align: center;font-size: 32rpx;font-weight: 600;">添加开票信息</view>
<tn-form ref="form" :labelWidth="120">
<tn-form-item prop="name">
<tn-input placeholder="申请人" :customStyle="{width: '600rpx'}" v-model="addForm.name" />
</tn-form-item>
<tn-form-item prop="unit">
<tn-input placeholder="公司名称" :customStyle="{width: '600rpx'}" v-model="addForm.unit" />
</tn-form-item>
<tn-form-item prop="taxpayer_identification_number">
<tn-input placeholder="纳税人识别号" :customStyle="{width: '600rpx'}"
v-model="addForm.taxpayer_identification_number" />
</tn-form-item>
<tn-form-item prop="unit_address">
<tn-input placeholder="单位地址" :customStyle="{width: '600rpx'}"
v-model="addForm.unit_address" />
</tn-form-item>
<tn-form-item prop="telephone">
<tn-input placeholder="单位电话" :customStyle="{width: '600rpx'}" v-model="addForm.telephone" />
</tn-form-item>
<tn-form-item prop="bank_basic_account_number">
<tn-input placeholder="银行基本户账号" :customStyle="{width: '600rpx'}"
v-model="addForm.bank_basic_account_number" />
</tn-form-item>
<tn-form-item prop="bank">
<tn-input placeholder="开户行" :customStyle="{width: '600rpx'}" v-model="addForm.bank" />
</tn-form-item>
</tn-form>
<view style="text-align: center;margin-top: 50rpx;">
<tn-button backgroundColor="#E6E6E6" height="70rpx" fontColor="#ffffff"
@click="tt_add_show_add = false" width="40%">取消</tn-button>
<tn-button backgroundColor="#3D7EFF" height="70rpx" width="40%" fontColor="#ffffff"
style="margin-left: 30rpx;" @click="tt_add_do">提交</tn-button>
</view>
<view v-if="info.if_ssue == 1"
style="position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 40rpx 30rpx;">
<view @click="openImg"
style="margin: 0 auto;line-height: 80rpx;height: 80rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius:90rpx;">
<text>下载发票</text>
</view>
</view>
</tn-popup>
</view>
</template>
@ -278,6 +268,7 @@
data() {
return {
apiImgUrl: this.$store.state.imgUrl,
apiUpUrl: this.$store.state.apiUrl,
addMod: false,
infoMod: false,
tt_add_show_add: false,
@ -289,8 +280,9 @@
telephone: '',
bank_basic_account_number: '',
bank: '',
association_id: 0,
association_id: 1,
money: '',
voucher: '',
},
invoice_type_show: false,
actionSheetList: [{
@ -309,7 +301,6 @@
tt_add_show: false,
tt_show: false,
tt_list: [],
money: '',
page: 1,
allList: [],
info: {},
@ -328,6 +319,10 @@
this.getList();
},
methods: {
openInfoMod(item) {
this.info = item;
this.infoMod = true;
},
radioGroupChange(d) {
const item = this.tt_list.find(item => item.id == d);
console.log(item);
@ -339,6 +334,18 @@
urls: [this.apiImgUrl + this.info.invoice_image],
});
},
openImgT(key) {
var url = '';
if (key == 1) {
url = this.apiImgUrl + this.info.voucher;
} else {
url = this.apiImgUrl + this.info.invoice_image;
}
uni.previewImage({
current: 0,
urls: [url],
});
},
openInfo(d) {
getInvoiceLogWithHeader({
id: d.id
@ -375,28 +382,59 @@
},
kp_add_do() {
if (this.header_id == 0) {
//
if (!this.addForm.name || this.addForm.name.trim() === '') {
uni.showToast({
title: '请选择开票信息',
title: '请填写申请人',
icon: 'none',
duration: 2000
});
return;
}
if (this.money == '' || this.money <= 0) {
//
if (!this.addForm.unit || this.addForm.unit.trim() === '') {
uni.showToast({
title: '请填写金额',
title: '请填写公司名称',
icon: 'none',
duration: 2000
});
return;
}
addInvoiceLog({
association_id: this.addForm.association_id,
header_id: this.header_id,
money: this.money,
invoice_type: this.invoice_type
})
//
if (!this.addForm.taxpayer_identification_number ||
!/^[0-9A-Z]{15,20}$/.test(this.addForm.taxpayer_identification_number)) {
uni.showToast({
title: '请填写正确的纳税人识别号',
icon: 'none',
duration: 2000
});
return;
}
//
if (!this.addForm.money || isNaN(this.addForm.money) || this.addForm.money <= 0) {
uni.showToast({
title: '请填写正确的发票金额',
icon: 'none',
duration: 2000
});
return;
}
//
if (!this.addForm.voucher) {
uni.showToast({
title: '请上传支付凭证',
icon: 'none',
duration: 2000
});
return;
}
//
addInvoiceLog(this.addForm)
.then(res => {
console.log(res);
if (res.code == 1) {
@ -406,11 +444,6 @@
duration: 2000
});
this.addMod = false;
this.header_id = 0;
this.header_id_name = '请选择开票信息';
this.invoice_type_name = '普票';
this.invoice_type = 1;
this.money = '';
this.allList = [];
this.page = 1;
this.getList();
@ -495,6 +528,33 @@
});
})
},
upload_img() {
var user_info = uni.getStorageSync('userInfo');
var that = this;
uni.chooseMedia({
count: 1, //9
mediaType: ['image'],
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
success: function(res) {
console.log(res);
var url = res.tempFiles[0].tempFilePath;
uni.uploadFile({
url: that.apiUpUrl + '/common/upload', //
filePath: url,
name: 'file',
formData: {
association_id: 1,
},
success: (uploadFileRes) => {
var data = JSON.parse(uploadFileRes.data);
console.log(data);
that.addForm.voucher = data.data.url;
}
});
}
});
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
@ -513,4 +573,8 @@
.info_text view {
margin-bottom: 40rpx;
}
.view_text view {
margin-top: 20rpx;
}
</style>

View File

@ -1,193 +1,361 @@
<template>
<view class="message tn-safe-area-inset-bottom">
<view style="background: #F1F2F8;min-height: 100vh;" v-cloak>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view class="tn-margin-top"
style=";text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;">
<tn-tabs :list="[{name:'我的消息'}]" :current="topCurrent" activeColor="#000" :bold="false"
:fontSize="36"></tn-tabs>
<view style="width: 83%;font-weight: bold;">
<text>消息通知</text>
</view>
</view>
</tn-nav-bar>
<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="text-align: right;padding: 30rpx 30rpx 0rpx 0;">
<tn-button @click="all_upadte" backgroundColor="tn-bg-blue" size="sm" fontColor="tn-color-white"
shape="round">全部已读</tn-button>
</view>
<view v-for="item in list" class="tn-margin tn-padding" @click="tn('/pageB/chat/chatGPT')">
<view class="tn-flex tn-flex-col-top">
<!-- 这个是图标形式 -->
<view class="">
<view class="icon15__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-shadow-blur"
style="background-color: #F3F2F7;color: #7C8191;">
<view class="tn-icon-notice-fill"></view>
</view>
</view>
<view class="tn-padding-left-sm" style="width: 100%;">
<view class="tn-flex tn-flex-col-center ">
<view class="justify-content-item">
<text class="tn-color-wallpaper tn-text-lg tn-text-bold">系统消息</text>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 30rpx;">
<view style="background-color: #ffffff;padding: 35rpx;border-radius: 20rpx;">
<template v-for="item in typeList">
<view v-if="item.type==0" class="tn-flex tn-flex-center tn-flex-col-center"
@click="openMode(item)">
<view style="width: 110rpx;height: 110rpx;position: relative;">
<image src="/static/msg3.png" style="width: 110rpx;height: 110rpx;border-radius:50%;">
</image>
<view v-if="item.state_zero_count>0"
style="right: -4rpx;top: -5rpx;position: absolute;color: #ffffff;line-height: 40rpx;text-align: center;width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px #ffffff solid;background-color: red;">
{{item.state_zero_count>99?'99+':item.state_zero_count}}
</view>
</view>
<view style="margin-left: 10rpx;">
<tn-tag padding="0rpx 0rpx" width="80rpx" v-if="item.state==0" size="sm" shape="circle"
backgroundColor="#E83A30" fontColor="#ffffff">未读</tn-tag>
<tn-tag padding="0rpx 0rpx" width="80rpx" v-if="item.state==1" size="sm" shape="circle"
backgroundColor="#28B93D" fontColor="#ffffff">已读</tn-tag>
<view style="margin-left: 20rpx;">
<view>
<text style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">系统通知</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 28rpx;margin-top: 10rpx;color: #666666;">
<text>管理员审核了你发布的动态</text>
</view>
</view>
</view>
<view v-if="item.type==1" class="tn-padding-top-xs tn-text-ellipsis-2 tn-color-gray">
<view>{{item.member_q_id_name}}申请查看您的联系方式</view>
<view v-if="item.content!=''" style="margin-top: 10rpx;">申请信息{{item.content}}</view>
<view v-if="item.type==0"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 40rpx 0rpx;"></view>
<view v-if="item.type==1" @click="openMode(item)"
class="tn-flex tn-flex-center tn-flex-col-center">
<view style="width: 110rpx;height: 110rpx;position: relative;">
<image src="/static/msg1.png" style="width: 110rpx;height: 110rpx;border-radius:50%;">
</image>
<view v-if="item.state_zero_count>0"
style="right: -4rpx;top: -5rpx;position: absolute;color: #ffffff;line-height: 40rpx;text-align: center;width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px #ffffff solid;background-color: red;">
{{item.state_zero_count>99?'99+':item.state_zero_count}}
</view>
</view>
<view style="margin-left: 20rpx;">
<view>
<text style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">好友验证</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 28rpx;margin-top: 10rpx;color: #666666;">
<text>您有好友验证消息</text>
</view>
</view>
</view>
<view v-if="item.type==0" class="tn-padding-top-xs tn-text-ellipsis-2 tn-color-gray">
<view style="margin-top: 10rpx;">{{item.content}}</view>
<view v-if="item.type==1"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 40rpx 0rpx;"></view>
<view v-if="item.type==3" class="tn-flex tn-flex-center tn-flex-col-center"
@click="openMode(item)">
<view style="width: 110rpx;height: 110rpx;position: relative;">
<image src="/static/msg2.png" style="width: 110rpx;height: 110rpx;border-radius:50%;">
</image>
<view v-if="item.state_zero_count>0"
style="right: -4rpx;top: -5rpx;position: absolute;color: #ffffff;line-height: 40rpx;text-align: center;width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px #ffffff solid;background-color: red;">
{{item.state_zero_count>99?'99+':item.state_zero_count}}
</view>
</view>
<view style="margin-left: 20rpx;">
<view>
<text style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">互动消息</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 28rpx;margin-top: 10rpx;color: #666666;">
<text>有用户对您发布的圈子进行了点赞</text>
</view>
</view>
</view>
</view>
</view>
<view class="tn-flex tn-flex-row-between tn-flex-col-between tn-margin-top-sm tn-flex-col-center">
<view class="justify-content-item tn-color-gray tn-text-center tn-color-gray">
<text class="tn-icon-time tn-padding-right-xs tn-padding-left-xs tn-text-df"></text>
<text class="tn-text-sm">{{item.mail_time}}</text>
</view>
<block v-if="item.type==1 && item.if_tongyi==2">
<view @click="updateType(0,item.mail_id)"
class="justify-content-item tn-round tn-text tn-bg-blue--light tn-color-blue"
style="padding: 5rpx 15rpx;">
<text class="tn-padding-xs">通过申请</text>
</view>
<view @click="updateType(1,item.mail_id)"
class="justify-content-item tn-round tn-text tn-bg-orangered--light tn-color-orangered"
style="padding: 5rpx 15rpx;">
<text class="tn-padding-xs">拒绝申请</text>
</view>
</block>
<block v-if="item.type==1 && item.if_tongyi==1">
<view>
<tn-tag padding="0rpx 0rpx" width="80rpx" size="sm" shape="circle" backgroundColor="#E83A30"
fontColor="#ffffff">已拒绝</tn-tag>
</view>
</block>
<block v-if="item.type==1 && item.if_tongyi==0">
<view>
<tn-tag padding="0rpx 0rpx" width="80rpx" size="sm" shape="circle" backgroundColor="#28B93D"
fontColor="#ffffff">已同意</tn-tag>
</view>
</block>
</template>
</view>
</view>
</view>
<view style="margin-top: 40rpx;">
<tn-load-more :status="loadingIn" :loadText="{nomore:'没有消息'}"></tn-load-more>
</view>
<view class="tn-tabbar-height"></view>
<tn-modal v-model="showMode.show" :title="showMode.title" :content="showMode.content" :button="showMode.button"
@click="modeClick"></tn-modal>
<tn-popup v-model="hdModel" mode="right" :safeAreaInsetBottom="false" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="hdModel = false">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>互动消息</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height+'px;'}">
<!-- <view style="text-align: right;padding: 20rpx;">
<tn-button size="sm" backgroundColor="#3056D3" fontColor="#ffffff" height="60rpx">清理消息</tn-button>
</view> -->
</view>
<scroll-view scroll-y @scrolltolower="hdTolower" style="background-color: #F1F2F8;height: 100vh;">
<view class="text" style="padding:30rpx;">
<view style="background-color: #FFF;padding: 30rpx;border-radius: 20rpx;">
<view v-for="(item,index) in contentList"
@click="tn('/pages/packageB/paper/paper_info?id='+item.be_related_to_id)">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<view style="width: 110rpx;height: 110rpx">
<image v-if="item.member.photo_image==null||item.member.photo_image==''"
src="/static/def.png" style="width: 110rpx;height: 110rpx;border-radius:50%;">
</image>
<image v-if="item.member.photo_image!=null&&item.member.photo_image!=''"
:src="apiImgUrl+item.member.photo_image"
style="width: 110rpx;height: 110rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;">
<view>
<text
style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">{{item.member.nikename}}</text>
</view>
<view class="tn-text-ellipsis-2"
style="font-size: 28rpx;margin-top: 10rpx;color: #666666;">
<text v-if="item.type==1" class="tn-icon-praise-fill"
style="color: #3056D3;font-size: 30rpx;"></text>
<text v-if="item.type==2" class="tn-icon-star-fill"
style="color: #3056D3;font-size: 30rpx;"></text>
<text v-if="item.type==4" class="tn-icon-comment-fill"
style="color: #3056D3;font-size: 30rpx;"></text>
<text style="margin-left: 10rpx;">{{item.tweet.title}}</text>
</view>
<view style="margin-top: 10rpx;font-size: 24rpx;color: #999999;">{{item.content}}
</view>
</view>
</view>
<view style="font-size: 24rpx;color: #AAAAAA;padding-left: 120rpx;margin-top: 20rpx;">
{{item.createtime}}
</view>
<view v-if="index<contentList.length-1"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 30rpx 0rpx;"></view>
</view>
</view>
</view>
</scroll-view>
</tn-popup>
<tn-popup v-model="xtModel" mode="right" :safeAreaInsetBottom="false" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="xtModel = false">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>系统通知</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height+'px;'}">
<!-- <view style="text-align: right;padding: 20rpx;">
<tn-button size="sm" backgroundColor="#3056D3" fontColor="#ffffff" height="60rpx">清理消息</tn-button>
</view> -->
</view>
<scroll-view scroll-y @scrolltolower="xtTolower" style="background-color: #F1F2F8;height: 100vh;">
<view v-for="(item,index) in contentList" class="text" style="padding:30rpx;">
<view v-if="item.system_notification_type==1" @click="set_tn(item)"
style="background-color: #FFF;border-radius: 20rpx;padding:30rpx;margin-bottom: 30rpx;">
<view style="font-size: 32rpx;font-weight: bold;">
<text>管理员</text>
<text v-if="item.neirong.status==2" style="color: green;">审核通过</text>
<text v-if="item.neirong.status==3" style="color: red;">拒绝</text>
<text>了你发布的动态:</text>
</view>
<view style="font-size: 28rpx;color: #666666;margin-top: 20rpx;">
{{item.neirong.title}}
</view>
<view style="font-size: 24rpx;color: #AAAAAA;margin-top: 30rpx;">{{item.mail_time}}</view>
<view v-if="item.neirong.status==3"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 30rpx 0rpx;"></view>
<view v-if="item.neirong.status==3" style="font-size: 24rpx;color: #AAAAAA;margin-top: 30rpx;">
拒绝理由: {{item.neirong.remark}}</view>
</view>
<view v-if="item.system_notification_type==2" @click="tn('/pages/packageA/user/my_invoice')"
style="background-color: #FFF;border-radius: 20rpx;padding:30rpx;margin-bottom: 30rpx;">
<view style="font-size: 32rpx;font-weight: bold;">
<text>管理员</text>
<text v-if="item.neirong.if_ssue==1" style="color: green;">审核通过</text>
<text v-if="item.neirong.if_ssue==2" style="color: red;">拒绝</text>
<text>了你的发票申请</text>
</view>
<view style="font-size: 28rpx;color: #666666;margin-top: 20rpx;">
<view>{{item.neirong.unit}}</view>
<view style="margin:10rpx 0rpx;">{{item.neirong.name}} / {{item.neirong.createtime}}</view>
<view>发票金额: ¥{{item.neirong.money}}</view>
</view>
<view style="font-size: 24rpx;color: #AAAAAA;margin-top: 30rpx;">{{item.mail_time}}</view>
<view v-if="item.neirong.if_ssue==2"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 30rpx 0rpx;"></view>
<view v-if="item.neirong.if_ssue==2" style="font-size: 24rpx;color: #AAAAAA;margin-top: 30rpx;">
拒绝理由: {{item.reason}}</view>
</view>
<view v-if="item.system_notification_type==3" @click="tn('/pages/packageA/user/apply_in')"
style="background-color: #FFF;border-radius: 20rpx;padding:30rpx;margin-bottom: 30rpx;">
<view style="font-size: 32rpx;font-weight: bold;">
<text>管理员</text>
<text v-if="item.content==''" style="color: green;">审核通过</text>
<text v-if="item.content!=''" style="color: red;">拒绝</text>
<text>了你的入会申请</text>
</view>
<view style="font-size: 24rpx;color: #AAAAAA;margin-top: 30rpx;">{{item.mail_time}}</view>
<view v-if="item.content!=''"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 30rpx 0rpx;"></view>
<view v-if="item.content!=''" style="font-size: 24rpx;color: #AAAAAA;margin-top: 30rpx;">
拒绝理由: {{item.content}}</view>
</view>
</view>
</scroll-view>
</tn-popup>
<tn-popup v-model="hyModel" mode="right" :safeAreaInsetBottom="false" width="100%">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="hyModel = false">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>好友验证</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height+'px;'}">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-center" style="padding: 30rpx;">
<view class="tab_info" @click="getHyList(0)">
<view :style="current==0?'font-weight:600;color:#3056D3':''">我申请的</view>
<view v-if="current==0"
style="position: absolute;width: 50%;height: 8rpx;background-color: #3056D3;left: 0;right: 0;margin: 0 auto;bottom: -15rpx">
</view>
</view>
<view class="tab_info" style="margin-left: 60rpx;" @click="getHyList(1)">
<view :style="current==1?'font-weight:600;color:#3056D3':''">我收到的</view>
<view v-if="current==1"
style="position: absolute;width: 50%;height: 8rpx;background-color: #3056D3;left: 0;right: 0;margin: 0 auto;bottom: -15rpx">
</view>
</view>
</view>
</view>
<scroll-view scroll-y @scrolltolower="xtTolower" style="background-color: #F1F2F8;height: 100vh;">
<view class="text" style="padding:30rpx;">
<view style="background-color: #FFF;border-radius: 20rpx;padding:30rpx;margin-bottom: 30rpx;">
<view v-for="(item,index) in contentList">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<view
@click="tn('/pages/packageA/user/my_card?id='+(current==0?item.member_id:item.member_q_id))">
<image v-if="item.member_b_photo_image==null||item.member_b_photo_image==''"
src="/static/def.png"
style="width: 110rpx;height: 110rpx;border-radius:50%;">
</image>
<image v-if="item.member_b_photo_image!=null&&item.member_b_photo_image!=''"
:src="apiImgUrl+item.member_b_photo_image"
style="width: 110rpx;height: 110rpx;border-radius:50%;">
</image>
</view>
<view style="margin-left: 20rpx;">
<view>
<text
style="font-size: 32rpx;font-weight: bold;vertical-align: middle;">{{current==1?item.member_q_id_name:item.member_nikename}}</text>
</view>
<view style="margin-top: 10rpx;font-size: 24rpx;color: #999999;">
{{current==1?item.member_q_work_unit:item.member_work_unit}}
</view>
</view>
</view>
<view>
<tn-button v-if="item.if_tongyi==0" size="sm" shape="round"
backgroundColor="#3056D3" fontColor="#ffffff">已同意</tn-button>
<tn-button v-if="item.if_tongyi==1" size="sm" shape="round"
backgroundColor="#F1F2F8" fontColor="#888888">被拒绝</tn-button>
<tn-button @click="sqMode = true;sqInfo=item" v-if="item.if_tongyi==2" size="sm"
shape="round" backgroundColor="#FF7043" fontColor="#ffffff">操作</tn-button>
</view>
</view>
<view v-if="index<contentList.length-1"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 30rpx 0rpx;"></view>
</view>
</view>
</view>
</scroll-view>
</tn-popup>
<tn-modal v-model="sqMode" :custom="true">
<view>
<view style="text-align: center;color: #181818;font-size: 34rpx;font-weight: bold;">操作</view>
<view style="color: #777777;font-size: 28rpx;margin-top: 20rpx;">
点击确定按钮将同意后对方将看到你的个人名片信息
</view>
<view style="margin-top: 20rpx;">
<view class="tn-flex tn-flex-center tn-flex-row-between" style="margin-top: 40rpx;">
<view>
<tn-button @click="updateType(1,sqInfo.mail_id)" width="250rpx" :plain="true" shape="round"
size="lg" backgroundColor="#BABDC7" fontColor="#999999">拒绝
</tn-button>
</view>
<view>
<tn-button @click="updateType(0,sqInfo.mail_id)" width="250rpx" shape="round"
margin="0rpx 0 0 30rpx" size="lg" backgroundColor="#3056D3" fontColor="#ffffff">同意
</tn-button>
</view>
</view>
</view>
</view>
</tn-modal>
</view>
</template>
<script>
import {
msgTypeList,
interactionlIndex,
MaillogIndex,
MaillogUpdate,
MaillogUpdateState
mailMyMemberPost,
MaillogUpdate
} from "@/util/api";
import store from "@/store";
export default {
name: 'Message',
data() {
return {
loadingIn: 'loading',
uid: 0,
hdModel: false,
xtModel: false,
hyModel: false,
sqMode: false,
apiImgUrl: this.$store.state.imgUrl,
page: 1,
size: 10,
list: [],
id: 0,
if_tongyi: 0,
showMode: {
content: '',
title: '',
show: false,
key: 1,
button: [{
text: '取消',
backgroundColor: '#E6E6E6',
fontColor: '#FFFFFF',
},
{
text: '确定',
backgroundColor: 'tn-bg-indigo',
fontColor: '#FFFFFF'
}
]
}
current: 0,
tab_list: [{
name: '理事会'
}, {
name: '监事会'
}],
typeList: [],
contentList: [],
sqInfo: {}
}
},
onLoad() {
var uid = uni.getStorageSync('uid');
this.uid = uid;
this.getMaillogIndex();
this.getMsgTypeList();
},
onReachBottom() {
this.page = this.page + 1;
this.getMaillogIndex();
//this.getMaillogIndex();
},
methods: {
all_upadte_do() {
MaillogUpdateState({
member_b_id: this.uid
})
.then(res => {
console.log(res);
if (res.code == 1) {
store.state.msgCount = 0;
uni.showToast({
title: '操作成功!',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
this.showMode.show = false;
this.page = 1;
this.list = [];
this.getMaillogIndex();
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
all_upadte() {
this.showMode.show = true;
this.showMode.content = '确定修改为全部已读吗?';
this.showMode.title = '操作提示';
this.showMode.key = 2;
},
updateType(type, id) {
this.showMode.show = true;
this.showMode.content = type == 0 ? '确定要通过申请吗?' : '确定要拒绝申请吗?';
this.showMode.title = '操作提示';
this.showMode.key = 1;
this.id = id;
this.if_tongyi = type;
},
setMaillogUpdate() {
updateType(key, this_id) {
MaillogUpdate({
id: this.id,
if_tongyi: this.if_tongyi,
id: this_id,
if_tongyi: key,
state: 1, //
})
.then(res => {
@ -198,6 +366,7 @@
icon: 'none',
duration: 2000
});
this.getMaillogIndex(1);
} else {
uni.showToast({
title: res.msg,
@ -205,10 +374,6 @@
duration: 2000
});
}
this.showMode.show = false;
this.page = 1;
this.list = [];
this.getMaillogIndex();
})
.catch(error => {
uni.showToast({
@ -218,19 +383,24 @@
});
})
},
getMaillogIndex() {
MaillogIndex({
member_b_id: this.uid,
getHyList(d) {
this.page = 1;
this.contentList = [];
this.current = d;
this.sqMode = false;
if (d == 0) {
this.geTmailMyMemberPost();
} else {
this.getMaillogIndex(1);
}
},
geTmailMyMemberPost() {
mailMyMemberPost({
page: this.page,
size: this.size,
size: 10,
})
.then(res => {
console.log(res.data.length);
this.list.push(...res.data);
if (res.data.length == 0 || this.list.length < 5) {
this.loadingIn = 'nomore';
}
this.contentList = res.data;
})
.catch(error => {
uni.showToast({
@ -240,23 +410,88 @@
});
})
},
modeClick(i) {
if (i.index == 0) {
this.showMode.show = false;
}
if (this.showMode.key == 1 && i.index == 1) {
this.setMaillogUpdate();
}
if (this.showMode.key == 2 && i.index == 1) {
this.all_upadte_do();
openMode(item) {
console.log(item);
this.page = 1;
this.contentList = [];
if (item.type == 3) {
this.getInteractionlIndex();
} else {
if (item.type == 0) {
this.xtModel = true;
this.getMaillogIndex(item.type);
} else {
this.hyModel = true;
this.geTmailMyMemberPost();
}
}
},
getMaillogIndex(type) {
MaillogIndex({
page: this.page,
size: 10,
type: type,
})
.then(res => {
this.contentList = res.data;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getInteractionlIndex() {
interactionlIndex({
page: this.page,
size: 10
})
.then(res => {
this.hdModel = true;
this.contentList.push(...res.data.data);
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
hdTolower() {
console.log(1);
this.page += 1;
this.getInteractionlIndex();
},
getMsgTypeList() {
msgTypeList()
.then(res => {
console.log(res);
this.typeList = res.data;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
//
tn(e) {
uni.navigateTo({
url: e,
});
},
set_tn(item) {
if (item.neirong.status != 3) {
uni.navigateTo({
url: '/pages/packageB/paper/paper_info?id=' + item.be_related_to_id,
});
}
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
@ -356,4 +591,10 @@
overflow: hidden;
// background-color: #FFFFFF;
}
.tab_info {
font-size: 32rpx;
position: relative;
color: #999999;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<view>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
@ -12,11 +12,12 @@
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 20+'px'}" v-if="info!=''">
<view :style="{paddingTop: vuex_custom_bar_height+'px'}" v-if="info!=''">
<view style="">
<image :src="apiImgUrl+info.activity_image" style="display: block;width: 100%;" mode="widthFix">
</image>
</view>
<view style="padding:0rpx 30rpx;text-align: center;">
<view style="">
<text class="tn-icon-trust-fill" style="font-size: 250rpx;color: #01BEFF;"></text>
</view>
<view style="font-size: 38rpx;font-weight: 600;margin-top: 40rpx;">{{info.activity_name}}</view>
<view style="margin-top: 100rpx;font-size: 32rpx;font-weight: 600;">
<view>开始时间{{info.activity_start_time}}</view>
@ -41,6 +42,8 @@
export default {
data() {
return {
apiImgUrl: this.$store.state.imgUrl,
apiUpUrl: this.$store.state.apiUrl,
topCurrent: 1,
activity_id: '',
member_id: '',
@ -65,7 +68,7 @@
getEventInfo() {
console.log('---3---');
eventInfo({
association_id: this.association_id,
association_id: 1,
id: this.activity_id
})
.then(res => {
@ -86,7 +89,7 @@
activitySign({
activity_id: this.activity_id,
member_id: this.member_id,
association_id: this.association_id,
association_id: 1,
})
.then(res => {
console.log(res);

View File

@ -0,0 +1,107 @@
<template>
<view class="template-edit tn-safe-area-inset-bottom">
<!-- 顶部自定义导航 -->
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="transparent">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;color: #000000;"></text>
</view>
<view
style="letter-spacing: 1px;font-size: 34rpx;text-align: center;width: 83%;font-weight: bold;color: #000000;">
<text>积分明细</text>
</view>
</view>
</tn-nav-bar>
<view class="tn-safe-area-inset-bottom" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view class="tn-shadow tn-bg-white tn-margin">
<view class="tn-text-center tn-color-blue" style="padding: 30rpx 0;">
<text style="font-size: 110rpx;margin-left: -20rpx;">{{number}}</text>
<text class="tn-text-lg tn-padding-left-xs" style="">积分</text>
</view>
</view>
</view>
<view class="tn-padding-bottom-lg">
<view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding" v-for="(item,index) in integral"
:key="index">
<view class="justify-content-item">
<view class="tn-color-gray--dark tn-text-lg">
{{item.content}}
</view>
<view class="tn-color-gray tn-padding-top-xs">
{{item.createtime}}
</view>
</view>
<view class="justify-content-item tn-text-xl tn-padding-top">
<view v-if="item.type==1" style="color: #28B93D;">+{{item.number}}</view>
<view v-if="item.type==2" style="color: #E83A30;">-{{item.number}}</view>
</view>
</view>
</view>
<tn-toast ref="toast"></tn-toast>
</view>
</template>
<script>
import {
integralIndex,
} from "@/util/api";
import store from "@/store";
export default {
data() {
return {
integral: [],
page: 1,
number: 0,
}
},
onLoad() {
this.getIntegralIndex();
},
onReachBottom() {
this.page += 1;
this.getIntegralIndex();
},
methods: {
getIntegralIndex() {
integralIndex({
page: this.page
})
.then(res => {
console.log(res);
this.integral.push(...res.data.ret);
this.number = res.data.number;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
//
tn(e) {
uni.navigateTo({
url: e,
});
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
},
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,226 @@
<template>
<view
style="background: url('https://hnyea.0rui.cn/uploads/1/20240722/7f5a72050b9cbc409fb60fa8d32db76a.png');background-repeat: no-repeat;background-size: 100% 555rpx;">
<!-- 顶部自定义导航 -->
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="transparent">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;color: #000000;"></text>
</view>
<view
style="letter-spacing: 1px;font-size: 34rpx;text-align: center;width: 83%;font-weight: bold;color: #000000;">
<text>每日签到</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding:30rpx 30rpx 0rpx 30rpx;">
<view style="border-radius: 20rpx;overflow: hidden;box-shadow: 0rpx 6rpx 20rpx 0rpx rgba(0,0,0,0.1);">
<view>
<uni-calendar :startDate="startDate" :endDate="startDate" class="uni-calendar--hook"
:selected="selected" :showMonth="true" />
</view>
</view>
</view>
<!-- <view style="text-align: center;">
<tn-button @click="signIn" backgroundColor="#01BEFF" fontColor="#ffffff">签到</tn-button>
</view> -->
</view>
<view style="padding: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<view style="font-size: 34rpx;font-weight: bold;">我的积分</view>
<view style="height: 30rpx;width: 1px;background-color:#6FBEFF;margin: 0rpx 10rpx;"></view>
<view style="margin-right: 10rpx;">
<image src="/static/ji.png" style="width: 30rpx;height: 30rpx;"></image>
</view>
<view style="font-size: 34rpx;font-weight: bold;color: #3056D3;">{{myNumber}}</view>
</view>
</view>
<view style="padding-bottom: 80rpx;">
<view class="tn-flex tn-flex-row-between tn-strip-bottom-min tn-padding" v-for="(item,index) in integral"
:key="index">
<view class="justify-content-item">
<view class="tn-text-lg" style="color:#3056D3;">
日常签到
</view>
<view class="tn-color-gray tn-padding-top-xs">
{{item.sign_date}}
</view>
</view>
<view class="justify-content-item tn-text-xl tn-padding-top">
<view style="color: #3056D3;">+{{item.number}}</view>
</view>
</view>
</view>
<view
style="position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 40rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-center">
<view @click="signIn"
style="line-height: 80rpx;height: 80rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius:90rpx;">
<text>签到</text>
</view>
</view>
</view>
<tn-toast ref="toast"></tn-toast>
</view>
</template>
<script>
import {
pointsSignIn,
pointsSignMonth,
findPointsNumber,
signInRecords
} from "@/util/api";
import store from "@/store";
export default {
data() {
return {
selected: [],
startDate: '',
integral: [],
myNumber: 0,
}
},
onLoad() {
this.startDate = this.getDate().fullDate;
this.getSignInList();
this.getSignInRecords();
this.getUserNumber();
},
methods: {
getUserNumber() {
findPointsNumber()
.then(res => {
if(res.code==1){
this.myNumber = res.data;
}else{
this.myNumber = 0;
}
console.log(res);
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getSignInRecords() {
var uid = uni.getStorageSync('uid');
signInRecords({
member_id: uid
})
.then(res => {
console.log(res);
this.integral = res.data;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getSignInList() {
var uid = uni.getStorageSync('uid');
pointsSignMonth({
member_id: uid
})
.then(res => {
console.log(res);
var attendanceData = res.data;
const formattedAttendance = Object.keys(attendanceData).map(date => ({
date: date,
info: attendanceData[date] ? '已签到' : '未签到',
is: attendanceData[date] ? '1' : '0',
}));
this.selected = formattedAttendance;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
signIn() {
var uid = uni.getStorageSync('uid');
pointsSignIn({
member_id: uid
})
.then(res => {
console.log(res);
if (res.status == 'error') {
this.$refs.toast.show({
content: res.message,
duration: 2000
})
} else {
this.$refs.toast.show({
content: res.msg,
duration: 2000
})
}
this.getSignInList();
this.getSignInRecords();
this.getUserNumber();
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getDate(date, AddDayCount = 0) {
if (!date) {
date = new Date()
}
if (typeof date !== 'object') {
date = date.replace(/-/g, '/')
}
const dd = new Date(date)
dd.setDate(dd.getDate() + AddDayCount) // AddDayCount
const y = dd.getFullYear()
const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 100
const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 100
return {
fullDate: y + '-' + m + '-' + d,
year: y,
month: m,
date: d,
day: dd.getDay()
}
},
//
tn(e) {
uni.navigateTo({
url: e,
});
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
},
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -10,7 +10,7 @@
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view v-if="info!=''" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 30rpx;">
<image :src="apiImgUrl+info.activity_image"
style="display: block;width: 100%;border-radius: 20rpx 20rpx 0rpx 0rpx;" mode="widthFix"></image>
@ -18,7 +18,7 @@
<view style="font-size: 34rpx;font-weight: bold;">{{ info.activity_name }}</view>
<view style="font-size: 28rpx;color: #666666;margin-top: 20rpx;">
<text class="tn-icon-time"></text>
<text>{{formatTime(info.activity_end_time)}}-{{formatTime(info.activity_start_time)}}</text>
<text>{{formatTime(info.activity_start_time)}} - {{formatTime(info.activity_end_time)}}</text>
</view>
<view style="font-size: 28rpx;color: #666666;margin-top: 20rpx;">
<text class="tn-icon-location" style="vertical-align: middle;"></text>
@ -37,207 +37,92 @@
</view>
</view>
</view>
<view style="height: 80rpx;"></view>
<view v-if="info.activity_type==2" style="padding-bottom: 180rpx;padding:0rpx 30rpx;">
<view style="background-color: #ffffff;border-radius: 20rpx;padding: 30rpx;">
<view style="font-size: 34rpx;font-weight: 600;padding: 20rpx 0rpx;">问卷问题</view>
<tn-form labelPosition="top" :model="form" ref="form">
<template v-for="(item,index) in questionnaireList">
<tn-form-item v-if="item.type==2" :label="(index+1)+'、'+item.title+'(多选题)'" prop="hobby">
<tn-checkbox-group v-model="questionnaireList[index].topic" size="40"
activeColor="#82B2FF" wrap>
<tn-checkbox :name="op.name" v-for="(op,opi) in item.option">
{{ op.name }}{{ op.val }}
</tn-checkbox>
</tn-checkbox-group>
</tn-form-item>
<tn-form-item v-if="item.type==1" :label="(index+1)+'、'+item.title+'(单选题)'" prop="danxuan">
<tn-radio-group v-model="questionnaireList[index].topic" size="40" activeColor="#82B2FF"
wrap>
<tn-radio :name="op.name" v-for="(op,opi) in item.option">
{{ op.name }}{{ op.val }}
</tn-radio>
</tn-radio-group>
</tn-form-item>
<tn-form-item v-if="item.type==3" :label="(index+1)+'、'+item.title+'(问答题)'" prop="wenda">
<tn-input placeholder="请填写答案" v-model="questionnaireList[index].topic"
type="textarea" />
</tn-form-item>
</template>
</tn-form>
</view>
</view>
<view style="height: 300rpx;"></view>
<view
style="border-radius: 200rpx;background: #FFFFFF;position: fixed;bottom: 50rpx;right: 30rpx;padding: 30rpx 50rpx;box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(48,86,211,0.15);">
style="border-radius: 200rpx;background: #FFFFFF;position: fixed;bottom: 220rpx;right: 20rpx;padding: 20rpx;box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(48,86,211,0.15);">
<view style="text-align: center;" class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view>
<button hover-class="none" open-type="share">
<view style="font-size: 42rpx;">
<text class="tn-icon-send"></text>
</view>
<view style="color: #666666;">
分享
</view>
</button>
</view>
<view style="margin: 0px 40rpx;">
<view style="margin: 0px 40rpx;" @click="like">
<view style="font-size: 42rpx;">
<text class="tn-icon-praise"></text>
</view>
<view style="color: #666666;">
点赞
<text v-if="info.like==1" class="tn-icon-praise-fill tn-color-red"></text>
<text v-if="info.like==2" class="tn-icon-praise"></text>
</view>
</view>
<view>
<view @click="favs">
<view style="font-size: 42rpx;">
<text class="tn-icon-star"></text>
</view>
<view style="color: #666666;">
收藏
<text v-if="info.fav==1" class="tn-icon-star-fill tn-color-orangeyellow"></text>
<text v-if="info.fav==2" class="tn-icon-star"></text>
</view>
</view>
</view>
</view>
<!-- <view>
<view style="padding:20rpx 30rpx;">
<view style="font-size: 34rpx;font-weight: 600;">{{ info.activity_name }}</view>
<view style="margin-top: 40rpx;">
<view>
<text style="color: #26BB71;"></text>
<text style="margin-left: 10rpx;font-weight: 600;">活动开始时间</text>
<text style="color: #979797;">{{ info.activity_start_time }}</text>
</view>
<view style="margin: 15rpx 0rpx;">
<text style="color: #BE7E28;"></text>
<text style="margin-left: 10rpx;font-weight: 600;">活动结束时间</text>
<text style="color: #979797;">{{ info.activity_end_time }}</text>
</view>
<view>
<text style="color: #DB5022;"></text>
<text style="margin-left: 10rpx;font-weight: 600;">活动地点</text>
<text style="color: #979797;">{{ info.activity_location }}</text>
</view>
<view style="margin: 15rpx 0rpx;">
<text style="color: #0000FF;"></text>
<text style="margin-left: 10rpx;font-weight: 600;">活动规模</text>
<text style="color: #979797;">{{info.number==0?'不限制':info.number+'人'}}</text>
</view>
<view v-if="info.activity_type!=1&&info.activity_type!=4">
<view style="margin: 15rpx 0rpx;" v-if="info.if_display_registrants==2">
<text style="color: #0000FF;"></text>
<text v-if="info.activity_type==3"
style="margin-left: 10rpx;font-weight: 600;">捐赠人数</text>
<text v-if="info.activity_type==2"
style="margin-left: 10rpx;font-weight: 600;">填写人数</text>
<text v-if="info.activity_type==1||info.activity_type==4"
style="margin-left: 10rpx;font-weight: 600;">报名人数</text>
<text style="color: #979797;">{{ info.list.length}}</text>
</view>
<view style="margin: 15rpx 0rpx;" v-if="info.if_display_registrants==1"
class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
@click="rightMod = true">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<view style="color: #0000FF;"></view>
<view v-if="info.activity_type==3" style="margin-left: 10rpx;font-weight: 600;">
捐赠详情</view>
<view v-if="info.activity_type==2" style="margin-left: 10rpx;font-weight: 600;">
填写详情</view>
<view v-if="info.activity_type==1||info.activity_type==4"
style="margin-left: 10rpx;font-weight: 600;">报名详情</view>
<tn-avatar-group :border="false" :lists="info.list.slice(0, 10)"></tn-avatar-group>
</view>
<view>
<text style="margin-right: 10rpx">{{info.list.length}}</text>
<text class="tn-icon-right"></text>
</view>
</view>
</view>
</view>
<view
style="position: fixed;box-shadow: 0px -2px 4px 0px rgba(186,189,199,0.2);background: #FFFFFF;width: 100%;bottom: 0;padding:30rpx 60rpx 80rpx 60rpx;">
<view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==1">
<button class="mmy" hover-class="none" @click="application_add"
v-if="info.type=='进行中'">确认报名</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">报名已结束</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">报名未开始</button>
</view>
<view v-if="info.activity_type==1||info.activity_type==4">
<view style="width: 100%;height: 10rpx;background-color: #EBF4F7"></view>
<view style="padding:20rpx 30rpx;">
<view style="margin: 15rpx 0rpx;">
<text style="color: #26BB71;"></text>
<text style="margin-left: 10rpx;font-weight: 600;">报名开始时间</text>
<text style="color: #979797;">{{ info.signup_start_time }}</text>
</view>
<view style="margin: 15rpx 0rpx;">
<text style="color: #BE7E28;"></text>
<text style="margin-left: 10rpx;font-weight: 600;">报名结束时间</text>
<text style="color: #979797;">{{ info.signup_end_time }}</text>
</view>
<view style="margin: 15rpx 0rpx;" v-if="info.if_display_registrants==2">
<text style="color: #0000FF;"></text>
<text style="margin-left: 10rpx;font-weight: 600;">报名人数</text>
<text style="color: #979797;">{{ info.list.length}}</text>
</view>
<view style="margin: 15rpx 0rpx;" v-if="info.if_display_registrants==1"
class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
@click="rightMod = true">
<view class="tn-flex tn-flex-center tn-flex-col-center">
<view style="color: #0000FF;"></view>
<view style="margin-left: 10rpx;font-weight: 600;">报名详情</view>
<tn-avatar-group :border="false" :lists="info.list.slice(0, 10)"></tn-avatar-group>
</view>
<view>
<text style="margin-right: 10rpx">{{info.list.length}}</text>
<text class="tn-icon-right"></text>
</view>
</view>
</view>
<view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==2">
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">问卷未开始</button>
<button class="mmy" hover-class="none" @click="option_add" v-if="info.type=='进行中'">确认提交</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">问卷已结束</button>
</view>
<view style="width: 100%;height: 10rpx;background-color: #EBF4F7"></view>
<view style="padding:20rpx 30rpx;">
<view style="margin-top: 20rpx;font-size: 32rpx;font-weight: 600;">活动介绍</view>
<view>
<view class="ks_html" style="line-height: 50rpx;margin-top: 20rpx;">
<view v-if="info.video!=null&&info.video!=''">
<video :src="apiImgUrl+info.video" style="width: 100%;border-radius: 5rpx;"></video>
</view>
<view v-html="info.activity_content"></view>
</view>
</view>
<view v-if="info.activity_type==1||info.activity_type==3" style="height: 180rpx;"></view>
<view v-if="info.activity_type==2" style="padding-bottom: 180rpx;">
<view style="margin-top: 60rpx;font-size: 32rpx;font-weight: 600;">问卷问题</view>
<tn-form labelPosition="top" :model="form" ref="form">
<template v-for="(item,index) in questionnaireList">
<tn-form-item v-if="item.type==2" :label="(index+1)+'、'+item.title+'(多选题)'"
prop="hobby">
<tn-checkbox-group v-model="questionnaireList[index].topic" size="40"
activeColor="#82B2FF" wrap>
<tn-checkbox :name="op.name" v-for="(op,opi) in item.option">
{{ op.name }}{{ op.val }}
</tn-checkbox>
</tn-checkbox-group>
</tn-form-item>
<tn-form-item v-if="item.type==1" :label="(index+1)+'、'+item.title+'(单选题)'"
prop="danxuan">
<tn-radio-group v-model="questionnaireList[index].topic" size="40"
activeColor="#82B2FF" wrap>
<tn-radio :name="op.name" v-for="(op,opi) in item.option">
{{ op.name }}{{ op.val }}
</tn-radio>
</tn-radio-group>
</tn-form-item>
<tn-form-item v-if="item.type==3" :label="(index+1)+'、'+item.title+'(问答题)'"
prop="wenda">
<tn-input placeholder="请填写答案" v-model="questionnaireList[index].topic"
type="textarea" />
</tn-form-item>
</template>
</tn-form>
</view>
<view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==3">
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">捐助未开始</button>
<button class="mmy" hover-class="none" @click="juanMod=true;money=''"
v-if="info.type=='进行中'">我要捐助</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">捐助已结束</button>
</view>
</view> -->
<view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==4">
<button class="mmy" hover-class="none" @click="peiMod=true" v-if="info.type=='进行中'">我要参加</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">报名已结束</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">报名未开始</button>
</view>
</view>
</view>
<!-- <view style="position: fixed;bottom: 30rpx; width: 100%;"> -->
<!-- <view class="tn-flex tn-flex-center tn-flex-row-center tn-flex-col-center"-->
<!-- style="background-color: #FDF2EC;text-align: center;padding: 30rpx;">-->
<!-- <view style="font-weight: 600;">-->
<!-- <text style="margin-right: 10rpx;">距报名结束剩<text style="color: #F73909;">119</text></text>-->
<!-- <tn-count-down fontColor="#F73909" backgroundColor="#FDF2EC" :fontSize="30" :timestamp="86400"-->
<!-- :showDays="true" :showHours="true" :showSeconds="true" :showMinutes="true"></tn-count-down>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==1">
<button class="mmy" hover-class="none" @click="application_add" v-if="info.type=='进行中'">确认报名</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">报名已结束</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">报名未开始</button>
</view>
<view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==2">
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">问卷未开始</button>
<button class="mmy" hover-class="none" @click="option_add" v-if="info.type=='进行中'">确认提交</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">问卷已结束</button>
</view>
<view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==3">
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">捐助未开始</button>
<button class="mmy" hover-class="none" @click="juanMod=true" v-if="info.type=='进行中'">我要捐助</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">捐助已结束</button>
</view>
<view style="text-align: center;padding:0 30rpx;" v-if="info.activity_type==4">
<button class="mmy" hover-class="none" @click="peiMod=true" v-if="info.type=='进行中'">我要参加</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='已结束'">报名已结束</button>
<button class="mmy" hover-class="none" :disabled="true" v-if="info.type=='未开始'">报名未开始</button>
</view> -->
<!-- </view> -->
<tn-modal v-model="juanMod" :custom="true">
<view style="padding: 20rpx;text-align: center;font-size: 40rpx;">感谢您的捐助</view>
<tn-form :labelWidth="180">
<tn-form-item label="捐助金额">
<tn-input v-model="money" type="decimal" placeholder="请填写捐助金额" />
<tn-input v-model="money" :maxLength="5" type="decimal" placeholder="请填写捐助金额" />
</tn-form-item>
</tn-form>
<view class="tn-flex tn-flex-row-center" style="margin-top: 50rpx;">
@ -309,7 +194,11 @@
applicationAdd,
questionnaireAdd,
moneyLogAdd,
wxphoneLogin
wxphoneLogin,
likeDo,
favsDo,
likeRevoke,
favsRevoke
} from '@/util/api.js';
import store from '@/store/index.js'
@ -363,6 +252,7 @@
// var id = this.$route.query.id;
// this.id = id;
// this.getEventInfo();
//12
},
onShareAppMessage() { //
//
@ -395,11 +285,128 @@
if (!uid) {
getApp().getUserLogin((r) => {
console.log('---Login---', r);
this.getEventInfo();
})
}else{
this.getEventInfo();
}
this.getEventInfo();
},
methods: {
like() {
var uid = uni.getStorageSync('uid');
if (!uid) {
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 2000
});
return;
}
if (this.info.like == 2) {
likeDo({
member_id: uid,
related_id: this.id,
related_type: 'article',
})
.then(res => {
console.log(res);
uni.showToast({
title: '赞成功!',
icon: 'none',
duration: 2000
});
this.info.like = 1;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
} else {
likeRevoke({
member_id: uid,
related_id: this.id,
related_type: 'article',
})
.then(res => {
console.log(res);
uni.showToast({
title: '取消成功!',
icon: 'none',
duration: 2000
});
this.info.like = 2;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
}
},
favs() {
var uid = uni.getStorageSync('uid');
if (!uid) {
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 2000
});
return;
}
if (this.info.fav == 2) {
favsDo({
member_id: uid,
related_id: this.id,
related_type: 'article',
})
.then(res => {
console.log(res);
uni.showToast({
title: '收藏成功!',
icon: 'none',
duration: 2000
});
this.info.fav = 1;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
} else {
favsRevoke({
member_id: uid,
related_id: this.id,
related_type: 'article',
})
.then(res => {
console.log(res);
uni.showToast({
title: '取消收藏成功!',
icon: 'none',
duration: 2000
});
this.info.fav = 2;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
}
},
PhoneLogin(d) {
console.log(d);
this.showLogin = false;
@ -441,7 +448,7 @@
this.peiMod = false;
var uid = uni.getStorageSync('uid');
if (!uid) {
this.modalAdd.showLogin = true;
this.showLogin = true;
return;
}
applicationAdd({
@ -477,7 +484,15 @@
this.juanMod = false;
var uid = uni.getStorageSync('uid');
if (!uid) {
this.modalAdd.showLogin = true;
this.showLogin = true;
return;
}
if (this.money == '' || this.money == 0) {
uni.showToast({
title: '请填写金额!',
icon: 'none',
duration: 2000
});
return;
}
moneyLogAdd({
@ -512,7 +527,7 @@
option_add() {
var uid = uni.getStorageSync('uid');
if (!uid) {
this.modalAdd.showLogin = true;
this.showLogin = true;
return;
}
var that = this;
@ -564,7 +579,7 @@
application_add() {
var uid = uni.getStorageSync('uid');
if (!uid) {
this.modalAdd.showLogin = true;
this.showLogin = true;
return;
}
applicationAdd({
@ -646,7 +661,9 @@
})
},
formatTime(time) {
return time.split(" ")[0];
let date = time.split(" ")[0]; //
let hour = time.split(" ")[1].substring(0, 5); //
return date + " " + hour;
},
goBack() {
if (getCurrentPages().length > 1) {

View File

@ -0,0 +1,128 @@
<template>
<view v-cloak>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>信息补充</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 30rpx;">
<tn-form ref="form" :labelWidth="150">
<tn-form-item label="公司地址" required>
<view @click="openLocation" class="tn-flex tn-flex-row-right tn-flex-center tn-flex-col-center">
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">
{{formData.enterprise_location}}
</view>
<view class="tn-icon-right" style="margin-left: 20rpx;"></view>
</view>
</tn-form-item>
</tn-form>
</view>
</view>
<view
style="z-index: 200;;position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 40rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-center">
<view @click="insArea()"
style="line-height: 80rpx;height: 80rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius: 90rpx;">
<text>提交</text>
</view>
</view>
</view>
</view>
</template>
<script>
import {
userEditArea
} from '@/util/api.js';
import store from '@/store/index.js'
export default {
data() {
return {
apiImgUrl: this.$store.state.imgUrl,
formData: {
longitude: '',
dimension: '',
enterprise_location: '',
}
}
},
mounted() {
},
onLoad(d) {
var uid = uni.getStorageSync('uid');
this.uid = d.uid;
},
methods: {
openLocation() {
var that = this;
uni.chooseLocation({
success(res) {
console.log(res);
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
that.formData.enterprise_location = res.address;
that.formData.longitude = res.longitude;
that.formData.dimension = res.latitude;
},
fail(res) {
console.log(res);
}
});
},
insArea() {
this.formData.id = this.uid;
this.formData.association_id = store.state.Gid;
if (this.formData.dimension == '' || this.formData.longitude == '') {
uni.showToast({
title: '请选择公司地址',
icon: 'none',
duration: 2000
});
return;
}
userEditArea(this.formData)
.then(res => {
if (res.code == 1) {
uni.showToast({
title: '信息填充成功!',
duration: 2000
});
}
console.log(res);
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
}
},
}
</script>
<style>
</style>

View File

@ -21,11 +21,11 @@
<view v-for="(item,index) in news_list" :class="{'rounded_corner': index === 0}">
<view class="tn-flex tn-flex-row-between" @click="openNewUrl(item)"
style="padding: 20rpx;min-height: 200rpx;">
<view style="margin-left: 20rpx;" v-if="item.news_image">
<view style="margin-left: 20rpx;width: 44%;" v-if="item.news_image">
<image :src="apiImgUrl+item.news_image" mode="aspectFill"
style="width: 280rpx;height: 180rpx;border-radius: 20rpx;"></image>
</view>
<view style="position:relative;padding:0rpx 10rpx 10rpx 15rpx">
<view style="position:relative;padding:0rpx 10rpx 10rpx 15rpx;width: 100%;">
<view class="tn-text-ellipsis-2" style="font-size: 32rpx;font-weight: bold;">
{{ item.news_title }}
</view>
@ -63,9 +63,14 @@
page: 1,
size: 10,
apiImgUrl: this.$store.state.imgUrl,
typeId: 0,
}
},
onLoad() {
onLoad(d) {
console.log(d.type);
if (typeof(d.type) != 'undefined') {
this.typeId = d.type;
}
this.getNewsGoryList();
},
onReachBottom() {
@ -118,7 +123,12 @@
// });
this.goryList = key;
this.type = 0;
this.gory_id = key[0].id;
if (this.typeId != 0) {
this.gory_id = this.typeId;
this.current = this.goryList.findIndex(item => item.id == this.typeId);
} else {
this.gory_id = key[0].id;
}
this.getNewsList();
}
})

View File

@ -0,0 +1,100 @@
<template>
<view style="letter-spacing: 1rpx;">
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>意见建议</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-padding-top tn-margin">
<view class="tn-flex justify-content-item">
<view class="tn-text-lg tn-padding-right-xs tn-text-bold">建议内容<text style="color: red;">*</text>
</view>
</view>
</view>
<view class="tn-margin tn-bg-gray--light tn-padding" style="border-radius: 10rpx;">
<textarea v-model="text" maxlength="1000" placeholder="请填写内容" placeholder-style="color:#AAAAAA"
style="height: 160rpx;"></textarea>
</view>
</view>
<view style="margin-top: 80rpx;">
<view class="tn-flex-1 justify-content-item tn-text-center">
<tn-button shape="round" backgroundColor="#3B89FB" padding="40rpx 0" width="70%" fontBold
@click="doSubmit()">
<text class="tn-color-white"> </text>
</tn-button>
</view>
</view>
</view>
</template>
<script>
import {
messageAdd,
} from '@/util/api.js';
import store from '@/store/index.js'
export default {
data() {
return {
text: '',
}
},
// mounted() {
// var id = window.location.href.split("=")[1];
// this.id = id;
// this.getNewsInfo();
// },
onLoad(d) {
},
methods: {
doSubmit() {
messageAdd({
text: this.text,
})
.then(res => {
console.log(res);
if (res.code == 1) {
uni.showToast({
title: '反馈成功!',
duration: 2000
});
} else {
uni.showToast({
icon: "error",
title: res.msg,
duration: 2000
});
}
})
.catch(error => {
uni.showToast({
title: error,
duration: 2000
});
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
},
}
}
</script>
<style>
.ks_html img {
width: 100% !important;
}
</style>

View File

@ -0,0 +1,188 @@
<template>
<view style="background: #F1F2F8;min-height: 100vh;" v-cloak>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>发布动态</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding: 30rpx;">
<view style="background-color: #ffffff;border-radius: 20rpx;">
<view style="padding: 20rpx;">
<view style="width: 100%;">
<tn-input :clearable="false"
placeholderStyle="font-size: 34rpx;font-weight: bold;color:#BABDC7"
:customStyle="{width:'650rpx',padding:'20rpx'}" :height="100"
placeholder="填写吸引人的标题,更容易收获赞哦" v-model="title" />
</view>
<view style="border-top: #BABDC7 1rpx dashed;padding-top: 20rpx;margin-top: 20rpx;">
<tn-input :clearable="false" :customStyle="{padding:'20rpx'}" :height="200" type="textarea"
placeholder="在这里发布内容吧..." v-model="content" />
</view>
<!-- <view style="padding: 20rpx;">-->
<!-- <text style="color: #666666;font-size: 28rpx;font-weight: 500;">活动分类</text>-->
<!-- <text style="color: #BABDC7;" class="tn-icon-down-triangle"></text>-->
<!-- </view>-->
<view style="margin-top: 20rpx;">
<view>
<view class="tn-flex" style=" flex-wrap: wrap;" slot="addBtn"
hover-class="tn-hover-class" hover-stay-time="150">
<view v-for="(item,index) in images" style="margin: 5rpx;position: relative">
<image :src="apiImgUrl+item"
style="width: 200rpx;height: 200rpx;border-radius: 20rpx;" mode="aspectFit">
</image>
<view style="position:absolute;right: -5rpx;top: -5rpx;"
@click="del_img(index)">
<text class="tn-icon-delete-fill"
style="color: red;font-size: 40rpx"></text>
</view>
</view>
<view v-if="images.length<9" @click="upload_img"
style="margin: 5rpx 5rpx;background: #F1F2F8;border-radius: 20rpx;width: 200rpx;height: 200rpx;text-align: center;line-height: 200rpx;">
<text style="color: #BABDC7;font-size: 100rpx;" class="tn-icon-add"></text>
</view>
</view>
</view>
<view style="font-size: 14px;padding: 20rpx 0rpx;color: #999999;">
发布动态使用{{info.consumption_poin}}积分</view>
</view>
</view>
</view>
</view>
</view>
<view
style="position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 40rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-center">
<view
style="line-height: 90rpx;height: 90rpx;text-align: center;width: 40%;;border-radius: 90rpx 0rpx 0rpx 90rpx;background: #FFFFFF;border: 1rpx solid #BABDC7;">
<text style="margin-left: 10rpx;color: #999999;">取消</text>
</view>
<view @click="addSubmit()"
style="line-height: 90rpx;height: 90rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius: 0rpx 90rpx 90rpx 0rpx;">
<text>发布</text>
</view>
</view>
</view>
</view>
</template>
<script>
import {
tweetsPostAdd,
pointsRuleFind
} from '@/util/api.js';
import store from '@/store/index.js'
export default {
data() {
return {
title: '',
content: '',
images: [],
apiImgUrl: this.$store.state.imgUrl,
apiUpUrl: this.$store.state.apiUrl,
info: {}
}
},
onLoad() {
this.getInfo();
},
methods: {
getInfo() {
pointsRuleFind({
id: 1,
})
.then(res => {
console.log(res);
this.info = res.data;
})
.catch(error => {
uni.showToast({
title: error,
duration: 2000
});
})
},
addSubmit() {
tweetsPostAdd({
association_id: 1,
title: this.title,
content: this.content,
images: this.images
})
.then(res => {
console.log(res);
if (res.code == 1) {
uni.showModal({
title: '提示',
content: '发布成功,审核通过后显示!',
success: function(res) {
uni.navigateBack()
}
});
} else {
uni.showModal({
title: '提示',
content: res.msg,
success: function(res) {}
});
}
})
.catch(error => {
uni.showToast({
title: error,
duration: 2000
});
})
},
del_img(index) {
this.images.splice(index, 1);
},
upload_img() {
var user_info = uni.getStorageSync('userInfo');
var that = this;
uni.chooseMedia({
count: 9, //9
mediaType: ['image'],
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
success: function(res) {
console.log(res);
var url = res.tempFiles[0].tempFilePath;
uni.uploadFile({
url: that.apiUpUrl + '/common/upload', //
filePath: url,
name: 'file',
formData: {
association_id: 1,
},
success: (uploadFileRes) => {
var data = JSON.parse(uploadFileRes.data);
console.log(data);
that.images.push(data.data.url);
}
});
}
});
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
}
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,465 @@
<template>
<view style="background: #F1F2F8;min-height: 100vh;" v-cloak>
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="true" backgroundColor="#FFFFFF">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;"></text>
</view>
<view style="width: 83%;font-weight: bold;">
<text>动态详情</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="padding-bottom: 200rpx;">
<view style="background-color: #FFFFFF;margin: 20rpx;border-radius: 20rpx;">
<view style="padding:30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between" style="width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="width: 100%;">
<view @click="tn('/pages/packageA/user/my_card?id='+info.member.id)">
<image v-if="info.member.photo_image==''||info.member.photo_image==null"
src="/static/def.png" style="width: 100rpx;height: 100rpx;border-radius: 50%;">
</image>
<image v-if="info.member.photo_image!=''&&info.member.photo_image!=null"
:src="apiImgUrl+info.member.photo_image"
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
</view>
<view style="margin-left: 10rpx;width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="font-size: 30rpx;color: #181818;font-weight: bold;">
<text
style="vertical-align: middle;margin-right: 10rpx;">{{info.member.nikename}}</text>
<!-- <tn-tag width="80rpx" shape="radius" size="sm" backgroundColor="#66B5FF"
fontColor="#FFFFFF">供给
</tn-tag> -->
</view>
<view>
<tn-button @click="tn('/pages/packageA/user/my_card?id='+info.member.id)"
padding="20rpx 20rpx" backgroundColor="rgba(48,86,211,0.1)" size="sm"
fontColor="#3056D3" shape="round">
<text style="font-size: 24rpx;">联系ta</text>
</tn-button>
</view>
</view>
<view class="tn-text-ellipsis"
style="width: 380rpx;font-size: 26rpx;color: #666666;font-weight: 500;margin-top: 5rpx;">
{{info.member.enterprise_name}}
</view>
</view>
</view>
</view>
<view class="tn-text-ellipsis-2" style="font-size: 32rpx;font-weight: bold;margin-top: 20rpx;">
{{info.title}}
</view>
<view class="tn-text-ellipsis-2" style="font-size: 28rpx;color: #666666;margin-top: 20rpx;">
{{info.content}}
</view>
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
style="margin-top: 20rpx;">
<view style="color: #AAAAAA;font-size: 24rpx;">
发布于:{{info.createtime}}
</view>
<!-- <view style="color: #3056D3;font-size: 28rpx;font-weight: 500;">
全文
</view> -->
</view>
<view v-if="info.files.length>0" style="margin-top: 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-wrap">
<view class="tn-flex-basic-xs" v-for="(img,img_i) in info.files"
style="text-align: center;">
<view style="padding-right: 10rpx;">
<image :src="apiImgUrl+img" @click="openImg(info,img_i)" mode="aspectFill"
style="width: 200rpx;height: 200rpx;border-radius:20rpx;">
</image>
</view>
</view>
</view>
</view>
<view style="padding:30rpx;width: 80%;margin: 0 auto;padding-top: 40rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="text-align: center;font-size: 28rpx;">
<button hover-class="none" open-type="share">
<text class="tn-icon-send" style="font-size: 32rpx;"></text>
<view>分享</view>
</button>
</view>
<view style="text-align: center;font-size: 28rpx;" @click="like(index)">
<text v-if="info.is_like==1" class="tn-icon-praise-fill tn-color-red"
style="font-size: 32rpx;"></text>
<text v-if="info.is_like==0" class="tn-icon-praise" style="font-size: 32rpx;"></text>
<view>{{info.like_num>0?info.like_num:'点赞'}}</view>
</view>
<view style="text-align: center;font-size: 28rpx;" @click="favs(index)">
<text v-if="info.is_fav==1" class="tn-icon-star-fill tn-color-orangeyellow"
style="font-size: 32rpx;"></text>
<text v-if="info.is_fav==0" class="tn-icon-star" style="font-size: 32rpx;"></text>
<view>{{info.fav_num>0?info.fav_num:'收藏'}}</view>
</view>
</view>
</view>
<view style="margin-top: 40rpx;">
<view style="color: #181818;font-size: 34rpx;font-weight: bold;">评论{{com_info.total}})</view>
<view style="padding-top: 30rpx;">
<view v-for="(item,index) in com_list" style="width: 100%;margin: 50rpx 0rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center" style="width: 100%;">
<view>
<image src="/static/def.png"
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
</image>
</view>
<view style="margin-left: 10rpx;width: 100%;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="font-size: 30rpx;color: #181818;font-weight: bold;">
<text
style="vertical-align: middle;margin-right: 10rpx;">{{item.member.nikename}}</text>
<!-- <tn-tag width="80rpx" shape="radius" size="sm" backgroundColor="#66B5FF"
fontColor="#FFFFFF">供给
</tn-tag> -->
</view>
<view v-if="item.member_id==uid || uid==info.member_id"
style="text-align: center;font-size: 28rpx;" @click="del(item)">
<!-- <text class="tn-icon-praise" style="font-size: 32rpx;"></text>
<view>21</view> -->
<view style="color: #AAAAAA;font-size: 24rpx;">删除</view>
</view>
</view>
<view class="tn-text-ellipsis"
style="width: 380rpx;font-size: 26rpx;color: #666666;font-weight: 500;margin-top: 5rpx;">
{{item.createtime}}
</view>
</view>
</view>
<view style="color: #666666;padding-top: 30rpx;">
{{item.content}}
</view>
<view v-if="index<com_list.length-1"
style="height: 1rpx;border-top: #BABDC7 1rpx dashed;margin: 50rpx 0rpx;"></view>
</view>
</view>
</view>
</view>
</view>
</view>
<view
style="position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 50rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
<view style="background: #F1F2F8;border-radius: 60rpx;padding:0rpx 20rpx;height: 80rpx;width: 75%;">
<tn-input :maxLength="100" :height="80" v-model="content" placeholder="输入发表评论"
:customStyle="{width:'450rpx'}" :clearable="false" />
</view>
<view @click="submitDo"
style="line-height: 80rpx;height: 80rpx;font-size: 28rpx;font-weight: bold;text-align: center;width: 150rpx;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius: 90rpx;">
<text>发布</text>
</view>
</view>
</view>
</view>
</template>
<script>
import {
tweetsInfo,
likeDo,
favsDo,
likeRevoke,
favsRevoke,
postComment,
commentList,
addComment,
removeComment
} from '@/util/api.js';
import store from '@/store/index.js'
export default {
data() {
return {
id: 0,
info: {},
apiImgUrl: this.$store.state.imgUrl,
content: '',
com_list: [],
com_info: {},
page: 1,
uid: 0,
}
},
onLoad(d) {
var uid = uni.getStorageSync('uid');
this.uid = uid;
this.id = d.id;
this.getTweets();
this.getCommentList();
},
onReachBottom() {
this.page += 1;
this.getCommentList();
},
methods: {
openImg(item, index) {
console.log(index);
console.log(item.files);
var img = item.files;
var apiImgUrl = this.apiImgUrl;
const updatedImagePaths = img.map(path => `${apiImgUrl}${path}`);
console.log(updatedImagePaths);
uni.previewImage({
current: index,
urls: updatedImagePaths,
});
},
submitDo() {
addComment({
tweet_id: this.id,
content: this.content,
member_b_id: this.info.member_id
})
.then(res => {
console.log(res);
if (res.code == 1) {
uni.showToast({
title: '评论成功!',
icon: 'none',
duration: 2000
});
} else {
uni.showToast({
title: '评论失败!',
icon: 'none',
duration: 2000
});
}
this.content = '';
this.page = 1;
this.com_list = [];
this.getCommentList();
//this.com_list = res.data;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getCommentList() {
commentList({
tweet_id: this.id,
page: this.page,
size: 15,
})
.then(res => {
console.log(res);
this.com_list.push(...res.data.data);
this.com_info = res.data;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
getTweets() {
tweetsInfo({
id: this.id
})
.then(res => {
console.log(res);
this.info = res.data;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
like() {
var uid = uni.getStorageSync('uid');
if (!uid) {
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 2000
});
return;
}
if (this.info.is_like == 0) {
likeDo({
member_id: uid,
related_id: this.id,
related_type: 'tweets',
})
.then(res => {
console.log(res);
uni.showToast({
title: '赞成功!',
icon: 'none',
duration: 2000
});
this.info.is_like = 1;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
} else {
likeRevoke({
member_id: uid,
related_id: this.id,
related_type: 'tweets',
})
.then(res => {
console.log(res);
uni.showToast({
title: '取消成功!',
icon: 'none',
duration: 2000
});
this.info.is_like = 0;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
}
},
favs() {
var uid = uni.getStorageSync('uid');
if (!uid) {
uni.showToast({
title: '请先登录',
icon: 'none',
duration: 2000
});
return;
}
if (this.info.is_fav == 0) {
favsDo({
member_id: uid,
related_id: this.id,
related_type: 'tweets',
})
.then(res => {
console.log(res);
uni.showToast({
title: '收藏成功!',
icon: 'none',
duration: 2000
});
this.info.is_fav = 1;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
} else {
favsRevoke({
member_id: uid,
related_id: this.id,
related_type: 'tweets',
})
.then(res => {
console.log(res);
uni.showToast({
title: '取消收藏成功!',
icon: 'none',
duration: 2000
});
this.info.is_fav = 0;
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
}
},
del(item) {
removeComment({
id: item.id,
})
.then(res => {
console.log(res);
if (res.code == 1) {
uni.showToast({
title: '删除成功!',
icon: 'none',
duration: 2000
});
this.page = 1;
this.com_list = [];
this.getCommentList();
} else {
uni.showToast({
title: res.msg,
icon: 'none',
duration: 2000
});
}
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
}
}
}
</script>
<style>
button::after {
border: none;
}
button {
position: relative;
display: block;
margin-left: auto;
margin-right: auto;
padding-left: 0px;
padding-right: 0px;
box-sizing: border-box;
text-align: center;
text-decoration: none;
line-height: 1.35;
-webkit-tap-highlight-color: transparent;
overflow: hidden;
background-color: transparent;
font-size: 28rpx;
width: 100%;
height: 100%;
}
</style>

View File

@ -0,0 +1,142 @@
<template>
<view>
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="transparent">
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
<view style="padding-left: 15rpx;" @click="goBack()">
<text class="tn-icon-left" style="font-size: 40rpx;color: #000000;"></text>
</view>
<view
style="letter-spacing: 1px;font-size: 34rpx;text-align: center;width: 83%;font-weight: bold;color: #000000;">
<text>协会证书</text>
</view>
</view>
</tn-nav-bar>
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
<view style="padding:30rpx 80rpx;">
<l-painter ref="painter">
<l-painter-view>
<l-painter-text :text="info.nikename"
css="width: 100%;position:absolute;top:350rpx;text-align:center;color: #D82212; font-size: 70rpx; fontWeight: bold" />
<l-painter-text :text="info.number_of_sessions"
css="width: 100%;position:absolute;top:460rpx;text-align:center;color: #484848; font-size: 25rpx; fontWeight: bold" />
<l-painter-view css="position:absolute;top:630rpx;text-align:center;width: 100%;">
<l-painter-image src="/static/1001.png" css="object-fit: cover; height: 70rpx;" />
<l-painter-text :text="info.position_name"
css="color: #484848; font-size: 50rpx; fontWeight: bold" />
<l-painter-image src="/static/1002.png" css="object-fit: cover; height: 70rpx;" />
</l-painter-view>
<l-painter-text :text="info.year[0]"
css="position:absolute;top:735rpx;left:120rpx;color: #E4C777; font-size: 23rpx;" />
<l-painter-text :text="info.year[1]"
css="position:absolute;top:735rpx;right:120rpx;color: #E4C777; font-size: 23rpx;" />
<l-painter-view css="position:absolute;bottom:135rpx;text-align:center;width: 100%;">
<l-painter-image src="/static/tu23.png"
css="object-fit: cover; object-position: 50% 50%; width: 100rpx;" />
</l-painter-view>
<l-painter-text :text="info.membercode"
css="position:absolute;bottom:95rpx;color: #484848; font-size: 22rpx;width: 100%;text-align:center;" />
<l-painter-image src="/static/1000.jpg"
css="object-fit: cover; object-position: 50% 50%; width: 100%; height: 100%; " />
</l-painter-view>
</l-painter>
</view>
<view
style="position: fixed;bottom:0px;width: 100%;background-color: #FFFFFF;box-shadow: 0rpx -2rpx 4rpx 0rpx rgba(186,189,199,0.2);padding:30rpx 30rpx 40rpx 30rpx;">
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-center">
<view @click="dImg"
style="line-height: 80rpx;height: 80rpx;font-size: 32rpx;font-weight: bold;text-align: center;width: 80%;color: #ffffff;;background: #3056D3;border: 1rpx solid #3056D3;border-radius:90rpx;">
<text>保存图片</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
handleMembercode,
} from "@/util/api";
export default {
data() {
return {
topCurrent: 0,
info: {}
}
},
onLoad() {
this.getHandleMembercode();
},
methods: {
getHandleMembercode() {
handleMembercode()
.then(res => {
var key = res.data;
key.position_name = this.spacedString(key.position_name);
//console.log(this.spacedString(key.position_name));
this.info = key;
console.log(res);
})
.catch(error => {
uni.showToast({
title: error,
icon: 'none',
duration: 2000
});
})
},
spacedString(originalString) {
let result = originalString.split('');
let key = '';
for (let i = 0; i < result.length; i++) {
if (i > 0) {
key += ' ';
}
key += result[i];
}
return key;
},
dImg() {
this.$refs.painter.canvasToTempFilePathSync({
// nvuejpeg
fileType: "png",
pathType: 'url',
quality: 1,
success: (res) => {
console.log(res.tempFilePath);
// H5
// H5
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function() {
uni.showToast({
title: '保存成功!',
icon: 'none',
duration: 2000
});
},
fail: function(res) {
console.log(res);
}
});
},
});
},
goBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({
url: '/pages/index/index'
})
}
},
}
}
</script>
<style>
</style>

View File

@ -94,7 +94,7 @@
</view>
<view style="position: fixed;bottom: 310rpx; width: 100%;">
<view class="tn-flex tn-flex-row-around">
<view @click="openUrl('/pages/packageA/info/directory?id='+info.id)"
<view @click="openUrl('/pages/packageC/info/directory?id='+info.id)"
style="position: absolute; right:20rpx;color: #fff; line-height:35rpx;text-align: center;width: 100rpx;height: 100rpx;background: linear-gradient(-45deg, #4AA2EF, #3A7FF4);border-radius: 50%;">
<view style="padding-top: 16rpx;">会员</view>
<view>名录</view>

View File

@ -18,7 +18,7 @@
<tn-list-view :card="true" unlined="all">
<block v-for="(item, index) in list" :key="index">
<tn-list-cell padding="36rpx" :arrow="true"
@click="openUrl('/pages/packageA/info/policy_list?id='+item.id)">{{item.name}}</tn-list-cell>
@click="openUrl('/pages/packageC/info/policy_list?id='+item.id)">{{item.name}}</tn-list-cell>
</block>
</tn-list-view>
</view>

View File

@ -18,7 +18,7 @@
<tn-list-view :card="true" unlined="all">
<block v-for="(item, index) in list" :key="index">
<tn-list-cell padding="36rpx" :arrow="true"
@click="openUrl('/pages/packageA/info/policy_info?id='+item.id)">{{item.article_title}}</tn-list-cell>
@click="openUrl('/pages/packageC/info/policy_info?id='+item.id)">{{item.article_title}}</tn-list-cell>
</block>
</tn-list-view>
</view>

BIN
static/1000.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
static/1001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

BIN
static/1002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

BIN
static/_6@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
static/birthday.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 547 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/ji.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

BIN
static/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
static/make.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
static/map.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/msg1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/msg2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/msg3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

BIN
static/tu23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -39,7 +39,7 @@ const store = new Vuex.Store({
// 如果vuex_version无需保存到本地永久存储无需lifeData.vuex_version方式
// app版本
vuex_version: "1.0.0",
vuex_version: "1.0.10",
// 是否使用自定义导航栏
vuex_custom_nav_bar: true,
// 状态栏高度

View File

@ -0,0 +1,30 @@
## 1.4.122024-09-21
- 修复 calendar在选择日期范围后重新选择日期需要点两次的Bug
## 1.4.112024-01-10
- 修复 回到今天时,月份显示不一致问题
## 1.4.102023-04-10
- 修复 某些情况 monthSwitch 未触发的Bug
## 1.4.92023-02-02
- 修复 某些情况切换月份错误的Bug
## 1.4.82023-01-30
- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/161964)
## 1.4.72022-09-16
- 优化 支持使用 uni-scss 控制主题色
## 1.4.62022-09-08
- 修复 表头年月切换导致改变当前日期为选择月1号且未触发change事件的Bug
## 1.4.52022-02-25
- 修复 条件编译 nvue 不支持的 css 样式的Bug
## 1.4.42022-02-25
- 修复 条件编译 nvue 不支持的 css 样式的Bug
## 1.4.32021-09-22
- 修复 startDate、 endDate 属性失效的Bug
## 1.4.22021-08-24
- 新增 支持国际化
## 1.4.12021-08-05
- 修复 弹出层被 tabbar 遮盖的Bug
## 1.4.02021-07-30
- 组件兼容 vue3如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.3.162021-05-12
- 新增 组件示例地址
## 1.3.152021-02-04
- 调整为uni_modules目录规范

View File

@ -0,0 +1,544 @@
/**
* @1900-2100区间内的公历农历互转
* @charset UTF-8
* @github https://github.com/jjonline/calendar.js
* @Author Jea杨(JJonline@JJonline.Cn)
* @Time 2014-7-21
* @Time 2016-8-13 Fixed 2033hexAttribution Annals
* @Time 2016-9-25 Fixed lunar LeapMonth Param Bug
* @Time 2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
* @Version 1.0.3
* @公历转农历calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
* @农历转公历calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
*/
/* eslint-disable */
var calendar = {
/**
* 农历1900-2100的润大小信息表
* @Array Of Property
* @return Hex
*/
lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909
0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
/** Add By JJonline@JJonline.Cn**/
0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
0x0d520], // 2100
/**
* 公历每个月份的天数普通表
* @Array Of Property
* @return Number
*/
solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
/**
* 天干地支之天干速查表
* @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
* @return Cn string
*/
Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
/**
* 天干地支之地支速查表
* @Array Of Property
* @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
* @return Cn string
*/
Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
/**
* 天干地支之地支速查表<=>生肖
* @Array Of Property
* @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
* @return Cn string
*/
Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
/**
* 24节气速查表
* @Array Of Property
* @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
* @return Cn string
*/
solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'],
/**
* 1900-2100各年的24节气日期速查表
* @Array Of Property
* @return 0x string For splice
*/
sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
'97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
'97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
'97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
'97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
'97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
'9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
'97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
'97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
'7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
'97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
'97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
'9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
'9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
'97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
'9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
'977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
'7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
'977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
'7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
'977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
'7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
'7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
'7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
'7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
'7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
'7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
'7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
'7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
'7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
'7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
'665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
'7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
'7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
'7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'],
/**
* 数字转中文速查表
* @Array Of Property
* @trans ['日','一','二','三','四','五','六','七','八','九','十']
* @return Cn string
*/
nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
/**
* 日期转农历称呼速查表
* @Array Of Property
* @trans ['初','十','廿','卅']
* @return Cn string
*/
nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
/**
* 月份转农历称呼速查表
* @Array Of Property
* @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
* @return Cn string
*/
nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
/**
* 返回农历y年一整年的总天数
* @param lunar Year
* @return Number
* @eg:var count = calendar.lYearDays(1987) ;//count=387
*/
lYearDays: function (y) {
var i; var sum = 348
for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 }
return (sum + this.leapDays(y))
},
/**
* 返回农历y年闰月是哪个月若y年没有闰月 则返回0
* @param lunar Year
* @return Number (0-12)
* @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
*/
leapMonth: function (y) { // 闰字编码 \u95f0
return (this.lunarInfo[y - 1900] & 0xf)
},
/**
* 返回农历y年闰月的天数 若该年没有闰月则返回0
* @param lunar Year
* @return Number (02930)
* @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
*/
leapDays: function (y) {
if (this.leapMonth(y)) {
return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
}
return (0)
},
/**
* 返回农历y年m月非闰月的总天数计算m为闰月时的天数请使用leapDays方法
* @param lunar Year
* @return Number (-12930)
* @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
*/
monthDays: function (y, m) {
if (m > 12 || m < 1) { return -1 }// 月份参数从1至12参数错误返回-1
return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
},
/**
* 返回公历(!)y年m月的天数
* @param solar Year
* @return Number (-128293031)
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
*/
solarDays: function (y, m) {
if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
var ms = m - 1
if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
} else {
return (this.solarMonth[ms])
}
},
/**
* 农历年份转换为干支纪年
* @param lYear 农历年的年份数
* @return Cn string
*/
toGanZhiYear: function (lYear) {
var ganKey = (lYear - 3) % 10
var zhiKey = (lYear - 3) % 12
if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干
if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支
return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
},
/**
* 公历月日判断所属星座
* @param cMonth [description]
* @param cDay [description]
* @return Cn string
*/
toAstro: function (cMonth, cDay) {
var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座
},
/**
* 传入offset偏移量返回干支
* @param offset 相对甲子的偏移量
* @return Cn string
*/
toGanZhi: function (offset) {
return this.Gan[offset % 10] + this.Zhi[offset % 12]
},
/**
* 传入公历(!)y年获得该年第n个节气的公历日期
* @param y公历年(1900-2100)n二十四节气中的第几个节气(1~24)从n=1(小寒)算起
* @return day Number
* @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
*/
getTerm: function (y, n) {
if (y < 1900 || y > 2100) { return -1 }
if (n < 1 || n > 24) { return -1 }
var _table = this.sTermInfo[y - 1900]
var _info = [
parseInt('0x' + _table.substr(0, 5)).toString(),
parseInt('0x' + _table.substr(5, 5)).toString(),
parseInt('0x' + _table.substr(10, 5)).toString(),
parseInt('0x' + _table.substr(15, 5)).toString(),
parseInt('0x' + _table.substr(20, 5)).toString(),
parseInt('0x' + _table.substr(25, 5)).toString()
]
var _calday = [
_info[0].substr(0, 1),
_info[0].substr(1, 2),
_info[0].substr(3, 1),
_info[0].substr(4, 2),
_info[1].substr(0, 1),
_info[1].substr(1, 2),
_info[1].substr(3, 1),
_info[1].substr(4, 2),
_info[2].substr(0, 1),
_info[2].substr(1, 2),
_info[2].substr(3, 1),
_info[2].substr(4, 2),
_info[3].substr(0, 1),
_info[3].substr(1, 2),
_info[3].substr(3, 1),
_info[3].substr(4, 2),
_info[4].substr(0, 1),
_info[4].substr(1, 2),
_info[4].substr(3, 1),
_info[4].substr(4, 2),
_info[5].substr(0, 1),
_info[5].substr(1, 2),
_info[5].substr(3, 1),
_info[5].substr(4, 2)
]
return parseInt(_calday[n - 1])
},
/**
* 传入农历数字月份返回汉语通俗表示法
* @param lunar month
* @return Cn string
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
*/
toChinaMonth: function (m) { // 月 => \u6708
if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
var s = this.nStr3[m - 1]
s += '\u6708'// 加上月字
return s
},
/**
* 传入农历日期数字返回汉字表示法
* @param lunar day
* @return Cn string
* @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
*/
toChinaDay: function (d) { // 日 => \u65e5
var s
switch (d) {
case 10:
s = '\u521d\u5341'; break
case 20:
s = '\u4e8c\u5341'; break
case 30:
s = '\u4e09\u5341'; break
default :
s = this.nStr2[Math.floor(d / 10)]
s += this.nStr1[d % 10]
}
return (s)
},
/**
* 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是立春
* @param y year
* @return Cn string
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
*/
getAnimal: function (y) {
return this.Animals[(y - 4) % 12]
},
/**
* 传入阳历年月日获得详细的公历农历object信息 <=>JSON
* @param y solar year
* @param m solar month
* @param d solar day
* @return JSON object
* @eg:console.log(calendar.solar2lunar(1987,11,01));
*/
solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
// 年份限定、上限
if (y < 1900 || y > 2100) {
return -1// undefined转换为数字变为NaN
}
// 公历传参最下限
if (y == 1900 && m == 1 && d < 31) {
return -1
}
// 未传参 获得当天
if (!y) {
var objDate = new Date()
} else {
var objDate = new Date(y, parseInt(m) - 1, d)
}
var i; var leap = 0; var temp = 0
// 修正ymd参数
var y = objDate.getFullYear()
var m = objDate.getMonth() + 1
var d = objDate.getDate()
var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000
for (i = 1900; i < 2101 && offset > 0; i++) {
temp = this.lYearDays(i)
offset -= temp
}
if (offset < 0) {
offset += temp; i--
}
// 是否今天
var isTodayObj = new Date()
var isToday = false
if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
isToday = true
}
// 星期几
var nWeek = objDate.getDay()
var cWeek = this.nStr1[nWeek]
// 数字表示周几顺应天朝周一开始的惯例
if (nWeek == 0) {
nWeek = 7
}
// 农历年
var year = i
var leap = this.leapMonth(i) // 闰哪个月
var isLeap = false
// 效验闰月
for (i = 1; i < 13 && offset > 0; i++) {
// 闰月
if (leap > 0 && i == (leap + 1) && isLeap == false) {
--i
isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数
} else {
temp = this.monthDays(year, i)// 计算农历普通月天数
}
// 解除闰月
if (isLeap == true && i == (leap + 1)) { isLeap = false }
offset -= temp
}
// 闰月导致数组下标重叠取反
if (offset == 0 && leap > 0 && i == leap + 1) {
if (isLeap) {
isLeap = false
} else {
isLeap = true; --i
}
}
if (offset < 0) {
offset += temp; --i
}
// 农历月
var month = i
// 农历日
var day = offset + 1
// 天干地支处理
var sm = m - 1
var gzY = this.toGanZhiYear(year)
// 当月的两个节气
// bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始
var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始
// 依据12节气修正干支月
var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
if (d >= firstNode) {
gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
}
// 传入的日期的节气与否
var isTerm = false
var Term = null
if (firstNode == d) {
isTerm = true
Term = this.solarTerm[m * 2 - 2]
}
if (secondNode == d) {
isTerm = true
Term = this.solarTerm[m * 2 - 1]
}
// 日柱 当月一日与 1900/1/1 相差天数
var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
var gzD = this.toGanZhi(dayCyclical + d - 1)
// 该日期所属的星座
var astro = this.toAstro(m, d)
return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro }
},
/**
* 传入农历年月日以及传入的月份是否闰月获得详细的公历农历object信息 <=>JSON
* @param y lunar year
* @param m lunar month
* @param d lunar day
* @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
* @return JSON object
* @eg:console.log(calendar.lunar2solar(1987,9,10));
*/
lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
var isLeapMonth = !!isLeapMonth
var leapOffset = 0
var leapMonth = this.leapMonth(y)
var leapDay = this.leapDays(y)
if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值
var day = this.monthDays(y, m)
var _day = day
// bugFix 2016-9-25
// if month is leap, _day use leapDays method
if (isLeapMonth) {
_day = this.leapDays(y, m)
}
if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验
// 计算农历的时间差
var offset = 0
for (var i = 1900; i < y; i++) {
offset += this.lYearDays(i)
}
var leap = 0; var isAdd = false
for (var i = 1; i < m; i++) {
leap = this.leapMonth(y)
if (!isAdd) { // 处理闰月
if (leap <= i && leap > 0) {
offset += this.leapDays(y); isAdd = true
}
}
offset += this.monthDays(y, i)
}
// 转换闰月农历 需补充该年闰月的前一个月的时差
if (isLeapMonth) { offset += day }
// 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
var calObj = new Date((offset + d - 31) * 86400000 + stmap)
var cY = calObj.getUTCFullYear()
var cM = calObj.getUTCMonth() + 1
var cD = calObj.getUTCDate()
return this.solar2lunar(cY, cM, cD)
}
}
export default calendar

View File

@ -0,0 +1,12 @@
{
"uni-calender.ok": "ok",
"uni-calender.cancel": "cancel",
"uni-calender.today": "today",
"uni-calender.MON": "MON",
"uni-calender.TUE": "TUE",
"uni-calender.WED": "WED",
"uni-calender.THU": "THU",
"uni-calender.FRI": "FRI",
"uni-calender.SAT": "SAT",
"uni-calender.SUN": "SUN"
}

View File

@ -0,0 +1,8 @@
import en from './en.json'
import zhHans from './zh-Hans.json'
import zhHant from './zh-Hant.json'
export default {
en,
'zh-Hans': zhHans,
'zh-Hant': zhHant
}

View File

@ -0,0 +1,12 @@
{
"uni-calender.ok": "确定",
"uni-calender.cancel": "取消",
"uni-calender.today": "今日",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六"
}

View File

@ -0,0 +1,12 @@
{
"uni-calender.ok": "確定",
"uni-calender.cancel": "取消",
"uni-calender.today": "今日",
"uni-calender.SUN": "日",
"uni-calender.MON": "一",
"uni-calender.TUE": "二",
"uni-calender.WED": "三",
"uni-calender.THU": "四",
"uni-calender.FRI": "五",
"uni-calender.SAT": "六"
}

View File

@ -0,0 +1,219 @@
<template>
<view class="uni-calendar-item__weeks-box" :class="{
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate && !weeks.isDay) ,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
}" @click="choiceDate(weeks)">
<view class="uni-calendar-item__weeks-box-item">
<text v-if="selected&&weeks.extraInfo&&weeks.extraInfo.is==1" class="uni-calendar-item__weeks-box-circle"
:class="{'my-circle':weeks.extraInfo.is==0,'my-circle-white':weeks.extraInfo.is==1&&weeks.isDay}"></text>
<text class="uni-calendar-item__weeks-box-text" :class="{
'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
'my-text-data':weeks.extraInfo.is==1&&!weeks.isDay
}">{{weeks.date}}</text>
<text v-if="!lunar&&!weeks.extraInfo && weeks.isDay" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
}">{{todayText}}</text>
<text v-if="lunar&&!weeks.extraInfo" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
}">{{weeks.isDay ? todayText : (weeks.lunar.IDayCn === '初一'?weeks.lunar.IMonthCn:weeks.lunar.IDayCn)}}</text>
<text v-if="weeks.extraInfo&&weeks.extraInfo.info" class="uni-calendar-item__weeks-lunar-text" :class="{
'uni-calendar-item--extra':weeks.extraInfo.info,
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
'my-text':weeks.extraInfo.is==0&&!weeks.isDay,
'my-text-white':weeks.extraInfo.is==0&&weeks.isDay || weeks.extraInfo.is==1&&weeks.isDay,
}">{{weeks.extraInfo.info}}</text>
</view>
</view>
</template>
<script>
import {
initVueI18n
} from '@dcloudio/uni-i18n'
import i18nMessages from './i18n/index.js'
const {
t
} = initVueI18n(i18nMessages)
export default {
emits: ['change'],
props: {
weeks: {
type: Object,
default () {
return {}
}
},
calendar: {
type: Object,
default: () => {
return {}
}
},
selected: {
type: Array,
default: () => {
return []
}
},
lunar: {
type: Boolean,
default: false
}
},
computed: {
todayText() {
return t("uni-calender.today")
},
},
methods: {
choiceDate(weeks) {
this.$emit('change', weeks)
}
}
}
</script>
<style lang="scss" scoped>
$uni-font-size-base: 14px;
$uni-text-color: #333;
$uni-font-size-sm: 12px;
$uni-color-error: #e43d33;
$uni-opacity-disabled: 0.3;
$uni-text-color-disable: #c0c0c0;
$uni-primary: #2979ff !default;
.uni-calendar-item__weeks-box {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
}
.uni-calendar-item__weeks-box-text {
font-size: $uni-font-size-base;
color: $uni-text-color;
}
.uni-calendar-item__weeks-lunar-text {
font-size: $uni-font-size-sm;
color: $uni-text-color;
}
.uni-calendar-item__weeks-box-item {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
width: 90rpx;
height: 100rpx;
}
.uni-calendar-item__weeks-box-circle {
position: absolute;
top: 5px;
right: 5px;
width: 8px;
height: 8px;
border-radius: 8px;
background-color: #3056D3;
}
.uni-calendar-item--disable {
background-color: rgba(249, 249, 249, $uni-opacity-disabled);
color: $uni-text-color-disable;
}
.uni-calendar-item--isDay-text {
color: $uni-primary;
}
.uni-calendar-item--isDay {
background-color: $uni-primary;
opacity: 1;
color: #fff;
border-radius: 12rpx;
}
.uni-calendar-item--extra {
color: #3056D3;
opacity: 0.8;
}
.uni-calendar-item--checked {
background-color: $uni-primary;
color: #fff;
opacity: 0.8;
}
.uni-calendar-item--multiple {
background-color: $uni-primary;
color: #fff;
opacity: 0.8;
}
.uni-calendar-item--before-checked {
background-color: #ff5a5f;
color: #fff;
}
.uni-calendar-item--after-checked {
background-color: #ff5a5f;
color: #fff;
}
.my-text {
color: #999999;
}
.my-circle {
background-color: #999999;
}
.my-text-data {
color: #3056D3;
}
.my-text-white {
color: #ffffff;
opacity: 1;
}
.my-circle-white {
background-color: #ffffff;
}
</style>

View File

@ -0,0 +1,578 @@
<template>
<view class="uni-calendar">
<view v-if="!insert&&show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}"
@click="clean"></view>
<view v-if="insert || show" class="uni-calendar__content"
:class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}">
<view v-if="!insert" class="uni-calendar__header uni-calendar--fixed-top">
<view class="uni-calendar__header-btn-box" @click="close">
<text class="uni-calendar__header-text uni-calendar--fixed-width">{{cancelText}}</text>
</view>
<view class="uni-calendar__header-btn-box" @click="confirm">
<text class="uni-calendar__header-text uni-calendar--fixed-width">{{okText}}</text>
</view>
</view>
<view class="uni-calendar__header">
<view class="uni-calendar__header-btn-box" @click.stop="pre">
<view class="uni-calendar__header-btn uni-calendar--left"></view>
</view>
<picker mode="date" :value="date" fields="month" @change="bindDateChange">
<text class="uni-calendar__header-text">{{ (nowDate.year||'') +' / '+( nowDate.month||'')}}</text>
</picker>
<view class="uni-calendar__header-btn-box" @click.stop="next">
<view class="uni-calendar__header-btn uni-calendar--right"></view>
</view>
<!-- <text class="uni-calendar__backtoday" @click="backToday">{{todayText}}</text> -->
</view>
<view class="uni-calendar__box">
<view v-if="showMonth" class="uni-calendar__box-bg">
<text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
</view>
<view class="uni-calendar__weeks">
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text">{{SUNText}}</text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text">{{monText}}</text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text">{{TUEText}}</text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text">{{WEDText}}</text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text">{{THUText}}</text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text">{{FRIText}}</text>
</view>
<view class="uni-calendar__weeks-day">
<text class="uni-calendar__weeks-day-text">{{SATText}}</text>
</view>
</view>
<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
:selected="selected" :lunar="lunar" @change="choiceDate"></calendar-item>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import Calendar from './util.js';
import CalendarItem from './uni-calendar-item.vue'
import {
initVueI18n
} from '@dcloudio/uni-i18n'
import i18nMessages from './i18n/index.js'
const {
t
} = initVueI18n(i18nMessages)
/**
* Calendar 日历
* @description 日历组件可以查看日期选择任意范围内的日期打点操作常用场景如酒店日期预订火车机票选择购买日期上下班打卡等
* @tutorial https://ext.dcloud.net.cn/plugin?id=56
* @property {String} date 自定义当前时间默认为今天
* @property {Boolean} lunar 显示农历
* @property {String} startDate 日期选择范围-开始日期
* @property {String} endDate 日期选择范围-结束日期
* @property {Boolean} range 范围选择
* @property {Boolean} insert = [true|false] 插入模式,默认为false
* @value true 弹窗模式
* @value false 插入模式
* @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容
* @property {Array} selected 打点期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]
* @property {Boolean} showMonth 是否选择月份为背景
* @event {Function} change 日期改变`insert :ture` 时生效
* @event {Function} confirm 确认选择`insert :false` 时生效
* @event {Function} monthSwitch 切换月份时触发
* @example <uni-calendar :insert="true":lunar="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
*/
export default {
components: {
CalendarItem
},
emits: ['close', 'confirm', 'change', 'monthSwitch'],
props: {
date: {
type: String,
default: ''
},
selected: {
type: Array,
default () {
return []
}
},
lunar: {
type: Boolean,
default: false
},
startDate: {
type: String,
default: ''
},
endDate: {
type: String,
default: ''
},
range: {
type: Boolean,
default: false
},
insert: {
type: Boolean,
default: true
},
showMonth: {
type: Boolean,
default: true
},
clearDate: {
type: Boolean,
default: true
}
},
data() {
return {
show: false,
weeks: [],
calendar: {},
nowDate: '',
aniMaskShow: false
}
},
computed: {
/**
* for i18n
*/
okText() {
return t("uni-calender.ok")
},
cancelText() {
return t("uni-calender.cancel")
},
todayText() {
return t("uni-calender.today")
},
monText() {
return t("uni-calender.MON")
},
TUEText() {
return t("uni-calender.TUE")
},
WEDText() {
return t("uni-calender.WED")
},
THUText() {
return t("uni-calender.THU")
},
FRIText() {
return t("uni-calender.FRI")
},
SATText() {
return t("uni-calender.SAT")
},
SUNText() {
return t("uni-calender.SUN")
},
},
watch: {
date(newVal) {
// this.cale.setDate(newVal)
this.init(newVal)
},
startDate(val) {
this.cale.resetSatrtDate(val)
this.cale.setDate(this.nowDate.fullDate)
this.weeks = this.cale.weeks
},
endDate(val) {
this.cale.resetEndDate(val)
this.cale.setDate(this.nowDate.fullDate)
this.weeks = this.cale.weeks
},
selected(newVal) {
this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
this.weeks = this.cale.weeks
}
},
created() {
this.cale = new Calendar({
selected: this.selected,
startDate: this.startDate,
endDate: this.endDate,
range: this.range,
})
this.init(this.date)
},
methods: {
// 穿
clean() {},
bindDateChange(e) {
const value = e.detail.value + '-1'
this.setDate(value)
const {
year,
month
} = this.cale.getDate(value)
this.$emit('monthSwitch', {
year,
month
})
},
/**
* 初始化日期显示
* @param {Object} date
*/
init(date) {
this.cale.setDate(date)
this.weeks = this.cale.weeks
this.nowDate = this.calendar = this.cale.getInfo(date)
},
/**
* 打开日历弹窗
*/
open() {
//
if (this.clearDate && !this.insert) {
this.cale.cleanMultipleStatus()
// this.cale.setDate(this.date)
this.init(this.date)
}
this.show = true
this.$nextTick(() => {
setTimeout(() => {
this.aniMaskShow = true
}, 50)
})
},
/**
* 关闭日历弹窗
*/
close() {
this.aniMaskShow = false
this.$nextTick(() => {
setTimeout(() => {
this.show = false
this.$emit('close')
}, 300)
})
},
/**
* 确认按钮
*/
confirm() {
this.setEmit('confirm')
this.close()
},
/**
* 变化触发
*/
change() {
if (!this.insert) return
this.setEmit('change')
},
/**
* 选择月份触发
*/
monthSwitch() {
let {
year,
month
} = this.nowDate
this.$emit('monthSwitch', {
year,
month: Number(month)
})
},
/**
* 派发事件
* @param {Object} name
*/
setEmit(name) {
let {
year,
month,
date,
fullDate,
lunar,
extraInfo
} = this.calendar
this.$emit(name, {
range: this.cale.multipleStatus,
year,
month,
date,
fulldate: fullDate,
lunar,
extraInfo: extraInfo || {}
})
},
/**
* 选择天触发
* @param {Object} weeks
*/
choiceDate(weeks) {
if (weeks.disable) return
this.calendar = weeks
//
this.cale.setMultiple(this.calendar.fullDate)
this.weeks = this.cale.weeks
this.change()
},
/**
* 回到今天
*/
backToday() {
const nowYearMonth = `${this.nowDate.year}-${this.nowDate.month}`
const date = this.cale.getDate(new Date())
const todayYearMonth = `${date.year}-${date.month}`
this.init(date.fullDate)
if (nowYearMonth !== todayYearMonth) {
this.monthSwitch()
}
this.change()
},
/**
* 上个月
*/
pre() {
const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate
this.setDate(preDate)
this.monthSwitch()
},
/**
* 下个月
*/
next() {
const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
this.setDate(nextDate)
this.monthSwitch()
},
/**
* 设置日期
* @param {Object} date
*/
setDate(date) {
this.cale.setDate(date)
this.weeks = this.cale.weeks
this.nowDate = this.cale.getInfo(date)
}
}
}
</script>
<style lang="scss" scoped>
$uni-bg-color-mask: rgba($color: #000000, $alpha: 0.4);
$uni-border-color: #EDEDED;
$uni-text-color: #333;
$uni-bg-color-hover: #f1f1f1;
$uni-font-size-base: 14px;
$uni-text-color-placeholder: #808080;
$uni-color-subtitle: #555555;
$uni-text-color-grey: #999;
.uni-calendar {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
}
.uni-calendar__mask {
position: fixed;
bottom: 0;
top: 0;
left: 0;
right: 0;
background-color: $uni-bg-color-mask;
transition-property: opacity;
transition-duration: 0.3s;
opacity: 0;
/* #ifndef APP-NVUE */
z-index: 99;
/* #endif */
}
.uni-calendar--mask-show {
opacity: 1
}
.uni-calendar--fixed {
position: fixed;
/* #ifdef APP-NVUE */
bottom: 0;
/* #endif */
left: 0;
right: 0;
transition-property: transform;
transition-duration: 0.3s;
transform: translateY(460px);
/* #ifndef APP-NVUE */
bottom: calc(var(--window-bottom));
z-index: 99;
/* #endif */
}
.uni-calendar--ani-show {
transform: translateY(0);
}
.uni-calendar__content {
background-color: #fff;
}
.uni-calendar__header {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
height: 50px;
border-bottom-color: $uni-border-color;
border-bottom-style: solid;
border-bottom-width: 1px;
}
.uni-calendar--fixed-top {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: space-between;
border-top-color: $uni-border-color;
border-top-style: solid;
border-top-width: 1px;
}
.uni-calendar--fixed-width {
width: 50px;
}
.uni-calendar__backtoday {
position: absolute;
right: 0;
top: 25rpx;
padding: 0 5px;
padding-left: 10px;
height: 25px;
line-height: 25px;
font-size: 12px;
border-top-left-radius: 25px;
border-bottom-left-radius: 25px;
color: $uni-text-color;
background-color: $uni-bg-color-hover;
}
.uni-calendar__header-text {
text-align: center;
width: 100px;
font-size: 30rpx;
color: #9e9e9e;
}
.uni-calendar__header-btn-box {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
}
.uni-calendar__header-btn {
width: 10px;
height: 10px;
border-left-color: #9e9e9e;
border-left-style: solid;
border-left-width: 2px;
border-top-color: #9e9e9e;
border-top-style: solid;
border-top-width: 2px;
}
.uni-calendar--left {
transform: rotate(-45deg);
}
.uni-calendar--right {
transform: rotate(135deg);
}
.uni-calendar__weeks {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
}
.uni-calendar__weeks-item {
flex: 1;
}
.uni-calendar__weeks-day {
flex: 1;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
justify-content: center;
align-items: center;
height: 45px;
border-bottom-color: #F5F5F5;
border-bottom-style: solid;
border-bottom-width: 1px;
}
.uni-calendar__weeks-day-text {
font-size: 14px;
}
.uni-calendar__box {
position: relative;
}
.uni-calendar__box-bg {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.uni-calendar__box-bg-text {
font-size: 200px;
font-weight: bold;
color: $uni-text-color-grey;
opacity: 0.1;
text-align: center;
/* #ifndef APP-NVUE */
line-height: 1;
/* #endif */
}
</style>

View File

@ -0,0 +1,360 @@
import CALENDAR from './calendar.js'
class Calendar {
constructor({
date,
selected,
startDate,
endDate,
range
} = {}) {
// 当前日期
this.date = this.getDate(new Date()) // 当前初入日期
// 打点信息
this.selected = selected || [];
// 范围开始
this.startDate = startDate
// 范围结束
this.endDate = endDate
this.range = range
// 多选状态
this.cleanMultipleStatus()
// 每周日期
this.weeks = {}
// this._getWeek(this.date.fullDate)
}
/**
* 设置日期
* @param {Object} date
*/
setDate(date) {
this.selectDate = this.getDate(date)
this._getWeek(this.selectDate.fullDate)
}
/**
* 清理多选状态
*/
cleanMultipleStatus() {
this.multipleStatus = {
before: '',
after: '',
data: []
}
}
/**
* 重置开始日期
*/
resetSatrtDate(startDate) {
// 范围开始
this.startDate = startDate
}
/**
* 重置结束日期
*/
resetEndDate(endDate) {
// 范围结束
this.endDate = endDate
}
/**
* 获取任意时间
*/
getDate(date, AddDayCount = 0, str = 'day') {
if (!date) {
date = new Date()
}
if (typeof date !== 'object') {
date = date.replace(/-/g, '/')
}
const dd = new Date(date)
switch (str) {
case 'day':
dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
break
case 'month':
if (dd.getDate() === 31 && AddDayCount>0) {
dd.setDate(dd.getDate() + AddDayCount)
} else {
const preMonth = dd.getMonth()
dd.setMonth(preMonth + AddDayCount) // 获取AddDayCount天后的日期
const nextMonth = dd.getMonth()
// 处理 pre 切换月份目标月份为2月没有当前日(30 31) 切换错误问题
if(AddDayCount<0 && preMonth!==0 && nextMonth-preMonth>AddDayCount){
dd.setMonth(nextMonth+(nextMonth-preMonth+AddDayCount))
}
// 处理 next 切换月份目标月份为2月没有当前日(30 31) 切换错误问题
if(AddDayCount>0 && nextMonth-preMonth>AddDayCount){
dd.setMonth(nextMonth-(nextMonth-preMonth-AddDayCount))
}
}
break
case 'year':
dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
break
}
const y = dd.getFullYear()
const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期不足10补0
const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号不足10补0
return {
fullDate: y + '-' + m + '-' + d,
year: y,
month: m,
date: d,
day: dd.getDay()
}
}
/**
* 获取上月剩余天数
*/
_getLastMonthDays(firstDay, full) {
let dateArr = []
for (let i = firstDay; i > 0; i--) {
const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
dateArr.push({
date: beforeDate,
month: full.month - 1,
lunar: this.getlunar(full.year, full.month - 1, beforeDate),
disable: true
})
}
return dateArr
}
/**
* 获取本月天数
*/
_currentMonthDys(dateData, full) {
let dateArr = []
let fullDate = this.date.fullDate
for (let i = 1; i <= dateData; i++) {
let nowDate = full.year + '-' + (full.month < 10 ?
full.month : full.month) + '-' + (i < 10 ?
'0' + i : i)
// 是否今天
let isDay = fullDate === nowDate
// 获取打点信息
let info = this.selected && this.selected.find((item) => {
if (this.dateEqual(nowDate, item.date)) {
return item
}
})
// 日期禁用
let disableBefore = true
let disableAfter = true
if (this.startDate) {
// let dateCompBefore = this.dateCompare(this.startDate, fullDate)
// disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
disableBefore = this.dateCompare(this.startDate, nowDate)
}
if (this.endDate) {
// let dateCompAfter = this.dateCompare(fullDate, this.endDate)
// disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
disableAfter = this.dateCompare(nowDate, this.endDate)
}
let multiples = this.multipleStatus.data
let checked = false
let multiplesStatus = -1
if (this.range) {
if (multiples) {
multiplesStatus = multiples.findIndex((item) => {
return this.dateEqual(item, nowDate)
})
}
if (multiplesStatus !== -1) {
checked = true
}
}
let data = {
fullDate: nowDate,
year: full.year,
date: i,
multiple: this.range ? checked : false,
beforeMultiple: this.dateEqual(this.multipleStatus.before, nowDate),
afterMultiple: this.dateEqual(this.multipleStatus.after, nowDate),
month: full.month,
lunar: this.getlunar(full.year, full.month, i),
disable: !(disableBefore && disableAfter),
isDay
}
if (info) {
data.extraInfo = info
}
dateArr.push(data)
}
return dateArr
}
/**
* 获取下月天数
*/
_getNextMonthDays(surplus, full) {
let dateArr = []
for (let i = 1; i < surplus + 1; i++) {
dateArr.push({
date: i,
month: Number(full.month) + 1,
lunar: this.getlunar(full.year, Number(full.month) + 1, i),
disable: true
})
}
return dateArr
}
/**
* 获取当前日期详情
* @param {Object} date
*/
getInfo(date) {
if (!date) {
date = new Date()
}
const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
return dateInfo
}
/**
* 比较时间大小
*/
dateCompare(startDate, endDate) {
// 计算截止时间
startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
// 计算详细项的截止时间
endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
if (startDate <= endDate) {
return true
} else {
return false
}
}
/**
* 比较时间是否相等
*/
dateEqual(before, after) {
// 计算截止时间
before = new Date(before.replace('-', '/').replace('-', '/'))
// 计算详细项的截止时间
after = new Date(after.replace('-', '/').replace('-', '/'))
if (before.getTime() - after.getTime() === 0) {
return true
} else {
return false
}
}
/**
* 获取日期范围内所有日期
* @param {Object} begin
* @param {Object} end
*/
geDateAll(begin, end) {
var arr = []
var ab = begin.split('-')
var ae = end.split('-')
var db = new Date()
db.setFullYear(ab[0], ab[1] - 1, ab[2])
var de = new Date()
de.setFullYear(ae[0], ae[1] - 1, ae[2])
var unixDb = db.getTime() - 24 * 60 * 60 * 1000
var unixDe = de.getTime() - 24 * 60 * 60 * 1000
for (var k = unixDb; k <= unixDe;) {
k = k + 24 * 60 * 60 * 1000
arr.push(this.getDate(new Date(parseInt(k))).fullDate)
}
return arr
}
/**
* 计算阴历日期显示
*/
getlunar(year, month, date) {
return CALENDAR.solar2lunar(year, month, date)
}
/**
* 设置打点
*/
setSelectInfo(data, value) {
this.selected = value
this._getWeek(data)
}
/**
* 获取多选状态
*/
setMultiple(fullDate) {
let {
before,
after
} = this.multipleStatus
if (!this.range) return
if (before && after) {
this.multipleStatus.before = fullDate
this.multipleStatus.after = ''
this.multipleStatus.data = []
} else {
if (!before) {
this.multipleStatus.before = fullDate
} else {
this.multipleStatus.after = fullDate
if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
} else {
this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
}
}
}
this._getWeek(fullDate)
}
/**
* 获取每周数据
* @param {Object} dateData
*/
_getWeek(dateData) {
const {
year,
month
} = this.getDate(dateData)
let firstDay = new Date(year, month - 1, 1).getDay()
let currentDay = new Date(year, month, 0).getDate()
let dates = {
lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
nextMonthDays: [], // 下个月开始几天
weeks: []
}
let canlender = []
const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
let weeks = {}
// 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
for (let i = 0; i < canlender.length; i++) {
if (i % 7 === 0) {
weeks[parseInt(i / 7)] = new Array(7)
}
weeks[parseInt(i / 7)][i % 7] = canlender[i]
}
this.canlender = canlender
this.weeks = weeks
}
//静态方法
// static init(date) {
// if (!this.instance) {
// this.instance = new Calendar(date);
// }
// return this.instance;
// }
}
export default Calendar

View File

@ -0,0 +1,86 @@
{
"id": "uni-calendar",
"displayName": "uni-calendar 日历",
"version": "1.4.12",
"description": "日历组件",
"keywords": [
"uni-ui",
"uniui",
"日历",
"",
"打卡",
"日历选择"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

View File

@ -0,0 +1,103 @@
## Calendar 日历
> **组件名uni-calendar**
> 代码块: `uCalendar`
日历组件
> **注意事项**
> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
> - 本组件农历转换使用的js是 [@1900-2100区间内的公历、农历互转](https://github.com/jjonline/calendar.js)
> - 仅支持自定义组件模式
> - `date`属性传入的应该是一个 String ,如: 2019-06-27 ,而不是 new Date()
> - 通过 `insert` 属性来确定当前的事件是 @change 还是 @confirm 。理应合并为一个事件,但是为了区分模式,现使用两个事件,这里需要注意
> - 弹窗模式下无法阻止后面的元素滚动,如有需要阻止,请在弹窗弹出后,手动设置滚动元素为不可滚动
### 安装方式
本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`
如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
### 基本用法
在 ``template`` 中使用组件
```html
<view>
<uni-calendar
:insert="true"
:lunar="true"
:start-date="'2019-3-2'"
:end-date="'2019-5-20'"
@change="change"
/>
</view>
```
### 通过方法打开日历
需要设置 `insert``false`
```html
<view>
<uni-calendar
ref="calendar"
:insert="false"
@confirm="confirm"
/>
<button @click="open">打开日历</button>
</view>
```
```javascript
export default {
data() {
return {};
},
methods: {
open(){
this.$refs.calendar.open();
},
confirm(e) {
console.log(e);
}
}
};
```
## API
### Calendar Props
| 属性名 | 类型 | 默认值| 说明 |
| - | - | - | - |
| date | String |- | 自定义当前时间,默认为今天 |
| lunar | Boolean | false | 显示农历 |
| startDate | String |- | 日期选择范围-开始日期 |
| endDate | String |- | 日期选择范围-结束日期 |
| range | Boolean | false | 范围选择 |
| insert | Boolean | false | 插入模式,可选值ture插入模式false弹窗模式默认为插入模式 |
|clearDate |Boolean |true |弹窗模式是否清空上次选择内容 |
| selected | Array |- | 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}] |
|showMonth | Boolean | true | 是否显示月份为背景 |
### Calendar Events
| 事件名 | 说明 |返回值|
| - | - | - |
| open | 弹出日历组件,`insert :false` 时生效|- |
## 组件示例
点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar](https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More