购物车历史订单增加,代码优化
This commit is contained in:
@@ -109,8 +109,6 @@
|
||||
<my-button shape="circle" @click="save">保存</my-button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 消息提示 -->
|
||||
<up-toast ref="uToastRef"></up-toast>
|
||||
|
||||
</view>
|
||||
|
||||
@@ -118,7 +116,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, getCurrentInstance } from 'vue';
|
||||
import { ref, reactive } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import pickerItem from './components/picker-item.vue';
|
||||
@@ -176,8 +174,6 @@
|
||||
|
||||
})
|
||||
|
||||
const refs = getCurrentInstance()
|
||||
|
||||
onLoad((options) => {
|
||||
getlist()
|
||||
if (options.id) {
|
||||
@@ -233,17 +229,11 @@
|
||||
async function save() {
|
||||
// 效验
|
||||
if (!form.contentType || !form.subType || !form.name || !form.address) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请输入必填项",
|
||||
})
|
||||
uni.$utils.showToast("请输入必填项")
|
||||
return
|
||||
}
|
||||
if (form.classifyPrint == 1 && form.selectcheckbox.length == 0) {
|
||||
refs.ctx.$refs.uToastRef.show({
|
||||
type: 'default',
|
||||
message: "请选择部分分类",
|
||||
})
|
||||
uni.$utils.showToast("请选择部分分类")
|
||||
return
|
||||
}
|
||||
// 部分分类处理
|
||||
|
||||
Reference in New Issue
Block a user