Merge remote-tracking branch 'origin/fxz_dev' into leng_dev

This commit is contained in:
lbw committed 2022-04-29 12:29:27 +08:00
commit 16bbfa114a
6 files changed
+28 -23

No files matched your search

@@ -43,18 +43,19 @@
}
},
onLoad(params) {
if(params&&params.id){
if(params&&params.id!= "undefined"){
this.type = 'edit'
#[[this.$u.api]]#.pigx${className}.getObj(params}).then(res => {
Object.assign(this.model, res.data);
#[[this.$u.api]]#.pigx${className}.getObj(params).then(res => {
this.model = res.data;
});
}else{
this.type = 'add'
this.model = {}
}
},
methods: {
submit() {
#[[this.$refs.uForm.validate(valid => {]]#
#[[this.$refs.uForm.validate(async valid => {]]#
if (valid) {
if(this.type==='edit'){
await #[[this.$u.api]]#.pigx${className}.putObj(this.model)
@@ -64,11 +65,13 @@
setTimeout(() => {
uni.showModal({
title: '提示',
content: '修改成功',
ccontent: this.type === 'edit' ? '修改成功' : '添加成功',
showCancel: false,
success: function() {
uni.setStorageSync('refreshList', true);
uni.navigateBack();
uni.navigateTo({
url: '/pages/${moduleName}/${pathName}/${pathName}-index'
})
}
})
}, 200)
@@ -21,7 +21,7 @@
<u-loadmore :status="loadStatus"></u-loadmore>
</view>
</scroll-view>
<view class="btn-plus" @click="navTo('form')">
<view class="btn-plus" @click="cardClick()">
<u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon>
</view>
</view>
@@ -3,13 +3,13 @@
/**${comments}**/
{
"path": "pages/${moduleName}/${pathName}/${pathName}-index.vue",
"path": "pages/${moduleName}/${pathName}/${pathName}-index",
"style": {
"navigationBarTitleText": "${comments}"
}
},
{
"path": "pages/${moduleName}/${pathName}/${pathName}-form.vue",
"path": "pages/${moduleName}/${pathName}/${pathName}-form",
"style": {
"navigationBarTitleText": "${comments}详情"
}