初始化

This commit is contained in:
2024-12-06 16:18:22 +08:00
commit 884dd70d83
751 changed files with 60883 additions and 0 deletions
@@ -0,0 +1,120 @@
const {
etmsPost
} = require("../../com");
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
activityBag: {},
pageSize: 20,
pageCurrent: 1,
hagglingLog: [],
tenantId: null,
activityMainId: null,
activityRouteId: null,
isFinish: false,
recordCount: 0,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
var currentActivityBag = app.globalData.currentActivityBag2;
var myActivityBascInfo = currentActivityBag.bascInfo;
wx.setNavigationBarTitle({
title: currentActivityBag.bascInfo.title
})
this.setData({
tenantId: options.tenantId,
activityMainId: options.activityMainId,
activityRouteId: options.activityRouteId
});
this.getLogGetPaging();
},
getLogGetPaging() {
etmsPost(
app.globalData,
"openParent2/WxMiniHagglingLogGetPaging", {
pageSize: this.data.pageSize,
pageCurrent: this.data.pageCurrent,
tenantId: this.data.tenantId,
activityMainId: this.data.activityMainId,
activityRouteId: this.data.activityRouteId
},
(data) => {
this.analysisActivityLog(data);
}
);
},
analysisActivityLog(resData) {
var tempList = this.data.hagglingLog.concat(resData.dataItems);
this.setData({
recordCount: resData.recordCount,
hagglingLog: tempList
})
if (tempList.length >= resData.recordCount) {
this.setData({
isFinish: true
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
if (!this.data.isFinish) {
this.setData({
pageCurrent: this.data.pageCurrent + 1
});
this.getLogGetPaging();
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
@@ -0,0 +1,10 @@
{
"usingComponents": {
"t-avatar": "tdesign-miniprogram/avatar/avatar",
"t-avatar-group": "tdesign-miniprogram/avatar/avatar-group",
"t-button": "tdesign-miniprogram/button/button",
"t-button-group": "tdesign-miniprogram/button-group/button-group",
"t-badge": "tdesign-miniprogram/badge/badge"
},
"navigationBarTitleText": "砍价记录"
}
@@ -0,0 +1,11 @@
<view class="ec_route_main">
<view class="ec_route_item" wx:for="{{hagglingLog}}" wx:key="activityRouteId">
<view class="ec_route_item_img">
<t-badge t-class="ec_route_item_img_tp" color="#67C23A" count="1">
<t-avatar data-index="{{index}}" shape="circle" image="{{item.avatarUrl}}" />
</t-badge>
</view>
<view class="ec_route_item_text">{{item.nickName}}
</view>
</view>
</view>
@@ -0,0 +1,55 @@
.ec_route_main{
padding: 20px;
}
.ec_route_item {
display: flex;
align-items: center;
margin-top: 20px;
}
.ec_route_item_text {
flex: 1 1 auto;
font-size: 14px;
margin-left: 10px;
}
.ec_route_item_sub_btn {
background: -webkit-linear-gradient(left, #FF123C, #FE2A38, #FD5028) !important;
width: 50px !important;
font-size: 12px !important;
height: 34px !important;
width: 80px !important;
font-weight: normal !important;
margin-left: 10px !important;
}
.ec_route_item_text_limit {
color: #FF123C;
}
.ec_route_tag {
position: absolute;
top: 10px;
right: 0px;
background-color: #FFC234;
font-size: 14px;
color: #FF123C;
height: 24px;
line-height: 24px;
width: 80px;
text-align: center;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.ac_ks_inter {
background:rgba(0, 0, 0, 0.4);
height: 50px;
width: 50px;
line-height: 50px;
text-align: center;
border-radius: 50px;
color: white;
z-index: 999;
font-size: 12px;
overflow: hidden
}