Merge remote-tracking branch 'origin/master'

# Conflicts:
#	api/business/member.js
This commit is contained in:
13405411873 2025-04-10 09:37:42 +08:00
commit 742b399651
16 changed files with 935 additions and 50 deletions

View File

@ -8,6 +8,20 @@ export function bloggerDetail(userId) {
url: '/member/member/bloggerDetail/' + userId, url: '/member/member/bloggerDetail/' + userId,
method: 'get' method: 'get'
}) })
export function queryDetail(params) {
return request({
url: '/member/member/queryDetail',
method: 'get',
params:params
})
}
//保存博主
export function uniSaveMember(data) {
return request({
url: '/member/member/uniSaveMember',
method: 'post',
data:data
})
} }
@ -99,6 +113,7 @@ export function getById(params) {
params: params params: params
}) })
} }
//获取会员权益 //获取会员权益
export function selectMemberRights() { export function selectMemberRights() {
return request({ return request({

View File

@ -27,6 +27,12 @@ module.exports = {
}, { }, {
title: "认证指南", title: "认证指南",
code: "user_auth_text" code: "user_auth_text"
}, {
title: "了解通告券",
code: "coupon_text"
}, {
title: "通告券购买协议",
code: "coupon_agreement"
} }
] ]
} }

View File

@ -161,6 +161,27 @@
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
} }
},
{
"path": "coupon/coupon-list",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "coupon/my-coupon",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "history/history",
"style": {
"navigationBarTitleText": "",
"componentPlaceholder": {
"notice-item": "view"
}
}
} }
] ]
}], }],

View File

@ -15,12 +15,9 @@
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled <scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered"> @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item> <my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item>
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item> <view style="text-align: center" v-if="dataList.length==0">
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item>
<my-notice-item v-if="dataList.length>0" :dataList="dataList"></my-notice-item>
<!-- <view style="text-align: center" v-if="dataList.length==0">
<image class="" src="@/static/images/nothing.png"></image> <image class="" src="@/static/images/nothing.png"></image>
</view> --> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>

View File

