提交 516fc5f3 作者: wk

访客测试问题修改

父级 8e6f7af1
...@@ -119,6 +119,16 @@ const params = { ...@@ -119,6 +119,16 @@ const params = {
url: '/score/web/v1/integral/shop_mall_list', url: '/score/web/v1/integral/shop_mall_list',
method: 'get' method: 'get'
}, },
// 确认领取
confirmReceive: {
url: '/score/api/v1/labour/confirm_receive',
method: 'put'
},
// 取消兑换
cancelExchange: {
url: '/score/api/v1/labour/cancel_receive',
method: 'put'
},
// 兑换 // 兑换
exchangeGood: { exchangeGood: {
url: '/score/api/v1/labour/exchange_goods', url: '/score/api/v1/labour/exchange_goods',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="tabbar-container" :class="isIpx?'IpxBot':''"> <view class="tabbar-container" :class="isIpx?'IpxBot':''">
<view class="tabbar-item" v-for="(item,index) in tabList" :class="[item.centerItem ? 'center-item' : '']" <view class="tabbar-item" v-for="(item,index) in tabList" :class="[item.centerItem ? 'center-item' : '']"
@click="changeItem(item)" :key="index"> @click="changeItem(item)" :key="index">
<view class="item-top" :style="{padding: item.id == 2?0:'10rpx'}"> <view class="item-top" :style="{padding: item.id == 4?0:'10rpx'}">
<image :src="tabId==item.id?item.selectIcon:item.icon"></image> <image :src="tabId==item.id?item.selectIcon:item.icon"></image>
</view> </view>
<view class="item-bottom" :class="[tabId==item.id ? 'item-active' : '']"> <view class="item-bottom" :class="[tabId==item.id ? 'item-active' : '']">
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
.tabbar-container .tabbar-item .item-top { .tabbar-container .tabbar-item .item-top {
width: 70rpx; width: 70rpx;
height: 70rpx; height: 70rpx;
padding: 5rpx; /* padding: 5rpx; */
} }
.tabbar-container .center-item .item-top { .tabbar-container .center-item .item-top {
......
...@@ -540,7 +540,7 @@ ...@@ -540,7 +540,7 @@
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app", "navigationBarTitleText": "智慧工地一点通",
"navigationBarBackgroundColor": "#3B73FE", "navigationBarBackgroundColor": "#3B73FE",
"backgroundColor": "#3B73FE" "backgroundColor": "#3B73FE"
}, },
......
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
}, },
pageTemplateComponent: [], pageTemplateComponent: [],
isWeatherShow: true, isWeatherShow: true,
role: "VISITOR", role: "",
nowTime: "", nowTime: "",
project: {}, project: {},
project_id: "", project_id: "",
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
<text class="text">{{dealTitle(newDetail.title) }}</text> <text class="text">{{dealTitle(newDetail.title) }}</text>
</view> </view>
<view class="author-content"> <view class="author-content">
<text class="text">{{newDetail.updateUserName}}</text> <text class="text">{{newDetail.createdUserName}}</text>
<text class="text" style="margin-left: 30rpx;">{{newDetail.articleTime}}</text> <text class="text" style="margin-left: 30rpx;">{{newDetail.articleTime}}</text>
</view> </view>
<image :src="newDetail.articleImg" class="image"></image> <image :src="newDetail.articleImg" class="image" v-if="newDetail.articleImg"></image>
<view class="text-content"> <view class="text-content">
<rich-text :nodes="newDetail.content" style="font-size: 28rpx;color: #333;"></rich-text> <rich-text :nodes="newDetail.content" style="font-size: 28rpx;color: #333;"></rich-text>
</view> </view>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<view v-for="(item,index) in list" :key="index" class="list-item" @click="toLinkDetail(item)"> <view v-for="(item,index) in list" :key="index" class="list-item" @click="toLinkDetail(item)">
<view class="new-content"> <view class="new-content">
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="user">{{item.updateUserName}} {{item.articleTime}}</view> <view class="user">{{item.createdUserName}} {{item.articleTime}}</view>
</view> </view>
<image class="image" :src="dealImage(item.coverImg)"></image> <image class="image" :src="dealImage(item.coverImg)"></image>
</view> </view>
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
export default { export default {
data() { data() {
return { return {
list: [{}], list: [],
newDetail: { newDetail: {
title: "关于食堂发放免费午餐的消息通知息通知", title: "",
updateUserName: "张三", updateUserName: "",
articleTime: "2022/12/14 16:52:56", articleTime: "",
content: "由于工人数量大、居住集中等原因,工地防疫一度是各地面对的难题。此前,不同地区都要求进工地的建筑工人或一天一检,或两天一检,比一般社会面更严格。工地上中老年人多。 在某东部省会工作的基层干部周楠曾负责协调、 监督一些工地与医院对接做核酸。 她注意到, 工地上有一些“ 50 后” 的农民工, 他们没有智能手机, 做核酸时无法扫码, 只能出示身份证。 " content: ""
}, },
id: "", id: "",
text: "" text: ""
...@@ -85,7 +85,8 @@ ...@@ -85,7 +85,8 @@
getNewDetail() { getNewDetail() {
Api.getNewDetail({ Api.getNewDetail({
data: { data: {
articleLibraryId: this.id articleLibraryId: this.id,
projectId: uni.getStorageSync("project_id") || ""
} }
}).then((result) => { }).then((result) => {
if (result.code == 0) { if (result.code == 0) {
...@@ -135,7 +136,7 @@ ...@@ -135,7 +136,7 @@
font-weight: 600; font-weight: 600;
font-size: 28rpx; font-size: 28rpx;
width: 420rpx; width: 420rpx;
text-align: center; text-align: left;
color: #333; color: #333;
} }
} }
...@@ -203,6 +204,7 @@ ...@@ -203,6 +204,7 @@
display: flex; display: flex;
width: 420rpx; width: 420rpx;
margin: 15px; margin: 15px;
justify-content: flex-start;
flex-direction: column; flex-direction: column;
.title { .title {
...@@ -217,7 +219,7 @@ ...@@ -217,7 +219,7 @@
.user { .user {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
margin-top: 10rpx; margin-top: 20rpx;
color: #999; color: #999;
} }
} }
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
.user { .user {
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 24rpx;
margin-top: 10rpx; margin-top: 20rpx;
color: #999; color: #999;
} }
} }
......
<template> <template>
<view class="history-score"> <view class="history-score">
<titleBar title="兑换历史"></titleBar> <titleBar title="兑换历史"></titleBar>
<v-tabs :tabs="tabs" :scroll="false" :value="current" @change="tabChange"></v-tabs>
<view class="order-content" @click="orderSearch"> <view class="order-content" @click="orderSearch">
<text class="text">时间排序</text> <text class="text">时间排序</text>
<image :src="arrowIcon" class="image"></image> <image :src="arrowIcon" class="image"></image>
...@@ -14,6 +15,14 @@ ...@@ -14,6 +15,14 @@
<view class="score">{{item.order_integral}}积分</view> <view class="score">{{item.order_integral}}积分</view>
</view> </view>
<view class="time-content">兑换时间:{{item.ex_time}}</view> <view class="time-content">兑换时间:{{item.ex_time}}</view>
<view class="oper-btn" v-if="current==0">
<view class="cancel" @click="cancelChange(item)">
<view class="text-btn">取消兑换</view>
</view>
<view class="sure" @click="sureChange(item)">
<view class="text-btn">确认领取</view>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -25,6 +34,7 @@ ...@@ -25,6 +34,7 @@
export default { export default {
data() { data() {
return { return {
tabs: ["已兑换", "已领取"],
userInfo: {}, userInfo: {},
project: {}, project: {},
requestParam: { requestParam: {
...@@ -35,6 +45,7 @@ ...@@ -35,6 +45,7 @@
changeRecords: [], changeRecords: [],
order: "desc", order: "desc",
arrowIcon: "../../../static/icon_drop_arrow.png", arrowIcon: "../../../static/icon_drop_arrow.png",
current: 0
} }
}, },
onShow() { //监听页面显示 onShow() { //监听页面显示
...@@ -54,6 +65,61 @@ ...@@ -54,6 +65,61 @@
// console.log('scoreDetail.listData=',this.scoreDetail.listData); // console.log('scoreDetail.listData=',this.scoreDetail.listData);
}, },
methods: { methods: {
cancelChange(item) {
uni.showModal({
title: '提示',
content: '是否取消兑换',
success: (res) => {
if (res.confirm) {
Api.cancelExchange({
data: {
order_id: item.order_id,
worker_id: this.requestParam.worker_id
}
}).then(res => {
if (res.code === 0) {
uni.showToast({
title: '取消兑换成功'
})
this.getChangeRecord()
}
})
} else if (res.cancel) {
}
}
})
},
sureChange(item) {
uni.showModal({
title: '提示',
content: '是否确认领取',
success: (res) => {
if (res.confirm) {
Api.confirmReceive({
data: {
order_id: item.order_id,
worker_id: this.requestParam.worker_id
}
}).then(res => {
if (res.code === 0) {
uni.showToast({
title: '领取成功'
})
this.getChangeRecord()
}
})
} else if (res.cancel) {
}
}
})
},
tabChange(e) {
this.current = e
this.page = 1
this.getChangeRecord()
},
orderSearch() { orderSearch() {
if (this.order == 'desc') { if (this.order == 'desc') {
this.order = 'asc' this.order = 'asc'
...@@ -75,7 +141,7 @@ ...@@ -75,7 +141,7 @@
Api.getExchangeList({ Api.getExchangeList({
data: { data: {
project_id: this.project_id, project_id: this.project_id,
type: 1, type: this.current + 1,
is_page: 0, is_page: 0,
page: 1, page: 1,
page_size: 20, page_size: 20,
...@@ -143,12 +209,13 @@ ...@@ -143,12 +209,13 @@
.good-content { .good-content {
display: flex; display: flex;
flex: 1;
margin-left: 30rpx; margin-left: 30rpx;
flex-direction: column; flex-direction: column;
.title-content { .title-content {
display: flex; display: flex;
margin-top: 30rpx; margin-top: 20rpx;
flex-direction: row; flex-direction: row;
.name { .name {
...@@ -166,13 +233,56 @@ ...@@ -166,13 +233,56 @@
} }
.time-content { .time-content {
margin-top: 30rpx; margin-top: 20rpx;
font-weight: 400; font-weight: 400;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
text-align: center; text-align: left;
color: #999; color: #999;
} }
.oper-btn {
display: flex;
flex-direction: row;
margin-top: 20rpx;
justify-content: flex-end;
align-items: center;
.cancel {
width: 130rpx;
height: 24px;
border-radius: 4px;
display: flex;
border: 1px solid #3B73FE;
background-color: #FFFFFF;
flex-direction: row;
align-items: center;
justify-content: center;
.text-btn {
font-size: 24rpx;
color: #3B73FE;
}
}
.sure {
width: 130rpx;
height: 24px;
border-radius: 4px;
margin-left: 30rpx;
display: flex;
background-color: #3B73FE;
border: 1px solid #3B73FE;
flex-direction: row;
align-items: center;
justify-content: center;
.text-btn {
font-size: 24rpx;
color: #FFF;
}
}
}
} }
} }
} }
......
...@@ -83,6 +83,8 @@ ...@@ -83,6 +83,8 @@
this.requestParam.time = year + '-' + month + '-' + day this.requestParam.time = year + '-' + month + '-' + day
this.requestParam.worker_id = this.userInfo.worker.workerId || '' this.requestParam.worker_id = this.userInfo.worker.workerId || ''
this.requestParam.project_id = this.project_id || '' this.requestParam.project_id = this.project_id || ''
},
onShow() {
this.getGoodsList() this.getGoodsList()
this.getScoreDetail() this.getScoreDetail()
}, },
......

972 Bytes | W: | H:

1.3 KB | W: | H:

static/gzt-ic-sel.png
static/gzt-ic-sel.png
static/gzt-ic-sel.png
static/gzt-ic-sel.png
  • 2-up
  • Swipe
  • Onion skin

865 Bytes | W: | H:

1.3 KB | W: | H:

static/gzt-ic.png
static/gzt-ic.png
static/gzt-ic.png
static/gzt-ic.png
  • 2-up
  • Swipe
  • Onion skin

620 Bytes | W: | H:

1.3 KB | W: | H:

static/homepage-ic-sel.png
static/homepage-ic-sel.png
static/homepage-ic-sel.png
static/homepage-ic-sel.png
  • 2-up
  • Swipe
  • Onion skin

774 Bytes | W: | H:

1.1 KB | W: | H:

static/homepage-ic.png
static/homepage-ic.png
static/homepage-ic.png
static/homepage-ic.png
  • 2-up
  • Swipe
  • Onion skin

813 Bytes | W: | H:

1.5 KB | W: | H:

static/jkt-ic-sel.png
static/jkt-ic-sel.png
static/jkt-ic-sel.png
static/jkt-ic-sel.png
  • 2-up
  • Swipe
  • Onion skin

1007 Bytes | W: | H:

1.4 KB | W: | H:

static/jkt-ic.png
static/jkt-ic.png
static/jkt-ic.png
static/jkt-ic.png
  • 2-up
  • Swipe
  • Onion skin

1.2 KB | W: | H:

1.6 KB | W: | H:

static/user-ic-sel.png
static/user-ic-sel.png
static/user-ic-sel.png
static/user-ic-sel.png
  • 2-up
  • Swipe
  • Onion skin

1002 Bytes | W: | H:

1.4 KB | W: | H:

static/user-ic.png
static/user-ic.png
static/user-ic.png
static/user-ic.png
  • 2-up
  • Swipe
  • Onion skin
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
Please register or to comment