Skip to content

Commit

Permalink
feat:报名人数模板
Browse files Browse the repository at this point in the history
  • Loading branch information
hey-a-pple committed Oct 24, 2023
1 parent 17710f4 commit 9b01698
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 82 deletions.
2 changes: 1 addition & 1 deletion miniprogram/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"pages/subscribe/2023/sydw/scqd/index",
"pages/subscribe/2023/sydw/jls/index",
"pages/subscribe/2023/sydw/bs/index",
"pages/sydw/lnbmrs-cc/index",
"pages/sydw/lnbmrs/index",
"pages/sydw/lngwjzb-jls/index",
"pages/sydw/lngwjzb-jlsjs/index",
"pages/sydw/2023/subscribe/index",
Expand Down
56 changes: 0 additions & 56 deletions miniprogram/pages/sydw/lnbmrs-cc/index.wxml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ Page({
CRMRemark: "", // CRM 注释 长春事业单位报名人数
actid: "", //zg99id
backgroundColor: "",
version: "",

dwList: [],
dwValue: '',

gwList: [],
gwValue: '',

// 列表展示配置
listTitle: [], // 标题
listContent: [], // 内容

suffix: {}, // 后缀
suffixStr: "", // 后缀 字符串

Expand Down Expand Up @@ -55,7 +58,7 @@ Page({
// 现将之前内容清空
const gwList = []


// 将数据添加到已清空的列表中
for (var i = 0; i < response.lists.length; i++) {

Expand All @@ -78,10 +81,10 @@ Page({
}
})
break

case "gw": //岗位
_this.setData({
gwValue:e.detail.text
gwValue: e.detail.text
})

}
Expand Down Expand Up @@ -115,11 +118,14 @@ Page({
//查询
search() {
let _this = this //作用域
if(!_this.data.dwValue){
wx.showToast({title: '请输入单位名称',icon: 'error'})
if (!_this.data.dwValue) {
wx.showToast({
title: '请输入单位名称',
icon: 'error'
})
return
}

wx.showLoading({
title: '查询中...',
mask: true
Expand Down Expand Up @@ -157,9 +163,9 @@ Page({

const result = [];
if (list.lists) {
list.lists.forEach(valueList=>{
list.lists.forEach(valueList => {
let same = false;
result.forEach(valueResult=>{
result.forEach(valueResult => {
if (valueList.item07 == valueResult.item07) {
same = true;
}
Expand All @@ -169,7 +175,7 @@ Page({
}
})
}
result.forEach(valueResult=>{
result.forEach(valueResult => {
if (valueResult.item07 == 0) {
valueResult.item07 = '暂无';
}
Expand Down Expand Up @@ -211,15 +217,7 @@ Page({
*/
onLoad: function (options) {
//console.log(options);
if (!options.version) {
getApp().methods.handleError({
err: null,
title: "出错啦",
content: '缺少版本号',
reLaunch: true
});
return
}

if (!options.actid) {
getApp().methods.handleError({
err: null,
Expand All @@ -241,7 +239,6 @@ Page({
url: "https://zg99.offcn.com/index/chaxun/getfylist",
data: {
actid: options.actid,
version: options.version,
tabnum: "100",
sstime: new Date().valueOf()
},
Expand Down Expand Up @@ -270,14 +267,15 @@ Page({
}
// 保存活动配置
_this.setData({
version: options.version,
actid: options.actid,
CRMEFSID: response.lists[0].CRMEFSID,
imageUrl: response.lists[0].imageUrl,
title: response.lists[0].title,
shareImages: response.lists[0].shareImages,
backgroundColor: response.lists[0].backgroundColor,
CRMRemark: `报名人数,${response.lists[0].title}${options.version}`
CRMRemark: `报名人数,${response.lists[0].title}`,
listTitle: response.lists[0].listTitle.split(',').map(item=>{return {name: item.split('|')[0], itemName: item.split('|')[1]}}),
listContent: response.lists[0].listContent.split(',').map(item=>{return {name: item.split('|')[0], itemName: item.split('|')[1]}})
})
// 获取一级联动数据
wx.request({
Expand Down
File renamed without changes.
47 changes: 47 additions & 0 deletions miniprogram/pages/sydw/lnbmrs/index.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--pages/wdxt/lnfs-cc/index.wxml-->

<view style=" background:{{backgroundColor}};min-height: 100vh;">
<image mode="widthFix" src="{{imageUrl}}" class="banner_bk w100"></image>
<view class="container">
<view class="select_wrap">


<view class='offcn_item' wx:if="{{dwList.length > 0}}">
<select-search options='{{dwList}}' icon="icon-icon1" text="单位" type="dw" bind:m_selectSearch_touch="m_select_touch"></select-search>
</view>

<view class='offcn_item' wx:if="{{gwList.length > 0}}">
<select-search options='{{gwList}}' icon="icon-home" text="岗位" type="gw" bind:m_selectSearch_touch="m_select_touch"></select-search>
</view>


<view class='offcn_item btn'>

<button wx:if="{{!phone}}" class="search_btn" bindtap="SSOCheckManual">点击查询</button>
<button wx:else class="search_btn" bindtap="search">点击查询</button>
</view>
</view>

<view class="resultWrap">
<block wx:for="{{result}}" wx:key="index">
<view class="result_item" bindtap="showmore" data-index="{{index}}">
<view class="result_detail">{{item[listTitle[0].itemName]}}</view>


<view class="item_line" wx:for="{{listContent}}" wx:for-item="item1">
<label>{{item1.name}}:</label>
<text>{{item[item1.itemName]}}</text>
</view>


</view>

</block>


<view wx:if="{{result.length>0&&result.length<count}}" style="color:gray;text-align: center;">下拉页面可刷新数据</view>
<view style="color:gray;text-align: center;font-size: 80%;margin-top: 50rpx;">{{suffixStr}}</view>
</view>

</view>
</view>
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
overflow: hidden;
}

.item_group .item_line {
.item_line {
justify-content: flex-start;
margin-bottom: 14rpx;
flex-direction: row;
Expand All @@ -98,8 +98,8 @@
line-height: 60rpx;
}

.item_group .item_line label {
color: #969799;
.item_line label {
color: #c30014;
display: inline-block;
margin-right: 10rpx;
/* 文本两端对齐 */
Expand Down

0 comments on commit 9b01698

Please sign in to comment.