This commit is contained in:
zmj 2024-05-13 18:43:53 +08:00
parent 9eef80130c
commit babdd302f2
5 changed files with 806 additions and 770 deletions

View File

@ -15,6 +15,9 @@
</view> </view>
</view> </view>
<view style="margin-top: 20rpx;" @click="showPop=true">
<text>2024-4-7</text>-<text>2024-4-7</text>
</view>
<view class="recoder"> <view class="recoder">
<view class="card" v-for="(item,index) in 10" :key="index"> <view class="card" v-for="(item,index) in 10" :key="index">
<view class="right"> <view class="right">

View File

@ -18,20 +18,19 @@
</view> </view>
</view> </view>
</up-sticky> </up-sticky>
<view class="content"> <view class="content">
<swiper class="swiper" circular> <!-- 报价列表 -->
<swiper-item>
<view v-if="showGoods1"> <view v-if="showGoods1">
<up-transition :show="showGoods1" mode="slide-left">
<view class="" v-if="goodsList1.length>0"> <view class="" v-if="goodsList1.length>0">
<view class="card" v-for="(item,index) in goodsList1" :key='index'> <view class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="head"> <view class="head">
<!-- <text> {{orer_sn}}</text> -->
<!-- <text style="color: #989898;">{{time}}</text> -->
</view> </view>
<view class="card-content"> <view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;"> <view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""> <image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
</image>
<view class="status"> <view class="status">
{{tabIndex==1?"未报价":"已报价" }} {{tabIndex==1?"未报价":"已报价" }}
</view> </view>
@ -47,6 +46,9 @@
<up-input :placeholderStyle="{fontSize:'20rpx'}" placeholder="输入报价数量" <up-input :placeholderStyle="{fontSize:'20rpx'}" placeholder="输入报价数量"
:readonly="tabIndex==2" v-model="item.nums" :readonly="tabIndex==2" v-model="item.nums"
style="background-color:#F6F6F6;border: none;"></up-input> style="background-color:#F6F6F6;border: none;"></up-input>
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
v-model="item.num"
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
<view style="width: 10rpx;"> <view style="width: 10rpx;">
</view> </view>
@ -56,6 +58,17 @@
v-model="item.price"></up-input> v-model="item.price"></up-input>
</view> </view>
</view> </view>
<!-- <view class="status-png" v-if="tabIndex==2">
<image v-if="is_storage==1 && is_adopt == 1" :src="waitPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else-if="is_storage==0 && is_adopt == 1" :src="waitPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else :src="waitPng" style="width: 108rpx; height: 84rpx;">
</image>
</view> -->
</view> </view>
<view class="card-footer" v-if="item.nums && item.price"> <view class="card-footer" v-if="item.nums && item.price">
{{item.nums}}{{item.unit_name}}&nbsp; &nbsp;合计:<text {{item.nums}}{{item.unit_name}}&nbsp; &nbsp;合计:<text
@ -66,17 +79,23 @@
</view> </view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> <up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty> </up-empty>
<!-- <button @click="test2">叫我按钮</button> -->
</up-transition>
</view> </view>
</swiper-item> <!-- 报价记录 -->
<swiper-item>
<view v-if="showGoods2"> <view v-if="showGoods2">
<view v-if="goodsList2.length>0"> <up-transition :show="showGoods2" mode="slide-right">
<view class="" v-if="goodsList2.length>0">
<view class="card" v-for="(item,index) in goodsList2" :key='index'> <view class="card" v-for="(item,index) in goodsList2" :key='index'>
<view class="head">
<!-- <text> {{orer_sn}}</text> -->
<!-- <text style="color: #989898;">{{time}}</text> -->
</view>
<view class="card-content"> <view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;"> <view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""> <image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
</image>
<view class="status"> <view class="status">
{{tabIndex==1?"未报价":"已报价" }} {{tabIndex==1?"未报价":"已报价" }}
</view> </view>
@ -92,6 +111,9 @@
<up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量"
:readonly="tabIndex==2" v-model="item.nums" :readonly="tabIndex==2" v-model="item.nums"
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input>
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
v-model="item.num"
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
<up-input placeholderStyle='fontSize:24rpx' <up-input placeholderStyle='fontSize:24rpx'
style="background-color: #F6F6F6;border: none;" placeholder="点击数入产品报价" style="background-color: #F6F6F6;border: none;" placeholder="点击数入产品报价"
@blur="priceBlur(index,goodsList2)" :readonly="tabIndex==2" @blur="priceBlur(index,goodsList2)" :readonly="tabIndex==2"
@ -99,8 +121,9 @@
</view> </view>
</view> </view>
<view class="status-png" v-if="tabIndex==2"> <view class="status-png" v-if="tabIndex==2">
<image v-if="item.is_adopt==1" :src="waitPng" <!-- <image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
style="width: 108rpx; height: 84rpx;"> </image> -->
<image v-if="item.is_adopt==1" :src="waitPng" style="width: 108rpx; height: 84rpx;">
</image> </image>
<image v-else-if="item.is_adopt==2" :src="successPng" <image v-else-if="item.is_adopt==2" :src="successPng"
style="width: 108rpx; height: 84rpx;"> style="width: 108rpx; height: 84rpx;">
@ -115,25 +138,13 @@
</view> </view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line> <up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view> </view>
</view> </view>
<up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png"> <up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty> </up-empty>
</up-transition>
</view> </view>
</swiper-item>
</swiper>
<!-- 报价列表 -->
<!-- 报价记录 -->
<view class="detail" @click="navgo('/pageQuota/Balance/detail')"> <view class="detail" @click="navgo('/pageQuota/Balance/detail')">
明细 明细
</view> </view>
@ -141,8 +152,6 @@
<up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button> <up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>