@ -9,7 +9,7 @@
<view style="padding-bottom: 20rpx;">我是</view> <view style="padding-bottom: 20rpx;">我是</view>
<view class="bg-img">{{identityTypeText}}</view> <view class="bg-img">{{identityTypeText}}</view>
</view> </view>
<view class="title-right" @click="viewAuthText()">认证指南<uni-icons type="right" color="#623109" <view class="title-right" @click="viewRichText()">认证指南<uni-icons type="right" color="#623109"
size="12"></uni-icons></view> size="12"></uni-icons></view>
</view> </view>
<view class="form-warn"> <view class="form-warn">
@ -252,7 +252,7 @@
this.identityTypeText = getTextByIdentityType(option.key) this.identityTypeText = getTextByIdentityType(option.key)
}, },
methods: { methods: {
viewAuthText() { viewRichText() {
this.$tab.navigateTo( this.$tab.navigateTo(
`/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[4].title}&code=${this.globalConfig.appInfo.agreements[4].code}` `/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[4].title}&code=${this.globalConfig.appInfo.agreements[4].code}`
) )

View File

@ -0,0 +1,215 @@
<template>
<view class="container-box">
<navigation-bar-vue title="通告券" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="content">
<view class="content-body">
<image class="huojian" src="@/static/mine/coupon/huojian.png" mode="aspectFit"></image>
<view class="coupon-box">
<view class="left-top">
<view class="left-space"></view>
<image src="@/static/mine/auth/dian.png" mode="aspectFit"></image>
<view style="padding-bottom: 20rpx;">获取更多</view>
<view class="bg-img">加速特权</view>
</view>
<view class="content-img">
</view>
<view class="bottom-content">
<view class="top-text">剩余<text>0</text></view>
<view class="button-dom" @click="goMyCoupon(0)">去获取</view>
</view>
</view>
</view>
<view class="item-field" style="align-items: center;">
<view class="my-suggest-dom" @click="viewRichText()">
<text>了解通告券</text>
<uni-icons type="right" color="#363636" size="14"></uni-icons>
</view>
<view class="my-suggest-dom" @click="goMyCoupon(1)">
<text>购买记录</text>
<uni-icons type="right" color="#363636" size="14"></uni-icons>
</view>
</view>
</view>
</view>
</template>
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
export default {
components: {
navigationBarVue
},
data() {
return {
globalConfig: getApp().globalData.config,
}
},
methods: {
viewRichText() {
this.$tab.navigateTo(
`/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[5].title}&code=${this.globalConfig.appInfo.agreements[5].code}`
)
},
goMyCoupon(index) {
this.$tab.navigateTo(
`/pages/mine/coupon/my-coupon?index=${index}`
)
}
}
}
</script>
<style lang="scss">
.container-box {
padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4;
background-color: white;
width: 100%;
color: #363636;
font-size: 30rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.content {
border-top: 1rpx solid #F4F4F4;
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll;
width: 100%;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.content-body {
width: 100%;
padding: 60rpx 30rpx 20rpx 30rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.huojian {
width: 100rpx;
height: 180rpx;
z-index: 99;
position: absolute;
top: -10rpx;
left: 40rpx;
}
.coupon-box {
width: 100%;
background-image: url("/static/mine/coupon/bg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
border-radius: 20rpx;
padding-bottom: 30rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.left-top {
width: 100%;
padding: 30rpx 0;
display: flex;
align-items: center;
justify-content: start;
font-weight: bold;
font-size: 34rpx;
.bg-img {
padding-bottom: 20rpx;
background-image: url('/static/mine/auth/xiantiao.png');
background-repeat: no-repeat;
background-position: bottom right;
background-size: 100% 50%;
}
.left-space {
width: 200rpx;
}
image {
width: 30rpx;
height: 30rpx;
margin-bottom: 20rpx;
margin-right: 10rpx;
}
}
.content-img {
width: 100%;
height: 200rpx;
margin-bottom: 20rpx;
}
.bottom-content {
width: 90%;
margin: 0 auto;
border-top: 1rpx solid #FB2B43;
border-top-style: dashed;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
.top-text {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 0;
text {
color: #FB2B43;
padding: 0 10rpx;
}
}
.button-dom {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0;
background-image: linear-gradient(to right, #F9605A, #FB2B43);
color: white;
border-radius: 40rpx;
font-size: 33rpx;
}
}
}
}
.item-field {
width: 100%;
display: flex;
align-items: self-start;
justify-content: center;
.my-suggest-dom {
margin: 0 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,440 @@
<template>
<view class="container-box">
<navigation-bar-vue title="通告券" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="content">
<!-- 操作按钮 -->
<view class="dl-opt-box">
<view class="dl-menu-box" v-for="(item,index) in menus">
<view @click="itemClick(index,item)" class="dl-menu"
:class="index==menuIndex?'dl-menu click':'dl-menu'">{{item}}</view>
</view>
</view>
<view style="width: 100%;" v-if="0==menuIndex">
<view class="coupon-list-box">
<view class="top-text">剩余<text>0</text></view>
<view :class="['coupon-item-box',index==couponIndex?'click':'']" v-for="(item,index) in dataList"
@click="chooseCoupon(index)">
<view class="left-dom">
<image src="@/static/mine/coupon/coupon.png" mode="aspectFit"></image>
<uni-icons type="closeempty" color="#FC1F3E" size="14"></uni-icons>
<view style="margin-left: 15rpx;">{{item.num}}</view>
</view>
<view class="right-dom">
<text>¥</text>{{item.price}}
</view>
</view>
<view class="button-dom" @click="buyFun()">购买</view>
</view>
<view class="item-field" style="align-items: center;">
<view class="my-suggest-dom" @click="viewRichText()">
<text>查看通告券购买协议</text>
</view>
</view>
</view>
<view style="width: 100%;" v-if="1==menuIndex">
<view class="buy-list-box">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus"
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view class="item-box" v-for="(item,index) in byList">
<view class="top-title-box">
<view class="order-no">订单编号{{item.orderNo}}</view>
<view :class="['order-status',item.ifPay?'payed':'no-pay']">{{item.ifPay?'已支付':'未支付'}}
</view>
</view>
<view class="detail-item">
<view class="left-dom">通告券</view>
<view class="right-dom">*{{item.num}} </view>
</view>
<view class="detail-item" style="border-bottom:1rpx solid #F4F4F4;padding-bottom: 25rpx;">
<view class="left-dom">金额</view>
<view class="right-dom">{{item.price}} </view>
</view>
<view class="bottom-item">
下单时间{{item.createTime}}
</view>
</view>
<view style="text-align: center" v-if="byList.length==0">
<image class="" src="@/static/images/nothing.png"></image>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
</template>
<script>
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {
toast,
hasRights
} from '@/utils/common.js'
export default {
components: {
navigationBarVue
},
data() {
return {
globalConfig: getApp().globalData.config,
menus: ['通告券', '购买记录'],
menuIndex: 0,
//
couponIndex: 0,
queryParams: {
pageNum: 1,
pageSize: 10
},
total: 0,
//
isTriggered: false,
dataList: [{
id: "3",
num: 5,
price: 20
}, {
id: "2",
num: 10,
price: 40
}, {
id: "1",
num: 20,
price: 80
}],
//
byList: [{
id: "1",
orderNo: "111",
num: 20,
price: 80,
ifPay: true,
createTime: "2024-02-03 12:23:00"
}, {
id: "2",
orderNo: "111",
num: 10,
price: 40,
ifPay: false,
createTime: "2024-02-03 12:23:00"
}]
}
},
onLoad(option) {
this.menuIndex = option.index
},
methods: {
/**
* 菜单点击
* @param {Object} index
* @param {Object} item
*/
itemClick(index, item) {
this.menuIndex = index
},
/**
* 选中的优惠券
* @param {Object} index
*/
chooseCoupon(index) {
this.couponIndex = index
},
buyFun() {
},
viewRichText() {
this.$tab.navigateTo(
`/pages/common/richview/index?title=${this.globalConfig.appInfo.agreements[6].title}&code=${this.globalConfig.appInfo.agreements[6].code}`
)
},
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
toast("没有更多数据了")
return
}
//+1,
this.queryParams.pageNum++
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
},
}
}
</script>
<style lang="scss">
.container-box {
padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4;
background-color: white;
width: 100%;
color: #363636;
font-size: 30rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.content {
border-top: 1rpx solid #F4F4F4;
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll;
width: 100%;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.dl-opt-box {
background-color: white;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.dl-menu-box {
color: #929292;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
width: 100%;
padding-top: 20rpx;
.dl-menu {
width: 120rpx;
font-size: 30rpx;
margin: 0 20rpx;
padding-bottom: 15rpx;
text-align: center;
}
.click {
color: #FF434E;
font-weight: bold;
border-bottom: 2px solid #FF434E;
}
}
.seting {
font-size: 30rpx;
width: 180rpx;
display: flex;
align-items: center;
justify-content: center;
image {
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
}
}
.buy-list-box {
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 174rpx);
width: 100%;
padding: 20rpx 30rpx 0 30rpx;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.item-box {
margin-bottom: 20rpx;
background-color: white;
border-radius: 15rpx;
padding: 25rpx;
width: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
.top-title-box {
padding-top: 10rpx;
padding-bottom: 20rpx;
margin-bottom: 15rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: start;
border-bottom: 1rpx solid #F4F4F4;
.order-no {
flex: 1;
font-weight: bold;
display: flex;
align-items: center;
justify-content: start;
}
.order-status {
font-size: 27rpx;
padding: 5rpx 15rpx;
border-radius: 25rpx;
color: white;
}
.no-pay {
background-color: #929292;
}
.payed {
background-color: #FC1F3E;
}
}
.detail-item {
width: 100%;
padding: 10rpx 0;
display: flex;
align-items: center;
justify-content: start;
.left-dom {
display: flex;
align-items: center;
justify-content: start;
width: 200rpx;
}
.right-dom {
display: flex;
align-items: center;
justify-content: flex-end;
flex: 1;
}
}
.bottom-item {
padding-top: 15rpx;
font-size: 26rpx;
color: #929292;
}
}
}
.coupon-list-box {
margin-top: 20rpx;
background-color: white;
border-radius: 20rpx;
padding: 30rpx 20rpx;
margin-left: 30rpx;
margin-right: 30rpx;
width: calc(100% - 60rpx);
flex-direction: column;
display: flex;
align-items: self-start;
justify-content: center;
.top-text {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding-bottom: 30rpx;
text {
color: #FB2B43;
padding: 0 10rpx;
}
}
.coupon-item-box {
width: 100%;
padding: 30rpx 40rpx 30rpx 20rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
background-color: #FFE9EC;
border: 2rpx solid #FFE9EC;
border-radius: 15rpx;
color: #FC1F3E;
.left-dom {
flex: 1;
display: flex;
align-items: center;
justify-content: flex-start;
image {
width: 60rpx;
height: 60rpx;
margin-right: 15rpx;
}
}
.right-dom {
width: 200rpx;
display: flex;
align-items: baseline;
justify-content: flex-end;
font-weight: bold;
font-size: 36rpx;
text {
font-weight: normal;
margin-right: 8rpx;
font-size: 18rpx;
}
}
}
.click {
border: 2rpx solid #FC1F3E !important;
}
.button-dom {
margin-top: 30rpx;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 20rpx 0;
background-image: linear-gradient(to right, #F9605A, #FB2B43);
color: white;
border-radius: 40rpx;
font-size: 33rpx;
}
}
.item-field {
color: #929292;
width: 100%;
display: flex;
align-items: self-start;
justify-content: center;
.my-suggest-dom {
margin: 0 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,127 @@
<template>
<view class="container-box">
<navigation-bar-vue title="足迹" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue>
<view class="content">
<scroll-view style="height: 100%;" scroll-y="true" @scrolltolower="onReachBottomCus" refresher-enabled
@refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
<view class="item-field" style="align-items: center;">
<view class="my-suggest-dom">
<text>最近{{maxHisNum}}条通告浏览记录</text>
</view>
</view>
<notice-item v-if="dataList.length>0" :dataList="dataList" @goDetail="goDetail()"></notice-item>
<view style="text-align: center" v-if="dataList.length==0">
<image class="" src="@/static/images/nothing.png"></image>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
import noticeItem from '@/pages/components/notice-item.vue'
import navigationBarVue from '@/components/navigation/navigationBar.vue';
import {
toast,
hasRights
} from '@/utils/common.js'
export default {
components: {
navigationBarVue,
noticeItem
},
data() {
return {
dataList: ['', '', '', '', '', '', ''],
queryParams: {
pageNum: 1,
pageSize: 10
},
total: 0,
//
isTriggered: false,
//
maxHisNum: 20,
}
},
methods: {
/**
* 上滑加载数据
*/
onReachBottomCus() {
// *
if (this.queryParams.pageNum * this.queryParams.pageSize >= this.total) {
toast("没有更多数据了")
return
}
//+1,
this.queryParams.pageNum++
},
/**
* 下拉刷新数据
*/
onRefresherrefresh() {
this.isTriggered = true
this.queryParams.pageNum = 1
this.total = 0
},
/**
* 查看通告详情
* @param {Object} item
*/
goDetail(item) {
this.$tab.navigateTo(`/pages/notice/detail?id=${item.id}`)
}
}
}
</script>
<style lang="scss">
.container-box {
padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4;
background-color: white;
width: 100%;
color: #363636;
font-size: 30rpx;
height: 100%;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: center;
position: relative;
.content {
border-top: 1rpx solid #F4F4F4;
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll;
width: 100%;
padding: 10rpx 30rpx;
background-color: #F2F2F2;
border-radius: 20rpx;
display: flex;
flex-direction: column;
align-items: self-start;
justify-content: start;
position: relative;
.item-field {
color: #929292;
width: 100%;
display: flex;
align-items: self-start;
justify-content: center;
.my-suggest-dom {
margin: 0 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
margin-top: 20rpx;
}
}
}
}
</style>

View File

@ -98,13 +98,13 @@
<view class="text-dom">通告主认证</view> <view class="text-dom">通告主认证</view>
<uni-icons type="right" color="#623109" size="12"></uni-icons> <uni-icons type="right" color="#623109" size="12"></uni-icons>
</view> </view>
<view class="menu-item" v-if="'01'==localUserType"> <view class="menu-item" v-if="'01'==localUserType" @click="goCoupon()">
<!-- <image src="@/static/mine/zuji.png" mode="aspectFit"></image> --> <!-- <image src="@/static/mine/zuji.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/tonggaoquan.png" mode="aspectFit"></image> <image src="@/static/mine/caise/tonggaoquan.png" mode="aspectFit"></image>
<view class="text-dom">通告券</view> <view class="text-dom">通告券</view>
<uni-icons type="right" color="#623109" size="12"></uni-icons> <uni-icons type="right" color="#623109" size="12"></uni-icons>
</view> </view>
<view class="menu-item"> <view class="menu-item" @click="goHistory()">
<!-- <image src="@/static/mine/zuji.png" mode="aspectFit"></image> --> <!-- <image src="@/static/mine/zuji.png" mode="aspectFit"></image> -->
<image src="@/static/mine/caise/zuji.png" mode="aspectFit"></image> <image src="@/static/mine/caise/zuji.png" mode="aspectFit"></image>
<view class="text-dom">足迹</view> <view class="text-dom">足迹</view>
@ -182,7 +182,7 @@
getStrData getStrData
} from '@/utils/auth.js' } from '@/utils/auth.js'
import { import {
bloggerDetail queryDetail
} from '@/api/business/member.js' } from '@/api/business/member.js'
export default { export default {
props: { props: {
@ -215,7 +215,6 @@
popupImgUrl: "", popupImgUrl: "",
} }
}, },
mounted() {},
onShow() { onShow() {
}, },
@ -225,7 +224,7 @@
mounted() { mounted() {
if (null != getJSONData(constant.userInfo)) { if (null != getJSONData(constant.userInfo)) {
this.userInfo = getJSONData(constant.userInfo) this.userInfo = getJSONData(constant.userInfo)
this.getBloggerDetail() this.getDetail()
} }
}, },
computed: { computed: {
@ -240,11 +239,15 @@
// open uni-popup type // open uni-popup type
this.$refs.popup.open(type) this.$refs.popup.open(type)
}, },
getBloggerDetail() { getDetail() {
bloggerDetail(this.userInfo.userId).then(res => { queryDetail({
userId: this.userInfo.userId,
userType: this.localUserType
}).then(res => {
this.userInfo.tfansNum = res.data.tfansNum.toString() this.userInfo.tfansNum = res.data.tfansNum.toString()
this.userInfo.pointsBalance = res.data.pointsBalance.toString() this.userInfo.pointsBalance = res.data.pointsBalance.toString()
this.userInfo.report = res.data.report.toString() this.userInfo.report = res.data.report.toString()
this.userInfo.avatar = this.imageUrl + res.data.avatar
}) })
}, },
/** /**
@ -254,6 +257,7 @@
changeUserType(type) changeUserType(type)
this.localUserType = type this.localUserType = type
this.$emit('update:nowUserType', this.localUserType) this.$emit('update:nowUserType', this.localUserType)
this.getDetail()
this.$forceUpdate() this.$forceUpdate()
}, },
handleToInfo() { handleToInfo() {
@ -280,14 +284,21 @@
goAuth() { goAuth() {
this.$tab.navigateTo('/pages/mine/auth/auth-choose') this.$tab.navigateTo('/pages/mine/auth/auth-choose')
}, },
goCoupon() {
this.$tab.navigateTo('/pages/mine/coupon/coupon-list')
},
goHistory() {
this.$tab.navigateTo('/pages/mine/history/history')
},
goMemberCard() { goMemberCard() {
this.$tab.navigateTo('/pages/mine/member/member-card?userType='+this.localUserType) this.$tab.navigateTo('/pages/mine/member/member-card?userType=' + this.localUserType)
}, },
/** /**
* 跳转编辑页 * 跳转编辑页
*/ */
goEdit() { goEdit() {
this.$tab.navigateTo('/pages/mine/set/my-info') this.$tab.navigateTo('/pages/mine/set/my-info?userType=' + this.localUserType + '&userId=' + this.userInfo
.userId)
}, },
viewNewPeople() { viewNewPeople() {
this.$tab.navigateTo( this.$tab.navigateTo(

View File

@ -5,7 +5,7 @@
<view class="form-data-box"> <view class="form-data-box">
<!-- 基础表单校验 --> <!-- 基础表单校验 -->
<uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData"> <uni-forms ref="valiForm" :rules="rules" :modelValue="valiFormData">
<uni-forms-item labelWidth="280rpx" label="头像" required name="avatar"> <uni-forms-item labelWidth="280rpx" label="头像" name="avatar">
<uni-file-picker small="true" :value="fileList" :sizeType="sizeType" @select="afterRead" <uni-file-picker small="true" :value="fileList" :sizeType="sizeType" @select="afterRead"
@delete="deleteFile" limit="1"></uni-file-picker> @delete="deleteFile" limit="1"></uni-file-picker>
</uni-forms-item> </uni-forms-item>
@ -18,15 +18,15 @@
<uni-forms-item labelWidth="280rpx" label="绑定手机号" required name="userName"> <uni-forms-item labelWidth="280rpx" label="绑定手机号" required name="userName">
<uni-easyinput disabled v-model="valiFormData.userName" /> <uni-easyinput disabled v-model="valiFormData.userName" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item labelWidth="280rpx" label="收款码" required name="tRecipientImage"> <uni-forms-item labelWidth="280rpx" label="收款码" name="trecipientImage">
<uni-file-picker small="true" :value="recipientImageList" :sizeType="sizeType" <uni-file-picker small="true" :value="recipientImageList" :sizeType="sizeType"
@select="afterReadRecipient" @delete="deleteFileRecipient" limit="1"></uni-file-picker> @select="afterReadRecipient" @delete="deleteFileRecipient" limit="1"></uni-file-picker>
</uni-forms-item> </uni-forms-item>
<uni-forms-item labelWidth="280rpx" label="收款码真实姓名" required name="tRecipientName"> <uni-forms-item labelWidth="280rpx" label="收款码真实姓名" name="trecipientName">
<uni-easyinput v-model="valiFormData.tRecipientName" placeholder="请输入" /> <uni-easyinput v-model="valiFormData.trecipientName" placeholder="请输入" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item labelWidth="280rpx" label="通告报名免打扰" required name="tOpenDisturb"> <uni-forms-item labelWidth="280rpx" label="通告报名免打扰" name="topenDisturb">
<uni-data-checkbox v-model="valiFormData.tOpenDisturb" :localdata="ranges" /> <uni-data-checkbox v-model="valiFormData.topenDisturb" :localdata="ranges" />
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<button type="primary" style="background-color: #FC2B49;" @click="submit('valiForm')">提交</button> <button type="primary" style="background-color: #FC2B49;" @click="submit('valiForm')">提交</button>
@ -38,17 +38,25 @@
<script> <script>
import navigationBarVue from '@/components/navigation/navigationBar.vue'; import navigationBarVue from '@/components/navigation/navigationBar.vue';
import config from '@/config'
import {
queryDetail,uniSaveMember
} from '@/api/business/member.js'
import upload from '@/utils/upload'
export default { export default {
components: { components: {
navigationBarVue navigationBarVue
}, },
data() { data() {
return { return {
userType:'',
sizeType: ['compressed'], sizeType: ['compressed'],
// //
fileList: [], fileList: [],
fileImageUrl:[],
// //
recipientImageList: [], recipientImageList: [],
recipientImageUrl: [],
ranges: [{ ranges: [{
text: '开启', text: '开启',
value: "1" value: "1"
@ -62,18 +70,18 @@
nickName: "", nickName: "",
phonenumber: "", phonenumber: "",
userName: "", userName: "",
tRecipientImage: "", trecipientImage: "",
tRecipientName: "", trecipientName: "",
tOpenDisturb: "0" topenDisturb: "0"
}, },
// //
rules: { rules: {
avatar: { // avatar: {
rules: [{ // rules: [{
required: true, // required: true,
errorMessage: '头像不能为空' // errorMessage: ''
}] // }]
}, // },
nickName: { nickName: {
rules: [{ rules: [{
required: true, required: true,
@ -86,35 +94,76 @@
errorMessage: '联系方式不能为空' errorMessage: '联系方式不能为空'
}] }]
}, },
tRecipientImage: { // trecipientImage: {
rules: [{ // rules: [{
required: true, // required: true,
errorMessage: '收款码不能为空' // errorMessage: ''
}] // }]
}, // },
tRecipientName: { // trecipientName: {
rules: [{ // rules: [{
required: true, // required: true,
errorMessage: '收款码真实姓名不能为空' // errorMessage: ''
}] // }]
}, // },
}, },
} }
}, },
onLoad(options){
this.userType = options.userType
this.userId = options.userId
this.initData(options.userType,options.userId)
},
methods: { methods: {
goMyBlackList() { goMyBlackList() {
this.$tab.navigateTo('/pages/mine/set/black-list') this.$tab.navigateTo('/pages/mine/set/black-list')
}, },
submit(ref) { submit(ref) {
this.valiFormData.avatar = this.fileImageUrl.join(',');
this.valiFormData.trecipientImage = this.recipientImageUrl.join(',');
let that = this
this.$refs[ref].validate().then(res => { this.$refs[ref].validate().then(res => {
console.log('success', res); uniSaveMember(that.valiFormData).then(res => {
uni.showToast({ uni.showToast({
title: `校验通过` icon: 'success',
}) duration: 2000,
title: '保存成功'
});
uni.navigateBack()
})
}).catch(err => { }).catch(err => {
console.log('err', err); console.log('err', err);
}) })
}, },
/**初始化数据*/
initData(userType,userId){
this.fileList = []
this.fileImageUrl = []
this.recipientImageList = []
this.recipientImageUrl = []
queryDetail({userType:userType,userId:userId}).then(res=>{
console.log(res,131)
this.valiFormData = res.data
if (this.valiFormData.avatar != null && this.valiFormData.avatar != ''){
this.fileImageUrl = this.valiFormData.avatar.split(',')
this.fileImageUrl.map((item)=>{
this.fileList.push({
url:config.baseUrl + item
})
})
}
if (this.valiFormData.trecipientImage != null && this.valiFormData.trecipientImage != ''){
this.recipientImageUrl = this.valiFormData.trecipientImage.split(',')
this.recipientImageUrl.map((item)=>{
this.recipientImageList.push({
url:config.baseUrl + item
})
})
}
})
},
afterRead(file) { afterRead(file) {
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
upload({ upload({
@ -123,8 +172,9 @@
}).then((res) => { }).then((res) => {
console.log(res, '215') console.log(res, '215')
this.fileList.push({ this.fileList.push({
url: config.baseUrl + res.data url: res.url
}) })
this.fileImageUrl.push(res.fileName)
console.log(this.fileList, 'fileList') console.log(this.fileList, 'fileList')
}) })
} }
@ -132,6 +182,7 @@
deleteFile(file, index) { deleteFile(file, index) {
console.log('删除文件'); console.log('删除文件');
this.fileList.splice(index, 1); this.fileList.splice(index, 1);
this.fileImageUrl.splice(index, 1);
}, },
afterReadRecipient(file) { afterReadRecipient(file) {
for (let i = 0; i < file.tempFilePaths.length; i++) { for (let i = 0; i < file.tempFilePaths.length; i++) {
@ -141,14 +192,16 @@
}).then((res) => { }).then((res) => {
console.log(res, '215') console.log(res, '215')
this.recipientImageList.push({ this.recipientImageList.push({
url: config.baseUrl + res.data url: res.url
}) })
this.recipientImageUrl.push(res.fileName)
}) })
} }
}, },
deleteFileRecipient(file, index) { deleteFileRecipient(file, index) {
console.log('删除文件'); console.log('删除文件');
this.recipientImageList.splice(index, 1); this.recipientImageList.splice(index, 1);
this.recipientImageUrl.splice(index, 1);
}, },
} }
} }

BIN
static/mine/coupon/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B