Commit 8d8c1e7c by 谢中龙

新增任务说明界面

parent 509f024c
......@@ -75,7 +75,8 @@
"pages/qrcode/qrcode",
"pages/userList/userList",
"pages/couponQrcode/couponQrcode",
"pages/welcomGuider/welcomGuider"
"pages/welcomGuider/welcomGuider",
"pages/taskNotice/taskNotice"
]
}
],
......
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 54,
"current": 60,
"list": [
{
"id": -1,
......@@ -436,6 +436,12 @@
"name": "导购授权页面",
"pathName": "shoppingGuid/page/pages/welcomGuider/welcomGuider",
"query": ""
},
{
"id": 60,
"name": "任务说明",
"pathName": "shoppingGuid/page/pages/taskNotice/taskNotice",
"query": "id=636202518078164992&type=2"
}
]
}
......
......@@ -59,5 +59,14 @@ wxService.page({
}
}
})
},
//跳转到活动说明界面
onTapToNotice() {
let taskId = this.options && this.options.id || 0
let orderType = this.options && this.options.type || 1;
wx.navigateTo({
url: `/shoppingGuid/page/pages/taskNotice/taskNotice?id=${taskId}&type=${orderType}`,
});
}
})
\ No newline at end of file
......@@ -6,7 +6,7 @@
<image src='/assets/imgs/shoppingGuide/kpi_task_time.png' mode='widthFix'></image>
<text>{{enlistList.task.startTime}}~{{enlistList.task.endTime}}</text>
</view>
<view class='rg'>活动说明?</view>
<view class='rg' bindtap='onTapToNotice'>活动说明?</view>
</view>
<view class='info-item'>
<view class='lf'>
......
......@@ -69,5 +69,13 @@ wxService.page({
current: this.data.current
});
},
//跳转到活动说明界面
onTapToNotice(){
let taskId = this.options && this.options.id || 0
let orderType = this.options && this.options.type || 1;
})
\ No newline at end of file
wx.navigateTo({
url: `/shoppingGuid/page/pages/taskNotice/taskNotice?id=${taskId}&type=${orderType}`,
});
}
});
\ No newline at end of file
......@@ -6,7 +6,7 @@
<image src='/assets/imgs/shoppingGuide/kpi_task_time.png' mode='widthFix' />
<text>{{saleDetail.task.startTime}}~{{saleDetail.task.endTime}}</text>
</view>
<view class='rg'>活动说明?</view>
<view class='rg' bindtap='onTapToNotice'>活动说明?</view>
</view>
<view class='info-item'>
<view class='lf'>
......
// shoppingGuid/page/pages/taskNotice/taskNotice.js
const wxService = require('../../../../utils/wxService')
wxService.page({
/**
* 页面的初始数据
*/
data: {
notice : [],
nodata : false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
let id = options.id ,
type = options.type;
this.getTaskInfo(id,type);
},
//获取任务详情
getTaskInfo(id,type){
wx.showLoading({
title: '加载中'
});
wxService.post(`/marketing/shoppingguide/task/detail?orderType=${type}&taskId=${id}`).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
let notice = data.task.notice ? JSON.parse(data.task.notice) : [];
if(notice.length == 0){
this.data.nodata = true;
}
else{
this.data.nodata = false;
}
this.setData({
notice: notice,
nodata: this.data.nodata
});
}
}
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "活动说明",
"usingComponents": {}
}
\ No newline at end of file
<!--shoppingGuid/page/pages/taskNotice/taskNotice.wxml-->
<view class='active-notice'>
<view class='notice-item' wx:for="{{notice}}" wx:key="nitice" wx:for-item="item">
<text class='title'>{{item.title}}:</text>
<text class='desc'>{{item.desc}}</text>
</view>
<!-- 未配置 -->
<view class='empty' wx:if="{{nodata}}">暂无活动说明~</view>
</view>
/* shoppingGuid/page/pages/taskNotice/taskNotice.wxss */
/* shoppingGuid/page/pages/userInfo/userInfo.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
font-size: 28rpx;
color: #333333;
}
/* *,*::after,*::before{
box-sizing: border-box;
} */
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.active-notice{
width: 100%;
height: auto;
padding: 30rpx;
}
.active-notice .notice-item{
width: 100%;
height: auto;
display: flex;
margin-bottom: 20rpx;
letter-spacing: 1rpx;
line-height: 40rpx;
}
.active-notice .notice-item .title{
flex: 0;
min-width: 180rpx;
font-weight: bold;
padding-right: 20rpx;
}
.active-notice .notice-item .desc{
flex: 1;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment