Browse Source

页面样式

feature-1.0
helming 3 years ago
parent
commit
a0c60f39ed
  1. 4
      main.js
  2. 63
      pages-userInfo/about/about.vue
  3. 79
      pages-userInfo/notice/notice.vue
  4. 49
      pages/index/index.vue
  5. 127
      pages/index/material/imgDetail.vue
  6. 127
      pages/index/material/material.vue
  7. 212
      pages/index/upload/upload.vue
  8. 89
      pages/login/login.vue
  9. 6
      pages/profit/profit.vue
  10. 56
      pages/profit/profitEndDetails.vue
  11. 57
      pages/profit/profitInDetails.vue
  12. 58
      pages/profit/profitPreDetails.vue
  13. 7
      pages/userInfo/userInfo.vue
  14. 58
      uni.scss
  15. 23
      utils/request.js

4
main.js

@ -3,10 +3,10 @@ import store from './store/'
//配置公共方法(防止重复提交) //配置公共方法(防止重复提交)
import common from './utils/common.js' import common from './utils/common.js'
// const baseURL = 'http://localhost:7010' const baseURL = 'http://localhost:7010'
//const baseURL = 'http://81.69.47.31:7010' //const baseURL = 'http://81.69.47.31:7010'
// const baseURL = 'http://bnyer.vaiwan.com' // const baseURL = 'http://bnyer.vaiwan.com'
const baseURL = 'http://fu7avs.natappfree.cc' // const baseURL = 'http://x9uf7k.natappfree.cc'
Vue.prototype.$baseURL = baseURL; Vue.prototype.$baseURL = baseURL;

63
pages-userInfo/about/about.vue

@ -102,10 +102,61 @@
} }
</script> </script>
<style lang="less"> <style lang="scss" scoped>
.head{ .container {
text-align: center; width: 750rpx;
color: blue; min-height: 100vh;
font-size:36rpx; background: $uni-bg-color;
}
.head{
text-align: center;
color: $uni-primary;
font-size: 36rpx;
height: 80rpx;
line-height: 80rpx;
}
uni-group {
margin-bottom: 20rpx;
}
::v-deep .uni-group {
background: $uni-bg-color !important;
margin-left: 40rpx !important;
margin-right: 40rpx !important;
}
::v-deep .uni-group__content {
padding: 0 !important;
}
::v-deep .uni-collapse {
background: $uni-bg-base-color !important;
}
::v-deep .uni-collapse-item__title.uni-collapse-item-border {
border-bottom: 1px solid $uni-main-color !important;
}
::v-deep .uni-collapse-item__title-box {
background: $uni-bg-base-color !important;
}
::v-deep .uni-collapse-item__title-text {
color: $uni-white !important;
font-size: 26rpx;
}
::v-deep .uni-collapse-item__wrap {
background: $uni-bg-base-color !important;
}
::v-deep .uni-collapse-item__wrap-content.uni-collapse-item--border {
border-bottom-color: $uni-main-color !important;
color: $uni-secondary-color;
line-height: 38rpx;
padding: 20rpx 40rpx;
}
}
</style> </style>

79
pages-userInfo/notice/notice.vue

