Browse Source

修改会员流程需求

master
岳鹏龙 6 months ago
parent
commit
b51e630045
  1. 18
      src/api/login.ts
  2. 26
      src/api/memberCenter.ts
  3. 14
      src/pages.json
  4. 74
      src/pages/index/index.vue
  5. 180
      src/pages/login/login.vue
  6. 2
      src/pages/memberCenter/agreement.vue
  7. 18
      src/pages/memberCenter/index.vue
  8. 25
      src/pages/memberCenter/inpart.vue
  9. 2
      src/pages/memberCenter/jump-login.vue
  10. 597
      src/pages/memberCenter/makemessage.vue
  11. 590
      src/pages/memberCenter/makemessage2.vue
  12. 2
      src/pages/memberCenter/memberRegistration.vue
  13. 17
      src/pages/memberCenter/memberZc.vue
  14. 19
      src/pages/mine/index.vue
  15. BIN
      src/static/img/ewmicon.png
  16. BIN
      src/static/img/hyewm.jpg
  17. BIN
      src/static/img/hyzcicon.png
  18. BIN
      src/static/img/iconhqt.png
  19. 5
      src/store/user.ts

18
src/api/login.ts

@ -1,5 +1,6 @@
import { request } from '@/utils/http' import { request } from '@/utils/http'
//获取用户openid
export function getOpenid(data: { code: string }) { export function getOpenid(data: { code: string }) {
return request.http({ return request.http({
url: '/api/huiqitong/get_openid', url: '/api/huiqitong/get_openid',
@ -7,9 +8,26 @@ export function getOpenid(data: { code: string }) {
}) })
} }
//手机号授权登录
export function mobileAuth(data: { code: string; openid: string }) { export function mobileAuth(data: { code: string; openid: string }) {
return request.http({ return request.http({
url: '/api/huiqitong/mobile_auth', url: '/api/huiqitong/mobile_auth',
data data
}) })
} }
//发送登录验证码
export function loginYzm(data: { mobile: string }) {
return request.http({
url: '/api/send/mobile/login',
data
})
}
//手机号验证码登录
export function mobileLogin(data: { mobile: string; mobile_key: string; mobile_code: string }) {
return request.http({
url: '/api/huiqitong/mobile_login',
data
})
}

26
src/api/memberCenter.ts

@ -42,6 +42,15 @@ export function myMemberApply() {
}) })
} }
//注册会员
export function xh_memberRegister(data: any) {
return request.http({
url: '/api/huiqitong/xh_member/register',
method: 'POST',
data
})
}
//协会会员列表 //协会会员列表
export function xhMember(data: any) { export function xhMember(data: any) {
return request.http({ return request.http({
@ -62,7 +71,7 @@ export function xhMemberInfo(id: string) {
//获取授权手机号注册协会会员 //获取授权手机号注册协会会员
export function authRegister(data: any) { export function authRegister(data: any) {
return request.http({ return request.http({
url: '/api/huiqitong/xh_member/auth_register', url: '/api/huiqitong/xh_member/get_auth_mobile',
method: 'POST', method: 'POST',
data data
}) })
@ -77,17 +86,26 @@ export function register(data: any) {
}) })
} }
//手机号验证码注册协会会员 //手机号验证码验证
export function smsRegister(data: any) { export function smsRegister(data: any) {
return request.http({ return request.http({
url: '/api/huiqitong/xh_member/sms_register', url: '/api/huiqitong/xh_member/sms_verify',
method: 'POST', method: 'POST',
data data
}) })
} }
//完善会员信息 //注册会员信息
export function xhMemberImprove(data: any) { export function xhMemberImprove(data: any) {
return request.http({
url: '/api/huiqitong/xh_member/sms_verify',
method: 'POST',
data
})
}
//完善会员信息
export function xhMemprove(data: any) {
return request.http({ return request.http({
url: '/api/huiqitong/xh_member/improve', url: '/api/huiqitong/xh_member/improve',
method: 'POST', method: 'POST',

14
src/pages.json

@ -30,6 +30,20 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/memberCenter/makemessage",
"style": {
"navigationBarTitleText": "完善信息",
"enablePullDownRefresh": false
}
},
{
"path": "pages/memberCenter/makemessage2",
"style": {
"navigationBarTitleText": "完善信息",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/memberCenter/memberRegistration", "path": "pages/memberCenter/memberRegistration",
"style": { "style": {

74
src/pages/index/index.vue

@ -2,8 +2,7 @@
<u-navbar title="惠企帮" placeholder="true" bg-color="#F1F3F9" left-icon="map" left-icon-size="24rpx" left-text="呼和浩特" <u-navbar title="惠企帮" placeholder="true" bg-color="#F1F3F9" left-icon="map" left-icon-size="24rpx" left-text="呼和浩特"
@leftClick="leftClick"></u-navbar> @leftClick="leftClick"></u-navbar>
<view class="container"> <view class="container">
<u-swiper :list="list5" @change="change" :autoplay="true" height="230" <u-swiper :list="list5" @change="change" :autoplay="true" height="230" key-name="pic_path" @click="swiperClick">
key-name="pic_path" @click="swiperClick">
<!-- <template #indicator> <!-- <template #indicator>
<view class="indicator"> <view class="indicator">
<view class="indicator__dot" v-for="(item, index) in list5" :key="index" <view class="indicator__dot" v-for="(item, index) in list5" :key="index"
@ -108,23 +107,32 @@
</view> </view>
</view> </view>
<view class="hyback">
<view class="hyzc" @click="gohyzc" v-if="!isEmptyObject(userStore.userInfo)">
会员注册
<image style="width: 10px;margin-left: 5px;" src="@/static/img/hyzcicon.png" mode="widthFix"></image>
</view>
<view class="ydl" @click="showewm = true" v-else>
<view class="hyzc">
推荐会员注册
<image style="width: 10px;margin-left: 5px;" src="@/static/img/hyzcicon.png" mode="widthFix"></image>
</view>
<image style="width: 15px;" src="@/static/img/ewmicon.png" mode="widthFix"></image>
</view>
</view>
<view class="tjback"> <view class="tjback">
<view class="titlebox"> <view class="titlebox">
<view class="left"> <view class="left">
<image style="width: 40rpx; height: 40rpx" src="@/static/img/tjhy.png" mode=""></image> <image style="width: 40rpx; height: 40rpx" src="@/static/img/tjhy.png" mode=""></image>
<text class="text">活跃会员</text> <text class="text">活跃会员</text>
</view> </view>
<view class="more" @click="gohyzc">
会员注册
</view>
<view class="more" @click="gohyList">更多会员 ></view> <view class="more" @click="gohyList">更多会员 ></view>
</view> </view>
<view class="hylist"> <view class="hylist">
<tabsComm :tabs-data="filterTabs" :showNum="1" @tabChange="handleTabSelect" /> <tabsComm :tabs-data="filterTabs" :showNum="1" @tabChange="handleTabSelect" />
<scroll-view scroll-y="auto" class="hyonne"> <scroll-view scroll-y="auto" class="hyonne">
<view class="hyCard" v-for="(item, index) in hyList.slice(0, 6)" :key="index" <view class="hyCard" v-for="(item, index) in hyList.slice(0, 6)" :key="index">
>
<!-- @click="gohydetail(item.id)"> --> <!-- @click="gohydetail(item.id)"> -->
<view class="left"> <view class="left">
<!-- <u-avatar :src="url + '/' + item.head_pic" size="45"></u-avatar> --> <!-- <u-avatar :src="url + '/' + item.head_pic" size="45"></u-avatar> -->
@ -169,6 +177,10 @@
<view class="txtt" @click="showoverlay = false">取消</view> <view class="txtt" @click="showoverlay = false">取消</view>
</view> </view>
</u-overlay> --> </u-overlay> -->
<u-popup :show="showewm" @close="showewm = false" mode="center" round="0" :safeAreaInsetBottom="false">
<image style="width: 300px;" src="@/static/img/hyewm.jpg" mode="widthFix"></image>
</u-popup>
</template> </template>
<script setup> <script setup>
@ -195,6 +207,8 @@
const url = ref(import.meta.env.VITE_APP_BASE_URL) const url = ref(import.meta.env.VITE_APP_BASE_URL)
const showewm = ref(false)
const current = ref(0) const current = ref(0)
const current1 = ref(0) const current1 = ref(0)
const ztdata = ref([]) const ztdata = ref([])
@ -365,8 +379,7 @@
} }
const getbqlist = async () => { const getbqlist = async () => {
filterTabs.value = [ filterTabs.value = [{
{
id: 1, id: 1,
title: '个体私营企业' title: '个体私营企业'
}, },
@ -410,6 +423,7 @@
}) })
} }
onShow(async () => { onShow(async () => {
// //
const res = await homeSpecial() const res = await homeSpecial()
@ -483,6 +497,12 @@
}, 8000) }, 8000)
} }
} }
function isEmptyObject(obj) {
return Object.keys(obj).length !== 0;
}
onMounted(() => { onMounted(() => {
intervalId = setInterval(myPeriodicFunction, 3000) intervalId = setInterval(myPeriodicFunction, 3000)
intervalId1 = setInterval(myPeriodicFunction1, 20000) intervalId1 = setInterval(myPeriodicFunction1, 20000)
@ -502,6 +522,9 @@
currentTab.value = '' currentTab.value = ''
await getMemberCenter(currentTab.value) await getMemberCenter(currentTab.value)
}) })
onShow(() => {
console.log(isEmptyObject(userStore.userInfo));
})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -858,6 +881,35 @@
width: 100%; width: 100%;
} }
.hyback {
margin-top: 40rpx;
background: #EDF5FF;
border-radius: 24rpx;
padding: 20rpx 30rpx;
border: 0.2px solid #007FFF;
box-sizing: border-box;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.hyzc {
color: #1A1A1A;
font-family: Source Han Sans;
font-size: 15px;
font-weight: 350;
display: flex;
align-items: center;
justify-content: center;
}
.ydl {
width: 100%;
display: flex;
align-items: center;
justify-content: space-around;
}
}
.titlebox { .titlebox {
margin-top: 20rpx; margin-top: 20rpx;
width: 100%; width: 100%;
@ -938,6 +990,7 @@
display: flex; display: flex;
} }
} }
.warp { .warp {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
@ -948,12 +1001,14 @@
display: grid; display: grid;
justify-items: center; justify-items: center;
box-sizing: border-box; box-sizing: border-box;
.tite { .tite {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 52rpx; font-size: 52rpx;
font-weight: bold; font-weight: bold;
color: rgba(29, 29, 29, 0.95); color: rgba(29, 29, 29, 0.95);
} }
.txtt { .txtt {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
@ -961,6 +1016,7 @@
color: #828282; color: #828282;
margin-top: 20rpx; margin-top: 20rpx;
} }
.butttx { .butttx {
margin-top: 30rpx; margin-top: 30rpx;
width: 100%; width: 100%;

180
src/pages/login/login.vue

@ -1,12 +1,34 @@
<script setup lang="ts"> <script setup lang="ts">
import { debounce } from 'feng-uniapp-exploit/utils/index' import { debounce } from 'feng-uniapp-exploit/utils/index'
import { mobileAuth } from '@/api/login' import { mobileAuth, loginYzm, mobileLogin } from '@/api/login'
import jumplogin from '../memberCenter/jump-login.vue'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
const userStore = useUserStore() const userStore = useUserStore()
const loginCode = ref('') const loginCode = ref('')
const radioVal = ref(false)
const showMobile = ref(false)
const showpopup = () => {
if (radioVal.value) {
showMobile.value = true
} else {
uni.showToast({
title: '请勾选用户服务协议',
icon: 'none'
})
}
}
const gorhxy = () => {
uni.navigateTo({
url: '/pages/memberCenter/agreement'
})
}
// code // code
const getLoginCode = async () : Promise<string> => { const getLoginCode = async () : Promise<string> => {
try { try {
@ -30,24 +52,32 @@ const onGetPhoneNumber = debounce(async (e: phoneEvent) => {
return return
} }
try { try {
if (radioVal.value) {
if (!loginCode.value) { if (!loginCode.value) {
await getLoginCode() await getLoginCode()
} }
if (!userStore.openId) { // if (!userStore.openId) {
await userStore.getopenid({ code: loginCode.value }) // await userStore.getopenid({ code: loginCode.value })
} // }
mobileAuth({ openid: userStore.openId, code: e.detail.code }) mobileAuth({ openid: userStore.openId, code: e.detail.code })
.then((res : any) => { .then((res : any) => {
const { data: moblie } = res as { data : string } const { data: moblie } = res as { data : string }
if(res.code === 1) {
userStore.mobile = moblie userStore.mobile = moblie
uni.setStorageSync('access_token', res.data.token) uni.setStorageSync('access_token', res.data.token)
userStore.getUserInfo() userStore.getUserInfo()
onLoginSuccess() onLoginSuccess()
} else {
uni.showToast({ title: res.msg, icon: 'none' })
}
}) })
.catch(() => { } else {
uni.showToast({ title: '登录失败!', icon: 'none' }) uni.showToast({
title: '请勾选用户服务协议',
icon: 'none'
}) })
}
} catch (error) { } catch (error) {
uni.showToast({ title: '登录失败', icon: 'none' }) uni.showToast({ title: '登录失败', icon: 'none' })
} }
@ -68,11 +98,44 @@ const onLoginSuccess = () => {
}) })
} }
const loginCall = (e : any) => {
mobileLogin({
mobile: e.phoneNum,
mobile_key: mobile_key.value,
mobile_code: e.smsCode
}).then((res : any) => {
const { data: moblie } = res as { data : string }
userStore.mobile = moblie
uni.setStorageSync('access_token', res.data.token)
userStore.getUserInfo()
onLoginSuccess()
})
.catch(() => {
uni.showToast({ title: '登录失败!', icon: 'none' })
})
}
const mobile_key = ref('')
const smsCall = (e : any) => {
loginYzm({
mobile: e
}).then(res => {
if (res.code === 1) {
mobile_key.value = res.data.key
}
})
}
const goback = () => { const goback = () => {
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: '/pages/index/index'
}) })
} }
const gozc = () => {
uni.navigateTo({
url: '/pages/memberCenter/memberRegistration'
})
}
onLoad((options : any) => { }) onLoad((options : any) => { })
onShow(() => { onShow(() => {
@ -82,9 +145,9 @@ onShow(() => {
}) })
</script> </script>
<template> <template>
<view class="login"> <!-- <view class="login"> -->
<!-- <image class="logo-img" src="@/static/logo.png" mode="widthFix" /> --> <!-- <image class="logo-img" src="@/static/logo.png" mode="widthFix" /> -->
<text>惠企帮欢迎您</text> <!-- <text>惠企帮欢迎您</text>
<view class="btn_box"> <view class="btn_box">
<u-button <u-button
@getphonenumber="onGetPhoneNumber" @getphonenumber="onGetPhoneNumber"
@ -96,6 +159,31 @@ onShow(() => {
/> />
<view class="backindex" @click="goback">返回主页</view> <view class="backindex" @click="goback">返回主页</view>
</view> </view>
</view> -->
<view class="container">
<u-navbar title="登录" placeholder="true" :auto-back="true" bg-color="#F1F3F9" left-icon-size="24"></u-navbar>
<image style="width: 50%;margin-bottom: 60rpx;margin-top: 44rpx;" src="@/static/img/iconhqt.png"
mode="widthFix"></image>
<view class="butp">
<u-button @getphonenumber="onGetPhoneNumber" text="手机号一键登录" icon-color="#fff" open-type="getPhoneNumber"
color="linear-gradient(90deg, #007FFF 0%, #99CCFF 100%)" />
<view class="but" style="color: #616161;background: #FFFFFF;" @click="showpopup">
其他手机号登录
</view>
</view>
<view class="hyzc" @click="gozc">
会员注册
</view>
<view class="radiotxt">
<u-checkbox name="agree" shape="circle" label="我已阅读并同意" usedAlone v-model:checked="radioVal">
</u-checkbox>
<view class="txt2" @click="gorhxy">
用户服务协议
</view>
</view>
<u-popup :show="showMobile" @close="showMobile = false" mode="center">
<jumplogin @smsCall="smsCall" @loginCall="loginCall"></jumplogin>
</u-popup>
</view> </view>
</template> </template>
@ -115,10 +203,86 @@ onShow(() => {
margin-bottom: 60rpx; margin-bottom: 60rpx;
} }
} }
.btn_box { .btn_box {
margin-top: 60rpx; margin-top: 60rpx;
} }
.backindex { .backindex {
margin-top: 20px; margin-top: 20px;
} }
.container {
background: linear-gradient(0deg, #f1f3f9 72%, rgba(129, 179, 222, 0.5) 88%);
height: 100vh;
width: 100%;
display: grid;
align-content: center;
justify-items: center;
.butp {
/* 标签栏投影 */
display: grid;
align-items: center;
justify-content: center;
.but {
margin-top: 22rpx;
padding: 24rpx 224rpx;
border-radius: 16rpx;
background: linear-gradient(90deg, #007FFF 0%, #99CCFF 100%);
display: flex;
align-items: center;
justify-content: center;
font-family: Source Han Sans;
font-size: 36rpx;
font-weight: 350;
color: #FFFFFF;
}
:deep(.u-button) {
padding: 24rpx 224rpx;
border-radius: 16rpx;
height: 96rpx;
}
:deep(.u-button__text) {
font-family: Source Han Sans;
font-size: 36rpx !important;
font-weight: 350;
color: #FFFFFF;
}
}
.radiotxt {
margin-top: 296rpx;
display: flex;
align-items: center;
justify-content: center;
.txt1 {
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
color: #969696;
}
.txt2 {
margin-left: 10rpx;
font-family: Source Han Sans;
font-size: 28rpx;
font-weight: 350;
color: #2563EB
}
}
}
.hyzc {
width: 100%;
display: flex;
justify-content: flex-end;
color: #2563EB;
margin-top: 15px;
padding-right: 12px;
}
</style> </style>

2
src/pages/memberCenter/agreement.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title="入会协议" placeholder="true" :auto-back="true" bg-color="#F1F3F9" left-icon-size="24"></u-navbar> <u-navbar title="" placeholder="true" :auto-back="true" bg-color="#F1F3F9" left-icon-size="24"></u-navbar>
<view class="title"> <view class="title">
{{xydata.title}} {{xydata.title}}
</view> </view>

18
src/pages/memberCenter/index.vue

@ -4,9 +4,9 @@
title="会员中心" title="会员中心"
placeholder="true" placeholder="true"
bg-color="#F1F3F9" bg-color="#F1F3F9"
left-icon="man-add-fill" :left-icon="isEmptyObject(userStore.userInfo)?'':'man-add-fill'"
left-icon-size="24" left-icon-size="24"
left-text="申请入会" :left-text="isEmptyObject(userStore.userInfo)?'':'申请入会'"
@leftClick="leftClick" @leftClick="leftClick"
></u-navbar> ></u-navbar>
<u-search <u-search
@ -60,6 +60,8 @@
import { ref } from 'vue' import { ref } from 'vue'
import tabsComm from '../index/tabsComm.vue' import tabsComm from '../index/tabsComm.vue'
import { xhMember } from '@/api/memberCenter' import { xhMember } from '@/api/memberCenter'
import useUserStore from '@/store/user'
const userStore = useUserStore()
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')
@ -124,12 +126,7 @@ const filterTabs = ref([
]) ])
const leftClick = () => { const leftClick = () => {
if (uni.getStorageSync('access_token') === '') {
uni.showToast({
title: '请登录',
icon: 'fail'
})
} else {
// uni.navigateTo({ // uni.navigateTo({
// url: '/pages/memberCenter/inpart' // url: '/pages/memberCenter/inpart'
// }) // })
@ -137,7 +134,6 @@ const leftClick = () => {
url: '/pages/memberCenter/memberRegistration' url: '/pages/memberCenter/memberRegistration'
}) })
} }
}
// //
const handleTabSelect = async (tab) => { const handleTabSelect = async (tab) => {
@ -192,6 +188,10 @@ const onloadmore = async () => {
}) })
} }
function isEmptyObject(obj) {
return Object.keys(obj).length !== 0;
}
onLoad(async () => { onLoad(async () => {
// await getbqlist() // await getbqlist()
await getMemberCenter('', '', page.value, pagesize.value) await getMemberCenter('', '', page.value, pagesize.value)

25
src/pages/memberCenter/inpart.vue

@ -18,7 +18,7 @@
prop="tel"> prop="tel">
<u-input v-model="form.tel" placeholder="请输入" placeholder-style="color: #D3D3D3;" /> <u-input v-model="form.tel" placeholder="请输入" placeholder-style="color: #D3D3D3;" />
</u-form-item> </u-form-item>
<u-form-item label="单位名称" prop="title" v-if="form.identity!==5"> <!-- <u-form-item label="单位名称" prop="title" v-if="form.identity!==5">
<u-input v-if="form.identity===3" v-model="form.title" placeholder="请选择" <u-input v-if="form.identity===3" v-model="form.title" placeholder="请选择"
placeholderStyle="color: #D3D3D3;" disabled disabled-color="#ffffff" suffixIcon="arrow-down" placeholderStyle="color: #D3D3D3;" disabled disabled-color="#ffffff" suffixIcon="arrow-down"
@tap="dwshow = true" /> @tap="dwshow = true" />
@ -35,7 +35,7 @@
disabled-color="#ffffff" suffixIcon="arrow-down" @tap="dzshow = true" /> disabled-color="#ffffff" suffixIcon="arrow-down" @tap="dzshow = true" />
<u-cascader :show="dzshow" v-model="dzvalue" :data="dzcolumns" @confirm="dzconfirm" <u-cascader :show="dzshow" v-model="dzvalue" :data="dzcolumns" @confirm="dzconfirm"
@close="dzshow = false"></u-cascader> @close="dzshow = false"></u-cascader>
</u-form-item> </u-form-item> -->
<!-- <view class="cardbox" v-if="ishowcommany"> <!-- <view class="cardbox" v-if="ishowcommany">
<view v-for="(group, index) in inputGroups" :key="index" class="input-group"> <view v-for="(group, index) in inputGroups" :key="index" class="input-group">
<view class="inputs" @click="beforeRead(index)"> <view class="inputs" @click="beforeRead(index)">
@ -68,7 +68,7 @@
<!-- <u-form-item label="个人介绍" prop="introduce"> <!-- <u-form-item label="个人介绍" prop="introduce">
<u-textarea v-model="form.introduce" autoHeight placeholder="请输入个人介绍" placeholderStyle="color: #D3D3D3;"></u-textarea> <u-textarea v-model="form.introduce" autoHeight placeholder="请输入个人介绍" placeholderStyle="color: #D3D3D3;"></u-textarea>
</u-form-item> --> </u-form-item> -->
<u-form-item label="营业执照" prop="business_license" v-if="form.identity===1||form.identity===2"> <!-- <u-form-item label="营业执照" prop="business_license" v-if="form.identity===1||form.identity===2">
<u-upload class="uploadbox" @afterRead="afterRead1" :maxCount="1" :imageMode="'heightFix'" <u-upload class="uploadbox" @afterRead="afterRead1" :maxCount="1" :imageMode="'heightFix'"
:width="auto" :height="144"> :width="auto" :height="144">
<view class="yyzz" v-if="form.business_license === ''"> <view class="yyzz" v-if="form.business_license === ''">
@ -78,7 +78,7 @@
<image v-else style="width: 100%; height: 600rpx; margin-top: 12rpx" <image v-else style="width: 100%; height: 600rpx; margin-top: 12rpx"
:src="baseurl + '/' + form.business_license" mode="scaleToFill"></image> :src="baseurl + '/' + form.business_license" mode="scaleToFill"></image>
</u-upload> </u-upload>
</u-form-item> </u-form-item> -->
</u-form> </u-form>
</view> </view>
<view class="sumitbotton"> <view class="sumitbotton">
@ -94,7 +94,8 @@
import { import {
memberTagList, memberTagList,
memberApply, memberApply,
xhMemberImprove xhMemberImprove,
xh_memberRegister
} from '@/api/memberCenter' } from '@/api/memberCenter'
import { import {
onShow onShow
@ -350,18 +351,20 @@
// } // }
// }) // })
uni.$u.toast('校验通过') uni.$u.toast('校验通过')
delete form.value.member_tag_name // delete form.value.member_tag_name
console.log(form.value); console.log(form.value);
xhMemberImprove(form.value).then((res) => { xh_memberRegister(form.value).then((res) => {
if (res.code === 1) { if (res.code === 1) {
uni.switchTab({
url: '/pages/memberCenter/index'
})
uni.showToast({ uni.showToast({
title: '请等待审核', title: '请完善信息',
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}) })
setTimeout(()=>{
uni.navigateTo({
url: '/pages/memberCenter/makemessage?number='+form.value.mobile+'&type='+form.value.identity
})
},2000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

2
src/pages/memberCenter/jump-login.vue

@ -6,7 +6,7 @@
<view @click="sendMsg" class="code-view">{{codeViewMsg}}</view> <view @click="sendMsg" class="code-view">{{codeViewMsg}}</view>
</view> </view>
<button @click="userLogin" class="loginBtn" type="primary" :disabled="btnDisabled">确定</button> <button style="color:#ffffff;backgroundColor:#007FFF;borderColor:#007FFF" @click="userLogin" class="loginBtn" type="default" :disabled="btnDisabled">确定</button>
</view> </view>
</template> </template>

597
src/pages/memberCenter/makemessage.vue

@ -0,0 +1,597 @@
<template>
<view class="container">
<view class="formlist">
<u-form :model="form" ref="uFormRef" label-position="top" :rules="rules">
<!-- <u-form-item label="用户身份" prop="member_tag_name">
<u-input v-model="form.member_tag_name" placeholder="请选择" placeholderStyle="color: #D3D3D3;"
disabled disabled-color="#ffffff" suffixIcon="arrow-down" @tap="show = true" />
<u-picker :show="show" :columns="[columns]" @confirm="confirm" @cancel="show = false"
keyName="title"></u-picker>
</u-form-item>
<u-form-item
:label="sftype===1?'会员代表姓名':(sftype===2?'会员代表姓名':(sftype===5?'姓名':'联系人'))"
prop="contact">
<u-input v-model="form.contact" placeholder="请输入" placeholder-style="color: #D3D3D3;" />
</u-form-item>
<u-form-item
:label="sftype===1?'会员代表电话':(sftype===2?'会员代表电话':(sftype===5?'电话':'联系电话'))"
prop="tel">
<u-input v-model="form.tel" placeholder="请输入" placeholder-style="color: #D3D3D3;" />
</u-form-item> -->
<u-form-item label="单位名称" prop="title" v-if="sftype!=='5'">
<u-input v-if="sftype==='3'" v-model="form.title" placeholder="请选择" placeholderStyle="color: #D3D3D3;"
disabled disabled-color="#ffffff" suffixIcon="arrow-down" @tap="dwshow = true" />
<u-picker v-if="sftype==='3'" :show="dwshow" :columns="dwcolumns" @confirm="dwconfirm"
@cancel="dwshow = false"></u-picker>
<u-input v-if="sftype!=='3'" v-model="form.title" placeholder="请输入"
placeholder-style="color: #D3D3D3;" />
</u-form-item>
<u-form-item label="行业" prop="industry" v-if="sftype==='1'||sftype==='2'||sftype==='5'">
<u-input v-model="form.industry" placeholder="请输入" placeholder-style="color: #D3D3D3;" />
</u-form-item>
<u-form-item label="地址" prop="address" v-if="sftype==='4'">
<u-input v-model="form.address" placeholder="请选择" placeholderStyle="color: #D3D3D3;" disabled
disabled-color="#ffffff" suffixIcon="arrow-down" @tap="dzshow = true" />
<u-cascader :show="dzshow" v-model="dzvalue" :data="dzcolumns" @confirm="dzconfirm"
@close="dzshow = false"></u-cascader>
</u-form-item>
<!-- <view class="cardbox" v-if="ishowcommany">
<view v-for="(group, index) in inputGroups" :key="index" class="input-group">
<view class="inputs" @click="beforeRead(index)">
公司性质
<input class="inputclass" placeholder-class="inputplacla" disabled disabledColor="#ffffff"
:value="group.type == 1 ? '其他(自由职业者等)' : group.type === 2 ? '个体工商户' : group.type === 3 ? '民营企业' : ''"
placeholder="民营企业、个体工商户、其它(自由职业者等)" @tap="qyshow = true" />
<u-action-sheet :actions="qylist" title="请选择关联企业类型" :show="qyshow" @select="qyClick"
@close="qyshow = false"></u-action-sheet>
公司名称
<input class="inputclass" placeholder-class="inputplacla" v-model="group.title"
placeholder="请输入真实公司名称" />
营业执照
<u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" :imageMode="'heightFix'"
:width="auto" :height="144">
<view class="yyzz" v-if="group.license === ''">
<image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode="">
</image>
上传营业执照
</view>
<image v-else @click="beforeRead(index)"
style="width: 100%; height: 288rpx; margin-top: 12rpx"
:src="baseurl + '/' + group.license" mode="scaleToFill"></image>
</u-upload>
</view>
<view v-if="index > 0" class="remove-btn" @click="removeGroup(index)">-</view>
</view>
<button @click="addGroup" class="add-btn">+ 添加一组</button>
</view> -->
<!-- <u-form-item label="个人介绍" prop="introduce">
<u-textarea v-model="form.introduce" autoHeight placeholder="请输入个人介绍" placeholderStyle="color: #D3D3D3;"></u-textarea>
</u-form-item> -->
<u-form-item label="营业执照" prop="business_license" v-if="sftype==='1'||sftype==='2'">
<u-upload class="uploadbox" @afterRead="afterRead1" :maxCount="1" :imageMode="'heightFix'"
:width="auto" :height="144">
<view class="yyzz" v-if="form.business_license === ''">
<image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
请上传营业执照
</view>
<image v-else style="width: 100%; height: 600rpx; margin-top: 12rpx"
:src="baseurl + '/' + form.business_license" mode="scaleToFill"></image>
</u-upload>
</u-form-item>
</u-form>
</view>
<view class="sumitbotton">
<view class="button" @click="submit">确认提交</view>
<view class="zbtx" @click="backindex">
暂不完善
</view>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
import {
memberTagList,
memberApply,
xhMemberImprove,
xhMemprove
} from '@/api/memberCenter'
import {
onShow
} from '@dcloudio/uni-app';
import ssqdata from './slpace.json'
import useUserStore from '@/store/user'
const userStore = useUserStore()
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL)
const uPickerRef = ref(null)
//
const form = ref({
mobile: '',
member_tag_name: '',
contact: '',
tel: '',
title: '',
identity: '',
address: '',
industry: '',
business_license: ''
});
const identityname = ref('')
const ishowcommany = ref(false)
const show = ref(false);
const columns = ref([{
id: 1,
title: '个体私营企业'
},
{
id: 2,
title: '个体工商户'
},
{
id: 5,
title: '自然人'
},
{
id: 3,
title: '理事单位'
},
{
id: 4,
title: '商协会'
},
{
id: 6,
title: '其他单位'
}
]);
const dwshow = ref(false);
const dwcolumns = ref([
[{
id: '内蒙古自治区党委统战部',
text: '内蒙古自治区党委统战部'
},
{
id: '内蒙古自治区民营经济发展服务局',
text: '内蒙古自治区民营经济发展服务局'
},
{
id: '内蒙古自治区工业和信息化厅',
text: '内蒙古自治区工业和信息化厅'
},
{
id: '内蒙古自治区司法厅',
text: '内蒙古自治区司法厅'
},
{
id: '内蒙古自治区人力资源和社会保障厅',
text: '内蒙古自治区人力资源和社会保障厅'
},
{
id: '内蒙古自治区退役军人事务厅',
text: '内蒙古自治区退役军人事务厅'
},
{
id: '内蒙古自治区药品监督管理局',
text: '内蒙古自治区药品监督管理局'
},
{
id: '国家税务总局内蒙古自治区税务局',
text: '国家税务总局内蒙古自治区税务局'
},
{
id: '内蒙古自治区工商业联合会',
text: '内蒙古自治区工商业联合会'
}
]
]);
const dzshow = ref(false);
const dzvalue = ref(['内蒙古自治区'])
const dzcolumns = ref([ssqdata]);
//
const rules = {
contact: [{
required: true,
message: '请输入姓名',
trigger: ['blur', 'change'],
}, ],
tel: [{
required: true,
message: '请输入电话',
trigger: ['blur', 'change'],
}, ],
title: [{
required: true,
message: '请输入单位名称',
trigger: ['blur', 'change'],
}, ],
industry: [{
required: true,
message: '请输入行业',
trigger: ['blur', 'change'],
}, ],
member_tag_name: [{
required: true,
message: '请选择身份类别',
trigger: ['blur', 'change'],
}, ],
address: [{
required: true,
message: '请选择地址',
trigger: ['blur', 'change'],
}, ],
business_license: [{
required: true,
message: '请上传营业执照',
trigger: ['blur', 'change'],
}, ],
};
const inputGroups = ref([{
type: '',
title: '',
license: ''
}])
const addGroup = () => {
inputGroups.value.push({
type: '',
title: '',
license: ''
})
}
const qyshow = ref(false)
const qylist = ref([{
id: 1,
name: '其他(自由职业者等)',
},
{
id: 2,
name: '个体工商户',
},
{
id: 3,
name: '民营企业',
}
]);
const qyClick = async (val) => {
inputGroups.value[upclickindex.value].type = val.id
}
const removeGroup = (index) => {
inputGroups.value.splice(index, 1)
}
const upclickindex = ref(0)
const beforeRead = (index) => {
upclickindex.value = index
}
const afterRead = async (e) => {
uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url,
name: 'file',
header: {
'token': uni.getStorageSync('access_token')
},
success: async (val) => {
if (JSON.parse(val.data).data.url) {
inputGroups.value[upclickindex.value].license = JSON.parse(val.data).data.url
}
},
fail: (res) => {
console.log('失败', res);
}
})
}
const afterRead1 = async (e) => {
uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url,
name: 'file',
header: {
'token': uni.getStorageSync('access_token')
},
success: async (val) => {
if (JSON.parse(val.data).data.url) {
form.value.business_license = JSON.parse(val.data).data.url
}
},
fail: (res) => {
console.log('失败', res);
}
})
console.log(form.value);
}
//
const uFormRef = ref(null);
const confirm = (val) => {
form.value.member_tag_name = val.value[0].title
form.value.identity = val.value[0].id
show.value = false
}
const dwconfirm = (val) => {
form.value.title = val.value[0].id
dwshow.value = false
}
const dzconfirm = (val) => {
console.log(val);
form.value.address = val[1] + '-' + val[2]
dzshow.value = false
}
const backindex = () => {
uni.switchTab({
url: '/pages/index/index'
})
}
//
function submit() {
uFormRef.value.validate().then(valid => {
if (valid) {
let data = []
// inputGroups.value.forEach((obj) => {
// if (obj.type == '' || obj.title == '' || obj.license == '') {
// uni.showToast({
// title: '',
// icon: 'fail'
// })
// } else {
// data.push(obj)
// }
// })
uni.$u.toast('校验通过')
delete form.value.member_tag_name
console.log(form.value);
xhMemprove(form.value).then((res) => {
if (res.code === 1) {
uni.showToast({
title: '等待管理员审核',
icon: 'success',
duration: 2000
})
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
})
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'fail',
duration: 2000
})
}
})
}
}).catch(() => {
//
uni.$u.toast('请填写完整')
})
}
const sftype = ref('')
onLoad(async (e) => {
console.log(e);
form.value.identity = e.type
sftype.value = e.type
form.value.mobile = e.number
console.log(sftype.value);
})
</script>
<style scoped lang="scss">
.container {
background-color: #e9ecf3;
width: 100%;
height: 100vh;
overflow-y: hidden;
.formlist {
width: 100%;
max-height: calc(100vh - 168rpx);
background: #e9ecf3;
padding: 40rpx;
box-sizing: border-box;
overflow-y: auto;
.cardbox {
box-sizing: border-box;
}
.input-group {
padding: 40rpx;
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
background-color: #e2e2e2;
}
.inputs {
flex: 9;
}
input {
flex: 1;
height: 80rpx;
border: 2rpx solid #ddd;
padding: 0 20rpx;
margin-right: 10rpx;
}
.remove-btn,
.add-btn {
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
background: #f0f0f0;
border-radius: 8rpx;
}
.remove-btn {
margin-left: 20rpx;
border-radius: 50%;
width: 40rpx;
height: 40rpx;
color: #ff0000;
border: 2rpx solid #ff0000;
display: flex;
align-items: flex-end;
justify-content: center;
}
.add-btn {
width: auto;
padding: 0 30rpx;
background: #007fff;
color: white;
margin-bottom: 60rpx;
}
.inputclass {
margin-top: 12rpx;
margin-bottom: 36rpx;
margin-right: 0 !important;
height: 100rpx !important;
border-radius: 10rpx;
background: #ffffff;
}
:deep(.inputplacla) {
font-family: Source Han Sans;
font-size: 24rpx;
font-weight: 350;
line-height: 32.76rpx;
letter-spacing: normal;
color: #d3d3d3;
}
.yyzz {
margin-top: 12rpx;
width: 100%;
height: 288rpx;
border-radius: 16rpx;
background: #ffffff;
display: grid;
align-content: center;
justify-items: center;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 70rpx;
letter-spacing: normal;
color: #cccccc;
}
:deep(.u-upload) {
.u-upload__wrap {
view {
width: 100%;
}
}
}
}
.sumitbotton {
width: 100%;
height: 168rpx;
padding: 0 45px;
box-sizing: border-box;
background: #ffffff;
/* 标签栏投影 */
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0;
.button {
width: 50%;
height: 96rpx;
border-radius: 248rpx;
background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
display: flex;
align-items: center;
justify-content: center;
font-family: Source Han Sans;
font-size: 36rpx;
font-weight: 350;
color: #ffffff;
}
.zbtx {
width: 50%;
height: 96rpx;
color: #2563EB;
font-family: Source Han Sans;
font-size: 18px;
font-weight: 350;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.yyzz {
margin-top: 12rpx;
width: 100%;
height: 288rpx;
border-radius: 16rpx;
background: #ffffff;
display: grid;
align-content: center;
justify-items: center;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 70rpx;
letter-spacing: normal;
color: #cccccc;
}
:deep(.u-upload) {
.u-upload__wrap {
view {
width: 100%;
}
}
}
</style>
<style>
.u-input {
background-color: #ffffff;
height: 100rpx !important;
}
.u-form-item__body__left__content__label {
white-space: nowrap;
}
</style>

590
src/pages/memberCenter/makemessage2.vue

@ -0,0 +1,590 @@
<template>
<view class="container">
<view class="formlist">
<u-form :model="form" ref="uFormRef" label-position="top" :rules="rules">
<!-- <u-form-item label="用户身份" prop="member_tag_name">
<u-input v-model="form.member_tag_name" placeholder="请选择" placeholderStyle="color: #D3D3D3;"
disabled disabled-color="#ffffff" suffixIcon="arrow-down" @tap="show = true" />
<u-picker :show="show" :columns="[columns]" @confirm="confirm" @cancel="show = false"
keyName="title"></u-picker>
</u-form-item>
<u-form-item
:label="sftype===1?'会员代表姓名':(sftype===2?'会员代表姓名':(sftype===5?'姓名':'联系人'))"
prop="contact">
<u-input v-model="form.contact" placeholder="请输入" placeholder-style="color: #D3D3D3;" />
</u-form-item>
<u-form-item
:label="sftype===1?'会员代表电话':(sftype===2?'会员代表电话':(sftype===5?'电话':'联系电话'))"
prop="tel">
<u-input v-model="form.tel" placeholder="请输入" placeholder-style="color: #D3D3D3;" />
</u-form-item> -->
<u-form-item label="单位名称" prop="title" v-if="form.identity!==5">
<u-input v-if="form.identity===3" v-model="form.title" placeholder="请选择" placeholderStyle="color: #D3D3D3;"
disabled disabled-color="#ffffff" suffixIcon="arrow-down" @tap="dwshow = true" />
<u-picker v-if="form.identity===3" :show="dwshow" :columns="dwcolumns" @confirm="dwconfirm"
@cancel="dwshow = false"></u-picker>
<u-input v-if="form.identity!==3" v-model="form.title" placeholder="请输入"
placeholder-style="color: #D3D3D3;" />
</u-form-item>
<u-form-item label="行业" prop="industry" v-if="form.identity===1||form.identity===2||form.identity===5">
<u-input v-model="form.industry" placeholder="请输入" placeholder-style="color: #D3D3D3;" />
</u-form-item>
<u-form-item label="地址" prop="address" v-if="form.identity===4">
<u-input v-model="form.address" placeholder="请选择" placeholderStyle="color: #D3D3D3;" disabled
disabled-color="#ffffff" suffixIcon="arrow-down" @tap="dzshow = true" />
<u-cascader :show="dzshow" v-model="dzvalue" :data="dzcolumns" @confirm="dzconfirm"
@close="dzshow = false"></u-cascader>
</u-form-item>
<!-- <view class="cardbox" v-if="ishowcommany">
<view v-for="(group, index) in inputGroups" :key="index" class="input-group">
<view class="inputs" @click="beforeRead(index)">
公司性质
<input class="inputclass" placeholder-class="inputplacla" disabled disabledColor="#ffffff"
:value="group.type == 1 ? '其他(自由职业者等)' : group.type === 2 ? '个体工商户' : group.type === 3 ? '民营企业' : ''"
placeholder="民营企业、个体工商户、其它(自由职业者等)" @tap="qyshow = true" />
<u-action-sheet :actions="qylist" title="请选择关联企业类型" :show="qyshow" @select="qyClick"
@close="qyshow = false"></u-action-sheet>
公司名称
<input class="inputclass" placeholder-class="inputplacla" v-model="group.title"
placeholder="请输入真实公司名称" />
营业执照
<u-upload class="uploadbox" @afterRead="afterRead" :maxCount="1" :imageMode="'heightFix'"
:width="auto" :height="144">
<view class="yyzz" v-if="group.license === ''">
<image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode="">
</image>
上传营业执照
</view>
<image v-else @click="beforeRead(index)"
style="width: 100%; height: 288rpx; margin-top: 12rpx"
:src="baseurl + '/' + group.license" mode="scaleToFill"></image>
</u-upload>
</view>
<view v-if="index > 0" class="remove-btn" @click="removeGroup(index)">-</view>
</view>
<button @click="addGroup" class="add-btn">+ 添加一组</button>
</view> -->
<!-- <u-form-item label="个人介绍" prop="introduce">
<u-textarea v-model="form.introduce" autoHeight placeholder="请输入个人介绍" placeholderStyle="color: #D3D3D3;"></u-textarea>
</u-form-item> -->
<u-form-item label="营业执照" prop="business_license" v-if="form.identity===1||form.identity===2">
<u-upload class="uploadbox" @afterRead="afterRead1" :maxCount="1" :imageMode="'heightFix'"
:width="auto" :height="144">
<view class="yyzz" v-if="form.business_license === ''||form.business_license === null">
<image style="width: 40rpx; height: 40rpx" src="@/static/img/yyzz.png" mode=""></image>
请上传营业执照
</view>
<image v-else style="width: 100%; height: 600rpx; margin-top: 12rpx"
:src="baseurl + '/' + form.business_license" mode="scaleToFill"></image>
</u-upload>
</u-form-item>
</u-form>
</view>
<view class="sumitbotton">
<view class="button" @click="submit">确认提交</view>
<view class="zbtx" @click="backindex">
暂不完善
</view>
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue';
import {
memberTagList,
memberApply,
xhMemberImprove,
xhMemprove
} from '@/api/memberCenter'
import {
onShow
} from '@dcloudio/uni-app';
import ssqdata from './slpace.json'
import useUserStore from '@/store/user'
const userStore = useUserStore()
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL)
const uPickerRef = ref(null)
//
const form = ref({
mobile: '',
member_tag_name: '',
contact: '',
tel: '',
title: '',
identity: '',
address: '',
industry: '',
business_license: ''
});
const identityname = ref('')
const ishowcommany = ref(false)
const show = ref(false);
const columns = ref([{
id: 1,
title: '个体私营企业'
},
{
id: 2,
title: '个体工商户'
},
{
id: 5,
title: '自然人'
},
{
id: 3,
title: '理事单位'
},
{
id: 4,
title: '商协会'
},
{
id: 6,
title: '其他单位'
}
]);
const dwshow = ref(false);
const dwcolumns = ref([
[{
id: '内蒙古自治区党委统战部',
text: '内蒙古自治区党委统战部'
},
{
id: '内蒙古自治区民营经济发展服务局',
text: '内蒙古自治区民营经济发展服务局'
},
{
id: '内蒙古自治区工业和信息化厅',
text: '内蒙古自治区工业和信息化厅'
},
{
id: '内蒙古自治区司法厅',
text: '内蒙古自治区司法厅'
},
{
id: '内蒙古自治区人力资源和社会保障厅',
text: '内蒙古自治区人力资源和社会保障厅'
},
{
id: '内蒙古自治区退役军人事务厅',
text: '内蒙古自治区退役军人事务厅'
},
{
id: '内蒙古自治区药品监督管理局',
text: '内蒙古自治区药品监督管理局'
},
{
id: '国家税务总局内蒙古自治区税务局',
text: '国家税务总局内蒙古自治区税务局'
},
{
id: '内蒙古自治区工商业联合会',
text: '内蒙古自治区工商业联合会'
}
]
]);
const dzshow = ref(false);
const dzvalue = ref(['内蒙古自治区'])
const dzcolumns = ref([ssqdata]);
//
const rules = {
contact: [{
required: true,
message: '请输入姓名',
trigger: ['blur', 'change'],
}, ],
tel: [{
required: true,
message: '请输入电话',
trigger: ['blur', 'change'],
}, ],
title: [{
required: true,
message: '请输入单位名称',
trigger: ['blur', 'change'],
}, ],
industry: [{
required: true,
message: '请输入行业',
trigger: ['blur', 'change'],
}, ],
member_tag_name: [{
required: true,
message: '请选择身份类别',
trigger: ['blur', 'change'],
}, ],
address: [{
required: true,
message: '请选择地址',
trigger: ['blur', 'change'],
}, ],
business_license: [{
required: true,
message: '请上传营业执照',
trigger: ['blur', 'change'],
}, ],
};
const inputGroups = ref([{
type: '',
title: '',
license: ''
}])
const addGroup = () => {
inputGroups.value.push({
type: '',
title: '',
license: ''
})
}
const qyshow = ref(false)
const qylist = ref([{
id: 1,
name: '其他(自由职业者等)',
},
{
id: 2,
name: '个体工商户',
},
{
id: 3,
name: '民营企业',
}
]);
const qyClick = async (val) => {
inputGroups.value[upclickindex.value].type = val.id
}
const removeGroup = (index) => {
inputGroups.value.splice(index, 1)
}
const upclickindex = ref(0)
const beforeRead = (index) => {
upclickindex.value = index
}
const afterRead = async (e) => {
uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url,
name: 'file',
header: {
'token': uni.getStorageSync('access_token')
},
success: async (val) => {
if (JSON.parse(val.data).data.url) {
inputGroups.value[upclickindex.value].license = JSON.parse(val.data).data.url
}
},
fail: (res) => {
console.log('失败', res);
}
})
}
const afterRead1 = async (e) => {
uni.uploadFile({
url: import.meta.env.VITE_APP_BASE_URL + '/api/file/image',
filePath: e.file.url,
name: 'file',
header: {
'token': uni.getStorageSync('access_token')
},
success: async (val) => {
if (JSON.parse(val.data).data.url) {
form.value.business_license = JSON.parse(val.data).data.url
}
},
fail: (res) => {
console.log('失败', res);
}
})
console.log(form.value);
}
//
const uFormRef = ref(null);
const confirm = (val) => {
form.value.member_tag_name = val.value[0].title
form.value.identity = val.value[0].id
show.value = false
}
const dwconfirm = (val) => {
form.value.title = val.value[0].id
dwshow.value = false
}
const dzconfirm = (val) => {
console.log(val);
form.value.address = val[1] + '-' + val[2]
dzshow.value = false
}
const backindex = () => {
uni.switchTab({
url: '/pages/index/index'
})
}
//
function submit() {
uFormRef.value.validate().then(valid => {
if (valid) {
let data = []
// inputGroups.value.forEach((obj) => {
// if (obj.type == '' || obj.title == '' || obj.license == '') {
// uni.showToast({
// title: '',
// icon: 'fail'
// })
// } else {
// data.push(obj)
// }
// })
uni.$u.toast('校验通过')
delete form.value.member_tag_name
console.log(form.value);
xhMemprove(form.value).then((res) => {
if (res.code === 1) {
uni.showToast({
title: '等待管理员审核',
icon: 'success',
duration: 2000
})
setTimeout(() => {
uni.navigateBack()
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'fail',
duration: 2000
})
}
})
}
}).catch(() => {
//
uni.$u.toast('请填写完整')
})
}
onLoad(async (e) => {
form.value = userStore.userInfo
})
</script>
<style scoped lang="scss">
.container {
background-color: #e9ecf3;
width: 100%;
height: 100vh;
overflow-y: hidden;
.formlist {
width: 100%;
max-height: calc(100vh - 168rpx);
background: #e9ecf3;
padding: 40rpx;
box-sizing: border-box;
overflow-y: auto;
.cardbox {
box-sizing: border-box;
}
.input-group {
padding: 40rpx;
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 20rpx;
background-color: #e2e2e2;
}
.inputs {
flex: 9;
}
input {
flex: 1;
height: 80rpx;
border: 2rpx solid #ddd;
padding: 0 20rpx;
margin-right: 10rpx;
}
.remove-btn,
.add-btn {
width: 80rpx;
height: 80rpx;
display: flex;
justify-content: center;
align-items: center;
background: #f0f0f0;
border-radius: 8rpx;
}
.remove-btn {
margin-left: 20rpx;
border-radius: 50%;
width: 40rpx;
height: 40rpx;
color: #ff0000;
border: 2rpx solid #ff0000;
display: flex;
align-items: flex-end;
justify-content: center;
}
.add-btn {
width: auto;
padding: 0 30rpx;
background: #007fff;
color: white;
margin-bottom: 60rpx;
}
.inputclass {
margin-top: 12rpx;
margin-bottom: 36rpx;
margin-right: 0 !important;
height: 100rpx !important;
border-radius: 10rpx;
background: #ffffff;
}
:deep(.inputplacla) {
font-family: Source Han Sans;
font-size: 24rpx;
font-weight: 350;
line-height: 32.76rpx;
letter-spacing: normal;
color: #d3d3d3;
}
.yyzz {
margin-top: 12rpx;
width: 100%;
height: 288rpx;
border-radius: 16rpx;
background: #ffffff;
display: grid;
align-content: center;
justify-items: center;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 70rpx;
letter-spacing: normal;
color: #cccccc;
}
:deep(.u-upload) {
.u-upload__wrap {
view {
width: 100%;
}
}
}
}
.sumitbotton {
width: 100%;
height: 168rpx;
padding: 0 45px;
box-sizing: border-box;
background: #ffffff;
/* 标签栏投影 */
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0, 0, 0, 0.3);
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0;
.button {
width: 50%;
height: 96rpx;
border-radius: 248rpx;
background: linear-gradient(90deg, #007fff 0%, #99ccff 100%);
display: flex;
align-items: center;
justify-content: center;
font-family: Source Han Sans;
font-size: 36rpx;
font-weight: 350;
color: #ffffff;
}
.zbtx {
width: 50%;
height: 96rpx;
color: #2563EB;
font-family: Source Han Sans;
font-size: 18px;
font-weight: 350;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.yyzz {
margin-top: 12rpx;
width: 100%;
height: 288rpx;
border-radius: 16rpx;
background: #ffffff;
display: grid;
align-content: center;
justify-items: center;
font-family: Source Han Sans;
font-size: 30rpx;
font-weight: 350;
line-height: 70rpx;
letter-spacing: normal;
color: #cccccc;
}
:deep(.u-upload) {
.u-upload__wrap {
view {
width: 100%;
}
}
}
</style>
<style>
.u-input {
background-color: #ffffff;
height: 100rpx !important;
}
.u-form-item__body__left__content__label {
white-space: nowrap;
}
</style>

2
src/pages/memberCenter/memberRegistration.vue

@ -1,6 +1,8 @@
<template> <template>
<view class="container"> <view class="container">
<u-navbar title="会员注册" placeholder="true" auto-back="true" bg-color="#F1F3F9" left-icon-size="24"></u-navbar> <u-navbar title="会员注册" placeholder="true" auto-back="true" bg-color="#F1F3F9" left-icon-size="24"></u-navbar>
<view style="margin-top: 30rpx;display: flex;justify-content: center;font-size: 40rpx;">内蒙古自治区个体私营企业协会简介</view>
<view style="margin-top: 40rpx;padding: 0 20rpx;line-height: 52rpx;">内蒙古自治区个体私营企业协会(简称内蒙古个私协会英文名称为Inner MongoliaPrivate-Owned Business Association缩写IMPBA)是全区个体工商户私营企业等组织及个人自愿组成的全区联合性非营利性社会团体协会始终坚持以习近平新时代中国特色社会主义思想为指导深入贯彻落实习近平总书记致全国个体劳动者第五次代表大会贺信精神在中国个体劳动者协会自治区市场监督管理局的正确指导和大力支持下充分发挥桥梁纽带作用积极履行服务政府服务会员服务社会的职能作用努力当好政策法规的普及者深化改革的推动者能力素质的提升者党的建设的组织者勠力同心创变求进政治引领和服务发展同推进共同助力内蒙古个体私营经济持续健康发展</view>
<view class="butp"> <view class="butp">
<view class="but" @click="gozc"> <view class="but" @click="gozc">
确认注册 确认注册

17
src/pages/memberCenter/memberZc.vue

@ -55,16 +55,19 @@
code: e.detail.code code: e.detail.code
}).then(res => { }).then(res => {
if (res.code === 1) { if (res.code === 1) {
uni.showToast({ // uni.showToast({
title: '注册成功', // title: '',
icon: 'none', // icon: 'none',
duration: 2000 // duration: 2000
}) // })
setTimeout(() => { // setTimeout(() => {
// uni.navigateTo({
// url: '/pages/memberCenter/inpart?number=' + res.data.mobile
// })
// }, 2000)
uni.navigateTo({ uni.navigateTo({
url: '/pages/memberCenter/inpart?number=' + res.data.mobile url: '/pages/memberCenter/inpart?number=' + res.data.mobile
}) })
}, 2000)
} }
}) })
} else { } else {

19
src/pages/mine/index.vue

@ -27,7 +27,7 @@
</view> </view>
<image style="width: 14.14rpx; height: 14.14rpx" src="@/static/img/Group13.png" mode=""></image> <image style="width: 14.14rpx; height: 14.14rpx" src="@/static/img/Group13.png" mode=""></image>
</view> </view>
<view class="editone" @click="goeditinfo('完善入会信息')" v-if="showwsmsg"> <view class="editone" @click="goeditinfo('完善入会信息')" v-if="userStore.userInfo.status === 1">
<view class="left"> <view class="left">
<image style="width: 74rpx; height: 74rpx" src="@/static/img/wdkc.png" mode=""></image> <image style="width: 74rpx; height: 74rpx" src="@/static/img/wdkc.png" mode=""></image>
<text class="txt">完善入会信息</text> <text class="txt">完善入会信息</text>
@ -83,7 +83,7 @@
}) })
} else if (val === '完善入会信息') { } else if (val === '完善入会信息') {
uni.navigateTo({ uni.navigateTo({
url: '/pages/memberCenter/inpart?number='+userStore.userInfo.moblie url: '/pages/memberCenter/makemessage2?number='+userStore.userInfo.moblie
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
@ -96,15 +96,13 @@
userStore.logOut() userStore.logOut()
logintype.value = !logintype.value logintype.value = !logintype.value
} }
const showwsmsg = ref(false)
onShow(() => { function isEmptyObject(obj) {
myInfo().then(res => { return Object.keys(obj).length !== 0;
if(res.data.id) {
showwsmsg.value = true
} else {
showwsmsg.value = false
} }
})
onShow(() => {
logintype.value = uni.getStorageSync('access_token') logintype.value = uni.getStorageSync('access_token')
if (!logintype.value) { if (!logintype.value) {
userStore.userInfo = {} userStore.userInfo = {}
@ -115,6 +113,7 @@
// }) // })
// } else { // } else {
userStore.getUserInfo() userStore.getUserInfo()
console.log(userStore.userInfo.status);
// } // }
}) })
</script> </script>

BIN
src/static/img/ewmicon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

BIN
src/static/img/hyewm.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
src/static/img/hyzcicon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

BIN
src/static/img/iconhqt.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 29 KiB

5
src/store/user.ts

@ -57,10 +57,7 @@ export default defineStore(
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '退出成功', title: '退出成功',
mask: true, mask: true
success() {
setTimeout(() => uni.navigateTo({ url: 'pages/login/login' }), 1000)
}
}) })
} }
} }

Loading…
Cancel
Save