feat: 添加多个静态图片资源及配置文件
新增了多个静态图片资源文件,包括01.png、02.png等,并添加了相关的配置文件和组件,如vue.config.js、package.json等。同时引入了Tuniao UI库,并配置了相关的依赖和设置,以支持项目的开发和构建。
23
.gitignore
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
unpackage/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
**/*.log
|
||||
.eslintignore
|
||||
tests/**/coverage/
|
||||
tests/e2e/reports
|
||||
selenium-debug.log
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.local
|
||||
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
168
App.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import store from './store/index.js'
|
||||
import updateCustomBarInfo from './tuniao-ui/libs/function/updateCustomBarInfo.js'
|
||||
import {
|
||||
UserLogin
|
||||
} from '@/util/api.js';
|
||||
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
var Gid = uni.getStorageSync('Gid');
|
||||
if (Gid) {
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: Gid
|
||||
})
|
||||
} else {
|
||||
uni.setStorageSync('Gid', 1);
|
||||
}
|
||||
uni.getSystemInfo({
|
||||
success: function(e) {
|
||||
// #ifndef H5
|
||||
// 获取手机系统版本
|
||||
const system = e.system.toLowerCase()
|
||||
const platform = e.platform.toLowerCase()
|
||||
// 判断是否为ios设备
|
||||
if (platform.indexOf('ios') != -1 && (system.indexOf('ios') != -1 || system.indexOf(
|
||||
'macos') != -1)) {
|
||||
Vue.prototype.SystemPlatform = 'apple'
|
||||
} else if (platform.indexOf('android') != -1 && (system.indexOf('android') != -1)) {
|
||||
Vue.prototype.SystemPlatform = 'android'
|
||||
} else {
|
||||
Vue.prototype.SystemPlatform = 'devtools'
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
|
||||
// 获取设备的状态栏信息和自定义顶栏信息
|
||||
// store.dispatch('updateCustomBarInfo')
|
||||
updateCustomBarInfo().then((res) => {
|
||||
console.log(res);
|
||||
store.commit('$tStore', {
|
||||
name: 'vuex_status_bar_height',
|
||||
value: res.statusBarHeight
|
||||
})
|
||||
store.commit('$tStore', {
|
||||
name: 'vuex_custom_bar_height',
|
||||
value: res.customBarHeight
|
||||
})
|
||||
})
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
//更新检测
|
||||
if (wx.canIUse('getUpdateManager')) {
|
||||
const updateManager = wx.getUpdateManager();
|
||||
updateManager && updateManager.onCheckForUpdate((res) => {
|
||||
if (res.hasUpdate) {
|
||||
updateManager.onUpdateReady(() => {
|
||||
uni.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备就绪,是否需要重新启动应用?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.clearStorageSync() // 更新完成后刷新storage的数据
|
||||
updateManager.applyUpdate()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
updateManager.onUpdateFailed(() => {
|
||||
uni.showModal({
|
||||
title: '已有新版本上线',
|
||||
content: '小程序自动更新失败,请删除该小程序后重新搜索打开哟~~~',
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
} else {
|
||||
//没有更新
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '当前微信版本过低,无法使用该功能,请更新到最新的微信后再重试。',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
|
||||
},
|
||||
onHide: function() {
|
||||
// console.log('App Hide')
|
||||
},
|
||||
methods: {
|
||||
getUserLogin(returnA) {
|
||||
uni.getProvider({
|
||||
service: 'oauth',
|
||||
success: function(res) {
|
||||
console.log(res)
|
||||
if (~res.provider.indexOf('weixin')) {
|
||||
uni.login({
|
||||
provider: "weixin",
|
||||
success: function(loginRes) {
|
||||
UserLogin({
|
||||
code: loginRes.code
|
||||
})
|
||||
.then(response => {
|
||||
console.log('Login', response);
|
||||
if (response.code == 1) {
|
||||
uni.setStorageSync('openid', response.data
|
||||
.openid);
|
||||
uni.setStorageSync('uid', response.data
|
||||
.id);
|
||||
uni.setStorageSync('userInfo', response.data);
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: response.msg,
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
returnA(response);
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: error,
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log(123);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
addWidthToImages(html) {
|
||||
// 匹配并更新已有 style 属性的 img 标签
|
||||
html = html.replace(/(<img\b[^>]*\bstyle\s*=\s*['"])([^'"]*)(['"][^>]*>)/g,
|
||||
function(match, p1, p2, p3) {
|
||||
return p1 + ';width: 100%;display: block;margin:0 auto;' + p3;
|
||||
});
|
||||
|
||||
// 匹配并添加 style 属性到没有 style 属性的 img 标签
|
||||
html = html.replace(/(<img\b(?![^>]*\bstyle\s*=)[^>]*>)/g,
|
||||
function(match, p1) {
|
||||
return p1.replace(/\/?>$/, ' style="width: 100%;display: block;margin:0 auto;" />');
|
||||
});
|
||||
|
||||
return html;
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
@import './tuniao-ui/index.scss';
|
||||
@import './tuniao-ui/iconfont.css';
|
||||
@import './static/css/my.scss';
|
||||
</style>
|
||||
21
index.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script>
|
||||
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
|
||||
CSS.supports('top: constant(a)'))
|
||||
document.write(
|
||||
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
|
||||
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
</script>
|
||||
<title></title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script src="http://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
|
||||
<script type="module" src="/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
94
libs/components/demo-title.vue
Normal file
@ -0,0 +1,94 @@
|
||||
<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>
|
||||
689
libs/components/dynamic-demo-template.vue
Normal file
@ -0,0 +1,689 @@
|
||||
<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
|
||||
}
|
||||
// 如果showState为false则移除对应的选项按钮,否则往对应的位置添加上对应的选项按钮
|
||||
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>
|
||||
147
libs/components/multiple-options-demo.vue
Normal file
@ -0,0 +1,147 @@
|
||||
<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>
|
||||
169
libs/components/nav-index-button.vue
Normal file
@ -0,0 +1,169 @@
|
||||
<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>
|
||||
52
libs/mixin/dynamic_demo_mixin.js
Normal file
@ -0,0 +1,52 @@
|
||||
/**
|
||||
* 动态参数演示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()
|
||||
}
|
||||
}
|
||||
60
libs/mixin/template_page_mixin.js
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
* 演示页面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)
|
||||
}
|
||||
}
|
||||
}
|
||||
30
main.js
Normal file
@ -0,0 +1,30 @@
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
|
||||
import Vue from 'vue'
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
|
||||
// 引入全局TuniaoUI
|
||||
import TuniaoUI from 'tuniao-ui'
|
||||
Vue.use(TuniaoUI)
|
||||
|
||||
// 引入TuniaoUI提供的vuex简写方法
|
||||
let vuexStore = require('@/store/$tn.mixin.js')
|
||||
Vue.mixin(vuexStore)
|
||||
|
||||
// 引入TuniaoUI对小程序分享的mixin封装
|
||||
let mpShare = require('tuniao-ui/libs/mixin/mpShare.js')
|
||||
Vue.mixin(mpShare)
|
||||
|
||||
import {
|
||||
wxshare
|
||||
} from "util/jwexin.js"
|
||||
Vue.prototype.$wxshare = wxshare;
|
||||
|
||||
const app = new Vue({
|
||||
store,
|
||||
...App
|
||||
})
|
||||
|
||||
app.$mount()
|
||||
97
manifest.json
Normal file
@ -0,0 +1,97 @@
|
||||
{
|
||||
"name" : "智慧云商协",
|
||||
"appid" : "__UNI__F702B81",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"share" : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx51c40ff1c6337652",
|
||||
"setting" : {
|
||||
"urlCheck" : true,
|
||||
"minified" : true,
|
||||
"postcss" : true
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "2",
|
||||
"h5" : {
|
||||
"router" : {
|
||||
"base" : ""
|
||||
},
|
||||
"template" : "",
|
||||
"devServer" : {
|
||||
"port" : 80,
|
||||
"https" : false,
|
||||
"disableHostCheck" : true,
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
"target" : "http://192.168.3.130", //域名
|
||||
"changeOrigin" : true,
|
||||
"secure" : false,
|
||||
"pathRewrite" : {
|
||||
"^/api" : "/api"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
5
package.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"jweixin-module": "^1.6.0"
|
||||
}
|
||||
}
|
||||
258
pages.json
Normal file
@ -0,0 +1,258 @@
|
||||
{
|
||||
"easycom": {
|
||||
"^tn-(.*)": "@/tuniao-ui/components/tn-$1/tn-$1.vue"
|
||||
},
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/home",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/service",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/pizz",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/pizz_info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/user",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/directory",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/web",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/search",
|
||||
"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": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/events_my",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_card",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_card_holder",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_desc",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_idea",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_invite",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_msg",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_sign",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/user_activity",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/user_auditing",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/user_auditing_info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_vip",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_vip_info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_vip_clerk",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "user/my_vip_off",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"root": "pages/packageB",
|
||||
"pages": [{
|
||||
"path": "event/event_info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
}, {
|
||||
"path": "news/new_info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "news/notice_info",
|
||||
"style": {
|
||||
"navigationBarTitleText": "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "ask/index",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "ask/add",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "ask/info",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "智慧云商协"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "ask/user_list",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "智慧云商协"
|
||||
}
|
||||
}
|
||||
]
|
||||
}],
|
||||
"globalStyle": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#F8F8F8",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"uniIdRouter": {}
|
||||
}
|
||||
469
pages/index/directory.vue
Normal file
@ -0,0 +1,469 @@
|
||||
<template>
|
||||
<view style="background-color: #EBF4F7;letter-spacing: 1rpx;" @touchmove="preventTouchMove">
|
||||
<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 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:HomeTitle+'通讯录'}]" :current="topCurrent" activeColor="#000" :bold="false"
|
||||
:fontSize="30"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
|
||||
<!-- <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>
|
||||
<view class="tn-flex tn-flex-row-between tn-flex-col-center" style="padding: 0px 30rpx;height: 140rpx;">
|
||||
<view class="justify-content-item align-content-item" style="width: 100%;">
|
||||
<view class="tn-flex tn-flex-col-center"
|
||||
style="border-radius: 100rpx;padding: 10rpx 20rpx 10rpx 20rpx;width: 95%;background-color: #ffffff;">
|
||||
<text
|
||||
class="tn-icon-search justify-content-item tn-padding-right-xs tn-color-gray tn-text-lg"></text>
|
||||
<input v-model="serach_content" class="justify-content-item" placeholder="会员姓名/手机号" name="input"
|
||||
placeholder-style="color:#AAAAAA" style="width: 90%;"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="align-content-item">
|
||||
<view class="justify-content-item tn-text-center">
|
||||
<tn-button @click="serach_do" backgroundColor="#3668fc" shape="round" padding="20rpx 20rpx"
|
||||
width="150rpx">
|
||||
<text class="tn-color-white">搜 索</text>
|
||||
</tn-button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-classify__container">
|
||||
|
||||
<view class="tn-classify__container__wrap tn-flex tn-flex-nowrap tn-flex-row-around"
|
||||
:style="{backgroundColor:'#EBF4F7',height:my_page+'px'}">
|
||||
<!-- 左边容器 -->
|
||||
<scroll-view scroll-y class="tn-classify__left-box left-width">
|
||||
<view v-for="(item, index) in industry_list" :key="index" :id="`tabbar_item_${index}`"
|
||||
style="padding-left: 20rpx;" class="tn-classify__tabbar__item tn-flex tn-flex-col-center"
|
||||
:class="[tabbarItemClass(index)]" @tap.stop="clickClassifyNav(index)">
|
||||
<view class="tn-classify__tabbar__item__title">{{ item.industry_name }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 右边容器 -->
|
||||
<scroll-view class="tn-classify__right-box" @scroll="getScroll" :scroll-top="top" scroll-y
|
||||
style="width: 72%">
|
||||
<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">
|
||||
<view v-if="item.neirong"
|
||||
style="font-weight: 300;;background-color: #EBF4F7;color:#4AA2EF;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"
|
||||
@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;">
|
||||
<text>{{v.nikename}}</text>
|
||||
<text
|
||||
style="margin-left: 50rpx;">{{v.nation==null||v.nation==''?'':v.nation}}</text>
|
||||
</view>
|
||||
<view class="tn-text-ellipsis-2"
|
||||
style="font-size: 24rpx;margin-top: 10rpx;">
|
||||
<text>{{v.enterprise_name==null?'':v.enterprise_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length==0" style="text-align: center;padding: 20rpx">
|
||||
暂无
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <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>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addressList,
|
||||
associationIndex,
|
||||
newIndustryIndex
|
||||
} from '@/util/api.js';
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
serach_content: '',
|
||||
list: [],
|
||||
topCurrent: 0,
|
||||
tabbarIndex: 0,
|
||||
// 分类菜单item的信息
|
||||
tabbarItemInfo: [],
|
||||
// scrollView的top值
|
||||
scrollViewBasicTop: 0,
|
||||
// scrollView的高度
|
||||
scrollViewHeight: 0,
|
||||
// 左边scrollView的滚动高度
|
||||
leftScrollViewTop: 0,
|
||||
// 右边scrollView的滚动高度
|
||||
rightScrollViewTop: 0,
|
||||
// 当前选中的tabbar序号
|
||||
currentTabbarIndex: 0,
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
industry_list: [],
|
||||
leftId: 0,
|
||||
selectShow: false,
|
||||
HomeTitle: '',
|
||||
selectList: [],
|
||||
gid: store.state.Gid,
|
||||
gname: '',
|
||||
top: 0,
|
||||
my_page: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
tabbarItemClass() {
|
||||
return index => {
|
||||
if (index === this.currentTabbarIndex) {
|
||||
return 'tn-classify__tabbar__item--active tn-bg-white'
|
||||
} 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
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
console.log(d.id);
|
||||
if (typeof(d.id) != 'undefined') {
|
||||
this.gid = d.id;
|
||||
}
|
||||
this.getIndustryList();
|
||||
this.getAssociationIndex();
|
||||
|
||||
},
|
||||
methods: {
|
||||
preventTouchMove() {
|
||||
|
||||
},
|
||||
serach_do() {
|
||||
this.list = [];
|
||||
this.leftId = 0;
|
||||
this.currentTabbarIndex = 0;
|
||||
console.log(this.leftId);
|
||||
this.getAddressList();
|
||||
},
|
||||
getScroll(d) {
|
||||
this.top = d.scrollTop;
|
||||
},
|
||||
onload() {
|
||||
console.log(this.gid);
|
||||
console.log(store.state.Gid);
|
||||
if (this.gid == store.state.Gid && this.list.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.currentTabbarIndex = 0;
|
||||
this.gid = store.state.Gid;
|
||||
this.gname = store.state.Gname;
|
||||
this.getIndustryList();
|
||||
this.getAssociationIndex();
|
||||
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();
|
||||
},
|
||||
getAssociationIndex() {
|
||||
associationIndex()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
const transformedSelectList = key.map(item => ({
|
||||
value: item.id,
|
||||
label: item.association_name
|
||||
}));
|
||||
const foundNumber = transformedSelectList.find((element) => element.value == this.gid);
|
||||
this.HomeTitle = foundNumber.label;
|
||||
this.selectList = transformedSelectList;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getIndustryList() {
|
||||
newIndustryIndex({
|
||||
association_id: this.gid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.industry_list = res.data;
|
||||
this.industry_list.push({
|
||||
id: -1,
|
||||
industry_name: '其他行业'
|
||||
});
|
||||
this.industry_list.unshift({
|
||||
id: 0,
|
||||
industry_name: '组织架构'
|
||||
});
|
||||
this.leftId = res.data[0].id;
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
this.getAddressList();
|
||||
} else {
|
||||
this.industry_list = [];
|
||||
this.list = [];
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getAddressList() {
|
||||
addressList({
|
||||
position_id: 0,
|
||||
association_id: this.gid,
|
||||
industry_id: this.leftId,
|
||||
nikename: this.serach_content
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data.ret;
|
||||
}
|
||||
setTimeout(function() {
|
||||
uni.hideLoading();
|
||||
}, 2000);
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
clickClassifyNav(index) {
|
||||
uni.showLoading({
|
||||
title: '加载中...'
|
||||
});
|
||||
this.currentTabbarIndex = index;
|
||||
this.leftId = this.industry_list[index].id;
|
||||
this.list = [];
|
||||
this.top = this.randomBetween();
|
||||
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()
|
||||
} 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: #FFFFFF;
|
||||
}
|
||||
|
||||
/* 分类列表和内容 end */
|
||||
|
||||
/* 侧边导航 start */
|
||||
&__tabbar {
|
||||
&__item {
|
||||
height: 90rpx;
|
||||
|
||||
&:first-child {
|
||||
border-top-right-radius: 0rpx;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-right-radius: 0rpx;
|
||||
}
|
||||
|
||||
&--active {
|
||||
background-color: #FFFFFF;
|
||||
position: relative;
|
||||
// font-weight: bold;
|
||||
color: #4AA2EF;
|
||||
|
||||
&--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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 子栏目 end */
|
||||
}
|
||||
|
||||
/* 分类内容 end */
|
||||
}
|
||||
</style>
|
||||
730
pages/index/home.vue
Normal file
@ -0,0 +1,730 @@
|
||||
<template>
|
||||
<view style="background-color: rgb(235, 244, 247);">
|
||||
<tn-nav-bar :isBack="false" :bottomShadow="true" backgroundColor="#FFFFFF">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
|
||||
<view style="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;width: 100%;">
|
||||
<!-- <tn-tabs :list="[{name:'智慧云商协'}]" :current="topCurrent" activeColor="#000" :bold="false"
|
||||
:fontSize="36"></tn-tabs> -->
|
||||
<view style="text-align: center;font-size: 32rpx;" @click="selectShow = true">
|
||||
<text>{{ HomeTitle }}</text>
|
||||
<!-- <image src="/static/c1455.png" style="width: 25rpx;height: 25rpx;margin-left: 10rpx;"></image>-->
|
||||
</view>
|
||||
</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-between" style="padding-top: 30rpx;">
|
||||
<view class="tn-color-gray--dark"
|
||||
style="width: 100%;margin: 0rpx 30rpx 0 30rpx;border-radius: 100rpx;padding-left: 6rpx;background-color: #ffffff;"
|
||||
@click="openUrl('/pages/index/search')">
|
||||
<tn-notice-bar :list="searlist" mode="vertical" leftIconName="search"
|
||||
:duration="6000"></tn-notice-bar>
|
||||
</view>
|
||||
<view class="tn-flex" style="margin:0px 30rpx 0rpx 0rpx;">
|
||||
<tn-button @click="openUrl('/pages/index/search')" backgroundColor="#ffffff" fontColor="#666666"
|
||||
shape="round" width="140rpx" height="70rpx">搜索
|
||||
</tn-button>
|
||||
|
||||
<!-- <image @click="openUrl('/pages/index/my_assist')" src="/static/t1.png"-->
|
||||
<!-- style="width: 35rpx;height: 35rpx;"></image>-->
|
||||
<!-- <view style="position: relative;">-->
|
||||
<!-- <image @click="openUrl('/pages/index/my_msg')" src="/static/t2.png"-->
|
||||
<!-- style="width: 35rpx;height: 35rpx;margin-left: 40rpx;"></image>-->
|
||||
<!-- <tn-badge v-if="msg()>0" style="position: absolute;top: -20rpx;right: -20rpx;"-->
|
||||
<!-- backgroundColor="#E83A30" fontColor="#ffffff">{{msg()}}</tn-badge>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="margin-top: 20rpx;">
|
||||
<swiper class="card-swiper" style="height: 365rpx" current="0" mode="dot" :circular="true"
|
||||
duration="500" interval="5000" @change="cardSwiper" :autoplay="true">
|
||||
<swiper-item style="padding: 0px 28rpx;height: 365rpx;border-radius: 15rpx;"
|
||||
v-for="(item,index) in carousel_list" :key="index" :class="cardCur==index?'cur':''">
|
||||
<video :muted="true" v-if="item.type==2" id="myVideo" :src="apiImgUrl+item.image"
|
||||
:controls="false" loop autoplay object-fit="contain"
|
||||
style="width: 100%;border-radius: 15rpx;height: 100%;" @error="videoErrorCallback"></video>
|
||||
<image v-if="item.type==1" :src="apiImgUrl+item.image" mode="aspectFit"
|
||||
style="width: 100%;height: 365rpx;border-radius: 15rpx;">
|
||||
</image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="indication">
|
||||
<block v-for="(item,index) in carousel_list" :key="index">
|
||||
<view class="spot" :class="cardCur==index?'active':''"></view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding: 0px 30rpx;margin-bottom: 20rpx;">
|
||||
<view style="background-color: #FFF;border-radius: 16rpx;">
|
||||
<cc-noticeBar :noticeList="noticeList" colors="#000000" @click="itemClick"></cc-noticeBar>
|
||||
</view>
|
||||
</view>
|
||||
<view style="background-color: #FFF;border-radius: 18rpx;margin: 25rpx;">
|
||||
<tn-grid align="center" :col="4">
|
||||
<tn-grid-item style="width: 25%" @click="openUrl('/pages/index/pizz_info?id='+association_id)">
|
||||
<view style="padding: 30rpx;text-align: center;">
|
||||
<image src="/static/h1.png" style="width: 100rpx;height: 100rpx;"></image>
|
||||
<view style="font-size: 28rpx;font-weight: normal;margin-top: 10rpx;">协会简介</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
<tn-grid-item style="width: 25%" @click="openUrl('/pages/index/service?type='+1)">
|
||||
<view style="padding: 30rpx;text-align: center;">
|
||||
<image src="/static/h2.png" style="width: 100rpx;height: 100rpx;"></image>
|
||||
<view style="font-size: 28rpx;font-weight: normal;margin-top: 10rpx;">协会活动</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
<tn-grid-item style="width: 25%" @click="openUrl('/pages/packageA/info/policy')">
|
||||
<view style="padding: 30rpx;text-align: center;">
|
||||
<image src="/static/h3.png" style="width: 100rpx;height: 100rpx;"></image>
|
||||
<view style="font-size: 28rpx;font-weight: normal;margin-top: 10rpx;">惠企政策</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
<tn-grid-item style="width: 25%" @click="openUrl('/pages/packageB/ask/index')">
|
||||
<view style="padding: 30rpx;text-align: center;">
|
||||
<image src="/static/h4.png" style="width: 100rpx;height: 100rpx;"></image>
|
||||
<view style="font-size: 28rpx;font-weight: normal;margin-top: 10rpx;">你问我帮</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
</tn-grid>
|
||||
</view>
|
||||
<!-- <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-flex-row-center" style="padding: 0px 28rpx;">
|
||||
<view @click="openUrl('/pages/index/pizz_info?id='+association_id)"
|
||||
style="position:relative;padding: 20rpx;border-radius: 16rpx;height: 270rpx;width: 100%;background: linear-gradient(275.57deg, rgba(193, 237, 217, 1) 1.39%, rgba(188, 237, 216, 1) 112.49%);">
|
||||
<view style="font-size: 32rpx">协会简介</view>
|
||||
<view style="font-size: 22rpx;margin-top: 10rpx">Association introduction</view>
|
||||
<image src="/static/48098165.png"
|
||||
style="width: 150rpx;height: 150rpx;position: absolute; right: 10rpx;bottom: 0;"></image>
|
||||
</view>
|
||||
<view style="width: 100%;margin-left: 20rpx">
|
||||
<view @click="openUrl('/pages/index/service?type='+1)"
|
||||
style=" position:relative;padding: 20rpx;border-radius: 16rpx;height: 130rpx;background: linear-gradient(96.63deg, rgba(189, 224, 249, 1) 11.78%, rgba(205, 233, 251, 1) 103.76%);">
|
||||
<view style="font-size: 32rpx">协会活动</view>
|
||||
<view style="font-size: 22rpx;margin-top: 10rpx">Offline events</view>
|
||||
<image src="/static/48098164.png"
|
||||
style="width: 90rpx;height: 90rpx;position: absolute; right: 10rpx;bottom: 0;"></image>
|
||||
</view>
|
||||
<view @click="openUrl('/pages/index/service?type='+3)"
|
||||
style="position:relative;margin-top: 10rpx;padding: 20rpx;border-radius: 16rpx;height: 130rpx;background: linear-gradient(279.38deg, rgba(246, 217, 197, 1) -5.05%, rgba(245, 209, 189, 1) 121.63%);">
|
||||
<view style="font-size: 32rpx">公益捐赠</view>
|
||||
<view style="font-size: 22rpx;margin-top: 10rpx">Public donations</view>
|
||||
<image src="/static/48098162.png"
|
||||
style="width: 90rpx;height: 90rpx;position: absolute; right: 10rpx;bottom: 0;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-flex-row-center"
|
||||
style="padding: 0px 28rpx;margin-top: 10rpx">
|
||||
<view @click="openUrl('/pages/index/service?type='+2)"
|
||||
style="position:relative;padding: 20rpx;border-radius: 16rpx;height: 130rpx;width: 100%;background: linear-gradient(280.64deg, rgba(251, 236, 198, 1) 0%, rgba(248, 225, 183, 1) 117.05%);">
|
||||
<view style="font-size: 32rpx">调查问卷</view>
|
||||
<view style="font-size: 22rpx;margin-top: 10rpx">Questionnaires</view>
|
||||
<image src="/static/48098160.png"
|
||||
style="width: 90rpx;height: 90rpx;position: absolute; right: 10rpx;bottom: 0;"></image>
|
||||
</view>
|
||||
<view style="width: 100%;margin-left: 20rpx">
|
||||
<view @click="openUrl('/pages/index/service?type='+4)"
|
||||
style="position:relative;padding: 20rpx;border-radius: 16rpx;height: 130rpx;background: linear-gradient(96.63deg, rgba(226, 228, 245, 1) 11.78%, rgba(234, 236, 255, 1) 103.76%);">
|
||||
<view style="font-size: 32rpx">学习培训</view>
|
||||
<view style="font-size: 22rpx;margin-top: 10rpx">Learn and train</view>
|
||||
<image src="/static/48098163.png"
|
||||
style="width: 90rpx;height: 90rpx;position: absolute; right: 10rpx;bottom: 0;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-flex-row-center"
|
||||
style="padding: 0px 28rpx;margin-top: 10rpx">
|
||||
<view @click="openUrl('/pages/packageA/info/policy')"
|
||||
style="position:relative;padding: 20rpx;border-radius: 16rpx;height: 130rpx;width: 100%;background: linear-gradient(90deg, #d6eafa 0%, #d4eafe 100%);">
|
||||
<view style="font-size: 32rpx">惠企政策</view>
|
||||
<view style="font-size: 22rpx;margin-top: 10rpx">Corporate policies</view>
|
||||
<image src="/static/3162033.png"
|
||||
style="width: 90rpx;height: 90rpx;position: absolute; right: 10rpx;bottom: 0;"></image>
|
||||
</view>
|
||||
<view style="width: 100%;margin-left: 20rpx">
|
||||
<view @click="openApply()"
|
||||
style="position:relative;padding: 20rpx;border-radius: 16rpx;height: 130rpx;background: #FFEDD2;">
|
||||
<view style="font-size: 32rpx">申请入会</view>
|
||||
<view style="font-size: 22rpx;margin-top: 10rpx">Apply for membership</view>
|
||||
<image src="/static/1000006795.png"
|
||||
style="width: 90rpx;height: 90rpx;position: absolute; right: 10rpx;bottom: 0;"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
<!-- <view style="width: 92%;background-color: #ffffff;border-radius: 16rpx;margin: 20rpx auto;overflow: hidden;"> -->
|
||||
<!-- <tn-list-cell>
|
||||
<view class="list-icon-text">
|
||||
<view class="list__left">
|
||||
<view class="list__left__icon">
|
||||
<image src="/static/hqzc.png" style="width: 56rpx;height: 50rpx;"></image>
|
||||
</view>
|
||||
<view class="list__left__icon"
|
||||
style="width: 4rpx;height: 42rpx;border-radius: 56rpx;background: #d1d4d180;"></view>
|
||||
<view class="list__left__text">惠企政策推送平台</view>
|
||||
</view>
|
||||
<view class="list__right">
|
||||
<text class="tn-icon-right tn-margin-right-xs"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-list-cell> -->
|
||||
<!-- <tn-notice-bar :list="list" @click="openInfo" leftIconType="img" mode="vertical" :rightIcon="true"
|
||||
backgroundColor="#ffffff" :radius="16" @clickRight="openRight" @clickLeft="openRight"></tn-notice-bar> -->
|
||||
<!-- </view> -->
|
||||
|
||||
<!-- <view class="tn-flex tn-flex-row-between tn-flex-col-center tn-flex-row-center"-->
|
||||
<!-- style="padding:0px 30rpx 0rpx 30rpx;text-align: center;font-size: 28rpx;">-->
|
||||
<!-- <view @click="openUrl('/pages/index/tissue')"-->
|
||||
<!-- style="width: 33%;background: linear-gradient(270deg, #3CBAEA, #6BC7F0);;border-radius: 16rpx;padding:25rpx 20rpx;">-->
|
||||
<!-- <view>-->
|
||||
<!-- <image src="/static/c3.png" style="width: 35rpx;height: 35rpx;vertical-align: middle;">-->
|
||||
<!-- </image>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="margin-top: 10rpx;">-->
|
||||
<!-- <text style="color: #FFF;">组织架构</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view @click="openUrl('/pages/index/service')"-->
|
||||
<!-- style="width: 33%;background: linear-gradient(270deg, #EE7E45, #EE9657);border-radius: 16rpx;padding:25rpx 20rpx;margin-left:10rpx;">-->
|
||||
<!-- <view>-->
|
||||
<!-- <image src="/static/c2.png" style="width: 35rpx;height: 35rpx;vertical-align: middle;">-->
|
||||
<!-- </image>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="margin-top: 10rpx;">-->
|
||||
<!-- <text style="color: #FFF;">协会活动</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view @click="openUrl('/pages/index/directory')"-->
|
||||
<!-- style="width: 33%;background: linear-gradient(270deg, #45B335, #89C33D);border-radius: 16rpx;padding:25rpx 20rpx;margin-left:10rpx;">-->
|
||||
<!-- <view>-->
|
||||
<!-- <image src="/static/c1.png" style="width: 35rpx;height: 35rpx;vertical-align: middle;">-->
|
||||
<!-- </image>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="margin-top: 10rpx;">-->
|
||||
<!-- <text style="color: #FFF;">通讯录</text>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
|
||||
<view style="padding: 0rpx 28rpx 0rpx 28rpx;">
|
||||
<view style="background-color: #ffffff;border-radius:24rpx;width: 110%;padding-bottom: 15rpx;">
|
||||
<view @click.stop="openUrl('/pages/index/service')"
|
||||
class="tn-flex tn-flex-row-between tn-flex-col-center tn-flex-row-center"
|
||||
style="padding: 30rpx;width: 97%;">
|
||||
<view style="font-size: 32rpx;">协会活动</view>
|
||||
<view style="color: #808080;">
|
||||
<text>更多</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view :scroll-x="true" style="padding:0rpx 30rpx;white-space: nowrap;width: 100%"
|
||||
v-if="actList.length>0">
|
||||
<view v-for="(item,index) in actList"
|
||||
@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>
|
||||
</view>
|
||||
<view style="padding:10rpx;font-weight: 400;min-height: 100rpx;">
|
||||
<view class="tn-text-ellipsis-2" style="text-align: left;font-size: 28rpx">
|
||||
<text>{{ item.activity_name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="position: absolute;top: 0rpx;left: 0rpx;">
|
||||
<view v-if="item.type=='进行中'" class="my_tag" style="background-color: rgb(75, 130, 235)">
|
||||
进行中
|
||||
</view>
|
||||
<view v-if="item.type=='未开始'" class="my_tag" style="background-color: rgb(248, 155, 59)">
|
||||
预告
|
||||
</view>
|
||||
<view v-if="item.type=='已结束'" class="my_tag" style="background-color: rgb(225, 43, 51)">
|
||||
已结束
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view style="background-color: #ffffff;padding: 20rpx;text-align: center" v-if="actList.length==0">
|
||||
暂无活动
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="padding:0rpx 28rpx;margin-top: 20rpx;">
|
||||
<view style="background-color: #ffffff;border-radius: 15rpx 15rpx 0px 0px;padding:20rpx;">
|
||||
<tn-tabs :list="goryList" :isScroll="true" :activeItemStyle="{fontSize:'30rpx',fontWeight:'600'}"
|
||||
activeColor="#3377FF" :current="current" name="name" @change="change" :fontSize="28"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:0px 28rpx;padding-bottom: 20rpx;min-height:1000rpx">
|
||||
<view v-for="(item,index) in news_list" :class="{ 'rounded_corner': index === 0 }"
|
||||
style="background-color: #ffffff;">
|
||||
<view class="tn-flex" @click="openNewUrl(item)" style="padding: 20rpx;min-height: 200rpx;">
|
||||
<view v-if="item.news_image">
|
||||
<image :src="apiImgUrl+item.news_image" mode="aspectFill"
|
||||
style="width: 230rpx;height: 180rpx;border-radius: 8rpx;"></image>
|
||||
</view>
|
||||
<view style="position:relative;padding:0rpx 10rpx 10rpx 15rpx;margin-left: 10rpx;">
|
||||
<view class="tn-text-ellipsis-3" style="font-size: 28rpx;">{{ item.news_title }}</view>
|
||||
<view class="tn-flex tn-flex-row-between"
|
||||
style="font-size:24rpx;width: 95%;color: rgb(171, 171, 171);position: absolute; bottom: 0rpx; min-width: 380rpx;overflow: hidden">
|
||||
<view>{{ item.name }}</view>
|
||||
<view>{{ formatTime(item.showtime) }}</view>
|
||||
<view>
|
||||
<text class="tn-icon-eye" style="vertical-align: middle;"></text>
|
||||
<text style="vertical-align: middle;">{{ item.news_hits }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="news_list.length-1>index"
|
||||
style="background: rgba(217, 217, 217, 0.5);width: 90%;margin: 0 auto;height: 2rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<tn-select :safeAreaInsetBottom="true" v-model="selectShow" mode="single" :list="selectList"
|
||||
@confirm="confirm"></tn-select>
|
||||
</view>
|
||||
<!-- <view style="height: 1rpx;background-color: #E6E6E6;width: 90%;margin: 0 auto;margin-top: 30rpx;"></view> -->
|
||||
<view @click="callPhone"
|
||||
style="padding-top:70rpx ;text-align: center;padding-bottom: 160rpx;font-size: 24rpx;color: rgba(153,153,153,0.5);letter-spacing: 2rpx;">
|
||||
<view>v{{vuex_version}}</view>
|
||||
<view>技术支持:洛商协工作小组</view>
|
||||
<view>电话:15503791530</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
newsGoryList,
|
||||
activityList,
|
||||
newsList,
|
||||
associationIndex,
|
||||
carouselIndex,
|
||||
Mailcoent,
|
||||
getArticlePolicyList,
|
||||
getNoticeList
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
selectShow: false,
|
||||
selectList: [],
|
||||
topCurrent: 0,
|
||||
searlist: [{
|
||||
article_title: '会员名称/协会名称/活动/新闻'
|
||||
}],
|
||||
noticeList: [],
|
||||
cardCur: 0,
|
||||
isAndroid: true,
|
||||
goryList: [],
|
||||
news_list: [],
|
||||
actList: [],
|
||||
carousel_list: [],
|
||||
current: 0,
|
||||
page: 1,
|
||||
size: 10,
|
||||
gory_id: 0,
|
||||
type: 1,
|
||||
HomeTitle: '',
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
association_id: this.$store.state.Gid,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getApp().getUserLogin((r) => {
|
||||
console.log('---Login---', r);
|
||||
})
|
||||
this.registerGetGidListener();
|
||||
this.getNewsGoryList();
|
||||
this.getActivityList();
|
||||
this.getAssociationIndex();
|
||||
this.getCarouselIndex();
|
||||
this.getMsg();
|
||||
this.getNotice();
|
||||
//this.getArticlePolicyListAll();
|
||||
},
|
||||
beforeDestroy() {
|
||||
// 移除事件监听器
|
||||
this.unregisterGetGidListener();
|
||||
},
|
||||
methods: {
|
||||
getNotice() {
|
||||
getNoticeList({
|
||||
page: 1,
|
||||
size: 10
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.noticeList = res.data.ret;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
itemClick(item) {
|
||||
console.log(item);
|
||||
uni.navigateTo({
|
||||
url: "/pages/packageB/news/notice_info?id=" + item.id
|
||||
})
|
||||
},
|
||||
registerGetGidListener() {
|
||||
const that = this;
|
||||
uni.$on('getGid', function(data) {
|
||||
console.log('-----', data);
|
||||
that.page = 1;
|
||||
that.goryList = [];
|
||||
that.news_list = [];
|
||||
that.actList = [];
|
||||
that.carousel_list = [];
|
||||
that.association_id = data.gid;
|
||||
that.getNewsGoryList();
|
||||
that.getActivityList();
|
||||
that.getAssociationIndex();
|
||||
that.getCarouselIndex();
|
||||
});
|
||||
},
|
||||
unregisterGetGidListener() {
|
||||
uni.$off('getGid');
|
||||
},
|
||||
openNewUrl(item) {
|
||||
//'/pages/packageB/news/new_info?id='+item.news_id
|
||||
console.log(item);
|
||||
if (item.wx_url == '') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/packageB/news/new_info?id=' + item.news_id
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/web?url=' + encodeURIComponent(item.wx_url),
|
||||
})
|
||||
}
|
||||
},
|
||||
callPhone() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: '15503791530', // 电话号码
|
||||
success: function() {
|
||||
console.log('拨打电话成功');
|
||||
},
|
||||
fail: function() {
|
||||
console.log('拨打电话失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
msg() {
|
||||
return this.$store.state.msgCount;
|
||||
},
|
||||
getArticlePolicyListAll() {
|
||||
getArticlePolicyList({
|
||||
cid: 22
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data.ret;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openInfo(d) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/packageA/info/policy_info?id=' + d.id,
|
||||
})
|
||||
},
|
||||
openRight() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/packageA/info/policy',
|
||||
})
|
||||
},
|
||||
async getMsg() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
|
||||
const res = await Mailcoent({
|
||||
member_id: uid
|
||||
});
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.$store.commit('$tStore', {
|
||||
name: 'msgCount',
|
||||
value: res.data
|
||||
})
|
||||
} else {
|
||||
this.$store.commit('$tStore', {
|
||||
name: 'msgCount',
|
||||
value: 0
|
||||
})
|
||||
}
|
||||
console.log(store.state.msgCount);
|
||||
},
|
||||
confirm(d) {
|
||||
var info = d[0];
|
||||
console.log(info);
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: info.value
|
||||
})
|
||||
uni.setStorageSync('Gid', info.value);
|
||||
this.association_id = info.value;
|
||||
this.page = 1;
|
||||
this.goryList = [];
|
||||
this.news_list = [];
|
||||
this.actList = [];
|
||||
this.carousel_list = [];
|
||||
this.getNewsGoryList();
|
||||
this.getActivityList();
|
||||
this.getAssociationIndex();
|
||||
this.getCarouselIndex();
|
||||
//this.$emit('childEvent', '修改后的数据');
|
||||
},
|
||||
getAssociationIndex() {
|
||||
associationIndex({
|
||||
page: 1,
|
||||
size: 200
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
key.push({
|
||||
id: 61,
|
||||
association_name: '洛阳市总商会'
|
||||
});
|
||||
const transformedSelectList = key.map(item => ({
|
||||
value: item.id,
|
||||
label: item.association_name,
|
||||
icon: item.association_image
|
||||
}));
|
||||
const foundNumber = transformedSelectList.find((element) => element.value == store.state
|
||||
.Gid);
|
||||
this.HomeTitle = foundNumber.label;
|
||||
this.selectList = transformedSelectList;
|
||||
//#ifdef MP-WEIXIN
|
||||
this.$parent.childEvent(foundNumber);
|
||||
//#endif
|
||||
// #ifdef H5
|
||||
console.log('H5');
|
||||
this.$parent.$parent.$parent.$parent.childEvent(foundNumber);
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getCarouselIndex() {
|
||||
carouselIndex({
|
||||
association_id: store.state.Gid,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.carousel_list = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getActivityList() {
|
||||
activityList({
|
||||
association_id: store.state.Gid,
|
||||
page: 1,
|
||||
size: 10
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.actList = res.data.ret;
|
||||
} else {
|
||||
this.actList = [];
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getNewsGoryList() {
|
||||
newsGoryList({
|
||||
association_id: this.association_id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
key.unshift({
|
||||
id: 0,
|
||||
name: '最新'
|
||||
});
|
||||
this.goryList = key;
|
||||
this.type = 1;
|
||||
this.gory_id = 0;
|
||||
this.getNewsList();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getNewsList() {
|
||||
newsList({
|
||||
association_id: store.state.Gid,
|
||||
type: this.type,
|
||||
gory_id: this.gory_id,
|
||||
page: this.page,
|
||||
size: this.size
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.news_list.push(...res.data.ret);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
cardSwiper(d) {
|
||||
this.cardCur = d.detail.current;
|
||||
},
|
||||
ReachBottom() {
|
||||
console.log('home');
|
||||
//this.page = this.page + 1;
|
||||
//this.getNewsList();
|
||||
//this.getIndex();
|
||||
},
|
||||
change(e) {
|
||||
this.current = e;
|
||||
var info = this.goryList[e];
|
||||
this.gory_id = info.id;
|
||||
this.type = e === 0 ? 1 : 0;
|
||||
this.page = 1;
|
||||
this.news_list = [];
|
||||
this.getNewsList();
|
||||
},
|
||||
openUrl(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
openApply() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
var userInfo = uni.getStorageSync('userInfo');
|
||||
if (!uid || !userInfo) {
|
||||
uni.showToast({
|
||||
title: '请登陆后查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/packageA/user/apply_in?association_id=' + this.association_id
|
||||
})
|
||||
|
||||
},
|
||||
opentab() {
|
||||
uni.$emit('depId', {
|
||||
index: 1
|
||||
})
|
||||
},
|
||||
videoErrorCallback(e) {
|
||||
uni.showModal({
|
||||
content: e.target.errMsg,
|
||||
showCancel: false
|
||||
})
|
||||
},
|
||||
formatTime(time) {
|
||||
const [year, month, day] = time.split(' ')[0].split('-');
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.my_tag {
|
||||
padding: 8rpx 15rpx;
|
||||
font-size: 20rpx;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
border-radius: 0rpx 0rpx 22rpx 0rpx;
|
||||
}
|
||||
|
||||
.rounded_corner {
|
||||
//border-radius: 16rpx 16rpx 0rpx 0rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.list {
|
||||
&__left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
&__icon,
|
||||
&__image {
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
.list-icon-text,
|
||||
.list-image-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
</style>
|
||||
270
pages/index/index.vue
Normal file
@ -0,0 +1,270 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view v-if="tabberPageLoadFlag[0]" :style="{display: currentIndex === 0 ? '' : 'none'}">
|
||||
<scroll-view class="custom-tabbar-page" scroll-y enable-back-to-top @scrolltolower="tabbarPageScrollLower">
|
||||
<Home ref="home"></Home>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- <view v-if="tabberPageLoadFlag[1]" :style="{display: currentIndex === 1 ? '' : 'none'}">
|
||||
<scroll-view class="custom-tabbar-page" scroll-y enable-back-to-top @scrolltolower="tabbarPageScrollLower">
|
||||
<Service ref="service"></Service>
|
||||
</scroll-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">
|
||||
<Discovery ref="discovery"></Discovery>
|
||||
</scroll-view>
|
||||
</view> -->
|
||||
<view @touchmove="preventTouchMove" v-if="tabberPageLoadFlag[2]"
|
||||
:style="{display: currentIndex === 2 ? '' : 'none'}">
|
||||
<scroll-view scroll-y class="custom-tabbar-page" style="height: 100vh;" scroll-y enable-back-to-top
|
||||
@scrolltolower="tabbarPageScrollLower">
|
||||
<Pizz ref="pizz"></Pizz>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view v-if="tabberPageLoadFlag[3]" :style="{display: currentIndex === 3 ? '' : 'none'}">
|
||||
<scroll-view class="custom-tabbar-page" scroll-y enable-back-to-top @scrolltolower="tabbarPageScrollLower">
|
||||
<User ref="user"></User>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<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>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Home from './home.vue'
|
||||
import Service from './service.vue'
|
||||
import Pizz from './pizz.vue'
|
||||
import User from './user.vue'
|
||||
import Directory from './directory.vue'
|
||||
import {
|
||||
Mailcoent
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Home,
|
||||
Service,
|
||||
Pizz,
|
||||
User,
|
||||
Directory
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 底部tabbar菜单数据
|
||||
tabbarList: [{
|
||||
title: '首页',
|
||||
activeIcon: '/static/01_1.png',
|
||||
inactiveIcon: '/static/01.png',
|
||||
id: 0,
|
||||
},
|
||||
{
|
||||
title: '通讯录',
|
||||
activeIcon: '/static/02_2.png',
|
||||
inactiveIcon: '/static/02.png',
|
||||
id: 1,
|
||||
},
|
||||
// {
|
||||
// // 服务、案例、品牌、合作、发现、探索
|
||||
// activeIcon: '',
|
||||
// inactiveIcon: '',
|
||||
// iconSize: 110,
|
||||
// out: true
|
||||
// },
|
||||
{
|
||||
title: '发现',
|
||||
activeIcon: '/static/03_3.png',
|
||||
inactiveIcon: '/static/03.png',
|
||||
id: 2,
|
||||
},
|
||||
{
|
||||
title: '个人中心',
|
||||
activeIcon: '/static/04_4.png',
|
||||
inactiveIcon: '/static/04.png',
|
||||
id: 3,
|
||||
}
|
||||
],
|
||||
thisIndex: 0,
|
||||
// tabbar当前被选中的序号
|
||||
currentIndex: 0,
|
||||
// 自定义底栏对应页面的加载情况
|
||||
tabberPageLoadFlag: [],
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
icon: '',
|
||||
name: '',
|
||||
tabShow: true,
|
||||
}
|
||||
},
|
||||
onResize(res) {
|
||||
console.log('onResizeonResizeonResize', res);
|
||||
let hdWidth = uni.getStorageSync('windowWidth')
|
||||
if (hdWidth != res.size.framesetWidth) {
|
||||
uni.setStorageSync('windowWidth', res.size.framesetWidth);
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
const index = Number(options.index || 0)
|
||||
// 根据底部tabbar菜单列表设置对应页面的加载情况
|
||||
this.tabberPageLoadFlag = this.tabbarList.map((item, tabbar_index) => {
|
||||
return index === tabbar_index
|
||||
})
|
||||
this.switchTabbar(index)
|
||||
var that = this;
|
||||
uni.$on('depId', function(data) {
|
||||
that.switchTabbar(data.index);
|
||||
})
|
||||
uni.$on('showTab', function(data) {
|
||||
var index = data.index;
|
||||
that.tabShow = index;
|
||||
})
|
||||
if (typeof(options.scene) != 'undefined') {
|
||||
let decodedParams = decodeURIComponent(options.scene);
|
||||
var searchParams = this.parseQuery(decodedParams);
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: searchParams.gid
|
||||
})
|
||||
uni.setStorageSync('Gid', searchParams.gid);
|
||||
}
|
||||
if (typeof(options.gid) != 'undefined') {
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: options.gid
|
||||
})
|
||||
uni.setStorageSync('Gid', options.gid);
|
||||
}
|
||||
|
||||
},
|
||||
mounted() {
|
||||
//this.wxshare();
|
||||
},
|
||||
onShareAppMessage() {
|
||||
console.log(store.state.Gid);
|
||||
return {
|
||||
title: this.name,
|
||||
path: '/pages/index/index?gid=' + store.state.Gid,
|
||||
imageUrl: this.icon,
|
||||
}
|
||||
},
|
||||
onShareTimeline() {
|
||||
console.log(store.state.Gid);
|
||||
return {
|
||||
title: this.name,
|
||||
path: '/pages/index/index?gid=' + store.state.Gid,
|
||||
imageUrl: this.icon,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
preventTouchMove() {},
|
||||
parseQuery(queryStr) {
|
||||
let params = {};
|
||||
queryStr.split('&').forEach(param => {
|
||||
let [key, value] = param.split('=');
|
||||
params[key] = decodeURIComponent(value);
|
||||
});
|
||||
return params;
|
||||
},
|
||||
childEvent(data) {
|
||||
console.log('childEvent');
|
||||
console.log(data);
|
||||
this.icon = this.apiImgUrl + data.icon;
|
||||
this.name = data.label;
|
||||
},
|
||||
// wxshare() {
|
||||
// this.$wxshare({
|
||||
// url: 'http://ysh.0rui.cn/#/pages/index/index',
|
||||
// data: {
|
||||
// url: window.location.href.split("#")[0],
|
||||
// },
|
||||
// share_data: {
|
||||
// title: '智慧云商协',
|
||||
// desc: '智慧云商协',
|
||||
// imgUrl: 'http://ysh.0rui.cn/static/ser.png',
|
||||
// link: window.location.href, // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// 切换导航
|
||||
switchTabbar(index) {
|
||||
this._switchTabbarPage(index)
|
||||
},
|
||||
|
||||
|
||||
// 瀑布流导航页面滚动到底部
|
||||
tabbarPageScrollLower(e) {
|
||||
console.log(123);
|
||||
if (this.currentIndex === 0) {
|
||||
this.$refs.home.ReachBottom();
|
||||
}
|
||||
if (this.currentIndex === 2) {
|
||||
this.$refs.pizz.ReachBottom();
|
||||
}
|
||||
// if (this.currentIndex === 1) {
|
||||
// this.$refs.service.ReachBottom();
|
||||
// }
|
||||
},
|
||||
|
||||
// 切换导航页面
|
||||
_switchTabbarPage(index) {
|
||||
|
||||
const selectPageFlag = this.tabberPageLoadFlag[index]
|
||||
this.thisIndex = this.tabbarList[index].id;
|
||||
if (selectPageFlag === undefined) {
|
||||
return
|
||||
}
|
||||
if (selectPageFlag === false) {
|
||||
this.tabberPageLoadFlag[index] = true
|
||||
}
|
||||
this.currentIndex = index
|
||||
if (index === 1) {
|
||||
setTimeout(() => {
|
||||
this.$refs.directory.onload();
|
||||
}, 100)
|
||||
}
|
||||
if (index === 3) {
|
||||
setTimeout(() => {
|
||||
this.$refs.user.onload();
|
||||
}, 100)
|
||||
}
|
||||
// if (index === 2) {
|
||||
// setTimeout(() => {
|
||||
// this.$refs.discovery.getNewInfo();
|
||||
// }, 100)
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.index {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
|
||||
.custom-tabbar-page {
|
||||
width: 100%;
|
||||
// height: calc(100vh - 110rpx);
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: 0rpx;
|
||||
padding-bottom: calc(0rpx + constant(safe-area-inset-bottom));
|
||||
padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
}
|
||||
</style>
|
||||
211
pages/index/pizz.vue
Normal file
@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<view style="background-color: #EBF4F7;letter-spacing: 1rpx;min-height: 100vh;">
|
||||
<tn-nav-bar :isBack="false" :bottomShadow="false" backgroundColor="#FFFFFF">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-center">
|
||||
<view class="tn-margin-top" style="text-align: center;">
|
||||
<text>发现</text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}"
|
||||
style="background-color: #ffffff;padding-bottom: 10rpx;">
|
||||
<view style="padding:0rpx 20rpx">
|
||||
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin"
|
||||
style="background-color: #ffffff;">
|
||||
<view class="justify-content-item align-content-item" style="width: 100%;">
|
||||
<view class="tn-flex tn-flex-col-center"
|
||||
style="border-radius: 100rpx;padding: 15rpx 20rpx;width: 100%;background-color:#F1F2F8;">
|
||||
<text
|
||||
class="tn-icon-search justify-content-item tn-padding-right-xs tn-color-gray tn-text-lg"></text>
|
||||
<input @confirm="onsubmit()" confirm-type="search" v-model="content"
|
||||
class="justify-content-item" placeholder="请输入协会名称进行搜索" name="input"
|
||||
placeholder-style="color:#AAAAAA" style="width: 90%;"></input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view>
|
||||
<view class="justify-content-item tn-text-center">
|
||||
<tn-button backgroundColor="#3668fc" shape="round" padding="20rpx 20rpx" width="150rpx"
|
||||
@click="onsubmit()">
|
||||
<text class="tn-color-white">搜 索</text>
|
||||
</tn-button>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="tn-flex tn-flex-row-around tn-flex-center tn-flex-col-center" style="padding: 30rpx;">-->
|
||||
<!-- <view style="color: #E15033;">-->
|
||||
<!-- <text class="tn-icon-sequence-vertical" style="vertical-align: middle;"></text>-->
|
||||
<!-- <text style="margin-left: 15rpx;vertical-align: middle;">全部排序</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="height: 25rpx;width: 2rpx;background-color: #808080;"></view>-->
|
||||
<!-- <view>-->
|
||||
<!-- <text class="tn-icon-first" style="vertical-align: middle;"></text>-->
|
||||
<!-- <text style="margin-left: 15rpx;vertical-align: middle;">人气榜</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="height: 25rpx;width: 2rpx;background-color: #808080;"></view>-->
|
||||
<!-- <view>-->
|
||||
<!-- <text class="tn-icon-light" style="vertical-align: middle;"></text>-->
|
||||
<!-- <text style="margin-left: 15rpx;vertical-align: middle;">最新入驻</text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
<!-- <view class="tn-flex tn-flex-row-between tn-flex-center tn-flex-col-center" style="padding: 30rpx;">-->
|
||||
<!-- <view style="text-align: center;background-color: #FFF;padding:10rpx 30rpx;width: 48%;border-radius: 5rpx;">-->
|
||||
<!-- <text>省协会</text>-->
|
||||
<!-- <text class="tn-icon-down-triangle"></text>-->
|
||||
<!-- </view>-->
|
||||
<!-- <view style="text-align: center;background-color: #FFF;padding:10rpx 30rpx;width: 48%;border-radius: 5rpx;">-->
|
||||
<!-- <text>市协会</text>-->
|
||||
<!-- <text class="tn-icon-down-triangle"></text>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view style="padding:30rpx 30rpx 180rpx 30rpx;">
|
||||
<view style="position: relative;" @click="switchTabbar(61)">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center"
|
||||
style="box-shadow: 0rpx 4rpx 25rpx 0rpx rgba(5,171,129,0.25);background: linear-gradient(to bottom,rgba(19,194,150,0.7) 0%, #13C296 100%);padding:40rpx 30rpx;border-radius: 30rpx;margin-bottom: 20rpx;">
|
||||
<view>
|
||||
<image :src="apiImgUrl+'/uploads/1/20240628/a78696e22b3cecbf678afbbcca617fca.png'"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
|
||||
</view>
|
||||
<view style="margin-left: 30rpx;">
|
||||
<view style="color:#ffffff;font-size: 32rpx;font-weight: 600;">洛阳市总商会
|
||||
</view>
|
||||
<view style="font-size: 28rpx;color: rgba(255,255,255,0.6);margin-top: 15rpx;">成立时间:2021-10-01
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
style="font-size: 20rpx;color: #09AE85;background-color: #B8EDE0;position: absolute;top: 0;right: 0;border-radius: 0px 15rpx 0px 15rpx;padding:10rpx 15rpx;">
|
||||
<text style="vertical-align: middle;margin-left: 5rpx;">已认证</text>
|
||||
</view>
|
||||
<view class="triangle"></view>
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between"
|
||||
style="color: #CCCCCC;margin: 50rpx 0rpx 40rpx 0rpx;">
|
||||
<view style="border: 1rpx dashed #CCCCCC;width: 100%;"></view>
|
||||
<!-- <view style="width: 500rpx;text-align: center;font-size: 24rpx;">分协会展示</view> -->
|
||||
<view style="border: 1rpx dashed #CCCCCC;width: 100%;"></view>
|
||||
</view>
|
||||
<view v-for="(item,index) in list" style="position: relative;" @click="switchTabbar(item.id)">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center"
|
||||
style="background-color: #ffffff;padding:40rpx 30rpx;border-radius: 30rpx;margin-bottom: 30rpx;">
|
||||
<view>
|
||||
<image :lazy-load="true" :src="apiImgUrl+item.association_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
|
||||
</view>
|
||||
<view style="margin-left: 30rpx;">
|
||||
<view style="font-size: 32rpx;font-weight: 600;">{{item.association_name}}
|
||||
</view>
|
||||
<view style="font-size: 28rpx;color: #888888;margin-top: 15rpx;">成立时间:{{item.createtime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
style="font-size: 20rpx;color: #09AE85;background-color: #B8EDE0;position: absolute;top: 0;right: 0;border-radius: 0px 15rpx 0px 15rpx;padding:10rpx 15rpx;">
|
||||
<text style="vertical-align: middle;margin-left: 5rpx;">已认证</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="position: fixed;bottom: 13%;width: 100%;">-->
|
||||
<!-- <view @click="tn('/pages/index/enter_in')"-->
|
||||
<!-- style="margin: 0 auto;color: #fff;letter-spacing: 10rpx;line-height: 70rpx;;text-align: center;width: 70%;height: 70rpx;background: linear-gradient(270deg, #EE7E45, #EE9657);border-radius: 50rpx;">-->
|
||||
<!-- 快速入驻</view>-->
|
||||
<!-- </view>-->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
associationIndex
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
list: [],
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
content: '',
|
||||
page: 1,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getAssociationIndex();
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log(1);
|
||||
},
|
||||
methods: {
|
||||
switchTabbar(d) {
|
||||
console.log(d);
|
||||
if (d == 0) {
|
||||
return;
|
||||
}
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: d
|
||||
})
|
||||
uni.setStorageSync('Gid', d);
|
||||
uni.$emit('getGid', {
|
||||
gid: d
|
||||
})
|
||||
uni.$emit('depId', {
|
||||
index: 0
|
||||
})
|
||||
},
|
||||
onsubmit() {
|
||||
this.page = 1;
|
||||
this.list = [];
|
||||
this.getAssociationIndex();
|
||||
},
|
||||
ReachBottom() {
|
||||
this.page = this.page + 1;
|
||||
//this.getNewsList();
|
||||
this.getAssociationIndex();
|
||||
},
|
||||
getAssociationIndex() {
|
||||
associationIndex({
|
||||
association_name: this.content,
|
||||
page: this.page,
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
377
pages/index/pizz_info.vue
Normal file
@ -0,0 +1,377 @@
|
||||
<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 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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<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;">
|
||||
<view class="swiper-item image-banner"
|
||||
:style="'background-image:url('+ apiImgUrl+info.association_image + ');background-size: contain; background-position:center; background-repeat: no-repeat;border-radius: 0;'">
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view style="position: absolute;top: 10px;right: 10px;" @click="openQrcode">
|
||||
<view
|
||||
style="position: relative;;background-color: rgba(255, 255, 255, 0.9);box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.2);">
|
||||
<text class="tn-icon-qr-code" style="font-size: 40rpx;"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</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>
|
||||
</view>
|
||||
<view style="margin: 20rpx 0rpx;font-size: 30rpx;"
|
||||
class="custom-nav tn-flex tn-flex-col-center tn-flex-row-between">
|
||||
<view style="min-width: 200rpx;">协会邮箱</view>
|
||||
<view>{{info.association_emal}}</view>
|
||||
</view>
|
||||
<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_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'}"
|
||||
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>
|
||||
<view style="line-height: 50rpx; text-indent: 2em;margin-top: 20rpx;" v-if="current==2">
|
||||
<div v-html="info.association_guizhang"></div>
|
||||
</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;">
|
||||
<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;">
|
||||
<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>
|
||||
<tn-grid align="center" col="5" hoverClass="none">
|
||||
<tn-grid-item v-if="item.neirong" style="width:20%" v-for="(v,i) in item.neirong"
|
||||
@click="openUrl('/pages/packageA/user/my_card?id='+v.member_id)">
|
||||
<view style="padding: 30rpx;">
|
||||
<image :src="apiImgUrl+v.photo_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
<view>{{v.nikename}}</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
<view style="height: 30rpx;width: 100%;"></view>
|
||||
<tn-grid-item v-if="!item.neirong" style="width:20%">
|
||||
<view style="padding: 30rpx;">
|
||||
<view>暂无</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
</tn-grid>
|
||||
</template>
|
||||
</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">
|
||||
<tn-grid-item v-if="item.neirong" style="width:20%" v-for="(v,i) in item.neirong">
|
||||
<view style="padding: 30rpx;">
|
||||
<image :src="apiImgUrl+v.photo_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
<view>{{v.nikename}}</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
<tn-grid-item v-if="!item.neirong" style="width:20%">
|
||||
<view style="padding: 30rpx;">
|
||||
<view>暂无</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
</tn-grid>
|
||||
</template> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view style="position: fixed;bottom: 50rpx;width: 100%;">
|
||||
<view class="tn-flex tn-flex-row-around"> -->
|
||||
<!-- <view @click="openUrl('/pages/index/directory?id='+info.id)"
|
||||
style="color: #fff;;letter-spacing: 10rpx;line-height: 70rpx;;text-align: center;;width: 300rpx;height: 70rpx;background: linear-gradient(-45deg, #4AA2EF, #3A7FF4);border-radius: 50rpx;">
|
||||
会员名录</view> -->
|
||||
|
||||
<!-- <view v-if="userInfo.association_id!=association_id" @click="openUrl('/pages/index/apply_in')"
|
||||
style="color: #fff;;letter-spacing: 10rpx;line-height: 70rpx;;text-align: center;;width: 300rpx;height: 70rpx;background: linear-gradient(270deg, #EE7E45, #EE9657);border-radius: 50rpx;">
|
||||
申请入会</view> -->
|
||||
<!-- <view v-if="userInfo.association_id!=association_id"
|
||||
@click="openUrl('/pages/index/apply_in?association_id='+association_id)"
|
||||
style="position: fixed;bottom: 260rpx;right: 20rpx;line-height: 35rpx;color: #fff;;text-align: center;width: 100rpx;height: 100rpx;background: linear-gradient(270deg, #EE7E45, #EE9657);border-radius: 50%;">
|
||||
<view style="padding-top: 16rpx;">申请</view>
|
||||
<view>入会</view>
|
||||
</view>
|
||||
<view style="position: fixed;bottom: 250rpx; width: 100%;">
|
||||
<view class="tn-flex tn-flex-row-around">
|
||||
<view @click="openUrl('/pages/index/directory_back?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>
|
||||
</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> -->
|
||||
<view style="text-align: center;margin-top: 40rpx;">
|
||||
<image :src="qrcode_url" style="width: 400rpx;height: 400rpx;"></image>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 40rpx;">
|
||||
<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"
|
||||
inactiveColor="#AAAAAA" activeIconColor="#3377FF" inactiveIconColor="#8A8E99" :animation="true"
|
||||
:safeAreaInsetBottom="true" @change="switchTabbar"></tn-tabbar>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
associationInfo,
|
||||
architectureList,
|
||||
getUserIndex,
|
||||
} from '@/util/api.js';
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
currentIndex: -1,
|
||||
// 底部tabbar菜单数据
|
||||
tabbarList: [{
|
||||
title: '首页',
|
||||
activeIcon: '/static/01_1.png',
|
||||
inactiveIcon: '/static/01.png'
|
||||
},
|
||||
{
|
||||
title: '通讯录',
|
||||
activeIcon: '/static/02_2.png',
|
||||
inactiveIcon: '/static/02.png'
|
||||
},
|
||||
{
|
||||
title: '发现',
|
||||
activeIcon: '/static/03_3.png',
|
||||
inactiveIcon: '/static/03.png'
|
||||
},
|
||||
{
|
||||
title: '个人中心',
|
||||
activeIcon: '/static/04_4.png',
|
||||
inactiveIcon: '/static/04.png'
|
||||
}
|
||||
],
|
||||
topCurrent: 0,
|
||||
swiperList: [{
|
||||
url: '/static/banner1.jpg',
|
||||
}],
|
||||
tab_list: [{
|
||||
name: '理事会'
|
||||
}, {
|
||||
name: '监事会'
|
||||
}],
|
||||
list: [{
|
||||
name: '协会简介'
|
||||
}, {
|
||||
name: '组织架构'
|
||||
}, {
|
||||
name: '规章制度',
|
||||
}, {
|
||||
name: '入会须知',
|
||||
}],
|
||||
current: 0,
|
||||
cardCur: 0,
|
||||
info: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
qrcode_url: '',
|
||||
architecture: [],
|
||||
association_id: 0,
|
||||
userInfo: {},
|
||||
type: 1,
|
||||
tab_current: 0
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
console.log(d);
|
||||
this.association_id = d.id;
|
||||
this.getAssociationInfo();
|
||||
this.getArchitectureList();
|
||||
},
|
||||
methods: {
|
||||
openQrcode() {
|
||||
uni.showLoading({
|
||||
title: '生成中',
|
||||
mask: true,
|
||||
});
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: store.state.apiUrl + '/move/login/getUnlimitedQRCode',
|
||||
method: 'POST',
|
||||
data: {
|
||||
path: 'pages/index/index',
|
||||
scene: "gid=" + this.association_id
|
||||
},
|
||||
responseType: 'arraybuffer',
|
||||
arraybuffer: true,
|
||||
success: (result) => {
|
||||
const url = 'data:image/png;base64,' + uni.arrayBufferToBase64(result.data);
|
||||
that.base64ToImage(url);
|
||||
}
|
||||
})
|
||||
},
|
||||
base64ToImage(base64Data) {
|
||||
var that = this;
|
||||
const fs = uni.getFileSystemManager();
|
||||
var filePath = wx.env.USER_DATA_PATH + '/qrcode.jpg';
|
||||
const base64 = base64Data.split(',')[1]; // 获取base64字符串部分
|
||||
fs.writeFile({
|
||||
filePath: filePath,
|
||||
data: base64,
|
||||
encoding: 'base64',
|
||||
success: (res) => {
|
||||
that.qrcode_url = filePath;
|
||||
console.log('图片保存成功', filePath);
|
||||
// 成功回调
|
||||
that.show = true;
|
||||
uni.hideLoading()
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('图片保存失败', err);
|
||||
uni.hideLoading()
|
||||
// 失败回调
|
||||
}
|
||||
});
|
||||
},
|
||||
saveBase64() {
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: this.qrcode_url,
|
||||
success: function(res) {
|
||||
wx.showToast({
|
||||
title: '保存成功',
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log(err, '失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
tab_change(d) {
|
||||
this.tab_current = d;
|
||||
this.type = d + 1;
|
||||
this.architecture = [];
|
||||
this.getArchitectureList();
|
||||
},
|
||||
getArchitectureList() {
|
||||
architectureList({
|
||||
association_id: this.association_id,
|
||||
type: this.type,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.architecture = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getAssociationInfo() {
|
||||
console.log('discovery');
|
||||
associationInfo({
|
||||
association_id: this.association_id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
if (key.association_desc.indexOf("<img") != -1) {
|
||||
key.association_desc = getApp().addWidthToImages(key.association_desc);
|
||||
}
|
||||
this.info = key;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(url) {
|
||||
// var uid = uni.getStorageSync('uid');
|
||||
// if (!uid) {
|
||||
// uni.showToast({
|
||||
// title: '请登录!',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
switchTabbar(d) {
|
||||
console.log(d);
|
||||
uni.$emit('depId', {
|
||||
index: d
|
||||
})
|
||||
uni.navigateBack()
|
||||
},
|
||||
change(e) {
|
||||
this.current = e;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
355
pages/index/search.vue
Normal file
@ -0,0 +1,355 @@
|
||||
<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 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>
|
||||
<view class="tn-flex tn-flex-row-between tn-flex-col-center tn-margin"
|
||||
:style="{marginTop: vuex_custom_bar_height + 20+'px'}">
|
||||
<view class="justify-content-item align-content-item" style="width: 100%;">
|
||||
<view class="tn-flex tn-flex-col-center"
|
||||
style="border-radius: 100rpx;padding: 10rpx 20rpx 10rpx 20rpx;width: 95%;background-color: rgba(248, 247, 248, 0.9);">
|
||||
<text
|
||||
class="tn-icon-search justify-content-item tn-padding-right-xs tn-color-gray tn-text-lg"></text>
|
||||
<input v-model="content" class="justify-content-item" placeholder="请填写搜索内容" name="input"
|
||||
placeholder-style="color:#AAAAAA" style="width: 90%;"></input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="align-content-item">
|
||||
<view class="justify-content-item tn-text-center">
|
||||
<tn-button backgroundColor="#3668fc" shape="round" padding="20rpx 20rpx" width="150rpx"
|
||||
@tap="getSerach">
|
||||
<text class="tn-color-white">搜 索</text>
|
||||
</tn-button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="is_serach">
|
||||
<!-- <block>
|
||||
<view>
|
||||
<view class="tn-flex tn-flex-row-between tn-margin">
|
||||
<view class="justify-content-item tn-text-bold">
|
||||
<text class="tn-text-df tn-color-black">最近搜索</text>
|
||||
</view>
|
||||
<view class="justify-content-item tn-text-df tn-color-gray">
|
||||
<text class="tn-padding-xs">删除</text>
|
||||
<text class="tn-icon-delete"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="tn-tag-search tn-text-justify" style="padding: 0rpx 30rpx;">
|
||||
<view v-for="(item, index) in tagList" :key="index"
|
||||
class="tn-tag-search__item tn-margin-right tn-round tn-text-sm tn-bg-gray--light tn-color-gray">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block> -->
|
||||
<view v-if="list.member.length>0" class="tn-flex tn-flex-row-between tn-padding-bottom"
|
||||
style="padding-top: 20rpx;margin: 30rpx 30rpx 0rpx 30rpx;">
|
||||
<view class="justify-content-item tn-text-bold">
|
||||
<text class="tn-text-df tn-color-black">会员搜索结果</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:0rpx 30rpx;">
|
||||
<view v-for="(item,index) in list.member" class="tn-flex tn-flex-center tn-flex-col-center"
|
||||
@click="tn('/pages/packageA/user/my_card?id='+item.id)"
|
||||
style="background-color: #ffffff;padding:30rpx;border-radius: 15rpx;margin-bottom: 20rpx;box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.1);">
|
||||
<view>
|
||||
<image v-if="item.photo_image!=null&&item.photo_image!=''" :src="apiImgUrl+item.photo_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
|
||||
<image v-if="item.photo_image==null||item.photo_image==''" src="/static/def.png"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view style="font-size: 31rpx;font-weight: 600;letter-spacing: 5rpx;">{{item.nikename}}</view>
|
||||
<view style="font-size: 24rpx;colo r: #808080;margin-top: 15rpx;">{{item.enterprise_name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.association.length>0" class="tn-flex tn-flex-row-between tn-padding-bottom"
|
||||
style="padding-top: 20rpx;margin: 30rpx 30rpx 0rpx 30rpx;">
|
||||
<view class="justify-content-item tn-text-bold">
|
||||
<text class="tn-text-df tn-color-black">协会搜索结果</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:0rpx 30rpx;">
|
||||
<view @click="tn('/pages/index/pizz_info?id='+item.id)" v-for="(item,index) in list.association"
|
||||
class="tn-flex tn-flex-center tn-flex-col-center"
|
||||
style="background-color: #ffffff;padding:30rpx;border-radius: 15rpx;margin-bottom: 20rpx;box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.1);">
|
||||
<view>
|
||||
<image :src="apiImgUrl+item.association_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view style="font-size: 31rpx;font-weight: 600;letter-spacing: 5rpx;">{{item.association_name}}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #808080;margin-top: 15rpx;">成立时间:{{item.createtime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.activity.length>0" class="tn-flex tn-flex-row-between tn-padding-bottom"
|
||||
style="padding-top: 20rpx;margin: 30rpx 30rpx 0rpx 30rpx;">
|
||||
<view class="justify-content-item tn-text-bold">
|
||||
<text class="tn-text-df tn-color-black">活动搜索结果</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view v-for="(item,index) in list.activity" style="background-color: #ffffff;">
|
||||
<view class="tn-flex tn-flex-row-between"
|
||||
@click="tn('/pages/packageB/event/event_info?id='+item.id)" style="padding: 20rpx;">
|
||||
<view style="margin-left: 20rpx;" v-if="item.activity_image">
|
||||
<image :src="apiImgUrl+item.activity_image" mode="aspectFill"
|
||||
style="width: 230rpx;height: 180rpx;border-radius: 8rpx;"></image>
|
||||
</view>
|
||||
<view style="position:relative;min-height: 200rpx;width: 100%;">
|
||||
<view class="tn-text-ellipsis-3" style="font-size: 28rpx;padding-left: 20rpx;">
|
||||
{{ item.activity_name }}
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-row-between"
|
||||
style="width: 100%;padding: 20rpx;font-size:24rpx;color: rgb(171, 171, 171);position: absolute; bottom: 0rpx;overflow: hidden">
|
||||
<view>{{formatTime(item.createtime) }}</view>
|
||||
<view>
|
||||
<text v-if="item.activity_type==1" style="vertical-align: middle;">协会活动</text>
|
||||
<text v-if="item.activity_type==2" style="vertical-align: middle;">调查问卷</text>
|
||||
<text v-if="item.activity_type==3" style="vertical-align: middle;">公益捐赠</text>
|
||||
<text v-if="item.activity_type==4" style="vertical-align: middle;">学习培训</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.news.length-1>index"
|
||||
style="background: rgba(217, 217, 217, 0.5);width: 90%;margin: 0 auto;height: 2rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.news.length>0" class="tn-flex tn-flex-row-between tn-padding-bottom"
|
||||
style="padding-top: 20rpx;margin: 30rpx 30rpx 0rpx 30rpx;">
|
||||
<view class="justify-content-item tn-text-bold">
|
||||
<text class="tn-text-df tn-color-black">新闻搜索结果</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="padding:0px 30rpx;">
|
||||
<view v-for="(item,index) in list.news" style="background-color: #ffffff;">
|
||||
<view class="tn-flex tn-flex-row-between" @click="tn('/pages/packageB/news/new_info?id='+item.id)"
|
||||
style="padding: 20rpx;">
|
||||
<view style="margin-left: 20rpx;" v-if="item.news_image">
|
||||
<image :src="apiImgUrl+item.news_image" mode="aspectFill"
|
||||
style="width: 230rpx;height: 180rpx;border-radius: 8rpx;"></image>
|
||||
</view>
|
||||
<view style="position:relative;min-height: 200rpx;width: 100%;">
|
||||
<view class="tn-text-ellipsis-3" style="font-size: 28rpx;padding-left: 20rpx;">
|
||||
{{ item.news_title }}
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-row-between"
|
||||
style="width: 100%;padding: 20rpx;font-size:24rpx;color: rgb(171, 171, 171);position: absolute; bottom: 0rpx;overflow: hidden">
|
||||
<view>{{ formatTime(item.showtime)}}</view>
|
||||
<view>
|
||||
<text class="tn-icon-eye" style="vertical-align: middle;"></text>
|
||||
<text style="vertical-align: middle;">{{ item.news_hits }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.news.length-1>index"
|
||||
style="background: rgba(217, 217, 217, 0.5);width: 90%;margin: 0 auto;height: 2rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSerachIndex
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
content: '',
|
||||
topCurrent: 0,
|
||||
// tagList: [{
|
||||
// name: '李小兵'
|
||||
// }, {
|
||||
// name: '李小兵'
|
||||
// }],
|
||||
list: {
|
||||
activity: [],
|
||||
association: [],
|
||||
member: [],
|
||||
news: [],
|
||||
},
|
||||
is_serach: false,
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
association_id: this.$store.state.Gid,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
formatTime(time) {
|
||||
const [year, month, day] = time.split(' ')[0].split('-');
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
getSerach() {
|
||||
|
||||
getSerachIndex({
|
||||
name: this.content
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
this.list = res.data;
|
||||
this.is_serach = true;
|
||||
})
|
||||
.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>
|
||||
.tn-search-fixed {
|
||||
position: fixed;
|
||||
top: 50rpx;
|
||||
width: 100%;
|
||||
transition: all 0.25s ease-out;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
/* 搜索标签 start*/
|
||||
.tn-tag-search {
|
||||
&__item {
|
||||
display: inline-block;
|
||||
line-height: 45rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
margin: 20rpx 20rpx 5rpx 0rpx;
|
||||
|
||||
&--prefix {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 标签内容 end*/
|
||||
|
||||
/* 标题 start */
|
||||
.nav_title {
|
||||
-webkit-background-clip: text;
|
||||
color: transparent;
|
||||
|
||||
&--wrap {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 120rpx;
|
||||
font-size: 42rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
background-image: url(https://resource.tuniaokj.com/images/title_bg/title00.png);
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
|
||||
/* 标题 end */
|
||||
|
||||
/* 富文本图示意 start */
|
||||
.news-img {
|
||||
z-index: -1;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
margin: 20rpx 0;
|
||||
// height: 3373rpx;
|
||||
// z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 资讯主图 start*/
|
||||
.image-article {
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid #F8F7F8;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-pic {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
// background-attachment:fixed;
|
||||
background-position: top;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.article-shadow {
|
||||
border-radius: 15rpx;
|
||||
box-shadow: 0rpx 0rpx 50rpx 0rpx rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
|
||||
/* 文字截取*/
|
||||
.clamp-text-1 {
|
||||
-webkit-line-clamp: 1;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.clamp-text-2 {
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 标签内容 start*/
|
||||
.tn-tag-content {
|
||||
&__item {
|
||||
display: inline-block;
|
||||
line-height: 35rpx;
|
||||
padding: 7rpx 25rpx 5rpx 25rpx;
|
||||
|
||||
&--prefix {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 标签内容 end*/
|
||||
</style>
|
||||
228
pages/index/service.vue
Normal file
@ -0,0 +1,228 @@
|
||||
<template>
|
||||
<view style="background-color: #EBF4F7;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>
|
||||
</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-margin">
|
||||
<view class="justify-content-item align-content-item" style="width: 100%;">
|
||||
<view class="tn-flex tn-flex-col-center"
|
||||
style="border-radius: 100rpx;padding: 10rpx 20rpx 10rpx 20rpx;width: 95%;background-color: rgba(255, 255, 255, 0.9);">
|
||||
<text
|
||||
class="tn-icon-search justify-content-item tn-padding-right-xs tn-color-gray tn-text-lg"></text>
|
||||
<input v-model="content" class="justify-content-item" placeholder="请填写活动标题" name="input"
|
||||
placeholder-style="color:#AAAAAA" style="width: 90%;"></input>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
<view class="justify-content-item tn-text-center">
|
||||
<tn-button backgroundColor="#3668fc" shape="round" padding="20rpx 20rpx" width="150rpx"
|
||||
@click="onsubmit()">
|
||||
<text class="tn-color-white">搜 索</text>
|
||||
</tn-button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<tn-tabs :list="tabList" :isScroll="false" :current="current" name="name" @change="tabChange"
|
||||
activeColor="#3668FC"></tn-tabs>
|
||||
|
||||
</view>
|
||||
|
||||
<view style="padding-bottom: 30rpx;">
|
||||
|
||||
<view style="padding: 30rpx 0rpx;">
|
||||
<tn-grid align="left" :col="2">
|
||||
<block v-for="(item,index) in actList">
|
||||
<tn-grid-item style="width:50%">
|
||||
<view @click="openUrl('/pages/packageB/event/event_info?id='+item.id)"
|
||||
style="margin-bottom: 30rpx;background-color: #FFF;box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.1);position: relative;display: inline-block;width: 350rpx;text-align: center;border-radius: 20rpx;overflow: hidden;">
|
||||
<view>
|
||||
<image :src="apiImgUrl+item.activity_image" mode="aspectFill"
|
||||
style="width: 350rpx;height: 170rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<view style="padding:10rpx 20rpx;font-weight: 400;">
|
||||
<view class="tn-text-ellipsis " style="text-align: left;">{{ item.activity_name }}
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-row-between"
|
||||
style="font-size: 24rpx;color:#808080;padding: 15rpx 0rpx;">
|
||||
<view>
|
||||
<text v-if="item.activity_type==1">协会活动</text>
|
||||
<text v-if="item.activity_type==2">调查问卷</text>
|
||||
<text v-if="item.activity_type==3">公益捐赠</text>
|
||||
<text v-if="item.activity_type==4">学习培训</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
</block>
|
||||
</tn-grid>
|
||||
</view>
|
||||
</view>
|
||||
<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"
|
||||
inactiveColor="#AAAAAA" activeIconColor="#3377FF" inactiveIconColor="#8A8E99" :animation="true"
|
||||
:safeAreaInsetBottom="true" @change="switchTabbar"></tn-tabbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
activityIndex,
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
//1.线下活动2.调查问卷3.公益捐赠4.学习培训
|
||||
return {
|
||||
currentIndex: -1,
|
||||
// 底部tabbar菜单数据
|
||||
tabbarList: [{
|
||||
title: '首页',
|
||||
activeIcon: '/static/01_1.png',
|
||||
inactiveIcon: '/static/01.png'
|
||||
},
|
||||
{
|
||||
title: '通讯录',
|
||||
activeIcon: '/static/02_2.png',
|
||||
inactiveIcon: '/static/02.png'
|
||||
},
|
||||
{
|
||||
title: '发现',
|
||||
activeIcon: '/static/03_3.png',
|
||||
inactiveIcon: '/static/03.png'
|
||||
},
|
||||
{
|
||||
title: '个人中心',
|
||||
activeIcon: '/static/04_4.png',
|
||||
inactiveIcon: '/static/04.png'
|
||||
}
|
||||
],
|
||||
current: 0,
|
||||
load_status: 'loading ',
|
||||
tabList: [{
|
||||
name: '全部',
|
||||
id: 0
|
||||
}, {
|
||||
name: '协会活动',
|
||||
id: 1
|
||||
}, {
|
||||
name: '调查问卷',
|
||||
id: 2
|
||||
}, {
|
||||
name: '公益捐赠',
|
||||
id: 3
|
||||
}, {
|
||||
name: '学习培训',
|
||||
id: 4
|
||||
}],
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
content: '',
|
||||
topCurrent: 0,
|
||||
actList: [],
|
||||
page: 1,
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
console.log(d);
|
||||
if (typeof(d.type) != 'undefined') {
|
||||
this.current = d.type;
|
||||
}
|
||||
this.getActivityIndex();
|
||||
},
|
||||
methods: {
|
||||
switchTabbar(d) {
|
||||
console.log(d);
|
||||
uni.$emit('depId', {
|
||||
index: d
|
||||
})
|
||||
uni.navigateBack()
|
||||
},
|
||||
onsubmit() {
|
||||
this.page = 1;
|
||||
this.actList = [];
|
||||
this.getActivityIndex();
|
||||
},
|
||||
tabChange(d) {
|
||||
console.log(d);
|
||||
this.current = d;
|
||||
this.page = 1;
|
||||
this.actList = [];
|
||||
this.getActivityIndex();
|
||||
},
|
||||
ReachBottom() {
|
||||
console.log('service');
|
||||
this.page = this.page + 1;
|
||||
this.getActivityIndex();
|
||||
//this.getIndex();
|
||||
},
|
||||
getNewInfo() {
|
||||
this.current = 0;
|
||||
this.page = 1;
|
||||
this.actList = [];
|
||||
this.getActivityIndex();
|
||||
},
|
||||
getActivityIndex() {
|
||||
var type = this.tabList[this.current].id;
|
||||
activityIndex({
|
||||
association_id: store.state.Gid,
|
||||
page: this.page,
|
||||
size: 10,
|
||||
activity_name: this.content,
|
||||
activity_type: type
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.actList.push(...res.data.ret);
|
||||
} else {
|
||||
this.load_status = 'nomore';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
openUrl(e) {
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
118
pages/index/tissue.vue
Normal file
@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<view style="letter-spacing: 1rpx;background-color: #F2F2F2;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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height+ 'px',}">
|
||||
<view style="position: fixed;width: 100%;background-color: #F2F2F2;z-index: 1;">
|
||||
<tn-tabs :list="list" :isScroll="false" :current="current" name="name" activeColor="#000000"
|
||||
:activeItemStyle="{backgroundColor:'#ffffff'}" :showBar='false' @change="change"></tn-tabs>
|
||||
</view>
|
||||
<view style="padding: 30rpx;text-align: center;padding-top: 94rpx;">
|
||||
<template v-for="(item, index) in architecture">
|
||||
<tn-button backgroundColor="#ffffff" height="50rpx"
|
||||
fontColor="#000000">{{item.position_name}}</tn-button>
|
||||
<tn-grid align="center" col="5" hoverClass="none">
|
||||
<tn-grid-item v-if="item.neirong" style="width:20%" v-for="(v,i) in item.neirong"
|
||||
@click="openInfo('/pages/packageA/user/my_card?id='+v.member_id)">
|
||||
<view style="padding: 30rpx;">
|
||||
<image :src="apiImgUrl+v.photo_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
<view>{{v.nikename}}</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
<tn-grid-item v-if="!item.neirong" style="width:20%">
|
||||
<view style="padding: 30rpx;">
|
||||
<view>暂无</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
</tn-grid>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
architectureList
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
architecture: [],
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
current: 0,
|
||||
list: [{
|
||||
name: '理事会'
|
||||
}, {
|
||||
name: '监事会'
|
||||
}],
|
||||
type: 1
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
this.getArchitectureList();
|
||||
},
|
||||
methods: {
|
||||
openInfo(u) {
|
||||
uni.navigateTo({
|
||||
url: u
|
||||
})
|
||||
},
|
||||
getArchitectureList() {
|
||||
architectureList({
|
||||
association_id: store.state.Gid,
|
||||
type: this.type,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.architecture = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
change(index) {
|
||||
this.current = index;
|
||||
this.type = index + 1;
|
||||
this.architecture = [];
|
||||
this.getArchitectureList();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
504
pages/index/user.vue
Normal file
@ -0,0 +1,504 @@
|
||||
<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>
|
||||
<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&&userInfo.if_member!=2"
|
||||
style="font-size: 24rpx;margin-top: 10rpx;">
|
||||
{{userInfo.position_name}}
|
||||
</view>
|
||||
<view
|
||||
v-if="userInfo.if_member==2&&userInfo.association_id!=null&&userInfo.association_id!=0&&userInfo.if_xianshi==0"
|
||||
style="font-size: 24rpx;margin-top: 10rpx;">
|
||||
入会审核中
|
||||
</view>
|
||||
<view
|
||||
v-if="userInfo.association_id==null||userInfo.association_id==0&&userInfo.if_member==2"
|
||||
style="font-size: 24rpx;margin-top: 10rpx;">
|
||||
游客
|
||||
</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/packageB/ask/user_list')">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center">
|
||||
<image src="/static/icon100.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_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="login && userInfo.if_xianshi!=1"
|
||||
@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;width: 30rpx;height: 30rpx"
|
||||
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 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/vip.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 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>
|
||||
</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>
|
||||
</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: 60rpx;">
|
||||
<view>v{{vuex_version}}</view>
|
||||
<view>技术支持:洛商协工作小组</view>
|
||||
<view>电话:15503791530</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getUserIndex,
|
||||
loginDo,
|
||||
wxphoneLogin
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
login: false,
|
||||
loginMod: false,
|
||||
userInfo: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
loginData: {
|
||||
openid: '',
|
||||
phone: '',
|
||||
password: '',
|
||||
association_id: store.state.Gid
|
||||
},
|
||||
code: '',
|
||||
identifyCode: '',
|
||||
identifyCodeName: '',
|
||||
colors: ['#00CCFF', '#FF0000', '#FF9933', '#33CC99'], // 可以根据需要增加颜色
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
//this.getcheckCode();
|
||||
},
|
||||
methods: {
|
||||
onload() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
this.uid = uid;
|
||||
if (uid) {
|
||||
this.getUserInfo();
|
||||
}
|
||||
},
|
||||
PhoneLogin(d) {
|
||||
console.log(d);
|
||||
var openid = uni.getStorageSync('openid');
|
||||
wxphoneLogin({
|
||||
code: d.code,
|
||||
openid: openid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '登陆成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uni.setStorageSync('uid', res.data.id);
|
||||
uni.setStorageSync('userInfo', res.data);
|
||||
this.userInfo = res.data;
|
||||
this.login = true;
|
||||
this.loginMod = false;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '登陆失败!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getcheckCode() {
|
||||
let code = [];
|
||||
const codeLength = 4;
|
||||
var codeName = '';
|
||||
const random = [
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
|
||||
'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
||||
'X', 'Y', 'Z',
|
||||
];
|
||||
for (let i = 0; i < codeLength; i++) {
|
||||
let index = Math.floor(Math.random() * 34);
|
||||
code.push(random[index]);
|
||||
codeName += random[index];
|
||||
}
|
||||
this.identifyCodeName = codeName;
|
||||
this.identifyCode = code;
|
||||
},
|
||||
msg() {
|
||||
return this.$store.state.msgCount;
|
||||
},
|
||||
getUserInfo() {
|
||||
getUserIndex({
|
||||
member_b_id: this.uid,
|
||||
member_id: this.uid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.userInfo = res.data;
|
||||
this.login = true;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
submitLogin() {
|
||||
console.log(this.code);
|
||||
console.log(this.identifyCodeName);
|
||||
if (this.code.toLowerCase() !== this.identifyCodeName.toLowerCase()) {
|
||||
uni.showToast({
|
||||
title: '验证码错误!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.loginData.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请填写手机号!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.loginData.password == '') {
|
||||
uni.showToast({
|
||||
title: '请填写密码!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.loginData.openid = uni.getStorageSync('openid');
|
||||
loginDo(this.loginData)
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '登陆成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uni.setStorageSync('uid', res.data.id);
|
||||
uni.setStorageSync('userInfo', res.data);
|
||||
this.userInfo = res.data;
|
||||
this.login = true;
|
||||
this.loginMod = false;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '帐号或密码错误!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
loginAut() {
|
||||
var that = this;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要退出吗?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.removeStorageSync('uid');
|
||||
that.login = false;
|
||||
that.loginData.openid = '';
|
||||
that.loginData.phone = '';
|
||||
that.loginData.password = '';
|
||||
that.code = '';
|
||||
that.getcheckCode();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
tn_ru(e) {
|
||||
var url = "/pages/packageA/user/apply_in?association_id=" + store.state.Gid;
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
})
|
||||
},
|
||||
tn(e) {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
console.log(this.userInfo);
|
||||
console.log(this.login);
|
||||
if (!this.login) {
|
||||
uni.showToast({
|
||||
title: '请登陆后查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.userInfo.if_member == 2) {
|
||||
if (e == '/pages/packageA/user/my_edit') {
|
||||
uni.showToast({
|
||||
title: '请入会后查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (e.includes("/pages/packageA/user/my_invite")) {
|
||||
uni.showToast({
|
||||
title: '请入会后查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (e.includes("/pages/index/pizz_info")) {
|
||||
uni.showToast({
|
||||
title: '请入会后查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (e.includes("/pages/packageA/user/my_card")) {
|
||||
uni.showToast({
|
||||
title: '请入会后查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (e.includes("/pages/packageA/user/my_desc")) {
|
||||
uni.showToast({
|
||||
title: '请入会后查看',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.my_input view {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.my_input input {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: rgb(235, 244, 247);
|
||||
}
|
||||
</style>
|
||||
27
pages/index/web.vue
Normal file
@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view bindmessage="bindmessage" :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options);
|
||||
var kkk = decodeURIComponent(options.url);
|
||||
this.url = kkk;
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
240
pages/packageA/info/discovery.vue
Normal file
@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<view style="letter-spacing: 1rpx;">
|
||||
<tn-nav-bar :isBack="false" :bottomShadow="true" backgroundColor="#FFFFFF">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-left">
|
||||
<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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<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;">
|
||||
<view class="swiper-item image-banner"
|
||||
:style="'background-image:url('+ apiImgUrl+info.association_image + ');background-size:auto 100% ; background-position:center; background-repeat: no-repeat;border-radius: 0;'">
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<!-- <view style="position: absolute;top: 10px;right: 10px;">-->
|
||||
<!-- <view-->
|
||||
<!-- style="position: relative;;width: 70rpx;height: 60rpx;background-color: rgba(255, 255, 255, 0.9);border-radius: 8rpx;box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(12,0,5,0.2);">-->
|
||||
<!-- <image src="/static/c1455.png" mode="widthFix"-->
|
||||
<!-- style="width: 40rpx;position: absolute;left: 0;right: 0;margin: 0 auto;top: 15rpx;"></image>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
</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>协会地址</view>
|
||||
<view>{{info.association_dizhi}}</view>
|
||||
</view>
|
||||
<view style="margin: 20rpx 0rpx;font-size: 30rpx;"
|
||||
class="custom-nav tn-flex tn-flex-col-center tn-flex-row-between">
|
||||
<view>协会邮箱</view>
|
||||
<view>{{info.association_emal}}</view>
|
||||
</view>
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-between" style="font-size: 30rpx;">
|
||||
<view>联系方式</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'}"
|
||||
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>
|
||||
<view style="line-height: 50rpx; text-indent: 2em;margin-top: 20rpx;" v-if="current==2">
|
||||
<div v-html="info.association_guizhang"></div>
|
||||
</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">
|
||||
<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">
|
||||
<tn-grid-item v-if="item.neirong" style="width:20%" v-for="(v,i) in item.neirong">
|
||||
<view style="padding: 30rpx;">
|
||||
<image :src="apiImgUrl+v.photo_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
<view>{{v.nikename}}</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
<tn-grid-item v-if="!item.neirong" style="width:20%">
|
||||
<view style="padding: 30rpx;">
|
||||
<view>暂无</view>
|
||||
</view>
|
||||
</tn-grid-item>
|
||||
</tn-grid>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="userInfo.association_id!=info.id" @click="openUrl('/pages/packageA/user/apply_in')"
|
||||
style="position: fixed;bottom: 330rpx;right: 20rpx;line-height: 35rpx;color: #fff;;text-align: center;width: 100rpx;height: 100rpx;background: linear-gradient(270deg, #EE7E45, #EE9657);border-radius: 50%;">
|
||||
<view style="padding-top: 16rpx;">申请</view>
|
||||
<view>入会</view>
|
||||
</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)"
|
||||
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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
associationInfo,
|
||||
architectureList,
|
||||
getUserIndex,
|
||||
} from '@/util/api.js';
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
swiperList: [{
|
||||
url: '/static/banner1.jpg',
|
||||
}],
|
||||
list: [{
|
||||
name: '协会简介'
|
||||
}, {
|
||||
name: '组织架构'
|
||||
}, {
|
||||
name: '规章制度',
|
||||
}, {
|
||||
name: '入会须知',
|
||||
}],
|
||||
current: 0,
|
||||
cardCur: 0,
|
||||
info: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
architecture: [],
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getUserInfo() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (uid) {
|
||||
getUserIndex({
|
||||
member_id: uid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.userInfo = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
getArchitectureList() {
|
||||
architectureList({
|
||||
association_id: store.state.Gid,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.architecture = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getAssociationInfo() {
|
||||
console.log('discovery');
|
||||
associationInfo({
|
||||
association_id: store.state.Gid,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
if (key.association_desc.indexOf("<img") != -1) {
|
||||
key.association_desc = getApp().addWidthToImages(key.association_desc);
|
||||
}
|
||||
this.info = key;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getNewInfo() {
|
||||
this.getAssociationInfo();
|
||||
this.getArchitectureList();
|
||||
this.getUserInfo();
|
||||
},
|
||||
openUrl(url) {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (!uid) {
|
||||
uni.showToast({
|
||||
title: '请登录!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
openPages(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
change(e) {
|
||||
this.current = e;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.tn-flex-row-around {
|
||||
position: relative;
|
||||
|
||||
}
|
||||
</style>
|
||||
86
pages/packageA/info/policy.vue
Normal file
@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<view>
|
||||
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-between">
|
||||
<view class="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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="padding-bottom: 60rpx;">
|
||||
<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>
|
||||
</block>
|
||||
</tn-list-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getArticlePolicy
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getArticlePolicyList();
|
||||
},
|
||||
methods: {
|
||||
getArticlePolicyList() {
|
||||
getArticlePolicy()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
91
pages/packageA/info/policy_info.vue
Normal file
@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<view>
|
||||
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-between">
|
||||
<view class="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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="padding-bottom: 60rpx;">
|
||||
<view style="padding: 30rpx;">
|
||||
<view style="font-size: 34rpx;font-weight: 600;text-align: center;">{{info.title}}</view>
|
||||
<view style="margin-top: 20rpx;">
|
||||
<view style="color: #999999;font-size: 28rpx;text-align: center;">
|
||||
<text>业务科室:{{info.source}}</text>
|
||||
<text style="margin-left: 60rpx;">联系方式:{{info.phone}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-html="info.content" style="margin-top: 30rpx;"></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getArticlePolicyInfo
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
id: 0
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
console.log(d);
|
||||
this.id = d.id;
|
||||
this.articlePolicyInfo();
|
||||
},
|
||||
methods: {
|
||||
articlePolicyInfo() {
|
||||
getArticlePolicyInfo({
|
||||
id: this.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.info = res.data;
|
||||
} 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>
|
||||
|
||||
</style>
|
||||
90
pages/packageA/info/policy_list.vue
Normal file
@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<view>
|
||||
<tn-nav-bar :isBack="false" backTitle="" :bottomShadow="false" backgroundColor="#FFFFFF">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-between">
|
||||
<view class="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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}" style="padding-bottom: 60rpx;">
|
||||
<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>
|
||||
</block>
|
||||
</tn-list-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getArticlePolicyList
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
console.log(d);
|
||||
this.cid = d.id;
|
||||
this.getArticlePolicyListAll();
|
||||
},
|
||||
methods: {
|
||||
getArticlePolicyListAll() {
|
||||
getArticlePolicyList({
|
||||
cid: this.cid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data.ret;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
798
pages/packageA/user/apply_in.vue
Normal file
@ -0,0 +1,798 @@
|
||||
<template>
|
||||
<view class="template-edit tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<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="30"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
<view class="tn-safe-area-inset-bottom" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="margin-top: 40rpx">
|
||||
<tn-steps :list="tab_list" :current="current"></tn-steps>
|
||||
</view>
|
||||
<view v-if="current==1" style="padding: 30rpx">
|
||||
<view v-html="info.ruhuixizhu"></view>
|
||||
<view style="text-align: center;margin-top: 60rpx">
|
||||
<tn-checkbox :size="40" v-model="checked1">同意入会协议</tn-checkbox>
|
||||
<view style="margin-top: 30rpx">
|
||||
<tn-button backgroundColor="#01BEFF" fontColor="#ffffff" @click="one_next()">下一步</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="current==2">
|
||||
<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-padding-right-xs tn-text-bold">推荐人</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<input v-model="new_info.recommendation_name" placeholder="选填" :showRightIcon="false"
|
||||
:disabled="true" @click="tuijian_show = true" />
|
||||
<tn-select v-model="tuijian_show" mode="single" :list="member_list"
|
||||
@confirm="getTuiJianId"></tn-select>
|
||||
</view>
|
||||
<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-padding-right-xs tn-text-bold">手机号</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<input placeholder="手机号" disabled v-model="userInfo.phone"
|
||||
placeholder-style="color:#AAAAAA"></input>
|
||||
</view>
|
||||
<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-padding-right-xs tn-text-bold">真实姓名</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<input placeholder="请输入真实姓名" v-model="new_info.nikename" placeholder-style="color:#AAAAAA"></input>
|
||||
</view>
|
||||
<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-padding-right-xs tn-text-bold">性别</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<input v-model="new_info.gender_name" :showRightIcon="false" :disabled="true"
|
||||
@click="gender_show = true" />
|
||||
<tn-select v-model="gender_show" mode="single" :list="genderList"
|
||||
@confirm="getGenderId"></tn-select>
|
||||
</view>
|
||||
<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-padding-right-xs tn-text-bold">企业名称</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<input placeholder="请输入企业名称" v-model="new_info.enterprise_name"
|
||||
placeholder-style="color:#AAAAAA"></input>
|
||||
</view>
|
||||
<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-padding-right-xs tn-text-bold">所属行业</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center" @click="industry_id_show = true">
|
||||
<view style="font-size: 28rpx; color: rgba(102, 102, 102, 1);">
|
||||
{{formData.industrynew_id_name}}
|
||||
</view>
|
||||
</view>
|
||||
<tn-select v-model="industry_id_show" mode="single" :list="industry_list"
|
||||
@confirm="getindustryId"></tn-select>
|
||||
</view>
|
||||
<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-padding-right-xs tn-text-bold">申请理由</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<tn-input v-model="new_info.reason" :maxLength="1000" placeholder="申请入会理由" :clearable="false"
|
||||
:height="300" type="textarea" :customStyle="{lineHeight:'42rpx',color:'#777777'}" />
|
||||
</view>
|
||||
<div style="text-align: center;margin-top: 40px">
|
||||
<tn-button @click="current=1" backgroundColor="#E6E6E6" fontColor="#000000">上一步</tn-button>
|
||||
<tn-button backgroundColor="#01BEFF" fontColor="#ffffff" style="margin-left: 40rpx"
|
||||
@click="newSubmit">提交申请
|
||||
</tn-button>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
<view class='tn-tabbar-height'></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
associationInfo,
|
||||
IndustryNewList,
|
||||
loginAdd,
|
||||
positionList,
|
||||
MemberList
|
||||
} from '@/util/api.js';
|
||||
import store from "@/store";
|
||||
import string from "@/tuniao-ui/libs/function/string";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
positionList: [],
|
||||
industry_list: [],
|
||||
jiantuan_time_show: false,
|
||||
position_show: false,
|
||||
gender_show: false,
|
||||
industry_id_show: false,
|
||||
genderList: [{
|
||||
label: '男',
|
||||
value: 1
|
||||
}, {
|
||||
label: '女',
|
||||
value: 0
|
||||
}],
|
||||
birth_time_show: false,
|
||||
checked1: false,
|
||||
topCurrent: 0,
|
||||
current: 1,
|
||||
info: {},
|
||||
tab_list: [{
|
||||
name: '入会须知'
|
||||
}, {
|
||||
name: '人员信息'
|
||||
}],
|
||||
new_info: {
|
||||
recommendation_id: 0,
|
||||
recommendation_name: '',
|
||||
phone: '',
|
||||
nikename: '',
|
||||
enterprise_name: '',
|
||||
gender_name: '请选择',
|
||||
gender: 0,
|
||||
industry_id: 0,
|
||||
reason: '',
|
||||
industrynew_id: 0,
|
||||
},
|
||||
formData: {
|
||||
position_name: '请选择',
|
||||
position_id: 0,
|
||||
industry_id: '',
|
||||
industry_id_name: '请选择',
|
||||
industrynew_id_name: '请选择',
|
||||
phone: '',
|
||||
password: '',
|
||||
nikename: '',
|
||||
gender_name: '请选择',
|
||||
gender: 0,
|
||||
birth_time_name: '请选择',
|
||||
birth_time: '',
|
||||
nation: '',
|
||||
political: '',
|
||||
jiguan: '',
|
||||
institution: '',
|
||||
education: '',
|
||||
academic_degree: '',
|
||||
card_number: '',
|
||||
work_unit: '',
|
||||
unit_position: '',
|
||||
wx_number: '',
|
||||
mailbox: '',
|
||||
fixed_telephone: '',
|
||||
achievement_award: '',
|
||||
other_contacts: '',
|
||||
other_social_positions: '',
|
||||
position: '',
|
||||
cardf_image_show: [],
|
||||
cardz_image_show: [],
|
||||
photo_image_show: [],
|
||||
cardf_image: '',
|
||||
cardz_image: '',
|
||||
photo_image: '',
|
||||
business_license_image_show: [],
|
||||
business_license_image: '',
|
||||
unified_code: '',
|
||||
enterprise_nature: '',
|
||||
enterprise_website: '',
|
||||
if_list: '',
|
||||
employee: '',
|
||||
previous_revenue: '',
|
||||
previous_tax: '',
|
||||
previous_profit: '',
|
||||
previous_donation: '',
|
||||
qitaqiyerenzhiqingkuang: '',
|
||||
enterprise_Introduction: '',
|
||||
introdiction: '',
|
||||
enterprise_honor: '',
|
||||
if_organization: null,
|
||||
nature: '',
|
||||
jiantuan_time: '',
|
||||
jiantuan_time_name: '请选择',
|
||||
jiantuan_number: '',
|
||||
youth_number: '',
|
||||
superior_nature: '',
|
||||
tuanweifuzerenxinxi: '',
|
||||
documents_file: '',
|
||||
documents_file_show: [],
|
||||
enterprise_location: '',
|
||||
apiUrl: this.$store.state.apiUrl,
|
||||
|
||||
},
|
||||
tuijian_show: false,
|
||||
member_list: [],
|
||||
Gid: 0,
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
console.log('123456', d);
|
||||
if (typeof(d.scene) != 'undefined') {
|
||||
let decodedParams = decodeURIComponent(d.scene);
|
||||
var searchParams = this.parseQuery(decodedParams);
|
||||
console.log('searchParams', searchParams);
|
||||
d = searchParams;
|
||||
}
|
||||
if (typeof(d.id) != 'undefined') {
|
||||
uni.setStorageSync('apply_id', d.id);
|
||||
this.new_info.recommendation_id = d.id;
|
||||
}
|
||||
|
||||
this.userInfo = uni.getStorageSync('userInfo');
|
||||
if (typeof(d.association_id) != 'undefined') {
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: d.association_id
|
||||
})
|
||||
uni.setStorageSync('Gid', d.association_id);
|
||||
this.Gid = d.association_id;
|
||||
} else {
|
||||
var gid = uni.getStorageSync('Gid');
|
||||
this.Gid = gid;
|
||||
}
|
||||
getApp().getUserLogin((r) => {
|
||||
console.log('---Login---', r);
|
||||
})
|
||||
this.getAssociationInfo();
|
||||
this.getPlan();
|
||||
this.getIndustry();
|
||||
this.getMemberList();
|
||||
},
|
||||
methods: {
|
||||
parseQuery(queryStr) {
|
||||
let params = {};
|
||||
queryStr.split('&').forEach(param => {
|
||||
let [key, value] = param.split('=');
|
||||
params[key] = decodeURIComponent(value);
|
||||
});
|
||||
return params;
|
||||
},
|
||||
getMemberList() {
|
||||
MemberList({
|
||||
association_id: this.Gid,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
var transformedSelectList = key.map(item => ({
|
||||
value: item.id,
|
||||
label: item.nikename
|
||||
}));
|
||||
if (this.new_info.recommendation_id != 0) {
|
||||
var index = transformedSelectList.findIndex(item => item.value == this.new_info
|
||||
.recommendation_id);
|
||||
this.new_info.recommendation_name = transformedSelectList[index].label;
|
||||
}
|
||||
this.member_list = transformedSelectList;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getIndustry() {
|
||||
IndustryNewList()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
const transformedSelectList = key.map(item => ({
|
||||
value: item.id,
|
||||
label: item.industry_name
|
||||
}));
|
||||
this.industry_list = transformedSelectList;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
formatResponse(res, type) {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
if (type == 0) {
|
||||
this.formData.photo_image = res.data.url;
|
||||
} else if (type == 1) {
|
||||
this.formData.cardz_image = res.data.url;
|
||||
} else if (type == 2) {
|
||||
this.formData.cardf_image = res.data.url;
|
||||
} else if (type == 3) {
|
||||
this.formData.business_license_image = res.data.url;
|
||||
} else {
|
||||
this.formData.documents_file = res.data.url;
|
||||
}
|
||||
//return {url: res.data.fullurl};
|
||||
},
|
||||
radioGroupChange(d) {
|
||||
console.log(d);
|
||||
},
|
||||
getTuiJianId(d) {
|
||||
var info = d[0];
|
||||
this.new_info.recommendation_id = info.value;
|
||||
this.new_info.recommendation_name = info.label;
|
||||
},
|
||||
getPositionId(d) {
|
||||
var info = d[0];
|
||||
this.formData.position_name = info.label;
|
||||
this.formData.position_id = info.value;
|
||||
},
|
||||
getGenderId(d) {
|
||||
var info = d[0];
|
||||
this.new_info.gender_name = info.label;
|
||||
this.new_info.gender = info.value;
|
||||
},
|
||||
getindustryId(d) {
|
||||
console.log(d);
|
||||
var info = d[0];
|
||||
this.formData.industrynew_id_name = info.label;
|
||||
this.new_info.industrynew_id = info.value;
|
||||
},
|
||||
birth_time_chick(d) {
|
||||
console.log(d);
|
||||
this.formData.birth_time = d.date;
|
||||
this.formData.birth_time_name = d.date;
|
||||
},
|
||||
jiantuan_time_chick(d) {
|
||||
this.formData.jiantuan_time_name = d.date;
|
||||
this.formData.jiantuan_time = d.date;
|
||||
},
|
||||
one_next() {
|
||||
if (!this.checked1) {
|
||||
uni.showToast({
|
||||
title: '请同意入会协议',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.current = 2;
|
||||
},
|
||||
getPlan() {
|
||||
positionList({
|
||||
association_id: this.Gid,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
const transformedSelectList = key.map(item => ({
|
||||
value: item.id,
|
||||
label: item.position_name
|
||||
}));
|
||||
this.positionList = transformedSelectList;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getAssociationInfo() {
|
||||
associationInfo({
|
||||
association_id: this.Gid,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
if (key.association_desc.indexOf("<img") != -1) {
|
||||
key.association_desc = getApp().addWidthToImages(key.association_desc);
|
||||
}
|
||||
this.info = key;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
newSubmit() {
|
||||
this.new_info.phone = this.userInfo.phone;
|
||||
if (this.new_info.phone == '') {
|
||||
uni.showToast({
|
||||
title: '请填写手机号码!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
const phoneNumberRegex = /^1[3-9]\d{9}$/;
|
||||
if (!phoneNumberRegex.test(this.new_info.phone)) {
|
||||
uni.showToast({
|
||||
title: '手机号码输入有误!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.new_info.nikename == '') {
|
||||
uni.showToast({
|
||||
title: '请填写真实姓名!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.new_info.gender == '' || this.new_info.gender == 0) {
|
||||
uni.showToast({
|
||||
title: '请选择性别!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.new_info.enterprise_name == '') {
|
||||
uni.showToast({
|
||||
title: '请填写企业名称!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.new_info.industrynew_id == '' || this.new_info.industrynew_id == 0) {
|
||||
uni.showToast({
|
||||
title: '请选择行业!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.new_info.reason == '' || this.new_info.reason == 0) {
|
||||
uni.showToast({
|
||||
title: '请填写申请理由!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.new_info.association_id = this.Gid;
|
||||
this.new_info.openid = uni.getStorageSync('openid');
|
||||
loginAdd(this.new_info)
|
||||
.then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '申请成功,请关注站内信通知!',
|
||||
success: function(res) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
if (this.formData.business_license_image == '') {
|
||||
uni.showToast({
|
||||
title: '请上传营业执照!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.unified_code == '') {
|
||||
uni.showToast({
|
||||
title: '请输入统一社会信用代码!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.enterprise_nature == '') {
|
||||
uni.showToast({
|
||||
title: '请输入企业性质!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.industry_id == null) {
|
||||
uni.showToast({
|
||||
title: '请选择行业!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.enterprise_website == '') {
|
||||
uni.showToast({
|
||||
title: '请输入企业网址!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.if_list == null) {
|
||||
uni.showToast({
|
||||
title: '请选择是否上市!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.employee == '') {
|
||||
uni.showToast({
|
||||
title: '请输入员工人数!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.enterprise_location == '') {
|
||||
uni.showToast({
|
||||
title: '请输入企业注册地!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.previous_revenue == '') {
|
||||
uni.showToast({
|
||||
title: '请输入上年度营业额!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.previous_tax == '') {
|
||||
uni.showToast({
|
||||
title: '请输入上年度纳税额!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.previous_profit == '') {
|
||||
uni.showToast({
|
||||
title: '请输入上年度净利润!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.previous_donation == '') {
|
||||
uni.showToast({
|
||||
title: '请输入上年度公益性捐赠支出!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.qitaqiyerenzhiqingkuang == '') {
|
||||
uni.showToast({
|
||||
title: '请输入其他企业任职情况!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.enterprise_Introduction == '') {
|
||||
uni.showToast({
|
||||
title: '请输入企业介绍!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.introdiction == '') {
|
||||
uni.showToast({
|
||||
title: '请输入业务介绍!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.enterprise_honor == '') {
|
||||
uni.showToast({
|
||||
title: '请输入企业所获荣誉以及专利!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.if_organization == null) {
|
||||
uni.showToast({
|
||||
title: '是否建立团组织!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.if_organization == 0) {
|
||||
if (this.formData.nature == '') {
|
||||
uni.showToast({
|
||||
title: '请输主团组织性质!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.jiantuan_time == '') {
|
||||
uni.showToast({
|
||||
title: '请输入建团时间!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.jiantuan_number == '') {
|
||||
uni.showToast({
|
||||
title: '请输入建团人数!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.youth_number == '') {
|
||||
uni.showToast({
|
||||
title: '请输入青年人数!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.superior_nature == '') {
|
||||
uni.showToast({
|
||||
title: '请输入上级团组织!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.tuanweifuzerenxinxi == '') {
|
||||
uni.showToast({
|
||||
title: '请输入团委负责人信息!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.formData.documents_file == '') {
|
||||
uni.showToast({
|
||||
title: '请上传批复文件!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.formData.association_id = this.id;
|
||||
loginAdd(this.formData)
|
||||
.then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '申请成功,请关注站内信通知!',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
// 跳转
|
||||
tn(e) {
|
||||
uni.navigateTo({
|
||||
url: e,
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
// uni.$emit('depId', {
|
||||
// index: 3
|
||||
// })
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 底部悬浮按钮 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*/
|
||||
|
||||
/* 标签内容 start*/
|
||||
.tn-tag-content {
|
||||
&__item {
|
||||
display: inline-block;
|
||||
line-height: 45rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
margin: 20rpx 20rpx 5rpx 0rpx;
|
||||
|
||||
&--prefix {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 标签内容 end*/
|
||||
</style>
|
||||
104
pages/packageA/user/events_my.vue
Normal file
@ -0,0 +1,104 @@
|
||||
<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 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 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>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
UserApplication
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
list: [],
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
this.uid = uid;
|
||||
this.getUserApplication();
|
||||
},
|
||||
methods: {
|
||||
getUserApplication() {
|
||||
UserApplication({
|
||||
member_id: this.uid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(e) {
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
108
pages/packageA/user/my_apply.vue
Normal file
@ -0,0 +1,108 @@
|
||||
<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 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 + 20+'px'}">
|
||||
<view style="padding:0rpx 30rpx 180rpx 30rpx;">
|
||||
<view
|
||||
style="position: relative;box-shadow: rgba(12, 0, 5, 0.1) 0px 0px 5px 0px;background-color: #ffffff;"
|
||||
@click="openUrl('/pages/index/pizz_info?id='+userInfo.association_id)">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center"
|
||||
style="background-color: #ffffff;padding:60rpx 30rpx;border-radius: 15rpx;margin-bottom: 20rpx;">
|
||||
<view>
|
||||
<image :src="apiImgUrl+userInfo.association_image" style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view style="font-size: 31rpx;font-weight: 600;letter-spacing: 5rpx;">{{userInfo.association_name}}</view>
|
||||
<view style="font-size: 24rpx;color: #808080;margin-top: 15rpx;">成立时间:{{userInfo.association_createtime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="userInfo.status==0"
|
||||
style="font-size: 20rpx;color: #ffffff;background-color: #FBBD12;position: absolute;top: 0;right: 0;border-radius: 0px 15rpx 0px 15rpx;padding:10rpx 10rpx;">
|
||||
<text class="tn-icon-success-circle-fill" style="vertical-align: middle;"></text>
|
||||
<text style="vertical-align: middle;margin-left: 5rpx;">审核中</text>
|
||||
</view>
|
||||
<view v-if="userInfo.status==1"
|
||||
style="font-size: 20rpx;color: #ffffff;background-color: #31C9E8;position: absolute;top: 0;right: 0;border-radius: 0px 15rpx 0px 15rpx;padding:10rpx 10rpx;">
|
||||
<text class="tn-icon-success-circle-fill" style="vertical-align: middle;"></text>
|
||||
<text style="vertical-align: middle;margin-left: 5rpx;">正式会员</text>
|
||||
</view>
|
||||
<view v-if="userInfo.status==2"
|
||||
style="font-size: 20rpx;color: #ffffff;background-color: #FF7043;position: absolute;top: 0;right: 0;border-radius: 0px 15rpx 0px 15rpx;padding:10rpx 10rpx;">
|
||||
<text class="tn-icon-success-circle-fill" style="vertical-align: middle;"></text>
|
||||
<text style="vertical-align: middle;margin-left: 5rpx;">被拒绝</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getUserIndex, loginDo} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
userInfo:{},
|
||||
uid:0,
|
||||
apiImgUrl:this.$store.state.imgUrl,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
this.uid=uid;
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
getUserInfo(){
|
||||
getUserIndex({member_id:this.uid})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if(res.code==1){
|
||||
this.userInfo = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(e) {
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
589
pages/packageA/user/my_card.vue
Normal file
@ -0,0 +1,589 @@
|
||||
<template>
|
||||
<view class="page-c">
|
||||
<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;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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view style="height: 550rpx;">
|
||||
<view style="width: 100%;height: 450rpx;position: absolute;top: 0;">
|
||||
<image v-if="userThisInfo.background_image==''||userThisInfo.background_image==null"
|
||||
src="https://ysx.hschool.com.cn/uploads/bj.png" style="width: 100%;height: 450rpx;opacity: 0.8;">
|
||||
</image>
|
||||
<image v-if="userThisInfo.background_image!=''&&userThisInfo.background_image!=null"
|
||||
:src="apiImgUrl+userThisInfo.background_image" style="width: 100%;height: 450rpx;opacity: 0.8;">
|
||||
</image>
|
||||
<view style="bottom:-105rpx;position: absolute;left: 28rpx;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center">
|
||||
<view style="width: 170rpx;height: 170rpx;position: relative;">
|
||||
<image v-if="userThisInfo.photo_image!=null" :src="apiImgUrl+userThisInfo.photo_image"
|
||||
mode="aspectFill" style="width: 170rpx;height: 170rpx;border-radius: 50%;"></image>
|
||||
<image v-if="userThisInfo.photo_image==null" src="/static/def.png" mode="aspectFill"
|
||||
style="width: 170rpx;height: 170rpx;border-radius: 50%;"></image>
|
||||
</view>
|
||||
<view style="margin-left: 10rpx">
|
||||
<view style="font-size: 35rpx;color: #ffffff;font-weight: 600">{{userThisInfo.nikename}}
|
||||
</view>
|
||||
<view style="font-size: 28rpx;margin-top: 10rpx;">
|
||||
<text>协会职务:{{userThisInfo.position_name==null||userThisInfo.position_name==''?'无':userThisInfo.position_name}}</text>
|
||||
<text style="margin-left: 40rpx">性别:{{userThisInfo.gender==0?'女':'男'}}</text>
|
||||
</view>
|
||||
<view style="margin-top: 10rpx" v-if="userThisInfo.if_tongyi==0">
|
||||
联系方式:{{userThisInfo.phone}}</view>
|
||||
<view style="margin-top: 10rpx" v-if="userThisInfo.if_tongyi!=0">联系方式:***********</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<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;">
|
||||
<view class="tn-text-ellipsis-5" @click="editInfo=true;editType=1">
|
||||
{{userThisInfo.introduction==''||userThisInfo.introduction==null?'无':userThisInfo.introduction}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 30rpx;font-weight: 600;margin-bottom: 20rpx;margin-top: 30rpx">企业介绍</view>
|
||||
<view style="background-color: #ffffff;border-radius: 15rpx;width: 100%;margin: 0 auto;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center" style="padding: 20rpx;">
|
||||
<view style="padding-left: 20rpx">
|
||||
<image v-if="userThisInfo.company_image!=''" :src="apiImgUrl+userThisInfo.company_image"
|
||||
mode="aspectFill" style="width: 160rpx;height: 160rpx;"></image>
|
||||
<view v-if="userThisInfo.company_image==''"
|
||||
style="width: 160rpx;height: 160rpx;background: #d9d9d9;"></view>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #666666;margin-left: 30rpx;">
|
||||
<view style="font-size: 36rpx;font-weight: 600;color: #000000">
|
||||
{{userThisInfo.enterprise_name==null||userThisInfo.enterprise_name==''?'未填写':userThisInfo.enterprise_name}}
|
||||
</view>
|
||||
<view style="margin: 15rpx 0rpx">
|
||||
所属行业:{{userThisInfo.industry_id==-1?'其他行业':userThisInfo.industry_name}}</view>
|
||||
<view>
|
||||
企业地址:{{userThisInfo.enterprise_location==null||userThisInfo.enterprise_location==''?'无':userThisInfo.enterprise_location}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="background-color: #ffffff;border-radius: 15rpx;width: 100%;margin: 0 auto;margin-top: 30rpx;">
|
||||
<view style="padding: 20rpx;line-height: 50rpx;" @click="editInfo=true;editType=2">
|
||||
<view class="tn-text-ellipsis-10">
|
||||
{{userThisInfo.enterprise_Introduction==null||userThisInfo.enterprise_Introduction==''?'无':userThisInfo.enterprise_Introduction}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</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?'申请查看联系方式':'立刻联系'}}
|
||||
</view>
|
||||
<view style="background: #ffffff;height: 100rpx;text-align: center;line-height: 100rpx;" class="tn-flex-4">
|
||||
<tn-button openType="share" backgroundColor="#ffffff">
|
||||
<text class="tn-icon-send-fill" style="color: #418ef2;font-size: 40rpx;"></text>
|
||||
</tn-button>
|
||||
</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>
|
||||
<view class="text">
|
||||
<tn-form ref="form" :labelWidth="180">
|
||||
<tn-form-item label="自我介绍" prop="content">
|
||||
<tn-input type="text" placeholder="填写自我介绍" v-model="addData.content" />
|
||||
</tn-form-item>
|
||||
</tn-form>
|
||||
<view style="text-align: center;margin-top: 30rpx;">
|
||||
<tn-button backgroundColor="#E6E6E6" fontColor="#ffffff" @click="addMod = false">取消</tn-button>
|
||||
<tn-button backgroundColor="tn-bg-blue" fontColor="tn-color-white" style="margin-left: 30rpx"
|
||||
@click="add_log">确定
|
||||
</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</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">
|
||||
<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==1?'个人经历':'公司介绍'}]" :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 +'px'}"></view>
|
||||
<view style="margin:30rpx;background-color: #ffffff;border-radius: 40rpx;">
|
||||
<scroll-view scroll-y="true" style="height: 600rpx;padding: 30rpx;">
|
||||
<view style="line-height: 45rpx;">
|
||||
<view v-if="editType==1">
|
||||
{{userThisInfo.introduction==''||userThisInfo.introduction==null?'无':userThisInfo.introduction}}
|
||||
</view>
|
||||
<view v-if="editType==2">
|
||||
{{userThisInfo.enterprise_Introduction==''||userThisInfo.enterprise_Introduction==null?'无':userThisInfo.enterprise_Introduction}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-center tn-flex-row-center" style="color: #ffffff;">
|
||||
<view @click="editInfo = false"
|
||||
style="width: 300rpx;height: 80rpx;background: #d9d9d9;text-align: center;line-height: 80rpx;">
|
||||
关闭</view>
|
||||
</view>
|
||||
</view>
|
||||
</tn-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getUserIndex,
|
||||
setMaillogAdd
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
addMod: false,
|
||||
topCurrent: 0,
|
||||
uid: 0,
|
||||
this_uid: 0,
|
||||
userInfo: {},
|
||||
userThisInfo: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
is: false,
|
||||
editInfo: false,
|
||||
editType: 1,
|
||||
addData: {
|
||||
content: '',
|
||||
association_id: store.state.Gid,
|
||||
member_q_id: 0,
|
||||
member_b_id: 0,
|
||||
type: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(d) {
|
||||
this.this_uid = d.id;
|
||||
var uid = uni.getStorageSync('uid');
|
||||
console.log(uid);
|
||||
if (!uid) {
|
||||
getApp().getUserLogin((r) => {
|
||||
console.log('---Login---', r);
|
||||
this.uid = r.id;
|
||||
})
|
||||
} else {
|
||||
this.uid = uid;
|
||||
}
|
||||
if (typeof(d.gid) != 'undefined') {
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: d.gid
|
||||
})
|
||||
uni.setStorageSync('Gid', d.gid);
|
||||
}
|
||||
this.getUserInfo();
|
||||
},
|
||||
onShareAppMessage(res) {
|
||||
var info = this.info;
|
||||
console.log(info);
|
||||
return {
|
||||
title: this.userThisInfo.nikename,
|
||||
path: '/pages/packageA/user/my_card?id=' + this.userThisInfo.member_id + '&gid=' + this.userThisInfo
|
||||
.association_id,
|
||||
imageUrl: this.apiImgUrl + this.userThisInfo.photo_image
|
||||
}
|
||||
},
|
||||
onShareTimeline() { // 分享到朋友圈
|
||||
return {
|
||||
title: this.userThisInfo.nikename,
|
||||
path: '/pages/packageA/user/my_card?id=' + this.userThisInfo.member_id + '&gid=' + this.userThisInfo
|
||||
.association_id,
|
||||
imageUrl: this.apiImgUrl + this.userThisInfo.photo_image
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addModeShow() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (!uid) {
|
||||
uni.showToast({
|
||||
title: '请登录!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.userThisInfo.if_tongyi == 0) {
|
||||
this.callPhone();
|
||||
return;
|
||||
}
|
||||
this.addMod = true;
|
||||
},
|
||||
add_log() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (!uid) {
|
||||
uni.showToast({
|
||||
title: '请登录!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.addData.member_q_id = this.uid;
|
||||
this.addData.member_b_id = this.this_uid;
|
||||
setMaillogAdd(this.addData)
|
||||
.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.addMod = false;
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
callPhone() {
|
||||
// 电话号码为示例,请替换为实际需要拨打的号码
|
||||
const phoneNumber = this.userThisInfo.phone;
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: phoneNumber, // 电话号码
|
||||
success: function() {
|
||||
console.log('拨打电话成功');
|
||||
},
|
||||
fail: function() {
|
||||
console.log('拨打电话失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
getUserInfo() {
|
||||
getUserIndex({
|
||||
member_b_id: this.this_uid,
|
||||
member_id: this.uid ? this.uid : 0,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
this.userThisInfo = res.data;
|
||||
// if (this.this_uid != this.uid) {
|
||||
// this.getThisUserInfo();
|
||||
// } else {
|
||||
// this.is = true;
|
||||
// this.userThisInfo = res.data;
|
||||
// }
|
||||
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-c {
|
||||
background-color: #EBF4F7;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
/* 底部安全边距 start*/
|
||||
.tn-tabbar-height {
|
||||
min-height: 120rpx;
|
||||
height: calc(140rpx + env(safe-area-inset-bottom) / 2);
|
||||
height: calc(140rpx + constant(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.tn-footerfixed {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: calc(180rpx + env(safe-area-inset-bottom));
|
||||
z-index: 1024;
|
||||
box-shadow: 0 1rpx 6rpx rgba(0, 0, 0, 0);
|
||||
|
||||
}
|
||||
|
||||
/* 按钮 */
|
||||
.button-1 {
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
position: fixed;
|
||||
/* bottom:200rpx;
|
||||
right: 20rpx; */
|
||||
bottom: 27%;
|
||||
right: 30rpx;
|
||||
z-index: 1001;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
.button-2 {
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
position: fixed;
|
||||
/* bottom:200rpx;
|
||||
right: 20rpx; */
|
||||
bottom: 18%;
|
||||
right: 30rpx;
|
||||
z-index: 1001;
|
||||
border-radius: 100px;
|
||||
}
|
||||
|
||||
/* 图标容器15 start */
|
||||
.icon15 {
|
||||
&__item {
|
||||
width: 30%;
|
||||
|
||||
border-radius: 10rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx 10rpx;
|
||||
transform: scale(1);
|
||||
transition: transform 0.3s linear;
|
||||
transform-origin: center center;
|
||||
|
||||
&--icon {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
font-size: 50rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 18rpx;
|
||||
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%;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 相册 */
|
||||
.slideshow {
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
/* 简历内容 */
|
||||
.king-list {
|
||||
display: block;
|
||||
// background-color: #ffffff;
|
||||
}
|
||||
|
||||
.king-list .king-icon {
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 20rpx 0 20rpx 37rpx;
|
||||
font-size: 26rpx;
|
||||
color: #888;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.king-list>.king-item {
|
||||
padding: 30rpx 30rpx 30rpx 120rpx;
|
||||
position: relative;
|
||||
display: block;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.king-list>.king-item::after {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
width: 1rpx;
|
||||
background-color: #E6E6E6;
|
||||
left: 60rpx;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
.king-list>.king-item::before {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 36rpx;
|
||||
z-index: 9;
|
||||
background-color: #ffffff;
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
text-align: center;
|
||||
border: none;
|
||||
line-height: 50rpx;
|
||||
left: 36rpx;
|
||||
}
|
||||
|
||||
|
||||
/* 名片微调 */
|
||||
.img-solid {
|
||||
border: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.share-img {
|
||||
position: fixed;
|
||||
/* padding: 10rpx; */
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
/* top: 680rpx; */
|
||||
bottom: 200rpx;
|
||||
right: 20rpx;
|
||||
z-index: 1024;
|
||||
opacity: 0.8;
|
||||
box-shadow: 0rpx 8rpx 30rpx 0rpx rgba(0, 0, 0, 0.3);
|
||||
border: none;
|
||||
border: 6rpx solid rgba(255, 255, 255, 0);
|
||||
}
|
||||
|
||||
.resume {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 10rpx;
|
||||
border-radius: 6rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.resume+.resume {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.resume2 {
|
||||
padding-top: 10rpx;
|
||||
border-radius: 6rpx;
|
||||
display: block;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/* 间隔线 start*/
|
||||
.tn-strip-bottom {
|
||||
width: 100%;
|
||||
border-bottom: 5rpx solid #ffffff;
|
||||
}
|
||||
|
||||
/* 间隔线 end*/
|
||||
|
||||
|
||||
.bg-img-cont {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
height: 350rpx;
|
||||
margin: 20rpx 0;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
|
||||
// .button-no {
|
||||
// border: none;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
// background-color: rgba(0, 0, 0, 0);
|
||||
// }
|
||||
|
||||
|
||||
/* 标签内容 start*/
|
||||
.tn-tag-content {
|
||||
&__item {
|
||||
display: inline-block;
|
||||
line-height: 45rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
margin: 0rpx 20rpx 25rpx 0rpx;
|
||||
|
||||
&--prefix {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 标签内容 end*/
|
||||
|
||||
.see {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 10rpx;
|
||||
border-radius: 6rpx;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 显示5行 */
|
||||
.tn-text-ellipsis-5 {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
white-space: normal !important;
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
-webkit-line-clamp: 5;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
/* 显示5行 */
|
||||
.tn-text-ellipsis-10 {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
white-space: normal !important;
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
-webkit-line-clamp: 10;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
</style>
|
||||
98
pages/packageA/user/my_card_holder.vue
Normal file
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<view class="template-edit tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<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 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>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
businessCard
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
uid: 0,
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
this.uid = uid;
|
||||
this.getBusinessCard();
|
||||
},
|
||||
methods: {
|
||||
tn(e) {
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
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>
|
||||
82
pages/packageA/user/my_desc.vue
Normal file
@ -0,0 +1,82 @@
|
||||
<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 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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="padding: 30rpx;line-height: 50rpx;">
|
||||
<view style="text-align: center;font-size: 35rpx;font-weight: 600;">协会服务</view>
|
||||
<view v-html="info.association_guizhang"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
associationInfo,
|
||||
UserApplication
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
info: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getAssociationInfo();
|
||||
},
|
||||
methods: {
|
||||
getAssociationInfo() {
|
||||
console.log('discovery');
|
||||
var u = uni.getStorageSync('userInfo');
|
||||
associationInfo({
|
||||
association_id: u.association_id,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
if (key.association_guizhang.indexOf("<img") != -1) {
|
||||
key.association_guizhang = getApp().addWidthToImages(key.association_guizhang);
|
||||
}
|
||||
this.info = key;
|
||||
}
|
||||
})
|
||||
.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>
|
||||
674
pages/packageA/user/my_edit.vue
Normal file
@ -0,0 +1,674 @@
|
||||
<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>
|
||||
163
pages/packageA/user/my_idea.vue
Normal file
@ -0,0 +1,163 @@
|
||||
<template>
|
||||
<view class="template-edit tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<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 class="tn-safe-area-inset-bottom" :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">反馈人</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<input placeholder="填写姓名" name="input" v-model="formData.name" placeholder-style="color:#AAAAAA"></input>
|
||||
</view>
|
||||
<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">联系方式</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light" style="border-radius: 10rpx;padding: 20rpx 30rpx;">
|
||||
<input placeholder="填写联系方式" v-model="formData.phone" name="input" placeholder-style="color:#AAAAAA"></input>
|
||||
</view>
|
||||
<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">反馈内容</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-margin tn-bg-gray--light tn-padding" style="border-radius: 10rpx;">
|
||||
<textarea maxlength="500" v-model="formData.content" placeholder="填写反馈内容" placeholder-style="color:#AAAAAA"></textarea>
|
||||
</view>
|
||||
<!-- 悬浮按钮-->
|
||||
<view class="tn-flex tn-footerfixed">
|
||||
<view class="tn-flex-1 justify-content-item tn-margin-sm tn-text-center">
|
||||
<tn-button backgroundColor="#FBBD12" fontColor="#ffffff" padding="40rpx 0" width="60%" shadow
|
||||
fontBold @tap="submit">
|
||||
<!-- <text class="tn-icon-light tn-padding-right-xs tn-color-black"></text> -->
|
||||
<text>提 交</text>
|
||||
</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class='tn-tabbar-height'></view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { messageAdd} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
formData:{
|
||||
name:'',
|
||||
phone:'',
|
||||
content:'',
|
||||
association_id:store.state.Gid,
|
||||
member_id:uni.getStorageSync('uid'),
|
||||
createtime:new Date().toISOString().slice(0, 19).replace('T', ' ')
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
submit(){
|
||||
messageAdd(this.formData)
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if(res.code==1){
|
||||
uni.showToast({
|
||||
title: '提交成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
this.formData.name='';
|
||||
this.formData.phone='';
|
||||
this.formData.content='';
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.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>
|
||||
/* 底部悬浮按钮 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*/
|
||||
|
||||
/* 标签内容 start*/
|
||||
.tn-tag-content {
|
||||
&__item {
|
||||
display: inline-block;
|
||||
line-height: 45rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
margin: 20rpx 20rpx 5rpx 0rpx;
|
||||
|
||||
&--prefix {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 标签内容 end*/
|
||||
</style>
|
||||
227
pages/packageA/user/my_invite.vue
Normal file
@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<view class="template-edit tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<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 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>
|
||||
<view style="margin-top: 40rpx">
|
||||
<tn-button open-type="share" backgroundColor="#82B2FF" height="80rpx" :shadow="true"
|
||||
fontColor="#ffffff" width="100%">转发到微信好友</tn-button>
|
||||
</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>
|
||||
<view style="text-align: center;margin-top: 40rpx;">
|
||||
<image :src="qrcode_url" style="width: 400rpx;height: 400rpx;"></image>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 40rpx;">
|
||||
<tn-button shape="round" backgroundColor="#82B2FF" fontColor="#ffffff"
|
||||
@click="saveBase64">保存图片</tn-button>
|
||||
</view>
|
||||
</tn-popup>
|
||||
<view class='tn-tabbar-height'></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getUserIndex,
|
||||
getQrcode
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
topCurrent: 0,
|
||||
uid: 0,
|
||||
userInfo: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
qrcode_url: ''
|
||||
}
|
||||
},
|
||||
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,
|
||||
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,
|
||||
imageUrl: this.apiImgUrl + this.userInfo.association_image,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var u = uni.getStorageSync('uid');
|
||||
this.uid = u;
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
saveBase64() {
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: this.qrcode_url,
|
||||
success: function(res) {
|
||||
wx.showToast({
|
||||
title: '保存成功',
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log(err, '失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
openQrcode() {
|
||||
uni.showLoading({
|
||||
title: '生成中',
|
||||
mask: true,
|
||||
});
|
||||
var that = this;
|
||||
uni.request({
|
||||
url: store.state.apiUrl + '/move/login/getUnlimitedQRCode',
|
||||
method: 'POST',
|
||||
data: {
|
||||
path: 'pages/packageA/user/apply_in',
|
||||
scene: "id=" + this.uid + "&association_id=" + this.userInfo.association_id
|
||||
},
|
||||
responseType: 'arraybuffer',
|
||||
arraybuffer: true,
|
||||
success: (result) => {
|
||||
const url = 'data:image/png;base64,' + uni.arrayBufferToBase64(result.data);
|
||||
that.base64ToImage(url);
|
||||
}
|
||||
})
|
||||
},
|
||||
base64ToImage(base64Data) {
|
||||
var that = this;
|
||||
const fs = uni.getFileSystemManager();
|
||||
var filePath = wx.env.USER_DATA_PATH + '/qrcode.jpg';
|
||||
const base64 = base64Data.split(',')[1]; // 获取base64字符串部分
|
||||
fs.writeFile({
|
||||
filePath: filePath,
|
||||
data: base64,
|
||||
encoding: 'base64',
|
||||
success: (res) => {
|
||||
that.qrcode_url = filePath;
|
||||
console.log('图片保存成功', filePath);
|
||||
// 成功回调
|
||||
that.show = true;
|
||||
uni.hideLoading()
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('图片保存失败', err);
|
||||
uni.hideLoading()
|
||||
// 失败回调
|
||||
}
|
||||
});
|
||||
},
|
||||
getUserInfo() {
|
||||
getUserIndex({
|
||||
member_b_id: this.uid,
|
||||
member_id: this.uid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.userInfo = 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 lang="scss" scoped>
|
||||
/* 底部悬浮按钮 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*/
|
||||
|
||||
/* 标签内容 start*/
|
||||
.tn-tag-content {
|
||||
&__item {
|
||||
display: inline-block;
|
||||
line-height: 45rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
margin: 20rpx 20rpx 5rpx 0rpx;
|
||||
|
||||
&--prefix {
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 标签内容 end*/
|
||||
</style>
|
||||
359
pages/packageA/user/my_msg.vue
Normal file
@ -0,0 +1,359 @@
|
||||
<template>
|
||||
<view class="message tn-safe-area-inset-bottom">
|
||||
|
||||
<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 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>
|
||||
<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>
|
||||
</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>
|
||||
<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>
|
||||
</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>
|
||||
</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>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
MaillogIndex,
|
||||
MaillogUpdate,
|
||||
MaillogUpdateState
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
name: 'Message',
|
||||
data() {
|
||||
return {
|
||||
loadingIn: 'loading',
|
||||
uid: 0,
|
||||
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'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
this.uid = uid;
|
||||
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,
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.message {
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
/* 自定义导航栏内容 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>
|
||||
134
pages/packageA/user/my_sign.vue
Normal file
@ -0,0 +1,134 @@
|
||||
<template>
|
||||
<view>
|
||||
<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 + 20+'px'}" v-if="info!=''">
|
||||
<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>
|
||||
<view style="margin: 20rpx 0rpx;">-</view>
|
||||
<view>结束时间:{{info.activity_end_time}}</view>
|
||||
</view>
|
||||
<view style="margin-top: 100rpx;">
|
||||
<tn-button @click="sign()" backgroundColor="#01BEFF" :shadow="true" fontColor="#ffffff"
|
||||
width="200rpx" height="200rpx" :fontSize="40" shape="icon" margin="10rpx 10rpx">签到</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
activitySign,
|
||||
eventInfo
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 1,
|
||||
activity_id: '',
|
||||
member_id: '',
|
||||
association_id: '',
|
||||
info: ''
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
|
||||
var data = this.getUrlParams(q);
|
||||
this.activity_id = data.id;
|
||||
this.association_id = data.association_id;
|
||||
var that = this;
|
||||
console.log('---1---');
|
||||
getApp().getUserLogin((r) => {
|
||||
console.log('---2---');
|
||||
that.member_id = r.data.id;
|
||||
that.getEventInfo();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getEventInfo() {
|
||||
console.log('---3---');
|
||||
eventInfo({
|
||||
association_id: this.association_id,
|
||||
id: this.activity_id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.info = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
sign() {
|
||||
activitySign({
|
||||
activity_id: this.activity_id,
|
||||
member_id: this.member_id,
|
||||
association_id: this.association_id,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
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'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
getUrlParams(url) {
|
||||
// \w+ 表示匹配至少一个(数字、字母及下划线), [\u4e00-\u9fa5]+ 表示匹配至少一个中文字符
|
||||
let pattern = /(\w+|[\u4e00-\u9fa5]+)=(\w+|[\u4e00-\u9fa5]+)/ig;
|
||||
let result = {};
|
||||
url.replace(pattern, ($, $1, $2) => {
|
||||
result[$1] = $2;
|
||||
})
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
220
pages/packageA/user/my_vip.vue
Normal file
@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<view class="message tn-safe-area-inset-bottom">
|
||||
<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:'会员卡'}]" activeColor="#000" :bold="false" :fontSize="36"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="text-align: center;padding: 30rpx;">
|
||||
<tn-button backgroundColor="#01BEFF" @click="openQrcode" fontColor="#ffffff">出示二维码</tn-button>
|
||||
<view style="margin-top: 20rpx;">会员卡号:{{ code }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<tn-tabs :list="list" :isScroll="true" :activeItemStyle="{fontSize:'30rpx',fontWeight:'600'}"
|
||||
activeColor="#3377FF" :current="current" name="type_name" @change="change" :fontSize="28"></tn-tabs>
|
||||
<view style="padding: 30rpx;">
|
||||
<view v-for="(item,index) in sp_list" style="position: relative;"
|
||||
@click="tn('/pages/packageA/user/my_vip_info?id='+item.id)">
|
||||
<view class="tn-flex tn-flex-col-center tn-flex-row-between"
|
||||
style="background-color: #ffffff;padding:50rpx 30rpx;border-radius: 15rpx;margin-bottom: 20rpx;">
|
||||
<view class="tn-flex tn-flex-col-center">
|
||||
<view>
|
||||
<image :src="item.business_image==''?'/static/def.png':apiImgUrl+item.business_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view style="font-size: 31rpx;font-weight: 600;letter-spacing: 5rpx;">
|
||||
{{ item.business_name }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #808080;margin-top: 15rpx;">地址:{{ item.address }}
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #808080;margin-top: 15rpx;">电话:{{ item.telephone }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 200rpx;text-align: right;">
|
||||
<tn-button backgroundColor="#3377FF" size="sm" shape="round" fontColor="#ffffff">查看</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view
|
||||
style="font-size: 20rpx;color: #43A9F8;background-color: #CAE5FF;position: absolute;top: 0;right: 0;border-radius: 0px 15rpx 0px 15rpx;padding:10rpx 10rpx;">
|
||||
<text class="tn-icon-success-circle-fill" style="vertical-align: middle;"></text>
|
||||
<text style="vertical-align: middle;margin-left: 5rpx;">已认证</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<tn-popup v-if="show" :closeBtn="true" v-model="show" mode="center" width="500rpx" height="600rpx">
|
||||
<view style="text-align: center;padding: 30rpx 0rpx;font-size: 32rpx;font-weight: 600;">核销二维码</view>
|
||||
<view style="text-align: center;width: 300rpx;margin:0rpx auto;">
|
||||
<l-painter ref="painter" css="background: #fff;width: 300rpx;text-align: center;">
|
||||
<l-painter-qrcode :text="qrcode_url" css="width: 300rpx; height: 300rpx" />
|
||||
</l-painter>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 50rpx;">
|
||||
<tn-button @click="show= false" shape="round" width="80%" backgroundColor="#3F8BF2"
|
||||
fontColor="#ffffff">关闭
|
||||
</tn-button>
|
||||
</view>
|
||||
</tn-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
businesstypeList,
|
||||
businessList,
|
||||
handleMembercode
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current: 0,
|
||||
show: false,
|
||||
qrcode_url: '',
|
||||
list: [],
|
||||
page: 1,
|
||||
type: 0,
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
sp_list: [],
|
||||
code: 0,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getbusinesstypeList();
|
||||
this.getbusinessList();
|
||||
this.setHandleMembercode();
|
||||
},
|
||||
methods: {
|
||||
change(d) {
|
||||
this.current = d;
|
||||
var info = this.list[d];
|
||||
this.type = info.id;
|
||||
this.page = 1;
|
||||
this.sp_list = [];
|
||||
this.getbusinessList();
|
||||
},
|
||||
setHandleMembercode() {
|
||||
var u = uni.getStorageSync('userInfo');
|
||||
handleMembercode({
|
||||
member_id: u.id,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.code = res.data.member_code
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
that.goBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getbusinessList() {
|
||||
var u = uni.getStorageSync('userInfo');
|
||||
businessList({
|
||||
business_type: this.type,
|
||||
association_id: u.association_id,
|
||||
page: this.page,
|
||||
size: 10,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.sp_list.push(...res.data.list);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getbusinesstypeList() {
|
||||
businesstypeList()
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
key.unshift({
|
||||
id: 0,
|
||||
type_name: '全部'
|
||||
});
|
||||
this.list = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
generateUUIDv4() {
|
||||
const charts = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
|
||||
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
|
||||
];
|
||||
var res = '';
|
||||
for (var i = 0; i < 18; i++) {
|
||||
var id = Math.ceil(Math.random() * 35);
|
||||
res += charts[id];
|
||||
}
|
||||
return res;
|
||||
},
|
||||
openQrcode() {
|
||||
var u = uni.getStorageSync('userInfo');
|
||||
this.qrcode_url = store.state.imgUrl + "?type=2&key=" + this.code + "&association_id=" + u.association_id +
|
||||
"&random_number=" + this.generateUUIDv4();
|
||||
setTimeout(() => {
|
||||
this.show = true;
|
||||
}, 500)
|
||||
},
|
||||
tn(e) {
|
||||
uni.navigateTo({
|
||||
url: e
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
page {
|
||||
background-color: aliceblue;
|
||||
}
|
||||
</style>
|
||||
268
pages/packageA/user/my_vip_clerk.vue
Normal file
@ -0,0 +1,268 @@
|
||||
<template>
|
||||
<view class="message tn-safe-area-inset-bottom">
|
||||
<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:'店员管理'}]" activeColor="#000" :bold="false" :fontSize="36"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between" style="padding: 30rpx;">
|
||||
<view>当前店铺:</view>
|
||||
<view @click="select_show = true">
|
||||
<text>{{ select_name }}</text>
|
||||
<text class="tn-icon-down-triangle"></text>
|
||||
</view>
|
||||
</view>
|
||||
<tn-select v-model="select_show" mode="single" :list="select_list" @confirm="add_confirm"></tn-select>
|
||||
<view style="text-align: center;padding: 30rpx;">
|
||||
<tn-button backgroundColor="#01BEFF" @click="addClerkShow = true" fontColor="#ffffff">添加店员</tn-button>
|
||||
</view>
|
||||
<view style="margin: 20rpx;font-size: 35rpx;font-weight: 600;">在职店员</view>
|
||||
<view v-for="(item,index) in list" class="tn-flex tn-flex-center tn-flex-row-between" style="padding: 30rpx;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center">
|
||||
<view style="font-size: 30rpx;font-weight: 600;">{{ item.clerk_name }}</view>
|
||||
<view style="margin-left: 20rpx;" @click="open_phoen(item.phone)">{{ item.phone }}</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<tn-tag v-if="item.if_bangding==2" size="sm" backgroundColor="#FF7043" width="80rpx" shape="circle"
|
||||
fontColor="#ffffff">未绑定
|
||||
</tn-tag>
|
||||
<tn-tag v-if="item.if_bangding==1" size="sm" backgroundColor="#28B93D" width="80rpx" shape="circle"
|
||||
fontColor="#ffffff">已绑定
|
||||
</tn-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<tn-button @click="del(item.id)" backgroundColor="#E83A30" size="sm" shape="round" fontColor="#ffffff">删除
|
||||
</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<tn-popup v-if="addClerkShow" :closeBtn="true" v-model="addClerkShow" mode="center" width="500rpx">
|
||||
<view style="text-align: center;padding: 30rpx 0rpx;font-size: 32rpx;font-weight: 600;">添加店员</view>
|
||||
<view style="text-align: center;width: 400rpx;margin:0rpx auto;">
|
||||
<tn-form :model="formAdd" ref="form" labelWidth="120">
|
||||
<tn-form-item label="姓名" prop="name">
|
||||
<tn-input v-model="formAdd.clerk_name" :clearable="false"/>
|
||||
</tn-form-item>
|
||||
<tn-form-item label="手机号" prop="intro">
|
||||
<tn-input v-model="formAdd.phone" :clearable="false"/>
|
||||
</tn-form-item>
|
||||
</tn-form>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 50rpx;padding-bottom: 50rpx;">
|
||||
<tn-button @click="add()" shape="round" width="80%" backgroundColor="#3F8BF2" fontColor="#ffffff">确定
|
||||
</tn-button>
|
||||
</view>
|
||||
</tn-popup>
|
||||
<tn-modal v-model="show" :title="title" :content="content" :button="button" @click="dian"></tn-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
clerkListByBusiness,
|
||||
addClerk,
|
||||
businessListByMember, deleteClerk
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
title: '提示信息',
|
||||
content: '确定要删除店员吗?',
|
||||
button: [{
|
||||
text: '取消',
|
||||
backgroundColor: '#F4F4F4',
|
||||
fontColor: '#000000',
|
||||
plain: true,
|
||||
shape: 'round'
|
||||
},
|
||||
{
|
||||
text: '确定',
|
||||
backgroundColor: '#548ceb',
|
||||
fontColor: '#FFFFFF'
|
||||
}
|
||||
],
|
||||
addClerkShow: false,
|
||||
formAdd: {
|
||||
phone: '',
|
||||
clerk_name: '',
|
||||
},
|
||||
id:'',
|
||||
select_id: 0,
|
||||
select_name: '',
|
||||
select_show: false,
|
||||
select_list: [],
|
||||
list: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.getClark();
|
||||
},
|
||||
methods: {
|
||||
getClark() {
|
||||
var userInfo = uni.getStorageSync('userInfo');
|
||||
businessListByMember({
|
||||
member_id: userInfo.id,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
const transformedSelectList = key.map(item => ({
|
||||
value: item.id,
|
||||
label: item.business_name
|
||||
}));
|
||||
this.select_name = transformedSelectList[0].label;
|
||||
this.select_id = transformedSelectList[0].value;
|
||||
this.select_list = transformedSelectList;
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
add_confirm(d) {
|
||||
console.log(d);
|
||||
var info = d[0];
|
||||
this.select_name = info.label;
|
||||
this.select_id = info.value;
|
||||
},
|
||||
add() {
|
||||
if (this.formAdd.phone == '' || this.formAdd.clerk_name == '') {
|
||||
uni.showToast({
|
||||
title: '请填写店员信息',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
addClerk({
|
||||
business_id: this.select_id,
|
||||
...this.formAdd
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '添加成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
this.addClerkShow = false;
|
||||
this.getList();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
del(id) {
|
||||
this.id=id;
|
||||
this.show = true;
|
||||
},
|
||||
dian(d) {
|
||||
console.log(d);
|
||||
this.show = false;
|
||||
if (d.index == 1) {
|
||||
this.delDo();
|
||||
}
|
||||
},
|
||||
delDo(){
|
||||
deleteClerk({
|
||||
id: this.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '删除成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
this.getList();
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
clerkListByBusiness({
|
||||
business_id: this.select_id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.list = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
open_phoen(telephone) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: telephone, // 电话号码
|
||||
success: function () {
|
||||
console.log('拨打电话成功');
|
||||
},
|
||||
fail: function () {
|
||||
console.log('拨打电话失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
127
pages/packageA/user/my_vip_info.vue
Normal file
@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<view class="message tn-safe-area-inset-bottom">
|
||||
<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:'商家详情'}]" activeColor="#000" :bold="false" :fontSize="36"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="padding: 30rpx;">
|
||||
<view class="tn-flex tn-flex-col-center tn-flex-row-between"
|
||||
style="background-color: #ffffff;padding:50rpx 30rpx;border-radius: 15rpx;margin-bottom: 20rpx;">
|
||||
<view class="tn-flex tn-flex-col-center">
|
||||
<view>
|
||||
<image :src="info.business_image==''?'/static/def.png':apiImgUrl+info.business_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view style="font-size: 31rpx;font-weight: 600;letter-spacing: 5rpx;">{{info.business_name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #808080;margin-top: 15rpx;" @click="openLoca()">
|
||||
<text>地址:{{info.address}}</text>
|
||||
<text class="tn-icon-location" style="margin-left: 10rpx;color:#3377FF"></text>
|
||||
</view>
|
||||
<view style="font-size: 24rpx;color: #808080;margin-top: 15rpx;" @click="openTel()">
|
||||
<text>电话:{{info.telephone}}</text>
|
||||
<text class="tn-icon-tel-circle" style="margin-left: 10rpx;color:#3377FF"></text>
|
||||
</view>
|
||||
<view style="margin-top: 30rpx;font-size: 30rpx;font-weight: 600;">商家介绍</view>
|
||||
<view style="margin-top: 20rpx;" v-html="info.introduction"></view>
|
||||
<view style="margin-top: 30rpx;font-size: 30rpx;font-weight: 600;">活动介绍</view>
|
||||
<view style="margin-top: 20rpx;" v-html="info.activity_content"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
businessFind
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
id: 0,
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
this.id = data.id;
|
||||
this.getbusinessFind();
|
||||
},
|
||||
methods: {
|
||||
openLoca() {
|
||||
uni.openLocation({
|
||||
latitude: parseFloat(this.info.address_latitude),
|
||||
longitude: parseFloat(this.info.address_longitude),
|
||||
name: this.info.business_name,
|
||||
success: function() {
|
||||
console.log('success');
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log(res);
|
||||
}
|
||||
});
|
||||
},
|
||||
openTel() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.info.telephone, // 电话号码
|
||||
success: function() {
|
||||
console.log('拨打电话成功');
|
||||
},
|
||||
fail: function() {
|
||||
console.log('拨打电话失败');
|
||||
}
|
||||
});
|
||||
},
|
||||
getbusinessFind() {
|
||||
businessFind({
|
||||
id: this.id,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
var key = res.data;
|
||||
if (res.code == 1) {
|
||||
if (key.activity_content.indexOf("<img") != -1) {
|
||||
key.activity_content = getApp().addWidthToImages(key.activity_content);
|
||||
}
|
||||
this.info = key;
|
||||
}
|
||||
})
|
||||
.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>
|
||||
168
pages/packageA/user/my_vip_off.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<view class="message tn-safe-area-inset-bottom">
|
||||
<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:'会员卡核销'}]" activeColor="#000" :bold="false" :fontSize="36"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view class="" :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view v-if="show">
|
||||
<view style="text-align: center;padding: 30rpx;font-size: 50rpx;font-weight: 600">会员卡核销</view>
|
||||
<view style="font-size: 30rpx;font-weight: 600;padding:20rpx 30rpx 20rpx 30rpx">持卡人信息:</view>
|
||||
<view style="padding:20rpx 30rpx 0rpx 30rpx">会员卡号:{{code}}</view>
|
||||
<view class="tn-flex tn-flex-col-center tn-flex-row-between"
|
||||
style="background-color: #ffffff;padding:50rpx 30rpx;border-radius: 15rpx;margin-bottom: 20rpx;">
|
||||
<view class="tn-flex tn-flex-col-center">
|
||||
<view>
|
||||
<image :src="apiImgUrl+info.photo_image"
|
||||
style="width: 100rpx;height: 100rpx;border-radius: 50%;">
|
||||
</image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view style="font-size: 30rpx;font-weight: 600;">{{info.member_nikename}}</view>
|
||||
<view style="font-size: 28rpx;margin-top: 10rpx">{{info.member_phone}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="font-size: 30rpx;font-weight: 600;padding:20rpx 30rpx 20rpx 30rpx">核销人:{{info.clerk_name}}
|
||||
</view>
|
||||
<view style="margin-top: 100rpx;text-align: center">
|
||||
<tn-button @click="submitDo" width="400rpx" height="80rpx" backgroundColor="#28B93D"
|
||||
fontColor="#ffffff" shape="round">确认核销</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
ifRightToExamine,
|
||||
addWriteoff
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
code: '',
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
info: {},
|
||||
key:'',
|
||||
}
|
||||
},
|
||||
onLoad(query) {
|
||||
const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
|
||||
var data = this.getUrlParams(q);
|
||||
this.code = data.key;
|
||||
this.key = data.random_number;
|
||||
this.association_id = data.association_id;
|
||||
getApp().getUserLogin((r) => {
|
||||
console.log('111', r);
|
||||
this.phone = r.data.phone;
|
||||
this.checkUser();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
submitDo() {
|
||||
addWriteoff({
|
||||
association_id: this.association_id,
|
||||
phone: this.phone,
|
||||
code_number: this.code,
|
||||
random_number:this.key
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if(res.code==1){
|
||||
uni.showToast({
|
||||
title: '核销成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
that.goBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
checkUser() {
|
||||
var that = this;
|
||||
console.log(this.association_id);
|
||||
console.log(this.phone);
|
||||
console.log(this.code);
|
||||
ifRightToExamine({
|
||||
association_id: this.association_id,
|
||||
phone: this.phone,
|
||||
code_number: this.code,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.show = true;
|
||||
this.info = res.data;
|
||||
} else {
|
||||
this.show = false;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function(res) {
|
||||
that.goBack();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getUrlParams(url) {
|
||||
// \w+ 表示匹配至少一个(数字、字母及下划线), [\u4e00-\u9fa5]+ 表示匹配至少一个中文字符
|
||||
let pattern = /(\w+|[\u4e00-\u9fa5]+)=(\w+|[\u4e00-\u9fa5]+)/ig;
|
||||
let result = {};
|
||||
url.replace(pattern, ($, $1, $2) => {
|
||||
result[$1] = $2;
|
||||
})
|
||||
return result
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
511
pages/packageA/user/user_activity.vue
Normal file
@ -0,0 +1,511 @@
|
||||
<template>
|
||||
<view style="letter-spacing: 1rpx;background: #ebf4f7;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="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;width: 85%;">
|
||||
<view>添加活动</view>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="padding: 30rpx;">
|
||||
<view style="background-color: #FFF;border-radius: 15rpx;padding: 20rpx;">
|
||||
<tn-form :labelWidth="140">
|
||||
<tn-form-item prop="activity_name">
|
||||
<tn-input v-model="formData.activity_name" :customStyle="{width: '600rpx'}"
|
||||
placeholder="请填写活动标题" />
|
||||
</tn-form-item>
|
||||
<tn-form-item label="活动主图">
|
||||
<tn-input :disabled="true" :clearable="false" @click="upload_img" />
|
||||
<view slot="right" @click="upload_img">
|
||||
<view>
|
||||
<text v-if="formData.activity_image==''">请上传活动主图</text>
|
||||
<image class="no-img" v-if="formData.activity_image!=''"
|
||||
:src="apiImgUrl+formData.activity_image"
|
||||
style="width: 100rpx;vertical-align: middle;" mode="widthFix"></image>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-form-item label="活动类型">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right">
|
||||
<view>
|
||||
<text>协会活动</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-form-item label="报名开始时间" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="start_sign_time_show = true">
|
||||
<view>
|
||||
<text>{{ formData.signup_start_time == '' ? '请选择报名开始时间' : formData.signup_start_time }}
|
||||
</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-picker mode="time" @confirm="start_sign_time_do" v-model="start_sign_time_show"
|
||||
:params="{year: true,month: true,day: true,hour: true,minute: true,second: false}"></tn-picker>
|
||||
<tn-form-item label="报名结束时间" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="end_sign_time_show = true">
|
||||
<view>
|
||||
<text>{{ formData.signup_end_time == '' ? '请选择报名结束时间' : formData.signup_end_time }}</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-picker mode="time" @confirm="end_sign_time_do" v-model="end_sign_time_show"
|
||||
:params="{year: true,month: true,day: true,hour: true,minute: true,second: false}"></tn-picker>
|
||||
|
||||
<tn-form-item label="活动开始时间" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="start_time_show = true">
|
||||
<view>
|
||||
<text>{{ formData.activity_start_time == '' ? '请选择活动开始时间' : formData.activity_start_time }}
|
||||
</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-picker mode="time" @confirm="start_time_do" v-model="start_time_show"
|
||||
:params="{year: true,month: true,day: true,hour: true,minute: true,second: false}"></tn-picker>
|
||||
<tn-form-item label="活动结束时间" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="end_time_show = true">
|
||||
<view>
|
||||
<text>{{ formData.activity_end_time == '' ? '请选择活动结束时间' : formData.activity_end_time }}</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-picker mode="time" @confirm="end_time_do" v-model="end_time_show"
|
||||
:params="{year: true,month: true,day: true,hour: true,minute: true,second: false}"></tn-picker>
|
||||
<tn-form-item label="活动地址">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="open_mode(0)">
|
||||
<view>
|
||||
<text>{{ formData.activity_location == '' ? '请输入活动地址' : formData.activity_location }}</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-form-item label="显示报名人数" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="display_show = true">
|
||||
<view>
|
||||
<text>{{ check_display(formData.if_display_registrants,1) }}</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-select v-model="display_show" mode="single" :list="list" @confirm="display_do"
|
||||
:searchShow="true"></tn-select>
|
||||
|
||||
<tn-form-item label="报名范围" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="display_range_show = true">
|
||||
<view>
|
||||
<text>{{ check_display(formData.range,2) }}</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-select v-model="display_range_show" mode="single" :list="range_list"
|
||||
@confirm="display_range_do" :searchShow="true"></tn-select>
|
||||
|
||||
|
||||
<tn-form-item label="报名审核" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="display_if_auditing_show = true">
|
||||
<view>
|
||||
<text>{{ check_display(formData.if_auditing,3) }}</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-select v-model="display_if_auditing_show" mode="single" :list="if_auditing_list"
|
||||
@confirm="display_if_auditing_do" :searchShow="true"></tn-select>
|
||||
<tn-form-item label="报名人数">
|
||||
<tn-input v-model="formData.number" :clearable="false" :customStyle="{width: '500rpx'}"
|
||||
placeholder="请填写报名人数(0为不限制)" />
|
||||
</tn-form-item>
|
||||
<tn-form-item label="签到" :labelWidth="200">
|
||||
<tn-input :disabled="true" :clearable="false" />
|
||||
<view slot="right" @click="display_if_sign_show = true">
|
||||
<view>
|
||||
<text>{{ check_display(formData.if_sign,4) }}</text>
|
||||
<text class="tn-icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
</tn-form-item>
|
||||
<tn-select v-model="display_if_sign_show" mode="single" :list="if_sign_list"
|
||||
@confirm="display_if_sign_do" :searchShow="true"></tn-select>
|
||||
</tn-form>
|
||||
</view>
|
||||
<view style="background-color: #FFF;border-radius: 15rpx;padding: 20rpx;margin-top: 25rpx;">
|
||||
<tn-input v-model="activity_content" :disabled="true" placeholder="请输入活动内容" type="textarea"
|
||||
:maxLength="-1" :height="300" @click="editText= true" :clearable="false" />
|
||||
</view>
|
||||
<view style="margin: 0 auto;margin-top: 40rpx;text-align: center;">
|
||||
<tn-button @click="submitDo" backgroundColor="#3F8BF2" height="90rpx" width="90%" shape="round"
|
||||
fontColor="#ffffff">发布
|
||||
</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<tn-modal v-model="addMod" :custom="true">
|
||||
<view class="custom-modal-content">
|
||||
<view style="text-align: center;font-size: 34rpx;">活动地址</view>
|
||||
<view class="text">
|
||||
<tn-form ref="form" :labelWidth="180">
|
||||
<tn-form-item label="活动地址" prop="content">
|
||||
<tn-input type="text" placeholder="填写活动地址" v-model="formData.activity_location" />
|
||||
</tn-form-item>
|
||||
</tn-form>
|
||||
<view style="text-align: center;margin-top: 30rpx;">
|
||||
<tn-button backgroundColor="#E6E6E6" fontColor="#ffffff" @click="addMod = false">取消</tn-button>
|
||||
<tn-button backgroundColor="tn-bg-blue" fontColor="tn-color-white" style="margin-left: 30rpx"
|
||||
@click="addMod = false">确定
|
||||
</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</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:'活动内容'}]" :current="0" activeColor="#000" :bold="false"
|
||||
:fontSize="24"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view style="background-color: #FFFFFF;">
|
||||
<view :style="{paddingTop: vuex_custom_bar_height+'px'}"></view>
|
||||
<view style="margin:0rpx 30rpx;background-color: #ffffff;border-radius: 40rpx;">
|
||||
<scroll-view scroll-y class="home" style="height: 1200rpx;">
|
||||
<view class="editor-box">
|
||||
<sp-editor placeholder="活动内容" :toolbarConfig="{
|
||||
excludeKeys: ['direction', 'date', 'listCheck','link','export'],
|
||||
iconSize: '18px',
|
||||
}" @input="inputOver" @init="initEditor" @upinImage="upinImage"></sp-editor>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 0 auto;margin-top: 40rpx;text-align: center;">
|
||||
<tn-button @click="editTextRes" backgroundColor="#3F8BF2" height="90rpx" width="90%" shape="round"
|
||||
fontColor="#ffffff">确定
|
||||
</tn-button>
|
||||
</view>
|
||||
</tn-popup>
|
||||
<tn-modal v-if="qrcode_show" v-model="qrcode_show" :custom="true" :maskCloseable="false">
|
||||
<view style="text-align: center;margin: 30rpx 0rpx;font-size: 32rpx;font-weight: 600;">请保存签到二维码</view>
|
||||
<view style="text-align: center;width: 250rpx;margin:0rpx auto;">
|
||||
<l-painter ref="painter" css="background: #fff;width: 250rpx;text-align: center;">
|
||||
<l-painter-qrcode :text="qrcode_url" css="width: 250rpx; height: 250rpx" />
|
||||
</l-painter>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 50rpx;">
|
||||
<tn-button @click="insQrcode" shape="round" width="80%" backgroundColor="#3F8BF2"
|
||||
fontColor="#ffffff">保存</tn-button>
|
||||
</view>
|
||||
</tn-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
activityAdd
|
||||
} from "@/util/api";
|
||||
import store from "@/store";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
qrcode_show: false,
|
||||
qrcode_url: '',
|
||||
editorIns: null,
|
||||
editText: false,
|
||||
addMod: false,
|
||||
end_time_show: false,
|
||||
start_time_show: false,
|
||||
start_sign_time_show: false,
|
||||
end_sign_time_show: false,
|
||||
display_if_auditing_show: false,
|
||||
display_range_show: false,
|
||||
display_show: false,
|
||||
display_if_sign_show: false,
|
||||
formData: {
|
||||
activity_name: '',
|
||||
activity_image: '',
|
||||
activity_content: '',
|
||||
activity_start_time: '',
|
||||
activity_end_time: '',
|
||||
signup_start_time: '',
|
||||
signup_end_time: '',
|
||||
activity_location: '',
|
||||
activity_type: 1,
|
||||
if_display_registrants: 1,
|
||||
range: 3,
|
||||
if_auditing: 1,
|
||||
number: '',
|
||||
if_sign: 1,
|
||||
},
|
||||
activity_content: '',
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
apiUpUrl: this.$store.state.apiUrl,
|
||||
list: [{
|
||||
value: 1,
|
||||
label: '显示'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '不显示'
|
||||
}],
|
||||
range_list: [{
|
||||
value: 1,
|
||||
label: '会员'
|
||||
}, {
|
||||
value: 3,
|
||||
label: '不限制'
|
||||
}],
|
||||
if_auditing_list: [{
|
||||
value: 1,
|
||||
label: '否'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '是'
|
||||
}],
|
||||
if_sign_list: [{
|
||||
value: 1,
|
||||
label: '否'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '是'
|
||||
}],
|
||||
addID: 0,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitDo() {
|
||||
var user_info = uni.getStorageSync('userInfo');
|
||||
if (user_info.association_id == 0 || user_info.if_member == 2 || user_info.if_xianshi != 1) {
|
||||
uni.showToast({
|
||||
title: '暂无权限!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
activityAdd({
|
||||
association_id: user_info.association_id,
|
||||
...this.formData
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.addID = res.data;
|
||||
uni.showToast({
|
||||
title: '发布成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
if (this.formData.if_sign == 2) {
|
||||
this.qrcode_url = store.state.apiUrl + '?id=' + res.data + '&association_id=' +
|
||||
user_info.association_id,
|
||||
setTimeout(() => {
|
||||
this.qrcode_show = true;
|
||||
}, 500)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/packageB/event/event_info?id=' + res.data
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
inputOver(e) {
|
||||
// 可以在此处获取到编辑器已编辑的内容
|
||||
this.formData.activity_content = e.html;
|
||||
},
|
||||
editTextRes() {
|
||||
// 使用正则表达式找到所有的<img>标签,并替换为[图片]
|
||||
let replacedContent = this.formData.activity_content.replace(/<img[^>]*>/g, '[图片]');
|
||||
// 继续使用正则表达式移除所有剩余的HTML标签,但不包括刚刚替换的[图片]
|
||||
let textWithImagesOnly = replacedContent.replace(/<[^>]+>/g, '');
|
||||
this.activity_content = textWithImagesOnly;
|
||||
this.editText = false;
|
||||
},
|
||||
initEditor(editor) {
|
||||
this.editorIns = editor; // 保存编辑器实例
|
||||
},
|
||||
upinImage(tempFiles, editorCtx) {
|
||||
var that = this;
|
||||
uni.uploadFile({
|
||||
url: that.apiUpUrl + '/common/upload', //仅为示例,非真实的接口地址
|
||||
filePath: tempFiles[0].tempFilePath,
|
||||
name: 'file',
|
||||
success: (uploadFileRes) => {
|
||||
var data = JSON.parse(uploadFileRes.data);
|
||||
console.log(data);
|
||||
editorCtx.insertImage({
|
||||
src: data.data.fullurl,
|
||||
width: "80%", // 默认不建议铺满宽度100%,预留一点空隙以便用户编辑
|
||||
success: function() {},
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
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: user_info.association_id,
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
var data = JSON.parse(uploadFileRes.data);
|
||||
console.log(data);
|
||||
that.formData.activity_image = data.data.url;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
insQrcode() {
|
||||
var that = this;
|
||||
this.$refs.painter.canvasToTempFilePathSync({
|
||||
// 在nvue里是jpeg
|
||||
fileType: "png",
|
||||
quality: 1,
|
||||
pathType: 'url',
|
||||
success: (res) => {
|
||||
console.log(res.tempFilePath);
|
||||
// 非H5 保存到相册
|
||||
// H5 提示用户长按图另存
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: function() {
|
||||
uni.showToast({
|
||||
title: '保存成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/packageB/event/event_info?id=' + that
|
||||
.addID
|
||||
})
|
||||
}, 500)
|
||||
},
|
||||
fail: function(err) {
|
||||
console.log(err, '失败')
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
check_display(d, type) {
|
||||
if (type == 1) {
|
||||
const info = this.list.find(item => item.value === d);
|
||||
return info.label;
|
||||
}
|
||||
if (type == 2) {
|
||||
const info = this.range_list.find(item => item.value === d);
|
||||
return info.label;
|
||||
}
|
||||
if (type == 3) {
|
||||
const info = this.if_auditing_list.find(item => item.value === d);
|
||||
return info.label;
|
||||
}
|
||||
if (type == 4) {
|
||||
const info = this.if_sign_list.find(item => item.value === d);
|
||||
return info.label;
|
||||
}
|
||||
},
|
||||
display_do(d) {
|
||||
var info = d[0];
|
||||
this.formData.if_display_registrants = info.value;
|
||||
},
|
||||
display_range_do(d) {
|
||||
var info = d[0];
|
||||
this.formData.range = info.value;
|
||||
},
|
||||
display_if_auditing_do(d) {
|
||||
var info = d[0];
|
||||
this.formData.if_auditing = info.value;
|
||||
},
|
||||
display_if_sign_do(d) {
|
||||
var info = d[0];
|
||||
this.formData.if_sign = info.value;
|
||||
},
|
||||
open_mode(d) {
|
||||
this.addMod = true;
|
||||
},
|
||||
end_time_do(d) {
|
||||
this.formData.activity_end_time = d.year + '-' + d.month + '-' + d.day + ' ' + d.hour + ':' + d.minute;
|
||||
},
|
||||
start_time_do(d) {
|
||||
this.formData.activity_start_time = d.year + '-' + d.month + '-' + d.day + ' ' + d.hour + ':' + d.minute;
|
||||
},
|
||||
start_sign_time_do(d) {
|
||||
this.formData.signup_start_time = d.year + '-' + d.month + '-' + d.day + ' ' + d.hour + ':' + d.minute;
|
||||
},
|
||||
end_sign_time_do(d) {
|
||||
this.formData.signup_end_time = d.year + '-' + d.month + '-' + d.day + ' ' + d.hour + ':' + d.minute;
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.no-img {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
</style>
|
||||
258
pages/packageA/user/user_auditing.vue
Normal file
@ -0,0 +1,258 @@
|
||||
<template>
|
||||
<view style="letter-spacing: 1rpx;background: #ebf4f7;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="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;width: 85%;">
|
||||
<view>智慧云商协</view>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view
|
||||
style="z-index: 100;;position: fixed;;width: 100%;margin: 0 auto;background-color: #ffffff;padding: 0rpx 50rpx;">
|
||||
<tn-tabs :list="list" activeColor="#3f8bf2" backgroundColor="#FFFFFF" :isScroll="false"
|
||||
:current="current" name="name" @change="change"></tn-tabs>
|
||||
</view>
|
||||
<view style="padding: 30rpx;margin-top: 90rpx;">
|
||||
<view class="tn-flex tn-flex-col-center" style="margin-bottom: 40rpx;">
|
||||
<view @click="changeXs(0)"
|
||||
:style="{'color': if_xianshi==0?'#ffffff':'#000000','background-color': if_xianshi==0?'#3f8bf2':'#FFF','border-radius': '50rpx','padding': '10rpx 30rpx'}">
|
||||
待审核
|
||||
</view>
|
||||
<view @click="changeXs(1)"
|
||||
:style="{'color': if_xianshi==1?'#ffffff':'#000000','background-color': if_xianshi==1?'#3f8bf2':'#FFF','border-radius': '50rpx','padding': '10rpx 30rpx','margin':'0rpx 20rpx'}">
|
||||
已通过
|
||||
</view>
|
||||
<view @click="changeXs(2)"
|
||||
:style="{'color': if_xianshi==2?'#ffffff':'#000000','background-color': if_xianshi==2?'#3f8bf2':'#FFF','border-radius': '50rpx','padding': '10rpx 30rpx'}">
|
||||
已拒绝
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="item in all_list"
|
||||
@click="openUrl('/pages/packageA/user/user_auditing_info?id='+item.id+'&type='+item.type)"
|
||||
style="margin-bottom: 30rpx;box-shadow: 0rpx 10rpx 10rpx #d2e0f2;background: #ffffff;border-radius: 20rpx;padding: 30rpx 20rpx;position: relative;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
|
||||
<view>
|
||||
<text class="tn-icon-my-fill" style="color: #3f8bf2;"></text>
|
||||
<text style="margin-left: 10rpx;">申请人</text>
|
||||
<text style="margin-left: 50rpx;">{{item.nikename}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text style="color: #3f8bf2;">查看</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;margin: 20rpx auto;border: 1rpx solid #d9d9d961;"></view>
|
||||
<view>
|
||||
<text>申请事项</text>
|
||||
<text style="margin-left: 50rpx;">{{item.type==1?'修改申请':'入会申请'}}</text>
|
||||
</view>
|
||||
<view style="margin: 25rpx 0rpx;">
|
||||
<text>审核状态</text>
|
||||
<text style="margin-left: 50rpx;" v-if="item.if_xianshi==0">待审核</text>
|
||||
<text style="margin-left: 50rpx;" v-if="item.if_xianshi==1">已通过</text>
|
||||
<text style="margin-left: 50rpx;" v-if="item.if_xianshi==2">已拒绝</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>申请时间</text>
|
||||
<text style="margin-left: 50rpx;">{{item.createtime}}</text>
|
||||
</view>
|
||||
<image v-if="item.if_xianshi==0" src="/static/sh.png"
|
||||
style="width: 140rpx;height: 140rpx;position: absolute;top: 140rpx;right: 30rpx;">
|
||||
</image>
|
||||
<image v-if="item.if_xianshi==1" src="/static/tg.png"
|
||||
style="width: 140rpx;height: 140rpx;position: absolute;top: 140rpx;right: 30rpx;">
|
||||
</image>
|
||||
<image v-if="item.if_xianshi==2" src="/static/jj.png"
|
||||
style="width: 140rpx;height: 140rpx;position: absolute;top: 140rpx;right: 30rpx;">
|
||||
</image>
|
||||
<view v-if="item.if_xianshi==0" class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-around"
|
||||
style="color: #FFF;text-align: center;margin-top: 40rpx;">
|
||||
<view @click.stop="openModal(item,2)"
|
||||
style="color: #ffffff;line-height: 76rpx;width: 240rpx;height: 76rpx;background: #d54941;border-radius: 76rpx;">
|
||||
拒绝</view>
|
||||
<view @click.stop="openModal(item,1)"
|
||||
style="color: #ffffff;line-height: 76rpx;width: 240rpx;height: 76rpx;background: #3464ec;border-radius: 76rpx;">
|
||||
通过</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<tn-modal v-model="show" :title="title" :content="content" :button="button" @click="dian"></tn-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAuditing,
|
||||
auditingUpadte
|
||||
} from '@/util/api.js';
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
list: [{
|
||||
name: '全部申请'
|
||||
}, {
|
||||
name: '信息修改'
|
||||
}, {
|
||||
name: '入会申请',
|
||||
}],
|
||||
page: 1,
|
||||
all_list: [],
|
||||
current: 0,
|
||||
if_xianshi: 0,
|
||||
show: false,
|
||||
title: '提示信息',
|
||||
content: '提示信息的内容',
|
||||
button: [{
|
||||
text: '取消',
|
||||
backgroundColor: '#F4F4F4',
|
||||
fontColor: '#000000',
|
||||
plain: true,
|
||||
shape: 'round'
|
||||
},
|
||||
{
|
||||
text: '确定',
|
||||
backgroundColor: '#548ceb',
|
||||
fontColor: '#FFFFFF'
|
||||
}
|
||||
],
|
||||
key: 0,
|
||||
key_info: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
var that = this;
|
||||
this.getAuditingList();
|
||||
uni.$on('onload', function(data) {
|
||||
that.page = 1;
|
||||
that.all_list = [];
|
||||
that.getAuditingList();
|
||||
})
|
||||
},
|
||||
onReachBottom() {
|
||||
this.page += 1;
|
||||
this.getAuditingList();
|
||||
},
|
||||
methods: {
|
||||
setAuditing() {
|
||||
var user_info = uni.getStorageSync('userInfo');
|
||||
var member_id = this.key_info.type == 1 ? this.key_info.member_id : this.key_info.id;
|
||||
var content = '';
|
||||
if (this.key == 1) {
|
||||
content = this.key_info.type == 1 ? '您提交的资料修改申请已通过审核!' : '您提交的入会申请已通过审核!';
|
||||
} else {
|
||||
content = this.key_info.type == 2 ? '您提交的资料修改申请已被拒绝!' : '您提交的入会申请已被拒绝!';
|
||||
}
|
||||
auditingUpadte({
|
||||
association_id: user_info.association_id,
|
||||
member_id: member_id,
|
||||
if_xianshi: this.key,
|
||||
type: this.key_info.type,
|
||||
content: content,
|
||||
id: this.key_info.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
this.page = 1;
|
||||
this.all_list = [];
|
||||
this.getAuditingList();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
this.show = false;
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
dian(d) {
|
||||
if (d.index == 1) {
|
||||
this.setAuditing();
|
||||
} else {
|
||||
this.show = false;
|
||||
}
|
||||
},
|
||||
openModal(info, key) {
|
||||
console.log(key);
|
||||
this.key_info = info;
|
||||
this.key = key;
|
||||
this.show = true;
|
||||
this.title = key == 1 ? '通过申请' : '拒绝申请';
|
||||
this.content = key == 1 ? '确认要通过申请吗?' : '确认要拒绝申请吗?';
|
||||
},
|
||||
change(d) {
|
||||
this.current = d;
|
||||
this.page = 1;
|
||||
this.if_xianshi = 0;
|
||||
this.all_list = [];
|
||||
this.getAuditingList();
|
||||
},
|
||||
changeXs(d) {
|
||||
this.page = 1;
|
||||
this.all_list = [];
|
||||
this.if_xianshi = d;
|
||||
this.getAuditingList();
|
||||
},
|
||||
getAuditingList() {
|
||||
var user_info = uni.getStorageSync('userInfo');
|
||||
getAuditing({
|
||||
association_id: user_info.association_id,
|
||||
page: this.page,
|
||||
size: 10,
|
||||
if: this.current,
|
||||
if_xianshi: this.if_xianshi,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.all_list.push(...res.data);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
330
pages/packageA/user/user_auditing_info.vue
Normal file
@ -0,0 +1,330 @@
|
||||
<template>
|
||||
<view style="letter-spacing: 1rpx;background: #ebf4f7;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="text-shadow: 1rpx 0 0 #FFF, 0 1rpx 0 #FFF, -1rpx 0 0 #FFF , 0 -1rpx 0 #FFF;width: 85%;">
|
||||
<view>审请详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="padding:20rpx 20rpx 300rpx 20rpx;">
|
||||
<view
|
||||
style="margin-bottom: 30rpx;box-shadow: 0rpx 10rpx 10rpx #d2e0f2;background: #ffffff;border-radius: 20rpx;padding: 30rpx 20rpx;position: relative;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-between">
|
||||
<view>
|
||||
<text
|
||||
style="font-size: 35rpx;font-weight: 600;">{{onloadData.type==1?'申请人信息':'推荐人信息'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;margin: 20rpx auto;border: 1rpx solid #d9d9d961;"></view>
|
||||
<view v-if="info.find!=''" class="tn-flex tn-flex-center tn-flex-col-center"
|
||||
style="padding: 10rpx 0rpx;">
|
||||
<view>
|
||||
<image :src="apiImgUrl+info.find.photo_image"
|
||||
style="border-radius: 50%;width: 100rpx;height: 100rpx"></image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;">
|
||||
<view>
|
||||
<text style="font-size: 32rpx;font-weight: 600;">{{info.find.nikename}}</text>
|
||||
<text
|
||||
style="font-size: 28rpx;color: #666666;margin-left: 20rpx;">{{info.find.position_name}}</text>
|
||||
|
||||
</view>
|
||||
<view style="margin-top: 10rpx;">
|
||||
<text style="color: #4a5c72;">{{info.find.enterprise_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="info.find==''">
|
||||
暂无推荐人
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
style="margin-bottom: 30rpx;box-shadow: 0rpx 10rpx 10rpx #d2e0f2;background: #ffffff;border-radius: 20rpx;padding: 30rpx 20rpx;position: relative;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center">
|
||||
<view>
|
||||
<text style="font-size: 35rpx;font-weight: 600;">申请详情</text>
|
||||
</view>
|
||||
<view v-if="onloadData.type==2">
|
||||
<view v-if="info.member.if_xianshi==0"
|
||||
style="margin-left: 30rpx;text-align: center;line-height: 50rpx;width: 120rpx;height: 50rpx;color: #FFF;background-color: #FFBE77;border-radius: 10rpx;">
|
||||
审核中</view>
|
||||
<view v-if="info.member.if_xianshi==1"
|
||||
style="margin-left: 30rpx;text-align: center;line-height: 50rpx;width: 120rpx;height: 50rpx;color: #FFF;background-color: #3F8BF2;border-radius: 10rpx;">
|
||||
已通过</view>
|
||||
<view v-if="info.member.if_xianshi==2"
|
||||
style="margin-left: 30rpx;text-align: center;line-height: 50rpx;width: 120rpx;height: 50rpx;color: #FFF;background-color: #E60000;border-radius: 10rpx;">
|
||||
已拒绝</view>
|
||||
</view>
|
||||
<view v-if="onloadData.type==1">
|
||||
<view v-if="info.find.if_xianshi==0"
|
||||
style="margin-left: 30rpx;text-align: center;line-height: 50rpx;width: 120rpx;height: 50rpx;color: #FFF;background-color: #FFBE77;border-radius: 10rpx;">
|
||||
审核中</view>
|
||||
<view v-if="info.find.if_xianshi==1"
|
||||
style="margin-left: 30rpx;text-align: center;line-height: 50rpx;width: 120rpx;height: 50rpx;color: #FFF;background-color: #3F8BF2;border-radius: 10rpx;">
|
||||
已通过</view>
|
||||
<view v-if="info.find.if_xianshi==2"
|
||||
style="margin-left: 30rpx;text-align: center;line-height: 50rpx;width: 120rpx;height: 50rpx;color: #FFF;background-color: #E60000;border-radius: 10rpx;">
|
||||
已拒绝</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;margin: 20rpx auto;border: 1rpx solid #d9d9d961;"></view>
|
||||
<view style="padding: 10rpx 0rpx;">
|
||||
<view v-if="onloadData.type==2" style="margin-left: 20rpx;color: #5b5b5b;">
|
||||
<view style="margin-top: 15rpx;">
|
||||
<text style="">手机号:</text>
|
||||
<text>{{info.member.phone}}</text>
|
||||
</view>
|
||||
<view style="margin-top: 15rpx;">
|
||||
<text style="">真实姓名:</text>
|
||||
<text style="">{{info.member.nikename}}</text>
|
||||
</view>
|
||||
<view style="margin-top: 15rpx;">
|
||||
<text style="">性别:</text>
|
||||
<text style="">{{info.member.gender==0?'女':'男'}}</text>
|
||||
</view>
|
||||
<view style="margin-top: 15rpx;">
|
||||
<text style="">企业名称:</text>
|
||||
<text style="">{{info.member.enterprise_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="onloadData.type==1" style="margin-left: 20rpx;color: #5b5b5b;">
|
||||
<view v-if="info.member_log.background_image" class="tn-flex" style="margin-top: 10rpx;">
|
||||
<view style="width: 200rpx;">更改背景:</view>
|
||||
<image :src="apiImgUrl+info.member_log.background_image" style="height: 200rpx;"
|
||||
mode="heightFix"></image>
|
||||
</view>
|
||||
<view v-if="info.member_log.photo_image" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">形象照:</view>
|
||||
<image :src="apiImgUrl+info.member_log.photo_image"
|
||||
style="height: 100rpx;width: 100rpx;"></image>
|
||||
</view>
|
||||
<view v-if="info.member_log.nikename" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">姓名:</view>
|
||||
<view>{{info.member_log.nikename}}</view>
|
||||
</view>
|
||||
<view v-if="info.member_log.gender_name" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">性别:</view>
|
||||
<view>{{info.member_log.gender_name}}</view>
|
||||
</view>
|
||||
<view v-if="info.member_log.phone" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">联系方式:</view>
|
||||
<view>{{info.member_log.phone}}</view>
|
||||
</view>
|
||||
<view v-if="info.member_log.introduction" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">个人经历:</view>
|
||||
<view @click="infoShow = true;infoType=1;"
|
||||
style="padding: 10rpx;width: 500rpx;background-color: #F5F5F5;border-radius: 5rpx;">
|
||||
<view class="tn-text-ellipsis-3">{{info.member_log.introduction}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="info.member_log.enterprise_name" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">公司名称:</view>
|
||||
<view>{{info.member_log.enterprise_name}}</view>
|
||||
</view>
|
||||
<view v-if="info.member_log.industry_id" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">公司行业:</view>
|
||||
<view>{{info.member_log.industry_id==-1?'其他行业':info.member_log.industry_name}}</view>
|
||||
</view>
|
||||
<view v-if="info.member_log.company_image" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">公司Logo:</view>
|
||||
<image :src="apiImgUrl+info.member_log.company_image"
|
||||
style="height: 100rpx;width: 100rpx;"></image>
|
||||
</view>
|
||||
<view v-if="info.member_log.enterprise_location" class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">公司地址:</view>
|
||||
<view>{{info.member_log.enterprise_location}}</view>
|
||||
</view>
|
||||
<view v-if="info.member_log.enterprise_Introduction" class="tn-flex"
|
||||
style="margin-top: 30rpx;">
|
||||
<view style="width: 200rpx;">公司介绍:</view>
|
||||
<view @click="infoShow = true;infoType=2;"
|
||||
style="padding: 10rpx;width: 500rpx;background-color: #F5F5F5;border-radius: 5rpx;">
|
||||
<view class="tn-text-ellipsis-3">{{info.member_log.enterprise_Introduction}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="info.find.if_xianshi==0 || info.member.if_xianshi==0"
|
||||
style="position: fixed;background-color: #FFF;width: 100%;bottom: 0;padding-bottom: 100rpx;padding-top: 40rpx;">
|
||||
<view class="tn-flex tn-flex-center tn-flex-col-center tn-flex-row-around"
|
||||
style="color: #FFF;text-align: center;">
|
||||
<view @click="openModal(2)"
|
||||
style="color: #ffffff;line-height: 88rpx;width: 138px;height: 88rpx;background: #d54941;border-radius: 8px;">
|
||||
拒绝申请</view>
|
||||
<view @click="openModal(1)"
|
||||
style="line-height: 88rpx;width: 138px;height: 88rpx;background: #3464ec;border-radius: 8px;">
|
||||
申请通过
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<tn-modal v-model="show" :title="title" :content="content" :button="button" @click="dian"></tn-modal>
|
||||
<tn-popup v-model="infoShow" 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="infoShow = 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:infoType==1?'个人经历':'公司介绍'}]" :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%;padding-bottom: 100rpx;">
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 20+'px'}"></view>
|
||||
<view style="margin:30rpx;background-color: #ffffff;border-radius: 20rpx;">
|
||||
<view style="padding: 30rpx;">
|
||||
<view>
|
||||
{{infoType==1?info.member_log.introduction:info.member_log.enterprise_Introduction}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</tn-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getAuditingFind,
|
||||
auditingUpadte
|
||||
} from '@/util/api.js';
|
||||
import store from "@/store";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
info: {
|
||||
find: []
|
||||
},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
onloadData: {},
|
||||
show: false,
|
||||
infoShow: false,
|
||||
infoType: 1,
|
||||
title: '提示信息',
|
||||
content: '提示信息的内容',
|
||||
button: [{
|
||||
text: '取消',
|
||||
backgroundColor: '#F4F4F4',
|
||||
fontColor: '#000000',
|
||||
plain: true,
|
||||
shape: 'round'
|
||||
},
|
||||
{
|
||||
text: '确定',
|
||||
backgroundColor: '#548ceb',
|
||||
fontColor: '#FFFFFF'
|
||||
}
|
||||
],
|
||||
key: 0
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(d) {
|
||||
this.onloadData = d;
|
||||
this.getAuditingList();
|
||||
},
|
||||
methods: {
|
||||
dian(d) {
|
||||
if (d.index == 1) {
|
||||
this.setAuditing();
|
||||
} else {
|
||||
this.show = false;
|
||||
}
|
||||
},
|
||||
openModal(key) {
|
||||
this.key = key;
|
||||
this.show = true;
|
||||
this.title = key == 1 ? '通过申请' : '拒绝申请';
|
||||
this.content = key == 1 ? '确认要通过申请吗?' : '确认要拒绝申请吗?';
|
||||
},
|
||||
setAuditing() {
|
||||
var user_info = uni.getStorageSync('userInfo');
|
||||
var member_id = this.onloadData.type == 1 ? this.info.find.id : this.info.member.id;
|
||||
var content = '';
|
||||
if (this.key == 1) {
|
||||
content = this.onloadData.type == 1 ? '您提交的资料修改申请已通过审核!' : '您提交的入会申请已通过审核!';
|
||||
} else {
|
||||
content = this.onloadData.type == 2 ? '您提交的资料修改申请已被拒绝!' : '您提交的入会申请已被拒绝!';
|
||||
}
|
||||
auditingUpadte({
|
||||
...this.onloadData,
|
||||
association_id: user_info.association_id,
|
||||
member_id: member_id,
|
||||
if_xianshi: this.key,
|
||||
content: content
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uni.$emit('onload', 1)
|
||||
this.getAuditingList();
|
||||
}
|
||||
this.show = false;
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getAuditingList() {
|
||||
var user_info = uni.getStorageSync('userInfo');
|
||||
getAuditingFind({
|
||||
...this.onloadData,
|
||||
association_id: user_info.association_id
|
||||
})
|
||||
.then(res => {
|
||||
this.info = res.data;
|
||||
})
|
||||
.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>
|
||||
/* 显示两行 */
|
||||
.tn-text-ellipsis-3 {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
white-space: normal !important;
|
||||
text-overflow: ellipsis;
|
||||
word-wrap: break-word;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
</style>
|
||||
68
pages/packageB/ask/add.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<view style="background-color: #F5F5F5;height: 100vh;">
|
||||
<view class="ask_add_bg">
|
||||
<tn-nav-bar customBack :bottomShadow="false" backgroundColor="transparent">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-center">
|
||||
<view style="color: #000000;;text-align: left;font-size: 36rpx;font-weight: 600;">
|
||||
<text></text>
|
||||
</view>
|
||||
</view>
|
||||
<view slot="back" class='tn-custom-nav-bar__back' style="padding-left: 20rpx;" @click="goBack">
|
||||
<image src="/static/w_back.png" style="width: 60rpx;height: 60rpx;"></image>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="padding: 30rpx;margin-top: 200rpx;">
|
||||
<view style="background-color: #ffffff;border-radius: 18rpx;padding: 30rpx;">
|
||||
<tn-input placeholder="请输入您的疑问" v-model="centent" type="textarea" :clearable="false"
|
||||
:border="false" :height="400" :autoHeight="false"></tn-input>
|
||||
<view style="min-height: 200rpx;">
|
||||
<tn-image-upload-drag ref="imageUpload" :action="action" :width="200" :height="200"
|
||||
:formData="formData" :fileList="fileList" :autoUpload="true" :maxCount="3"
|
||||
:showUploadList="true" :showProgress="false" name="file" :deleteable="true"
|
||||
:customBtn="false" @sort-list="onSortList" @on-list-change="onListChange"
|
||||
:beforeUpload="beforeUpload" uploadText="添加图片" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view style="position: fixed;bottom: 100rpx;width: 100%;">
|
||||
<view style="text-align: center;font-size: 32rpx;color: #ffffff;width: 90%;margin: 0 auto;background-color:#2368F2;line-height: 85rpx;height: 85rpx;border-radius: 85rpx;">提交问题</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
action:'',
|
||||
centent: '',
|
||||
fileList:'',
|
||||
formData:{}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ask_add_bg {
|
||||
background: url('https://ysx.hschool.com.cn/uploads/1/20250509/94f9329dab451d4fc9f6b409d96c2a13.png') no-repeat;
|
||||
background-size: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
105
pages/packageB/ask/index.vue
Normal file
@ -0,0 +1,105 @@
|
||||
<template>
|
||||
<view style="background-color: #F5F5F5;min-height: 100vh;">
|
||||
<view class="ask_index_bg">
|
||||
<tn-nav-bar customBack :bottomShadow="false" backgroundColor="transparent">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-center">
|
||||
<view style="color: #000000;;text-align: left;font-size: 36rpx;font-weight: 600;">
|
||||
<text>你问我帮</text>
|
||||
</view>
|
||||
</view>
|
||||
<view slot="back" class='tn-custom-nav-bar__back' style="padding-left: 20rpx;" @click="goBack">
|
||||
<image src="/static/w_back.png" style="width: 60rpx;height: 60rpx;"></image>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="padding: 30rpx;">
|
||||
<view v-for="item in 5" @click="openUrl('/pages/packageB/ask/info')" style="background-color: #fff;border-radius: 18rpx;padding: 30rpx;margin-bottom: 30rpx;">
|
||||
<view>
|
||||
<image src="/static/03.png" style="width: 50rpx;height: 50rpx;vertical-align: middle;"
|
||||
mode="aspectFill"></image>
|
||||
<text
|
||||
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">风一样的男人</text>
|
||||
</view>
|
||||
<view class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view>
|
||||
<image src="/static/wen.png" style="width: 38rpx;" class="no-img" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;">
|
||||
亲爱的职友,在你心目中什么样的工作是稳定的工作
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 20rpx;">
|
||||
<image src="/static/def.png"
|
||||
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
||||
<image src="/static/def.png" style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
||||
</image>
|
||||
<image src="/static/def.png"
|
||||
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
||||
</view>
|
||||
<view class="tn-flex"
|
||||
style="background-color: #F7F7F7;padding: 20rpx;border-radius: 18rpx;margin-top: 20rpx;">
|
||||
<view>
|
||||
<image src="/static/da.png" style="width: 35rpx;" class="no-img" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="tn-text-ellipsis-2"
|
||||
style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;color: #9B9B9B;">
|
||||
今天天气很清凉今天天气很清凉今天天气很清凉今天天气很清凉今天天气很清凉
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-col-center tn-flex-row-between"
|
||||
style="margin-top: 30rpx;font-size: 26rpx;font-weight: 400;color: #9B9B9B;">
|
||||
<view>2024.04.06</view>
|
||||
<view>
|
||||
<text class="tn-icon-eye"></text>
|
||||
<text>133</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<image @click="openUrl('/pages/packageB/ask/add')" src="/static/tiwen.png"
|
||||
style="width: 106rpx;position: fixed;right:30rpx;bottom: 150rpx;" mode="widthFix" class="no-img"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openUrl(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.ask_index_bg {
|
||||
background: url('https://ysx.hschool.com.cn/uploads/1/20250509/4247d991a9a95810641fb3b533602978.png') no-repeat;
|
||||
background-size: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
page {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
</style>
|
||||
90
pages/packageB/ask/info.vue
Normal file
@ -0,0 +1,90 @@
|
||||
<template>
|
||||
<view style="background-color: #F7F7F7;min-height: 100vh;">
|
||||
<tn-nav-bar customBack :bottomShadow="false" backgroundColor="#ffffff">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-center">
|
||||
<view style="color: #000000;;text-align: left;font-size: 36rpx;font-weight: 600;">
|
||||
<text>详情</text>
|
||||
</view>
|
||||
</view>
|
||||
<view slot="back" class='tn-custom-nav-bar__back' style="padding-left: 20rpx;" @click="goBack">
|
||||
<image src="/static/h_back.png" style="width: 60rpx;height: 60rpx;"></image>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="padding: 30rpx;">
|
||||
<view style="background-color: #fff;border-radius: 18rpx;padding: 30rpx;margin-bottom: 30rpx;">
|
||||
<view>
|
||||
<image src="/static/03.png" style="width: 50rpx;height: 50rpx;vertical-align: middle;"
|
||||
mode="aspectFill"></image>
|
||||
<text
|
||||
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">风一样的男人</text>
|
||||
</view>
|
||||
<view class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view>
|
||||
<image src="/static/wen.png" style="width: 38rpx;" class="no-img" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;">
|
||||
亲爱的职友,在你心目中什么样的工作是稳定的工作
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 20rpx;">
|
||||
<image src="/static/def.png"
|
||||
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
||||
<image src="/static/def.png" style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
||||
</image>
|
||||
<image src="/static/def.png"
|
||||
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view class="tn-flex tn-flex-col-center tn-flex-row-between"
|
||||
style="margin-top: 30rpx;font-size: 26rpx;font-weight: 400;color: #9B9B9B;">
|
||||
<view>2024.04.06</view>
|
||||
<view>
|
||||
<text class="tn-icon-eye"></text>
|
||||
<text>133</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="background-color: #fff;border-radius: 18rpx;padding:30rpx;">
|
||||
<view class="tn-flex">
|
||||
<view>
|
||||
<image src="/static/da.png" style="width: 35rpx;" class="no-img" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="tn-text-ellipsis-2"
|
||||
style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;color: #9B9B9B;">
|
||||
今天天气很清凉今天天气很清凉今天天气很清凉今天天气很清凉今天天气很清凉
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
85
pages/packageB/ask/user_list.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<view style="background-color: #F5F5F5;height: 100vh;">
|
||||
<tn-nav-bar customBack :bottomShadow="false" backgroundColor="#ffffff">
|
||||
<view class="custom-nav tn-flex tn-flex-col-center tn-flex-row-center">
|
||||
<view style="color: #000000;;text-align: left;font-size: 36rpx;font-weight: 600;">
|
||||
<text>信息审核</text>
|
||||
</view>
|
||||
</view>
|
||||
<view slot="back" class='tn-custom-nav-bar__back' style="padding-left: 20rpx;" @click="goBack">
|
||||
<image src="/static/h_back.png" style="width: 60rpx;height: 60rpx;"></image>
|
||||
</view>
|
||||
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view style="background-color: #fff;">
|
||||
<tn-tabs :list="List" :isScroll="false" :activeItemStyle="{fontSize:'30rpx',fontWeight:'600'}"
|
||||
activeColor="#000000" inactiveColor="#9B9B9B" :barStyle="{color:'#2368F2',backgroundColor:'#2368F2'}" :current="current" name="name" @change="change" :fontSize="28"></tn-tabs>
|
||||
</view>
|
||||
<view style="padding: 30rpx;">
|
||||
<view style="background-color: #fff;border-radius: 18rpx;padding: 30rpx;margin-bottom: 30rpx;position: relative;">
|
||||
<image src="/static/ask_ok.png" style="width: 100rpx;position: absolute;right: 0;top: 0;" mode="widthFix" class="no-img"></image>
|
||||
<view>
|
||||
<image src="/static/03.png" style="width: 50rpx;height: 50rpx;vertical-align: middle;"
|
||||
mode="aspectFill"></image>
|
||||
<text
|
||||
style="color: #9B9B9B;vertical-align: middle;margin-left: 10rpx;font-size: 28rpx;font-weight: 400;">风一样的男人</text>
|
||||
</view>
|
||||
<view class="tn-flex" style="margin-top: 30rpx;">
|
||||
<view>
|
||||
<image src="/static/wen.png" style="width: 38rpx;" class="no-img" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view style="margin-left: 20rpx;font-size: 28rpx;font-weight: 400;">
|
||||
亲爱的职友,在你心目中什么样的工作是稳定的工作
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 20rpx;">
|
||||
<image src="/static/def.png"
|
||||
style="width: 200rpx;height: 200rpx;border-radius:18rpx 0rpx 0rpx 18rpx;"></image>
|
||||
<image src="/static/def.png" style="width: 200rpx;height: 200rpx;margin: 0rpx 10rpx;">
|
||||
</image>
|
||||
<image src="/static/def.png"
|
||||
style="width: 200rpx;height: 200rpx;border-radius:0rpx 18rpx 18rpx 0rpx;"></image>
|
||||
</view>
|
||||
|
||||
<view class="tn-flex tn-flex-col-center tn-flex-row-between"
|
||||
style="margin-top: 30rpx;font-size: 26rpx;font-weight: 400;color: #9B9B9B;">
|
||||
<view>2024.04.06</view>
|
||||
<!-- <view>
|
||||
<text class="tn-icon-eye"></text>
|
||||
<text>133</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
current:0,
|
||||
List:[{'name':'待审核'},{'name':'待审核'},{'name':'待审核'}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
617
pages/packageB/event/event_info.vue
Normal file
@ -0,0 +1,617 @@
|
||||
<template>
|
||||
<view style="letter-spacing: 1rpx;" 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-between">
|
||||
<view class="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>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<image :src="apiImgUrl+info.activity_image" style="width: 100%;" mode="widthFix"></image>
|
||||
<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, 8)"></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>
|
||||
<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==1">
|
||||
<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, 8)"></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="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>
|
||||
</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-form-item>
|
||||
</tn-form>
|
||||
<view class="tn-flex tn-flex-row-center" style="margin-top: 50rpx;">
|
||||
<tn-button @click="juanMod=false" backgroundColor="#E6E6E6" fontColor="#838383">我再想想</tn-button>
|
||||
<tn-button @click="juanzhuDo" backgroundColor="#28B93D" fontColor="#ffffff"
|
||||
style="margin-left: 70rpx;">确定捐助
|
||||
</tn-button>
|
||||
</view>
|
||||
</tn-modal>
|
||||
<tn-modal v-model="peiMod" :custom="true">
|
||||
<view style="padding: 20rpx;text-align: center;font-size: 40rpx;">需要缴纳费用</view>
|
||||
<view style="text-align: center;margin-top: 30rpx;">
|
||||
<text style="font-size: 40rpx;">¥</text>
|
||||
<text style="font-size: 70rpx;color: #26BB71;margin-left: 5rpx;font-weight: 600;">{{info.money}}</text>
|
||||
</view>
|
||||
<view class="tn-flex tn-flex-row-center" style="margin-top: 50rpx;">
|
||||
<tn-button @click="peiMod=false" backgroundColor="#E6E6E6" fontColor="#838383">我再想想</tn-button>
|
||||
<tn-button @click="zhifuDo" backgroundColor="#28B93D" fontColor="#ffffff"
|
||||
style="margin-left: 70rpx;">支付费用
|
||||
</tn-button>
|
||||
</view>
|
||||
</tn-modal>
|
||||
<tn-popup v-model="rightMod" mode="right" width="70%">
|
||||
<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="rightMod = 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:'报名详情'}]" :current="topCurrent" activeColor="#000" :bold="false"
|
||||
:fontSize="24"></tn-tabs>
|
||||
</view>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view :style="{paddingTop: vuex_custom_bar_height + 'px'}">
|
||||
<view v-if="info.list.length!=0" class="tn-flex tn-flex-center tn-flex-col-center"
|
||||
v-for="(item,index) in info.list" @click="openUrl('/pages/packageA/user/my_card?id='+item.id)"
|
||||
style="margin-top: 20rpx;padding: 20rpx;">
|
||||
<view>
|
||||
<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: 30rpx;font-weight: 600">{{item.nikename}}</view>
|
||||
<view style="font-size: 24rpx;color: #999999;margin-top: 10rpx">{{item.position_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="info.list.length==0" style="text-align: center;padding-top: 40rpx">暂无</view>
|
||||
</view>
|
||||
</tn-popup>
|
||||
<tn-modal v-model="showLogin" :custom="true">
|
||||
<view style="text-align: center;">
|
||||
<view style="font-size: 32rpx;font-weight: 600;">登陆提示</view>
|
||||
<view style="margin-top: 40rpx;">请登录后参与活动!</view>
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 40rpx;">
|
||||
<tn-button open-type="getPhoneNumber" @getphonenumber="PhoneLogin" backgroundColor="#3377FF"
|
||||
height="75rpx" width="500rpx" shape="round" fontColor="#ffffff">点击登陆</tn-button>
|
||||
</view>
|
||||
</tn-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
eventInfo,
|
||||
questionnaireFind,
|
||||
applicationAdd,
|
||||
questionnaireAdd,
|
||||
moneyLogAdd,
|
||||
wxphoneLogin
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showLogin: false,
|
||||
money: '',
|
||||
juanMod: false,
|
||||
rightMod: false,
|
||||
peiMod: false, //培训付费
|
||||
questionnaireList: [], //问卷列表
|
||||
button: [{
|
||||
text: '取消',
|
||||
backgroundColor: '#E6E6E6',
|
||||
fontColor: '#FFFFFF',
|
||||
shape: 'round'
|
||||
},
|
||||
{
|
||||
text: '确定',
|
||||
backgroundColor: 'tn-bg-indigo',
|
||||
fontColor: '#FFFFFF'
|
||||
}
|
||||
],
|
||||
form: {
|
||||
wenda: '',
|
||||
danxuan: '',
|
||||
hobby: [],
|
||||
},
|
||||
topCurrent: 0,
|
||||
id: 0,
|
||||
info: {
|
||||
list: []
|
||||
},
|
||||
apiImgUrl: this.$store.state.imgUrl
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.$wxshare({
|
||||
// url: 'http://ysh.0rui.cn/#/pages/index/event_info',
|
||||
// data: {
|
||||
// url: window.location.href.split("#")[0],
|
||||
// },
|
||||
// share_data: {
|
||||
// title: '河南省青年企业家协会开展走进开封市龙亭区暨产业考察交流活动',
|
||||
// desc: '河南省青年企业家协会开展走进开封市龙亭区暨产业考察交流活动',
|
||||
// imgUrl: 'http://ysh.0rui.cn/static/ser.png',
|
||||
// link: "http://ysh.0rui.cn/#/pages/index/event_info", // 分享链接,该链接域名或路径必须与当前页面对应的公众号 JS 安全域名一致
|
||||
// }
|
||||
// })
|
||||
// var id = this.$route.query.id;
|
||||
// this.id = id;
|
||||
// this.getEventInfo();
|
||||
},
|
||||
onShareAppMessage() { // 分享到微信好友
|
||||
// 更多参数配置,参考文档
|
||||
return {
|
||||
title: this.info.activity_name,
|
||||
path: '/pages/packageB/event/event_info?id=' + this.info.id + "&gid=" + store.state.Gid,
|
||||
imageUrl: this.apiImgUrl + this.info.activity_image,
|
||||
}
|
||||
},
|
||||
onShareTimeline() { // 分享到朋友圈
|
||||
return {
|
||||
title: this.info.activity_name,
|
||||
path: '/pages/packageB/event/event_info?id=' + this.info.id + "&gid=" + store.state.Gid,
|
||||
imageUrl: this.apiImgUrl + this.info.activity_image,
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(d) {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
console.log(d);
|
||||
this.id = d.id;
|
||||
if (typeof(d.gid) != 'undefined') {
|
||||
console.log(11111111);
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: d.gid
|
||||
})
|
||||
uni.setStorageSync('Gid', d.gid);
|
||||
}
|
||||
if (!uid) {
|
||||
getApp().getUserLogin((r) => {
|
||||
console.log('---Login---', r);
|
||||
})
|
||||
}
|
||||
this.getEventInfo();
|
||||
},
|
||||
methods: {
|
||||
PhoneLogin(d) {
|
||||
console.log(d);
|
||||
var openid = uni.getStorageSync('openid');
|
||||
wxphoneLogin({
|
||||
code: d.code,
|
||||
openid: openid
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '登陆成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
uni.setStorageSync('uid', res.data.id);
|
||||
uni.setStorageSync('userInfo', res.data);
|
||||
this.userInfo = res.data;
|
||||
this.showLogin = false;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '登陆失败!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
zhifuDo() {
|
||||
this.peiMod = false;
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (!uid) {
|
||||
this.showLogin = true;
|
||||
return;
|
||||
}
|
||||
applicationAdd({
|
||||
association_id: store.state.Gid,
|
||||
member_id: uid,
|
||||
activity_id: this.id,
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '报名成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
|
||||
},
|
||||
juanzhuDo() {
|
||||
this.juanMod = false;
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (!uid) {
|
||||
this.showLogin = true;
|
||||
return;
|
||||
}
|
||||
moneyLogAdd({
|
||||
association_id: store.state.Gid,
|
||||
member_id: uid,
|
||||
activity_id: this.id,
|
||||
money: this.money
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '捐助成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
option_add() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (!uid) {
|
||||
this.showLogin = true;
|
||||
return;
|
||||
}
|
||||
var that = this;
|
||||
var uid = uni.getStorageSync('uid');
|
||||
var key = this.questionnaireList.map((item, index) => {
|
||||
if (!('topic' in item)) {
|
||||
return '';
|
||||
} else {
|
||||
return {
|
||||
activity_id: that.id,
|
||||
topic_id: item.id,
|
||||
member_id: uid,
|
||||
option: Array.isArray(item.topic) ? item.topic.join(',') : item.topic,
|
||||
}
|
||||
}
|
||||
});
|
||||
for (var i = 0; i < key.length; i++) {
|
||||
if (key[i] == '') {
|
||||
uni.showToast({
|
||||
title: '请填写第[' + (i + 1) + ']个问题',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
questionnaireAdd({
|
||||
option: JSON.stringify(key),
|
||||
activity_id: this.id,
|
||||
member_id: uid,
|
||||
association_id: store.state.Gid,
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
application_add() {
|
||||
var uid = uni.getStorageSync('uid');
|
||||
if (!uid) {
|
||||
this.showLogin = true;
|
||||
return;
|
||||
}
|
||||
applicationAdd({
|
||||
association_id: store.state.Gid,
|
||||
member_id: uid,
|
||||
activity_id: this.id,
|
||||
//application_time: new Date().toISOString().slice(0, 19).replace('T', ' ')
|
||||
})
|
||||
.then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: '报名成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getEventInfo() {
|
||||
eventInfo({
|
||||
association_id: store.state.Gid,
|
||||
id: this.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
if (key.activity_content.indexOf("<img") != -1) {
|
||||
key.activity_content = getApp().addWidthToImages(key.activity_content);
|
||||
}
|
||||
this.info = key;
|
||||
if (this.info.activity_type == 2) {
|
||||
this.getEventOption()
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
getEventOption() {
|
||||
questionnaireFind({
|
||||
activity_id: this.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.questionnaireList = res.data;
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
uni.showToast({
|
||||
title: error,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
},
|
||||
openUrl(url) {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.mmy {
|
||||
background-color: #F73909;
|
||||
border-radius: 30px;
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
color: #FFF;
|
||||
line-height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
</style>
|
||||
127
pages/packageB/news/new_info.vue
Normal file
@ -0,0 +1,127 @@
|
||||
<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 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 style="padding: 30rpx;">
|
||||
<view style="text-align: center;font-size:40rpx;font-weight: 600">{{info.news_title}}</view>
|
||||
<view style="margin-top: 30rpx;color: #999;">
|
||||
<text>时间:{{info.showtime}}</text>
|
||||
<text style="margin-left: 20rpx;">来源:{{info.news_source}}</text>
|
||||
</view>
|
||||
<view style="width: 100%;height: 2rpx;background-color: #eee;margin-top: 30rpx;"></view>
|
||||
<view>
|
||||
<!-- <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 class="ks_html" style="line-height: 50rpx;margin-top: 20rpx;">
|
||||
<div v-html="info.news_content"></div>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
newsInfo,
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
id: 0,
|
||||
info: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
}
|
||||
},
|
||||
// mounted() {
|
||||
// var id = window.location.href.split("=")[1];
|
||||
// this.id = id;
|
||||
// this.getNewsInfo();
|
||||
// },
|
||||
onLoad(d) {
|
||||
console.log(d);
|
||||
this.id = d.id;
|
||||
if (typeof(d.gid) != 'undefined') {
|
||||
store.commit('$tStore', {
|
||||
name: 'Gid',
|
||||
value: d.gid
|
||||
})
|
||||
uni.setStorageSync('Gid', d.gid);
|
||||
}
|
||||
this.getNewsInfo();
|
||||
},
|
||||
onShareAppMessage() { // 分享到微信好友
|
||||
// 更多参数配置,参考文档
|
||||
return {
|
||||
title: this.info.news_title,
|
||||
path: '/pages/packageB/news/new_info?id=' + this.info.news_id + '&gid=' + this.info.association_id,
|
||||
imageUrl: this.apiImgUrl + this.info.news_image,
|
||||
}
|
||||
},
|
||||
onShareTimeline() { // 分享到朋友圈
|
||||
return {
|
||||
title: this.info.news_title,
|
||||
path: '/pages/packageB/news/new_info?id=' + this.info.news_id + '&gid=' + this.info.association_id,
|
||||
imageUrl: this.apiImgUrl + this.info.news_image,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getNewsInfo() {
|
||||
newsInfo({
|
||||
association_id: store.state.Gid,
|
||||
news_id: this.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
if (key.news_content.indexOf("<img") != -1) {
|
||||
key.news_content = getApp().addWidthToImages(key.news_content);
|
||||
}
|
||||
this.info = key;
|
||||
}
|
||||
})
|
||||
.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>
|
||||
116
pages/packageB/news/notice_info.vue
Normal file
@ -0,0 +1,116 @@
|
||||
<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 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 style="padding: 30rpx;">
|
||||
<view style="text-align: center;font-size:40rpx;font-weight: 600">{{info.notice_title}}</view>
|
||||
<view style="margin-top: 30rpx;color: #999;">
|
||||
<text>时间:{{info.createtime}}</text>
|
||||
</view>
|
||||
<view style="width: 100%;height: 2rpx;background-color: #eee;margin-top: 30rpx;"></view>
|
||||
<view>
|
||||
<!-- <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 class="ks_html" style="line-height: 50rpx;margin-top: 20rpx;">
|
||||
<div v-html="info.notice_content"></div>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getNoticeInfo,
|
||||
} from '@/util/api.js';
|
||||
import store from '@/store/index.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
topCurrent: 0,
|
||||
id: 0,
|
||||
info: {},
|
||||
apiImgUrl: this.$store.state.imgUrl,
|
||||
}
|
||||
},
|
||||
// mounted() {
|
||||
// var id = window.location.href.split("=")[1];
|
||||
// this.id = id;
|
||||
// this.getNewsInfo();
|
||||
// },
|
||||
onLoad(d) {
|
||||
console.log(d);
|
||||
this.id = d.id;
|
||||
this.getNewsInfo();
|
||||
},
|
||||
onShareAppMessage() { // 分享到微信好友
|
||||
// 更多参数配置,参考文档
|
||||
return {
|
||||
title: this.info.notice_title,
|
||||
path: '/pages/packageB/news/notice_info?id=' + this.info.id,
|
||||
}
|
||||
},
|
||||
onShareTimeline() { // 分享到朋友圈
|
||||
return {
|
||||
title: this.info.notice_title,
|
||||
path: '/pages/packageB/news/notice_info?id=' + this.info.id,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getNewsInfo() {
|
||||
getNoticeInfo({
|
||||
id: this.id
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
var key = res.data;
|
||||
if (key.notice_content.indexOf("<img") != -1) {
|
||||
key.notice_content = getApp().addWidthToImages(key.notice_content);
|
||||
}
|
||||
this.info = key;
|
||||
}
|
||||
})
|
||||
.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>
|
||||
BIN
static/01.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
static/01_1.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
static/02.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
static/02_2.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/03.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/03_3.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
static/04.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/04_4.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
static/ask_dai.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
static/ask_no.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
static/ask_ok.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
static/b1.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
static/book.png
Normal file
|
After Width: | Height: | Size: 727 B |
BIN
static/c1.png
Normal file
|
After Width: | Height: | Size: 523 B |
BIN
static/c1455.png
Normal file
|
After Width: | Height: | Size: 547 B |
BIN
static/c2.png
Normal file
|
After Width: | Height: | Size: 630 B |
BIN
static/c3.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
193
static/css/components/demo_page_common.scss
Normal file
@ -0,0 +1,193 @@
|
||||
/* 顶部 start */
|
||||
.header {
|
||||
padding: 80rpx 60rpx 40rpx 60rpx;
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
color: $tn-font-color;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sub-title {
|
||||
font-size: 28rpx;
|
||||
color: $tn-content-color;
|
||||
padding-top: 18rpx;
|
||||
}
|
||||
|
||||
.tips-title {
|
||||
font-size: 24rpx;
|
||||
color: $tn-font-sub-color;
|
||||
padding-top: 5rpx;
|
||||
}
|
||||
}
|
||||
/* 顶部 end */
|
||||
|
||||
/* 展示内容容器 start */
|
||||
.show-content-container {
|
||||
|
||||
/* 标题容器 start */
|
||||
.title-container {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 100rpx;
|
||||
|
||||
// 标题样式
|
||||
.title {
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0 20rpx;
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
// 标题前面小点
|
||||
&:before {
|
||||
content: " ";
|
||||
background-color: $tn-main-color;
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-right: 18rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 标题容器 end */
|
||||
|
||||
/* 内容 start */
|
||||
.content {
|
||||
padding: 20rpx;
|
||||
}
|
||||
/* 内容 end */
|
||||
|
||||
}
|
||||
/* 展示内容容器 end */
|
||||
|
||||
/* 内容容器 start */
|
||||
.demo-content-container {
|
||||
border: 1rpx dashed $tn-main-color;
|
||||
margin: 20rpx;
|
||||
margin-top: 0rpx;
|
||||
|
||||
position: fixed;
|
||||
width: 95%;
|
||||
z-index: 10;
|
||||
|
||||
transition: all 0.15s ease-out;
|
||||
|
||||
&.top {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
&.no-fixed {
|
||||
position: relative !important;
|
||||
}
|
||||
|
||||
/* 标题容器 start */
|
||||
.title-container {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100rpx;
|
||||
|
||||
// 标题样式
|
||||
.title {
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
/* 标题容器 end */
|
||||
|
||||
/* 内容 start */
|
||||
.content {
|
||||
padding: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
/* 内容 end */
|
||||
|
||||
}
|
||||
/* 内容容器 end */
|
||||
|
||||
/* 可选项内容容器 start */
|
||||
.demo-section-container {
|
||||
margin: 20rpx;
|
||||
height: 100%;
|
||||
|
||||
/* 标题容器 start */
|
||||
.title-container {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
// 标题样式
|
||||
.title {
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
margin: 0 30rpx;
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&::after {
|
||||
content: " ";
|
||||
box-sizing: border-box;
|
||||
width: 90%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-bottom: 1rpx solid $tn-border-solid-color;
|
||||
}
|
||||
}
|
||||
/* 标题容器 end */
|
||||
|
||||
/* 参数内容 start*/
|
||||
.content {
|
||||
padding: 0 20rpx 10rpx 20rpx;
|
||||
|
||||
// 标题样式
|
||||
.title {
|
||||
padding-left: 20rpx;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 4rpx;
|
||||
height: 90%;
|
||||
background-color: $tn-main-color;
|
||||
border-radius: 6rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
// 参数样式
|
||||
.section {
|
||||
margin-top: 15rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
/* 参数内容 end*/
|
||||
|
||||
}
|
||||
/* 可选项内容容器 end */
|
||||
241
static/css/my.scss
Normal file
@ -0,0 +1,241 @@
|
||||
.pages-a {
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
/* 自定义导航栏内容 start */
|
||||
.custom-nav {
|
||||
height: 100%;
|
||||
|
||||
&__back {
|
||||
margin: auto 5rpx;
|
||||
font-size: 50rpx;
|
||||
margin-right: 10rpx;
|
||||
margin-left: 30rpx;
|
||||
flex-basis: 5%;
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部安全边距 start*/
|
||||
.tn-tabbar-height {
|
||||
min-height: 120rpx;
|
||||
height: calc(140rpx + env(safe-area-inset-bottom) / 2);
|
||||
height: calc(140rpx + constant(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* 图标容器5 start */
|
||||
.icon5 {
|
||||
&__item {
|
||||
// width: 30%;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
padding: 0rpx;
|
||||
margin: 0rpx;
|
||||
transform: scale(1);
|
||||
transition: transform 0.3s linear;
|
||||
transform-origin: center center;
|
||||
|
||||
&--icon {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 18rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 轮播视觉差 start */
|
||||
.card-swiper {
|
||||
height: 450rpx;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item {
|
||||
width: 750rpx;
|
||||
left: 0rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 40rpx 30rpx 30rpx 30rpx;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100%;
|
||||
border-radius: 15rpx;
|
||||
transform: scale(1);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
will-change: transform;
|
||||
// overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item {
|
||||
transform: none;
|
||||
transition: all 0.2s ease-in 0s;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item-text {
|
||||
margin-top: -220rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
display: block;
|
||||
border-radius: 10rpx;
|
||||
transform: translate(100rpx, 0rpx) scale(0.9, 0.9);
|
||||
transition: all 0.6s ease 0s;
|
||||
will-change: transform;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item-text {
|
||||
margin-top: -220rpx;
|
||||
width: 100%;
|
||||
transform: translate(0rpx, 0rpx) scale(0.9, 0.9);
|
||||
transition: all 0.6s ease 0s;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.image-banner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.image-banner image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 轮播指示点 start*/
|
||||
.indication {
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.spot {
|
||||
background-color: #FFFFFF;
|
||||
opacity: 0.6;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
top: -70rpx;
|
||||
margin: 0 8rpx !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.spot.active {
|
||||
opacity: 1;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
background-color: rgb(217, 217, 217);
|
||||
}
|
||||
|
||||
|
||||
/* 胶囊banner*/
|
||||
.image-capsule {
|
||||
padding: 100rpx 0rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 300;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-piccapsule {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
// background-attachment:fixed;
|
||||
background-position: top;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
|
||||
/* 用户头像 start */
|
||||
.logo-image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
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.15);
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
// background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
/* 瀑布流*/
|
||||
.wallpaper__item {
|
||||
background-color: #FFFFFF;
|
||||
overflow: hidden;
|
||||
margin: 0 10rpx;
|
||||
margin-bottom: 40rpx;
|
||||
// box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
|
||||
|
||||
.item {
|
||||
|
||||
/* 图片 start */
|
||||
&__image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
background-color: #FFFFFF;
|
||||
border: 1rpx solid #F8F7F8;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 图片 end */
|
||||
|
||||
/* 内容 start */
|
||||
&__data {
|
||||
padding: 14rpx 0rpx;
|
||||
}
|
||||
|
||||
/* 标题 start */
|
||||
&__title-container {
|
||||
text-align: justify;
|
||||
line-height: 38rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
/* 标题 end */
|
||||
|
||||
/* 标签 start */
|
||||
&__tags-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
&__tag {
|
||||
margin: 10rpx;
|
||||
color: #7C8191;
|
||||
background-color: #F3F2F7;
|
||||
padding: 4rpx 14rpx 6rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 20rpx;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0rpx !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 标签 end */
|
||||
|
||||
/* 内容 end */
|
||||
}
|
||||
}
|
||||
38
static/css/templatePage/custom_nav_bar.scss
Normal file
@ -0,0 +1,38 @@
|
||||
.tn-custom-nav-bar__back {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 1000rpx;
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.5);
|
||||
color: #FFFFFF;
|
||||
font-size: 18px;
|
||||
|
||||
.icon {
|
||||
display: block;
|
||||
flex: 1;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: " ";
|
||||
width: 1rpx;
|
||||
height: 110%;
|
||||
position: absolute;
|
||||
top: 22.5%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
transform: scale(0.5);
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
box-sizing: border-box;
|
||||
opacity: 0.7;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
BIN
static/da.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
static/def.png
Normal file
|
After Width: | Height: | Size: 6.7 KiB |
BIN
static/h1.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/h2.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/h3.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
static/h4.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
static/h_back.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
static/hqzc.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/ico1.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
static/ico10.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
static/ico11.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
static/ico12.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
static/ico13.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/ico16.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
static/ico2.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
static/ico3.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
static/ico4.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/ico5.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
static/ico6.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
static/ico8.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
static/ico9.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
static/icon100.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/icon13.png
Normal file
|
After Width: | Height: | Size: 1000 B |
BIN
static/icon14.png
Normal file
|
After Width: | Height: | Size: 607 B |
BIN
static/icon15.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
static/jj.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
static/notice_icon.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
static/pic.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |