Browse Source

feature:1.0:逻辑完善

feature-1.0
Penny 3 years ago
parent
commit
1f32b93101
  1. 55
      api/userInfo.js
  2. 5
      main.js
  3. 122
      pages-userInfo/about/about.vue
  4. 29
      pages-userInfo/contact/contact.vue
  5. 287
      pages-userInfo/creatorAccount/createAccount.vue
  6. 190
      pages-userInfo/creatorAccount/creatorAccount.vue
  7. 30
      pages-userInfo/extends/extends.vue
  8. 29
      pages-userInfo/notice/notice.vue
  9. 27
      pages-userInfo/notice/noticeDetail.vue
  10. 21
      pages-userInfo/setting/compoSign.vue
  11. 21
      pages-userInfo/setting/secretSign.vue
  12. 20
      pages-userInfo/setting/setting.vue
  13. 475
      pages-userInfo/withdraw/withdraw.vue
  14. 27
      pages-userInfo/withdraw/withdrawDetail.vue
  15. 111
      pages-userInfo/withdraw/withdrawIndex.vue
  16. 28
      pages-userInfo/withdraw/withdrawLog.vue
  17. 23
      pages.json
  18. 48
      pages/index/index.vue
  19. 26
      pages/index/material/imgDetail.vue
  20. 41
      pages/index/material/material.vue
  21. 43
      pages/index/upload/upload.vue
  22. 3
      pages/login/login.vue
  23. 52
      pages/profit/profit.vue
  24. 34
      pages/profit/profitEndDetails.vue
  25. 25
      pages/profit/profitEndOrder.vue
  26. 34
      pages/profit/profitInDetails.vue
  27. 30
      pages/profit/profitInOrder.vue
  28. 34
      pages/profit/profitPreDetails.vue
  29. 21
      pages/userInfo/userInfo.vue
  30. BIN
      static/aliPay.png
  31. BIN
      static/wxPay.png
  32. 24
      utils/common.js

55
api/userInfo.js

@ -33,7 +33,7 @@ export function getInviteLog(data) {
}
// 查询指定艺术家账户
export function getAccount(creatorId) {
export function getCreatorAccount(creatorId) {
return request({
url: `${serviceTitle}${prefix}/getAccount/${creatorId}`,
method: 'get'
@ -128,3 +128,56 @@ export function checkInviteCode(data) {
})
}
// 新增艺术家收款账户
export function addCreatorAccount(data) {
return request({
url: `${serviceTitle}${prefix}/insertAccount`,
method: 'post',
data
})
}
// 检查艺术家收款账户是否存在
export function checkAccountExist(data) {
return request({
url: `${serviceTitle}${prefix}/checkAccountExist`,
method: 'post',
data
})
}
// 检查艺术家收款账户是否超过4个
export function checkAccountUpToFour(creatorId) {
return request({
url: `${serviceTitle}${prefix}/checkAccountUpToFour/${creatorId}`,
method: 'get',
})
}
// 删除艺术家收款账户
export function deleteAccount(ids) {
return request({
url: `${serviceTitle}${prefix}/deleteAccount/${ids}`,
method: 'get',
})
}
// 设置艺术家收款账户默认状态
export function setDefaultAccountStatus(data) {
return request({
url: `${serviceTitle}${prefix}/setDefaultAccountStatus`,
method: 'post',
data
})
}
// 获取艺术家信息
export function getCreatorInfo(creatorId) {
return request({
url: `${serviceTitle}${prefix}/getCreatorInfo/${creatorId}`,
method: 'get'
})
}

5
main.js

@ -1,13 +1,16 @@
import App from './App'
import store from './store/'
//配置公共方法(防止重复提交)
import common from './utils/common.js'
// const baseURL = 'http://localhost:7010'
//const baseURL = 'http://81.69.47.31:7010'
// const baseURL = 'http://bnyer.vaiwan.com'
const baseURL = 'http://9fkisg.natappfree.cc'
const baseURL = 'http://i5s7bh.natappfree.cc'
Vue.prototype.$baseURL = baseURL;
Vue.prototype.$noMultipleClicks = common.noMultipleClicks;
// #ifndef VUE3
import Vue from 'vue'

122
pages-userInfo/about/about.vue

@ -65,102 +65,36 @@
</template>
<script>
// export default {
// data() {
// return {
// hotCreatorList: [],
// isTarget: true,
// showChoiceness:false
// }
// },
// //
// onPullDownRefresh() {
// this.showChoiceness = false
// uni.stopPullDownRefresh()
// },
// created() {
// const userInfo = uni.getStorageSync('userInfo')
// if (!userInfo) {
// console.log('havent userInfo')
// this.getUserInfo()
// } else {
// console.log('have userInfo')
// }
// },
// onPageScroll(e) {
// // scrollTopeasy-loadimage
// if (e.scrollTop > 160) {
// this.showChoiceness = true
// // uni.redirectTo({
// // url: '../index/choiceness'
// // })
// }
// },
// methods: {
// //
// search(res) {
// if (res.value) {
// console.log('search', res.value)
// this.goCreatorDetail(res.value)
// } else {
// uni.showToast({
// title: '',
// icon: 'none'
// })
// }
// },
// //
// getUserInfo() {
// wx.login({
// force: true,
// success: res => {
// wx.getUserInfo({
// withCredentials: true,
// success: userInfo => {
// const params = {
// code: res.code,
// encryptedData: userInfo.encryptedData,
// iv: userInfo.iv
// }
// //
// console.log('params',params);
// loginWx(params).then(res => {
// if (res.data.code === 200) {
// uni.setStorage({
// key: 'userInfo',
// data: res.data.data.userInfo,
// })
// } else {
// uni.showToast({
// title: res.data.msg,
// icon: 'none'
// })
// }
// }).catch(res => {})
// console.log(`getUserInfo `, userInfo);
// },
// fail(userInfo) {
// console.log(`getUserInfo `);
// },
// });
// },
// fail(res) {
// console.log(`login `);
// },
// });
// },
export default {
data() {
return {
userInfo:{}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
methods: {
// //
// handleScroll() {
// let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
// console.log(scrollTop)
// },
// },
// }
},
}
</script>
<style lang="less">

29
pages-userInfo/contact/contact.vue

@ -5,7 +5,36 @@
</template>
<script>
export default {
data() {
return {
userInfo:{}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
methods: {
},
}
</script>
<style>

287
pages-userInfo/creatorAccount/createAccount.vue

@ -0,0 +1,287 @@
<template>
<view class="container">
<view class="head">
<view>
<uni-group mode="card">
<uni-icons type="paperplane-filled" size="20"></uni-icons><text class="textstyle"></text><br/>
<text class="textstyle">1.为了您的资金安全及合规体现将通过第三方支付提供安全通道实现</text><br/>
<text class="textstyle">2.应银行监管要求每人每月限额10万元最多绑定4个收款账户</text><br/>
<text class="textstyle">3.一旦提现成功,设置的收款账户不可更改</text>
</uni-group>
</view>
<view>
<uni-group mode="card">
<uni-forms validate-trigger='blur' :modelValue="accountInfo" label-position="top" labelWidth="80" ref="form">
<uni-forms-item label="真实姓名" required name="name">
<uni-easyinput v-model="accountInfo.name" placeholder="请输入真实姓名" />
</uni-forms-item>
<uni-forms-item label="身份证号" required name="idNo">
<uni-easyinput v-model="accountInfo.idNo" placeholder="请输入身份证号" />
</uni-forms-item>
<uni-forms-item label="支付宝账号" required name="accountNo">
<uni-easyinput v-model="accountInfo.accountNo" placeholder="请输入支付宝账号" />
</uni-forms-item>
<uni-forms-item label="预留电话" required name="phone">
<uni-easyinput v-model="accountInfo.phone" placeholder="请输入预留电话" />
</uni-forms-item>
<!-- <uni-forms-item label="请选择" required>
</uni-forms-item> -->
</uni-forms>
</uni-group>
</view>
</view>
<view class="foot">
<view>
<button class="confirmBtn" size="default" @click="$noMultipleClicks(submitAccount)">确定添加</button>
</view>
<view>
<text class="textstyle">本人确认已同意并遵守<text class="specialText" @click="goto('/pages-userInfo/setting/compoSign')">艺术家合作协议</text>
<text class="specialText" @click="goto('/pages-userInfo/setting/secretSign')">艺术家隐私协议</text>的基础上承诺已阅读并同意遵守<text class="specialText"
@click="goto('/pages-userInfo/setting/secretSign')">共享经济合作合办协议</text>按照协议内容提供合法合规服务</text>
</view>
</view>
</view>
</template>
<script>
import {
getAccount,addCreatorAccount,
checkAccountExist,checkAccountUpToFour
} from '@/api/userInfo.js'
export default {
data() {
return {
userInfo: {},
existFlag: false,
upToFourFlag: false,
noClick:true, //
accountInfo:{
name:'',
idNo:'',
accountNo:'',
phone:''
},
rules: {
name: {
rules: [{
required: true,
errorMessage: '请输入姓名'
}, {
minLength: 2,
maxLength: 4,
errorMessage: '姓名长度在 {minLength} 到 {maxLength} 个字符'
}]
},
idNo: {
rules: [{
required: true,
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]',
errorMessage: '请输入正确的身份证号'
}]
},
accountNo: {
rules: [
{
required: true,
errorMessage: '请输入支付宝账号'
},
{
validateFunction: this.checkAccount,
}
]
},
phone: {
rules: [{
required: true,
errorMessage: '请输入手机号'
},
{
pattern: '^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$',
errorMessage: '请输入正确的手机号'
},
{
validateFunction: (data) => {
// Promise
return new Promise((resolve, reject) => {
if (data.length = 11) {
resolve()
} else {
reject(new Error('手机号长度应为11个字符'))
}
})
}
}
]
}
}
}
},
mounted() {
//
this.$refs.form.setRules(this.rules);
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
this.checkAccountUpToFour();
},
methods: {
//4
async checkAccountUpToFour() {
const res = await checkAccountUpToFour(this.userInfo.id);
if (res.data.code === 200) {
if(res.data.data != true){
//
this.upToFourFlag = false;
console.log('status',this.upToFourFlag)
return;
}else{
this.upToFourFlag = true;
console.log('status',this.upToFourFlag)
}
} else {
uni.showModal({
content: '检查收款账户失败!',
showCancel: false
});
}
},
//
checkAccount(){
return new Promise((resolve, reject) => {
let that = this;
const param = {
creatorId: that.userInfo.id,
accountNo:that.accountInfo.accountNo
}
checkAccountExist(param).then(res => {
if (res.data.code === 200) {
if(res.data.data != true){
//
that.existFlag = false;
return;
}else{
that.existFlag = true;
return reject(new Error('该收款账户已存在'))
}
}else{
uni.showModal({
content: '检查收款账户失败!',
showCancel: false
});
}
});
});
},
//
submitAccount(){
let that = this;
if(that.existFlag == true){
uni.showModal({
content: '收款账户已存在!',
showCancel: false
});
}else{
if(that.upToFourFlag == true){
uni.showModal({
content: '绑定收款账户已达最大上限!',
showCancel: false,
success() {
uni.redirectTo({
url: '/pages-userInfo/creatorAccount/creatorAccount'
})
}
});
}else{
const param = {
creatorId: that.userInfo.id,
name: that.accountInfo.name,
idNo: that.accountInfo.idNo,
phone:that.accountInfo.phone,
accountNo:that.accountInfo.accountNo,
type: '2' //
}
//
addCreatorAccount(param).then(res => {
if (res.data.code === 200) {
uni.hideLoading();
uni.showToast({
title:'添加成功!',
duration: 1500,
success() {
setTimeout(function () {
uni.redirectTo({
url: '/pages-userInfo/creatorAccount/creatorAccount'
})
}, 1500);
}
})
}else{
uni.showModal({
content: '添加收款账户失败!',
showCancel: false
});
}
});
}
}
},
//
goto:function(url){
console.log('111111111111111111111')
// uni.navigateTo({
// url: url
// })
},
},
}
</script>
<style lang="less">
.confirmBtn{
width: 710rpx;
height: 60rpx;
background-color: royalblue;
color: #ffffff;
font-size: 30rpx;
line-height: 62rpx;
border-radius: 17rpx;
margin-top:100rpx;
}
.foot{
margin-top:100rpx;
}
.textstyle{
font-size: 25rpx;
}
.specialText{
color: blue;
// display: inline-block;
font-size: 25rpx;
}
</style>

190
pages-userInfo/creatorAccount/creatorAccount.vue

@ -0,0 +1,190 @@
<template>
<view class="container">
<view class="head">
<uni-group mode="card" v-for="(item,index) in creatorAccountList" :key="index">
<view class="slot-box">真实姓名{{item.name}}</view>
<view class="slot-box">身份证号{{item.idNo}}</view>
<view class="slot-box" v-if="item.type == '0'">微信账号{{item.accountNo}}</view>
<view class="slot-box" v-if="item.type == '1'">银行卡账号{{item.accountNo}}</view>
<view class="slot-box" v-if="item.type == '2'">支付宝账号{{item.accountNo}}</view>
<view class="line-box"></view>
<view class="btn-box">
<uni-tag :circle="true" text="设为默认" type="primary" v-if="item.isUse == '0'" class="btn"
@click="$noMultipleClicks(setDefault,item.id)" inverted="true"/>
<uni-tag :circle="true" text="删除" type="default" v-if="item.isUse == '0'" class="btn"
@click="$noMultipleClicks(delAccount,item.id)" inverted="true"/>
</view>
</uni-group>
</view>
<view class="foot">
<button class="creatorAccountAddBtn" size="default" :loading="loadingFlag" @click="creatorAccountAdd('/pages-userInfo/creatorAccount/createAccount')">添加收款账户</button>
</view>
</view>
</template>
<script>
import {
getCreatorAccount,deleteAccount,setDefaultAccountStatus
} from '@/api/userInfo.js'
export default {
data() {
return {
creatorAccountList: [],
userInfo: {},
type: 0,
noClick:true, //
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
this.getCreatorAccount();
}
},
methods: {
//
async getCreatorAccount() {
let that = this;
const res = await getCreatorAccount(that.userInfo.id)
console.log('res', res)
if (res.data.code === 200) {
that.creatorAccountList.push(...res.data.data)
console.log('creatorAccountList', that.creatorAccountList)
} else {
uni.showModal({
content: '获取艺术家账户列表数据加载失败!',
showCancel: false
});
}
},
//
setDefault(id){
let that = this;
const param = {
id: id,
status: '1',
creatorId: that.userInfo.id
}
setDefaultAccountStatus(param).then(res =>{
if (res.data.code === 200) {
uni.showToast({
title: '操作成功!',
duration: 2000,
mask: true,
success() {
//
setTimeout(() => {
uni.redirectTo({
url: '/pages-userInfo/creatorAccount/creatorAccount'
});
}, 1000)
}
});
}else{
uni.showModal({
content: "设置艺术家收款账户默认状态失败!",
showCancel: false,
});
}
});
},
//
delAccount(id){
uni.showModal({
title: '提示',
content: '确认删除该收款账户?',
success(resp) {
if(resp.confirm){
let that = this;
const ids = []
ids.push(parseInt(id))
deleteAccount(ids).then(res =>{
if (res.data.code === 200) {
uni.showToast({
title: '删除成功!',
duration: 2000,
mask: true,
success() {
//
setTimeout(() => {
uni.redirectTo({
url: '/pages-userInfo/creatorAccount/creatorAccount'
});
}, 2000)
}
});
}else{
uni.showModal({
content: "删除收款账户失败!",
showCancel: false,
});
}
});
}
}
});
},
creatorAccountAdd(url){
uni.navigateTo({
url: url
})
}
},
}
</script>
<style lang="less">
.creatorAccountAddBtn{
width: 710rpx;
height: 60rpx;
background-color: royalblue;
color: #ffffff;
font-size: 30rpx;
line-height: 62rpx;
border-radius: 17rpx;
margin-top:100rpx;
}
.foot{
margin-top:630rpx;
}
.slot-box{
font-size: 30rpx;
text-align: justify;
}
.line-box{
border: 1rpx #B3B3B3 solid;
margin-top: 30rpx;
}
.btn-box{
position: relative;
flex-direction: row;
justify-content: flex-end;
display: flex;
margin-left: 200rpx;
margin-top: 20rpx;
.btn{
padding-left: 20rpx;
}
}
</style>

30
pages-userInfo/extends/extends.vue

@ -40,8 +40,23 @@
}
},
created() {
const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
this.getInviteLog();
},
//
@ -73,15 +88,16 @@
methods:{
//
async getInviteLog() {
let that = this;
const res = await getInviteLog({
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: this.userInfo.id
pageSize: that.pageSize,
pageNum: that.pageNum,
creatorId: that.userInfo.id
})
console.log('res', res)
if (res.data.code === 200) {
this.inviteLogList.push(...res.data.rows)
console.log('inviteLogList', this.inviteLogList)
that.inviteLogList.push(...res.data.rows)
console.log('inviteLogList', that.inviteLogList)
} else {
uni.showModal({
content: '邀请记录加载失败!',

29
pages-userInfo/notice/notice.vue

@ -18,10 +18,28 @@
noticeList: [],
pageSize: 10,
pageNum: 1,
flag: false
flag: false,
userInfo:{}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
this.getNoticeList();
},
//
@ -45,14 +63,15 @@
//
async getNoticeList() {
let that = this;
const res = await getNoticeList({
pageSize: this.pageSize,
pageNum: this.pageNum,
pageSize: that.pageSize,
pageNum: that.pageNum,
})
//console.log('res', res)
if (res.data.code === 200) {
this.noticeList.push(...res.data.rows)
//console.log('noticeList', this.noticeList)
that.noticeList.push(...res.data.rows)
//console.log('noticeList', that.noticeList)
} else {
uni.showModal({
content: '公告列表加载失败!',

27
pages-userInfo/notice/noticeDetail.vue

@ -22,10 +22,30 @@
title: '',
content: '',
img: '',
createTime: ''
createTime: '',
userInfo:{}
}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
onLoad: function(option) { //optionobject
this.noticeDetail.id = option.id
//console.log('this.id',this.id)
@ -35,10 +55,11 @@
//
async getNoticeDetails() {
const res = await getNoticeDetails(this.noticeDetail.id)
let that = this;
const res = await getNoticeDetails(that.noticeDetail.id)
console.log('res', res)
if (res.data.code === 200) {
this.noticeDetail = res.data.data
that.noticeDetail = res.data.data
} else {
uni.showModal({
content: '公告详情数据加载失败!',

21
pages-userInfo/setting/compoSign.vue

@ -272,7 +272,26 @@
export default {
data() {
return {
userInfo:{}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
methods: {

21
pages-userInfo/setting/secretSign.vue

@ -53,7 +53,26 @@
export default {
data() {
return {
userInfo:{}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
methods: {

20
pages-userInfo/setting/setting.vue

@ -41,8 +41,23 @@
}
},
created() {
const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
// //
// onPullDownRefresh() {
@ -79,6 +94,7 @@
uni.reLaunch({
url: '/pages/login/login',
success() {
uni.clearStorage();
uni.showToast({
title: '注销成功!',
duration: 2000

475
pages-userInfo/withdraw/withdraw.vue

@ -1,96 +1,451 @@
<template>
<view class="container">
钱包余额{{userInfo.amt}}
<button class="withdrawBtn" size="default" :loading="loadingFlag" @click="" :disabled="checkUpload">提现</button>
<uni-list>
<uni-list-item title="管理收款账户" :show-extra-icon="true" :extra-icon="wallet" link to="/pages-userInfo/setting/compoSign"></uni-list-item>
<uni-list-item title="提现记录" :show-extra-icon="true" :extra-icon="withlog" link to="/pages-userInfo/withdraw/withdrawLog"></uni-list-item>
</uni-list>
<view class="page-bg">
<view class="main-container">
<view class="tl-panel">
<view class="tl-font-28-29">提现金额</view>
<view class="input-box">
¥ <input type="text" placeholder="输入金额" placeholder-class="pch"
class="input-value" @blur="checkAmt()" value="" v-model="amt"/>
</view>
<view class="tl-font-28-9b">当前余额为{{userInfo.amt}} </view>
<view class="tl-font-28-9b">小贴士提现金额不少于1元 </view>
</view>
<view class="tl-red tl-title-62" v-if="checkFlag == true">输入金额超过当前余额</view>
<view class="tl-font-28-29 tl-title-60">选择提现至</view>
<view class="tl-panel-2 tl-flex-row">
<radio-group @change="radioChange">
<label v-for="(item, index) in creatorAccountList" :key="index">
<view class="withdrawBox">
<view v-if="item.type == '0'">
<image :src="payType[0].icon" class="tl-img-76"></image>
</view>
<view v-if="item.type == '1'">
<image :src="payType[1].icon" class="tl-img-76"></image>
</view>
<view v-if="item.type == '2'">
<image :src="payType[2].icon" class="tl-img-76"></image>
</view><!-- 0->微信 1->银行卡 2->支付宝 -->
<view class="tl-font-28-34 tl-name" v-if="item.type == '0'">{{payType[0].title}} {{item.accountNo}}</view>
<view class="tl-font-28-34 tl-name" v-if="item.type == '1'">{{payType[1].title}} {{item.accountNo}}</view>
<view class="tl-font-28-34 tl-name" v-if="item.type == '2'">{{payType[2].title}} {{item.accountNo}}</view>
<view>
<radio :value="item" color="#F2C827" :checked="item.isUse === '1'" class="radioStyle"/>
</view>
</view>
</label>
</radio-group>
</view>
<view class="tl-footer">
<button class="tl-btn-686 tl-font-28-29" @click="$noMultipleClicks(withdraw)">提现</button>
</view>
</view>
</view>
</template>
<script>
import {
getWithdrawList,getCreatorAccount,
checkWithdraw,withdraw,
getCreatorInfo
} from '@/api/userInfo.js'
export default {
data() {
return {
amt: '',
userInfo: {},
wallet: {
color:'#0000ff',
size: '22',
type: 'wallet'
checkFlag: false,
noClick:true, //
creatorAccountList:[],
accountNo: '',
type: '',
current: 0,
payType: [{
icon: '/static/wxPay.png',
title: '微信',
},
withlog: {
color:'#0000ff',
size: '22',
type: 'compose'
{
icon: '/static/wxPay.png',
title: '银行卡',
},
{
icon: '/static/aliPay.png',
title: '支付宝',
}],
}
},
created() {
const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
this.getCreatorAccount();
}
},
methods: {
targetToDetail(orderId) {
console.log('orderId', orderId)
if (orderId) {
uni.navigateTo({
url: 'withdrawDetail?orderId=' + orderId,
//
async getCreatorAccount() {
let that = this;
const res = await getCreatorAccount(that.userInfo.id)
console.log('res', res)
if (res.data.code === 200) {
that.creatorAccountList.push(...res.data.data)
for (let param of res.data.data) {
if(param.isUse === '1'){
that.accountNo = param.accountNo;
that.type = param.type;
}
}
console.log('creatorAccountList', that.creatorAccountList)
} else {
uni.showModal({
content: '获取艺术家账户列表数据加载失败!',
showCancel: false
});
}
},
radioChange: function(evt) {
console.log(JSON.stringify(evt.detail.value));
let that = this;
that.type = evt.detail.value.type;
that.accountNo = evt.detail.value.accountNo;
console.log(that.type);
console.log(that.accountNo);
},
//
checkAmt:function(){
let that = this;
if(parseFloat(that.amt) > parseFloat(that.userInfo.amt)){
that.checkFlag = true;
}else{
that.checkFlag = false;
}
},
//
async withdraw(){
let that = this;
console.log('点击了提现,金额为',that.type)
if(that.amt == null || that.amt == ''){
uni.showModal({
content: '请输入提现金额!',
showCancel: false
});
}
if(that.checkFlag == true){
console.log('that.checkFlag',that.checkFlag)
uni.showModal({
content: '输入金额超过可提现余额!',
showCancel: false
});
}else{
//
const param = {
creatorId: that.userInfo.id,
amt: that.amt
}
const checkRes = await checkWithdraw(param);
if(checkRes.data.code === 200){
if(checkRes.data.data === true){
//
const withdrawParam = {
creatorId: that.userInfo.id,
amt: that.amt,
accountNo: that.accountNo,
channel: that.type
}
const withdrawRes = await withdraw(withdrawParam);
if(withdrawRes.data.code === 200){
//
const creatorInfo = await getCreatorInfo(that.userInfo.id);
console.log('creatorInfo',creatorInfo)
if(creatorInfo.data.code === 200){
uni.setStorage({
key: 'userInfo',
data: creatorInfo.data.data,
success() {
uni.showModal({
title: '提示',
content: '发起提现成功,请等待审核!',
showCancel: false,
success() {
uni.reLaunch({
url: '/pages-userInfo/withdraw/withdrawIndex'
});
}
});
}
})
}else{
uni.showModal({
content: '获取艺术家信息失败!',
showCancel: false
});
}
}else{
uni.showModal({
content: '发起提现申请失败!',
showCancel: false
});
}
}else{
//
uni.showModal({
content: '输入金额超过可提现余额!',
showCancel: false
});
}
}else{
uni.showModal({
content: '检查艺术家是否可提现失败!',
showCancel: false
});
}
// await checkWithdraw(param).then(res =>{
// if(res.data.code === 200){
// if(res.data.data === true){
// //
// const withdrawParam = {
// creatorId: that.userInfo.id,
// amt: that.amt,
// accountNo: that.accountNo,
// channel: that.type
// }
// await withdraw(withdrawParam).then(resp =>{
// if(res.data.code === 200){
// uni.showToast({
// title: ',!',
// duration: 2000,
// success() {
// uni.reLaunch({
// url: '/pages-userInfo/withdraw/withdrawIndex'
// });
// }
// });
// }else{
// uni.showModal({
// content: '',
// showCancel: false
// });
// }
// })
// }else{
// //
// uni.showModal({
// content: '',
// showCancel: false
// });
// }
// }else{
// uni.showModal({
// content: '',
// showCancel: false
// });
// }
// })
}
}
}
}
</script>
<style lang="scss">
.withdrawBtn{
width: 750rpx;
height: 60rpx;
background-color: royalblue;
color: #ffffff;
font-size: 30rpx;
line-height: 62rpx;
border-radius: 17rpx;
margin-top:100rpx;
}
.uni-list-item__icon-img {
border-radius: 16rpx;
}
.ivOver{
width: 100%;
height:100rpx;
line-height: 100rpx;
text-align: center;
background: #fff;
font-size: 20rpx;
.page-bg {
width: 100vw;
height: 100vh;
overflow: hidden;
background-size: 750rpx auto;
background-color: #F7F7F7;
}
.box {
.main-container {
width: 686rpx;
margin: 0 auto;
display: flex;
padding-right: 16rpx;
flex: 1;
color: #3b4144;
flex-direction: column;
justify-content: center;
overflow: hidden;
margin-top: 36rpx;
}
.tl-panel{
width: 686rpx;
height: 296rpx;
padding: 32rpx;
background: #FFFFFF;
border-radius: 8rpx;
}
.tl-font-28-29{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #292929;
}
.tl-font-28-9b{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9B9B9B;
margin-top: 18rpx;
}
.box-bot {
.tl-font-32-29{
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #292929;
}
.input-box {
height: 100rpx;
width: 650rpx;
display: flex;
margin-top: 10rpx;
justify-content: space-between;
align-items: center;
font-size: 60rpx;
font-family: PingFang SC;
font-weight: bold;
color: #43413C;
opacity: 1;
border-bottom: 2rpx solid #E7E9EE;;
}
.box-bot view {
border-radius: 6rpx;
border: 2rpx solid #4d6aff;
padding: 4rpx 10rpx;
margin-right: 10rpx;
font-size: 24rpx;
.input-box .input-value {
flex: 1 auto;
margin-left: 10rpx;
height: 80rpx;
}
.tl-flex-row{
display: flex;
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
text-align: center;
}
.tl-panel-2{
width: 686rpx;
padding: 32rpx;
background: #FFFFFF;
border-radius: 8rpx;
}
.tl-title-60{
margin: 30rpx 0 20rpx 0;
}
.tl-title-62{
margin: 25rpx 0 30rpx 0;
}
.tl-panel-card{
width: 194rpx;
height: 136rpx;
line-height: 136rpx;
background: #F7F7F7;
border-radius: 8rpx;
}
.active{
background: #FEF5DD;
border-radius: 8rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #F2C827;
}
.tl-footer{
margin-top: 120rpx;
}
.tl-btn-686{
width: 686rpx;
height: 88rpx;
line-height: 88rpx;
background: #185dff;
border-radius: 8rpx;
color:white;
}
.uni-list-item__content-title {
.tl-blue{
font-size: 28rpx;
color: #3b4144;
overflow: hidden;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #2793F2;
}
.tl-img-76{
width: 76rpx;
height: 76rpx;
border-radius: 38rpx;
}
.tl-red{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #E04646;
}
/*** 模态框 ***/
.tl-flex-row{
display: flex;
justify-content: space-between;
align-items: center;
}
.tl-line-down{
border-bottom: 2rpx solid #EAEAEA;
margin: 60rpx 0 20rpx 0;
padding-bottom: 30rpx;
}
.tl-line-16{
width: 748rpx;
height: 16rpx;
background: #F7F7F7;
}
.tl-font-60-02{
font-size: 60rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #020202;
}
.tl-font-24-9b{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9B9B9B;
}
.ml-12{
margin-left: 12rpx;
}
.tl-text{
width: 450rpx;
display: -webkit-box; /*弹性伸缩盒子模型显示*/
-webkit-box-orient: vertical; /*排列方式*/
-webkit-line-clamp: 1; /*显示文本行数(这里控制多少行隐藏)*/
overflow: hidden; /*溢出隐藏*/
}
.withdrawBox{
display: flex;
justify-content: space-between;
align-items: center;
margin: 40rpx 40rpx 20rpx 10rpx;
}
.radioStyle{
margin-left: 200rpx;
}
</style>

27
pages-userInfo/withdraw/withdrawDetail.vue

@ -61,10 +61,30 @@
status: '',
createTime: '',
reason: '',
achieveTime: ''
achieveTime: '',
userInfo:{}
}
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
onLoad: function(option) { //optionobject
console.log(option)
this.withdrawDetailInfo.orderId = option.orderId
@ -73,12 +93,13 @@
methods: {
//
async getWithdrawDetails() {
let that = this;
const res = await getWithdrawDetails({
orderId: this.withdrawDetailInfo.orderId
orderId: that.withdrawDetailInfo.orderId
})
console.log('res', res)
if (res.data.code === 200) {
this.withdrawDetailInfo = res.data.data
that.withdrawDetailInfo = res.data.data
} else {
uni.showModal({
content: '提现记录详情数据加载失败!',

111
pages-userInfo/withdraw/withdrawIndex.vue

@ -0,0 +1,111 @@
<template>
<view class="container">
<view class="head">
<uni-icons type="medal" size="50"/>
<view class="box">
<text>钱包余额</text>
</view>
<view class="box">
<text>{{userInfo.amt}}</text>
</view>
<button class="withdrawBtn" size="default" :loading="loadingFlag" @click="withdraw('/pages-userInfo/withdraw/withdraw')" :disabled="checkUpload">发起提现</button>
</view>
<view class="bottom">
<uni-group mode="card">
<uni-list>
<uni-list-item title="管理收款账户" :show-extra-icon="true" :extra-icon="wallet" link to="/pages-userInfo/creatorAccount/creatorAccount"></uni-list-item>
<uni-list-item title="提现记录" :show-extra-icon="true" :extra-icon="withlog" link to="/pages-userInfo/withdraw/withdrawLog"></uni-list-item>
</uni-list>
</uni-group>
</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: {},
wallet: {
color:'#0000ff',
size: '22',
type: 'wallet'
},
withlog: {
color:'#0000ff',
size: '22',
type: 'compose'
},
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
methods: {
// targetToDetail(orderId) {
// console.log('orderId', orderId)
// if (orderId) {
// uni.navigateTo({
// url: 'withdrawDetail?orderId=' + orderId,
// });
// }
// },
withdraw(url){
uni.navigateTo({
url: url
})
}
}
}
</script>
<style lang="scss">
.container{
.head{
margin-bottom: 50rpx;
text-align: center;
.box{
//border:1px red solid;
padding-bottom: 30rpx;
}
}
}
.withdrawBtn{
width: 710rpx;
height: 60rpx;
background-color: royalblue;
color: #ffffff;
font-size: 30rpx;
line-height: 62rpx;
border-radius: 17rpx;
margin-top:100rpx;
}
.uni-list-item__icon-img {
border-radius: 16rpx;
}
.uni-list-item__content-title {
font-size: 28rpx;
color: #3b4144;
overflow: hidden;
}
</style>

28
pages-userInfo/withdraw/withdrawLog.vue

@ -47,8 +47,23 @@
}
},
created() {
const userInfoSync = uni.getStorageSync('userInfo')
this.userInfo = userInfoSync
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
this.getWithdrawList();
},
//
@ -71,14 +86,15 @@
methods: {
//
async getWithdrawList() {
let that = this;
const res = await getWithdrawList({
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: this.userInfo.id
pageSize: that.pageSize,
pageNum: that.pageNum,
creatorId: that.userInfo.id
})
console.log('res', res)
if (res.data.code === 200) {
this.withdrawList.push(...res.data.rows)
that.withdrawList.push(...res.data.rows)
} else {
uni.showModal({
content: '提现记录列表数据加载失败!',

23
pages.json

@ -136,6 +136,20 @@
"enablePullDownRefresh": true
}
},
{
"path": "creatorAccount/creatorAccount",
"style": {
"navigationBarTitleText": "收款账户",
"enablePullDownRefresh": true
}
},
{
"path": "creatorAccount/createAccount",
"style": {
"navigationBarTitleText": "添加收款账户",
"enablePullDownRefresh": false
}
},
{
"path": "withdraw/withdrawLog",
"style": {
@ -144,12 +158,19 @@
}
},
{
"path": "withdraw/withdraw",
"path": "withdraw/withdrawIndex",
"style": {
"navigationBarTitleText": "提现",
"enablePullDownRefresh": true
}
},
{
"path": "withdraw/withdraw",
"style": {
"navigationBarTitleText": "发起提现",
"enablePullDownRefresh": false
}
},
{
"path": "notice/noticeDetail",
"style": {

48
pages/index/index.vue

@ -55,6 +55,7 @@
export default {
data() {
return {
userInfo:{},
banner:[],
current: 0,
mode: 'nav',
@ -112,7 +113,23 @@
};
},
created(){
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
onLoad(){
@ -146,10 +163,11 @@
// banner
async getBanner() {
let that = this;
const res = await listBanner()
if (res.data.code === 200) {
this.banner = res.data.data
console.log('banner',this.banner)
that.banner = res.data.data
console.log('banner',that.banner)
} else {
uni.showModal({
content: 'banner加载失败!',
@ -160,23 +178,17 @@
//
async queryCreatorTypeImgNum() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
} else {
console.log('have userInfo')
}
const res = await queryCreatorTypeImgNum(userInfo.id)
let that = this;
const res = await queryCreatorTypeImgNum(that.userInfo.id)
console.log('res',res)
if (res.data.code === 200) {
this.list[0].num = res.data.data.headNum
this.list[1].num = res.data.data.gifNum
this.list[2].num = res.data.data.backNum
this.list[3].num = res.data.data.friendNum
this.list[4].num = res.data.data.emoNum
this.list[5].num = res.data.data.watchNum
console.log('list',this.list)
that.list[0].num = res.data.data.headNum
that.list[1].num = res.data.data.gifNum
that.list[2].num = res.data.data.backNum
that.list[3].num = res.data.data.friendNum
that.list[4].num = res.data.data.emoNum
that.list[5].num = res.data.data.watchNum
//console.log('list',that.list)
} else {
uni.showModal({
content: '图片分页数量加载失败!',

26
pages/index/material/imgDetail.vue

@ -2,11 +2,11 @@
<view class="imgDetail">
<image class="main-img" :src="detailMsg.imgUrl" :style="'width:'+imgWidth+';height:'+imgHeight+';margin-top:'+marginTop" mode=""></image>
<view class="toolbar" :style="'display:'+showOrmis">
<view class="toolbarLeft" @click=topImg>置顶</view>
<view class="toolbarLeft" @click="$noMultipleClicks(topImg)">置顶</view>
<view class="border"></view>
<view class="toolbarMid" @click="onOrOffHandler">{{upOrDown}}</view>
<view class="toolbarMid" @click="$noMultipleClicks(onOrOffHandler)">{{upOrDown}}</view>
<view class="border"></view>
<view class="toolbarRight" @click="changeSign">修改标签</view>
<view class="toolbarRight" @click="$noMultipleClicks(changeSign)">修改标签</view>
<view>
<uni-drawer ref="showRight" mode="right" :width="300">
<view class="close">
@ -16,7 +16,7 @@
<uni-data-checkbox mode="tag" multiple v-model="signListSelected" :localdata="signList" @change="selectedSign" max="3"></uni-data-checkbox>
</view>
</uni-group>
<button class="upLoadBtn" @click="modifySign">保存</button>
<button class="upLoadBtn" @click="$noMultipleClicks(modifySign)">保存</button>
</view>
</uni-drawer>
</view>
@ -43,11 +43,29 @@
showOrmis: 'none' ,//
upOrDown: '下',
showRight: false,
noClick:true, //
signListSelected:[],
signList:[],
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
const detailId = uni.getStorageSync('detailId')
if (detailId) {
this.getImgDetail(detailId)

41
pages/index/material/material.vue

@ -42,8 +42,23 @@
this.listTiktokImgIn();
},
created(){
const userInfoSync = uni.getStorageSync("userInfo");
this.userInfo = userInfoSync;
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
this.queryListType();
this.imgWidth = 750/3-20 + 'rpx'
this.imgHeight = 750/3-20 + 'rpx'
@ -207,23 +222,17 @@
//
async listTiktokImgIn() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
} else {
console.log('have userInfo')
}
let that = this;
const res = await listTiktokImgIn({
pageNum: this.pageNum,
pageSize: this.pageSize,
typeId: this.typeId,
status: this.status,
creatorId: userInfo.id
pageNum: that.pageNum,
pageSize: that.pageSize,
typeId: that.typeId,
status: that.status,
creatorId: that.userInfo.id
})
if (res.data.code === 200) {
this.creatorImgList.push(...res.data.rows)
console.log('creatorImgList',this.creatorImgList);
that.creatorImgList.push(...res.data.rows)
console.log('creatorImgList',that.creatorImgList);
} else {
uni.showModal({
content: '艺术家图片列表加载失败!',

43
pages/index/upload/upload.vue

@ -24,7 +24,7 @@
</view>
</uni-group>
</uni-section>
<button class="upLoadBtn" size="default" :loading="loadingFlag" @click="saveImg" :disabled="checkUpload">点击上传</button>
<button class="upLoadBtn" size="default" :loading="loadingFlag" @click="$noMultipleClicks(saveImg)" :disabled="checkUpload">点击上传</button>
</view>
</template>
@ -50,14 +50,30 @@
imgList:[],
signListSelected:[],
userInfo:{},
uploadedNum: 0
uploadedNum: 0,
noClick:true, //
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
this.getSignList();
this.getTypeList();
const userInfoSync = uni.getStorageSync("userInfo");
this.userInfo = userInfoSync;
this.queryUploadNum();
},
computed:{
@ -75,15 +91,16 @@
//
async getSignList(){
let that = this;
const res = await getSignList({})
if (res.data.code === 200) {
for (let s of res.data.data) {
let signObject = {}
signObject.text = s.name
signObject.value = s.id
this.signList.push(signObject)
that.signList.push(signObject)
}
console.log('signList',this.signList)
//console.log('signList',that.signList)
} else {
uni.showModal({
content: '标签列表加载失败!',
@ -94,14 +111,15 @@
//
async getTypeList(){
let that = this;
const res = await listType({})
if(res.data.code === 200){
for (let s of res.data.data) {
this.typeList.push(s.typeName);
this.typeIdList.push(s.id);
that.typeList.push(s.typeName);
that.typeIdList.push(s.id);
}
console.log('分类列表',this.typeList)
console.log('分类id列表',this.typeIdList)
//console.log('',that.typeList)
//console.log('id',that.typeIdList)
}else{
uni.showModal({
content: '分类列表加载失败!',
@ -112,13 +130,14 @@
//
async queryUploadNum(){
let that = this;
const checkParam = {
creatorId: this.userInfo.id
creatorId: that.userInfo.id
}
const res = await queryUploadNum(checkParam);
console.log(res)
if(res.data.code === 200){
this.uploadedNum = res.data.data;
that.uploadedNum = res.data.data;
}else{
uni.showModal({
content: '获取艺术家上传次数失败!',

3
pages/login/login.vue

@ -8,7 +8,7 @@
<uni-easyinput type="password" v-model="formData.password" placeholder="请输入密码" />
</uni-forms-item>
</uni-forms>
<button type="primary" @click="login(formData)">登录</button>
<button type="primary" @click="$noMultipleClicks(login,formData)">登录</button>
</view>
</template>
@ -22,6 +22,7 @@
return {
phoneFlag: false,
passwordFlag: false,
noClick:true, //
formData: {
phone: '',
password: ''

52
pages/profit/profit.vue

@ -189,8 +189,23 @@ export default {
uni.stopPullDownRefresh();
},
created() {
const userInfoSync = uni.getStorageSync("userInfo");
this.userInfo = userInfoSync;
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
this.queryFrontProfitInfo();
this.queryFrontPreDownloadAndInviteCount();
this.queryFrontInAmt();
@ -200,11 +215,12 @@ export default {
methods: {
//
async queryFrontProfitInfo() {
const res = await queryFrontProfitInfo(this.userInfo.id);
let that = this;
const res = await queryFrontProfitInfo(that.userInfo.id);
//console.log('res', res)
if (res.data.code === 200) {
this.profitInfo = res.data.data;
//console.log('profitInfo', this.profitInfo)
that.profitInfo = res.data.data;
//console.log('profitInfo', that.profitInfo)
} else {
uni.showModal({
content: "收益统计加载失败!",
@ -215,11 +231,12 @@ export default {
// 广
async queryFrontPreDownloadAndInviteCount() {
const res = await queryFrontPreDownloadAndInviteCount(this.userInfo.id);
let that = this;
const res = await queryFrontPreDownloadAndInviteCount(that.userInfo.id);
//console.log('res', res)
if (res.data.code === 200) {
this.downloadAndInviteCountInfo = res.data.data;
//console.log('downloadAndInviteCountInfo', this.downloadAndInviteCountInfo)
that.downloadAndInviteCountInfo = res.data.data;
//console.log('downloadAndInviteCountInfo', that.downloadAndInviteCountInfo)
} else {
uni.showModal({
content: "收益统计次数加载失败!",
@ -230,13 +247,14 @@ export default {
//
async queryFrontInAmt() {
let that = this;
const res = await queryFrontInOrOutAmt({
creatorId: this.userInfo.id,
creatorId: that.userInfo.id,
status: "1",
});
//console.log('InAmt', res)
if (res.data.code === 200) {
this.inProfitInfo = res.data.data;
that.inProfitInfo = res.data.data;
} else {
uni.showModal({
content: "已入账收益加载失败!",
@ -247,13 +265,14 @@ export default {
//
async queryFrontEndAmt() {
let that = this;
const res = await queryFrontInOrOutAmt({
creatorId: this.userInfo.id,
creatorId: that.userInfo.id,
status: "2",
});
//console.log('endAmt', res)
if (res.data.code === 200) {
this.endProfitInfo = res.data.data;
that.endProfitInfo = res.data.data;
} else {
uni.showModal({
content: "转入钱包收益加载失败!",
@ -264,14 +283,15 @@ export default {
//
async getNoticeList() {
let that = this;
const res = await getNoticeList({
pageSize: this.pageSize,
pageNum: this.pageNum,
pageSize: that.pageSize,
pageNum: that.pageNum,
});
//console.log('res', res)
if (res.data.code === 200) {
this.noticeList = res.data.rows;
//console.log('noticeList', this.noticeList)
that.noticeList = res.data.rows;
//console.log('noticeList', that.noticeList)
} else {
uni.showModal({
content: "公告列表加载失败!",

34
pages/profit/profitEndDetails.vue

@ -109,8 +109,23 @@ export default {
};
},
created() {
const userInfoSync = uni.getStorageSync("userInfo");
this.userInfo = userInfoSync;
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
const typeProfitId = uni.getStorageSync("typeId");
this.typeId = typeProfitId;
if (typeProfitId) {
@ -156,17 +171,18 @@ export default {
methods: {
//
async queryFrontEndProfitAmt() {
let that = this;
const res = await queryFrontEndProfitAmt({
creatorId: this.userInfo.id,
type: this.typeId,
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: that.userInfo.id,
type: that.typeId,
pageSize: that.pageSize,
pageNum: that.pageNum,
});
if (res.data.code === 200) {
if (this.typeId === 0) {
this.endProfitAdList.push(...res.data.rows);
if (that.typeId === 0) {
that.endProfitAdList.push(...res.data.rows);
} else {
this.endProfitInviteList.push(...res.data.rows);
that.endProfitInviteList.push(...res.data.rows);
}
} else {
uni.showModal({

25
pages/profit/profitEndOrder.vue

@ -44,9 +44,29 @@ export default {
type: "",
profit: 0,
walletTime: "",
userInfo:{}
},
};
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
onLoad: function (option) {
//optionobject
this.orderDetail.id = option.id;
@ -56,10 +76,11 @@ export default {
methods: {
//
async queryFrontEndAmtDetails() {
const res = await queryFrontEndAmtDetails(this.orderDetail.id);
let that = this;
const res = await queryFrontEndAmtDetails(that.orderDetail.id);
//console.log('res', res)
if (res.data.code === 200) {
this.orderDetail = res.data.data;
that.orderDetail = res.data.data;
} else {
uni.showModal({
content: "转入钱包收益详情数据加载失败!",

34
pages/profit/profitInDetails.vue

@ -109,8 +109,23 @@ export default {
};
},
created() {
const userInfoSync = uni.getStorageSync("userInfo");
this.userInfo = userInfoSync;
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
const typeProfitId = uni.getStorageSync("typeId");
this.typeId = typeProfitId;
if (typeProfitId) {
@ -156,17 +171,18 @@ export default {
methods: {
//
async queryFrontInProfitAmt() {
let that = this;
const res = await queryFrontInProfitAmt({
creatorId: this.userInfo.id,
type: this.typeId,
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: that.userInfo.id,
type: that.typeId,
pageSize: that.pageSize,
pageNum: that.pageNum,
});
if (res.data.code === 200) {
if (this.typeId === 0) {
this.inProfitAdList.push(...res.data.rows);
if (that.typeId === 0) {
that.inProfitAdList.push(...res.data.rows);
} else {
this.inProfitInviteList.push(...res.data.rows);
that.inProfitInviteList.push(...res.data.rows);
}
} else {
uni.showModal({

30
pages/profit/profitInOrder.vue

@ -67,9 +67,29 @@ export default {
confirmType: "",
confirmTime: "",
confirmStatus: "",
userInfo:{}
},
};
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
onLoad: function (option) {
//optionobject
this.orderDetail.id = option.id;
@ -79,10 +99,11 @@ export default {
methods: {
//
async queryFrontInAmtDetails() {
const res = await queryFrontInAmtDetails(this.orderDetail.id);
let that = this;
const res = await queryFrontInAmtDetails(that.orderDetail.id);
//console.log('res', res)
if (res.data.code === 200) {
this.orderDetail = res.data.data;
that.orderDetail = res.data.data;
} else {
uni.showModal({
content: "已入账收益详情数据加载失败!",
@ -93,9 +114,10 @@ export default {
//
handleUpdateConfirmType() {
let that = this;
const param = {
creatorId: this.orderDetail.creatorId,
id: this.orderDetail.id,
creatorId: that.orderDetail.creatorId,
id: that.orderDetail.id,
};
handleUpdateConfirmType(param).then((res) => {
console.log("res", res);

34
pages/profit/profitPreDetails.vue

@ -103,8 +103,23 @@ export default {
};
},
created() {
const userInfoSync = uni.getStorageSync("userInfo");
this.userInfo = userInfoSync;
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
const typeProfitId = uni.getStorageSync("typeId");
this.typeId = typeProfitId;
if (typeProfitId) {
@ -194,17 +209,18 @@ export default {
//
async queryFrontPreProfit() {
let that = this;
const res = await queryFrontPreProfit({
creatorId: this.userInfo.id,
type: this.typeId,
pageSize: this.pageSize,
pageNum: this.pageNum,
creatorId: that.userInfo.id,
type: that.typeId,
pageSize: that.pageSize,
pageNum: that.pageNum,
});
if (res.data.code === 200) {
if (this.typeId === 0) {
this.preProfitAdList.push(...res.data.rows);
if (that.typeId === 0) {
that.preProfitAdList.push(...res.data.rows);
} else {
this.preprofitInviteList.push(...res.data.rows);
that.preprofitInviteList.push(...res.data.rows);
}
} else {
uni.showModal({

21
pages/userInfo/userInfo.vue

@ -56,7 +56,7 @@
title: '通知公告',
img: '/static/iconNotice.png'
}, {
url: '/pages-userInfo/withdraw/withdraw',
url: '/pages-userInfo/withdraw/withdrawIndex',
title: '提现记录',
img: '/static/iconWithdraw.png'
},{
@ -69,8 +69,23 @@
}
},
created() {
this.userInfo = uni.getStorageSync('userInfo')
console.log('this.userInfo', this.userInfo)
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
success() {
//
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
this.userInfo = userInfo;
console.log('have userInfo')
}
},
methods: {
change(e) {

BIN
static/aliPay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

BIN
static/wxPay.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

24
utils/common.js

@ -0,0 +1,24 @@
// 防止处理多次点击
function noMultipleClicks(methods, info) {
// methods是需要点击后需要执行的函数, info是点击需要传的参数
let that = this;
if (that.noClick) {
// 第一次点击
that.noClick= false;
if(info && info !== '') {
// info是执行函数需要传的参数
methods(info);
} else {
methods();
}
setTimeout(()=> {
that.noClick= true;
}, 2000)
} else {
// 这里是重复点击的判断
}
}
//导出
export default {
noMultipleClicks,//禁止多次点击
}
Loading…
Cancel
Save