View File

@ -37,8 +37,8 @@
</view> </view>
</view> </view>
<view class="address-btn" v-if="datas.paid==0"> <view class="address-btn" v-if="datas.paid==0">
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle" color="#f6f6f6" <view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
:customStyle="{color:'#666666'}">修改</up-button></view> color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
</view> </view>
</view> </view>
<view class="m-card m-address" style="margin-top: 20rpx;" v-else> <view class="m-card m-address" style="margin-top: 20rpx;" v-else>
@ -49,13 +49,13 @@
</view> </view>
</view> </view>
<view class="address-btn" v-if="datas.paid==0"> <view class="address-btn" v-if="datas.paid==0">
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle" color="#f6f6f6" <view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
:customStyle="{color:'#666666'}">修改</up-button></view> color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
</view> </view>
</view> </view>
<view class="m-card m-good" v-for="(item,index) in datas.goods_list" :key="index"> <view class="m-card m-good" v-for="(item,index) in datas.goods_list" :key="index">
<view class="image"> <view class="image">
<up-image :src="item.imgs" width="160rpx" height="160rpx"></up-image> <up-image :src="item.imgs" width="120rpx" height="120rpx"></up-image>
</view> </view>
<view class="body-content"> <view class="body-content">
<view> <view>
@ -67,11 +67,12 @@
<view>{{item.goods_unit}}</view> <view>{{item.goods_unit}}</view>
<view>x{{item.nums}}</view> <view>x{{item.nums}}</view>
</view> </view>
</view>
<view class="time"> <view class="time">
{{item.msg}} {{item.msg}}
</view> </view>
</view> </view>
</view>
</view> </view>
<view class="m-card good-info" v-if="datas.paid==0"> <view class="m-card good-info" v-if="datas.paid==0">
<view v-if="datas.goods_list" class="row"> <view v-if="datas.goods_list" class="row">
@ -84,7 +85,9 @@
</view> </view>
<view class="row-need"> <view class="row-need">
<view style="margin-right: 10rpx;">需付款</view> <view style="margin-right: 10rpx;">需付款</view>
<view v-if="datas.total"><text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text></view> <view v-if="datas.total">
<text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text>
</view>
</view> </view>
</view> </view>
<view class="m-card good-info"> <view class="m-card good-info">
@ -138,35 +141,54 @@
<block v-if="!datas.paid"> <block v-if="!datas.paid">
<view style="color: #777777;" @click="showCancel=true">取消订单</view> <view style="color: #777777;" @click="showCancel=true">取消订单</view>
<view style="width: 450rpx;"> <view style="width: 450rpx;">
<up-button color="#20B128" shape="circle" @click="rePay" :throttleTime="1000">立即支付 ¥{{datas.total}}</up-button> <up-button color="#20B128" shape="circle" @click="rePay" :throttleTime="1000">立即支付
¥{{datas.total}}</up-button>
</view> </view>
</block> </block>
<block v-else> <block v-else>
<view></view> <view></view>
<view style="width: 450rpx;"> <view style="width: 450rpx;">
<up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle" @click="showTake=true">确认收货</up-button> <up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle"
@click="showTake=true">确认收货</up-button>
<up-button v-else color="#20B128" plain shape="circle" @click="purchaseAgain">再次购买</up-button> <up-button v-else color="#20B128" plain shape="circle" @click="purchaseAgain">再次购买</up-button>
</view> </view>
</block> </block>
</view> </view>
<orderCanclePopup :show="showCancel" @close="showCancel=false" @change="submitCancel" /> <orderCanclePopup :show="showCancel" @close="showCancel=false" @change="submitCancel" />
<addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress=false" @change="changeAddress" /> <addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress=false"
<shopListPopupVue ref="shopRef" :show="shopListShow" :list="merchantList" @change="changeAddress" />
@close="shopListShow=false" @change="changeShop" @search="searchShop" /> <shopListPopupVue ref="shopRef" :show="shopListShow" :list="merchantList" @close="shopListShow=false"
<modal :show="showTake" title="确认收货" content="请确认您已收到货" @close="showTake=false" @change="confirmReceipt"></modal> @change="changeShop" @search="searchShop" />
<modal :show="showTake" title="确认收货" content="请确认您已收到货" @close="showTake=false" @change="confirmReceipt">
</modal>
</view> </view>
</template> </template>
<script setup> <script setup>
import { onLoad, onBackPress } from "@dcloudio/uni-app"; import {
import { nextTick, ref } from "vue"; onLoad,
onBackPress
} from "@dcloudio/uni-app";
import {
nextTick,
ref
} from "vue";
import addressPopup from "@/components/addressPopup.vue"; import addressPopup from "@/components/addressPopup.vue";
import orderCanclePopup from "@/components/orderCanclePopup.vue"; import orderCanclePopup from "@/components/orderCanclePopup.vue";
import shopListPopupVue from "@/components/shopListPopup.vue"; import shopListPopupVue from "@/components/shopListPopup.vue";
import modal from "@/components/modal.vue"; import modal from "@/components/modal.vue";
import { orderDetailApi, cancelOrderApi, rePaymentApi, confirmReceiptApi, purchaseAgainApi } from "@/api/order.js" import {
import { addressListsApi, merchantListApi } from "@/api/user.js"; orderDetailApi,
cancelOrderApi,
rePaymentApi,
confirmReceiptApi,
purchaseAgainApi
} from "@/api/order.js"
import {
addressListsApi,
merchantListApi
} from "@/api/user.js";
const showCancel = ref(false); const showCancel = ref(false);
const showTake = ref(false); const showTake = ref(false);
@ -176,7 +198,7 @@
cancelOrderApi({ cancelOrderApi({
order_id: datas.value.id, order_id: datas.value.id,
value: e.value value: e.value
}).then(res=>{ }).then(res => {
uni.showToast({ uni.showToast({
title: '取消成功', title: '取消成功',
icon: 'none' icon: 'none'
@ -190,15 +212,15 @@
} }
const datas = ref({}) const datas = ref({})
const getDetails = ()=>{ const getDetails = () => {
orderDetailApi({ orderDetailApi({
order_id: datas.value.id order_id: datas.value.id
}).then(res=>{ }).then(res => {
datas.value = res.data; datas.value = res.data;
shopInfo.value = res.data.merchant_info; shopInfo.value = res.data.merchant_info;
if(addressList.value.length>0 && res.data.paid){ if (addressList.value.length > 0 && res.data.paid) {
addressInfo.value = addressList.value.find(item=>item.address_id == res.data.address_id); addressInfo.value = addressList.value.find(item => item.address_id == res.data.address_id);
}else { } else {
addressInfo.value = { addressInfo.value = {
address_id: res.data.address_id, address_id: res.data.address_id,
real_name: res.data.real_name, real_name: res.data.real_name,
@ -206,22 +228,22 @@
detail: res.data.user_address detail: res.data.user_address
} }
} }
nextTick(()=>{ nextTick(() => {
shopRef.value.setCheck(shopInfo.value.mer_id); shopRef.value.setCheck(shopInfo.value.mer_id);
addressRef.value.setCheck(addressInfo.value.address_id); addressRef.value.setCheck(addressInfo.value.address_id);
}) })
if(!res.data.paid){ if (!res.data.paid) {
targetDate = new Date(res.data.create_time).getTime() + 30*60*1000; targetDate = new Date(res.data.create_time).getTime() + 30 * 60 * 1000;
// //
timer = setInterval(updateCountdown, 1000); timer = setInterval(updateCountdown, 1000);
updateCountdown(); updateCountdown();
} }
}).catch(err=>{ }).catch(err => {
uni.navigateBack(); uni.navigateBack();
}) })
} }
const c_price = (price, index=0)=>{ const c_price = (price, index = 0) => {
price = price + ''; price = price + '';
return price.split('.')[index] || (index ? '00' : '0'); return price.split('.')[index] || (index ? '00' : '0');
} }
@ -230,32 +252,32 @@
const addressRef = ref(null); const addressRef = ref(null);
const showAddress = ref(false); const showAddress = ref(false);
const addressInfo = ref({ const addressInfo = ref({
address_id:'' address_id: ''
}); });
const changeAddress = (e) => { const changeAddress = (e) => {
addressInfo.value = e; addressInfo.value = e;
showAddress.value = false; showAddress.value = false;
} }
const openAddress = ()=>{ const openAddress = () => {
if(addressList.length>0) showAddress.value=true; if (addressList.length > 0) showAddress.value = true;
else uni.navigateTo({ else uni.navigateTo({
url: '/pagesOrder/addressEdit/addressEdit' url: '/pagesOrder/addressEdit/addressEdit'
}) })
} }
// //
const addressList = ref([]); const addressList = ref([]);
const getAddressList = ()=>{ const getAddressList = () => {
addressListsApi().then(res=>{ addressListsApi().then(res => {
addressList.value = res.data.lists; addressList.value = res.data.lists;
addressList.value.forEach(item=>{ addressList.value.forEach(item => {
if(item.is_default) { if (item.is_default) {
addressInfo.value = item; addressInfo.value = item;
} }
}) })
if(addressList.value.length>0){ if (addressList.value.length > 0) {
addressInfo.value = addressList.value[0]; addressInfo.value = addressList.value[0];
} }
if(addressInfo.value.address_id) nextTick(()=>{ if (addressInfo.value.address_id) nextTick(() => {
addressRef.value.setCheck(addressInfo.value.address_id); addressRef.value.setCheck(addressInfo.value.address_id);
}) })
}) })
@ -281,7 +303,7 @@
if (mer_name === null && myAddressInfo.value.long && merchantList.value.length > 0 && !shopInfo if (mer_name === null && myAddressInfo.value.long && merchantList.value.length > 0 && !shopInfo
.value.mer_id) { .value.mer_id) {
shopInfo.value = merchantList.value[0]; shopInfo.value = merchantList.value[0];
nextTick(()=>{ nextTick(() => {
shopRef.value.setCheck(shopInfo.value.mer_id); shopRef.value.setCheck(shopInfo.value.mer_id);
}) })
} }
@ -311,14 +333,14 @@
getMerchantList(e) getMerchantList(e)
} }
const rePay = ()=>{ const rePay = () => {
rePaymentApi({ rePaymentApi({
order_id: datas.value.id, order_id: datas.value.id,
mer_id: shopInfo.value.mer_id, mer_id: shopInfo.value.mer_id,
address_id: addressInfo.value.address_id, address_id: addressInfo.value.address_id,
pay_type: 1 pay_type: 1
}).then(res=>{ }).then(res => {
if(!res.data?.nonceStr) return uni.$u.toast('支付失败!'); if (!res.data?.nonceStr) return uni.$u.toast('支付失败!');
uni.requestPayment({ uni.requestPayment({
provider: 'wxpay', provider: 'wxpay',
timeStamp: res.data.timeStamp, timeStamp: res.data.timeStamp,
@ -327,7 +349,7 @@
signType: res.data.signType, signType: res.data.signType,
paySign: res.data.paySign, paySign: res.data.paySign,
success: (e) => { success: (e) => {
if(e.errMsg == 'requestPayment:ok'){ if (e.errMsg == 'requestPayment:ok') {
uni.showModal({ uni.showModal({
title: '订单支付成功', title: '订单支付成功',
confirmText: '确认', confirmText: '确认',
@ -339,22 +361,22 @@
}); });
} }
}) })
}else uni.$u.toast('支付失败') } else uni.$u.toast('支付失败')
}, },
fail: (e) => { fail: (e) => {
uni.$u.toast('用户取消支付') uni.$u.toast('用户取消支付')
} }
}) })
}).catch(err=>{ }).catch(err => {
uni.$u.toast('网络错误') uni.$u.toast('网络错误')
}) })
} }
// //
const purchaseAgain = ()=>{ const purchaseAgain = () => {
purchaseAgainApi({ purchaseAgainApi({
order_id: datas.value.id order_id: datas.value.id
}).then(res=>{ }).then(res => {
uni.$u.toast('已加入购物车'); uni.$u.toast('已加入购物车');
}) })
} }
@ -368,14 +390,15 @@
function updateCountdown() { function updateCountdown() {
const now = new Date().getTime(); const now = new Date().getTime();
const distance = targetDate - now; const distance = targetDate - now;
if(distance<0) return clearInterval(timer); if (distance < 0) return clearInterval(timer);
// //
const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((distance % (1000 * 60)) / 1000); const seconds = Math.floor((distance % (1000 * 60)) / 1000);
countDown.value = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`; countDown.value =
`${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
// //
if (distance < 0) { if (distance < 0) {
@ -385,10 +408,10 @@
} }
// //
const confirmReceipt = ()=>{ const confirmReceipt = () => {
confirmReceiptApi({ confirmReceiptApi({
order_id: datas.value.id order_id: datas.value.id
}).then(res=>{ }).then(res => {
showTake.value = false; showTake.value = false;
uni.$u.toast('确认收货成功'); uni.$u.toast('确认收货成功');
uni.navigateBack({ uni.navigateBack({
@ -400,7 +423,7 @@
} }
// //
const callPhone = (phone)=>{ const callPhone = (phone) => {
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: phone phoneNumber: phone
}) })
@ -410,13 +433,13 @@
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: option.type == 0 ? '等待付款' : '订单详情' title: option.type == 0 ? '等待付款' : '订单详情'
}) })
if(option.id) { if (option.id) {
datas.value.id = option.id; datas.value.id = option.id;
getDetails() getDetails()
} }
}) })
onBackPress(()=>{ onBackPress(() => {
clearInterval(timer); clearInterval(timer);
console.log("清除"); console.log("清除");
}) })
@ -475,8 +498,8 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
.image { .image {
width: 160rpx; width: 120rpx;
height: 160rpx; height: 120rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 14rpx; border-radius: 14rpx;
overflow: hidden; overflow: hidden;
@ -488,6 +511,7 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
color: #989898; color: #989898;
// background-color: red;
.title { .title {
display: flex; display: flex;
@ -542,6 +566,4 @@
font-size: 22rpx; font-size: 22rpx;
} }
} }
</style> </style>

View File

@ -26,15 +26,17 @@
<view class="all"> {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view> <view class="all"> {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view>
</view> </view>
<view v-if="datas.paid==0" class="item-btn"> <view v-if="datas.paid==0" class="item-btn">
<view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle" @click="cancleOrder">取消订单</up-button></view> <view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle"
<view style="width: 80px;"><up-button size="small" color="#20B128" shape="circle" @click="rePay">立即支付</up-button></view> @click="cancleOrder">取消订单</up-button></view>
<view style="width: 80px;"><up-button size="small" color="#20B128" shape="circle"
@click="rePay">立即支付</up-button></view>
</view> </view>
<view v-else class="item-btn"> <view v-else class="item-btn">
<!-- <view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">申请售后</up-button></view> --> <!-- <view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">申请售后</up-button></view> -->
<view @click="takeOrder" v-if="datas.status==1" style="width: 80px;"><up-button size="small" color="#20B128" <view @click="takeOrder" v-if="datas.status==1" style="width: 80px;"><up-button size="small" color="#20B128"
shape="circle">确认收货</up-button></view> shape="circle">确认收货</up-button></view>
<view @click="purchaseAgain" v-if="datas.status==2||datas.status==3" style="width: 80px;"><up-button size="small" plain color="#20B128" <view @click="purchaseAgain" v-if="datas.status==2||datas.status==3" style="width: 80px;"><up-button
shape="circle">再次购买</up-button></view> size="small" plain color="#20B128" shape="circle">再次购买</up-button></view>
<view @click="navTo" style="width: 80px;"><up-button size="small" plain color="#20B128" <view @click="navTo" style="width: 80px;"><up-button size="small" plain color="#20B128"
shape="circle">查看详情</up-button></view> shape="circle">查看详情</up-button></view>
</view> </view>
@ -68,19 +70,19 @@
} }
const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']); const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']);
const cancleOrder = ()=>{ const cancleOrder = () => {
emit('cancleOrder', props.datas) emit('cancleOrder', props.datas)
} }
const takeOrder = ()=>{ const takeOrder = () => {
emit('takeOrder', props.datas) emit('takeOrder', props.datas)
} }
const purchaseAgain = ()=>{ const purchaseAgain = () => {
emit('purchaseAgain', props.datas) emit('purchaseAgain', props.datas)
} }
const rePay = ()=>{ const rePay = () => {
emit('rePay', props.datas) emit('rePay', props.datas)
} }
</script> </script>
@ -108,8 +110,8 @@
color: #989898; color: #989898;
.image { .image {
width: 160rpx; width: 120rpx;
height: 160rpx; height: 120rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 14rpx; border-radius: 14rpx;
} }

View File

@ -25,7 +25,7 @@ const useUserStore = defineStore("user", () => {
// #ifdef H5 // #ifdef H5
token.value = "4f8bef69a4b5a195e9d69a3a72955827" token.value = "9cc93459ebdb4a2367a53a08b3d96e89"
// token.value = "95b24dd6d2dda836fe07854b08ba0944" // token.value = "95b24dd6d2dda836fe07854b08ba0944"
userInfo.value = { userInfo.value = {
avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png", avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png",
@ -35,7 +35,7 @@ const useUserStore = defineStore("user", () => {
mobile: "19330904744", mobile: "19330904744",
nickname: "用户1714964250", nickname: "用户1714964250",
supplier: null, supplier: null,
token: "4f8bef69a4b5a195e9d69a3a72955827" token: "9cc93459ebdb4a2367a53a08b3d96e89"
} }
// #endif // #endif