提交 c2cd254f authored 作者: 刘旭's avatar 刘旭

修改bug

上级 3da0997f
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"topWindow": false "topWindow": false
} }
},{ }, {
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
"style": { "style": {
"navigationBarTitleText": "订单", "navigationBarTitleText": "订单",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationStyle": "custom" "navigationStyle": "custom",
"onReachBottomDistance": 30
} }
}, },
{ {
...@@ -106,32 +107,6 @@ ...@@ -106,32 +107,6 @@
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
// "tabBar": {
// // "position": "top",
// "color": "#bfbfbf",
// "selectedColor": "1296db",
// "backgroundColor": "#fff",
// "borderStyle": "white",
// "list": [{
// "pagePath": "pages/customized/order",
// "text": "订单",
// "iconPath": "static/dingdan-copy.png",
// "selectedIconPath": "static/dingdan.png"
// },
// {
// "pagePath": "pages/customized/queryRecord",
// "text": "查询记录",
// "iconPath": "static/sousuo-copy.png",
// "selectedIconPath": "static/sousuo.png"
// },
// {
// "pagePath": "pages/customized/my",
// "text": "定制",
// "iconPath": "static/wodeyushe-copy.png",
// "selectedIconPath": "static/wodeyushe.png"
// }
// ]
// },
"condition": { //模式配置,仅开发期间生效 "condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项) "current": 0, //当前激活的模式(list 的索引项)
"list": [{ "list": [{
......
...@@ -12,7 +12,9 @@ ...@@ -12,7 +12,9 @@
class="or-bottom" class="or-bottom"
@click="toggle('right', item1.id)" @click="toggle('right', item1.id)"
> >
<view class="or-left"><image :src="item1.picUrl" class="or-left-image" /></view> <view class="or-left">
<image :src="item1.picUrl" class="or-left-image" mode="heightFix" />
</view>
<view class="order-right"> <view class="order-right">
<text class="details-top">{{ item1.goodsName }}</text> <text class="details-top">{{ item1.goodsName }}</text>
<text class="details-center">{{ item1.specifications[0] }}</text> <text class="details-center">{{ item1.specifications[0] }}</text>
...@@ -30,7 +32,7 @@ ...@@ -30,7 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
<uni-load-more v-show="orderData" status="no-more" style="width: 100%;"></uni-load-more> <uni-load-more v-show="orderData" :status="moreStates" style="width: 100%;"></uni-load-more>
<view class="qr-code"> <view class="qr-code">
<text style="margin-right: 60rpx;">科 技 赋 能</text> <text style="margin-right: 60rpx;">科 技 赋 能</text>
...@@ -43,37 +45,32 @@ ...@@ -43,37 +45,32 @@
</view> </view>
<uni-popup ref="popup" background-color="#f2f2f2"> <uni-popup ref="popup" background-color="#f2f2f2">
<scroll-view <view v-if="detailData.length">
scroll-y="true" <view v-for="(item, i) in detailData" class="msjf-detail">
style="height: 100vh; box-sizing: border-box; padding-bottom: 40rpx;" <view class="detail-list">
> <view class="label">序列号</view>
<view v-if="detailData.length"> <view class="text">{{ item.sequenceCode }}</view>
<view v-for="(item, i) in detailData" class="msjf-detail"> </view>
<view class="detail-list"> <view class="detail-list">
<view class="label">序列号</view> <view class="label">是否开瓶</view>
<view class="text">{{ item.sequenceCode }}</view> <view class="text">{{ item.ifDeCap ? '已开瓶' : '未开瓶' }}</view>
</view> </view>
<view class="detail-list"> <view class="detail-list">
<view class="label">是否开瓶</view> <view class="label">开瓶时间</view>
<view class="text">{{ item.ifDeCap ? '已开瓶' : '未开瓶' }}</view> <view class="text">{{ item.deCapTime }}</view>
</view> </view>
<view class="detail-list"> <view class="detail-list" v-if="item.ifDeCap">
<view class="label">开瓶时间</view> <view class="label">开瓶手机号</view>
<view class="text">{{ item.deCapTime }}</view> <view class="phone-list">
</view> <view v-for="phone in item.phoneList?.length" class="text">
<view class="detail-list" v-if="item.ifDeCap"> {{ item.phoneList[phone - 1] }}
<view class="label">开瓶手机号</view>
<view class="phone-list">
<view v-for="phone in item.phoneList?.length" class="text">
{{ item.phoneList[phone - 1] }}
</view>
</view> </view>
</view> </view>
</view> </view>
<uni-load-more status="no-more" style="padding-bottom: 40rpx;"></uni-load-more>
</view> </view>
<uni-load-more v-else status="no-more"></uni-load-more> <uni-load-more status="no-mroe"></uni-load-more>
</scroll-view> </view>
<uni-load-more v-else :status="moreStates"></uni-load-more>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
...@@ -83,22 +80,29 @@ import { ref } from 'vue'; ...@@ -83,22 +80,29 @@ import { ref } from 'vue';
import { getMSJFList, getMSJFDetail } from '@/services/api'; import { getMSJFList, getMSJFDetail } from '@/services/api';
import { baseURL } from '@/services/request'; import { baseURL } from '@/services/request';
import headerVue from '@/pages/header/index.vue'; import headerVue from '@/pages/header/index.vue';
import { onReachBottom } from '@dcloudio/uni-app'
let color = ref('#a27443'); let color = ref('#a27443');
// 订单数据 let orderData = ref([] as any);
let orderData = ref();
let detailData = ref([] as any); let detailData = ref([] as any);
// let add = () => {
// num.value++;
// };
// let reduce = () => {
// if (num.value < 1) return;
// else num.value--;
// };
let popup = ref(); let popup = ref();
let moreStates = ref('more');
let listQuery = ref({
limit: 10,
page: 1
})
let total = ref(0)
onReachBottom(() => {
// 判断是否还有下一页数据
if (listQuery.value.page * listQuery.value.limit >= total.value) return (moreStates.value = 'on-more');
// 判断是否正在请求其它数据,如果是,则不发起额外的请求
if (moreStates.value === 'loading') return;
listQuery.value.page += 1;
initMSJFList();
})
let toggle = (type: string, id: number) => { let toggle = (type: string, id: number) => {
popup.value?.open(type) popup.value?.open(type)
...@@ -107,8 +111,11 @@ let toggle = (type: string, id: number) => { ...@@ -107,8 +111,11 @@ let toggle = (type: string, id: number) => {
// 获取订单数据 // 获取订单数据
let initMSJFList = async () => { let initMSJFList = async () => {
let res: any = await getMSJFList(); moreStates.value = 'loading'
let res: any = await getMSJFList(listQuery.value);
if (res.data.errno === 0) { if (res.data.errno === 0) {
if (res.data.data.total > 10) moreStates.value = 'more';
else moreStates.value = 'no-more';
// 区分是否全路径 // 区分是否全路径
for(let s in res.data.data.list) { for(let s in res.data.data.list) {
for(let g in res.data.data.list[s].goodsList) { for(let g in res.data.data.list[s].goodsList) {
...@@ -117,7 +124,8 @@ let initMSJFList = async () => { ...@@ -117,7 +124,8 @@ let initMSJFList = async () => {
res.data.data.list[s].goodsList[g].picUrl = baseURL + picUrl res.data.data.list[s].goodsList[g].picUrl = baseURL + picUrl
} }
} }
orderData.value = res.data.data.list; orderData.value = [...orderData.value, ...res.data.data.list];
total.value = res.data.data.total;
} }
}; };
...@@ -125,10 +133,9 @@ initMSJFList(); ...@@ -125,10 +133,9 @@ initMSJFList();
// 单个商品详情 // 单个商品详情
let initMSJFDetail = async (id: any) => { let initMSJFDetail = async (id: any) => {
let res: any = await getMSJFDetail({orderGoodsId: id}) let res: any = await getMSJFDetail({ orderGoodsId: id })
if(res.data.errno === 0 ) if(res.data.errno === 0 )
detailData.value = res.data.data.list detailData.value = res.data.data.list
} }
</script> </script>
...@@ -142,6 +149,20 @@ page { ...@@ -142,6 +149,20 @@ page {
// padding: 0 40rpx; // padding: 0 40rpx;
} }
:deep(.uni-popup__wrapper.right) {
min-height: 70vh;
overflow-y: scroll;
}
:deep(.uni-load-more) {
padding-top: 20rpx;
}
:deep(.more) {
padding-top: 0px;
padding-bottom: 40rpx;
}
.status_bar { .status_bar {
height: var(--status-bar-height); height: var(--status-bar-height);
width: 100%; width: 100%;
...@@ -166,6 +187,7 @@ page { ...@@ -166,6 +187,7 @@ page {
} }
.or-bottom { .or-bottom {
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
height: 190rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 1px solid #f2f2f2; border-top: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2;
...@@ -173,7 +195,6 @@ page { ...@@ -173,7 +195,6 @@ page {
float: left; float: left;
margin-right: 14%; margin-right: 14%;
.or-left-image { .or-left-image {
width: 130rpx;
height: 160rpx; height: 160rpx;
border-radius: 10rpx; border-radius: 10rpx;
} }
...@@ -275,7 +296,8 @@ page { ...@@ -275,7 +296,8 @@ page {
flex-direction: row; flex-direction: row;
width: 100%; width: 100%;
height: 140rpx; height: 140rpx;
margin: 35% 0 50rpx 0; margin-top: 25%;
padding-bottom: 40rpx;
} }
.footer { .footer {
......
...@@ -7,7 +7,7 @@ export let login = (data: object | any) => request('/wx/auth/login_by_mobile', ' ...@@ -7,7 +7,7 @@ export let login = (data: object | any) => request('/wx/auth/login_by_mobile', '
export let resetPwd = (data: any) => request('/wx/auth/reset_by_mobile', 'POST', data); export let resetPwd = (data: any) => request('/wx/auth/reset_by_mobile', 'POST', data);
// 获取订单信息 // 获取订单信息
export let getMSJFList = () => request('/wx/order/MSJFList', 'GET'); export let getMSJFList = (data?: any) => request('/wx/order/MSJFList', 'GET', data);
// 保存定制文件 // 保存定制文件
export let saveCustomPage = (data: any) => request('/wx/customPage/save', 'POST', data); export let saveCustomPage = (data: any) => request('/wx/customPage/save', 'POST', data);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论