Skip to content

Commit

Permalink
Merge pull request #41 from Chadwuo/one-piece
Browse files Browse the repository at this point in the history
v2.2.3
  • Loading branch information
Chadwuo authored Feb 18, 2023
2 parents bd91a5e + e379178 commit c07ec79
Show file tree
Hide file tree
Showing 15 changed files with 43 additions and 130 deletions.
3 changes: 0 additions & 3 deletions miniprogram/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"pages/index/index",
"pages/book/details/index",
"pages/book/edit/index",
"pages/book/select/index",
"pages/giftOut/index",
"pages/giftOut/edit/index",
"pages/giftReceive/edit/index",
Expand Down Expand Up @@ -89,8 +88,6 @@
"van-action-sheet": "@vant/weapp/action-sheet/index",
"van-row": "@vant/weapp/row/index",
"van-col": "@vant/weapp/col/index",
"van-cell": "@vant/weapp/cell/index",
"van-cell-group": "@vant/weapp/cell-group/index",
"van-empty": "@vant/weapp/empty/index",
"van-index-bar": "@vant/weapp/index-bar/index",
"van-index-anchor": "@vant/weapp/index-anchor/index",
Expand Down
2 changes: 1 addition & 1 deletion miniprogram/config/mp-sdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const colorUISdk = new ColorUISdk({
//当前环境,produce,dev,host
env: 'dev',
//实际项目版本
version: '2.2.1',
version: '2.2.3',
api: {
//生产环境
produce: {
Expand Down
1 change: 0 additions & 1 deletion miniprogram/pages/about/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<ui-avatar ui="sl ellipse" src="/static/logo.png" />
</view>
<view class="text-xxl my-3">礼记</view>
<view class="text-lg my-3">让生活没有"难"还的人情</view>
</view>

<view class="paragraph" style="text-indent: 2em;">
Expand Down
3 changes: 1 addition & 2 deletions miniprogram/pages/book/details/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ Page({
// 通过 eventChannel 向被打开页面传送数据
res.eventChannel.emit('acceptDataFromOpenerPage', {
bookId: that.data.book._id,
bookName: that.data.book.title,
inBook: true
bookName: that.data.book.title
})
}
});
Expand Down
58 changes: 0 additions & 58 deletions miniprogram/pages/book/select/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions miniprogram/pages/book/select/index.json

This file was deleted.

1 change: 0 additions & 1 deletion miniprogram/pages/book/select/index.scss

This file was deleted.

18 changes: 0 additions & 18 deletions miniprogram/pages/book/select/index.wxml

This file was deleted.

2 changes: 1 addition & 1 deletion miniprogram/pages/friend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Page({
},
onSearch() {
if (!this.data.keyword) {
this.loadData(1)
this.loadData()
return
}
for (let item of this.data.friendsList) {
Expand Down
13 changes: 9 additions & 4 deletions miniprogram/pages/friend/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@
</ui-navbar>
<van-search background="transparent" model:value="{{ keyword }}" placeholder="请输入搜索关键词" bind:search="onSearch" shape="round" />

<view>
<view class="ui-container">
<van-empty wx:if="{{friendsList.length===0}}" description="还没有记录哦~" />
<van-index-bar highlight-color="#F76664">
<view wx:for="{{friendsList}}" wx:key="index">
<van-index-anchor index="{{item.alpha}}" />
<van-cell-group inset>
<van-cell title="{{data.name}}" label="{{data.relation}}" size="large" bind:click="onFriendClick" wx:for="{{item.subItems}}" wx:for-item="data" wx:key="dataindex" data-friend='{{data}}' />
</van-cell-group>
<view class="ui-menu radius-lg mb-3">
<view class="ui-menu-item" bindtap="onFriendClick" wx:for="{{item.subItems}}" wx:for-item="data" wx:key="dataindex" data-friend='{{data}}'>
<view class="block py-3">
<view class="text-lg">{{data.name}}</view>
<view class="ui-TC-3 mt-2">{{data.relation}}</view>
</view>
</view>
</view>
</view>
</van-index-bar>
</view>
Expand Down
25 changes: 16 additions & 9 deletions miniprogram/pages/friend/select/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ Page({
keyword: ''
},
onSearch() {
wx.showToast({
title: '搜索...马上写完,真的',
icon: 'none',
if (!this.data.keyword) {
this.loadData()
return
}
for (let item of this.data.friendSelectSource) {
item.subItems = item.subItems.filter(x => x.name.includes(this.data.keyword))
}

this.setData({
friendSelectSource: this.data.friendSelectSource
})
},
// 选中联系人
Expand Down Expand Up @@ -64,30 +71,30 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() { },
onReady() {},

/**
* 生命周期函数--监听页面显示
*/
onShow() { },
onShow() {},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() { },
onHide() {},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() { },
onUnload() {},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() { },
onPullDownRefresh() {},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() { },
onReachBottom() {},
})
13 changes: 9 additions & 4 deletions miniprogram/pages/friend/select/index.wxml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<!--pages/friend/select/index.wxml-->
<ui-sys title="选择亲友" footer="{{false}}">
<van-search background="transparent" model:value="{{ keyword }}" placeholder="请输入搜索关键词" bind:search="onSearch" shape="round" />
<view class="ui-container">
<van-search background="transparent" model:value="{{ keyword }}" placeholder="请输入搜索关键词" bind:search="onSearch" shape="round" />
<van-empty wx:if="{{friendSelectSource.length===0}}" description="还没有记录哦~" />
<van-index-bar highlight-color="#F76664">
<view wx:for="{{friendSelectSource}}" wx:key="index">
<van-index-anchor index="{{item.alpha}}" />
<van-cell-group inset>
<van-cell is-link title="{{data.name}}" size="large" bind:click="onSelectedFriend" wx:for="{{item.subItems}}" wx:for-item="data" wx:key="dataindex" data-friend='{{data}}' />
</van-cell-group>
<view class="ui-menu radius-lg mb-3">
<view class="ui-menu-item" wx:for="{{item.subItems}}" wx:for-item="data" wx:key="dataindex" bindtap="onSelectedFriend" data-friend='{{data}}'>
<view class="block py-3">
<view class="text-lg">{{data.name}}</view>
<view class="ui-TC-3 mt-2">{{data.relation}}</view>
</view>
</view>
</view>
</view>
</van-index-bar>
</view>
Expand Down
18 changes: 0 additions & 18 deletions miniprogram/pages/giftReceive/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ Page({
friendId: '',
friendName: '',
bookId: '',
bookName: '',
money: '',
remarks: '',
inBook: false, // 存在礼簿信息
},
async onSave() {
const eventChannel = this.getOpenerEventChannel()
Expand Down Expand Up @@ -82,22 +80,6 @@ Page({
}
});
},
// 选择礼簿
showBookSelect() {
let that = this
wx.navigateTo({
url: '/pages/book/select/index',
events: {
// 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据
dialogResult: function (data) {
that.setData({
bookId: data._id,
bookName: data.title,
})
},
}
});
},
showCalendar() {
let that = this
wx.navigateTo({
Expand Down
1 change: 0 additions & 1 deletion miniprogram/pages/mine/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ Page({
outTotal: oTotal || 0
}
})
console.log('getGiftTotal', this.data.totalGift)
},
/**
* 生命周期函数--监听页面初次渲染完成
Expand Down
12 changes: 6 additions & 6 deletions miniprogram/pages/start/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ Page({
*/
async onShow() {
app.needRefreshTotal = true

if (!app.userInfo) {
await this.initUserInfo()
await this.initUserDataScope()
}

setTimeout(() => {
if (!this.data.netError) {
wx.switchTab({
url: '/pages/index/index'
})
}
}, 1500)

if (!app.userInfo) {
await this.initUserInfo()
await this.initUserDataScope()
}

},

/**
Expand Down

0 comments on commit c07ec79

Please sign in to comment.