|
|
@@ -132,7 +132,7 @@
|
|
|
<uni-swipe-action>
|
|
|
<view v-for="(item,index) in items" :key="index">
|
|
|
<uni-swipe-action-item :right-options="options2" :show="item.isOpened" :auto-close="false"
|
|
|
- @change="change(item)" @click="bindClick(item)" >
|
|
|
+ @change="change(item)" @click="bindClick(item,index)">
|
|
|
<view class="home-nav-box">
|
|
|
<image :src="item.imgUrl" class="nav-img"></image>
|
|
|
<view class="nav-name"
|
|
|
@@ -147,6 +147,12 @@
|
|
|
</view>
|
|
|
</uni-swipe-action>
|
|
|
<view style="height:100rpx"></view>
|
|
|
+ <view class="uni-publish">
|
|
|
+ <navigator
|
|
|
+ :url="`/pages/index/xiuxing/xiuxingItem?deleteItems=${JSON.stringify(deleteItems)}&items=${JSON.stringify(items)}`">
|
|
|
+ <image class="send" src="../../static/index/icon/gongxiu_notice_add.png"></image>
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -277,6 +283,7 @@
|
|
|
initialStatus: '未签到',
|
|
|
//修行项目
|
|
|
items: [{
|
|
|
+ index: 0,
|
|
|
imgUrl: '../../static/index/home_gongxiu.png',
|
|
|
name: '共修',
|
|
|
meritCount: 0,
|
|
|
@@ -284,6 +291,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 1,
|
|
|
imgUrl: '../../static/index/home_qifu.png',
|
|
|
name: '祈福',
|
|
|
meritCount: 0,
|
|
|
@@ -291,6 +299,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 2,
|
|
|
imgUrl: '../../static/index/home_fojing.png',
|
|
|
name: '佛经',
|
|
|
meritCount: 0,
|
|
|
@@ -298,6 +307,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 3,
|
|
|
imgUrl: '../../static/index/home_foyin.png',
|
|
|
name: '佛音',
|
|
|
meritCount: 0,
|
|
|
@@ -305,6 +315,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 4,
|
|
|
imgUrl: '../../static/index/home_nianfo.png',
|
|
|
name: '念佛',
|
|
|
meritCount: 0,
|
|
|
@@ -312,6 +323,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 5,
|
|
|
imgUrl: '../../static/index/home_yufo.png',
|
|
|
name: '浴佛',
|
|
|
meritCount: 0,
|
|
|
@@ -319,6 +331,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 6,
|
|
|
imgUrl: '../../static/index/home_jisi.png',
|
|
|
name: '祭祀',
|
|
|
meritCount: 0,
|
|
|
@@ -326,6 +339,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 7,
|
|
|
imgUrl: '../../static/index/home_xiyou.png',
|
|
|
name: '西游',
|
|
|
meritCount: 0,
|
|
|
@@ -333,6 +347,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 8,
|
|
|
imgUrl: '../../static/index/home_peifu.png',
|
|
|
name: '培福',
|
|
|
meritCount: 0,
|
|
|
@@ -340,6 +355,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 9,
|
|
|
imgUrl: '../../static/index/home_chaodu.png',
|
|
|
name: '超度',
|
|
|
meritCount: 0,
|
|
|
@@ -347,6 +363,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 10,
|
|
|
imgUrl: '../../static/index/home_rizhi.png',
|
|
|
name: '修心日志',
|
|
|
meritCount: 0,
|
|
|
@@ -354,6 +371,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 11,
|
|
|
imgUrl: '../../static/index/home_xingshan.png',
|
|
|
name: '日行一善',
|
|
|
meritCount: 0,
|
|
|
@@ -361,6 +379,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 12,
|
|
|
imgUrl: '../../static/index/home_zuochan.png',
|
|
|
name: '坐禅',
|
|
|
meritCount: 0,
|
|
|
@@ -368,6 +387,7 @@
|
|
|
isOpened: 'none'
|
|
|
},
|
|
|
{
|
|
|
+ index: 13,
|
|
|
imgUrl: '../../static/index/home_fangsheng.png',
|
|
|
name: '放生',
|
|
|
meritCount: 0,
|
|
|
@@ -381,16 +401,35 @@
|
|
|
backgroundColor: '#ff0000'
|
|
|
}
|
|
|
}],
|
|
|
+ deleteItems: []
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(option) {
|
|
|
this.$request.api('/api/test/', {}).then(res => {
|
|
|
console.log(res)
|
|
|
}).catch(parmas => {
|
|
|
console.log(432142)
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
+ if(option.items){
|
|
|
+ this.items = JSON.parse(option.items);
|
|
|
+ console.log("indexLength:"+this.items.length);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ try {
|
|
|
+ const value = uni.getStorageSync('items');
|
|
|
+ if (value) {
|
|
|
+ console.log(value);
|
|
|
+ this.items = value;
|
|
|
+ try {
|
|
|
+ uni.removeStorageSync('items');
|
|
|
+ } catch (e) {
|
|
|
+ // error
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ // error
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
menuShow(index) {
|
|
|
@@ -418,8 +457,11 @@
|
|
|
item.isOpened = 'right';
|
|
|
// console.log('返回:', e);
|
|
|
},
|
|
|
- bindClick(item) {
|
|
|
- console.log(item.name);
|
|
|
+ bindClick(item, index) {
|
|
|
+ //删除该项目
|
|
|
+ this.items.splice(index, 1);
|
|
|
+ this.deleteItems.push(item);
|
|
|
+ this.deleteItems = [...new Set(this.deleteItems)];
|
|
|
},
|
|
|
}
|
|
|
}
|
|
|
@@ -794,7 +836,20 @@
|
|
|
border-radius: 60rpx;
|
|
|
}
|
|
|
}
|
|
|
- /deep/.uni-swipe_button-group{
|
|
|
+
|
|
|
+ /deep/.uni-swipe_button-group {
|
|
|
height: 130rpx !important;
|
|
|
}
|
|
|
+
|
|
|
+ .uni-publish {
|
|
|
+ position: fixed;
|
|
|
+ right: 40rpx;
|
|
|
+ bottom: 8%;
|
|
|
+ z-index: 3;
|
|
|
+ }
|
|
|
+
|
|
|
+ .uni-publish .send {
|
|
|
+ width: 120rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ }
|
|
|
</style>
|