@ -4,8 +4,11 @@
<uni-list-item showArrow clickable :title="item.title" :note="item.createTime" :thumb="item.img" <uni-list-item showArrow clickable :title="item.title" :note="item.createTime" :thumb="item.img"
thumb-size="lg" @click="targetToDetail(item.id)" /> thumb-size="lg" @click="targetToDetail(item.id)" />
</uni-list> </uni-list>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view> <!-- 显示加载中或者全部加载完成 -->
</view> <view>
<uni-load-more :status="loadStatus"></uni-load-more>
</view>
</view>
</template> </template>
<script> <script>
@ -19,7 +22,9 @@
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
flag: false, flag: false,
userInfo:{} userInfo:{},
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
} }
}, },
created() { created() {
@ -50,20 +55,21 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, },
// //
onReachBottom() { onReachBottom(e) {//
if (this.noticeList.length > this.pageSize*this.pageNum-1) { if(!this.isLoadMore) { //
this.flag = false; this.isLoadMore=true
this.pageNum += 1 if (this.loadStatus === "more") {
this.getNoticeList(); this.pageNum += 1 //
}else{ this.getNoticeList();
this.flag = true; }
} }
}, },
methods: { methods: {
// //
async getNoticeList() { async getNoticeList() {
let that = this; let that = this;
this.loadStatus = 'loading';
const res = await getNoticeList({ const res = await getNoticeList({
pageSize: that.pageSize, pageSize: that.pageSize,
pageNum: that.pageNum, pageNum: that.pageNum,
@ -72,16 +78,27 @@
if (res.data.code === 200) { if (res.data.code === 200) {
that.noticeList.push(...res.data.rows) that.noticeList.push(...res.data.rows)
//console.log('noticeList', that.noticeList) //console.log('noticeList', that.noticeList)
if(res.data.rows.length < that.pageSize){ //
that.isLoadMore = true
that.loadStatus = 'noMore'
}else{
this.loadStatus = 'more';
that.isLoadMore = false
}
} else { } else {
uni.showModal({ uni.showModal({
content: '公告列表加载失败!', content: '公告列表加载失败!',
showCancel: false showCancel: false
}); });
that.isLoadMore = false
if(that.page > 1){
that.page -= 1
}
} }
}, },
targetToDetail(id) { targetToDetail(id) {
console.log('id', id) // console.log('id', id)
if (id) { if (id) {
uni.navigateTo({ uni.navigateTo({
url: 'noticeDetail?id=' + id url: 'noticeDetail?id=' + id
@ -91,8 +108,44 @@
}, },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
page {
height: 100vh;
background-color: $uni-bg-color;
}
</style>
<style lang="scss" scoped>
.container {
width: 670rpx;
margin: 0 auto;
::v-deep .uni-list {
background: $uni-bg-base-color !important;
margin-bottom: 20rpx;
border-radius: 24rpx;
overflow: hidden;
}
::v-deep .uni-list-item {
background: $uni-bg-base-color !important;
}
::v-deep .uni-list--border-top {
display: none !important;
}
::v-deep .uni-list--border-bottom {
display: none !important;
}
::v-deep .uni-list-item__content-title {
color: $uni-white !important;
}
::v-deep .uni-list-item__content-note {
color: $uni-secondary-color !important;
}
}
.ivOver{ .ivOver{
width: 100%; width: 100%;
height:100rpx; height:100rpx;

49
pages/index/index.vue

@ -28,7 +28,7 @@
<view class="foot"> <view class="foot">
<view class="foot-div"> <view class="foot-div">
<view class="grid-item-box uni-white" v-for="(params, v) in list" :index="v" :key="v"> <view class="grid-item-box uni-white" v-for="(params, v) in list" :index="v" :key="v" @click="clickCategoryItem(params.typeId, v)">
<!-- <uni-icons type="image" :size="30" color="#777" /> --> <!-- <uni-icons type="image" :size="30" color="#777" /> -->
<view class="icom-div"> <view class="icom-div">
<image :src="params.icon" class="listIconImage" mode="aspectFill" /> <image :src="params.icon" class="listIconImage" mode="aspectFill" />
@ -83,37 +83,37 @@
list: [{ list: [{
typeId: 1, typeId: 1,
text: '头像', text: '头像',
num: '10', num: '0',
icon: '/static/headBack.png' icon: '/static/headBack.png'
}, },
{ {
typeId: 2, typeId: 2,
text: 'Gif动图', text: 'Gif动图',
num: '10', num: '0',
icon: '/static/gifBack.png' icon: '/static/gifBack.png'
}, },
{ {
typeId: 3, typeId: 3,
text: '手机壁纸', text: '手机壁纸',
num: '20', num: '0',
icon: '/static/phoneBack.png' icon: '/static/phoneBack.png'
}, },
{ {
typeId: 4, typeId: 4,
text: '背景图', text: '背景图',
num: '10', num: '0',
icon: '/static/friendBack.png' icon: '/static/friendBack.png'
}, },
{ {
typeId: 5, typeId: 5,
text: '表情包', text: '表情包',
num: '15', num: '0',
icon: '/static/emoBack.png' icon: '/static/emoBack.png'
}, },
{ {
typeId: 6, typeId: 6,
text: 'iwatch', text: 'iwatch',
num: '3', num: '0',
icon: '/static/iwatchBack.png' icon: '/static/iwatchBack.png'
} }
] ]
@ -168,6 +168,12 @@
// url: this.pageUrl // url: this.pageUrl
}); });
}, },
clickCategoryItem(id, index) {
/** 跳转指定页面*/
uni.navigateTo({
url: `/pages/index/material/material?categoryId=${id}&categoryIndex=${index}`,
});
},
clickItem(e) { clickItem(e) {
this.swiperDotIndex = e this.swiperDotIndex = e
}, },
@ -201,12 +207,13 @@
const res = await queryCreatorTypeImgNum(that.userInfo.id) const res = await queryCreatorTypeImgNum(that.userInfo.id)
// console.log('res',res) // console.log('res',res)
if (res.data.code === 200) { if (res.data.code === 200) {
that.list[0].num = res.data.data.headNum let data = res.data.data;
that.list[1].num = res.data.data.gifNum that.list[0] = {...that.list[0], num: data.headerInfo.headNum, typeId: data.headerInfo.typeId}
that.list[2].num = res.data.data.backNum that.list[1] = {...that.list[1], num: data.gifInfo.gifNum, typeId: data.gifInfo.typeId}
that.list[3].num = res.data.data.friendNum that.list[2] = {...that.list[2], num: data.backInfo.backNum, typeId: data.backInfo.typeId}
that.list[4].num = res.data.data.emoNum that.list[3] = {...that.list[3], num: data.friendInfo.friendNum, typeId: data.friendInfo.typeId}
that.list[5].num = res.data.data.watchNum that.list[4] = {...that.list[4], num: data.emoInfo.emoNum, typeId: data.emoInfo.typeId}
that.list[5] = {...that.list[5], num: data.watchInfo.watchNum, typeId: data.watchInfo.typeId}
//console.log('list',that.list) //console.log('list',that.list)
} else { } else {
uni.showModal({ uni.showModal({
@ -288,7 +295,7 @@
.middle-div { .middle-div {
width: 670rpx; width: 670rpx;
height: calc(20vh - 30rpx); min-height: calc(20vh - 30rpx);
margin: 0 auto; margin: 0 auto;
background: #1d2734; background: #1d2734;
border-radius: 20rpx; border-radius: 20rpx;
@ -320,15 +327,17 @@
} }
.foot { .foot {
position: absolute; //position: absolute;
top: calc(70vh - 40rpx); //top: calc(70vh - 40rpx);
left: 0; //left: 0;
right: 0; //right: 0;
height: calc(30vh - 30rpx); min-height: calc(30vh - 30rpx);
margin-top: calc(20vh - 40rpx);
.foot-div { .foot-div {
width: 670rpx; width: 670rpx;
height: 100%; height: 100%;
padding-top: 40rpx;
margin: 0 auto; margin: 0 auto;
background: #1d2734; background: #1d2734;
border-radius: 20rpx; border-radius: 20rpx;
@ -341,7 +350,7 @@
.grid-item-box { .grid-item-box {
width: 170rpx; width: 170rpx;
height: 50%; height: 50%;
//padding: 40rpx; margin-bottom: 40rpx;
.icom-div { .icom-div {
//background: #0a6375; //background: #0a6375;

127
pages/index/material/imgDetail.vue

@ -1,24 +1,22 @@
<template> <template>
<view class="imgDetail"> <view class="imgDetail">
<image class="main-img" :src="detailMsg.imgUrl" :style="'width:'+imgWidth+';height:'+imgHeight+';margin-top:'+marginTop" mode=""></image> <view class="img-view">
<view class="toolbar" :style="'display:'+showOrmis"> <image class="main-img" :src="detailMsg.imgUrl" :style="'width:'+imgWidth+';height:'+imgHeight+';'" mode=""></image>
</view>
<view class="toolbar" :style="'display:'+showOrmis">
<view class="toolbarLeft" @click="$noMultipleClicks(topImg)">置顶</view> <view class="toolbarLeft" @click="$noMultipleClicks(topImg)">置顶</view>
<view class="border"></view> <view class="border"></view>
<view class="toolbarMid" @click="$noMultipleClicks(onOrOffHandler)">{{upOrDown}}</view> <view class="toolbarMid" @click="$noMultipleClicks(onOrOffHandler)">{{upOrDown}}</view>
<view class="border"></view> <view class="border"></view>
<view class="toolbarRight" @click="$noMultipleClicks(changeSign)">修改标签</view> <view class="toolbarRight" @click="$noMultipleClicks(changeSign)">修改标签</view>
<view> <view>
<uni-drawer ref="showRight" mode="right" :width="300"> <uni-popup class="popup-modal" ref="showPopup" type="bottom" background-color="#141b29">
<view class="close"> <view class="segmented-control">
<uni-group mode="card"> <view class="segmented-title">标签列表最多选择3个</view>
<view class="segmented-control"> <uni-data-checkbox mode="tag" multiple v-model="signListSelected" :localdata="signList" @change="selectedSign" max="3"></uni-data-checkbox>
<view>标签列表(最多选择3个)</view> </view>
<uni-data-checkbox mode="tag" multiple v-model="signListSelected" :localdata="signList" @change="selectedSign" max="3"></uni-data-checkbox> <button class="upLoadBtn" @click="$noMultipleClicks(modifySign)">保存</button>
</view> </uni-popup>
</uni-group>
<button class="upLoadBtn" @click="$noMultipleClicks(modifySign)">保存</button>
</view>
</uni-drawer>
</view> </view>
</view> </view>
</view> </view>
@ -46,6 +44,9 @@
noClick:true, // noClick:true, //
signListSelected:[], signListSelected:[],
signList:[], signList:[],
typeId: 0,
typeCurrent: 0,
status: 0,
} }
}, },
created() { created() {
@ -74,6 +75,13 @@
} }
this.getSignList(); this.getSignList();
}, },
onLoad(option) {
if (option?.categoryId && option?.categoryIndex && option?.status) {
this.typeId = option.categoryId * 1;
this.typeCurrent = option.categoryIndex * 1;
this.status = option.status * 1;
}
},
methods: { methods: {
// //
@ -109,7 +117,7 @@
if (res.data.code === 200) { if (res.data.code === 200) {
for (let s of res.data.data) { for (let s of res.data.data) {
let signObject = {} let signObject = {}
signObject.text = s.name signObject.text = "#" + s.name
signObject.value = s.id signObject.value = s.id
this.signList.push(signObject) this.signList.push(signObject)
} }
@ -159,10 +167,11 @@
changeSign(){ changeSign(){
console.log('修改标签'); console.log('修改标签');
// //
this.$refs.showRight.open(); this.$refs.showPopup.open();
}, },
// //
changeStatus:function(id,status){ changeStatus:function(id,status){
let that = this;
const param = { const param = {
id: id, id: id,
status: status status: status
@ -175,7 +184,7 @@
success() { success() {
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.redirectTo({
url: '/pages/index/material/material' url: `/pages/index/material/material?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`
}); });
}, 1000) }, 1000)
@ -248,33 +257,41 @@
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.imgDetail{ .imgDetail{
height:100%; height:100%;
width:750rpx; width:750rpx;
overflow: hidden; overflow: hidden;
background-color: black; background-color: $uni-bg-color;
position: absolute; position: absolute;
z-index: 0; z-index: 0;
.img-view {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
z-index: 1;
}
.main-img { .main-img {
position: absolute;
z-index: 1;
} }
.toolbar{ .toolbar{
height: 100rpx; height: 100rpx;
width: 700rpx; width: 700rpx;
position: absolute;
z-index: 2; z-index: 2;
border-radius: 20rpx; border-radius: 20rpx;
background-color: #B3B3B3; background-color: $uni-primary;
margin-top: 1050rpx; color: $uni-white;
margin-left: 20rpx; position: absolute;
bottom: 68rpx;
left: 25rpx;
right: 25rpx;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
opacity: 0.7;
@ -282,7 +299,7 @@
.border { .border {
width: 1rpx; width: 1rpx;
height: 30rpx; height: 30rpx;
background-color: black; background-color: $uni-white;
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
@ -318,14 +335,52 @@
} }
} }
} }
.upLoadBtn{
width: 100%; .popup-modal {
height: 60rpx;
background-color: royalblue; .segmented-control {
color: #ffffff; width: 654rpx;
font-size: 30rpx; margin: 40rpx auto;
line-height: 62rpx;
border-radius: 17rpx; .segmented-title {
margin-top:100rpx; font-size: 28rpx;
} color: $uni-white;
margin-bottom: 20rpx;
}
::v-deep .checklist-box {
border: none !important;
background: none !important;
margin-right: 0 !important;
}
::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;
}
::v-deep .is-disable .checklist-text {
color: $uni-base-color !important;
font-size: 24rpx !important;
}
}
.upLoadBtn{
width: 654rpx;
height: 100rpx;
line-height: 100rpx;
background: linear-gradient(180.00deg, $uni-primary 0%, $uni-primary 100%);
margin: 60rpx auto 0;
color: $uni-white;
border-radius: 20rpx;
font-size: 28rpx;
}
}
</style> </style>

127
pages/index/material/material.vue

@ -1,15 +1,34 @@
<template> <template>
<view class="choiceness"> <view class="choiceness">
<view class="status-choice-comp">
<view class="status-item uni-secondary-color" v-for="(val, i) in statusList"
:index="i" :key="i"
:class="statusCurrent === i ? 'status-active' : ''"
@click="onClickStatus({currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
</view>
<view class="type-choice-comp">
<view class="type-item uni-secondary-color" v-for="(val, i) in typeList"
:index="i" :key="i"
:class="typeCurrent === i ? 'type-active' : ''"
@click="onClickType({currentIndex: i})"
>
<view class="type-text">{{val}}</view>
</view>
</view>
<!--
<uni-segmented-control :current="statusCurrent" :values="statusList" :style-type="styleType" <uni-segmented-control :current="statusCurrent" :values="statusList" :style-type="styleType"
:active-color="activeColor" @clickItem="onClickStatus" /> :active-color="activeColor" @clickItem="onClickStatus" />
<uni-segmented-control :current="typeCurrent" :values="typeList" :style-type="styleType" <uni-segmented-control :current="typeCurrent" :values="typeList" :style-type="styleType"
:active-color="activeColor" @clickItem="onClickType" /> :active-color="activeColor" @clickItem="onClickType" />-->
<view class="choiceness-list"> <view class="choiceness-list">
<image v-for="(item,index) in creatorImgList" :key='index' class="img-box" <image v-for="(item,index) in creatorImgList" :key='index' class="img-box"
:style="'width:'+imgWidth+';height:'+imgHeight" :src="item.imgUrl" @click="targetDetail(item)" :style="'width:'+imgWidth+';height:'+imgHeight" :src="item.imgUrl" @click="targetDetail(item)"
mode=""></image> mode=""></image>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view> <view class="ivOver" v-if="flag">-----已经到底啦-----</view>
</view> </view>
</view> </view>
</template> </template>
@ -38,7 +57,17 @@
flag: false flag: false
} }
}, },
onLoad() { onLoad(option) {
if (option?.categoryId && option?.categoryIndex) {
this.statusCurrent = 2;
this.status = 2;
this.typeId = option.categoryId * 1;
this.typeCurrent = option.categoryIndex * 1;
}
if (option?.categoryId && option?.categoryIndex && option?.status) {
this.statusCurrent = option.status * 1;
this.status = option.status * 1;
}
this.listTiktokImgIn(); this.listTiktokImgIn();
}, },
created(){ created(){
@ -73,7 +102,6 @@
}, },
// //
onReachBottom() { onReachBottom() {
console.log(2222)
if (this.creatorImgList.length > this.pageSize*this.pageNum-1) { if (this.creatorImgList.length > this.pageSize*this.pageNum-1) {
this.flag = false; this.flag = false;
this.pageNum += 1 this.pageNum += 1
@ -86,6 +114,7 @@
// //
targetDetail(item) { targetDetail(item) {
//console.log('', item) //console.log('', item)
let that = this;
if (item.id) { if (item.id) {
uni.setStorage({ uni.setStorage({
key: 'detailId', key: 'detailId',
@ -93,7 +122,7 @@
success() { success() {
console.log(111111) console.log(111111)
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/material/imgDetail', url: `/pages/index/material/imgDetail?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`,
success:function(){ success:function(){
console.log('跳转成功!') console.log('跳转成功!')
}, },
@ -111,7 +140,10 @@
that.flag = false; that.flag = false;
that.creatorImgList = []; that.creatorImgList = [];
that.status = e1.currentIndex; that.status = e1.currentIndex;
//console.log('status',that.status) that.statusCurrent = e1.currentIndex;
// that.typeCurrent = 0;
// that.typeId = that.typeIdList[0];
// console.log('status',that.status)
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
mask: true, mask: true,
@ -148,6 +180,7 @@
that.flag = false; that.flag = false;
that.creatorImgList = []; that.creatorImgList = [];
that.typeId = that.typeIdList[e2.currentIndex]; that.typeId = that.typeIdList[e2.currentIndex];
that.typeCurrent = e2.currentIndex;
//console.log('typeId',that.typeId) //console.log('typeId',that.typeId)
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
@ -162,11 +195,11 @@
status: that.status status: that.status
}; };
listTiktokImgIn(param).then(res => { listTiktokImgIn(param).then(res => {
console.log('that.typeId',that.typeId); // console.log('that.typeId',that.typeId);
console.log('that.status',that.status); // console.log('that.status',that.status);
if(res.data.code === 200){ if(res.data.code === 200){
that.creatorImgList.push(...res.data.rows) that.creatorImgList.push(...res.data.rows)
console.log(that.creatorImgList) // console.log(that.creatorImgList)
//console.log('2!', that.creatorImgList); //console.log('2!', that.creatorImgList);
if(that.typeId === 1){ if(that.typeId === 1){
that.imgWidth = 750/3-20 + 'rpx' that.imgWidth = 750/3-20 + 'rpx'
@ -208,7 +241,7 @@
if (res.data.code === 200) { if (res.data.code === 200) {
for (let s of res.data.data) { for (let s of res.data.data) {
this.typeList.push(s.typeName); this.typeList.push(s.typeName);
this.typeIdList.push(s.id); this.typeIdList.push(s.id);
} }
//console.log('typeList', this.typeList) //console.log('typeList', this.typeList)
console.log('typeIdList', this.typeIdList) console.log('typeIdList', this.typeIdList)
@ -246,8 +279,68 @@
<style lang="scss"> <style lang="scss">
.choiceness { .choiceness {
width: 750rpx;
padding-top: 20rpx; padding-top: 20rpx;
//width: 750rpx; background: #141b29;
min-height: 100vh;
.status-choice-comp {
background: #1d2734;
display: flex;
justify-content: space-between;
padding: 0 40rpx;
.status-item {
font-size: 28rpx;
line-height: 68rpx;
height: 68rpx;
padding: 0 20rpx;
border-radius: 10rpx;
.status-text {
}
}
.status-active {
background: #0a6375;
color: #FFFFFF !important;
}
}
.type-choice-comp {
display: flex;
justify-content: flex-start;
flex-wrap: nowrap;
overflow: scroll;
padding-left: 40rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
.type-item {
font-size: 24rpx;
line-height: 40rpx;
height: 40rpx;
padding: 0 20rpx;
border-radius: 20rpx;
flex-shrink: 0;
.type-text {
}
}
.type-active {
background: #0a6375;
color: #FFFFFF !important;
}
}
.choiceness-list { .choiceness-list {
display: flex; display: flex;

212
pages/index/upload/upload.vue

@ -1,30 +1,37 @@
<template> <template>
<view> <view class="page-content">
<uni-section title="选择图片分类上传" type="circle" padding> <uni-section title="选择图片分类上传" type="circle">
<view class="segmented-control"> </uni-section>
<uni-segmented-control :current="typeCurrent" :values="typeList" :styleType="styleType" <view class="section-content">
:active-color="activeColor" @clickItem="onClickType" /> <view class="type-choice-comp">
</view> <view class="type-item uni-secondary-color" v-for="(val, i) in typeList"
<uni-group mode="card"> :index="i" :key="i"
<view class="example-body"> :class="typeCurrent === i ? 'type-active' : ''"
<uni-file-picker limit="9" title="最多选择9张图片" @click="onClickType({currentIndex: i})"
file-extname="png,jpg,gif,jpeg" mode="grid" >
file-mediatype="image" @success="successHandler" <view class="type-text">{{val}}</view>
@fail="failHandler" @delete="deleteHandler" autoUpload="false" </view>
@select="selectHandler" :disabled="checkUpload"></uni-file-picker> </view>
</view> <uni-file-picker limit="9" title="最多选择9张图片"
</uni-group> :file-extname="fileExtname" mode="grid"
<view class="uploadNum">今日还可上传次数<span class="uploadText">{{getUploadNum}}</span>,已上传次数<span class="uploadText">{{uploadedNum}}</span></view> file-mediatype="image"
</uni-section> @success="successHandler"
<uni-section title="选择图片标签" subTitle="最多选择3个" type="circle" padding> @fail="failHandler"
<uni-group mode="card"> @delete="deleteHandler"
<view class="segmented-control"> autoUpload="false"
<view>标签列表</view> @select="selectHandler"
<uni-data-checkbox mode="tag" multiple v-model="signListSelected" :localdata="signList" @change="selectedSign" max="3"></uni-data-checkbox> :disabled="checkUpload">
</view> </uni-file-picker>
</uni-group> <view class="uploadNum">今日还可上传次数<span class="uploadText"> {{ getUploadNum }} </span>已上传次数<span class="uploadText"> {{ uploadedNum }} </span></view>
</uni-section> </view>
<button class="upLoadBtn" size="default" :loading="loadingFlag" @click="$noMultipleClicks(saveImg)" :disabled="checkUpload">点击上传</button> <uni-section title="选择图片标签" subTitle="最多选择3个" type="circle">
</uni-section>
<view class="section-content">
<view class="segmented-control">
<uni-data-checkbox mode="tag" multiple v-model="signListSelected" :localdata="signList" @change="selectedSign" max="3"></uni-data-checkbox>
</view>
</view>
<button class="upLoadBtn" size="default" :loading="loadingFlag" @click="$noMultipleClicks(saveImg)" :disabled="checkUpload">点击上传</button>
</view> </view>
</template> </template>
@ -42,6 +49,7 @@
activeColor: '#007aff', activeColor: '#007aff',
typeCurrent: 0, typeCurrent: 0,
typeId: 1, typeId: 1,
fileExtname: "png,jpg,jpeg",
signList:[], signList:[],
signObject:{}, signObject:{},
typeList:[], typeList:[],
@ -83,7 +91,7 @@
}, },
// //
checkUpload(){ checkUpload(){
return this.uploadedNum >= 50? true:false; return this.uploadedNum >= 50;
} }
}, },
@ -96,7 +104,7 @@
if (res.data.code === 200) { if (res.data.code === 200) {
for (let s of res.data.data) { for (let s of res.data.data) {
let signObject = {} let signObject = {}
signObject.text = s.name signObject.text = "#" +s.name
signObject.value = s.id signObject.value = s.id
that.signList.push(signObject) that.signList.push(signObject)
} }
@ -149,6 +157,7 @@
onClickType(e2){ onClickType(e2){
let that = this; let that = this;
that.flag = false; that.flag = false;
that.typeCurrent = e2.currentIndex;
that.typeId = that.typeIdList[e2.currentIndex]; that.typeId = that.typeIdList[e2.currentIndex];
//console.log('typeId',that.typeId) //console.log('typeId',that.typeId)
uni.showLoading({ uni.showLoading({
@ -300,26 +309,137 @@
} }
} }
}, },
watch: {
typeId(newValue) {
if (newValue === 2) { //gif
this.fileExtname = ".gif";
} else {
this.fileExtname = "png,jpg,jpeg";
}
}
}
} }
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.upLoadBtn{ .page-content {
width: 750rpx; min-height: 100vh;
height: 60rpx; background: $uni-bg-color;
background-color: royalblue; width: 750rpx;
color: #ffffff;
font-size: 30rpx; ::v-deep .uni-section {
line-height: 62rpx; background: none !important;
border-radius: 17rpx; margin-top: 0 !important;
margin-top:100rpx; color: $uni-white;
} }
.uploadNum{
font-size: 25rpx; ::v-deep .uni-section__content-title {
color: $uni-white !important;
font-size: 28rpx !important;
}
.section-content {
width: 654rpx;
margin: 0 auto;
}
.type-choice-comp {
display: flex;
justify-content: flex-start;
flex-wrap: nowrap;
overflow: scroll;
padding-top: 20rpx;
padding-bottom: 20rpx;
.type-item {
font-size: 24rpx;
line-height: 40rpx;
height: 40rpx;
padding: 0 20rpx;
border-radius: 20rpx;
flex-shrink: 0;
.type-text {
}
}
.type-active {
background: $uni-primary;
color: $uni-white !important;
}
}
::v-deep .file-title {
color: $uni-white !important;
font-size: 24rpx !important;
}
::v-deep .file-count {
color: $uni-white !important;
font-size: 24rpx !important;
}
::v-deep .file-picker__box-content {
border-color: $uni-secondary-color !important;
}
::v-deep .icon-add {
background-color: $uni-secondary-color !important;
}
.uploadNum{
color: $uni-white;
font-size: 24rpx;
margin-top: 20rpx;
margin-bottom: 20rpx;
.uploadText{
color: $uni-primary;
font-weight: 600;
}
}
.segmented-control {
::v-deep .checklist-box {
border: none !important;
background: none !important;
margin-right: 0 !important;
}
::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;
}
::v-deep .is-disable .checklist-text {
color: $uni-base-color !important;
font-size: 24rpx !important;
}
}
.upLoadBtn{
width: 654rpx;
height: 100rpx;
line-height: 100rpx;
background: linear-gradient(180.00deg, $uni-primary 0%, $uni-primary 100%);
margin: 60rpx auto;
color: $uni-white;
border-radius: 20rpx;
font-size: 28rpx;
}
}
.uploadText{
color:red;
}
}
</style> </style>

89
pages/login/login.vue

@ -108,60 +108,51 @@
}, },
methods: { methods: {
login(e) { login(e) {
console.log(e) // console.log(e)
let that = this let that = this
console.log('that.phoneFlag', that.phoneFlag) // console.log('that.phoneFlag', that.phoneFlag)
console.log('that.passwordFlag', that.passwordFlag) // console.log('that.passwordFlag', that.passwordFlag)
if (that.phoneFlag === true && that.passwordFlag === true) { if (that.phoneFlag === true && that.passwordFlag === true) {
console.log('全部达成') // console.log('')
uni.showLoading({ uni.showLoading({
title: '艺术家登录中!', title: '艺术家登录中!',
duration: 3000,
success() {
let pwd = md5(that.formData.password)
const param = {
phone: that.formData.phone,
password: pwd
}
console.log('form', param)
login(param).then(response => {
if (response.data.code === 200) {
console.log('response',response)
//token
uni.setStorage({
key: 'userInfo',
data: response.data.data.userInfo
});
uni.setStorage({
key: 'token',
data: response.data.data.access_token
})
uni.switchTab({
url: '../index/index',
success() {
uni.showToast({
title: '艺术家登录成功!',
icon: 'success',
duration: 1500
})
}
});
} else {
uni.showToast({
title: response.data.msg,
icon: 'none'
})
}
})
},
fail: () => {
uni.hideLoading();
uni.showToast("登录失败")
},
complete: function() {
uni.hideLoading();
}
}) })
let pwd = md5(that.formData.password)
const param = {
phone: that.formData.phone,
password: pwd
}
// console.log('form', param)
login(param).then(response => {
if (response.data.code === 200) {
// console.log('response',response)
//token
uni.setStorage({
key: 'userInfo',
data: response.data.data.userInfo
});
uni.setStorage({
key: 'token',
data: response.data.data.access_token
})
uni.hideLoading();
uni.switchTab({
url: '../index/index',
success() {
uni.showToast({
title: '艺术家登录成功!',
icon: 'success',
duration: 1500
})
}
});
} else {
uni.showToast({
title: response.data.msg,
icon: 'none'
})
}
})
} else { } else {
console.log('尚未全部达成') console.log('尚未全部达成')
} }

6
pages/profit/profit.vue

@ -438,7 +438,7 @@ export default {
.income-categories{ .income-categories{
.yesterday-income-title { .yesterday-income-title {
height: 32rpx; height: 28rpx;
font-size: 32rpx; font-size: 32rpx;
line-height: 32rpx; line-height: 32rpx;
background: #0a6375; background: #0a6375;
@ -495,7 +495,7 @@ export default {
.segmented-con { .segmented-con {
width: 100%; width: 100%;
height: 72rpx; height: 72rpx;
font-size: 32rpx; font-size: 28rpx;
line-height: 72rpx; line-height: 72rpx;
text-align: center; text-align: center;
background: #1d2734; background: #1d2734;
@ -527,7 +527,7 @@ export default {
} }
.adver-top-text { .adver-top-text {
font-size: 32rpx; font-size: 28rpx;
} }
} }

56
pages/profit/profitEndDetails.vue

@ -1,13 +1,13 @@
<template> <template>
<view> <view>
<view class="uni-padding-wrap uni-common-mt"> <view class="status-choice-comp">
<uni-segmented-control <view class="status-item uni-secondary-color" v-for="(val, i) in items"
:current="typeId" :index="i" :key="i"
:values="items" :class="typeId === i ? 'status-active' : ''"
:style-type="styleType" @click="onClickItem({currentIndex: i})"
:active-color="activeColor" >
@clickItem="onClickItem" <view class="status-text">{{val}}</view>
/> </view>
</view> </view>
<view class="content"> <view class="content">
<view v-if="typeId === 0"> <view v-if="typeId === 0">
@ -275,6 +275,46 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
page {
height: 100vh;
background-color: $uni-bg-color;
}
</style>
<style lang="scss" scoped>
.status-choice-comp {
width: 450rpx;
position: absolute;
top: 0;
background: #1d2734;
display: flex;
justify-content: space-between;
padding: 0 150rpx;
.status-item {
font-size: 28rpx;
line-height: 68rpx;
height: 68rpx;
padding: 0 20rpx;
border-radius: 10rpx;
.status-text {
}
}
.status-active {
background: #0a6375;
color: #FFFFFF !important;
}
}
.content {
padding-top: 88rpx;
}
.uni-list-item__icon-img { .uni-list-item__icon-img {
border-radius: 8px; border-radius: 8px;
} }

57
pages/profit/profitInDetails.vue

@ -1,13 +1,13 @@
<template> <template>
<view> <view>
<view class="uni-padding-wrap uni-common-mt"> <view class="status-choice-comp">
<uni-segmented-control <view class="status-item uni-secondary-color" v-for="(val, i) in items"
:current="typeId" :index="i" :key="i"
:values="items" :class="typeId === i ? 'status-active' : ''"
:style-type="styleType" @click="onClickItem({currentIndex: i})"
:active-color="activeColor" >
@clickItem="onClickItem" <view class="status-text">{{val}}</view>
/> </view>
</view> </view>
<view class="content"> <view class="content">
<view v-if="typeId === 0"> <view v-if="typeId === 0">
@ -274,6 +274,47 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
page {
height: 100vh;
background-color: $uni-bg-color;
}
</style>
<style lang="scss" scoped>
.status-choice-comp {
width: 450rpx;
position: absolute;
top: 0;
background: #1d2734;
display: flex;
justify-content: space-between;
padding: 0 150rpx;
.status-item {
font-size: 28rpx;
line-height: 68rpx;
height: 68rpx;
padding: 0 20rpx;
border-radius: 10rpx;
.status-text {
}
}
.status-active {
background: #0a6375;
color: #FFFFFF !important;
}
}
.content {
padding-top: 88rpx;
}
.uni-list-item__icon-img { .uni-list-item__icon-img {
border-radius: 8px; border-radius: 8px;
} }

58
pages/profit/profitPreDetails.vue

@ -1,13 +1,13 @@
<template> <template>
<view> <view>
<view class="uni-padding-wrap uni-common-mt"> <view class="status-choice-comp">
<uni-segmented-control <view class="status-item uni-secondary-color" v-for="(val, i) in items"
:current="typeId" :index="i" :key="i"
:values="items" :class="typeId === i ? 'status-active' : ''"
:style-type="styleType" @click="onClickItem({currentIndex: i})"
:active-color="activeColor" >
@clickItem="onClickItem" <view class="status-text">{{val}}</view>
/> </view>
</view> </view>
<view class="content"> <view class="content">
<view v-if="typeId === 0"> <view v-if="typeId === 0">
@ -259,6 +259,48 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
page {
height: 100vh;
background-color: $uni-bg-color;
}
</style>
<style lang="scss" scoped>
.status-choice-comp {
width: 450rpx;
position: absolute;
top: 0;
background: #1d2734;
display: flex;
justify-content: space-between;
padding: 0 150rpx;
.status-item {
font-size: 28rpx;
line-height: 68rpx;
height: 68rpx;
padding: 0 20rpx;
border-radius: 10rpx;
.status-text {
}
}
.status-active {
background: #0a6375;
color: #FFFFFF !important;
}
}
.content {
padding-top: 88rpx;
}
.uni-list-item__icon-img { .uni-list-item__icon-img {
border-radius: 8px; border-radius: 8px;
} }

7
pages/userInfo/userInfo.vue

@ -145,6 +145,11 @@
} }
</script> </script>
<style lang="scss">
page {
background-color: $uni-bg-color;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
.container { .container {
font-family: Franklin Gothic Medium, Arial Narrow, Arial, sans-serif; font-family: Franklin Gothic Medium, Arial Narrow, Arial, sans-serif;
@ -220,7 +225,7 @@
.username { .username {
font-size: 32rpx; font-size: 32rpx;
line-height: 48rpx; line-height: 60rpx;
font-weight: 600; font-weight: 600;
} }

58
uni.scss

@ -1 +1,59 @@
@import '@/uni_modules/uni-scss/variables.scss'; @import '@/uni_modules/uni-scss/variables.scss';
//主色
$uni-primary: #0b6375;
$uni-primary-disable:mix(#fff,$uni-primary,50%);
$uni-primary-light: mix(#fff,$uni-primary,80%);
// 辅助色
// 除了主色外的场景色需要在不同的场景中使用例如危险色表示危险的操作
$uni-success: #18bc37;
$uni-success-disable:mix(#fff,$uni-success,50%);
$uni-success-light: mix(#fff,$uni-success,80%);
$uni-warning: #f3a73f;
$uni-warning-disable:mix(#fff,$uni-warning,50%);
$uni-warning-light: mix(#fff,$uni-warning,80%);
$uni-error: #e43d33;
$uni-error-disable:mix(#fff,$uni-error,50%);
$uni-error-light: mix(#fff,$uni-error,80%);
$uni-info: #8f939c;
$uni-info-disable:mix(#fff,$uni-info,50%);
$uni-info-light: mix(#fff,$uni-info,80%);
// 中性色
// 中性色用于文本背景和边框颜色通过运用不同的中性色来表现层次结构
$uni-main-color: #3a3a3a; // 主要文字
$uni-base-color: #6a6a6a; // 常规文字
$uni-secondary-color: #909399; // 次要文字
$uni-extra-color: #c7c7c7; // 辅助说明
// 边框颜色
$uni-border-1: #F0F0F0;
$uni-border-2: #EDEDED;
$uni-border-3: #DCDCDC;
$uni-border-4: #B9B9B9;
// 常规色
$uni-black: #000000;
$uni-white: #ffffff;
$uni-transparent: rgba($color: #000000, $alpha: 0);
// 背景色
$uni-bg-color: #141b29;
$uni-bg-base-color: #1d2734;
/* 水平间距 */
$uni-spacing-sm: 8px;
$uni-spacing-base: 15px;
$uni-spacing-lg: 30px;
// 阴影
$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
// 蒙版
$uni-mask: rgba($color: #000000, $alpha: 0.4);

23
utils/request.js

@ -34,12 +34,23 @@ service.interceptors.request.use(
//配置成功后的拦截器 //配置成功后的拦截器
service.interceptors.response.use(res => { service.interceptors.response.use(res => {
return res // return res
// if (res.data.status == 200) { if (res.data.code === 200) {
// return res return res
// } else { } else if (res.data.code === 401) {
// return Promise.reject(res.data.msg); uni.showModal({
// } content: '登录过期,请重新登录!',
showCancel: false,
success() {
//没有缓存则跳转登录页面
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
return Promise.reject(res.data.msg);
}
}, error => { }, error => {
return Promise.reject(error) return Promise.reject(error)
}) })

Loading…
Cancel
Save