购物车历史订单增加,代码优化

This commit is contained in:
GaoHao
2025-04-02 09:20:26 +08:00
parent 5a655ba09e
commit 5e6646b574
31 changed files with 418 additions and 357 deletions

View File

@@ -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
}
// 部分分类处理