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

添加字段

上级 f7657580
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<text class="details-center">{{ item1.specifications[0] }}</text> <text class="details-center">{{ item1.specifications[0] }}</text>
<view class="details-bottom"> <view class="details-bottom">
<text style="color: #d50000; font-size: 34rpx">{{ item1.price.toFixed(2) }}</text> <text style="color: #d50000; font-size: 34rpx">{{ item1.price.toFixed(2) }}</text>
<text style="font-size: 24rpx; color: #ccc; margin-left: 20rpx">已开瓶数量:{{ item1.deCapNum }}</text>
<text style="font-size: 24rpx; color: #ccc; margin-left: 20rpx">{{ item1.number + '件' }}</text> <text style="font-size: 24rpx; color: #ccc; margin-left: 20rpx">{{ item1.number + '件' }}</text>
</view> </view>
</view> </view>
...@@ -63,28 +64,25 @@ ...@@ -63,28 +64,25 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import { onLoad } from '@dcloudio/uni-app'; import { getMSJFList } from '@/services/api';
import { getOrderList } from '@/services/api';
import headerVue from '@/pages/header/index.vue'; import headerVue from '@/pages/header/index.vue';
let color = ref('#a27443'); let color = ref('#a27443');
let checked = ref(true);
let money = ref('391.00');
let num = ref<any>(0);
// 订单数据 // 订单数据
let orderData = ref(); let orderData = ref();
// 图片标题 // 图片标题
let titleImg = ref([ // let titleImg = ref([
{ // {
imgUrl: '/static/msjf-picture/msjf-14.png' // imgUrl: '/static/msjf-picture/msjf-14.png'
}, // },
{ // {
imgUrl: '/static/msjf-picture/msjf-18.png' // imgUrl: '/static/msjf-picture/msjf-18.png'
}, // },
{ // {
imgUrl: '/static/msjf-picture/msjf-19.png' // imgUrl: '/static/msjf-picture/msjf-19.png'
} // }
]); // ]);
// let add = () => { // let add = () => {
// num.value++; // num.value++;
...@@ -96,14 +94,12 @@ let titleImg = ref([ ...@@ -96,14 +94,12 @@ let titleImg = ref([
// }; // };
// 获取订单数据 // 获取订单数据
let initOrderList = async () => { let initMSJFList = async () => {
let res: any = await getOrderList(); let res: any = await getMSJFList();
if (res.data.errno === 0) orderData.value = res.data.data.list; if (res.data.errno === 0) orderData.value = res.data.data.list;
}; };
onLoad(() => { initMSJFList();
initOrderList();
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -136,10 +132,6 @@ page { ...@@ -136,10 +132,6 @@ page {
.or-bottom { .or-bottom {
padding: 10rpx 30rpx; padding: 10rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
// display: flex;
// flex-direction: row;
// align-items: center;
// justify-content: space-around;
border-top: 1px solid #f2f2f2; border-top: 1px solid #f2f2f2;
border-bottom: 1px solid #f2f2f2; border-bottom: 1px solid #f2f2f2;
.or-left { .or-left {
...@@ -163,6 +155,7 @@ page { ...@@ -163,6 +155,7 @@ page {
.details-bottom { .details-bottom {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
} }
} }
} }
......
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
</view> </view>
</view> </view>
</view> </view>
<view type="primary" @click="upload" style="margin-top: 40rpx;" class="addImage"><view class="iconfont icon-jia"></view></view> <view @click="upload" style="margin: 40rpx 0 10rpx 0;" class="addImage"><view class="iconfont icon-jia"></view></view>
<button type="primary" @click="save" style="margin-top: 40rpx;">保存</button> <text style="padding-top: 20rpx;">只能上传图片或视频文件,且不超过20mb</text>
<button type="primary" @click="save" style="margin: 0 auto;">保存</button>
</uni-section> </uni-section>
</view> </view>
</template> </template>
...@@ -115,6 +116,9 @@ let uploadVideo = () => { ...@@ -115,6 +116,9 @@ let uploadVideo = () => {
uni.chooseVideo({ uni.chooseVideo({
sourceType: ['camera', 'album'], sourceType: ['camera', 'album'],
success(res: any) { success(res: any) {
uni.showLoading({
title: '上传中...'
});
uni.uploadFile({ uni.uploadFile({
url: baseURL + '/wx/storage/upload', url: baseURL + '/wx/storage/upload',
filePath: res.tempFilePath, filePath: res.tempFilePath,
...@@ -126,7 +130,7 @@ let uploadVideo = () => { ...@@ -126,7 +130,7 @@ let uploadVideo = () => {
type: data.type, type: data.type,
sort: imageVideoData.value.length sort: imageVideoData.value.length
}); });
console.log(imageVideoData.value); uni.hideLoading()
}, },
fail(res: any) { fail(res: any) {
console.log(res); console.log(res);
......
...@@ -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 getOrderList = () => request('/wx/order/list', 'GET'); export let getMSJFList = () => request('/wx/order/MSJFList', 'GET');
// 保存定制文件 // 保存定制文件
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论