This commit is contained in:
haomingming
2023-04-25 18:05:51 +08:00
parent 596229d478
commit 9e3cb69030
22 changed files with 136 additions and 47 deletions
+11 -2
View File
@@ -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){
+1 -1
View File
@@ -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">