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. 129
      pages/index/material/imgDetail.vue
  6. 129
      pages/index/material/material.vue
  7. 214
      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'
// const baseURL = 'http://localhost:7010'
const baseURL = 'http://localhost:7010'
//const baseURL = 'http://81.69.47.31:7010'
// const baseURL = 'http://bnyer.vaiwan.com'
const baseURL = 'http://fu7avs.natappfree.cc'
// const baseURL = 'http://x9uf7k.natappfree.cc'
Vue.prototype.$baseURL = baseURL;

63
pages-userInfo/about/about.vue

@ -102,10 +102,61 @@
}
</script>
<style lang="less">
.head{
text-align: center;
color: blue;
font-size:36rpx;
}
<style lang="scss" scoped>
.container {
width: 750rpx;
min-height: 100vh;
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>

79
pages-userInfo/notice/notice.vue

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

49
pages/index/index.vue

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

129
pages/index/material/imgDetail.vue

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

129
pages/index/material/material.vue

@ -1,15 +1,34 @@
<template>
<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"
:active-color="activeColor" @clickItem="onClickStatus" />
<uni-segmented-control :current="typeCurrent" :values="typeList" :style-type="styleType"
:active-color="activeColor" @clickItem="onClickType" />
<view class="choiceness-list">
<image v-for="(item,index) in creatorImgList" :key='index' class="img-box"
:style="'width:'+imgWidth+';height:'+imgHeight" :src="item.imgUrl" @click="targetDetail(item)"
mode=""></image>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view>
</view>
<uni-segmented-control :current="typeCurrent" :values="typeList" :style-type="styleType"
:active-color="activeColor" @clickItem="onClickType" />-->
<view class="choiceness-list">
<image v-for="(item,index) in creatorImgList" :key='index' class="img-box"
:style="'width:'+imgWidth+';height:'+imgHeight" :src="item.imgUrl" @click="targetDetail(item)"
mode=""></image>
<view class="ivOver" v-if="flag">-----已经到底啦-----</view>
</view>
</view>
</template>
@ -38,7 +57,17 @@
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();
},
created(){
@ -73,7 +102,6 @@
},
//
onReachBottom() {
console.log(2222)
if (this.creatorImgList.length > this.pageSize*this.pageNum-1) {
this.flag = false;
this.pageNum += 1
@ -86,6 +114,7 @@
//
targetDetail(item) {
//console.log('', item)
let that = this;
if (item.id) {
uni.setStorage({
key: 'detailId',
@ -93,7 +122,7 @@
success() {
console.log(111111)
uni.navigateTo({
url: '/pages/index/material/imgDetail',
url: `/pages/index/material/imgDetail?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`,
success:function(){
console.log('跳转成功!')
},
@ -111,7 +140,10 @@
that.flag = false;
that.creatorImgList = [];
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({
title: "加载中",
mask: true,
@ -148,6 +180,7 @@
that.flag = false;
that.creatorImgList = [];
that.typeId = that.typeIdList[e2.currentIndex];
that.typeCurrent = e2.currentIndex;
//console.log('typeId',that.typeId)
uni.showLoading({
title: "加载中",
@ -162,11 +195,11 @@
status: that.status
};
listTiktokImgIn(param).then(res => {
console.log('that.typeId',that.typeId);
console.log('that.status',that.status);
// console.log('that.typeId',that.typeId);
// console.log('that.status',that.status);
if(res.data.code === 200){
that.creatorImgList.push(...res.data.rows)
console.log(that.creatorImgList)
// console.log(that.creatorImgList)
//console.log('2!', that.creatorImgList);
if(that.typeId === 1){
that.imgWidth = 750/3-20 + 'rpx'
@ -208,7 +241,7 @@
if (res.data.code === 200) {
for (let s of res.data.data) {
this.typeList.push(s.typeName);
this.typeIdList.push(s.id);
this.typeIdList.push(s.id);
}
//console.log('typeList', this.typeList)
console.log('typeIdList', this.typeIdList)
@ -246,9 +279,69 @@
<style lang="scss">
.choiceness {
width: 750rpx;
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 {
display: flex;
flex-wrap: wrap;

214
pages/index/upload/upload.vue

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

89
pages/login/login.vue

@ -108,60 +108,51 @@
},
methods: {
login(e) {
console.log(e)
// console.log(e)
let that = this
console.log('that.phoneFlag', that.phoneFlag)
console.log('that.passwordFlag', that.passwordFlag)
// console.log('that.phoneFlag', that.phoneFlag)
// console.log('that.passwordFlag', that.passwordFlag)
if (that.phoneFlag === true && that.passwordFlag === true) {
console.log('全部达成')
// console.log('')
uni.showLoading({
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 {
console.log('尚未全部达成')
}

6
pages/profit/profit.vue

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

56
pages/profit/profitEndDetails.vue

@ -1,13 +1,13 @@
<template>
<view>
<view class="uni-padding-wrap uni-common-mt">
<uni-segmented-control
:current="typeId"
:values="items"
:style-type="styleType"
:active-color="activeColor"
@clickItem="onClickItem"
/>
<view class="status-choice-comp">
<view class="status-item uni-secondary-color" v-for="(val, i) in items"
:index="i" :key="i"
:class="typeId === i ? 'status-active' : ''"
@click="onClickItem({currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
</view>
<view class="content">
<view v-if="typeId === 0">
@ -275,6 +275,46 @@ export default {
</script>
<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 {
border-radius: 8px;
}

57
pages/profit/profitInDetails.vue

@ -1,13 +1,13 @@
<template>
<view>
<view class="uni-padding-wrap uni-common-mt">
<uni-segmented-control
:current="typeId"
:values="items"
:style-type="styleType"
:active-color="activeColor"
@clickItem="onClickItem"
/>
<view class="status-choice-comp">
<view class="status-item uni-secondary-color" v-for="(val, i) in items"
:index="i" :key="i"
:class="typeId === i ? 'status-active' : ''"
@click="onClickItem({currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
</view>
<view class="content">
<view v-if="typeId === 0">
@ -274,6 +274,47 @@ export default {
</script>
<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 {
border-radius: 8px;
}

58
pages/profit/profitPreDetails.vue

@ -1,13 +1,13 @@
<template>
<view>
<view class="uni-padding-wrap uni-common-mt">
<uni-segmented-control
:current="typeId"
:values="items"
:style-type="styleType"
:active-color="activeColor"
@clickItem="onClickItem"
/>
<view class="status-choice-comp">
<view class="status-item uni-secondary-color" v-for="(val, i) in items"
:index="i" :key="i"
:class="typeId === i ? 'status-active' : ''"
@click="onClickItem({currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
</view>
<view class="content">
<view v-if="typeId === 0">
@ -259,6 +259,48 @@ export default {
</script>
<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 {
border-radius: 8px;
}

7
pages/userInfo/userInfo.vue

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

58
uni.scss

@ -1 +1,59 @@
@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 => {
return res
// if (res.data.status == 200) {
// return res
// } else {
// return Promise.reject(res.data.msg);
// }
// return res
if (res.data.code === 200) {
return res
} else if (res.data.code === 401) {
uni.showModal({
content: '登录过期,请重新登录!',
showCancel: false,
success() {
//没有缓存则跳转登录页面
uni.reLaunch({
url: '/pages/login/login'
});
}
});
} else {
return Promise.reject(res.data.msg);
}
}, error => {
return Promise.reject(error)
})

Loading…
Cancel
Save