Browse Source

修改

feature-1.0
helming 3 years ago
parent
commit
da612acedb
  1. 6
      components/money-view/money-view.vue
  2. 105
      package-lock.json
  3. 104
      pages-userInfo/creatorAccount/createAccount.vue
  4. 5
      pages-userInfo/creatorAccount/creatorAccount.vue
  5. 38
      pages/index/upload/upload.vue
  6. 4
      pages/register/register.vue

6
components/money-view/money-view.vue

@ -44,14 +44,14 @@ export default {
} }
}, },
created() { created() {
this.moneyValue = this.moneyFormat(this.value, 2, ',') this.moneyValue = this.moneyFormat(this.value, 3, ',')
}, },
methods: { methods: {
thousandFormat(num, split) { thousandFormat(num, split) {
const len = num.length const len = num.length
return len <= 3 ? num : this.thousandFormat(num.substr(0, len - 3)) + split + num.substr(len - 3, 3) return len <= 3 ? num : this.thousandFormat(num.substr(0, len - 3)) + split + num.substr(len - 3, 3)
}, },
moneyFormat(num, decimal = 2, split = ',') { moneyFormat(num, decimal = 3, split = ',') {
/* /*
parameter parameter
num格式化目标数字 num格式化目标数字
@ -86,7 +86,7 @@ export default {
}, },
watch: { watch: {
value(newValue) { value(newValue) {
this.moneyValue = this.moneyFormat(newValue, 2, ',') this.moneyValue = this.moneyFormat(newValue, 3, ',')
}, },
} }

105
package-lock.json

@ -1,105 +0,0 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"@vue/devtools-api": {
"version": "6.2.0",
"resolved": "https://registry.npmmirror.com/@vue/devtools-api/-/devtools-api-6.2.0.tgz",
"integrity": "sha512-pF1G4wky+hkifDiZSWn8xfuLOJI1ZXtuambpBEYaf7Xaf6zC/pM29rvAGpd3qaGXnr4BAXU1Pxz/VfvBGwexGA=="
},
"axios": {
"version": "0.26.1",
"resolved": "https://registry.npmmirror.com/axios/-/axios-0.26.1.tgz",
"integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
"requires": {
"follow-redirects": "^1.14.8"
}
},
"call-bind": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
}
},
"follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
},
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"get-intrinsic": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz",
"integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==",
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.3"
}
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"requires": {
"function-bind": "^1.1.1"
}
},
"has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
},
"js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
},
"object-inspect": {
"version": "1.12.2",
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.2.tgz",
"integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ=="
},
"qs": {
"version": "6.11.0",
"resolved": "https://registry.npmmirror.com/qs/-/qs-6.11.0.tgz",
"integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
"requires": {
"side-channel": "^1.0.4"
}
},
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
"object-inspect": "^1.9.0"
}
},
"vue-router": {
"version": "4.0.16",
"resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.0.16.tgz",
"integrity": "sha512-JcO7cb8QJLBWE+DfxGUL3xUDOae/8nhM1KVdnudadTAORbuxIC/xAydC5Zr/VLHUDQi1ppuTF5/rjBGzgzrJNA==",
"requires": {
"@vue/devtools-api": "^6.0.0"
}
},
"vuex": {
"version": "4.0.2",
"resolved": "https://registry.npmmirror.com/vuex/-/vuex-4.0.2.tgz",
"integrity": "sha512-M6r8uxELjZIK8kTKDGgZTYX/ahzblnzC4isU1tpmEuOIIKmV+TRdc+H4s8ds2NuZ7wpUTdGRzJRtoj+lI+pc0Q==",
"requires": {
"@vue/devtools-api": "^6.0.0-beta.11"
}
}
}
}

104
pages-userInfo/creatorAccount/createAccount.vue

@ -29,17 +29,12 @@
:selectedTextColor="'#FFFFFF'"> :selectedTextColor="'#FFFFFF'">
</uni-data-checkbox> </uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item v-if="type === 2" label="支付宝账号" required name="accountNo"> <uni-forms-item :label="(type === 0 ? '微信' : type === 2 ? '支付宝' : '') + '账号'" required name="accountNo">
<uni-easyinput v-model="accountInfo.accountNo" placeholder="请输入支付宝账号" <uni-easyinput v-model="accountInfo.accountNo" placeholder="请输入收款账号"
:clearable="false" :clearable="false"
:inputBorder="false" /> :inputBorder="false" />
</uni-forms-item> </uni-forms-item>
<uni-forms-item v-if="type === 0" label="微信账号" required name="accountNo"> <uni-forms-item v-if="type === 0" label="微信收款码" required name="imgUrl">
<uni-easyinput v-model="accountInfo.accountNo" placeholder="请输入微信账号"
:clearable="false"
:inputBorder="false" />
</uni-forms-item>
<uni-forms-item label="微信收款码" required name="imgUrl">
<uni-file-picker limit="1" file-mediatype="image" title="请上传微信收款码!" file-extname="png,jpg,jpeg" <uni-file-picker limit="1" file-mediatype="image" title="请上传微信收款码!" file-extname="png,jpg,jpeg"
@select="selectImage" @delete="deleteImg"> @select="selectImage" @delete="deleteImg">
</uni-file-picker> </uni-file-picker>
@ -57,10 +52,10 @@
<view> <view>
<button class="confirmBtn" size="default" @click="$noMultipleClicks(submitAccount)">确定添加</button> <button class="confirmBtn" size="default" @click="$noMultipleClicks(submitAccount)">确定添加</button>
</view> </view>
<view> <view class="textstyle">
<text class="textstyle">本人确认已同意并遵守<text class="specialText" @click="goto('/pages-userInfo/setting/compoSign')">艺术家合作协议</text> 本人确认已同意并遵守<navigator url="/pages-userInfo/setting/compoSign" :style="{color: primaryColor, display: 'contents'}">艺术家合作协议</navigator>
<text class="specialText" @click="goto('/pages-userInfo/setting/secretSign')">艺术家隐私协议</text>的基础上承诺已阅读并同意遵守<text class="specialText" <navigator url="/pages-userInfo/setting/secretSign" :style="{color: primaryColor, display: 'contents'}">艺术家隐私协议</navigator>的基础上承诺已阅读并同意遵守
@click="goto('/pages-userInfo/setting/secretSign')">共享经济合作合办协议</text>按照协议内容提供合法合规服务</text> <navigator url="/pages-userInfo/setting/secretSign" :style="{color: primaryColor, display: 'contents'}">共享经济合作合办协议</navigator>按照协议内容提供合法合规服务
</view> </view>
</view> </view>
</view> </view>
@ -68,10 +63,9 @@
<script> <script>
import { import {
getAccount,addCreatorAccount, addCreatorAccount,
checkAccountExist,checkAccountUpToFour checkAccountExist,checkAccountUpToFour
} from '@/api/userInfo.js' } from '@/api/userInfo.js'
import {type} from "../../uni_modules/uni-forms/components/uni-forms/utils";
export default { export default {
data() { data() {
return { return {
@ -112,7 +106,7 @@
required: true, required: true,
errorMessage: '请输入身份证号' errorMessage: '请输入身份证号'
},{ },{
pattern: '[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]', pattern: /^[1-9][0-9]{5}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|30|31)|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}([0-9]|X)$/,
errorMessage: '请输入正确的身份证号' errorMessage: '请输入正确的身份证号'
}] }]
}, },
@ -120,13 +114,20 @@
rules: [ rules: [
{ {
required: true, required: true,
errorMessage: '请输入支付宝账号' errorMessage: '请输入收款账号'
}, },
{ {
validateFunction: this.checkAccount, validateFunction: this.checkAccount,
} }
] ]
}, },
imgUrl: {
rules: [{
required: true,
errorMessage: '请选择一张头像图片上传'
}
]
},
phone: { phone: {
rules: [{ rules: [{
required: true, required: true,
@ -161,7 +162,6 @@
created() { created() {
const userInfo = uni.getStorageSync('userInfo') const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) { if (!userInfo) {
console.log('havent userInfo')
uni.showModal({ uni.showModal({
content: '艺术家账户过期,请重新登录!', content: '艺术家账户过期,请重新登录!',
showCancel: false, showCancel: false,
@ -174,7 +174,6 @@
}); });
} else { } else {
this.userInfo = userInfo; this.userInfo = userInfo;
console.log('have userInfo')
} }
this.checkAccountUpToFour(); this.checkAccountUpToFour();
@ -185,15 +184,7 @@
async checkAccountUpToFour() { async checkAccountUpToFour() {
const res = await checkAccountUpToFour(this.userInfo.id); const res = await checkAccountUpToFour(this.userInfo.id);
if (res.data.code === 200) { if (res.data.code === 200) {
if(res.data.data != true){ this.upToFourFlag = res.data.data == true;
//
this.upToFourFlag = false;
console.log('status',this.upToFourFlag)
return;
}else{
this.upToFourFlag = true;
console.log('status',this.upToFourFlag)
}
} else { } else {
uni.showModal({ uni.showModal({
content: '检查收款账户失败!', content: '检查收款账户失败!',
@ -203,7 +194,7 @@
}, },
// //
checkAccount(){ checkAccount() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let that = this; let that = this;
const param = { const param = {
@ -212,10 +203,10 @@
} }
checkAccountExist(param).then(res => { checkAccountExist(param).then(res => {
if (res.data.code === 200) { if (res.data.code === 200) {
if(res.data.data != true){ if(res.data.data !== true){
// //
that.existFlag = false; that.existFlag = false;
return; return resolve();
}else{ }else{
that.existFlag = true; that.existFlag = true;
return reject(new Error('该收款账户已存在')) return reject(new Error('该收款账户已存在'))
@ -259,22 +250,25 @@
}, },
}) })
const back = JSON.parse(res.data); const back = JSON.parse(res.data);
if (back.code == 200) { if (back.code === 200) {
that.accountInfo.imgUrl = back.data; that.accountInfo.imgUrl = back.data;
} }
} }
uni.hideLoading() uni.hideLoading()
that.submitFormDataA(that);
}, },
// //
submitAccount(){ submitAccount() {
let that = this; let that = this;
if(that.existFlag == true){ that.$refs.form.validate([], (err, formData) => {
if (!err) {
if(that.existFlag === true){
uni.showModal({ uni.showModal({
content: '收款账户已存在!', content: '收款账户已存在!',
showCancel: false showCancel: false
}); });
}else{ }else{
if(that.upToFourFlag == true){ if(that.upToFourFlag === true){
uni.showModal({ uni.showModal({
content: '绑定收款账户已达最大上限!', content: '绑定收款账户已达最大上限!',
showCancel: false, showCancel: false,
@ -285,6 +279,24 @@
} }
}); });
}else{ }else{
if (that.type === 0) {
that.uploadImg(that.fileList)
} else {
that.submitFormDataA(that);
}
}
}
} else {
uni.showToast({
title: '表单验证未通过,请更正后提交!',
icon: 'none',
duration: 3000
})
}
})
},
submitFormDataA: (e) => {
let that = e;
const param = { const param = {
creatorId: that.userInfo.id, creatorId: that.userInfo.id,
name: that.accountInfo.name, name: that.accountInfo.name,
@ -294,7 +306,7 @@
type: that.type // type: that.type //
} }
if (param.type === 0) { // if (param.type === 0) { //
that.uploadImg(that.fileList); param.imgUrl = that.accountInfo.imgUrl
} }
// //
addCreatorAccount(param).then(res => { addCreatorAccount(param).then(res => {
@ -318,16 +330,12 @@
}); });
} }
}); });
}
}
}, },
// //
goto:function(url){ goto:function(url){
console.log('111111111111111111111') uni.navigateTo({
// uni.navigateTo({ url: url
// url: url })
// })
}, },
}, },
watch: { watch: {
@ -370,6 +378,16 @@
color: $uni-white !important; color: $uni-white !important;
} }
::v-deep .uni-file-picker__header {
.file-title {
font-size: 24rpx;
color: #999;
}
.file-count {
font-size: 24rpx;
color: #999;
}
}
} }
.foot { .foot {
@ -383,6 +401,8 @@
.textstyle{ .textstyle{
font-size: 26rpx; font-size: 26rpx;
color: $uni-secondary-color; color: $uni-secondary-color;
padding-top: 10rpx;
padding-bottom: 40rpx;
} }
.text-white { .text-white {

5
pages-userInfo/creatorAccount/creatorAccount.vue

@ -217,9 +217,10 @@
} }
.slot-box{ .slot-box{
font-size: 30rpx; font-size: 26rpx;
text-align: justify; text-align: justify;
color: $uni-secondary-color; color: $uni-white;
line-height: 46rpx;
} }
.line-box{ .line-box{
border-bottom: 2rpx $uni-secondary-color solid; border-bottom: 2rpx $uni-secondary-color solid;

38
pages/index/upload/upload.vue

@ -24,6 +24,11 @@
</uni-file-picker> </uni-file-picker>
<view class="uploadNum">今日还可上传次数<span class="uploadText"> {{ getUploadNum }} </span>已上传次数<span class="uploadText"> {{ uploadedNum }} </span></view> <view class="uploadNum">今日还可上传次数<span class="uploadText"> {{ getUploadNum }} </span>已上传次数<span class="uploadText"> {{ uploadedNum }} </span></view>
</view> </view>
<uni-section title="是否原创" subTitle="非原创则视为网络图片" type="circle">
<view class="original-item-list">
<uni-data-checkbox multiple v-model="original" :localdata="originalList" :selectedColor="primaryColor" :selectedTextColor="primaryColor"></uni-data-checkbox>
</view>
</uni-section>
<uni-section title="选择图片标签" subTitle="最多选择3个" type="circle"> <uni-section title="选择图片标签" subTitle="最多选择3个" type="circle">
</uni-section> </uni-section>
<view class="section-content"> <view class="section-content">
@ -46,7 +51,7 @@
data() { data() {
return { return {
styleType: 'button', styleType: 'button',
activeColor: '#007aff', primaryColor: '#0b6375',
typeCurrent: 0, typeCurrent: 0,
typeId: 1, typeId: 1,
fileExtname: "png,jpg,jpeg", fileExtname: "png,jpg,jpeg",
@ -61,6 +66,10 @@
userInfo:{}, userInfo:{},
uploadedNum: 0, uploadedNum: 0,
noClick:true, // noClick:true, //
original: [],
originalList: [
{text: "原创", value: 1}
]
} }
}, },
created() { created() {
@ -144,7 +153,7 @@
creatorId: that.userInfo.id creatorId: that.userInfo.id
} }
const res = await queryUploadNum(checkParam); const res = await queryUploadNum(checkParam);
console.log(res) // console.log(res)
if(res.data.code === 200){ if(res.data.code === 200){
that.uploadedNum = res.data.data; that.uploadedNum = res.data.data;
}else{ }else{
@ -178,7 +187,7 @@
}, },
// //
successHandler(e){ successHandler(e){
console.log('文件上传成功!'+e) // console.log(''+e)
}, },
// //
selectHandler(e){ selectHandler(e){
@ -199,11 +208,11 @@
}, },
// //
failHandler(e){ failHandler(e){
console.log('文件上传失败!'+e) // console.log(''+e)
}, },
// //
deleteHandler(e){ deleteHandler(e){
console.log('文件删除',e.tempFile.url) // console.log('',e.tempFile.url)
// //
let that = this; let that = this;
that.fileList = that.fileList?.filter?.(item => { that.fileList = that.fileList?.filter?.(item => {
@ -288,7 +297,8 @@
imgUrl: that.imgList, imgUrl: that.imgList,
signList: that.signListSelected, signList: that.signListSelected,
status: 0, status: 0,
typeId: that.typeId typeId: that.typeId,
isOriginal: that.original?.length > 0 ? 1 : 0
} }
insertTiktokImg(param).then(res =>{ insertTiktokImg(param).then(res =>{
// console.log('res',res) // console.log('res',res)
@ -349,6 +359,22 @@
font-size: 28rpx !important; font-size: 28rpx !important;
} }
.original-item-list {
width: 654rpx;
margin: 0 auto;
::v-deep .checklist-text {
color: $uni-secondary-color !important;
font-size: 24rpx !important;
}
::v-deep .is-checked .checklist-text {
color: $uni-primary !important;
font-size: 24rpx !important;
}
}
.section-content { .section-content {
width: 654rpx; width: 654rpx;
margin: 0 auto; margin: 0 auto;

4
pages/register/register.vue

@ -290,12 +290,12 @@
}, },
// //
imgUploadSuccess(e) { imgUploadSuccess(e) {
console.log('上传成功') // console.log('')
}, },
// //
imgUploadFail(e) { imgUploadFail(e) {
console.log('上传失败:', e) // console.log('', e)
}, },
submit() { submit() {
let that = this; let that = this;

Loading…
Cancel
Save