bug修复

This commit is contained in:
13405411873 2025-05-08 10:39:08 +08:00
parent 1024e85792
commit d71e5233a1
11 changed files with 275 additions and 277 deletions

View File

@ -34,4 +34,12 @@ export function getByCodeInfo(params) {
method: 'get', method: 'get',
params: params params: params
}) })
}
// 根据code获取键值
export function getConfigByCode(configKey) {
return request({
url: '/system/config/configKey/' + configKey,
method: 'get'
})
} }

View File

@ -1,8 +1,8 @@
// 应用全局配置 // 应用全局配置
module.exports = { module.exports = {
//baseUrl: 'https://3w823u8516.vicp.fun/noticeApi', //baseUrl: 'https://3w823u8516.vicp.fun/noticeApi',
baseUrl: 'https://www.ddtg.site/noticeApi', //baseUrl: 'https://www.ddtg.site/noticeApi',
//baseUrl: 'http://192.168.1.6:8088', baseUrl: 'http://192.168.1.31:8088',
// 应用信息 // 应用信息
appInfo: { appInfo: {
// 应用名称 // 应用名称

View File

@ -56,7 +56,7 @@
<!-- 主体内容区域 --> <!-- 主体内容区域 -->
<view class="dl-body"> <view class="dl-body">
<!-- 随手转发 --> <!-- 随手转发 -->
<view class="dl-public-box" v-if="point&&point>0"> <view class="dl-public-box" v-if="isOpenZf=='1'&&point&&point>0">
<view class="dl-left"> <view class="dl-left">
<image class="dl-icon" src="@/static/index/gift.png" mode="aspectFit"></image> <image class="dl-icon" src="@/static/index/gift.png" mode="aspectFit"></image>
</view> </view>
@ -179,7 +179,8 @@
import rightsCode from '@/utils/rightsCode' import rightsCode from '@/utils/rightsCode'
import { import {
getCatgByCode, getCatgByCode,
getByCodeInfo getByCodeInfo,
getConfigByCode
} from '@/api/system/config.js' } from '@/api/system/config.js'
import { import {
toast, toast,
@ -253,6 +254,7 @@
platformList: [], platformList: [],
// //
bloggerTypeList: [], bloggerTypeList: [],
isOpenZf: '0'
} }
}, },
mounted() { mounted() {
@ -263,11 +265,19 @@
this.initAddress() this.initAddress()
// //
// this.checkRights() // this.checkRights()
this.getConfigKey()
}, },
onLoad: function() { onLoad: function() {
}, },
methods: { methods: {
getConfigKey() {
getConfigByCode('isOpenZf').then(res => {
if (res.msg) {
this.isOpenZf = res.msg
}
})
},
/**初始化树结构*/ /**初始化树结构*/
initAddress() { initAddress() {
treeCity().then(res => { treeCity().then(res => {

View File

@ -145,9 +145,6 @@
that.$refs.popupNew.open('center') that.$refs.popupNew.open('center')
} }
}) })
} else {
//
that.$refs.popupNew.open('center')
} }
}, },
/** /**

View File

@ -9,7 +9,7 @@
<image src="@/static/mine/required.png" mode="aspectFit"></image>收件人名称 <image src="@/static/mine/required.png" mode="aspectFit"></image>收件人名称
</view> </view>
<view class="item-value"> <view class="item-value">
<input class="uni-input" v-model="dataObj.name" type="number" placeholder="请输入" /> <input class="uni-input" v-model="dataObj.name" placeholder="请输入" />
</view> </view>
</view> </view>
<view class="item-field"> <view class="item-field">
@ -17,7 +17,7 @@
<image src="@/static/mine/required.png" mode="aspectFit"></image>联系电话 <image src="@/static/mine/required.png" mode="aspectFit"></image>联系电话
</view> </view>
<view class="item-value"> <view class="item-value">
<input class="uni-input" v-model="dataObj.tel" type="tel" placeholder="请输入" /> <input class="uni-input" v-model="dataObj.tel" type="number" placeholder="请输入" />
</view> </view>
</view> </view>
<view class="item-field"> <view class="item-field">

View File

@ -43,7 +43,7 @@
<image src="@/static/mine/required.png" mode="aspectFit"></image>联系电话 <image src="@/static/mine/required.png" mode="aspectFit"></image>联系电话
</view> </view>
<view class="item-value"> <view class="item-value">
<input class="uni-input" v-model="dataObj.tel" type="tel" placeholder="请输入" /> <input class="uni-input" v-model="dataObj.tel" type="number" placeholder="请输入" />
</view> </view>
</view> </view>
<view class="item-field"> <view class="item-field">
@ -149,8 +149,8 @@
addrId: null, addrId: null,
price: null, price: null,
content: null, content: null,
wxNum: null, wxNum: null,
indexUrl: null, indexUrl: null,
} }
} }
}, },
@ -269,23 +269,23 @@
toast("粉丝数不能为空") toast("粉丝数不能为空")
return return
} }
if (this.dataObj.indexUrl == null || this.dataObj.indexUrl == "") { if (this.dataObj.indexUrl == null || this.dataObj.indexUrl == "") {
toast("主页链接不能为空") toast("主页链接不能为空")
return return
} }
if (this.dataObj.wxNum == null || this.dataObj.wxNum == "") { if (this.dataObj.wxNum == null || this.dataObj.wxNum == "") {
toast("微信号不能为空") toast("微信号不能为空")
return return
} }
if (this.dataObj.tel == null || this.dataObj.tel == "") { if (this.dataObj.tel == null || this.dataObj.tel == "") {
toast("电话不能为空") toast("电话不能为空")
return return
} }
if (this.dataObj.addrId == null || this.dataObj.addrId == "") { if (this.dataObj.addrId == null || this.dataObj.addrId == "") {
toast("收货地址不能为空") toast("收货地址不能为空")
return return
} }
if (this.fileList.length == 0) { if (!this.imageUrl || this.imageUrl.length == 0) {
toast("证明材料不能为空") toast("证明材料不能为空")
return return
} }

View File

@ -1,248 +1,251 @@
<template> <template>
<view class="my-info-box"> <view class="my-info-box">
<navigation-bar-vue title="个人信息" style="width: 100%;" background-color="#ffffff" <navigation-bar-vue title="个人信息" style="width: 100%;" background-color="#ffffff"
title-color="#000000"></navigation-bar-vue> title-color="#000000"></navigation-bar-vue>
<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="头像" 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>
<uni-forms-item labelWidth="280rpx" label="昵称" required name="nickName"> <uni-forms-item labelWidth="280rpx" label="昵称" required name="nickName">
<uni-easyinput v-model="valiFormData.nickName" placeholder="请输入"/> <uni-easyinput v-model="valiFormData.nickName" placeholder="请输入" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item labelWidth="280rpx" label="联系方式" required name="phonenumber"> <uni-forms-item labelWidth="280rpx" label="联系方式" required name="phonenumber">
<uni-easyinput v-model="valiFormData.phonenumber" placeholder="请输入"/> <uni-easyinput v-model="valiFormData.phonenumber" placeholder="请输入" />
</uni-forms-item> </uni-forms-item>
<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="收款码" 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="收款码真实姓名" 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="通告报名免打扰" 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>
<view class="my-black-list" @click="goMyBlackList()">我的黑名单 <view class="my-black-list" @click="goMyBlackList()">我的黑名单
<uni-icons type="right" color="#623109" <uni-icons type="right" color="#623109" size="12"></uni-icons>
size="12"></uni-icons> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
import navigationBarVue from '@/components/navigation/navigationBar.vue'; import navigationBarVue from '@/components/navigation/navigationBar.vue';
import config from '@/config' import config from '@/config'
import { import {
queryDetail, uniSaveMember queryDetail,
} from '@/api/business/member.js' uniSaveMember
import upload from '@/utils/upload' } from '@/api/business/member.js'
import upload from '@/utils/upload'
export default { export default {
components: { components: {
navigationBarVue navigationBarVue
}, },
data() { data() {
return { return {
userType: '', userType: '',
sizeType: ['compressed'], sizeType: ['compressed'],
// //
fileList: [], fileList: [],
fileImageUrl: [], fileImageUrl: [],
// //
recipientImageList: [], recipientImageList: [],
recipientImageUrl: [], recipientImageUrl: [],
ranges: [{ ranges: [{
text: '开启', text: '开启',
value: "1" value: "1"
}, { }, {
text: '关闭', text: '关闭',
value: "0" value: "0"
}], }],
// //
valiFormData: { valiFormData: {
avatar: "", avatar: "",
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,
errorMessage: '昵称不能为空' errorMessage: '昵称不能为空'
}] }]
}, },
phonenumber: { phonenumber: {
rules: [{ rules: [{
required: true, required: true,
errorMessage: '联系方式不能为空' errorMessage: '联系方式不能为空'
}] }]
}, },
// trecipientImage: { // trecipientImage: {
// rules: [{ // rules: [{
// required: true, // required: true,
// errorMessage: '' // errorMessage: ''
// }] // }]
// }, // },
// trecipientName: { // trecipientName: {
// rules: [{ // rules: [{
// required: true, // required: true,
// errorMessage: '' // errorMessage: ''
// }] // }]
// }, // },
}, },
} }
}, },
onLoad(options) { onLoad(options) {
this.userType = options.userType this.userType = options.userType
this.userId = options.userId this.userId = options.userId
this.initData(options.userType, options.userId) this.initData(options.userType, options.userId)
}, },
methods: { methods: {
goMyBlackList() { goMyBlackList() {
this.$tab.navigateTo('/pages/mine/set/black-list?userId=' + this.userId) this.$tab.navigateTo('/pages/mine/set/black-list?userId=' + this.userId)
}, },
submit(ref) { submit(ref) {
this.valiFormData.avatar = this.fileImageUrl.join(','); this.valiFormData.avatar = this.fileImageUrl.join(',');
this.valiFormData.trecipientImage = this.recipientImageUrl.join(','); this.valiFormData.trecipientImage = this.recipientImageUrl.join(',');
let that = this let that = this
this.$refs[ref].validate().then(res => { this.$refs[ref].validate().then(res => {
uniSaveMember(that.valiFormData).then(res => { uniSaveMember(that.valiFormData).then(res => {
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
duration: 2000, duration: 2000,
title: '保存成功' title: '保存成功'
}); });
uni.navigateBack() uni.navigateBack()
}) })
}).catch(err => { }).catch(err => {
console.log('err', err); console.log('err', err);
}) })
}, },
/**初始化数据*/ /**初始化数据*/
initData(userType, userId) { initData(userType, userId) {
this.fileList = [] this.fileList = []
this.fileImageUrl = [] this.fileImageUrl = []
this.recipientImageList = [] this.recipientImageList = []
this.recipientImageUrl = [] this.recipientImageUrl = []
queryDetail({userType: userType, userId: userId}).then(res => { queryDetail({
console.log(res, 131) userType: userType,
this.valiFormData = res.data userId: userId
if (this.valiFormData.avatar != null && this.valiFormData.avatar != '') { }).then(res => {
this.fileImageUrl = this.valiFormData.avatar.split(',') console.log(res, 131)
this.fileImageUrl.map((item) => { this.valiFormData = res.data
this.fileList.push({ if (this.valiFormData.avatar != null && this.valiFormData.avatar != '') {
url: item this.fileImageUrl = this.valiFormData.avatar.split(',')
}) this.fileImageUrl.map((item) => {
}) this.fileList.push({
} url: item
if (this.valiFormData.trecipientImage != null && this.valiFormData.trecipientImage != '') { })
this.recipientImageUrl = this.valiFormData.trecipientImage.split(',') })
this.recipientImageUrl.map((item) => { }
this.recipientImageList.push({ if (this.valiFormData.trecipientImage != null && this.valiFormData.trecipientImage != '') {
url: item this.recipientImageUrl = this.valiFormData.trecipientImage.split(',')
}) this.recipientImageUrl.map((item) => {
}) this.recipientImageList.push({
} url: 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({
url: '', url: '',
filePath: file.tempFilePaths[i] filePath: file.tempFilePaths[i]
}).then((res) => { }).then((res) => {
console.log(res, '215') console.log(res, '215')
this.fileList.push({ this.fileList.push({
url: res.url url: res.url
}) })
this.fileImageUrl.push(res.fileName) this.fileImageUrl.push(res.fileName)
console.log(this.fileList, 'fileList') console.log(this.fileList, 'fileList')
}) })
} }
}, },
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); 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++) {
upload({ upload({
url: '', url: '',
filePath: file.tempFilePaths[i] filePath: file.tempFilePaths[i]
}).then((res) => { }).then((res) => {
console.log(res, '215') console.log(res, '215')
this.recipientImageList.push({ this.recipientImageList.push({
url: res.url url: res.url
}) })
this.recipientImageUrl.push(res.fileName) 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); this.recipientImageUrl.splice(index, 1);
}, },
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.my-info-box { .my-info-box {
padding-top: calc(90rpx + var(--status-bar-height)); padding-top: calc(90rpx + var(--status-bar-height));
border-top: 1rpx solid #F4F4F4; border-top: 1rpx solid #F4F4F4;
background-color: white; background-color: white;
width: 100%; width: 100%;
color: #363636; color: #363636;
font-size: 30rpx; font-size: 30rpx;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: self-start; align-items: self-start;
justify-content: center; justify-content: center;
position: relative; position: relative;
.form-data-box { .form-data-box {
border-top: 1rpx solid #F4F4F4; border-top: 1rpx solid #F4F4F4;
height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx); height: calc(100vh - var(--status-bar-height) - var(--window-bottom) - 95rpx);
overflow-y: scroll; overflow-y: scroll;
width: 100%; width: 100%;
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
background-color: white; background-color: white;
.my-black-list { .my-black-list {
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 26rpx; font-size: 26rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
} }
} }
</style> </style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="shortcut icon" type="image/x-icon" href="<%= BASE_URL %>static/favicon.ico">
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>本站点必须要开启JavaScript才能运行.</strong>
</noscript>
<div id="app"></div>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB