优化
This commit is contained in:
@@ -21,7 +21,8 @@ Page({
|
||||
current_words_type: 1,
|
||||
focus: false,
|
||||
words_css: "border-radius: 20rpx;margin-bottom: 20rpx;",
|
||||
from: ""
|
||||
from: "",
|
||||
open: false
|
||||
},
|
||||
onLoad(options){
|
||||
let from = options.from;
|
||||
@@ -80,7 +81,9 @@ Page({
|
||||
}
|
||||
api.delDoctorWords({doctor_words_id: doctor_words_id}).then(response => {
|
||||
console.log(response);
|
||||
|
||||
this.setData({
|
||||
open: false
|
||||
})
|
||||
}).then(()=>{
|
||||
this.getList(words_type)
|
||||
}).catch(errors => {console.error(errors);})
|
||||
@@ -122,10 +125,16 @@ Page({
|
||||
wordsOpen(e){
|
||||
console.log("open")
|
||||
console.log(e);
|
||||
this.setData({
|
||||
open: true
|
||||
})
|
||||
},
|
||||
wordsClick(e){
|
||||
console.log("click")
|
||||
console.log(e);
|
||||
if(this.data.open){
|
||||
return
|
||||
}
|
||||
let words = e.currentTarget.dataset.words;
|
||||
let from = this.data.from;
|
||||
if(from){
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<van-cell-group>
|
||||
<van-cell custom-style="{{words_css}}" title="{{index + 1}}、{{item.words}}" />
|
||||
</van-cell-group>
|
||||
<view slot="right" class="delWords" bindtap="delWords" data-doctor_words_id="{{item.doctor_words_id}}">删除</view>
|
||||
<view slot="right" class="delWords" catchtap="delWords" data-doctor_words_id="{{item.doctor_words_id}}">删除</view>
|
||||
</van-swipe-cell>
|
||||
</view>
|
||||
<view class="btn">
|
||||
|
||||
Reference in New Issue
Block a user