Commit a220cbdd98cab6c4cf7d75b13676fe190acb5461
1 parent
e4819a9d
更新接口地址为测试环境并新增页面加载时自动查询功能
Showing
2 changed files
with
9 additions
and
5 deletions
project-wl-kuaidiyuan-uniapp-vue3/src/pages/turnorder/index.vue
| @@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
| 65 | 65 | ||
| 66 | <script setup> | 66 | <script setup> |
| 67 | import {reactive, ref} from "vue"; | 67 | import {reactive, ref} from "vue"; |
| 68 | -import {onReachBottom} from "@dcloudio/uni-app"; | 68 | +import {onReachBottom, onLoad} from "@dcloudio/uni-app"; |
| 69 | import {useStore} from "vuex"; | 69 | import {useStore} from "vuex"; |
| 70 | // 接口api | 70 | // 接口api |
| 71 | import {getSameAgency, transferBatch} from "@/pages/api/index.js"; | 71 | import {getSameAgency, transferBatch} from "@/pages/api/index.js"; |
| @@ -82,7 +82,7 @@ const users = store.state.user; | @@ -82,7 +82,7 @@ const users = store.state.user; | ||
| 82 | const loadMore = ref(); //定义子组件的ref,可以调取子组件的值 | 82 | const loadMore = ref(); //定义子组件的ref,可以调取子组件的值 |
| 83 | let popup = ref(); //定义ref | 83 | let popup = ref(); //定义ref |
| 84 | let isShowCancel = ref(true); | 84 | let isShowCancel = ref(true); |
| 85 | -const tipInfo = ref("确定要转单吗?"); //转单提示语 | 85 | +const tipInfo = ref("确定要转单吗?"); //转单提示语 |
| 86 | let reload = ref(false); | 86 | let reload = ref(false); |
| 87 | let pages = ref(0); //总页数 | 87 | let pages = ref(0); //总页数 |
| 88 | let pageNum = ref(1); | 88 | let pageNum = ref(1); |
| @@ -109,9 +109,13 @@ onReachBottom(() => { | @@ -109,9 +109,13 @@ onReachBottom(() => { | ||
| 109 | } | 109 | } |
| 110 | }); | 110 | }); |
| 111 | // ------生命周期------ | 111 | // ------生命周期------ |
| 112 | +onLoad(() => { | ||
| 113 | + handleSearch(); | ||
| 114 | +}); | ||
| 115 | + | ||
| 112 | // ------定义方法------ | 116 | // ------定义方法------ |
| 113 | // 获取数据 | 117 | // 获取数据 |
| 114 | -const getList = async () => { | 118 | +const getList = async() => { |
| 115 | reload.value = true; | 119 | reload.value = true; |
| 116 | await getSameAgency(page).then((res) => { | 120 | await getSameAgency(page).then((res) => { |
| 117 | if (res.code === 200) { | 121 | if (res.code === 200) { |
project-wl-kuaidiyuan-uniapp-vue3/src/utils/env.js
| 1 | 1 | ||
| 2 | // 测试环境 | 2 | // 测试环境 |
| 3 | -// export const baseUrl = 'http://slwl-geteway-t.itheima.net/courier' | ||
| 4 | -// export const baseUrl ='http://172.16.43.24:9527/courier' | 3 | +// export const baseUrl = 'https://tms-gateway.zrpfsc.com/courier' |
| 4 | +// export const baseUrl ='http://10.30.110.163:9527/courier' | ||
| 5 | // 线上环境 | 5 | // 线上环境 |
| 6 | export const baseUrl = 'https://tms-gateway.zrpfsc.com/courier' | 6 | export const baseUrl = 'https://tms-gateway.zrpfsc.com/courier' |
| 7 | \ No newline at end of file | 7 | \ No newline at end of file |