会员权益
This commit is contained in:
969
pages/component/member/apply.vue
Normal file
969
pages/component/member/apply.vue
Normal file
@@ -0,0 +1,969 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 组件-申请入会 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="component-member-apply" :style="{'--theme-color': themeColor}">
|
||||
<!-- 表单数据 -->
|
||||
<form class="component-member-apply-form">
|
||||
<view class="component-member-apply-form-item" v-for="(item, index) in applyField" :key="index" v-if="!isApply || item.apply_show != 2">
|
||||
<!-- 标题 -->
|
||||
<view class="item-title">
|
||||
<text class="required" v-if="item.required == 1">*</text>
|
||||
<text class="text">{{item.label}}</text>
|
||||
<text class="tips" v-if="item.type == 'image' || item.type == 'cert' || item.type == 'video' || item.type == 'file'">({{item.option}})</text>
|
||||
</view>
|
||||
<!-- 文本字段 -->
|
||||
<block v-if="item.type == 'text'">
|
||||
<!-- 地址选择 -->
|
||||
<view class="item-input" @click="chooseLocation(index)" v-if="showType == 1 && item.field == 'address'">
|
||||
<view class="input text-ellipsis" v-if="item.value.address">{{item.value.address}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>请选择{{item.label}}</view>
|
||||
<image class="icon" src="/static/del.png" mode="aspectFit" v-if="item.value.address" @click.stop="clearLocation(index)"></image>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit" v-else></image>
|
||||
</view>
|
||||
<!-- 文本框 -->
|
||||
<view class="item-input" :class="{disabled: item.disabled}" v-else>
|
||||
<input class="input" :disabled="item.disabled" type="text" v-model="item.value" :placeholder="item.option" placeholder-class="placeholder" />
|
||||
</view>
|
||||
</block>
|
||||
<!-- 数字字段 -->
|
||||
<block v-else-if="item.type == 'number'">
|
||||
<view class="item-input" :class="{disabled: item.disabled}">
|
||||
<input class="input" :disabled="item.disabled" type="number" :maxlength="(showType == 1 && item.field == 'mobile') ? 11 : -1" v-model="item.value" :placeholder="item.option" placeholder-class="placeholder" />
|
||||
</view>
|
||||
<view class="item-switch" @click="changeMobileAuth()" v-if="showType == 1 && item.field == 'mobile' && mobileAuth">
|
||||
<view class="switch-label">手机号是否对外</view>
|
||||
<view class="switch-box" :class="{'select': mobileAuth == 1}">
|
||||
<view class="round"></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 单选按钮 -->
|
||||
<block v-else-if="item.type == 'radio'">
|
||||
<view class="item-radio">
|
||||
<view class="radio" :class="{active: item.value == option}" v-for="(option, num) in getOption(item.option)" :key="num" @click="selectRadio(index, option)">
|
||||
<image src="/static/select.png" mode="aspectFit"></image>
|
||||
<text>{{option}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 复选按钮 -->
|
||||
<block v-else-if="item.type == 'checkbox'">
|
||||
<view class="item-radio">
|
||||
<view class="radio" :class="{active: item.value.includes(option)}" v-for="(option, num) in getOption(item.option)" :key="num" @click="selectCheckbox(index, option)">
|
||||
<image src="/static/select.png" mode="aspectFit"></image>
|
||||
<text>{{option}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 下拉列表 -->
|
||||
<block v-else-if="item.type == 'select'">
|
||||
<!-- 会员级别 -->
|
||||
<view class="item-input" :class="{disabled: item.disabled}" @click="openSelectPicker(index)" v-if="showType == 1 && item.field == 'member_level_id'">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{getMemberLevelName(item.value)}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>请选择{{item.label}}</view>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit" v-if="!item.disabled"></image>
|
||||
</view>
|
||||
<!-- 行业分类 -->
|
||||
<view class="item-input" @click="openSelectPicker(index)" v-else-if="showType == 1 && item.field == 'industry_category_id'">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{getIndustryName(item.value)}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>请选择{{item.label}}</view>
|
||||
<image class="icon" src="/static/del.png" mode="aspectFit" v-if="item.value" @click.stop="clearValue(index)"></image>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit" v-else></image>
|
||||
</view>
|
||||
<!-- 籍贯 -->
|
||||
<view class="item-input" @click="openSelectPicker(index)" v-else-if="showType == 1 && item.field == 'native_place'">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{item.value}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>{{item.option}}</view>
|
||||
<image class="icon" src="/static/del.png" mode="aspectFit" v-if="item.value" @click.stop="clearValue(index)"></image>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit" v-else></image>
|
||||
</view>
|
||||
<!-- 下拉列表 -->
|
||||
<view class="item-input" @click="openSelectPicker(index)" v-else>
|
||||
<view class="input text-ellipsis" v-if="item.value">{{item.value}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>请选择{{item.label}}</view>
|
||||
<image class="icon" src="/static/del.png" mode="aspectFit" v-if="item.value" @click.stop="clearValue(index)"></image>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit" v-else></image>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 日期字段 -->
|
||||
<block v-else-if="item.type == 'date'">
|
||||
<view class="item-input" @click="openDatePicker(index)">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{item.value}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>请选择{{item.label}}</view>
|
||||
<image class="icon" src="/static/del.png" mode="aspectFit" v-if="item.value" @click.stop="clearValue(index)"></image>
|
||||
<image class="icon" src="/static/date.png" mode="aspectFit" v-else></image>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 时间字段 -->
|
||||
<block v-else-if="item.type == 'time'">
|
||||
<view class="item-input" @click="openTimePicker(index)">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{item.value}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>请选择{{item.label}}</view>
|
||||
<image class="icon" src="/static/del.png" mode="aspectFit" v-if="item.value" @click.stop="clearValue(index)"></image>
|
||||
<image class="icon" src="/static/time.png" mode="aspectFit" v-else></image>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 日期时间 -->
|
||||
<block v-else-if="item.type == 'datetime'">
|
||||
<uni-datetime-picker v-model="item.value">
|
||||
<view class="item-input">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{item.value}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>请选择{{item.label}}</view>
|
||||
<image class="icon" src="/static/del.png" mode="aspectFit" v-if="item.value" @click.stop="clearValue(index)"></image>
|
||||
<image class="icon" src="/static/date.png" mode="aspectFit" v-else></image>
|
||||
</view>
|
||||
</uni-datetime-picker>
|
||||
</block>
|
||||
<!-- 文本域 -->
|
||||
<block v-else-if="item.type == 'textarea'">
|
||||
<view class="item-input" @click="toEditor(index)" v-if="showType == 1 && item.field == 'introduce_content'">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{getEditorText(item.value) || ('编辑' + item.label)}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>{{item.option}}</view>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item-input" @click="toEditor(index)" v-else-if="showType == 2 && item.field == 'company_introduction'">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{getEditorText(item.value) || ('编辑' + item.label)}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>{{item.option}}</view>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item-input" @click="toEditor(index)" v-else-if="showType == 3 && item.field == 'organize_introduction'">
|
||||
<view class="input text-ellipsis" v-if="item.value">{{getEditorText(item.value) || ('编辑' + item.label)}}</view>
|
||||
<view class="input placeholder text-ellipsis" v-else>{{item.option}}</view>
|
||||
<image class="icon" src="/static/right.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="item-input" v-else>
|
||||
<textarea class="textarea" type="text" maxlength="-1" v-model="item.value" :placeholder="item.option" placeholder-class="placeholder" />
|
||||
</view>
|
||||
</block>
|
||||
<!-- 证书上传 -->
|
||||
<block v-else-if="item.type == 'cert'">
|
||||
<view class="item-input">
|
||||
<input class="input" type="text" v-model="item.value.name" placeholder="请输入姓名" placeholder-class="placeholder" />
|
||||
</view>
|
||||
<view class="item-input">
|
||||
<input class="input" type="text" v-model="item.value.number" placeholder="请输入证书编号" placeholder-class="placeholder" />
|
||||
</view>
|
||||
<view class="item-upload">
|
||||
<view class="upload-image" v-if="item.value.image" @click="previewImage(index)">
|
||||
<image class="image-select" :src="item.value.image" mode="aspectFill"></image>
|
||||
<image class="image-delete" src="/static/delete.png" mode="aspectFit" @click.stop="deleteImage(index)"></image>
|
||||
</view>
|
||||
<view class="upload-image" v-else @click="chooseImage(index, 1)">
|
||||
<view class="image-background"></view>
|
||||
<view class="image-choose">
|
||||
<view class="icon">
|
||||
<image src="/static/camera.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="text">上传证书</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 图片上传 -->
|
||||
<block v-else-if="item.type == 'image'">
|
||||
<!-- 单图上传 -->
|
||||
<view class="item-upload" v-if="(showType == 1 && item.field == 'avatar') || (showType == 2 && item.field == 'company_logo') || (showType == 3 && item.field == 'organize_logo')">
|
||||
<view class="upload-image" v-if="item.value" @click="previewImage(index)">
|
||||
<image class="image-select" :src="item.value" mode="aspectFill"></image>
|
||||
<image class="image-delete" src="/static/delete.png" mode="aspectFit" @click.stop="deleteImage(index)"></image>
|
||||
</view>
|
||||
<view class="upload-image" v-else @click="chooseImage(index, 1)">
|
||||
<view class="image-background"></view>
|
||||
<view class="image-choose">
|
||||
<view class="icon">
|
||||
<image src="/static/camera.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="text">点击上传</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 多图上传 -->
|
||||
<view class="item-upload" v-else>
|
||||
<view class="upload-image" v-if="item.value && item.value.length > 0" v-for="(img, num) in item.value" :key="num" @click="previewImage(index, num)">
|
||||
<image class="image-select" :src="img" mode="aspectFill"></image>
|
||||
<image class="image-delete" src="/static/delete.png" mode="aspectFit" @click.stop="deleteImage(index, num)"></image>
|
||||
</view>
|
||||
<view class="upload-image" v-if="!item.value || item.value.length < 9" @click="chooseImage(index, 9)">
|
||||
<view class="image-background"></view>
|
||||
<view class="image-choose">
|
||||
<view class="icon">
|
||||
<image src="/static/camera.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="text">上传图片</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 视频上传 -->
|
||||
<block v-else-if="item.type == 'video'">
|
||||
<view class="item-upload">
|
||||
<view class="upload-image" v-if="item.value">
|
||||
<view class="image-video">
|
||||
<image class="video" src="/static/video.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<image class="image-delete" src="/static/delete.png" mode="aspectFit" @click="deleteVideo(index)"></image>
|
||||
</view>
|
||||
<view class="upload-image" v-else @click="chooseVideo(index)">
|
||||
<view class="image-background"></view>
|
||||
<view class="image-choose">
|
||||
<view class="icon">
|
||||
<image src="/static/camera.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="text">上传视频</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<!-- 文件上传 -->
|
||||
<block v-else-if="item.type == 'file'">
|
||||
<view class="item-files">
|
||||
<view class="files-upload flex align-items-center" v-if="!item.value || item.value.length < 9" @click="chooseFiles(index)">
|
||||
<view class="upload-icon" :style="{'background-image': 'url('+ iconUpload +')'}" v-if="iconUpload"></view>
|
||||
<view class="upload-info flex-item">
|
||||
<view class="info-title">点击上传</view>
|
||||
<view class="info-tips" v-if="item.value.length">已上传{{item.value.length}}/9,每个附件大小不能超过10M</view>
|
||||
<view class="info-tips" v-else>可上传9个,每个附件大小不能超过10M</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="files-list" v-if="item.value && item.value.length > 0">
|
||||
<view class="list-item flex align-items-center" v-for="(file, num) in item.value" :key="num">
|
||||
<view class="item-name flex-item">{{file.name}}</view>
|
||||
<image class="item-delete" src="/static/delete.png" mode="aspectFit" @click="deleteFiles(index, num)"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</form>
|
||||
<!-- 单项选择框 -->
|
||||
<select-picker ref="selectPicker" :title="selectTitle" @onChange="pageChange" @confirm="changeSelectPicker"></select-picker>
|
||||
<!-- 省市区选择框 -->
|
||||
<address-picker ref="addressPicker" @onChange="pageChange" @confirm="changeSelectPicker"></address-picker>
|
||||
<!-- 日期选择框 -->
|
||||
<date-picker ref="datePicker" @onChange="pageChange" @confirm="changeDatePicker"></date-picker>
|
||||
<!-- 时间选择框 -->
|
||||
<time-picker ref="timePicker" @onChange="pageChange" @confirm="changeTimePicker"></time-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
import selectPicker from "@/pages/component/picker/select.vue"
|
||||
import addressPicker from "@/pages/component/picker/address.vue"
|
||||
import datePicker from "@/pages/component/picker/date.vue"
|
||||
import timePicker from "@/pages/component/picker/time.vue"
|
||||
import svgData from "@/common/svg.js"
|
||||
export default {
|
||||
name: "memberApply",
|
||||
props: ["isApply", "showData", "showType", "mobileAuth"],
|
||||
components: {
|
||||
selectPicker,
|
||||
addressPicker,
|
||||
datePicker,
|
||||
timePicker,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 入会字段
|
||||
applyField: [],
|
||||
// 会员级别
|
||||
levelList: [],
|
||||
// 行业分类
|
||||
industryList: [],
|
||||
// 单选标题
|
||||
selectTitle: "",
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
showData: {
|
||||
handler(value) {
|
||||
this.applyField = value || [];
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor,
|
||||
iconUpload: state => {
|
||||
return svgData.svgToUrl("upload", state.app.themeColor)
|
||||
}
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
if (this.showType == 1) {
|
||||
this.getIndustry()
|
||||
this.getMemberLevel()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 改变页面滚动状态
|
||||
pageChange(state) {
|
||||
this.$emit("onChange", state)
|
||||
},
|
||||
// 获取选项数据
|
||||
getOption(option) {
|
||||
return option.split(",")
|
||||
},
|
||||
// 获取会员级别
|
||||
getMemberLevel(fn) {
|
||||
this.$util.request("member.level").then(res => {
|
||||
if (res.code == 1) {
|
||||
this.levelList = res.data
|
||||
if (fn) fn()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取会员级别 ', error)
|
||||
})
|
||||
},
|
||||
// 获取行业分类
|
||||
getIndustry(fn) {
|
||||
this.$util.request("member.industry").then(res => {
|
||||
if (res.code == 1) {
|
||||
this.industryList = res.data
|
||||
if (fn) fn()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取行业分类 ', error)
|
||||
})
|
||||
},
|
||||
// 获取会员级别名称
|
||||
getMemberLevelName(id) {
|
||||
for (let i in this.levelList) {
|
||||
if (this.levelList[i].id == id) return this.levelList[i].name
|
||||
}
|
||||
},
|
||||
// 获取行业分类
|
||||
getIndustryName(id) {
|
||||
for (let i in this.industryList) {
|
||||
if (this.industryList[i].id == id) return this.industryList[i].name
|
||||
}
|
||||
},
|
||||
// 选择单选
|
||||
selectRadio(index, option) {
|
||||
if (this.applyField[index].value == option) {
|
||||
this.applyField[index].value = ""
|
||||
} else {
|
||||
this.applyField[index].value = option
|
||||
}
|
||||
},
|
||||
// 选择复选
|
||||
selectCheckbox(index, option) {
|
||||
if (this.applyField[index].value.includes(option)) {
|
||||
this.$delete(this.applyField[index].value, this.applyField[index].value.indexOf(option))
|
||||
} else {
|
||||
this.applyField[index].value.push(option)
|
||||
}
|
||||
},
|
||||
// 选择图片
|
||||
chooseImage(index, limit = 9) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.chooseMedia({
|
||||
count: Number(limit) > 1 ? (limit - this.applyField[index].value.length) : 1,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album', 'camera'],
|
||||
sizeType: ['compressed'],
|
||||
success: (res) => {
|
||||
let list = res.tempFiles.map(item => item.tempFilePath)
|
||||
if ((this.showType == 1 && this.applyField[index].field == "avatar") || (this.showType == 2 && this.applyField[index].field == 'company_logo') || (this.showType == 3 && this.applyField[index].field == 'organize_logo')) {
|
||||
this.applyField[index].value = list[0]
|
||||
} else if (this.applyField[index].type == "cert") {
|
||||
this.applyField[index].value.image = list[0]
|
||||
} else {
|
||||
this.applyField[index].value = [...this.applyField[index].value, ...list]
|
||||
}
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.chooseImage({
|
||||
count: Number(limit) > 1 ? (limit - this.applyField[index].value.length) : 1,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album', 'camera'],
|
||||
sizeType: ['compressed'],
|
||||
success: (res) => {
|
||||
let list = res.tempFilePaths
|
||||
if ((this.showType == 1 && this.applyField[index].field == "avatar") || (this.showType == 2 && this.applyField[index].field == 'company_logo') || (this.showType == 3 && this.applyField[index].field == 'organize_logo')) {
|
||||
this.applyField[index].value = list[0]
|
||||
} else if (this.applyField[index].type == "cert") {
|
||||
this.applyField[index].value.image = list[0]
|
||||
} else {
|
||||
this.applyField[index].value = [...this.applyField[index].value, ...list]
|
||||
}
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 删除图片
|
||||
deleteImage(i, j) {
|
||||
if ((this.showType == 1 && this.applyField[i].field == "avatar") || (this.showType == 2 && this.applyField[i].field == 'company_logo') || (this.showType == 3 && this.applyField[i].field == 'organize_logo')) {
|
||||
this.applyField[i].value = ""
|
||||
} else if (this.applyField[i].type == "cert") {
|
||||
this.applyField[i].value.image = ""
|
||||
} else {
|
||||
this.$delete(this.applyField[i].value, j)
|
||||
}
|
||||
},
|
||||
// 预览图片
|
||||
previewImage(i, j = 0) {
|
||||
let list = []
|
||||
if ((this.showType == 1 && this.applyField[i].field == "avatar") || (this.showType == 2 && this.applyField[i].field == 'company_logo') || (this.showType == 3 && this.applyField[i].field == 'organize_logo')) {
|
||||
list = [this.applyField[i].value]
|
||||
} else if (this.applyField[i].type == "cert") {
|
||||
list = [this.applyField[i].value.image]
|
||||
} else {
|
||||
list = this.applyField[i].value
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: list,
|
||||
current: j
|
||||
});
|
||||
},
|
||||
// 选择视频
|
||||
chooseVideo(index) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ['video'],
|
||||
sourceType: ['album', 'camera'],
|
||||
camera: 'back',
|
||||
success: (res) => {
|
||||
this.applyField[index].value = res.tempFiles[0].tempFilePath
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
uni.chooseVideo({
|
||||
sourceType: ['camera', 'album'],
|
||||
success: (res) => {
|
||||
this.applyField[index].value = res.tempFilePath;
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 删除视频
|
||||
deleteVideo(index) {
|
||||
this.applyField[index].value = ""
|
||||
},
|
||||
// 选择文件
|
||||
chooseFiles(index) {
|
||||
// #ifdef MP-WEIXIN
|
||||
wx.chooseMessageFile({
|
||||
count: 9 - this.applyField[index].value.length,
|
||||
type: 'file',
|
||||
extension: ['.pdf', '.doc', '.docx', '.xls', '.xlsx'],
|
||||
success: (res) => {
|
||||
let list = []
|
||||
let exceed = []
|
||||
res.tempFiles.forEach(item => {
|
||||
if (parseFloat(item.size / 1024) <= 10240) {
|
||||
list.push({
|
||||
name: item.name,
|
||||
path: item.path,
|
||||
})
|
||||
} else {
|
||||
exceed.push(item.name)
|
||||
}
|
||||
})
|
||||
if (exceed.length) {
|
||||
uni.showToast({
|
||||
icon: "none",
|
||||
title: exceed.join("、") + "超过10M",
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
this.applyField[index].value = [...this.applyField[index].value, ...list]
|
||||
}
|
||||
})
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
let extensionLimit = ['.pdf', '.doc', '.docx', '.xls', '.xlsx']
|
||||
uni.chooseFile({
|
||||
count: 9 - this.applyField[index].value.length,
|
||||
type: "all",
|
||||
extension: extensionLimit,
|
||||
success: (res) => {
|
||||
let list = []
|
||||
let typeError = []
|
||||
let exceed = []
|
||||
res.tempFiles.forEach(item => {
|
||||
let extension = item.name.split('.')
|
||||
extension = extension[extension.length - 1]
|
||||
if (!extensionLimit.includes('.' + extension)) {
|
||||
typeError.push(item.name)
|
||||
} else if (parseFloat(item.size / 1024) <= 10240) {
|
||||
list.push({
|
||||
name: item.name,
|
||||
path: item.path,
|
||||
})
|
||||
} else {
|
||||
exceed.push(item.name)
|
||||
}
|
||||
})
|
||||
if (typeError.length) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: typeError.join("、") + "文件类型错误,请选择pdf、doc、docx、xls、xlsx格式文件",
|
||||
showCancel: false,
|
||||
confirmColor: this.themeColor,
|
||||
confirmText: "我知道了"
|
||||
})
|
||||
} else if (exceed.length) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: exceed.join("、") + "超过10M",
|
||||
showCancel: false,
|
||||
confirmColor: this.themeColor,
|
||||
confirmText: "我知道了"
|
||||
})
|
||||
} else this.applyField[index].value = [...this.applyField[index].value, ...list]
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 删除文件
|
||||
deleteFiles(i, j) {
|
||||
this.$delete(this.applyField[i].value, j)
|
||||
},
|
||||
// 选择下拉选项
|
||||
openSelectPicker(index) {
|
||||
if (this.applyField[index].disabled) return
|
||||
this.selectTitle = this.applyField[index].label
|
||||
if (this.showType == 1 && this.applyField[index].field == "member_level_id") {
|
||||
if (this.levelList.length) this.$refs.selectPicker.open(this.levelList, this.applyField[index].value, index)
|
||||
else {
|
||||
this.getMemberLevel(() => {
|
||||
this.$refs.selectPicker.open(this.levelList, this.applyField[index].value, index)
|
||||
})
|
||||
}
|
||||
} else if (this.showType == 1 && this.applyField[index].field == "industry_category_id") {
|
||||
if (this.industryList.length) this.$refs.selectPicker.open(this.industryList, this.applyField[index].value, index)
|
||||
else {
|
||||
this.getIndustry(() => {
|
||||
this.$refs.selectPicker.open(this.industryList, this.applyField[index].value, index)
|
||||
})
|
||||
}
|
||||
} else if (this.showType == 1 && this.applyField[index].field == "native_place") {
|
||||
this.$refs.addressPicker.open(this.applyField[index].value, index)
|
||||
} else {
|
||||
let list = this.applyField[index].option.split(",")
|
||||
this.$refs.selectPicker.open(list, this.applyField[index].value, index)
|
||||
}
|
||||
},
|
||||
// 改变下拉选项
|
||||
changeSelectPicker(value, index) {
|
||||
if (this.showType == 1 && this.applyField[index].field == "native_place") {
|
||||
this.applyField[index].value = value.province + "/" + value.city + "/" + value.area
|
||||
} else if (this.showType == 1 && (this.applyField[index].field == "member_level_id" || this.applyField[index].field == "industry_category_id")) {
|
||||
this.applyField[index].value = value.id
|
||||
} else {
|
||||
this.applyField[index].value = value
|
||||
}
|
||||
},
|
||||
// 打开地图选择位置
|
||||
chooseLocation(index) {
|
||||
uni.chooseLocation({
|
||||
success: (res) => {
|
||||
this.applyField[index].value = {
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude,
|
||||
name: res.name,
|
||||
address: res.address
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 清空地址
|
||||
clearLocation(index) {
|
||||
this.applyField[index].value = {
|
||||
latitude: "",
|
||||
longitude: "",
|
||||
name: "",
|
||||
address: "",
|
||||
}
|
||||
},
|
||||
// 改变手机号对外状态
|
||||
changeMobileAuth() {
|
||||
const result = this.mobileAuth == 1 ? 2 : 1
|
||||
this.$emit("changeMobileAuth", result)
|
||||
},
|
||||
// 选择日期
|
||||
openDatePicker(index) {
|
||||
this.$refs.datePicker.open(this.applyField[index].value, index)
|
||||
},
|
||||
// 改变日期
|
||||
changeDatePicker(value, index) {
|
||||
this.applyField[index].value = value
|
||||
},
|
||||
// 选择时间
|
||||
openTimePicker(index) {
|
||||
this.$refs.timePicker.open(this.applyField[index].value, index)
|
||||
},
|
||||
// 改变时间
|
||||
changeTimePicker(value, index) {
|
||||
this.applyField[index].value = value
|
||||
},
|
||||
// 清空已选数据
|
||||
clearValue(index) {
|
||||
this.applyField[index].value = ""
|
||||
},
|
||||
// 跳转编辑器页面
|
||||
toEditor(index) {
|
||||
this.$store.commit('app/setEditorContent', this.applyField[index].value)
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: `/pages/member/apply/editor?params=${index}`
|
||||
})
|
||||
},
|
||||
// 设置编辑器内容
|
||||
setEditorData(e) {
|
||||
this.applyField[e.params].value = e.content
|
||||
},
|
||||
// 提取富文本文字
|
||||
getEditorText(e) {
|
||||
if (e) return e.replace(/<[^>]+>/g, '')
|
||||
else return ""
|
||||
},
|
||||
// 获取表单数据
|
||||
getApplyField(fn) {
|
||||
fn(JSON.parse(JSON.stringify(this.applyField)))
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.component-member-apply {
|
||||
.component-member-apply-form {
|
||||
.component-member-apply-form-item {
|
||||
margin-top: 32rpx;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
color: #5A5B6E;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
line-height: 44rpx;
|
||||
|
||||
.required {
|
||||
color: #E60012;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.item-input {
|
||||
margin-top: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 16rpx;
|
||||
background: #ffffff;
|
||||
|
||||
&.disabled {
|
||||
.input {
|
||||
color: #ACADB7
|
||||
}
|
||||
}
|
||||
|
||||
.input {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
height: 104rpx;
|
||||
line-height: 104rpx;
|
||||
flex: 1;
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
flex: 1;
|
||||
padding: 32rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #ACADB7;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
padding-right: 32rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-radio {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: -26rpx;
|
||||
padding-top: 8rpx;
|
||||
|
||||
.radio {
|
||||
border-radius: 8rpx;
|
||||
background: #ffffff;
|
||||
padding: 16rpx;
|
||||
margin-left: 26rpx;
|
||||
margin-top: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
margin-right: 8rpx;
|
||||
display: none;
|
||||
}
|
||||
|
||||
text {
|
||||
color: #ACADB7;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: var(--theme-color);
|
||||
|
||||
image {
|
||||
display: block;
|
||||
}
|
||||
|
||||
text {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-upload {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 32rpx;
|
||||
column-gap: 3.5%;
|
||||
row-gap: 24rpx;
|
||||
|
||||
.upload-image {
|
||||
position: relative;
|
||||
width: 31%;
|
||||
height: 0;
|
||||
padding-top: 31%;
|
||||
|
||||
.image-select {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.image-video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 10rpx;
|
||||
background: var(--theme-color);
|
||||
padding: 56rpx;
|
||||
}
|
||||
|
||||
.image-delete {
|
||||
position: absolute;
|
||||
top: -16rpx;
|
||||
right: -16rpx;
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.image-choose {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 20rpx;
|
||||
right: 20rpx;
|
||||
bottom: 20rpx;
|
||||
z-index: 6;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
|
||||
.icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
padding: 18rpx;
|
||||
background: var(--theme-color);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.text {
|
||||
margin-top: 16rpx;
|
||||
color: var(--theme-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.image-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
background: var(--theme-color);
|
||||
opacity: 0.08;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-files {
|
||||
.files-upload {
|
||||
position: relative;
|
||||
margin-top: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FFF;
|
||||
padding: 52rpx;
|
||||
|
||||
.upload-icon {
|
||||
width: 72rpx;
|
||||
height: 64rpx;
|
||||
background-size: 72rpx 64rpx;
|
||||
}
|
||||
|
||||
.upload-info {
|
||||
margin-left: 32rpx;
|
||||
|
||||
.info-title {
|
||||
color: var(--theme-color);
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.info-tips {
|
||||
margin-top: 8rpx;
|
||||
color: #BBBDBF;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 20rpx;
|
||||
right: 20rpx;
|
||||
bottom: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
border: 1px dashed #D4D6D9;
|
||||
}
|
||||
}
|
||||
|
||||
.files-list {
|
||||
margin-top: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #FFF;
|
||||
padding: 36rpx 32rpx;
|
||||
|
||||
.list-item {
|
||||
margin-top: 32rpx;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
color: #ACADB7;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.item-delete {
|
||||
margin-left: 20rpx;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-switch {
|
||||
margin-top: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 16rpx;
|
||||
background: #ffffff;
|
||||
padding: 32rpx;
|
||||
|
||||
.switch-label {
|
||||
flex: 1;
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.switch-box {
|
||||
margin-left: 20rpx;
|
||||
width: 72rpx;
|
||||
height: 36rpx;
|
||||
padding: 2rpx;
|
||||
background: #D9D9D9;
|
||||
border-radius: 18rpx;
|
||||
transition: all .3s;
|
||||
|
||||
.round {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 50%;
|
||||
background: #FFFFFF;
|
||||
margin-left: 0;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
&.select {
|
||||
background: var(--theme-color);
|
||||
|
||||
.round {
|
||||
margin-left: calc(100% - 32rpx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
139
pages/component/member/custom.vue
Normal file
139
pages/component/member/custom.vue
Normal file
@@ -0,0 +1,139 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 组件-会员自定义字段 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="component-member-custom">
|
||||
<block v-for="(item, index) in showData" :key="index" v-if="item.show == 1">
|
||||
<!-- 图片 -->
|
||||
<view class="custom-item" v-if="item.type == 'image'">
|
||||
<view class="item-title">{{item.label}}</view>
|
||||
<view class="item-list" v-if="item.value">
|
||||
<view class="list-image" v-for="(img, num) in item.value.split(',')" :key="num">
|
||||
<image class="image" :src="img" mode="aspectFill" @click="previewImage(index, num)"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-value" v-else>暂未完善</view>
|
||||
</view>
|
||||
<!-- 视频 -->
|
||||
<view class="custom-item" v-else-if="item.type == 'video'">
|
||||
<view class="item-title">{{item.label}}</view>
|
||||
<view class="item-video" v-if="item.value">
|
||||
<video class="video" :src="item.value" controls></video>
|
||||
</view>
|
||||
<view class="item-value" v-else>暂未完善</view>
|
||||
</view>
|
||||
<!-- 证书 -->
|
||||
<view class="custom-item" v-else-if="item.type == 'cert'">
|
||||
<view class="item-title">{{item.label}}</view>
|
||||
<view class="item-image" v-if="item.value">
|
||||
<image class="image" :src="item.value" mode="widthFix" @click="previewImage(index)"></image>
|
||||
</view>
|
||||
<view class="item-value" v-else>暂未完善</view>
|
||||
</view>
|
||||
<!-- 其他 -->
|
||||
<view class="custom-item flex flex-wrap justify-content-between" v-else>
|
||||
<view class="item-title">{{item.label}}</view>
|
||||
<view class="item-value">{{item.value || "暂未完善"}}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "memberCustom",
|
||||
props: ["showData"],
|
||||
methods: {
|
||||
// 预览图片
|
||||
previewImage(i, j = 0) {
|
||||
let list = []
|
||||
if (this.showData[i].type == "cert") {
|
||||
list = [this.showData[i].value]
|
||||
} else {
|
||||
list = this.showData[i].value.split(",")
|
||||
}
|
||||
uni.previewImage({
|
||||
urls: list,
|
||||
current: j
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.component-member-custom {
|
||||
.custom-item {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
background: #ffffff;
|
||||
row-gap: 24rpx;
|
||||
column-gap: 48rpx;
|
||||
|
||||
.item-title {
|
||||
color: #5A5B6E;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.item-value {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.item-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 32rpx;
|
||||
column-gap: 3.5%;
|
||||
row-gap: 24rpx;
|
||||
|
||||
.list-image {
|
||||
position: relative;
|
||||
width: 31%;
|
||||
height: 0;
|
||||
padding-top: 31%;
|
||||
|
||||
.image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-video {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.video {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.item-image {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
105
pages/component/member/index.vue
Normal file
105
pages/component/member/index.vue
Normal file
@@ -0,0 +1,105 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 组件-会员列表 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="component-member" :style="{'--theme-color': themeColor}">
|
||||
<view class="member-item flex" v-for="item in showData" :key="item.id" @click="toDetails(item.id)">
|
||||
<image class="item-avatar" :src="item.avatar" mode="aspectFill"></image>
|
||||
<view class="item-info flex-item flex-direction-column justify-content-between">
|
||||
<view class="info-head flex">
|
||||
<view class="head-name flex-item text-ellipsis">{{item.name}}</view>
|
||||
<view class="head-tag" v-if="item.distance">{{item.distance}}</view>
|
||||
</view>
|
||||
<view class="info-tag text-ellipsis" v-if="item.native_place">{{item.native_place}}</view>
|
||||
<view class="info-label flex justify-content-between">
|
||||
<text class="text-ellipsis">{{item.level_name}}</text>
|
||||
<text class="text-ellipsis" style="margin-left: 16rpx;" v-if="item.industry_category_name">{{item.industry_category_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
export default {
|
||||
name: "memberIndex",
|
||||
props: ["showData"],
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 跳转会员详情
|
||||
toDetails(id) {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pages/member/details?id=" + id
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.component-member {
|
||||
white-space: nowrap;
|
||||
|
||||
.member-item {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #ffffff;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.item-avatar {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.item-info {
|
||||
margin-left: 32rpx;
|
||||
|
||||
.info-head {
|
||||
.head-name {
|
||||
color: #5A5B6E;
|
||||
font-size: 32rpx;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.head-tag {
|
||||
color: var(--theme-color);
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.info-tag {
|
||||
color: #C4C4C4;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
color: var(--theme-color);
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
322
pages/component/member/poster.vue
Normal file
322
pages/component/member/poster.vue
Normal file
@@ -0,0 +1,322 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.maiwd.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 组件-电子会牌 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="component-member-poster">
|
||||
<!-- 电子会牌 -->
|
||||
<canvas class="poster-canvas" :style="{width: posterWidth + 'px', height: posterHeight + 'px'}" canvas-id="myCanvas" id="myCanvas"></canvas>
|
||||
<!-- 电子会牌模态框 -->
|
||||
<uni-popup ref="popupModal" type="center" @change="onChange">
|
||||
<view class="poster-popup flex-direction-column align-items-center" :style="{'--theme-color': themeColor, paddingTop: titleBarHeight + 'px'}">
|
||||
<view class="popup-close" @click="onClose()">
|
||||
<image class="icon" src="/static/closePopup.png" mode="aspectFit"></image>
|
||||
</view>
|
||||
<view class="popup-content flex justify-content-center">
|
||||
<image class="image" :src="posterPath" mode="aspectFit"></image>
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="popup-btn" @click="saveImage">保存相册</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="popup-btn">长按图片保存相册</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
import { loadImage, createPoster, canvasToTempFilePath } from "@/common/poster.js";
|
||||
export default {
|
||||
name: "memberPoster",
|
||||
data() {
|
||||
return {
|
||||
// 标题栏高度
|
||||
titleBarHeight: 0,
|
||||
// 电子会牌数据
|
||||
posterInfo: {},
|
||||
// 电子会牌宽度
|
||||
posterWidth: 0,
|
||||
// 电子会牌高度
|
||||
posterHeight: 0,
|
||||
// 图片资源是否准备完成
|
||||
posterReady: false,
|
||||
// 电子会牌背景图片
|
||||
posterBackground: "",
|
||||
// 电子会牌用户头像图片
|
||||
posterAvatar: "",
|
||||
// 电子会牌二维码图片
|
||||
posterCode: "",
|
||||
// 电子会牌图片路径
|
||||
posterPath: "",
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor,
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
// #ifdef MP-WEIXIN
|
||||
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
||||
this.titleBarHeight = statusBarHeight + (menuButtonInfo.top - statusBarHeight) * 2 + menuButtonInfo.height
|
||||
// #endif
|
||||
},
|
||||
methods: {
|
||||
// 获取电子会牌
|
||||
getPoster() {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true
|
||||
})
|
||||
this.$util.request("mine.poster").then(res => {
|
||||
if (res.code == 1) {
|
||||
this.posterInfo = res.data
|
||||
this.posterWidth = res.data.willbrand.bg.width
|
||||
this.posterHeight = res.data.willbrand.bg.height
|
||||
this.$nextTick(() => {
|
||||
this.showNucleus()
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error('获取电子会牌 ', error)
|
||||
})
|
||||
},
|
||||
// 获取图片资源
|
||||
async showNucleus() {
|
||||
this.loadingResources().then((state) => {
|
||||
// 状态为 true 表示加载完成
|
||||
if (state) {
|
||||
this.posterReady = true
|
||||
this.createImage()
|
||||
}
|
||||
});
|
||||
},
|
||||
// 加载图片资源
|
||||
async loadingResources() {
|
||||
this.posterBackground = await loadImage(this.posterInfo.willbrand.bg.img);
|
||||
this.posterCode = await loadImage(this.posterInfo.applet_qrcode_path);
|
||||
if (this.posterInfo.avatar) this.posterAvatar = await loadImage(this.posterInfo.avatar);
|
||||
return true;
|
||||
},
|
||||
// 生成电子会牌
|
||||
async createImage() {
|
||||
if (!this.posterReady) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: '电子会牌图片资源加载失败',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
};
|
||||
// 获取上下文对象
|
||||
const ctx = uni.createCanvasContext("myCanvas", this);
|
||||
// 创建电子会牌
|
||||
let posterData = [{
|
||||
type: "image",
|
||||
url: this.posterBackground,
|
||||
config: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
w: parseFloat(this.posterWidth),
|
||||
h: parseFloat(this.posterHeight),
|
||||
},
|
||||
}]
|
||||
this.posterInfo.willbrand.data.forEach((item) => {
|
||||
if (item.type == "text") {
|
||||
let content = ""
|
||||
if (item.item == "name") content = this.posterInfo.member_name || ""
|
||||
else if (item.item == "post") content = this.posterInfo.member_level_name || ""
|
||||
else if (item.item == "cardid") content = this.posterInfo.number || ""
|
||||
else if (item.item == "period") content = this.posterInfo.join_time || ""
|
||||
else if (item.item == "expire") content = this.posterInfo.expire_time || ""
|
||||
else if (item.item == "company_organize") content = this.posterInfo.company_name || this.posterInfo.organize_name || ""
|
||||
let itemX = 0
|
||||
if (item.textAlign == "center") itemX = parseFloat(item.left) + parseFloat(item.width) / 2
|
||||
else if (item.textAlign == "right") itemX = parseFloat(item.left) + parseFloat(item.width)
|
||||
else itemX = parseFloat(item.left)
|
||||
let itemFont = "10px sans-serif"
|
||||
if (item.fontStyle == 2) {
|
||||
itemFont = `italic ${item.size} sans-serif`
|
||||
} else if (item.fontStyle == 3) {
|
||||
itemFont = `bold ${item.size} sans-serif`
|
||||
} else if (item.fontStyle == 4) {
|
||||
itemFont = `italic bold ${item.size} sans-serif`
|
||||
} else {
|
||||
itemFont = `${item.size} sans-serif`
|
||||
}
|
||||
posterData.push({
|
||||
type: "text",
|
||||
text: content || "",
|
||||
config: {
|
||||
x: itemX,
|
||||
y: parseFloat(item.top),
|
||||
color: item.color,
|
||||
font: itemFont,
|
||||
textAlign: item.textAlign,
|
||||
maxWidth: parseFloat(item.width),
|
||||
lineHeight: parseInt(item.height),
|
||||
isVerticalCenter: true
|
||||
},
|
||||
})
|
||||
} else if (item.type == "img") {
|
||||
let imgUrl = ""
|
||||
let radius = 0
|
||||
if (item.item == "qr") {
|
||||
imgUrl = this.posterCode
|
||||
radius = 0
|
||||
} else if (item.item == "avatar") {
|
||||
imgUrl = this.posterAvatar
|
||||
radius = parseFloat(item.width) / 2
|
||||
}
|
||||
if (imgUrl) {
|
||||
posterData.push({
|
||||
type: "image",
|
||||
url: imgUrl,
|
||||
config: {
|
||||
x: parseFloat(item.left),
|
||||
y: parseFloat(item.top),
|
||||
w: parseFloat(item.width),
|
||||
h: parseFloat(item.height),
|
||||
r: parseInt(radius),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
await createPoster(ctx, posterData)
|
||||
const imagePath = await canvasToTempFilePath("myCanvas", this);
|
||||
this.posterPath = imagePath;
|
||||
this.$refs.popupModal.open()
|
||||
uni.hideLoading()
|
||||
},
|
||||
// 保存电子会牌
|
||||
saveImage() {
|
||||
uni.authorize({
|
||||
scope: 'scope.writePhotosAlbum',
|
||||
success: () => {
|
||||
uni.getImageInfo({
|
||||
src: this.posterPath,
|
||||
success: (img) => {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: img.path,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: "保存成功",
|
||||
icon: "success",
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error(err);
|
||||
},
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error(err)
|
||||
}
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.showModal({
|
||||
title: '图片保存失败',
|
||||
content: '请确认是否已开启授权',
|
||||
confirmText: '开启授权',
|
||||
confirmColor: this.themeColor,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.openSetting({
|
||||
success: (setting) => {
|
||||
if (setting.authSetting["scope.writePhotosAlbum"]) {
|
||||
uni.showToast({
|
||||
title: '授权成功,请重新保存',
|
||||
icon: "none"
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请确定已打开保存权限',
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 关闭弹窗
|
||||
onClose() {
|
||||
this.$refs.popupModal.close()
|
||||
},
|
||||
// 改变页面滚动状态
|
||||
onChange(e) {
|
||||
this.$emit("onChange", e.show)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.component-member-poster {
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
|
||||
.poster-canvas {
|
||||
position: fixed;
|
||||
top: 100vw;
|
||||
left: 100vh;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.poster-popup {
|
||||
.popup-close {
|
||||
width: 100%;
|
||||
margin-top: -112rpx;
|
||||
margin-bottom: 32rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-content {
|
||||
.image {
|
||||
width: 80vw;
|
||||
height: 65vh;
|
||||
}
|
||||
}
|
||||
|
||||
.popup-btn {
|
||||
margin-top: 32rpx;
|
||||
width: 336rpx;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
padding: 26rpx 32rpx;
|
||||
border-radius: 16rpx;
|
||||
color: #FFFFFF;
|
||||
background: var(--theme-color);
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
167
pages/component/member/product.vue
Normal file
167
pages/component/member/product.vue
Normal file
@@ -0,0 +1,167 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 组件-产品维护 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="component-member-product" v-if="loadEnd">
|
||||
<view class="product-list" v-if="productList.length">
|
||||
<view class="list-item" v-for="item in productList" :key="item.id">
|
||||
<image class="item-image" :src="item.image" mode="aspectFill"></image>
|
||||
<view class="item-name text-ellipsis-more">{{item.name}}</view>
|
||||
<view class="item-group flex flex-center">
|
||||
<view class="group-btn" style="background: #FFB656;" @click="handleEdit(item.id)">修改</view>
|
||||
<view class="group-btn" style="background: #FF626E;" @click="handleDelete(item.id)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<empty top="30%" title="暂无相关内容~" v-else></empty>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
export default {
|
||||
name: "componentMemberProduct",
|
||||
data() {
|
||||
return {
|
||||
// 加载完成
|
||||
loadEnd: false,
|
||||
// 产品列表
|
||||
productList: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor,
|
||||
})
|
||||
},
|
||||
mounted() {
|
||||
uni.showLoading({
|
||||
title: "加载中"
|
||||
})
|
||||
this.getProductList(() => {
|
||||
this.loadEnd = true
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取产品列表
|
||||
getProductList(fn) {
|
||||
this.$util.request("member.product.list").then(res => {
|
||||
if (fn) fn()
|
||||
if (res.code == 1) {
|
||||
this.productList = res.data
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
if (fn) fn()
|
||||
console.error('获取产品列表 ', error)
|
||||
})
|
||||
},
|
||||
// 修改产品
|
||||
handleEdit(id) {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pages/member/product/edit?id=" + id
|
||||
})
|
||||
},
|
||||
// 删除产品
|
||||
handleDelete(id) {
|
||||
uni.showModal({
|
||||
title: "系统提示",
|
||||
content: "是否删除该产品?",
|
||||
confirmColor: "#E50002",
|
||||
confirmText: "删除",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.showLoading({
|
||||
mask: true,
|
||||
title: "加载中"
|
||||
})
|
||||
this.$util.request("member.product.delete", {
|
||||
id: id
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.getProductList(() => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
icon: "success",
|
||||
title: "删除成功"
|
||||
})
|
||||
})
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(error => {
|
||||
uni.hideLoading()
|
||||
console.error('删除产品 ', error)
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.component-member-product {
|
||||
.product-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 2fr);
|
||||
column-gap: 28rpx;
|
||||
row-gap: 32rpx;
|
||||
|
||||
.list-item {
|
||||
padding: 32rpx;
|
||||
background: #FFF;
|
||||
border-radius: 16rpx;
|
||||
|
||||
.item-image {
|
||||
width: 100%;
|
||||
height: 266rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
margin-top: 24rpx;
|
||||
color: #5A5B6E;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
line-height: 34rpx;
|
||||
height: 68rpx;
|
||||
}
|
||||
|
||||
.item-group {
|
||||
margin-top: 24rpx;
|
||||
column-gap: 16rpx;
|
||||
|
||||
.group-btn {
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
103
pages/component/member/scroll.vue
Normal file
103
pages/component/member/scroll.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 组件-可滚动会员列表 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<scroll-view scroll-x :scroll-left="scrollLeft" class="component-member-scroll" :style="{'--theme-color': themeColor}" @scrolltolower="scrolltolower">
|
||||
<view class="scroll-item" v-for="item in showData" :key="item.id" @click="toDetails(item.id)">
|
||||
<image class="item-avatar" :src="item.avatar" mode="aspectFill"></image>
|
||||
<view class="item-label text-ellipsis">{{item.level_name}}</view>
|
||||
<view class="item-name text-ellipsis">{{item.name}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
export default {
|
||||
name: "memberScroll",
|
||||
props: ["showData"],
|
||||
data() {
|
||||
return {
|
||||
// 横向滚动条位置
|
||||
scrollLeft: 0,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 重置横向滚动条位置
|
||||
resetScrollLeft() {
|
||||
this.scrollLeft = 0.1
|
||||
this.$nextTick(() => {
|
||||
this.scrollLeft = 0
|
||||
})
|
||||
},
|
||||
// 滚动到最右侧
|
||||
scrolltolower() {
|
||||
this.$emit("scrolltolower")
|
||||
},
|
||||
// 跳转会员详情
|
||||
toDetails(id) {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pages/member/details?id=" + id
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.component-member-scroll {
|
||||
white-space: nowrap;
|
||||
|
||||
.scroll-item {
|
||||
display: inline-block;
|
||||
width: 128rpx;
|
||||
margin-left: 36rpx;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.item-avatar {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
color: #ffffff;
|
||||
font-size: 20rpx;
|
||||
line-height: 28rpx;
|
||||
padding: 8rpx;
|
||||
border-radius: 4rpx 20rpx 4rpx 20rpx;
|
||||
background: var(--theme-color);
|
||||
margin-top: -16rpx;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
margin-top: 16rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
124
pages/component/member/units.vue
Normal file
124
pages/component/member/units.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<!-- +----------------------------------------------------------------------
|
||||
| 麦沃德科技赋能开发者,助力商协会发展
|
||||
+----------------------------------------------------------------------
|
||||
| Copyright (c) 2017~2024 www.wdsxh.cn All rights reserved.
|
||||
+----------------------------------------------------------------------
|
||||
| 沃德商协会系统并不是自由软件,不加密,并不代表开源,未经许可不可自由转售和商用
|
||||
+----------------------------------------------------------------------
|
||||
| Author: MY WORLD Team <bd@maiwd.cn> www.maiwd.cn
|
||||
+----------------------------------------------------------------------
|
||||
| 组件-会员单位列表 开发者: 麦沃德科技-半夏
|
||||
+---------------------------------------------------------------------- -->
|
||||
|
||||
<template>
|
||||
<view class="component-member-units">
|
||||
<view class="units-item flex" v-for="item in showData" :key="item.id" @click="toDetails(item.id, item.type)">
|
||||
<image class="item-logo" :src="item.logo" mode="aspectFill"></image>
|
||||
<view class="item-info flex-item flex-direction-column justify-content-between">
|
||||
<view class="info-name text-ellipsis">{{item.name}}</view>
|
||||
<view class="info-introduction text-ellipsis-more">{{item.introduction}}</view>
|
||||
</view>
|
||||
<view class="item-level">
|
||||
<view class="bg" :style="{background: themeColor}"></view>
|
||||
<view class="text">{{item.level_name}}单位</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex"
|
||||
export default {
|
||||
name: "memberUnits",
|
||||
props: ["showData"],
|
||||
computed: {
|
||||
...mapState({
|
||||
themeColor: state => state.app.themeColor
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 跳转会员详情
|
||||
toDetails(id, type) {
|
||||
if (type == 2) {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pages/member/enterprise?id=" + id
|
||||
})
|
||||
} else {
|
||||
this.$util.toPage({
|
||||
mode: 1,
|
||||
path: "/pages/member/organization?id=" + id
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.component-member-units {
|
||||
.units-item {
|
||||
position: relative;
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
background: #ffffff;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.item-logo {
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.item-info {
|
||||
margin-left: 32rpx;
|
||||
|
||||
.info-name {
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.info-introduction {
|
||||
margin-top: 16rpx;
|
||||
color: #5A5B6E;
|
||||
font-size: 28rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.item-level {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9;
|
||||
border-bottom-right-radius: 16rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #FFF;
|
||||
font-size: 24rpx;
|
||||
line-height: 34rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user