This commit is contained in:
lnn19986213 2022-05-18 10:16:59 +08:00
parent 14641cb79f
commit b5d16d8d7f
41 changed files with 8470 additions and 1237 deletions

View File

@ -53,9 +53,9 @@
});
return
} else if (val == '3') {
uni.reLaunch({
uni.navigateTo({
url: '/pages/PublishWorks/PublishWorks'
});
})
return
} else if (val == '4') {
uni.reLaunch({

View File

@ -77,8 +77,9 @@
"path": "pages/shop/Shop",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
}
@ -134,6 +135,14 @@
"enablePullDownRefresh": false
}
}
, {
"path": "pages/pageHome/pdfView",
"style": {
"navigationBarTitleText": "文件浏览",
"enablePullDownRefresh": false
}
}
//
, {
@ -160,7 +169,69 @@
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
{
"path": "pages/my/myCollection",
"style": {
"navigationBarTitleText": "我的收藏",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
},
{
"path": "pages/my/logOut",
"style": {
"navigationBarTitleText": "设置",
"enablePullDownRefresh": false
}
},
//
{
"path": "pages/my/myWorks",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
},
//
{
"path": "pages/my/myWoekList",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
},
//
{
"path": "pages/my/myFollow",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
},
{
"path": "pages/my/myWorkDetail",
"style": {
"navigationBarTitleText": "作品详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/my/editWork",
"style": {
"navigationBarTitleText": "编辑作品",
"enablePullDownRefresh": false
}
},
{
"path": "pages/my/editWorkNext",
"style": {
"navigationBarTitleText": "编辑作品",
"enablePullDownRefresh": false
}
},
//
{
@ -223,7 +294,8 @@
"style" :
{
"navigationBarTitleText": "购物车",
"enablePullDownRefresh": false
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
}
@ -306,8 +378,9 @@
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle":"custom"
"navigationStyle":"custom",
"enablePullDownRefresh": true,
"onReachBottomDistance": 20
}
}

View File

@ -16,6 +16,8 @@
}" itemStyle="height: 50px;">
</u-tabs>
<view class="artworks">
<u-empty v-if="workList.length < 1" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
<view class="art_item" v-for="(v, i) in workList" :key="i">
<view class="art_item_top">
<image :src="v.file" mode="" @click="toDetail(v.id)"></image>
@ -28,20 +30,23 @@
</view>
</view>
</view>
<view class=" art_item_bott" @click="toDetail(v.id)">
<view class="title">
<view class=" art_item_bott">
<view class="title" @click="toDetail(v.id)">
{{ v.name }}
</view>
<view class="sub_title">
{{ v.type }}作品
<view class="tag" v-for="(a,b) in v.workTag" :key="b">
{{a}}
</view>
</view>
<view class="img_box">
<view class=" puber">
<view class=" puber" @click="toUser(v.user.id,v.user.images,v.user.userName)">
<view class="avtor">
<image :src="v.user.images" mode=""></image>
</view>
<view class="autor">
{{ v.user.nickName }}
{{ v.user.userName }}
</view>
</view>
@ -249,6 +254,11 @@
search() {
this.pages = 1
this.getData()
},
toUser(val1,val2,val3){
uni.navigateTo({
url: "/pages/my/myWorks?id=" + val1 + '&userName=' + val3 + '&userImg=' + val2
})
}
}
}
@ -338,6 +348,15 @@
color: #AFADB0;
margin-top: 12px;
margin-bottom: 16px;
.tag{
width: 80rpx;
text-align: center;
border: 1rpx solid #AFADB0;
border-radius: 20px;
float: right;
margin: 0 10rpx;
}
}
.img_box {

View File

@ -96,7 +96,7 @@
id: '',
iswx: 0,
detailData: {},
contractUrl: 'https://www.baidu.com/'
contractUrl: '',
}
},
onLoad(op) {
@ -233,8 +233,14 @@
},
//
downLoad(val) {
console.log(val)
this.contractUrl = val
if(this.iswx == 0){
this.openPDF()
}else if(this.iswx == 1){
uni.navigateTo({
url: "./webView?url=" + this.contractUrl
})
}
},
openPDF() {
switch (uni.getSystemInfoSync().platform) {
@ -247,7 +253,7 @@
console.log("IOS");
//web-view
uni.navigateTo({
url: "./webView/webView?contractUrl=" + this.contractUrl,
url: "./webView?url=" + this.contractUrl,
});
break;
default:

View File

@ -1,17 +1,20 @@
<template>
<view id="web-info">
<web-view :src="src"></web-view>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
src: '',
}
url: '',
};
},
onLoad(params){
console.log(params)
let {url} = params
this.url = `../../../static/pdf/pdf.html?url=${url}`
},
onLoad(option) {
this.src = option.contractUrl
}
}
</script>

View File

@ -1,24 +1,28 @@
<template>
<view>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<view v-for="(item,index) in data" :key="index">
<view class="goods_box bg_col_cirle_margin">
<view class="goods_itm">
<view class="goods_itm_top">
<image style="width: 46rpx; height: 46rpx;" src="../../static/DataSearch/TxtImg.png" mode=""></image>
<text class="goods_itm_top_title">周科</text>
<image style="width: 46rpx; height: 46rpx;" :src="item.userImg" mode=""></image>
<text class="goods_itm_top_title">{{item.userName}}</text>
</view>
<view class="goods_itm_bott">
<image style="width: 148rpx; height: 156rpx;" src="../../static/DataSearch/TxtImg.png" mode="">
<image style="width: 148rpx; height: 156rpx;" :src="item.img" mode="">
</image>
<view class="goods_itm_bott_left">
<text style="font-weight: 600;">绘画作品</text>
<text style="font-weight: 600;">{{item.goodsName}}</text>
<view class="goods_itm_bott_left_count">
<text>x1</text> <text>80积分</text>
<text>x{{item.count}}</text> <text>{{item.money}}积分</text>
</view>
</view>
</view>
</view>
</view>
<view class="price_box bg_col_cirle_margin">
<view class="price_total">
<view class="price_total_left">
@ -26,30 +30,90 @@
</view>
<view class="price_total_right">
<image style="width: 40rpx; height: 40rpx;" src="../../static/jfIcon.png" mode=""></image>
<text style="margin-left: 5px;">80</text>
<text style="margin-left: 5px;">{{item.count * item.money}}</text>
</view>
</view>
</view>
</view>
<view class="bottom_opration">
<view class="txt">
<text>合计</text> <text class="total_prc_color">80积分</text>
<text>合计</text> <text class="total_prc_color">{{total}}积分</text>
</view>
<view class="pay_button">
<view class="pay_button" @click="pay">
立即支付
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
data:[],
total: '',
point: '',
};
},
onLoad(option) {
this.data = JSON.parse(decodeURIComponent(option.data))
},
onShow() {
this.total =''
this.getTotal()
this.getUserInfo()
},
methods:{
getUserInfo(){
let _this = this
this.http.request('/user/userInfo', {}, "GET").then(res => {
if (res.code == 200) {
this.point = res.data.point
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
getTotal(){
let _this = this
this.data.forEach(function(item){
let num = item.count * item.money
_this.total += num
})
},
pay(){
if(this.total > this.point){
uni.navigateTo({
url:'/pages/ConfirmOrder/purchaseDetail?success=1' + '&id=' + this.data[0].id + '&num=' + this.data.length
})
}else{
let data = []
this.data.forEach(function(item){
data.push({
goodsId: item.goodsId,
count: item.count
})
})
this.http.request('/order/newOrder', data, "POST").then(res => {
if (res.code == 200) {
uni.navigateTo({
url:'/pages/ConfirmOrder/purchaseDetail?success=0' + '&id=' + this.data[0].id + '&num=' + this.data.length
})
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
}
}
</script>

View File

@ -8,7 +8,7 @@
购买成功
</view>
</view>
<view class="button" @click="toDetail(1)">
<view class="button" @click="toDetail()">
查看订单
</view>
</view>
@ -21,7 +21,6 @@
购买失败您的积分不足噢
</view>
</view>
<view class="button" @click="returnBack()">
返回
</view>
@ -33,11 +32,20 @@
data() {
return {
success: 1,
id: '',
num: '',
};
},
onLoad(option) {
this.success = option.success
this.id = option.id
this.num = option.num
},
methods: {
toDetail(val){
console.log(val)
toDetail() {
uni.navigateTo({
url: '/pages/ConfirmOrder/purchaseDetail'
})
},
returnBack() {
uni.navigateBack()

View File

@ -1,5 +1,9 @@
<template>
<view>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<!-- 导航栏 -->
<view class="navbar">
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
@ -21,53 +25,57 @@
<text :class="cho == 1?'big':''" @click="toSore()">我卖出的</text>
</view>
<u-tabs :scrollable="false" lineWidth="50rpx" lineColor="#99241B" :list="list1" :activeStyle="{
<u-tabs lineWidth="50rpx" lineColor="#99241B" :list="list1" :activeStyle="{
color: '#251B1D',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#AFADB0 ',
transform: 'scale(1)'
}" itemStyle=" height: 50px;"
@click="clickTab">
}" itemStyle=" height: 50px;" @click="clickTab">
</u-tabs>
</view>
<u-gap :style="{'height':(statusHeight+titleHeight+80)+'px'}" bgColor="#ffffff"></u-gap>
<view v-if="length == 0" style="margin-top: 120px;">
<u-empty mode="order" icon="../../static/orderE.png">
<u-empty v-if="orderList.length == 0" mode="order" icon="../../static/orderE.png" marginTop='60'>
</u-empty>
</view>
<view class="order_box" v-for="(v,i) in 3">
<view class="order_box" v-for="(v,i) in orderList">
<view class="order_itm_box">
<view class="order_itm_top">
<view class="order_itm_top_left">
<image src="../../static/DataSearch/Delet.png" class="order_itm_top_left_image">
<image :src="v.quickPhoto.shopInfo.images" class="order_itm_top_left_image">
</image>
</view>
<view class="order_itm_top_name">
周科
{{v.quickPhoto.shopInfo.userName}}
</view>
<view class="order_itm_top_right" style="color: #FF6600;">买家已付款</view>
<!-- <view class="order_itm_top_right" style="color: #FF6600;">买家已付款</view> -->
</view>
<view class="order_itm_botm">
<image src="../../static/artRace/race2.png" style="width: 148rpx; height: 148rpx;" @click="toDetail(i)"></image>
<image :src="v.quickPhoto.domainInfo.file" style="width: 148rpx; height: 148rpx;" @click="toDetail(v.id)">
</image>
<view class="work_desc">
<view class="tit" @click="toDetail(i)">
乡间小路
<view class="tit" @click="toDetail(v.id)">
{{v.quickPhoto.domainInfo.name}}
</view>
<view class="count" @click="toDetail(i)">
<text style="color:#AFADB0;">x1</text>
<view class="ss">
<text style="color:#AFADB0;">合计</text><text style="font-size: 16px;font-weight: 600;">88</text>
<view class="count" @click="toDetail(v.id)">
<text style="color:#AFADB0;">x{{v.count}}</text>
<view class="ss" v-if="v.totalPrice > 0">
<text style="color:#AFADB0;">合计</text><text
style="font-size: 16px;font-weight: 600;">{{v.totalPrice}}</text>
</view>
<view class="ss" v-else>
<text style="color:#AFADB0;">合计</text><text
style="font-size: 16px;font-weight: 600;">{{v.totalPoint}}积分</text>
</view>
</view>
<view class="opt_box">
<u-button style="width: 100rpx;height: 50rpx;" shape="circle" size="mini" plain type="success" @click="toRefund(i)">退款
<view class="opt_box" v-if="v.state == 4 && cho == 0">
<u-button style="width: 100rpx;height: 50rpx;" shape="circle" size="mini" plain
type="success" @click="toRefund(v.id)">评价
</u-button>
</view>
</view>
@ -75,30 +83,74 @@
</view>
</view>
<u-popup :show="showStar" @close="close" closeOnClickOverlay mode="center" :round="10">
<view style="padding: 100rpx 100rpx 40rpx 100rpx;">
<u-rate count=5 v-model="orStar" size='30'></u-rate>
</view>
<view style="height: 72rpx;width: 60%; margin-left: 20%; margin-bottom: 40rpx;">
<u-button type="error" text="确定" @click="upStar()"></u-button>
</view>
</u-popup>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
showStar: false,
pages: 1,
size: 20,
statusHeight: 0,
titleHeight: 50,
jiWidth: 0,
list1: [{
name: '全部',
}, {
name: '待付款',
name: '已下单',
}, {
name: '待发货'
name: '已退单'
}, {
name: '已完成'
name: '已发货'
}, {
name: '已确认'
}, {
name: '已评价'
}],
searcOrderValue: '',
cho: 0,
length: 1,
orderList: [],
orderId: '',
orStar: 0,
state: 0,
};
},
//
onPullDownRefresh() {
this.pages = 1
if(this.cho == 0){
this.getData()
}else if(this.cho == 1){
this.getSellData()
}
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
if(this.cho == 0){
this.getMoreData()
}else if(this.cho == 1){
this.getMoreSellData()
}
},
onReady() {
const systemMsg = uni.getSystemInfoSync();
this.statusHeight = systemMsg.statusBarHeight
@ -115,44 +167,244 @@
this.topHeight = this.statusHeight + this.titleHeight
// #endif
},
// onShow() {
// this.getMyInfo()
// },
onShow() {
this.pages = 1
this.getData()
},
methods: {
// getMyInfo() {
// this.http.request('/userInfo/userInfo', {}, "POST").then(res => {
// if (res.code == 200) {
// console.log(res)
// }
// }).catch(e => {
// uni.showToast({
// title:e.data.message,
// icon:"none",
// });
// })
// },
toBuy() {
this.cho = 0
},
toSore() {
this.cho = 1
},
toDetail(val) {
uni.navigateTo({
url: "/pages/MyOrder/detail?id=" + val
//
getData() {
let _this = this
if(this.state == 0){
this.state = ''
}
this.http.request('/order/myOrder', {
name: this.searcOrderValue,
state: this.state,
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item) {
let data = JSON.parse(item.quickPhoto)
item.quickPhoto = data
if (item.quickPhoto.domainInfo.file != undefined) {
let fileArr = item.quickPhoto.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
item.quickPhoto.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.quickPhoto.domainInfo.file = '../../static/fileImg/pdfS.png'
}
}
let img = JSON.parse(item.quickPhoto.shopInfo.images)
item.quickPhoto.shopInfo.images = img[0]
})
this.orderList = res.data.records
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//-
getMoreData() {
let _this = this
this.http.request('/order/myOrder', {
name: this.searcOrderValue,
state: this.state,
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item) {
let data = JSON.parse(item.quickPhoto)
item.quickPhoto = data
if (item.quickPhoto.domainInfo.file != undefined) {
let fileArr = item.quickPhoto.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
item.quickPhoto.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.quickPhoto.domainInfo.file = '../../static/fileImg/pdfS.png'
}
}
let img = JSON.parse(item.quickPhoto.shopInfo.images)
item.quickPhoto.shopInfo.images = img[0]
_this.orderList.push(item)
})
if (res.data.records.length == 0) {
this.pages--
}
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getSellData() {
let _this = this
if(this.state == 0){
this.state = ''
}
this.http.request('/order/mySellOrder', {
name: this.searcOrderValue,
state: this.state,
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item) {
let data = JSON.parse(item.quickPhoto)
item.quickPhoto = data
if (item.quickPhoto.domainInfo.file != undefined) {
let fileArr = item.quickPhoto.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
item.quickPhoto.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.quickPhoto.domainInfo.file = '../../static/fileImg/pdfS.png'
}
}
let img = JSON.parse(item.quickPhoto.shopInfo.images)
item.quickPhoto.shopInfo.images = img[0]
})
this.orderList = res.data.records
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//-
getMoreSellData() {
let _this = this
this.http.request('/order/mySellOrder', {
name: this.searcOrderValue,
state: this.state,
page: this.pages,
size: this.size
}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item) {
let data = JSON.parse(item.quickPhoto)
item.quickPhoto = data
if (item.quickPhoto.domainInfo.file != undefined) {
let fileArr = item.quickPhoto.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
item.quickPhoto.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.quickPhoto.domainInfo.file = '../../static/fileImg/pdfS.png'
}
}
let img = JSON.parse(item.quickPhoto.shopInfo.images)
item.quickPhoto.shopInfo.images = img[0]
_this.orderList.push(item)
})
if (res.data.records.length == 0) {
this.pages--
}
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
toBuy() {
this.cho = 0
this.pages = 1
this.orderList = []
this.getData()
},
//
toSore() {
this.cho = 1
this.pages = 1
this.orderList = []
this.getSellData()
},
//
toDetail(val) {
uni.navigateTo({
url: "/pages/MyOrder/fictitiousDetail?id=" + val
})
},
//
toRefund(val) {
console.log(val)
// uni.navigateTo({
// url: "/pages/MyOrder/refund?id=" + val
// })
this.showStar = true
this.orderId = val
this.orStar = 0
},
//
close() {
this.showStar = false
},
//
clickTab(val) {
console.log(val)
this.state = val.index
this.pages = 1
this.orderList = []
if(this.cho == 0){
this.getData()
}else if(this.cho == 1){
this.getSellData()
}
},
//
search() {
console.log(this.searcOrderValue)
this.pages = 1
this.orderList = []
if(this.cho == 0){
this.getData()
}else if(this.cho == 1){
this.getSellData()
}
},
//
back() {
uni.navigateBack()
},
//
upStar(){
this.http.request('/order/pj', {
orderId: this.orderId,
star: this.orStar,
}, "GET").then(res => {
if (res.code == 200) {
this.showStar = false
this.load = true
uni.showToast({
title: '评价成功',
icon: "none",
})
this.pages = 1
this.orderList = []
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
}

View File

@ -1,5 +1,9 @@
<template>
<view>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<view class="goods_box bg_col_cirle_margin">
<view class="goods_itm">
<view class="goods_itm_top">
@ -7,12 +11,12 @@
<text class="goods_itm_top_title">商品详情</text>
</view>
<view class="goods_itm_bott">
<image style="width: 148rpx; height: 156rpx;" src="../../static/DataSearch/TxtImg.png" mode="">
<image style="width: 148rpx; height: 156rpx;" :src="det.quickPhoto.domainInfo.file" mode="">
</image>
<view class="goods_itm_bott_left">
<text style="font-weight: 600;">绘画作品</text>
<text style="font-weight: 600;">{{det.quickPhoto.domainInfo.name}}</text>
<view class="goods_itm_bott_left_count">
<text>x1</text> <text>80</text>
<text>x{{det.count}}</text> <text>{{det.totalPoint}}</text>
</view>
</view>
</view>
@ -35,24 +39,53 @@
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
id: '',
item:{
url:'https://www.cnblogs.com/phpyangbo/p/14656524.html',
pass:'1565',
}
item:{},
det: {},
};
},
onLoad(o) {
this.id = o.id
console.log(this.id)
},
onShow() {
this.getData()
},
methods: {
getData() {
let _this = this
this.http.request('/order/' + this.id, {}, "GET").then(res => {
if (res.code == 200) {
let data = JSON.parse(res.data.quickPhoto)
res.data.quickPhoto = data
console.log(res.data)
let fileArr = res.data.quickPhoto.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
res.data.quickPhoto.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
res.data.quickPhoto.domainInfo.file = '../../static/fileImg/pdfS.png'
}
this.item.url = res.data.quickPhoto.panUrl
this.item.pass = res.data.quickPhoto.panCode
this.det = res.data
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
toRefund() {
console.log('退款')
// uni.navigateTo({

View File

@ -1,7 +1,5 @@
<template>
<view>
<!-- 导航栏 -->
<view class="navbar" >
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
@ -16,7 +14,6 @@
</view>
</view>
<!--导航栏ed -->
<!-- 顶部背景区 -->
<view class="point_top">
<image style="width: 100%; height: 100%;" src="../../static/Mypoints/PointsBg.png" mode=""></image>
@ -39,21 +36,14 @@
6853
</view>
</view>
</view>
</view>
<view class="mult">
<!-- 限时任务区 -->
<view class="pointBox">
<view class="P_title">
<text class="L_title">限时任务</text>
</view>
<view class="piont_itm">
<view class="piont_itm_L">
<image style="width: 64rpx; height: 64rpx; " src="../../static/Mypoints/cloud.png" mode="">
@ -71,12 +61,7 @@
<u-button type="default" plain size="small" color="#99241B"> 去完成</u-button>
</view>
</view>
</view>
<!-- 积分任务区 -->
<view class="pointBox">
<view class="P_title">
@ -86,8 +71,6 @@
<image class="R_arr" src="../../static/Mypoints/rightArrow.png" mode=""></image>
</view>
</view>
<view class="piont_itm" v-for="(v,i) in 5" :key="i">
<view class="piont_itm_L">
<image style="width: 64rpx; height: 64rpx; " src="../../static/Mypoints/cloud.png" mode="">
@ -107,11 +90,7 @@
<u-button v-if="i==3||i==4" type="default" plain size="small" color="#99241B "> 去完成</u-button>
</view>
</view>
</view>
<!-- 积分明细区 -->
<view class="pointBox" @click="goPointDetail">
@ -122,13 +101,8 @@
<image class="R_arr" src="../../static/Mypoints/rightArrow.png" mode=""></image>
</view>
</view>
</view>
</view>
</view>
</template>

View File

@ -1,5 +1,9 @@
<template>
<view>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<u-gap height="5" bgColor="#F8F8F8"></u-gap>
<view class="top_line">
<view class="top_line_left">
@ -12,27 +16,30 @@
<view class="point_box">
<u-gap height="15" bgColor="#fff"></u-gap>
<view class="point_tab">
<view :class="tab == 0? 'tabed':'tabs'">
<view :class="tab == 0? 'tabed':'tabs'" @click="clickTab(0)">
全部
</view>
<view :class="tab == 1? 'tabed':'tabs'">
<view :class="tab == 1? 'tabed':'tabs'" @click="clickTab(1)">
已获取
</view>
<view :class="tab == 2? 'tabed':'tabs'">
<view :class="tab == 2? 'tabed':'tabs'" @click="clickTab(2)">
已使用
</view>
</view>
<u-empty v-if="pointList.length < 1" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
<view class="point_line" v-for="(item,index) in pointList" :key="index">
<view class="point_line_partA">
<view class="point_line_partA_left">
{{item.title}}
{{item.text}}
</view>
<view :class="item.num > 0? 'point_line_partA_rightA':'point_line_partA_rightB'">
{{item.num}}积分
<view :class="item.point > 0? 'point_line_partA_rightA':'point_line_partA_rightB'">
{{item.point}}积分
</view>
</view>
<view class="point_line_partB">
{{item.time}}
{{item.createdAt}}
</view>
</view>
</view>
</view>
@ -44,6 +51,8 @@
data() {
return {
tab: 0,
load: true,
point: '',
pointList:[{
title:'浏览资讯',
time:'2022.04.10 11:29:22',
@ -67,19 +76,73 @@
},]
}
},
methods:{
clickHeart(){
if(this.isLick == 0){
this.isLick = 1
}else if(this.isLick == 1){
this.isLick = 0
}
onShow(){
this.getUserInfo()
},
clickStar(){
if(this.isCon == 0){
this.isCon = 1
}else if(this.isCon == 1){
this.isCon = 0
methods:{
getUserInfo(){
let _this = this
this.http.request('/user/userInfo', {}, "GET").then(res => {
if (res.code == 200) {
this.point = res.data.point
this.getPoint()
// this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getPoint(){
this.http.request('/pointHistory', {}, "GET").then(res => {
if (res.code == 200) {
this.pointList = res.data
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getaddPoint(){
this.http.request('/pointHistory/addHistory', {}, "GET").then(res => {
if (res.code == 200) {
this.pointList = res.data
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//使
getdivPoint(){
this.http.request('/pointHistory/divHistory', {}, "GET").then(res => {
if (res.code == 200) {
this.pointList = res.data
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
clickTab(val){
this.tab = val
if(val == 0){
this.getPoint()
}else if(val == 1){
this.getaddPoint()
}else if(val == 2){
this.getdivPoint()
}
}
}

View File

@ -1,8 +1,13 @@
<template>
<view>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<view class="page-section">
<view class="page-section-spacing">
<swiper class="swiper" :autoplay="autoplay" :interval="interval" indicator-dots :duration="duration">
<swiper class="swiper" :autoplay="autoplay" :interval="interval" indicator-dots
:duration="duration">
<swiper-item v-for="(v,i) in img" :key="i">
<view class="swiper_box">
<image class="swiper_img" :src='img[i]' mode="aspectFill"></image>
@ -11,116 +16,114 @@
</swiper>
</view>
<view class="return" @click="back()">
<image src="../../static/orderLeftArrow.png" mode="scaleToFill"></image>
</view>
</view>
<!-- 定位卡片 -->
<view class="positon_box">
<!-- 顶部卡片 -->
<view class="topcard">
<view class="free_box">
<view style="font-weight: bold;font-size: 44rpx;color: #FF6600;">
<!-- {{serveList.type}} -->
25 <text style="font-size: 24rpx;">积分</text>
<view style="font-weight: bold;font-size: 44rpx;color: #FF6600;"
v-if="serveList.moneyPrice > 0">
{{serveList.moneyPrice}} <text style="font-size: 24rpx;"></text>
</view>
<view style="font-weight: bold;font-size: 44rpx;color: #FF6600;"
v-else>
{{serveList.pointPrice}} <text style="font-size: 24rpx;">积分</text>
</view>
<view class="" style="display: flex; align-items: center; justify-content: center;">
<!-- <image src="../../static/DunIcon.png" style="width: 32rpx;height: 32rpx;" mode=""></image> -->
<view class="sale_count" style="color: gray; font-size: 12px;">
月销量48
</view>
<text style="font-weight: 400; font-size: 24rpx;color: #AFADB0;">
{{serveList.score}}
</text>
月销量{{serveList.sellCount}}
</view>
</view>
</view>
<view class="guandao">
{{serveList.title}}
{{goodInfo.name}}
</view>
<view style="font-size: 24rpx; margin-bottom: 16rpx;">
<text style="color: #AFADB0;">作者</text>
<text>{{serveList.publisher}} 周科</text>
<text>{{userInfo.userName}}</text>
</view>
<view style="font-size: 24rpx;">
<text style="color: #AFADB0;">上传时间</text>
<text>{{serveList.createdAt}} 2021-02-24 </text>
<text>{{goodInfo.createdAt}}</text>
</view>
</view>
<!-- 服务卡片 -->
<view class=" serve_card">
<view class="serve_ind">
作品详情
</view>
<view class="serve_dec">
{{serveList.content}}
象山全域旅游摄影图片征集活动获奖照片全面展示象山岁月 沧桑和现代时尚之美
{{goodInfo.introduce}}
</view>
</view>
<view class="pijia serve_card">
<view class="pinjia_t " style="display: flex; justify-content: space-between; align-items: center;">
<text style="font-weight: 700; font-size: 32rpx;">宝贝评价10</text>
<text style="font-weight: 700; font-size: 32rpx;">宝贝评价{{scoresLen}}</text>
<text style="color: #99241B;" @click="goAllPingjia">查看全部 ></text>
</view>
<view class="pinContent">
<view class="pinContent_itm"
style="display: flex; align-items: center; justify-content: space-between;" v-for='(v,i) in 3'
:key="i">
style="display: flex; align-items: center; justify-content: space-between;"
v-for='(v,i) in scores' :key="i">
<view class="pinContent_avator" style="display: flex; align-items: center;">
<image style="width: 36rpx; height: 36rpx;margin-right:16rpx ; padding: 24rpx 0rpx;"
src="../../static/RewardWork/avator.png" mode=""></image>
<text>李已</text>
:src="v.avatar" mode=""></image>
<text>{{v.userName}}</text>
</view>
<view class="pinContent_rate">
<u-rate count=5 v-model="rate1" :readonly="true"></u-rate>
<u-rate count=5 v-model="v.star" :readonly="true"></u-rate>
</view>
</view>
</view>
</view>
</view>
<!-- 立即购买弹框 -->
<u-popup :show="showBuy" @close="close" @open="open" closeOnClickOverlay :round="5" customStyle="padding: 16px;"
<u-popup :show="showBuy" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;"
class="propBuy">
<view class="Order_img" style="display: flex;">
<image style="width: 148rpx; height: 156rpx; border-radius:16rpx ;" src="../../static/help/helpBg.png"
mode=""></image>
<image style="width: 148rpx; height: 156rpx; border-radius:16rpx ;" :src="img[0]" mode=""></image>
<view class="wen_right"
style="display: flex; flex-direction: column; justify-content: space-between; margin-left: 24rpx;">
<view class="oreder_title" style="font-weight: 700; font-size: 32rpx;">
镜头里的醉美象山
{{goodInfo.name}}
</view>
<view style="font-weight: bold;font-size: 44rpx;color: #FF6600;">
<!-- {{serveList.type}} -->
25 <text style="font-size: 24rpx;">积分</text>
<view style="font-weight: bold;font-size: 44rpx;color: #FF6600;"
v-if="serveList.moneyPrice > 0">
{{serveList.moneyPrice}} <text style="font-size: 24rpx;"></text>
</view>
<view style="font-weight: bold;font-size: 44rpx;color: #FF6600;"
v-else>
{{serveList.pointPrice}} <text style="font-size: 24rpx;">积分</text>
</view>
</view>
</view>
<view class="order_itm">
<text class="order_itm_t">购买数量</text> <text>X1</text>
<text class="order_itm_t">购买数量</text>
<u-number-box v-model="count" buttonSize="20" integer>
<view slot="minus" class="minus" @click="minusNum(count,serveList.id)">
<u-icon name="minus" size="12"></u-icon>
</view>
<view class="order_itm" style=" border-top: solid 1rpx #E0E0E0; border-bottom: 1rpx solid #E0E0E0 ; ">
<text class="order_itm_t">商品总价</text> <text>25积分</text>
<view slot="plus" class="plus" @click="plusNum(count,serveList.id)">
<u-icon name="plus" size="12"></u-icon>
</view>
</u-number-box>
</view>
<view class="order_itm" style=" border-top: solid 1rpx #E0E0E0; border-bottom: 1rpx solid #E0E0E0 ; " v-if="serveList.moneyPrice > 0">
<text class="order_itm_t">商品总价</text> <text>{{serveList.moneyPrice * orderDet[0].count}}积分</text>
</view>
<view class="order_itm" style=" border-top: solid 1rpx #E0E0E0; border-bottom: 1rpx solid #E0E0E0 ; " v-else>
<text class="order_itm_t">商品总价</text> <text>{{serveList.pointPrice * orderDet[0].count}}积分</text>
</view>
<view class="order_itm" style="position: relative;">
<text class="order_itm_t">提货方式</text>
<u-radio-group v-model="FetchGoodMethod" placement="row" style="justify-content: flex-end;">
<u-radio name="1" activeColor="#99241B" labelColor="#251B1D" label="线上发货 "></u-radio>
<u-radio style="margin-left: 24rpx;" name="2" activeColor="#99241B" labelColor="#AFADB0"
label="线下自取"></u-radio>
<!-- <u-radio style="margin-left: 24rpx;" name="2" activeColor="#99241B" labelColor="#AFADB0"
label="线下自取"></u-radio> -->
</u-radio-group>
<view class="zuzhi_click"
style="position: absolute; background-color:transparent; width: 100%; height: 100%;">
@ -130,21 +133,18 @@
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="DoBuy">购买</u-button>
</u-popup>
<!-- 立即弹框ed -->
<view class="operation">
<view class="start_icon" @click="ClickBuy">
<view class="col_icon " style="position: relative;">
<image style="width: 100%; height: 100%;" src='../../static/shop/car.png'></image>
<u-badge style="transform: scale(0.6) translateX(40rpx);" absolute :max="99" :offset="[0,0]"
type="error" :value="carValue"></u-badge>
</view>
</view>
<view class="start_icon" @click="ClickStart">
<view class="col_icon ">
<image style="width: 100%; height: 100%;" :src="StartSrc[0]"></image>
<image src="../../static/lightStart.png" style="width: 100%; height: 100%;"
v-if="serveList.follow"></image>
<image src="../../static/star.png" style="width: 100%; height: 100%;" v-else></image>
</view>
</view>
@ -155,10 +155,9 @@
</view>
<u-toast ref="uToast"></u-toast>
<view class="zhanwei">
</view>
</view>
</view>
</template>
@ -166,75 +165,195 @@
export default {
data() {
return {
load: true,
carValue: 1000,
rate1: 1,
rate1: 3,
showBuy: false,
id: '',
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 500,
serveList: [],
img: ["../../static/orderDetail.png", "../../static/orderDetail.png"],
bookId: '',
collId: '',
FetchGoodMethod: "2",
StartSrc: ['../../static/star.png', "../../static/lightStart.png"]
serveList: {},
goodInfo: {},
userInfo: {},
img: [],
FetchGoodMethod: "1",
count: 1,
allScor:[],
scores: [],
scoresLen: '',
orderDet:[
{
address: "",
count: 1,
goodsId: "",
money: 0,
mType:'',
goodsName: '',
img: '',
userName: '',
userImg: '',
id:'',
}
]
}
},
onLoad(option) {
this.id = option.id
this.orderDet[0].id = option.id
},
onShow() {
this.getData()
},
methods: {
getData() {
let _this = this
this.http.request('/goods/' + this.id, {}, "GET").then(res => {
if (res.code == 200) {
let fileArr = res.data.domainInfo.file.split(',')
fileArr.forEach(function(item) {
let gs = item.substr(item.lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' ||
gs == 'tif' || gs == 'tiff') {
_this.img.push(item)
}
})
if(this.img < 1){
this.img.push('../../static/fileImg/pdfS.png')
}
this.goodInfo = res.data.domainInfo
this.userInfo = res.data.shopInfo
this.orderDet[0].goodsId = res.data.id
this.orderDet[0].goodsName = res.data.domainInfo.name
this.orderDet[0].img = this.img[0]
this.orderDet[0].userName = res.data.shopInfo.userName
let src = JSON.parse(res.data.shopInfo.images)
this.orderDet[0].userImg = src[0]
this.serveList = res.data
res.data.scores.forEach(function(item){
let img = JSON.parse(item.avatar)
item.avatar = img[0]
})
this.allScor = res.data.scores
this.scoresLen = res.data.scores.length
if(this.scoresLen > 5){
this.writerList = res.data.scores.slice(0,5)
}else{
this.scores = res.data.scores
}
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
back() {
uni.navigateBack()
},
//
ImdeiaBuy() {
this.showBuy = true
},
//
close() {
this.showBuy = false
},
open() {
},
//
DoBuy(num) {
this.showBuy = false
/* var name=this.FetchGoodMethod
switch (name){
case '1':
if(this.serveList.moneyPrice > 0){
this.orderDet[0].mType = '0'
this.orderDet[0].money = this.serveList.moneyPrice
}else{
this.orderDet[0].mType = '1'
this.orderDet[0].money = this.serveList.pointPrice
}
if(this.orderDet[0].mType == 0){
// uni.navigateTo({
// url:'/pages/ConfirmOrder/ConfirmOrder?data=' + encodeURIComponent(JSON.stringify(this.orderDet))
// })
}else if(this.orderDet[0].mType == 1){
uni.navigateTo({
url:'/pages/ActivitiesDetail/ActivitiesDetail'
url:'/pages/ConfirmOrder/fictitiousOrder?data=' + encodeURIComponent(JSON.stringify(this.orderDet))
})
break;
case '2' :
uni.navigateTo({
url:'/pages/ArtActivities/ArtActivities'
})
break;
} */
}
},
//
ClickStart() {
this.StartSrc = this.StartSrc.reverse()
if (this.serveList.follow) {
this.http.request('/worksCollection/delCollection?workId=' + this.serveList.domainInfo.id, "POST")
.then(res => {
if (res.code == 200) {
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
} else {
this.http.request('/worksCollection/addCollection?workId=' + this.serveList.domainInfo.id, "POST")
.then(res => {
if (res.code == 200) {
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
goAllPingjia() {
//
goAllPingjia() {
uni.navigateTo({
url: "/pages/PingJiaList/PingJiaList"
url: "/pages/PingJiaList/PingJiaList?score=" + encodeURIComponent(JSON.stringify(this.allScor))
})
},
//
addCarClick() {
this.$refs.uToast.show({
type: 'default',
message: "加入购物车成功",
this.http.request('/shopCar/joinShopCar', {
count: 1,
goodsId: this.serveList.id,
shopId: this.serveList.shopInfo.id,
}, "POST").then(res => {
if (res.code == 200) {
uni.showToast({
title: '加入购物车成功',
icon: "none",
})
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
ClickBuy() {
uni.navigateTo({
url: '/pages/ShoppingCart/ShoppingCart'
})
},
//
//
minusNum(val1) {
if (val1 > 1) {
this.orderDet[0].count = val1 - 1
}
},
onLoad(option) {
console.log(option.id);
//
plusNum(val1, ) {
this.orderDet[0].count = val1 + 1
}
}
}
</script>

View File

@ -2,8 +2,6 @@
<view style="margin: 0rpx 48rpx;">
<u--form :model="registInfo" ref="registForm">
<view class="" style="padding: 0rpx 28rpx ;">
<text style="font-size: 40rpx; font-weight: 700;">修改密码</text>
<u-form-item prop="oldpasw" ref="item1" class="data_itm">
<u--input type="password" placeholder="请输入旧密码" border="bottom" clearable
v-model="registInfo.oldpasw">
@ -31,35 +29,11 @@
return {
tips: '',
registInfo: {
number: null,
checKcode: null,
pasw: null,
oldpasw: null,
repasw: null
},
rules: {
'checKcode': [{
required: true,
message: '请填写验证码',
trigger: ['blur']
}, {
min: 6,
max: 6,
message: '验证码长度应该等于6个字符!',
trigger: "blur"
}],
'number': [{
type: 'number',
required: true,
message: '请填写手机号',
trigger: ['blur']
}, {
validator: (rule, value, callback) => {
return uni.$u.test.mobile(value);
},
message: '请输入格式正确的手机号',
trigger: ['change', 'blur'],
}],
'pasw': [{
required: true,
message: '请填写密码',
@ -86,23 +60,6 @@
required: true,
message: '请填写旧密码',
trigger: ['blur', 'change']
}, {
min: 6,
max: 20,
message: '密码长度应大于等于6个字符小于20个字符!',
trigger: ['blur', 'change']
}, {
trigger: ['blur', 'change'],
validator: (rule, value, callback) => {
var passwordreg =
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
if (!passwordreg.test(value)) {
callback(new Error('密码包含 数字,英文,字符中的两种以上'))
} else {
callback()
}
}
}],
'repasw': [{
required: true,
@ -123,45 +80,31 @@
};
},
methods: {
codeChange(text) {
this.tips = text;
},
getCode() {
uni.hideKeyboard()
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.registInfo.number))) { //
uni.showToast({
title: '请填写正确手机号码',
icon: "none"
});
return false;
}
if (this.$refs.uCode.canGetCode) {
//
uni.showLoading({
title: '正在获取验证码'
})
setTimeout(() => {
uni.hideLoading();
// this.start()
uni.$u.toast('验证码已发送');
//
this.$refs.uCode.start();
}, 2000);
} else {
uni.$u.toast('倒计时结束后再发送');
}
},
submitNext() {
this.$refs.registForm.validate().then(res => {
uni.$u.toast('Thanks your helping')
let data = {
newPassword: this.registInfo.pasw,
oldPassword: this.registInfo.oldpasw,
rePassword: this.registInfo.repasw
}
this.http.request('/user/resetPassword', data, "POST").then(res => {
if (res.code == 200) {
uni.navigateTo({
url: "/pages/Login/Login"
})
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}).catch(errors => {
uni.$u.toast('您的资料还未补充完整')
})
}
},
onReady() {
this.$refs.registForm.setRules(this.rules);
},
}

View File

@ -2,21 +2,19 @@
<view class="content_main">
<view class="pijia ">
<view class="pinjia_t ">
<text class="pinjia_count">宝贝评价{{toatal}}</text>
<text class="pinjia_count">宝贝评价{{total}}</text>
</view>
<u-rate count=5 v-model="rate2" :readonly="true"></u-rate>
<view class="pinContent" >
<view class="pinContent_itm" v-for='(v,i) in toatal' :key="i">
<view class="pinContent_itm" v-for='(v,i) in score' :key="i">
<view class="pinContent_avator">
<image src="../../static/RewardWork/avator.png" mode=""></image>
<image :src="v.avatar" mode=""></image>
<view class="pinContent_Time">
<text style="font-size: 24rpx; font-weight: 600;">李已</text>
<text style="font-size: 24rpx; color: #AFADB0;">2020-2-13 12:23</text>
<text style="font-size: 24rpx; font-weight: 600;">{{v.userName}}</text>
<text style="font-size: 24rpx; color: #AFADB0;">{{v.scoreTime}}</text>
</view>
</view>
<view class="pinContent_rate">
<!-- <u-rate count=5 v-model="rate2" readonly=true></u-rate> -->
<u-rate count=5 v-model="v.star" :readonly="true"></u-rate>
</view>
</view>
</view>
@ -29,11 +27,14 @@
data() {
return {
rate2: 2,
toatal: 10
total: 10,
score:[]
};
},
onLoad() {
// console.log("ddddddddddddd",this.$u.config.v);
onLoad(op) {
this.score = JSON.parse(decodeURIComponent(op.score))
this.total = this.score.length
console.log(this.score)
}
}

View File

@ -24,33 +24,23 @@
</u--input>
</view>
<view class="sub_ti_box" v-if="v1=='付费购买'">
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='付费购买'">
<text class="right_titl">使用费用</text>
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" v-model="price"></u--input> <text
style="margin-left: 16rpx;"></text>
</view>
<view class="sub_ti_box" v-if="v1=='付费购买'">
<text class="right_titl">网盘地址</text>
<u--input placeholder="请输入网盘地址" inputAlign="right" border="none" v-model="wpPath"></u--input> <text
style="margin-left: 16rpx;"></text>
</view>
<view class="sub_ti_box" v-if="v1=='付费购买'">
<text class="right_titl">提取码</text>
<u--input placeholder="请输入提取码" inputAlign="right" border="none" v-model="code"></u--input> <text
style="margin-left: 16rpx;"></text>
</view>
<view class="sub_ti_box" v-if="v1=='积分购买'">
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='积分购买'">
<text class="right_titl">使用积分</text>
<u--input placeholder="请输入使用积分" inputAlign="right" type="number" border="none" v-model="price"></u--input> <text
style="margin-left: 16rpx;">积分</text>
</view>
<view class="sub_ti_box" v-if="v1=='积分购买'">
<view class="sub_ti_box" v-if="v2=='可购买'">
<text class="right_titl">网盘地址</text>
<u--input placeholder="请输入网盘地址" inputAlign="right" border="none" v-model="wpPath"></u--input> <text
style="margin-left: 16rpx;"></text>
</view>
<view class="sub_ti_box" v-if="v1=='积分购买'">
<view class="sub_ti_box" v-if="v2=='可购买'">
<text class="right_titl">提取码</text>
<u--input placeholder="请输入提取码" inputAlign="right" border="none" v-model="code"></u--input> <text
style="margin-left: 16rpx;"></text>
@ -169,48 +159,54 @@
});
return
}
if(this.v2 == '可购买' && this.v1 == '付费购买' && this.price == ''){
if(this.v2 == '可购买' && this.v1 == '面议'){
this.price = '0'
}
if(this.v2 == '可购买' && this.v1 == '免费使用'){
this.price = '0'
}
if(this.v2 == '可购买' && this.v1 != '' && this.price == ''){
uni.showToast({
title: '价格不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 == '付费购买' && this.wpPath == ''){
if(this.v2 == '可购买' && this.v1 != '' && this.wpPath == ''){
uni.showToast({
title: '网盘地址不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 == '付费购买' && this.code == ''){
uni.showToast({
title: '提取码不能为空,若不需要提取码请填‘无’',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 == '积分购买' && this.price == ''){
uni.showToast({
title: '价格不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 == '积分购买' && this.wpPath == ''){
uni.showToast({
title: '网盘地址不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 == '积分购买' && this.code == ''){
if(this.v2 == '可购买' && this.v1 != '' && this.code == ''){
uni.showToast({
title: '提取码不能为空,若不需要提取码请填‘无’',
icon: "none",
});
return
}
// if(this.v2 == '' && this.v1 == '' && this.price == ''){
// uni.showToast({
// title: '',
// icon: "none",
// });
// return
// }
// if(this.v2 == '' && this.v1 == '' && this.wpPath == ''){
// uni.showToast({
// title: '',
// icon: "none",
// });
// return
// }
// if(this.v2 == '' && this.v1 == '' && this.code == ''){
// uni.showToast({
// title: ',',
// icon: "none",
// });
// return
// }
this.radiolist1.forEach((item) =>{
if(_this.v2 == item.label){
_this.worksVo.usePermission = item.value
@ -225,6 +221,7 @@
this.worksVo.wpPath = this.wpPath
this.worksVo.code = this.code
if(this.wpPath != ''){
this.http.request('/works/isValid?strLink='+this.wpPath, "POST").then(res => {
if (res.code == 200) {
uni.redirectTo({
@ -238,6 +235,10 @@
icon: "none",
});
})
}else{
this.pushWork()
}
},
pushWork() {
this.http.request('/works/addWork', this.worksVo, "POST").then(res => {

View File

@ -1,49 +1,58 @@
<template>
<view class="shopCart">
<view style="height: 100%;width: 100%;">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="shopCart" v-if="load == false">
<u-gap height="10" bgColor="#F4F5F7"></u-gap>
<view class="words_box">
<view class="shop_box" v-for="(v,i) in list" :key="i">
<u-empty v-if="list.length < 1" mode="car" icon="../../static/orderE.png" style="margin-top: 120px;">
</u-empty>
<view class="shop_box" v-for="(v,i) in list" :key="v.id">
<u-swipe-action>
<u-swipe-action-item :options="options1" @click="del(v.id)">
<u-swipe-action-item :options="options1" @click="del(v.id,i)">
<view class="choose_main">
<view class="left_choose">
<view class="choose_box" @click="chooseOne(i,v.choosed)">
<image v-if="v.choosed == 1" src="../../static/workDetail/choose.png"
<view class="choose_box" @click="chooseOne(i,v.checked)">
<image v-if="v.checked == 1" src="../../static/workDetail/choose.png"
mode="widthFix" class="choose_img"></image>
</view>
</view>
<view class="right_show">
<view class="show_top">
<view class="top_left">
<image :src="v.userUrl" class="top_left_img"></image>
<image :src="v.goods.shopInfo.images" class="top_left_img"></image>
</view>
<view class="top_right">
{{v.name}}
{{v.goods.shopInfo.userName}}
</view>
</view>
<view class="shou_main">
<view class="shou_main_left">
<image :src="v.orderUrl" class="shou_main_left_img"></image>
<image :src="v.goods.domainInfo.file" class="shou_main_left_img"></image>
</view>
<view class="shou_main_center">
<view class="shou_main_center_name">
{{v.orderName}}
{{v.goods.domainInfo.name}}
</view>
<view class="shou_main_center_num">
<!-- x{{v.orderNum} -->
<u-number-box v-model="v.orderNum" buttonSize="20" integer>
<view slot="minus" class="minus">
<u-number-box v-model="v.count" buttonSize="20" integer>
<view slot="minus" class="minus" @click="minusNum(v.count,v.id,i)">
<u-icon name="minus" size="12"></u-icon>
</view>
<view slot="plus" class="plus">
<view slot="plus" class="plus" @click="plusNum(v.count,v.id,i)">
<u-icon name="plus" size="12"></u-icon>
</view>
</u-number-box>
</view>
</view>
<view class="shou_main_right">
{{v.orderMoney}}积分
<view class="shou_main_right" v-if="v.goods.moneyPrice > 0">
{{v.goods.moneyPrice}}
</view>
<view class="shou_main_right" v-else-if="v.goods.pointPrice > 0">
{{v.goods.pointPrice}}积分
</view>
</view>
</view>
@ -54,125 +63,299 @@
</view>
</view>
<view v-if="list.length == 0" style="margin-top: 120px;">
<u-empty mode="car" icon="../../static/orderE.png">
</u-empty>
</view>
<view class="money_box">
<view class="allChoose_box" @click="chooseAll()">
<image v-if="allChoosed == 1" src="../../static/workDetail/choose.png" mode="widthFix"
class="allChoosed_img"></image>
</view>
<view class="money_button">
<view class="money_button" @click="upDataOrder()">
<u-button class="custom-style" text="结算"></u-button>
</view>
<view class="money_num">
合计<text class="number">{{allMoney}}积分</text>
合计<text class="number" v-if="allMoney>0">{{allMoney}}</text><text class="number" v-else-if="allPoint>0">{{allPoint}}积分</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
total:'',
load: true,
showList:[],
options1: [{
text: '删除',
style: {
backgroundColor: '#99241B'
}
}],
list: [{
id: '000',
name: '张三',
userUrl: '../../static/MoneyIco.png',
orderName: '物品名',
orderNum: '1',
orderUrl: '../../static/icon12.jpg',
orderMoney: '25',
choosed: 0,
},
{
id: '001',
name: '李四',
userUrl: '../../static/MoneyIco.png',
orderName: '物品名',
orderNum: '1',
orderUrl: '../../static/icon12.jpg',
orderMoney: '125',
choosed: 0,
},
{
id: '002',
name: '王五',
userUrl: '../../static/MoneyIco.png',
orderName: '物品名',
orderNum: '5',
orderUrl: '../../static/icon12.jpg',
orderMoney: '5',
choosed: 1,
},
{
id: '003',
name: '赵六',
userUrl: '../../static/MoneyIco.png',
orderName: '物品名',
orderNum: '3',
orderUrl: '../../static/icon12.jpg',
orderMoney: '55',
choosed: 1,
},
{
id: '004',
name: '陈七',
userUrl: '../../static/MoneyIco.png',
orderName: '物品名',
orderNum: '15',
orderUrl: '../../static/icon12.jpg',
orderMoney: '2',
choosed: 0,
}
],
list: [],
allChoosed: 0,
allMoney: 88,
allMoney: 0,
allPoint: 0,
pages: 1,
size: 20,
orderDet:[],
myPoint: 0,
};
},
onShow() {
//
onPullDownRefresh() {
this.pages = 1
this.showList = []
this.getData()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getMoreData();
},
onShow() {
this.allMoney = 0
this.allPoint = 0
this.pages = 0
this.getData()
this.getUserInfo()
},
methods: {
getData(){
uni.setNavigationBarTitle({
title: '购物车(' + this.list.length + ')'
getUserInfo(){
let _this = this
this.http.request('/user/userInfo', {}, "GET").then(res => {
if (res.code == 200) {
this.myPoint = res.data.point
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
del(i) {
console.log(i)
//
getData(){
let _this = this
this.http.request('/shopCar/list', {page: this.pages,size: this.size}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item){
let fileArr = item.goods.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.goods.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.goods.domainInfo.file = '../../static/fileImg/pdfS.png'
}
let img = JSON.parse(item.goods.shopInfo.images)
item.goods.shopInfo.images = img[0]
_this.showList.push(true)
})
this.list = res.data.records
this.total = res.data.total
uni.setNavigationBarTitle({
title: '购物车(' + this.total + ')'
});
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getMoreData(){
let _this = this
this.http.request('/shopCar/list', {page: this.pages,size: this.size}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item){
let fileArr = item.goods.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.goods.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.goods.domainInfo.file = '../../static/fileImg/pdfS.png'
}
let img = JSON.parse(item.goods.shopInfo.images)
item.goods.shopInfo.images = img[0]
_this.list.push(item)
_this.showList.push(true)
})
if(res.data.records.length == 0){
this.pages--
}
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
del(val1,val2) {
let _this = this
this.http.request('/shopCar/delShopCar?ids=' + val1, "POST").then(res => {
if (res.code == 200) {
if(this.list[val2].checked == 1){
if(this.list[val2].goods.moneyPrice > 0){
this.allMoney -= (this.list[val2].goods.moneyPrice * this.list[val2].count)
}else if(this.list[val2].goods.pointPrice > 0){
this.allPoint -= (this.list[val2].goods.pointPrice * this.list[val2].count)
}
}
this.list.splice(val2,1)
this.total --
uni.setNavigationBarTitle({
title: '购物车(' + this.total + ')'
});
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
chooseOne(val1, val2) {
let _this = this
if (val2 == 0) {
this.list[val1].choosed = 1
this.list[val1].checked = 1
if(this.list[val1].goods.moneyPrice > 0){
_this.allMoney += (this.list[val1].goods.moneyPrice * this.list[val1].count)
}else if(this.list[val1].goods.pointPrice > 0){
_this.allPoint += (this.list[val1].goods.pointPrice * this.list[val1].count)
}
} else if (val2 == 1) {
this.list[val1].choosed = 0
this.list[val1].checked = 0
if(this.list[val1].goods.moneyPrice > 0){
_this.allMoney -= (this.list[val1].goods.moneyPrice * this.list[val1].count)
}else if(this.list[val1].goods.pointPrice > 0){
_this.allPoint -= (this.list[val1].goods.pointPrice * this.list[val1].count)
}
}
},
//
chooseAll() {
let _this = this
if (this.allChoosed == 0) {
this.allChoosed = 1
this.list.forEach((item) => {
item.choosed = 1
item.checked = 1
if(item.goods.moneyPrice > 0){
_this.allMoney += (item.goods.moneyPrice * item.count)
}else if(item.goods.pointPrice > 0){
_this.allPoint += (item.goods.pointPrice * item.count)
}
})
} else if (this.allChoosed == 1) {
this.allChoosed = 0
this.allMoney = 0
this.allPoint = 0
this.list.forEach((item) => {
item.choosed = 0
item.checked = 0
})
}
},
//
upDataOrder(){
let _this = this
this.list.forEach((item) => {
if(item.checked == 1){
_this.orderDet.push({
count: item.count,
goodsId: item.goodsId
})
}
})
if(this.orderDet.length < 1){
uni.showToast({
title: '请选择要购买的商品',
icon: "none",
});
}else{
if(this.total > this.point){
uni.navigateTo({
url:'/pages/ConfirmOrder/purchaseDetail?success=1&id=0&num=0'
})
}else{
this.http.request('/order/newOrder', this.orderDet, "POST").then(res => {
if (res.code == 200) {
uni.navigateTo({
url:'/pages/ConfirmOrder/purchaseDetail?success=0&id=0&num=0'
})
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
},
//
//
minusNum(val1,val2,val3){
let _this = this
let data = {
count: 0,
id: '',
}
if(val1 > 1){
data.count = val1 - 1
data.id = val2
this.http.request('/shopCar/post', data, "POST").then(res => {
if (res.code == 200) {
if (this.list[val3].checked == 1) {
if(this.list[val3].goods.moneyPrice > 0){
_this.allMoney -= this.list[val3].goods.moneyPrice
}else if(this.list[val3].goods.pointPrice > 0){
_this.allPoint -= this.list[val3].goods.pointPrice
}
}
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
//
plusNum(val1,val2,val3){
let _this = this
let data = {
count: 0,
id: '',
}
data.count = val1 + 1
data.id = val2
this.http.request('/shopCar/post', data, "POST").then(res => {
if (res.code == 200) {
if (this.list[val3].checked == 1) {
if(this.list[val3].goods.moneyPrice > 0){
_this.allMoney += this.list[val3].goods.moneyPrice
}else if(this.list[val3].goods.pointPrice > 0){
_this.allPoint += this.list[val3].goods.pointPrice
}
}
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
};
</script>

View File

@ -5,6 +5,8 @@
</view>
<view class="layout" v-if="load == false">
<view class="shelves">
<u-empty v-if="writerList.length < 1" mode="data" icon="../../static/orderE.png" style="margin-top: 120px;">
</u-empty>
<view class="shelves-item" v-for="(item,index) in writerList" :key="index" @click="ToEnjoy(item.id)">
<image :src="item.images" mode="widthFix" class="shelves-img"></image>
<view class="name">{{item.userName}}</view>

View File

@ -1,5 +1,9 @@
<template>
<view class="famous_arts">
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="famous_arts" v-if="load == false">
<view class="ding">
<view class="top">
<view class="left">
@ -34,6 +38,8 @@
</view>
<view class="famous_bot" v-show="id=='1'">
<u-empty v-if="achievement.length < 1" mode="data" icon="../../static/orderE.png" style="margin-top: 120px;">
</u-empty>
<view class="famous_bot_itm" v-for="(v,i) in achievement" :key="i">
<view class="ico">
<image src="../../static/FamousArts/redStart.png"></image>
@ -45,6 +51,8 @@
</view>
<view class="famous_bot" v-show="id=='2'">
<u-empty v-if="honor.length < 1" mode="data" icon="../../static/orderE.png" style="margin-top: 120px;">
</u-empty>
<view class="famous_bot_itm" v-for="(v,i) in honor" :key="i">
<view class="ico" style="padding-right: 8rpx;">
<image style="width: 32rpx; height: 32rpx; vertical-align: bottom;"
@ -57,6 +65,8 @@
</view>
<view class="famous_bot" v-show="id=='3'">
<u-empty v-if="represe.length < 1" mode="data" icon="../../static/orderE.png" style="margin-top: 120px;">
</u-empty>
<view class="famous_bot_itm" style="display: block;" v-for="(v,i) in represe" :key="i">
<view class="works" v-for="(a,b) in v.value" :key="b">
<image :src="a" mode=""></image>
@ -67,6 +77,8 @@
</view>
</view>
</view>
</view>
</template>
<script>

View File

@ -1,5 +1,9 @@
<template>
<view class="workDetail">
<view style="height: 100%;width: 100%;">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="workDetail" v-if="load == false">
<u-swiper :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px">
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
@ -34,34 +38,8 @@
</view>
</view>
<view class="detailBottom">
<view class="bottom_box" @click="clickHeart()">
<view class="bottom_box_left">
<image src="../../static/workDetail/heart1.png" class="bot_img" v-if="isLick == 0"></image>
<image src="../../static/workDetail/heart2.png" class="bot_img" v-else></image>
</view>
<view class="bottom_box_right">
24
</view>
</view>
<view class="bottom_box" @click="clickStar()">
<view class="bottom_box_left">
<image src="../../static/workDetail/star1.png" class="bot_img" v-if="isCon == 0"></image>
<image src="../../static/workDetail/star2.png" class="bot_img" v-else></image>
</view>
<view class="bottom_box_right">
55
</view>
</view>
<view class="bottom_box">
<view class="bottom_box_left">
<image src="../../static/workDetail/share.png" class="bot_img"></image>
</view>
<view class="bottom_box_right">
分享
</view>
</view>
</view>
</view>
</template>
@ -70,13 +48,12 @@
export default {
data() {
return {
load: true,
list: [
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
],
currentNum: 1,
isLick: 0,
isCon: 0,
currentNum: 0,
actDetObj: {},
ActId:''
}
@ -87,30 +64,14 @@
this.ActId=opt.id
},
methods: {
clickHeart() {
if (this.isLick == 0) {
this.isLick = 1
} else if (this.isLick == 1) {
this.isLick = 0
}
},
clickStar() {
if (this.isCon == 0) {
this.isCon = 1
} else if (this.isCon == 1) {
this.isCon = 0
}
},
getData() {
let _this = this
this.http.request('/silhouette/details', {
id: this.ActId
}, "GET").then(res => {
if (res.code == 200) {
console.log(res.data)
this.actDetObj = res.data
// console.log("actObj");
// _this.load = false
this.list = res.data.picture.split(',')
this.load = false
}
}).catch(e => {
uni.showToast({

View File

@ -3,7 +3,6 @@
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<view class="navbar" v-show="opCalue>0" :style="{'opacity':opCalue}">
<view class="status_bar" :style="{'height':statusHeight+'px'}"></view>
@ -16,7 +15,8 @@
</view>
<u-swiper :list="list" indicator indicatorMode="dot" circular height="240"></u-swiper>
<view class="layout">
<view class="activityColumn">
<!-- 文创展厅(功能不明先隐藏) -->
<!-- <view class="activityColumn">
<view class="banEle">
<view class="title">
文创展厅
@ -35,48 +35,27 @@
</view>
</view>
</u-scroll-list>
</view>
</view> -->
<view class="activityColumn">
<view class="banEle">
<view class="title">
活动剪影
</view>
<!-- <text class="more">
更多
</text> -->
</view>
<!-- <view class="activity" v-for="(v,i) in num" :key="i">
<view class="left">
<view class="content">
<view class="title">
送万福进万家文艺惠民 暖人心嫁得好风扇电机接收到删掉就惊世毒妃
</view>
</view>
<view class="clidate">
<view class="cliNum">点击量:15</view>
<view class="date">2022-01-11</view>
</view>
</view>
<view class="right">
<image src="../../static/icon12.jpg" mode=""></image>
</view>
</view> -->
<view class="activity" v-for="(v,i) in jianAct" :key="i" @click="goDetail(v.id)">
<view class="left">
<view class="content">
<view class="title">
{{v.title}}
<!-- 送万福进万家文艺惠民 暖人心嫁得好风扇电机接收到删掉就惊世毒妃 -->
</view>
</view>
<view class="clidate">
<view class="cliNum">点击量:{{v.views}} </view>
<view class="cliNum">点击量:{{v.views}}</view>
<view class="date">{{v.releaseDate}}</view>
</view>
</view>
<view class="right">
<image :src="jianAct[i].picture" mode=""></image>
<!-- <image src="../../static/icon12.jpg" mode=""></image> -->
</view>
</view>
</view>
@ -95,10 +74,7 @@
statusHeight: 0,
titleHeight: 50,
opCalue: 0,
list: [
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png'
],
list: [],
list2: [{
image: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
title: '艺起战疫获奖作品展示',
@ -113,7 +89,7 @@
};
},
onShow() {
this.getData()
this.getHBQ()
this.pages = 1
},
methods: {
@ -122,18 +98,15 @@
url:'/pages/literFamily/ActJianDetail?id='+id
})
},
getData() {
//
getHBQ() {
let _this = this
this.http.request('/silhouette/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
this.http.request('/indexImage/poster', {}, "GET").then(res => {
if (res.code == 200) {
console.log(res.data)
this.jianAct = res.data.records
// picture
_this.load = false
res.data.forEach(function(item) {
_this.list.push(item.imagePath)
})
this.getData()
}
}).catch(e => {
uni.showToast({
@ -141,19 +114,62 @@
icon: "none",
});
})
}, //
getMoreData() {
},
//
getData() {
let _this = this
this.http.request('/silhouette/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
res.data.records.map((v,i)=>{
this.jianAct.push(v)
if (res.code == 200) {
res.data.records.forEach(function(item){
let picArr = item.picture.split(',')
item.picture = picArr[0]
})
this.jianAct = res.data.records
// this.getZTData()
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getZTData() {
let _this = this
this.http.request('/silhouette/worksList', {}, "GET").then(res => {
if (res.code == 200) {
// res.data.records.forEach(function(item){
// let picArr = item.picture.split(',')
// item.picture = picArr[0]
// })
// this.jianAct = res.data.records
this.load = false
console.log(res.data)
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getMoreData() {
this.http.request('/silhouette/list', {
page: this.pages,
size: this.size
}, "GET").then(res => {
res.data.records.forEach(function(item){
let picArr = item.picture.split(',')
item.picture = picArr[0]
this.jianAct.push(item)
})
}).catch(e => {
uni.showToast({
title: e.data.message,

View File

@ -60,6 +60,10 @@
SwitchPage(id) {
switch (id) {
case 0:
// uni.showToast({
// title: '',
// icon: "none",
// });
uni.navigateTo({
url: "/pages/ArtActivities/ArtActivities"
})

View File

@ -1,17 +1,18 @@
<template>
<view>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<view class="top">
<image class="bg" src="../../static/MyBg.png" mode=""></image>
<view class="avator_box" @click="GoPersonalCenter">
<view class="tou">
<image class="avtor" src="../../static/MoneyIco.png" mode=""></image>
<image class="avtor" :src="image" mode=""></image>
</view>
<view class="user_name">
<view class="user_name_de">
谢加息
</view>
<view class="words">
学而不思则罔,思不学则殆
{{userName}}
</view>
</view>
<view class="arrow">
@ -22,53 +23,50 @@
<!-- 内容区 -->
<view class="content_area">
<view class="fans_box">
<view class="fans_itm">
<view class="fans_itm" @click="toFollow()">
<view class="nums">
568
{{care}}
</view>
<view class="itms_name">
关注
</view>
</view>
<view class="fans_itm">
<view class="fans_itm" @click="toCol()">
<view class="nums">
568
{{colNum}}
</view>
<view class="itms_name">
收藏
</view>
</view>
<view class="fans_itm">
<view class="fans_itm" @click="toFollow()">
<view class="nums">
568
{{fans}}
</view>
<view class="itms_name">
粉丝
</view>
</view>
</view>
<view class="jifen_box">
<view class="jifen_box_itm">
<view class="jifen_box_itm" @click="gopointsPg">
<view class="ji_ico">
<image src="../../static/MoneyIco.png" mode=""></image>
</view>
<view class="ji_word_box" @click="gopointsPg">
<view class="ji_word_box">
<view class="ji_word_title">
积分
</view>
<view class="ji_con">
积分 686
积分 {{point}}
</view>
</view>
</view>
<view class="jifen_box_itm">
<view class="jifen_box_itm" @click="goOrderDetails">
<view class="ji_ico">
<image src="../../static/DunIcon.png" mode=""></image>
</view>
<view class="ji_word_box" @click="goOrderDetails">
<view class="ji_word_box">
<view class="ji_word_title">
我的交易
</view>
@ -78,53 +76,166 @@
</view>
</view>
</view>
<view class="content_bott">
<view class="content_bott_itm" v-for="(v,i) in itmes" :key="i">
<view class="content_bott_itm" @click="toWork()">
<view class="content_bott_wods">
<!-- 我的作品 -->
{{v}}
我的作品
</view>
<view class="content_bott_arrow">
<image src="../../static/rightArrow.png" mode=""></image>
</view>
</view>
<view class="content_bott_itm">
<view class="content_bott_wods">
活动管理
</view>
<view class="content_bott_arrow">
<image src="../../static/rightArrow.png" mode=""></image>
</view>
</view>
<view class="content_bott_itm">
<view class="content_bott_wods">
消息
</view>
<view class="content_bott_arrow">
<image src="../../static/rightArrow.png" mode=""></image>
</view>
</view>
<view class="content_bott_itm" @click="toSz()">
<view class="content_bott_wods">
设置
</view>
<view class="content_bott_arrow">
<image src="../../static/rightArrow.png" mode=""></image>
</view>
</view>
</view>
</view>
<tabbar tabbarId='5'></tabbar>
</view>
</view>
</template>
<script>
export default {
data() {
return {
itmes: ["我的作品", "活动管理", "消息", "设置"]
load: true,
image: '',
userName:'',
userId:'',
point: '',
colNum: '',
fans:'',
care:'',
};
},
onShow() {
this.getUserInfo()
},
methods: {
//
getUserInfo(){
let _this = this
this.http.request('/user/userInfo', {}, "GET").then(res => {
if (res.code == 200) {
let img = JSON.parse(res.data.images)
this.image = img[0]
this.userName = res.data.userName
this.userId = res.data.id
this.point = res.data.point
this.getCol()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getCol(){
this.http.request('/worksCollection', {}, "GET").then(res => {
if (res.code == 200) {
this.colNum = res.data.total
this.getCare()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getCare(){
this.http.request('/userFollow/myFollow', {}, "GET").then(res => {
if (res.code == 200) {
this.care = res.data.total
this.getFans()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getFans(){
this.http.request('/userFollow/myFans', {}, "GET").then(res => {
if (res.code == 200) {
this.fans = res.data.total
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
gopointsPg() {
uni.navigateTo({
url: "/pages/MyPoints/MyPoints"
})
},
//
goOrderDetails() {
uni.navigateTo({
url: "/pages/OrderDetail/OrderDetail"
url: "/pages/MyOrder/MyOrder"
})
},
//
GoPersonalCenter() {
console.log("dd");
uni.navigateTo({
url: "/pages/PersonalCenter/PersonalCenter"
})
},
//
toCol(){
uni.navigateTo({
url: "/pages/my/myCollection"
})
},
//
toFollow(){
// uni.navigateTo({
// url: "/pages/my/myFollow"
// })
},
//
toWork(){
uni.navigateTo({
url: "/pages/my/myWoekList?id=" + this.userId + '&userName=' + this.userName + '&userImg=' + this.image
})
},
//
toSz(){
uni.navigateTo({
url: "/pages/my/logOut"
})
}
}
}

375
src/pages/my/editWork.vue Normal file
View File

@ -0,0 +1,375 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<!-- 发布作品 -->
<view class="rightBox">
<u--input placeholder="请输入作品名称" v-model="name" clearable border="none" style="color: #251B1D;margin-left: 32rpx;">
</u--input>
</view>
<!-- 作品类型 -->
<view class="rightBox" @click="showType=true">
<text class="right_titl" style="color: #c0c4cc; font-size: 15px;margin-left: 32rpx;">请选择作品类型</text>
<u--input fontSize="30rpx" border="none" readonly v-model="v1" disabledColor="#ffffff"
inputAlign="right">
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
</u--input>
</view>
<u-popup :show="showType" @close="close" closeOnClickOverlay :round="5"
customStyle="padding: 16px;">
<u-radio-group @change="selectForm1" v-model="radiovalue1" :borderBottom="true" placement="column"
iconPlacement="right">
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist1" :key="index"
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label"
activeColor="#99241B ">
</u-radio>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showType=false">确认</u-button>
</u-radio-group>
</u-popup>
<!-- 作品标签 -->
<view class="rightBox" @click="showTab=true">
<text class="right_titl" style="color: #c0c4cc; font-size: 15px;margin-left: 32rpx;">请选择作品标签</text>
<u--input fontSize="30rpx" border="none" readonly v-model="v2" disabledColor="#ffffff"
inputAlign="right">
<u-icon slot="suffix" name="arrow-right" style="margin-right: 10px;"></u-icon>
</u--input>
</view>
<u-popup :show="showTab" @close="close" closeOnClickOverlay :round="5"
customStyle="padding: 16px;">
<u-checkbox-group @change="selectForm2" v-model="radiovalue2" :borderBottom="true" placement="column"
iconPlacement="right">
<u-checkbox :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist2" :key="index"
:label="item.tagName" labelSize="28rpx" labelColor="#231F1C" :name="item.tagName"
activeColor="#99241B ">
</u-checkbox>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showTab=false">确认</u-button>
</u-checkbox-group>
</u-popup>
<u--textarea style="padding: 32rpx;" v-model="detailValue" placeholder="请输入作品说明" border="none">
</u--textarea>
<view class="gap">
作品内容可上传图片(png/jpg/jpeg/bmp/gif/tif/tiff)或pdf
</view>
<view class="gap" style="line-height: 30rpx;">
(若有图片请先上传图片)
</view>
<!-- H5下的上传 -->
<u-upload v-if="iswx == 1" class="upload" accept="file" width="172rpx" height="172rpx" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple>
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
<!-- 微信小程序下的上传 -->
<u-upload v-else-if="iswx == 0" class="upload" accept="all" width="172rpx" height="172rpx"
:fileList="fileList3" @afterRead="afterRead" @delete="deletePic" name="3" multiple>
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
<view class="operation">
<button type="default" class="next" @click="next">下一步</button>
</view>
</view>
</view>
</template>
<script>
import http from '../../request/interface.js'
export default {
data() {
return {
load: true,
detailValue: '',
name: '',
fileList3: [],
iswx: null,
showType: false,
showTab: false,
v1: "",
v2: "",
tabs:[],
imgs:[],
radiovalue1: '',
radiolist1: [],
radiovalue2: [],
radiolist2: [],
data:{},
worksVo: {
buy: "",
code: "",
file: "",
introduce: "",
name: "",
price: 0,
type: "",
usePermission: "",
wpPath: "",
}
};
},
onShow() {
this.getType()
this.getTab()
},
onLoad(op) {
let _this = this
this.data = JSON.parse(decodeURIComponent(op.data));
this.name = this.data.name
this.detailValue = this.data.introduce
this.radiovalue1 = this.data.type
this.v1 = this.data.type
this.radiovalue2 = this.data.workTag
this.v2 = this.data.workTag.join(',')
let arr = this.data.file.split(',')
arr.forEach(function(item){
_this.fileList3.push({url:item})
})
this.worksVo.usePermission = this.data.usePermission
this.worksVo.buy = this.data.buy
this.worksVo.wpPath = this.data.wpPath
this.worksVo.price = this.data.price
this.worksVo.code = this.data.code
},
onReady() {
// this.load = false
// #ifdef MP-WEIXIN
this.iswx = 0
// #endif
// #ifndef MP-WEIXIN
//
this.iswx = 1
// #endif
},
methods: {
getType() {
let _this = this
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
if (res.code == 200) {
_this.radiolist1 = res.data
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
getTab() {
let _this = this
this.http.request('/works/tag', {}, "GET").then(res => {
if (res.code == 200) {
_this.radiolist2 = res.data
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
next() {
let _this = this
if(this.name == ''){
uni.showToast({
title: '作品名称不能为空',
icon: "none",
});
return
}
if(this.v1 == ''){
uni.showToast({
title: '作品类型不能为空',
icon: "none",
});
return
}
if(this.v2 == ''){
uni.showToast({
title: '作品标签不能为空',
icon: "none",
});
return
}
if(this.detailValue == ''){
uni.showToast({
title: '作品说明不能为空',
icon: "none",
});
return
}
if(this.fileList3.length == 0){
uni.showToast({
title: '作品内容不能为空',
icon: "none",
});
return
}
this.worksVo.name = this.name
this.worksVo.introduce = this.detailValue
this.radiolist1.forEach((item) =>{
if(_this.v1 == item.label){
_this.worksVo.type = item.value
}
})
let tabList = []
this.radiolist2.forEach((item) =>{
this.tabs.forEach((ele) =>{
if(ele == item.tagName){
tabList.push(item.id)
}
})
})
this.worksVo.workTag = tabList.join(',')
let imgList = []
this.fileList3.forEach((item) => {
imgList.push(item.url)
})
this.worksVo.file = imgList.join(',')
uni.navigateTo({
url: "/pages/my/editWorkNext?worksVo=" + encodeURIComponent(JSON.stringify(this.worksVo))
})
},
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead(event) {
// mutiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: http.config.baseUrl + '/file/upload',
filePath: url,
name: 'file',
formData: {
user: 'test'
},
success: (res) => {
console.log(res)
if(JSON.parse(res.data).code == 200){
setTimeout(() => {
resolve(JSON.parse(res.data).data.path)
}, 1000)
}else{
uni.showToast({
title: JSON.parse(res.data).message,
icon: "none",
});
this.fileList3.pop()
}
}
});
})
},
selectForm1(form) {
this.v1 = form
console.log(this.v1)
},
close() {
this.showType = false
this.showTab = false
},
selectForm2(form) {
let data = form
this.tabs = form
this.v2 = data.join(',')
console.log(this.v2)
}
}
}
</script>
<style lang="scss">
image {
width: 100%;
height: 100%;
}
.gap {
font-size: 24rpx;
color: #AFADB0;
height: 50rpx;
background: #F5F5F5;
border-radius: 0px 0px 0px 0px;
opacity: 1;
line-height: 50rpx;
padding: 0 32rpx;
}
.rightBox {
display: flex;
align-items: center;
justify-content: space-between;
height: 104rpx;
border: 1px solid transparent;
border-bottom: 1rpx solid #dadbde;
}
.upload {
padding: 32rpx;
}
.operation {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 32rpx 48rpx;
position: fixed;
left: 0;
bottom: 0;
right: 0;
background-color: #FFFFFF;
box-shadow: 0px -4px 10px 1px rgba(192, 192, 192, 0.12);
.next {
width: calc(100% - 48rpx);
height: 80rpx;
line-height: 80rpx;
background-color: #99241B;
color: #fff;
font-size: 32rpx;
font-weight: 600;
border: none;
button {
&::after {
border: none;
}
}
}
}
.zhanwei {
height: 460rpx;
}
</style>

View File

@ -0,0 +1,378 @@
<template>
<view>
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view v-if="load == false">
<view class="bg">
<image src="../../static/puplishBG.png" mode=""></image>
</view>
<view class="rightBox" @click="showBuy=true">
<text class="right_titl" style="color: #251B1D; font-weight: 600;margin-left: 32rpx;">作品使用权限</text>
<u--input fontSize="28rpx" border="none" readonly v-model="v2" disabledColor="#ffffff"
placeholder="请选择作品使用权限" inputAlign="right">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</view>
<view class="rightBox" @click="showSex=true" v-if="v2=='可购买'">
<text class="right_titl" style="color: #251B1D; font-weight: 600;margin-left: 32rpx;">支付方式</text>
<u--input fontSize="28rpx" border="none" readonly v-model="v1" disabledColor="#ffffff"
placeholder="请选择作品使用权限" inputAlign="right">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</view>
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='付费购买'">
<text class="right_titl">使用费用</text>
<u--input placeholder="请输入使用费用" inputAlign="right" border="none" type="number" v-model="price"></u--input> <text
style="margin-left: 16rpx;"></text>
</view>
<view class="sub_ti_box" v-if="v2=='可购买' && v1=='积分购买'">
<text class="right_titl">使用积分</text>
<u--input placeholder="请输入使用积分" inputAlign="right" type="number" border="none" v-model="price"></u--input> <text
style="margin-left: 16rpx;">积分</text>
</view>
<view class="sub_ti_box" v-if="v2=='可购买'">
<text class="right_titl">网盘地址</text>
<u--input placeholder="请输入网盘地址" inputAlign="right" border="none" v-model="wpPath"></u--input> <text
style="margin-left: 16rpx;"></text>
</view>
<view class="sub_ti_box" v-if="v2=='可购买'">
<text class="right_titl">提取码</text>
<u--input placeholder="请输入提取码" inputAlign="right" border="none" v-model="code"></u--input> <text
style="margin-left: 16rpx;"></text>
</view>
<u-popup :show="showBuy" @close="close" closeOnClickOverlay :round="5"
customStyle="padding: 16px;">
<u-radio-group @change="selectFormB" v-model="radiovalue1" :borderBottom="true" placement="column"
iconPlacement="right">
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist1" :key="index"
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label" activeColor="#99241B ">
</u-radio>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showBuy=false">确认</u-button>
</u-radio-group>
</u-popup>
<u-popup :show="showSex" @close="close" closeOnClickOverlay :round="5"
customStyle="padding: 16px;">
<u-radio-group @change="selectForm" v-model="radiovalue7" :borderBottom="true" placement="column"
iconPlacement="right">
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist7" :key="index"
:label="item.label" labelSize="28rpx" labelColor="#231F1C" :name="item.label" activeColor="#99241B ">
</u-radio>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showSex=false">确认</u-button>
</u-radio-group>
</u-popup>
<view class="operation">
<button type="default" class="collection" @click="goPre">上一步</button>
<button type="default" class="apply" @click="cfmPub()">确认发布</button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load:true,
showBuy: false,
showSex: false,
v1: "",
v2: "",
price:'',
wpPath:'',
code:'',
radiovalue1: '',
radiolist1: [],
radiovalue7: '',
radiolist7: [],
radio: '',
switchVal: false,
worksVo: {},
};
},
onLoad(op) {
this.worksVo = JSON.parse(decodeURIComponent(op.worksVo));
this.price = this.worksVo.price
this.wpPath = this.worksVo.wpPath
this.code = this.worksVo.code
if(this.worksVo.usePermission == 0){
this.radiovalue1 = '不可购买'
this.v2 = '不可购买'
}else if(this.worksVo.usePermission == 1){
this.radiovalue1 = '可购买'
this.v2 = '可购买'
}
if(this.worksVo.usePermission == 1){
this.radiovalue7 = '免费使用'
this.v1 = '免费使用'
}else if(this.worksVo.usePermission == 2){
this.radiovalue7 = '积分购买'
this.v1 = '积分购买'
}else if(this.worksVo.usePermission == 3){
this.radiovalue7 = '付费购买'
this.v1 = '付费购买'
}else if(this.worksVo.usePermission == 4){
this.radiovalue7 = '面议'
this.v1 = '面议'
}
console.log(this.worksVo)
},
onShow() {
this.getQx()
this.getFs()
},
methods: {
getQx() {
let _this = this
this.http.request('/works/select?code=use_permission', {}, "GET").then(res => {
if (res.code == 200) {
_this.radiolist1 = res.data
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
getFs() {
let _this = this
this.http.request('/works/select?code=purchase_method', {}, "GET").then(res => {
if (res.code == 200) {
_this.radiolist7 = res.data
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
goPre() {
uni.navigateBack()
// uni.navigateTo({
// url: "/pages/PublishWorks/PublishWorks"
// })
},
cfmPub() {
let _this = this
if(this.v2 == ''){
uni.showToast({
title: '使用权限不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 == ''){
uni.showToast({
title: '支付方式不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 == '面议'){
this.price = '0'
}
if(this.v2 == '可购买' && this.v1 == '免费使用'){
this.price = '0'
}
if(this.v2 == '可购买' && this.v1 != '' && this.price == ''){
uni.showToast({
title: '价格不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 != '' && this.wpPath == ''){
uni.showToast({
title: '网盘地址不能为空',
icon: "none",
});
return
}
if(this.v2 == '可购买' && this.v1 != '' && this.code == ''){
uni.showToast({
title: '提取码不能为空,若不需要提取码请填‘无’',
icon: "none",
});
return
}
// if(this.v2 == '' && this.v1 == '' && this.price == ''){
// uni.showToast({
// title: '',
// icon: "none",
// });
// return
// }
// if(this.v2 == '' && this.v1 == '' && this.wpPath == ''){
// uni.showToast({
// title: '',
// icon: "none",
// });
// return
// }
// if(this.v2 == '' && this.v1 == '' && this.code == ''){
// uni.showToast({
// title: ',',
// icon: "none",
// });
// return
// }
this.radiolist1.forEach((item) =>{
if(_this.v2 == item.label){
_this.worksVo.usePermission = item.value
}
})
this.radiolist7.forEach((item) =>{
if(_this.v1 == item.label){
_this.worksVo.buy = item.value
}
})
this.worksVo.price = this.price
this.worksVo.wpPath = this.wpPath
this.worksVo.code = this.code
if(this.wpPath != ''){
this.http.request('/works/isValid?strLink='+this.wpPath, "POST").then(res => {
if (res.code == 200) {
uni.redirectTo({
url: "/pages/pageHome/pageHome"
})
this.pushWork()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}else{
this.pushWork()
}
},
pushWork() {
this.http.request('/works/addWork', this.worksVo, "POST").then(res => {
if (res.code == 200) {
uni.redirectTo({
url: "/pages/pageHome/pageHome"
})
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
sexSelect(e) {
this.model1.userInfo.rights = e.name
},
selectForm(form) {
this.v1 = form
this.price = ''
this.wpPath = ''
this.code = ''
},
selectFormB(form) {
this.v2 = form
this.v1 = ''
this.price = ''
this.wpPath = ''
this.code = ''
},
close() {
this.showSex = false
this.showBuy = false
}
}
}
</script>
<style lang="scss">
image {
width: 100%;
height: 100%;
}
.bg {
height: 520rpx;
}
.rightBox {
display: flex;
align-items: center;
justify-content: space-between;
height: 104rpx;
border: 1px solid transparent;
margin-top: 16rpx;
}
.sub_ti_box {
display: flex;
align-items: center;
margin: 0 32rpx;
padding: 32rpx 0;
.right_titl {
font-weight: 600;
color: $black;
}
}
.operation {
display: flex;
padding: 32rpx 32rpx 48rpx;
position: fixed;
left: 0;
bottom: 0;
right: 0;
background-color: #FFFFFF;
box-shadow: 0px -4px 10px 1px rgba(192, 192, 192, 0.12);
.collection {
flex: 1;
margin-right: 24rpx;
background-color: #F5F5F5;
color: #251B1D;
font-size: 32rpx;
font-weight: 500;
border: none;
}
.apply {
flex: 1;
background-color: $red;
color: #fff;
font-size: 32rpx;
font-weight: 500;
border: none;
}
button {
&::after {
border: none;
}
}
}
.ff {
padding-top: 16px;
}
</style>

45
src/pages/my/logOut.vue Normal file
View File

@ -0,0 +1,45 @@
<template>
<view class="">
<u-gap height="20" bgColor="#F4F5F7"></u-gap>
<view class="but">
<u-button text="退出登录" @click="out()"></u-button>
</view>
</view>
</template>
<script>
export default {
data(){
return{
}
},
methods: {
out(){
this.http.request('/worksCollection', {}, "GET").then(res => {
if (res.code == 200) {
uni.navigateTo({
url: "/pages/Login/Login"
})
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #F4F5F7;
}
.but{
width: 90%;
margin-left: 5%;
}
</style>

View File

@ -0,0 +1,399 @@
<template>
<view style="height: 100%;width: 100%;">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="shopCart" v-if="load == false">
<view class="words_box">
<u-gap height="1" bgColor="#F4F5F7"></u-gap>
<u-empty v-if="list.length < 1" mode="data" icon="../../static/orderE.png" style="margin-top: 120px;">
</u-empty>
<view class="shop_box" v-for="(v,i) in list" :key="v.id">
<u-swipe-action>
<u-swipe-action-item :options="options1" @click="del(v.id,i)">
<view class="choose_main">
<view class="right_show">
<view class="show_top">
<view class="top_left">
<image :src="v.user.images" class="top_left_img"></image>
</view>
<view class="top_right">
{{v.user.userName}}
</view>
</view>
<view class="shou_main">
<view class="shou_main_left" @click="toDetail(v.goodsId,v.id)">
<image :src="v.file" class="shou_main_left_img"></image>
</view>
<view class="shou_main_center" @click="toDetail(v.goodsId,v.id)">
<view class="shou_main_center_name">
{{v.name}}
</view>
</view>
<!-- <view class="shou_main_right" v-if="v.goods.moneyPrice > 0">
{{v.goods.moneyPrice}}
</view>
<view class="shou_main_right" v-else-if="v.goods.pointPrice > 0">
{{v.goods.pointPrice}}积分
</view> -->
</view>
</view>
</view>
</u-swipe-action-item>
</u-swipe-action>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
total:'',
load: true,
showList:[],
options1: [{
text: '删除',
style: {
backgroundColor: '#99241B'
}
}],
list: [],
allChoosed: 0,
allMoney: 0,
allPoint: 0,
pages: 1,
size: 20,
};
},
//
onPullDownRefresh() {
this.pages = 1
this.showList = []
this.getData()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getMoreData();
},
onShow() {
this.pages = 1
this.getData()
},
methods: {
//
getData(){
let _this = this
this.http.request('/worksCollection', {page: this.pages,size: this.size}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item){
let fileArr = item.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.file = fileArr[0]
} else if (gs == 'pdf') {
item.file = '../../static/fileImg/pdfB.png'
}
let img = JSON.parse(item.user.images)
item.user.images = img[0]
})
this.list = res.data.records
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getMoreData(){
let _this = this
this.http.request('/worksCollection', {page: this.pages,size: this.size}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item){
let fileArr = item.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.file = fileArr[0]
} else if (gs == 'pdf') {
item.file = '../../static/fileImg/pdfB.png'
}
let img = JSON.parse(item.user.images)
item.user.images = img[0]
_this.list.push(item)
})
if(res.data.records.length == 0){
this.pages--
}
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
del(val1,val2) {
let _this = this
this.http.request('/worksCollection/delCollection?workId=' + val1, "POST").then(res => {
if (res.code == 200) {
if(this.list[val2].checked == 1){
if(this.list[val2].goods.moneyPrice > 0){
this.allMoney -= (this.list[val2].goods.moneyPrice * this.list[val2].count)
}else if(this.list[val2].goods.pointPrice > 0){
this.allPoint -= (this.list[val2].goods.pointPrice * this.list[val2].count)
}
}
this.list.splice(val2,1)
this.total --
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
toDetail(val1,val2){
if(val1 != null){
uni.navigateTo({
url: "/pages/OrderDetail/OrderDetail?id=" + val1
})
}else{
uni.navigateTo({
url: "/pages/ArtWorks/artWorkDetail?id=" + val2
})
}
}
}
};
</script>
<style lang="scss" scoped>
page{
background: #F4F5F7;
}
.u-number-box__plus {
width: 20px;
}
.shopCart {
width: 100%;
height: 100%;
background: #F4F5F7;
.words_box {
width: 100%;
height: 100%;
.shop_box {
width: 94%;
margin: 10px 3%;
height: 137px;
background: #FFFFFF;
.choose_main {
width: 100%;
height: 137px;
.left_choose {
width: 40px;
height: 100%;
float: left;
.choose_box {
width: 20px;
height: 20px;
margin-top: 10px;
margin-left: 9px;
border: 1px solid #CFCFCF;
border-radius: 50px;
.choose_img {
width: 20px;
height: 20px;
}
}
}
.right_show {
width: calc(100% - 40px);
margin-left: 20px;
height: 100%;
float: left;
.show_top {
height: 35px;
width: 100%;
overflow: hidden;
.top_left {
height: 18px;
width: 18px;
margin-top: 10px;
float: left;
.top_left_img {
width: 18px;
height: 18px;
}
}
.top_right {
margin-left: 5px;
line-height: 38px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #251B1D;
float: left;
}
}
.shou_main {
height: 78px;
margin-top: 10px;
width: 100%;
.shou_main_left {
height: 78px;
width: 74px;
border-radius: 5px;
float: left;
.shou_main_left_img {
height: 100%;
width: 100%;
}
}
.shou_main_center {
float: left;
.shou_main_center_name {
height: 20px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #251B1D;
line-height: 20px;
margin-left: 6px;
}
.shou_main_center_num {
margin-left: 6px;
margin-top: 10px;
.minus {
width: 18px;
height: 18px;
border: 1px solid #F7F9F9 ;
background-color: #F7F9F9 ;
border-width: 1px;
@include flex;
justify-content: center;
align-items: center;
}
.input {
padding: 0 8px;
height: 18px;
}
.plus {
width: 18px;
height: 18px;
border: 1px solid #F7F9F9 ;
background-color: #F7F9F9 ;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
}
}
}
.shou_main_right {
float: right;
height: 78px;
line-height: 78px;
font-size: 18px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 700;
color: #251B1D;
margin-right: 25px;
}
}
}
}
}
}
.money_box {
width: 100%;
height: 50px;
background: #FFFFFF;
position: relative;
bottom: 0;
.allChoose_box {
width: 20px;
height: 20px;
position: absolute;
top: 15px;
left: calc(3% + 9px);
border: 1px solid #CFCFCF;
border-radius: 50px;
.allChoosed_img {
width: 20px;
height: 20px;
}
}
.money_button {
height: 40px;
width: 96px;
position: absolute;
top: 5px;
right: 3%;
.custom-style {
background-color: #99241B;
color: #FFFFFF;
font-weight: 600;
border-radius: 5px;
}
}
.money_num {
height: 50px;
line-height: 55px;
font-size: 14px;
position: absolute;
right: calc(3% + 110px);
.number {
font-size: 20px;
font-weight: 700;
color: #FF6600;
}
}
}
}
</style>

223
src/pages/my/myFollow.vue Normal file
View File

@ -0,0 +1,223 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="famous_arts" v-if="load == false">
<view class="tabs">
<view class="tabBox">
<view class="textBox" @click="toFollow()">
关注({{care}})
</view>
<view class="textLine" v-if="tab == 0"></view>
</view>
<view class="tabBox">
<view class="textBox" @click="toFans()">
粉丝({{fans}})
</view>
<view class="textLine" v-if="tab == 1"></view>
</view>
</view>
<view class="famous_bot">
<u-empty v-if="dataList.length == 0" mode="data" icon="../../static/orderE.png">
</u-empty>
<view class="famous_bot_itm" v-for="(v,i) in dataList" :key="i">
<view class="ico">
<image src="../../static/FamousArts/redStart.png"></image>
</view>
<view class="con">
{{v.userName}}
</view>
<view class="works" @click="unFollow()">
已关注
</view>
</view>
</view>
<u-popup :show="showStar" @close="close" closeOnClickOverlay mode="center" :round="5">
<view style="padding: 100rpx 100rpx 40rpx 100rpx;">
<text>确认取消关注</text>
</view>
<view style="width: 100%;">
<u-button text="再想想" @click="close" class="custom-style"></u-button>
<u-button type="error" text="取消关注" @click="sureUnF()" class="custom-style"></u-button>
</view>
</u-popup>
</view>
</view>
</template>
<script>
export default {
data() {
return {
showStar:false,
load: true,
fans:'',
care:'',
dataList:[],
pages: 1,
size: 20,
tab: 0,
};
},
onShow() {
this.getCareTotal()
this.getCare()
},
methods: {
//
getCareTotal(){
this.http.request('/userFollow/myFollow', {page:this.pages,size:this.size}, "GET").then(res => {
if (res.code == 200) {
this.care = res.data.total
this.getFansTotal()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getFansTotal(){
this.http.request('/userFollow/myFans', {page:this.pages,size:this.size}, "GET").then(res => {
if (res.code == 200) {
this.fans = res.data.total
this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getCare(){
this.http.request('/userFollow/myFollow', {page:this.pages,size:this.size}, "GET").then(res => {
if (res.code == 200) {
console.log(res.data)
res.data.records.forEach(function(item){
if(item.images != null && item.images != undefined && item.images != ''){
let img = JSON.parse(item.images)
item.images = img[0]
}
})
this.dataList = res.data.records
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
unFollow(){
this.showStar = true
},
close() {
this.showStar = false
},
sureUnF(){
this.showStar = false
},
toFollow() {
this.tab = 0
this.pages = 1
},
toFans() {
this.tab = 1
this.pages = 1
},
},
}
</script>
<style lang="scss" scoped>
.custom-style {
width: 50%;
float: left;
}
image {
width: 100%;
height: 100%;
}
page {
background-color: #F4F5F7;
}
.tabs{
height: 70rpx;
width: 100%;
margin-bottom: 30rpx;
overflow: hidden;
background-color: #FFFFFF;
.tabBox{
width: 50%;
height: 70rpx;
text-align: center;
line-height: 70rpx;
font-weight: 700;
float: left;
.textBox{
height: 64rpx;
width: 160rpx;
margin-left: calc(50% - 80rpx);
}
.textLine{
height: 6rpx;
width: 60rpx;
margin-left: calc(50% - 30rpx);
background-color: red;
}
}
}
.famous_bot {
padding: 32rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
width: calc(100% - 64rpx);
margin: 24rpx 32rpx 0 32rpx;
box-sizing: border-box;
.famous_bot_itm {
overflow: hidden;
margin-bottom: 12rpx;
.ico {
width: 80rpx;
height: 80rpx;
float: left;
}
.con {
height: 80rpx;
line-height: 80rpx;
margin-left: 16rpx;
font-size: 32rpx;
font-weight: 700;
float: left;
}
.works {
height: 50rpx;
width: 110rpx;
text-align: center;
margin-top: 15rpx;
line-height: 50rpx;
border-radius: 16rpx;
float: right;
color: #A9A9B0;
border: 1px solid #A9A9B0;
border-radius: 20px;
}
}
}
</style>

422
src/pages/my/myWoekList.vue Normal file
View File

@ -0,0 +1,422 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="famous_arts" v-if="load == false">
<view class="ding">
<view class="top">
<view class="left">
<view class="avator">
<image :src="userImg"></image>
</view>
<view class="people">
<view class="art_name">
{{userName}}
</view>
</view>
</view>
</view>
</view>
<view class="famous_bot">
<u-empty v-if="workList.length < 1" mode="data" icon="../../static/orderE.png"
style="margin-top: 120px;">
</u-empty>
<view class="art_item" v-for="(v, i) in workList" :key="i">
<view class="art_item_top">
<image :src="v.file" mode="" @click="toDetail(v.id)"></image>
</view>
<view class=" art_item_bott">
<view class="title" @click="toDetail(v.id)">
{{ v.name }}
</view>
<view class="img_box">
<view class=" puber">
<view class="autor">
{{ v.type }}作品
</view>
</view>
<view class="time">
{{ v.createdAt }}
</view>
</view>
<view class="sub_title">
<view class="tag" v-for="(a,b) in v.workTag" :key="b">
{{a}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
id: "1",
userId: '',
buyType: '',
list1: [],
userImg: '',
userName: '',
workList: [],
pages: 1,
size: 20,
lineBg: '../../static/scrollLine.png',
};
},
onLoad(option) {
this.userId = option.id
this.userImg = option.userImg
this.userName = option.userName
},
//
onPullDownRefresh() {
this.pages = 1
this.getData()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getMoreData();
},
onShow() {
this.pages = 1
this.getType()
},
methods: {
//
getType() {
let _this = this
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
if (res.code == 200) {
res.data.forEach(function(item) {
_this.list1.push({
name: item.label,
value: item.value
})
})
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getData() {
let _this = this
this.http.request('/user/details', {
page: this.pages,
size: this.size,
id: this.userId,
buyType: this.buyType
}, "GET").then(res => {
if (res.code == 200) {
_this.workList = res.data.records
_this.workList.forEach(function(item) {
if (item.user.images != undefined) {
let img = JSON.parse(item.user.images)
item.user.images = img[0]
}
//
if (item.type != undefined) {
_this.list1.forEach(function(ele) {
if (item.type == ele.value) {
item.type = ele.name
}
})
}
//
if (item.file != undefined) {
let fileArr = item.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
item.file = fileArr[0]
} else if (gs == 'pdf') {
item.file = '../../static/fileImg/pdfS.png'
}
}
})
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getMoreData() {
const _this = this
this.http.request('/works/list', {
page: this.pages,
size: this.size,
id: this.userId,
buyType: this.buyType
}, "GET").then(res => {
if (res.data.records.length > 0) {
res.data.records.forEach(function(item) {
if (item.user.images != undefined) {
let img = JSON.parse(item.user.images)
item.user.images = img[0]
}
//
if (item.type != undefined) {
_this.list1.forEach(function(ele) {
if (item.type == ele.value) {
item.type = ele.name
}
})
}
//
if (item.file != undefined) {
let fileArr = item.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.file = fileArr[0]
} else if (gs == 'pdf') {
item.file = '../../static/fileImg/pdfS.png'
}
}
_this.workList.push(item)
})
} else {
this.pages--
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
toDetail(val){
uni.navigateTo({
url: "/pages/my/myWorkDetail?id=" + val
})
}
},
}
</script>
<style lang="scss">
image {
width: 100%;
height: 100%;
}
/deep/ .u-tabs__wrapper__nav__item__text {
font-size: 28rpx;
}
/deep/ .u-tabs__wrapper__nav__line {
height: 14px !important;
width: 40px !important;
// background-image: url(../../static/scrollLine.png);
background-color: transparent !important;
bottom: 2px !important;
}
page {
background-color: #F4F5F7;
}
.ding {
background-color: #FFFFFF;
border: 1px solid transparnt;
padding: 32rpx;
.top {
border: 1px solid transparnt;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
.left {
display: flex;
align-items: center;
.avator {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
overflow: hidden;
}
.people {
margin-left: 16rpx;
.art_name {
font-weight: 600;
color: #000000;
font-size: 40rpx;
}
.aer_Staff {
margin-top: 16rpx;
color: #000000;
font-size: 32rpx;
}
}
}
.talk {
border: 1px solid #99241B;
font-size: 24rpx;
font-weight: 600;
border-radius: 10rpx;
color: #99241B;
display: flex;
align-items: center;
justify-content: center;
padding: 16rpx;
box-sizing: border-box;
.concat_ico {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
}
}
.famous_bot {
padding: 32rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
width: calc(100% - 64rpx);
margin: 24rpx 32rpx;
box-sizing: border-box;
.art_item {
margin-top: 16px;
border: 1px solid transparent;
.art_item_top {
position: relative;
height: 192px;
overflow: hidden;
border-radius: 8px;
.like {
position: absolute;
top: calc(100% - 40px);
left: calc(100% - 70px);
width: 59px;
height: 32px;
background: rgba(38, 18, 18, 0.27);
z-index: 10;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
.img {
width: 16px;
height: 16px;
background: url(../../static/spaceHeart.png) center/100% no-repeat;
float: left;
}
.img_selected {
width: 16px;
height: 16px;
background: url(../../static/redHerart.png) center/100% no-repeat;
float: left;
}
.select_num {
float: left;
margin-left: 10rpx;
color: #fff;
}
}
}
.select_num {
float: left;
margin-left: 10rpx;
color: #fff;
}
}
.art_item_bott {
.title {
margin-top: 12px;
font-size: 16px;
font-weight: 600;
color: #251B1D;
}
.sub_title {
font-size: 12px;
color: #AFADB0;
height: 18px;
margin-top: 2px;
margin-bottom: 6px;
.tag{
width: 80rpx;
text-align: center;
border: 1rpx solid #AFADB0;
border-radius: 20px;
float: left;
margin: 0 10rpx;
}
}
.img_box {
margin-top: 12px;
display: flex;
justify-content: space-between;
align-items: center;
.puber {
display: flex;
align-items: center;
.avtor {
border-radius: 12px;
overflow: hidden;
width: 24px;
height: 24px;
margin-right: 4px;
}
.autor {
color: #251B1D;
font-size: 12px;
}
}
.time {
color: #AFADB0;
font-size: 12px;
}
}
}
}
</style>

View File

@ -0,0 +1,364 @@
<template>
<view style="height: 100%;width: 100%;">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="workDetail" v-if="load == false">
<!-- 轮播图 -->
<u-swiper v-if="list.length > 0" :list="list" :autoplay="true" @change="e => currentNum = e.current" indicatorStyle="right: 20px">
<view slot="indicator" class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ list.length }}</text>
</view>
</u-swiper>
<!-- 作品名称 -->
<view class="work_name">
{{detailData.name}}
</view>
<!-- 作品描述 -->
<view class="work_desc">
{{detailData.introduce}}
</view>
<!-- 作品上传时间浏览量类型 -->
<view class="work_det">
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/time.png" class="img"></image>
</view>
<view class="box_right">
{{detailData.createdAt}}
</view>
</view>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/seen.png" class="img"></image>
</view>
<view class="box_right">
{{detailData.views}}浏览
</view>
</view>
<view class="det_box">
<view class="box_right">
类型:
</view>
<view class="box_right">
{{detailData.type}}
</view>
</view>
</view>
<!-- 作品点赞收藏数量-->
<view class="work_det">
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/heart2.png" class="img"></image>
</view>
<view class="box_right">
{{detailData.likes}}点赞
</view>
</view>
<view class="det_box">
<view class="box_left">
<image src="../../static/workDetail/star2.png" class="img"></image>
</view>
<view class="box_right">
{{detailData.collections}}收藏
</view>
</view>
</view>
<!-- 附带文件 -->
<view class="file_box" v-for="(item,index) in list2" :key="index" @click="downLoad(item.url)">
<view class="file_box_left">
<image :src="item.img" class="file_box_left_img"></image>
</view>
<view class="file_box_right">
<view class="file_box_name">
{{item.name}}
</view>
</view>
</view>
<!-- 底部点赞收藏 -->
<view class="detailBottom">
<view class="bottom_box">
<u-button type="primary" icon="edit-pen" text="编辑作品" @click="editWork()"></u-button>
</view>
<view class="bottom_box">
<u-button type="error" icon="trash" text="删除作品" @click="delWork()"></u-button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
list: [],
list1: [],
list2: [],
currentNum: 0,
isLick: 0,
isCon: 0,
id: '',
iswx: 0,
detailData: {},
contractUrl: '',
}
},
onLoad(op) {
this.id = op.id
},
onShow() {
this.getType()
},
onReady() {
// this.load = false
// #ifdef MP-WEIXIN
this.iswx = 0
// #endif
// #ifndef MP-WEIXIN
//
this.iswx = 1
// #endif
},
methods: {
//
getType() {
let _this = this
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
if (res.code == 200) {
res.data.forEach(function(item) {
_this.list1.push({
name: item.label,
value: item.value
})
})
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getData() {
let _this = this
this.list = []
this.http.request('/works/details', {
id: this.id
}, "GET").then(res => {
if (res.code == 200) {
//
if (res.data.type != undefined) {
_this.list1.forEach(function(ele) {
if (res.data.type == ele.value) {
res.data.type = ele.name
}
})
}
//
if (res.data.file != undefined) {
let fileArr = res.data.file.split(',')
fileArr.forEach(function(item) {
let gs = item.substr(item.lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
_this.list.push(item)
} else if (gs == 'pdf') {
_this.list2.push({
name: res.data.name + '.' + gs,
img: '../../static/fileImg/pdfS.png',
url: item,
})
}
})
}
this.detailData = res.data
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
delWork(){
this.http.request('/works/delete?id=' + this.id, "POST").then(res => {
if (res.code == 200) {
uni.navigateBack()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
editWork(){
uni.navigateTo({
url: "/pages/my/editWork?data=" + encodeURIComponent(JSON.stringify(this.detailData))
})
},
//
downLoad(val) {
this.contractUrl = val
if(this.iswx == 0){
this.openPDF()
}else if(this.iswx == 1){
uni.navigateTo({
url: "./webView?url=" + this.contractUrl
})
}
},
openPDF() {
switch (uni.getSystemInfoSync().platform) {
case "android":
console.log("安卓");
//
this.androidOpenPdf(this.contractUrl);
break;
case "ios":
console.log("IOS");
//web-view
uni.navigateTo({
url: "./webView?url=" + this.contractUrl,
});
break;
default:
this.androidOpenPdf(this.contractUrl);
break;
}
}
}
}
</script>
<style lang="scss">
.workDetail {
position: relative;
width: 100%;
height: 100%;
.indicator-num {
padding: 2px 0;
background-color: rgba(0, 0, 0, 0.35);
border-radius: 100px;
width: 35px;
@include flex;
justify-content: center;
&__text {
color: #FFFFFF;
font-size: 12px;
}
}
.work_name {
width: 94%;
margin: 10px 3%;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #251B1D;
}
.work_desc {
width: 94%;
margin: 10px 3%;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #251B1D;
}
.work_det {
width: 94%;
margin: 10px 3%;
height: 17px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #AFADB0;
line-height: 17px;
overflow: hidden;
.det_box {
float: left;
margin-right: 20px;
overflow: hidden;
.box_left {
width: 16px;
height: 16px;
float: left;
.img {
width: 100%;
height: 100%;
}
}
.box_right {
margin-left: 2px;
float: left;
}
}
}
.file_box {
width: 92%;
height: 64px;
margin: 10px 4%;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #251B1D;
background: #F4F5F7;
border-radius: 6px;
overflow: hidden;
.file_box_left {
width: 40px;
height: 40px;
margin-top: 12px;
margin-left: 12px;
float: left;
.file_box_left_img {
width: 40px;
height: 40px;
}
}
.file_box_right {
margin-left: 20px;
float: left;
.file_box_name {
height: 64px;
line-height: 64px;
font-size: 16px;
font-weight: 600;
color: #251B1D;
}
}
}
.detailBottom {
position: absolute;
width: 100%;
bottom: 5px;
.bottom_box {
width: calc(50% - 10px);
margin: 0 5px;
float: left;
}
}
}
</style>

480
src/pages/my/myWorks.vue Normal file
View File

@ -0,0 +1,480 @@
<template>
<view class="">
<view class="">
<u-loading-page :loading="load"></u-loading-page>
</view>
<view class="famous_arts" v-if="load == false">
<view class="ding">
<view class="top">
<view class="left">
<view class="avator">
<image :src="userImg"></image>
</view>
<view class="people">
<view class="art_name">
{{userName}}
</view>
</view>
</view>
<view class="talk" @click="goFollow()">
关注
</view>
</view>
</view>
<view class="famous_bot">
<u-empty v-if="workList.length < 1" mode="data" icon="../../static/orderE.png"
style="margin-top: 120px;">
</u-empty>
<view class="art_item" v-for="(v, i) in workList" :key="i">
<view class="art_item_top">
<image :src="v.file" mode="" @click="toDetail(v.id,v.goodsId)"></image>
<view class="like" @click="like(v.id, v.isGreat)">
<view :class="v.isGreat ? 'img_selected' : 'img'">
<!-- 红心 -->
</view>
<view class="select_num">
{{ v.likes }}
</view>
</view>
</view>
<view class=" art_item_bott">
<view class="title" @click="toDetail(v.id,v.goodsId)">
{{ v.name }}
</view>
<view class="img_box">
<view class=" puber">
<view class="autor">
{{ v.type }}作品
</view>
</view>
<view class="time">
{{ v.createdAt }}
</view>
</view>
<view class="sub_title">
<view class="tag" v-for="(a,b) in v.workTag" :key="b">
{{a}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
load: true,
id: "1",
userId: '',
buyType: '',
list1: [],
userImg: '',
userName: '',
workList: [],
pages: 1,
size: 20,
lineBg: '../../static/scrollLine.png',
};
},
onLoad(option) {
this.userId = option.id
this.userImg = option.userImg
this.userName = option.userName
},
//
onPullDownRefresh() {
this.pages = 1
this.getData()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
//
onReachBottom() {
this.pages++
this.getMoreData();
},
onShow() {
this.pages = 1
this.getType()
},
methods: {
//
getType() {
let _this = this
this.http.request('/works/select?code=work_type', {}, "GET").then(res => {
if (res.code == 200) {
res.data.forEach(function(item) {
_this.list1.push({
name: item.label,
value: item.value
})
})
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getData() {
let _this = this
this.http.request('/user/details', {
page: this.pages,
size: this.size,
id: this.userId,
buyType: this.buyType
}, "GET").then(res => {
if (res.code == 200) {
_this.workList = res.data.records
_this.workList.forEach(function(item) {
if (item.user.images != undefined) {
let img = JSON.parse(item.user.images)
item.user.images = img[0]
}
//
if (item.type != undefined) {
_this.list1.forEach(function(ele) {
if (item.type == ele.value) {
item.type = ele.name
}
})
}
//
if (item.file != undefined) {
let fileArr = item.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs ==
'gif' || gs == 'tif' || gs == 'tiff') {
item.file = fileArr[0]
} else if (gs == 'pdf') {
item.file = '../../static/fileImg/pdfS.png'
}
}
})
_this.load = false
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
getMoreData() {
const _this = this
this.http.request('/works/list', {
page: this.pages,
size: this.size,
id: this.userId,
buyType: this.buyType
}, "GET").then(res => {
if (res.data.records.length > 0) {
res.data.records.forEach(function(item) {
if (item.user.images != undefined) {
let img = JSON.parse(item.user.images)
item.user.images = img[0]
}
//
if (item.type != undefined) {
_this.list1.forEach(function(ele) {
if (item.type == ele.value) {
item.type = ele.name
}
})
}
//
if (item.file != undefined) {
let fileArr = item.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.file = fileArr[0]
} else if (gs == 'pdf') {
item.file = '../../static/fileImg/pdfS.png'
}
}
_this.workList.push(item)
})
} else {
this.pages--
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
},
//
like(val1, val2) {
if (val2) {
this.http.request('/worksGreat/delGreat?type=1&workId=' + val1, "POST").then(res => {
if (res.code == 200) {
this.pages = 1
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
} else {
this.http.request('/worksGreat/addGreat?type=1&workId=' + val1, "POST").then(res => {
if (res.code == 200) {
this.pages = 1
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
//
toDetail(val1,val2){
if(val2 != null){
uni.navigateTo({
url: "/pages/OrderDetail/OrderDetail?id=" + val2
})
}else{
uni.navigateTo({
url: "/pages/ArtWorks/artWorkDetail?id=" + val1
})
}
},
goFollow(){
this.http.request('/userFollow/addFollow?writerId=' + this.userId, "GET").then(res => {
if (res.code == 200) {
this.pages = 1
this.getData()
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
},
}
</script>
<style lang="scss">
image {
width: 100%;
height: 100%;
}
/deep/ .u-tabs__wrapper__nav__item__text {
font-size: 28rpx;
}
/deep/ .u-tabs__wrapper__nav__line {
height: 14px !important;
width: 40px !important;
// background-image: url(../../static/scrollLine.png);
background-color: transparent !important;
bottom: 2px !important;
}
page {
background-color: #F4F5F7;
}
.ding {
background-color: #FFFFFF;
border: 1px solid transparnt;
padding: 32rpx;
.top {
border: 1px solid transparnt;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
.left {
display: flex;
align-items: center;
.avator {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
overflow: hidden;
}
.people {
margin-left: 16rpx;
.art_name {
font-weight: 600;
color: #000000;
font-size: 40rpx;
}
.aer_Staff {
margin-top: 16rpx;
color: #000000;
font-size: 32rpx;
}
}
}
.talk {
border: 1px solid #99241B;
font-size: 24rpx;
font-weight: 600;
border-radius: 60rpx;
color: #99241B;
display: flex;
align-items: center;
justify-content: center;
padding: 12rpx 24rpx;
box-sizing: border-box;
.concat_ico {
width: 32rpx;
height: 32rpx;
margin-right: 8rpx;
}
}
}
}
.famous_bot {
padding: 32rpx;
border-radius: 16rpx;
background-color: #FFFFFF;
width: calc(100% - 64rpx);
margin: 24rpx 32rpx;
box-sizing: border-box;
.art_item {
margin-top: 16px;
border: 1px solid transparent;
.art_item_top {
position: relative;
height: 192px;
overflow: hidden;
border-radius: 8px;
.like {
position: absolute;
top: calc(100% - 40px);
left: calc(100% - 70px);
width: 59px;
height: 32px;
background: rgba(38, 18, 18, 0.27);
z-index: 10;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
.img {
width: 16px;
height: 16px;
background: url(../../static/spaceHeart.png) center/100% no-repeat;
float: left;
}
.img_selected {
width: 16px;
height: 16px;
background: url(../../static/redHerart.png) center/100% no-repeat;
float: left;
}
.select_num {
float: left;
margin-left: 10rpx;
color: #fff;
}
}
}
.select_num {
float: left;
margin-left: 10rpx;
color: #fff;
}
}
.art_item_bott {
.title {
margin-top: 12px;
font-size: 16px;
font-weight: 600;
color: #251B1D;
}
.sub_title {
font-size: 12px;
color: #AFADB0;
height: 18px;
margin-top: 2px;
margin-bottom: 6px;
.tag{
width: 80rpx;
text-align: center;
border: 1rpx solid #AFADB0;
border-radius: 20px;
float: left;
margin: 0 10rpx;
}
}
.img_box {
margin-top: 12px;
display: flex;
justify-content: space-between;
align-items: center;
.puber {
display: flex;
align-items: center;
.avtor {
border-radius: 12px;
overflow: hidden;
width: 24px;
height: 24px;
margin-right: 4px;
}
.autor {
color: #251B1D;
font-size: 12px;
}
}
.time {
color: #AFADB0;
font-size: 12px;
}
}
}
}
</style>

View File

@ -306,8 +306,12 @@
url: "/pages/ArtWorks/artWorkDetail?id=" + val
})
},
//
goActDeat(index){
console.log(index)
// uni.showToast({
// title: '',
// icon: "none",
// });
uni.navigateTo({
url:`/pages/ActivitiesDetail/ActivitiesDetail?id=${index}`
})

View File

@ -0,0 +1,20 @@
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: '',
};
},
onLoad(params){
console.log(params)
let {url} = params
this.url = `../../../static/pdf/pdf.html?url=${url}`
},
}
</script>

View File

@ -10,13 +10,13 @@
</view>
<view class="search_box">
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
v-model="artValue" placeholder="请输入名家名称" @search='search'></u-search>
<view class="car_box">
v-model="artValue" placeholder="请输入商品名称" @search='search'></u-search>
<view class="car_box" @click="toCart">
<image src="../../static/shop/car.png" mode=""></image>
</view>
</view>
<u-tabs :scrollable="false" :list="list1" :activeStyle="{
<u-tabs :scrollable="false" @click="clickTabs" :list="list1" :activeStyle="{
color: '#251B1D',
fontWeight: 'bold',
transform: 'scale(1.05)'
@ -24,34 +24,35 @@
color: '#AFADB0 ',
transform: 'scale(1)'
}" itemStyle=" height: 50px; ">
<view slot="right" class="filter_icon" style="width: 40rpx; height: 40rpx; flex-shrink: 0;"
<view slot="right" :class="fil == 0?'filter_icon':'filter_icon_red'"
@click="Clickfilter">
<image src="../../static/shop/filter.png" mode=""></image>
<!-- <image src="../../static/shop/filter.png" mode=""></image> -->
<text>销量</text>
</view>
</u-tabs>
<view class="artworks">
<view class="art_item" v-for="(v,i) in workList" :key="i" @click="goOrderDet(i)">
<u-empty v-if="workList.length < 1" icon="http://cdn.uviewui.com/uview/empty/data.png">
</u-empty>
<view class="art_item" v-for="(v,i) in workList" :key="i" @click="goOrderDet(v.id)">
<view class="art_item_top">
<image src="../../static/shop/picture.png" mode=""></image>
<image :src="v.domainInfo.file" mode=""></image>
</view>
<view class=" art_item_bott">
<view class="title">
摄影作品自由生活向美而生作品
{{v.domainInfo.name}}
</view>
<view class="img_box">
<view class=" puber">
<view class="txt">
<text class="txt1">100</text> <text>积分</text>
<view class="txt" v-if="v.moneyPrice > 0">
<text class="txt1">{{v.moneyPrice}}</text> <text></text>
</view>
<view class="txt" v-else>
<text class="txt1">{{v.pointPrice}}</text> <text>积分</text>
</view>
</view>
<view class="time">
12人已购
{{v.sellCount}}人已购
</view>
</view>
@ -80,6 +81,8 @@
}],
pages: 1,
size: 20,
fil: 0,
orderBy: '',
lineBg: '../../static/scrollLine.png',
};
},
@ -140,18 +143,23 @@
page: this.pages,
size: this.size,
name: this.artValue,
type: this.type
type: this.type,
orderBy: this.orderBy
}, "GET").then(res => {
if (res.code == 200) {
console.log(res.data)
_this.load = false
res.data.records.forEach(function(item) {
if (item.domainInfo.file != undefined) {
let fileArr = item.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.domainInfo.file = '../../static/fileImg/pdfS.png'
}
}
})
this.workList = res.data.records
// res.data.forEach(function(item) {
// _this.list1.push({
// name: item.label,
// value: item.value
// })
// })
_this.load = false
}
}).catch(e => {
uni.showToast({
@ -160,19 +168,32 @@
});
})
},
//
//
getMoreData() {
let _this = this
this.http.request('/goods/list', {
page: this.pages,
size: this.size,
name: this.artValue,
type: this.type
type: this.type,
orderBy: this.orderBy
}, "GET").then(res => {
if (res.code == 200) {
res.data.records.forEach(function(item) {
if (item.domainInfo.file != undefined) {
let fileArr = item.domainInfo.file.split(',')
let gs = fileArr[0].substr(fileArr[0].lastIndexOf(".") + 1)
if (gs == 'jpg' || gs == 'jpeg' || gs == 'png' || gs == 'bmp' || gs == 'gif' || gs == 'tif' || gs == 'tiff') {
item.domainInfo.file = fileArr[0]
} else if (gs == 'pdf') {
item.domainInfo.file = '../../static/fileImg/pdfS.png'
}
}
_this.workList.push(item)
})
if(res.data.records.length == 0){
this.pages--
}
}
}).catch(e => {
uni.showToast({
@ -192,12 +213,27 @@
this.getData()
},
Clickfilter() {
console.log("触发筛选");
if(this.fil == 0){
this.fil = 1
this.orderBy = 'count'
this.pages = 1
this.getData()
}else if(this.fil == 1){
this.fil = 0
this.orderBy = ''
this.pages = 1
this.getData()
}
},
goOrderDet(id) {
uni.navigateTo({
url: `/pages/OrderDetail/OrderDetail?id=${id}`
})
},
toCart() {
uni.navigateTo({
url: '/pages/ShoppingCart/ShoppingCart'
})
}
}
}
@ -238,7 +274,28 @@
height: 100%;
}
.filter_icon{
width: 80rpx;
height: 40rpx;
text-align: center;
background-color: #F4F5F7;
border: 1rpx solid #AFADB0;
border-radius: 20px;
flex-shrink: 0;
}
.filter_icon_red{
width: 80rpx;
height: 40rpx;
text-align: center;
color: #99241B;
background-color: #F4F5F7;
border: 1rpx solid #99241B;
border-radius: 20px;
flex-shrink: 0;
}
.artworks {
margin-bottom: 60px;
.art_item {
margin-top: 16px;

View File

@ -5,7 +5,7 @@
export default {
config: {
// baseUrl: "http://192.168.0.57:8090/h5/api", //王锡
// baseUrl: "http://192.168.0.57:8080/h5/api", //王锡
// baseUrl: "http://192.168.124.110:8088/api", //周源
baseUrl: "http://192.168.0.29:8080/h5/api", //俞燕红
// baseUrl: "https://wlsq.ydool.com.cn/api", //线上

113
src/static/pdf/pdf.html Normal file
View File

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<title>详情</title>
<link rel="stylesheet" href="./pdf/style.css" />
<link rel="stylesheet" href="./pdf/pdfh5.css" />
<style>
html,body {
width: 100%;
height: 100%;
}
.operate {
position: fixed;
bottom: 20px;
right: 20px;
width: 100px;
padding: 5px;
display: flex;
background-color: rgba(0,0,0,0.1);
border-radius: 5px;
z-index: 9999;
}
#up .img,#down .img {
width:20px;
height:20px;
}
#number {
width:50px;
text-align:center;
}
#down {
margin-left:10px;
}
</style>
</head>
<body>
<div class="operate">
<div id="up"><image class="img" src="dit-images/big.png"></image></div>
<div id="number">100</div>
<div>%</div>
<div id="down"><image class="img" src="dit-images/small.png"></image></div>
</div>
<div id="pdf-view"></div>
<script src="./pdf/pdf.js"></script>
<script src="./pdf/pdf.worker.js"></script>
<script src="./pdf/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
<script src="./pdf/pdfh5.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
var pdfh5;
$(function() {
$("#pdf-view").show()
var url = getQuery('url');
pdfh5 = new Pdfh5('#pdf-view', {
pdfurl: url,
lazy:true,
renderType:'svg',
URIenable:true //开启浏览器地址栏file参数获取
});
//pdf准备开始渲染此时可以拿到pdf总页数
pdfh5.on("ready", function() {
console.log("pdf准备开始渲染总页数" + this.totalNum)
})
//监听pdf渲染成功
pdfh5.on("success", function(time) {
time = time / 1000
console.log("pdf渲染完成总耗时" + time + "秒");
})
})
function getQuery(name) {
// 正则:[找寻'&' + 'url参数名字' = '值' + '&']'&'可以不存在)
let reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
let r = window.location.search.substr(1).match(reg);
if(r != null) {
// 对参数值进行解码
return decodeURIComponent(r[2]);
}
return null;
}
let count = 100;
$('#up').click(function() {
var div = $('.pdfjs .pdfViewer .pageContainer img')
var width = div.width();
var add = width / 10;
count += 10;
div.width(width + add)
$('#number').text(count);
})
$('#down').click(function() {
var div = $('.pdfjs .pdfViewer .pageContainer img')
var width = div.width();
var add = width / 10;
count -= 10;
div.width(width - add)
$('#number').text(count);
})
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

11
src/static/pdf/pdf/pdf.js Normal file

File diff suppressed because one or more lines are too long

25
src/static/pdf/pdf/pdf.worker.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2010
src/static/pdf/pdf/pdfh5.js Normal file

File diff suppressed because it is too large Load Diff

1242
src/static/pdf/pdf/style.css Normal file

File diff suppressed because it is too large Load Diff