订单接口数据接入
@ -3,102 +3,85 @@
|
||||
<view class="cont">
|
||||
<view class="cont_top">
|
||||
<view class="cont_top_l">
|
||||
<view class="cont_top_text">商品评价 <text class="cont_top_num">0</text>/2</view>
|
||||
<view class="cont_top_text">商品评价 <text class="cont_top_num">{{count}}</text>/{{evalList.length}}</view>
|
||||
<view class="cont_top_btn">一键好评</view>
|
||||
</view>
|
||||
<view class="cont_top_r">匿名</view>
|
||||
</view>
|
||||
<view class="cont_shop">
|
||||
|
||||
|
||||
<template v-for="(item,index) in evalList" :key="index">
|
||||
<view class="cont_shop" @click="unfold(item)">
|
||||
<view class="cont_shop_l">
|
||||
<view class="cont_shop_img">
|
||||
<image class="cont_shop_imgUrl" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
<image class="cont_shop_imgUrl" :src="item.image" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="cont_shop_x">
|
||||
<view class="cont_shop_title">泡椒田鸡</view>
|
||||
<view class="cont_shop_title"><text>{{item.storeName}}</text></view>
|
||||
<view class="cont_shop_type">
|
||||
<view class="cont_goos"><image class="cont_goos_img" src="../../static/eval/negative_aver.png" mode="widthFix"></image>差评</view>
|
||||
<view class="cont_goos"><image class="cont_goos_img" src="../../static/eval/ordinary.png" mode="widthFix"></image>一般</view>
|
||||
<view class="cont_goos"><image class="cont_goos_img" src="../../static/eval/good.png" mode="widthFix"></image>好评</view>
|
||||
<block v-for="(i,idx) in item.list" :key="idx">
|
||||
<view @click.stop="clickEval(item,i)" class="cont_goos" :class="i.checkedShow?'cont_goos_aver':''"><image class="cont_goos_img" :src="i.checkedShow?i.imgUrl_aver:i.imgUrl" mode="widthFix"></image>{{i.name}}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<block v-if="item.show">
|
||||
<view class="cont_shop_edit">
|
||||
<view class="cont_text">
|
||||
<image class="cont_text_img" src="../../static/eval/editeval.png"></image>
|
||||
<textarea class="cont_textarea" :disable-default-padding="isIos" placeholder="走心评价会创造出更多好货哦~"></textarea>
|
||||
<textarea class="cont_textarea" :disable-default-padding="isIos" placeholder="可以从新鲜度、包装等多个角度描述哦~" v-model="item.comment"></textarea>
|
||||
</view>
|
||||
<view class="cont_ul">
|
||||
<view class="cont_li">
|
||||
<view class="cont_upload_remove">
|
||||
|
||||
<view class="cont_li" v-for="(img,i) in item.uploadImg" :key="i">
|
||||
<view class="cont_upload_remove" @click="delImg(item,i)">
|
||||
<image class="cont_upload_remove_img" src="../../static/eval/closeImg.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<image class="cont_li_img" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
<image class="cont_li_img" :src="img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="cont_li cont_upload">
|
||||
|
||||
<view class="cont_li cont_upload" @click="chooseImage(item)" v-if="item.uploadImg.length <= 5">
|
||||
<image class="cont_upload_img" src="../../static/eval/adds.png" mode="widthFix"></image>
|
||||
<view class="cont_upload_text">添加图片</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cont_shop_border"></view>
|
||||
</block>
|
||||
</template>
|
||||
|
||||
<view class="cont_shop">
|
||||
<view class="cont_shop_l">
|
||||
<view class="cont_shop_img">
|
||||
<image class="cont_shop_imgUrl" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="cont_shop_x">
|
||||
<view class="cont_shop_title">泡椒田鸡</view>
|
||||
<view class="cont_shop_type">
|
||||
<view class="cont_goos"><image class="cont_goos_img" src="../../static/eval/negative_aver.png" mode="widthFix"></image>差评</view>
|
||||
<view class="cont_goos"><image class="cont_goos_img" src="../../static/eval/ordinary.png" mode="widthFix"></image>一般</view>
|
||||
<view class="cont_goos"><image class="cont_goos_img" src="../../static/eval/good.png" mode="widthFix"></image>好评</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop_edit">
|
||||
<view class="cont_text">
|
||||
<image class="cont_text_img" src="../../static/eval/editeval.png"></image>
|
||||
<textarea :disable-default-padding="isIos" class="cont_textarea" placeholder="走心评价会创造出更多好货哦~"></textarea>
|
||||
</view>
|
||||
<view class="cont_ul">
|
||||
<view class="cont_li">
|
||||
<view class="cont_upload_remove">
|
||||
<image class="cont_upload_remove_img" src="../../static/eval/closeImg.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<image class="cont_li_img" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="cont_li cont_upload">
|
||||
<image class="cont_upload_img" src="../../static/eval/adds.png" mode="widthFix"></image>
|
||||
<view class="cont_upload_text">添加图片</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 300rpx;"></view>
|
||||
|
||||
<view class="footer">
|
||||
<view class="footer_btn">提交</view>
|
||||
<view class="footer_btn" :class="count == 0?'opy':''">提交</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { loads } from '@/utils/index.js'
|
||||
import { computed,ref,onMounted,onUnmounted,getCurrentInstance,nextTick } from 'vue';
|
||||
import { useCounterStore } from '@/store/counter'; // 引入 Pinia Store
|
||||
import { storeToRefs } from 'pinia';//实现解构付值
|
||||
import { onLoad,onShow,onPullDownRefresh,onPageScroll,onReachBottom,onReady } from "@dcloudio/uni-app"
|
||||
import { orderReplyproduct } from "@/server/api.js"
|
||||
const counterStore = useCounterStore(); // 使用 Store
|
||||
const { proxy } = getCurrentInstance();
|
||||
//使用pinia:storeToRefs方法包裹(保持响应式更新,不使用视图无法更新)
|
||||
const {statusHeight,headerHeight,statusBartop } = storeToRefs(counterStore);
|
||||
const active = ref(0);
|
||||
const isIos = ref(false);
|
||||
const orderNo = ref("");
|
||||
const evalList = ref([]);
|
||||
|
||||
const count = computed(() => {
|
||||
const count = evalList.value.filter(item => item.productScore > 0);
|
||||
return count.length
|
||||
});
|
||||
|
||||
const System = () =>{
|
||||
const phone = wx.getSystemInfoSync();
|
||||
if (phone.platform == 'ios') {
|
||||
@ -107,9 +90,137 @@ const System = () =>{
|
||||
isIos.value = false
|
||||
}
|
||||
};
|
||||
const unfold = (e) =>{
|
||||
evalList.value.forEach((item,index)=>{
|
||||
if(e.id == item.id){item.show = !item.show;}
|
||||
})
|
||||
}
|
||||
const clickEval = (item,i) =>{
|
||||
let productScore = 0;
|
||||
evalList.value.forEach(evalList=>{
|
||||
if(item.id == evalList.id){
|
||||
evalList.list.forEach(item=>{
|
||||
if(i.id == item.id){
|
||||
item.checkedShow = true;
|
||||
if(i.id == 1){
|
||||
productScore = 2;
|
||||
}else if(i.id == 2){
|
||||
productScore = 4;
|
||||
}else{
|
||||
productScore = 5;
|
||||
}
|
||||
}else{
|
||||
item.checkedShow = false;
|
||||
}
|
||||
})
|
||||
if(item.id == evalList.id){
|
||||
item.show = true;
|
||||
item.productScore = productScore;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const api_orderReplyproduct=()=>{
|
||||
loads('', true)
|
||||
const params = {
|
||||
orderNo:orderNo.value
|
||||
}
|
||||
return orderReplyproduct(params).then(({data}) => {
|
||||
uni.hideLoading();
|
||||
data.forEach((item,index) => {
|
||||
item.id = index+1;
|
||||
if(data.length > 1){
|
||||
item.show = false;
|
||||
}else{
|
||||
item.show = true;
|
||||
}
|
||||
item.comment = "";
|
||||
item.pics = "";
|
||||
item.productScore = 0;
|
||||
item.serviceScore = 0;
|
||||
item.uploadImg = [];
|
||||
item.list = [
|
||||
{
|
||||
id:1,
|
||||
imgUrl:'../../static/eval/negative.png',
|
||||
imgUrl_aver:'../../static/eval/negative_aver.png',
|
||||
name:"差评",
|
||||
checkedShow:false
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
imgUrl:'../../static/eval/ordinary.png',
|
||||
imgUrl_aver:'../../static/eval/ordinary_aver.png',
|
||||
name:"一般",
|
||||
checkedShow:false
|
||||
},
|
||||
{
|
||||
id:3,
|
||||
imgUrl:'../../static/eval/good.png',
|
||||
imgUrl_aver:'../../static/eval/good_aver.png',
|
||||
name:"好评",
|
||||
checkedShow:false
|
||||
}
|
||||
]
|
||||
})
|
||||
evalList.value = data;
|
||||
}).catch(({message}) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false,
|
||||
success: () => {
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//删除上传图片
|
||||
const delImg = (e,i) =>{
|
||||
evalList.value.forEach(item=>{
|
||||
if(e.id == item.id){
|
||||
console.log('000000')
|
||||
const tempFileimg = item.uploadImg.slice()
|
||||
// const picture = this.picture.slice()
|
||||
tempFileimg.splice(i, 1)
|
||||
// picture.splice(i, 1)
|
||||
item.uploadImg = tempFileimg
|
||||
// this.picture = picture
|
||||
}
|
||||
})
|
||||
}
|
||||
//选择图片
|
||||
const chooseImage = (e) => {
|
||||
uni.chooseImage({
|
||||
count: 6, // 最多选择6张
|
||||
sizeType: ['original', 'compressed'], // 可选择原图或压缩图
|
||||
sourceType: ['album', 'camera'], // 可从相册或相机选择
|
||||
success: (res) => {
|
||||
// imageList.value = res.tempFilePaths; // 获取临时路径
|
||||
evalList.value.forEach(item=>{
|
||||
if(e.id == item.id){
|
||||
item.uploadImg.push(res.tempFilePaths)
|
||||
}
|
||||
})
|
||||
console.log('evalList--',evalList.value);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('选择图片失败:', err);
|
||||
uni.showToast({ title: '选择图片失败', icon: 'none' });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
onLoad((options) => {
|
||||
System();
|
||||
if(options.orderNo){
|
||||
orderNo.value = options.orderNo;
|
||||
}
|
||||
api_orderReplyproduct();
|
||||
});
|
||||
onShow(() => {});
|
||||
onReady(()=>{})
|
||||
|
@ -49,6 +49,7 @@ page{
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0rpx 25rpx 0rpx 25rpx ;
|
||||
margin-bottom: 25rpx;
|
||||
.cont_shop_l{
|
||||
display: flex;
|
||||
.cont_shop_img{
|
||||
@ -61,6 +62,7 @@ page{
|
||||
width: 114rpx;
|
||||
height: 114rpx;
|
||||
display: block;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
.cont_shop_x{
|
||||
@ -69,6 +71,15 @@ page{
|
||||
color: #333333;
|
||||
margin-left: 25rpx;
|
||||
font-weight: 500;
|
||||
min-height: 50rpx;
|
||||
}
|
||||
.cont_shop_title text{
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
.cont_shop_type{
|
||||
display: flex;
|
||||
@ -86,6 +97,11 @@ page{
|
||||
|
||||
}
|
||||
}
|
||||
.cont_goos_aver{
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +124,7 @@ page{
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.cont_shop_edit{
|
||||
margin:25rpx 25rpx 0rpx 25rpx;
|
||||
margin:0rpx 25rpx 0rpx 25rpx;
|
||||
background: #F7F8FA;
|
||||
border-radius: 16rpx;
|
||||
padding-bottom: 25rpx;
|
||||
@ -226,6 +242,7 @@ page{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.opy{
|
||||
opacity: 0.2;
|
||||
}
|
@ -82,7 +82,7 @@
|
||||
<view class="cont conttop">
|
||||
<view class="cont_title">订单备注</view>
|
||||
<view class="cont_textarea">
|
||||
<textarea class="cont_textarea_text" :disable-default-padding="isIos" placeholder="选填,可以告诉我们您的特殊需求"></textarea>
|
||||
<textarea class="cont_textarea_text" :disable-default-padding="isIos" placeholder="选填,可以告诉我们您的特殊需求" v-model="mark"></textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 200rpx;"></view>
|
||||
@ -92,7 +92,7 @@
|
||||
<text class="footer_price">{{payFee}}</text>
|
||||
<view class="footer_coupon" v-if="couponFee > 0">共优惠<text class="footer_coupon_price">{{couponFee}}</text></view>
|
||||
</view>
|
||||
<view class="footer_btn">去支付</view>
|
||||
<view class="footer_btn" @click="api_orderCreate">去支付</view>
|
||||
</view>
|
||||
<uni-popup ref="shopPopup" type="bottom" @change="changeShop">
|
||||
<view class="shop_open">
|
||||
@ -178,8 +178,10 @@ import { computed,ref } from 'vue';
|
||||
import { useCounterStore } from '@/store/counter'; // 引入 Pinia Store
|
||||
import { storeToRefs } from 'pinia';//实现解构付值
|
||||
import { onLoad,onShow,onPullDownRefresh,onReachBottom } from "@dcloudio/uni-app"
|
||||
import { orderloadpre,deliverytimes,addresslist,couponlist,computedprice } from "@/server/api.js"
|
||||
import { orderloadpre,deliverytimes,addresslist,couponlist,computedprice,ordercreate } from "@/server/api.js"
|
||||
const counterStore = useCounterStore(); // 使用 Store
|
||||
//使用pinia:storeToRefs方法包裹(保持响应式更新,不使用视图无法更新)
|
||||
const {storeId} = storeToRefs(counterStore);
|
||||
const isDefault = ref(0);
|
||||
const shopPopup = ref(null);
|
||||
const shopShow = ref(false);
|
||||
@ -214,6 +216,9 @@ const proTotalFee = ref('');
|
||||
const surplusIntegral = ref('');
|
||||
const useIntegral = ref(false);
|
||||
const usedIntegral = ref('');
|
||||
const mark = ref('');
|
||||
const deliveryTime = ref('');
|
||||
const timedate = ref('');
|
||||
//使用pinia:storeToRefs方法包裹(保持响应式更新,不使用视图无法更新)
|
||||
//const { count,doubleCount } = storeToRefs(counterStore);
|
||||
const isIos = ref(false);
|
||||
@ -328,6 +333,8 @@ const api_deliverytimes=()=>{
|
||||
time_list.value = data[0].times
|
||||
timeKey.value = data[0].key
|
||||
time.value = timeKey.value + data[0].times[0];
|
||||
timedate.value = data[0].date
|
||||
deliveryTime.value = timedate.value +" "+data[0].times[0]
|
||||
timeHover.value = 0;
|
||||
})
|
||||
.catch(({message}) => {
|
||||
@ -343,12 +350,15 @@ const timeName=(e,index)=>{
|
||||
const selectedItems = time_title.value.filter(item => item.id === e.id);
|
||||
time_list.value = selectedItems[0].times
|
||||
timeKey.value = e.key;
|
||||
deliveryTime.value = e.date
|
||||
timedate.value = e.date
|
||||
timeHover.value = -1
|
||||
}
|
||||
const timeList=(item,index)=>{
|
||||
if(timeHover.value == index) return false;
|
||||
timeHover.value = index;
|
||||
time.value = timeKey.value + item;
|
||||
deliveryTime.value = timedate.value +" "+ item
|
||||
}
|
||||
const OpenCoupon =() =>{
|
||||
couponShow.value ? couponPopup.value.close():couponPopup.value.open()
|
||||
@ -374,6 +384,52 @@ const api_couponlist=()=>{
|
||||
})
|
||||
})
|
||||
}
|
||||
//创建订单
|
||||
const api_orderCreate=()=>{
|
||||
const params = {
|
||||
payChannel: "routine",
|
||||
payType: "weixin",
|
||||
preOrderNo:preOrderNos.value,
|
||||
shippingType: 3,
|
||||
storeId:storeId.value,
|
||||
useIntegral:false
|
||||
}
|
||||
if(storeId.value){
|
||||
params.storeId = storeId.value;
|
||||
}
|
||||
if(deliveryTime.value){
|
||||
params.deliveryTime = deliveryTime.value;
|
||||
}
|
||||
if(orderInfoVo.value.realName){
|
||||
params.realName = orderInfoVo.value.realName;
|
||||
}
|
||||
if(mark.value){
|
||||
params.mark = mark.value;
|
||||
}
|
||||
if(orderInfoVo.value.phone){
|
||||
params.phone = orderInfoVo.value.phone;
|
||||
}
|
||||
if(orderInfoVo.value.addressId){
|
||||
params.addressId = orderInfoVo.value.addressId;
|
||||
}
|
||||
if(couponId.value){
|
||||
params.couponId = couponId.value;
|
||||
}
|
||||
loads('', true)
|
||||
return ordercreate(params).then(({data}) => {
|
||||
uni.hideLoading();
|
||||
|
||||
}).catch(({message}) => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
onLoad((options) => {
|
||||
const { preOrderNo } = options;
|
||||
preOrderNos.value = preOrderNo;
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="main">
|
||||
<view class="main" v-if="apiShow">
|
||||
<view class="cont flex">
|
||||
<view class="cont_order_type">
|
||||
<view class="cont_order_type_name">已完成</view>
|
||||
<view class="cont_order_type_desc">期待与您再次相遇</view>
|
||||
<view class="cont_order_type_name">{{orderDetails.statustext}}</view>
|
||||
<view class="cont_order_type_desc" v-if="orderDetails.orderStatusMsg && orderDetails.status != 5">{{orderDetails.orderStatusMsg}}</view>
|
||||
</view>
|
||||
<view class="cont_service">
|
||||
<image class="cont_service_img" src="../../static/order/ridertel.png" mode="widthFix"></image>
|
||||
@ -12,140 +12,280 @@
|
||||
</view>
|
||||
|
||||
<view class="cont paddom">
|
||||
<view class="cont_title cont_border">商品信息<text>共6件</text></view>
|
||||
<view class="cont_shop">
|
||||
<view class="cont_title cont_border">商品信息<text>共{{orderDetails.totalcartNum}}件</text></view>
|
||||
<view class="cont_shop" v-for="(item,index) in orderInfoList" :key="index">
|
||||
<view class="cont_shop_l">
|
||||
<view class="cont_shop_img">
|
||||
<image class="cont_shop_imgUrl" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
<image class="cont_shop_imgUrl" :src="item.image" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="cont_shop_text">
|
||||
<view class="cont_shop_title">糖醋排骨</view>
|
||||
<view class="cont_shop_desc">单价:<text class="cont_shop_desc_price">5.98</text></view>
|
||||
<view class="cont_shop_desc">数量:1</view>
|
||||
<view class="cont_shop_title"><text>{{item.storeName}}</text></view>
|
||||
<view class="cont_shop_desc">单价:<text class="cont_shop_desc_price">{{item.price}}</text></view>
|
||||
<view class="cont_shop_desc">数量:{{item.cartNum}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop_r">
|
||||
<view class="cont_shop_payment">实付:<text class="cont_shop_payment_price">4.09</text></view>
|
||||
<view class="cont_shop_addcart">再来一件</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop">
|
||||
<view class="cont_shop_l">
|
||||
<view class="cont_shop_img">
|
||||
<image class="cont_shop_imgUrl" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="cont_shop_text">
|
||||
<view class="cont_shop_title">糖醋排骨</view>
|
||||
<view class="cont_shop_desc">单价:<text class="cont_shop_desc_price">5.98</text></view>
|
||||
<view class="cont_shop_desc">数量:1</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop_r">
|
||||
<view class="cont_shop_payment">实付:<text class="cont_shop_payment_price">4.09</text></view>
|
||||
<view class="cont_shop_addcart">再来一件</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop">
|
||||
<view class="cont_shop_l">
|
||||
<view class="cont_shop_img">
|
||||
<image class="cont_shop_imgUrl" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="cont_shop_text">
|
||||
<view class="cont_shop_title">糖醋排骨</view>
|
||||
<view class="cont_shop_desc">单价:<text class="cont_shop_desc_price">5.98</text></view>
|
||||
<view class="cont_shop_desc">数量:1</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop_r">
|
||||
<view class="cont_shop_payment">实付:<text class="cont_shop_payment_price">4.09</text></view>
|
||||
<view class="cont_shop_payment">实付:<text class="cont_shop_payment_price">{{item.totalPrice}}</text></view>
|
||||
<view class="cont_shop_addcart">再来一件</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop_border"></view>
|
||||
<view class="cont_shop_item">
|
||||
<view class="cont_shop_item_name">商品金额</view>
|
||||
<view class="cont_shop_item_value"><text class="cont_shop_item_value_price">5.98</text></view>
|
||||
<view class="cont_shop_item_value"><text class="cont_shop_item_value_price">{{orderDetails.proTotalPrice}}</text></view>
|
||||
</view>
|
||||
<view class="cont_shop_item">
|
||||
<view class="cont_shop_item_name">配送费</view>
|
||||
<view class="cont_shop_item_value"><text class="cont_shop_item_value_price">5.98</text></view>
|
||||
<view class="cont_shop_item_value"><text class="cont_shop_item_value_price">{{orderDetails.freightPrice}}</text></view>
|
||||
</view>
|
||||
<view class="cont_shop_item">
|
||||
<view class="cont_shop_item_name">满减券</view>
|
||||
<view class="cont_shop_item_value cont_shop_item_color">-<text class="cont_shop_item_value_price">5.98</text></view>
|
||||
<view class="cont_shop_item_value cont_shop_item_color">-<text class="cont_shop_item_value_price">{{orderDetails.couponPrice}}</text></view>
|
||||
</view>
|
||||
<view class="cont_shop_border"></view>
|
||||
<view class="cont_shop_total">实付:<text>99.45</text></view>
|
||||
<view class="cont_shop_total">实付:<text>{{orderDetails.payPrice}}</text></view>
|
||||
</view>
|
||||
<view class="cont paddom">
|
||||
<view class="cont_title cont_border">配送信息</view>
|
||||
<view class="cont_shop_user">
|
||||
<view class="cont_shop_user_name">地址:</view>
|
||||
<view class="cont_shop_user_desc">
|
||||
<view class="cont_shop_user_detal">琦善缘小区2号楼 5楼502</view>
|
||||
<view class="cont_shop_user_tel">李霜,178****8899</view>
|
||||
<view class="cont_shop_user_detal">{{orderDetails.userAddress}}</view>
|
||||
<view class="cont_shop_user_tel">{{orderDetails.realName}},{{orderDetails.userPhone}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop_user">
|
||||
<view class="cont_shop_user" v-if="orderDetails.payTime !== null">
|
||||
<view class="cont_shop_user_name">时间:</view>
|
||||
<view class="cont_shop_user_desc">
|
||||
<view class="cont_shop_user_detal">03/10 18:30-19:00</view>
|
||||
<view class="cont_shop_user_detal">{{orderDetails.payTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont_shop_user">
|
||||
<view class="cont_shop_user" v-if="orderDetails.mark !== null">
|
||||
<view class="cont_shop_user_name">备注:</view>
|
||||
<view class="cont_shop_user_desc">
|
||||
<view class="cont_shop_user_detal">多加点辣,一定要辣、一定要辣、一定要辣、一定要辣....</view>
|
||||
<view class="cont_shop_user_detal">{{orderDetails.mark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cont paddom">
|
||||
<view class="cont_title cont_border">订单信息</view>
|
||||
<view class="cont_shop_item">
|
||||
<view class="cont_shop_item" @click="copyText()">
|
||||
<view class="cont_shop_item_name">订单编号</view>
|
||||
<view class="cont_shop_item_value">35758859599447<text class="cont_shop_item_copy">复制</text></view>
|
||||
<view class="cont_shop_item_value">{{orderDetails.orderId}}<text class="cont_shop_item_copy">复制</text></view>
|
||||
</view>
|
||||
<view class="cont_shop_item">
|
||||
<view class="cont_shop_item_name">下单时间</view>
|
||||
<view class="cont_shop_item_value">2025/06/09 20:13</view>
|
||||
<view class="cont_shop_item_value">{{orderDetails.createTime}}</view>
|
||||
</view>
|
||||
<view class="cont_shop_item">
|
||||
<view class="cont_shop_item_name">支付方式</view>
|
||||
<view class="cont_shop_item_value">微信支付</view>
|
||||
<view class="cont_shop_item_value">{{orderDetails.payTypeStr}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height: 200rpx;"></view>
|
||||
<view class="footer">
|
||||
<view class="footer_l">更多</view>
|
||||
<view class="footer_l">
|
||||
<block v-if="orderDetails.status == 2 || orderDetails.status == 3 || orderDetails.status == 5">
|
||||
<view class="more_text" @click.stop="more_arr()">更多</view>
|
||||
<view class="more_open" v-if="openShow">
|
||||
<view class="more_cont">
|
||||
<view class="more_item more_border">分享</view>
|
||||
<view class="more_item" @click.stop="remove(item)">删除订单</view>
|
||||
</view>
|
||||
<view class="more_j"></view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="footer_r">
|
||||
<view class="footer_btn">去评价</view>
|
||||
<view class="footer_btn" v-if="orderDetails.status == 0" @click.stop="cancel()">取消订单</view>
|
||||
<view class="footer_btn" v-if="orderDetails.status == 1" @click.stop="confirmReceipt()">确认收货</view>
|
||||
<view class="footer_btn" v-if="orderDetails.status == 2" @click="evaluate()">去评价</view>
|
||||
<view class="footer_btn" v-if="orderDetails.status == 2" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="footer_btn footer_btn_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="openShow" v-if="openShow" @click="more_arr()"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import NP from 'number-precision';
|
||||
import { loads } from '@/utils/index.js'
|
||||
import { computed,ref,onMounted,onUnmounted,getCurrentInstance,nextTick } from 'vue';
|
||||
import { useCounterStore } from '@/store/counter'; // 引入 Pinia Store
|
||||
import { storeToRefs } from 'pinia';//实现解构付值
|
||||
import { onLoad,onShow,onPullDownRefresh,onPageScroll,onReachBottom,onReady } from "@dcloudio/uni-app"
|
||||
import { orderdetail,ordercancel,orderdel,ordertake } from "@/server/api.js"
|
||||
const counterStore = useCounterStore(); // 使用 Store
|
||||
const { proxy } = getCurrentInstance();
|
||||
//使用pinia:storeToRefs方法包裹(保持响应式更新,不使用视图无法更新)
|
||||
const {statusHeight,headerHeight,statusBartop } = storeToRefs(counterStore);
|
||||
const active = ref(0);
|
||||
const step = ref([
|
||||
{title:'售后申请已提交成功,客服将全力为您解决问题,请您耐心等待',desc:'2025/06/29 20:15'},
|
||||
{title:'售后申请已被受理,客服正在加速为您解决问题',desc:'2025/06/29 20:15'},
|
||||
{title:'您的退款申请已审核通过,商品无需退回',desc:'2025/06/29 20:15'},
|
||||
{title:'已将退款资金提交给原支付平台处理,预计将在3个工作日内到账。具体以原支付平台处理结果为准',desc:'2025/06/29 20:15'},
|
||||
{title:'退款已到账,请您注意查收,如有问题请联系客服',desc:'2025/06/29 20:15'},
|
||||
])
|
||||
onLoad((options) => {});
|
||||
const { storeId } = storeToRefs(counterStore);
|
||||
const orderId = ref("");
|
||||
const orderDetails = ref({});
|
||||
const orderInfoList = ref([]);
|
||||
const apiShow = ref(false);
|
||||
const openShow = ref(false);
|
||||
const evaluate = () =>{
|
||||
// uni.navigateTo({
|
||||
// url:`/order/orderevallist/orderevallist?type=0`
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:`/order/editeval/editeval?orderNo=${orderDetails.value.orderId}`
|
||||
})
|
||||
}
|
||||
const assDetail=()=>{
|
||||
uni.navigateTo({
|
||||
url:`/order/assedit/assedit`
|
||||
})
|
||||
};
|
||||
const more_arr = ()=>{
|
||||
openShow.value = !openShow.value
|
||||
}
|
||||
const copyText = () =>{
|
||||
uni.setClipboardData({
|
||||
data:'订单编号:'+orderDetails.value.orderId,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'success',
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '复制失败',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
const api_orderdetail=()=>{
|
||||
loads('', true)
|
||||
apiShow.vaue = false;
|
||||
return orderdetail(orderId.value).then(({data}) => {
|
||||
uni.hideLoading();
|
||||
apiShow.value = true;
|
||||
let statustext = "";
|
||||
if(data.status == 0){
|
||||
statustext = "待支付"
|
||||
}else if(data.status == 1){
|
||||
statustext = "待收货"
|
||||
}else if(data.status == 2){
|
||||
statustext = "已收货,待评价"
|
||||
}else if(data.status == 3){
|
||||
statustext = "已完成"
|
||||
}else if(data.status == 4){
|
||||
statustext = "备货中"
|
||||
}else{
|
||||
statustext = "已取消"
|
||||
}
|
||||
data.orderInfoList.forEach(item => {item.totalPrice = NP.round(NP.times(item.cartNum, item.price),2)})
|
||||
data.totalcartNum = data.orderInfoList.reduce((sum, item) => sum + item.cartNum, 0);
|
||||
data.statustext = statustext;
|
||||
orderDetails.value = data;
|
||||
orderInfoList.value = data.orderInfoList
|
||||
}).catch(({message}) => {
|
||||
apiShow.value = false;
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false,
|
||||
success: () => {
|
||||
uni.navigateBack({
|
||||
delta:1
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
//确认收货
|
||||
const confirmReceipt = ()=>{
|
||||
ordertake(orderDetails.value.id).then(({message}) => {
|
||||
uni.showToast({
|
||||
title:message,
|
||||
icon:'success',
|
||||
success: () => {
|
||||
setTimeout(()=>{
|
||||
api_orderdetail();
|
||||
},1400)
|
||||
}
|
||||
})
|
||||
}).catch(({message}) => {
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
//删除订单
|
||||
const remove = ()=>{
|
||||
uni.showModal({
|
||||
content:"您确定要删除当前订单吗?",
|
||||
confirmText:'确定',
|
||||
confirmColor:'#F14D48',
|
||||
success: ({confirm}) => {
|
||||
if (confirm) {
|
||||
orderdel(orderDetails.value.id).then(({message}) => {
|
||||
uni.showToast({
|
||||
title:message,
|
||||
icon:'success',
|
||||
success: () => {
|
||||
setTimeout(()=>{
|
||||
openShow.value = false;
|
||||
api_orderdetail();
|
||||
},1400)
|
||||
}
|
||||
})
|
||||
}).catch(({message}) => {
|
||||
openShow.value = false;
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
//取消订单
|
||||
const cancel = ()=>{
|
||||
uni.showModal({
|
||||
content:"您确定要取消当前订单吗?",
|
||||
confirmText:'确定',
|
||||
confirmColor:'#F14D48',
|
||||
success: ({confirm}) => {
|
||||
if (confirm) {
|
||||
ordercancel(orderDetails.value.id).then(({message}) => {
|
||||
uni.showToast({
|
||||
title:message,
|
||||
icon:'success',
|
||||
success: () => {
|
||||
setTimeout(()=>{
|
||||
api_orderdetail();
|
||||
},1400)
|
||||
}
|
||||
})
|
||||
}).catch(({message}) => {
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
onLoad((options) => {
|
||||
if(options.orderId){
|
||||
orderId.value = options.orderId
|
||||
api_orderdetail();
|
||||
}
|
||||
});
|
||||
onShow(() => {});
|
||||
onReady(()=>{})
|
||||
onPullDownRefresh(()=>{})
|
||||
onPullDownRefresh(()=>{
|
||||
api_orderdetail();
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
onReachBottom(()=>{})
|
||||
</script>
|
||||
|
||||
|
@ -90,12 +90,21 @@ page{
|
||||
}
|
||||
}
|
||||
.cont_shop_text{
|
||||
width: 330rpx;
|
||||
margin-left: 20rpx;
|
||||
.cont_shop_title{
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
.cont_shop_title text{
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
word-break: break-all;
|
||||
}
|
||||
.cont_shop_price{
|
||||
color: #333333;
|
||||
font-size: 26rpx;
|
||||
@ -229,26 +238,63 @@ page{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-top: 20rpx;
|
||||
padding-left: 25rpx;
|
||||
padding-right: 25rpx;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
border-top: 1rpx solid #efefef;
|
||||
.footer_l{
|
||||
padding: 20rpx 0rpx 20rpx 0rpx;
|
||||
position: relative;
|
||||
.more_text{
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
width: 150rpx;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
padding: 20rpx 0rpx 20rpx 0rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.more_open{
|
||||
position: absolute;
|
||||
left: -10rpx;
|
||||
z-index: 9999;
|
||||
top: -130rpx;
|
||||
.more_j{
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-left: 25rpx;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 15rpx solid transparent;
|
||||
border-right: 15rpx solid transparent;
|
||||
border-top: 15rpx solid #333333;
|
||||
margin-top: -2rpx;
|
||||
}
|
||||
.more_cont{
|
||||
background-color: #333333;
|
||||
border-radius: 10rpx;
|
||||
padding: 0rpx 20rpx 0rpx 20rpx;
|
||||
.more_item{
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
height: 65rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 125rpx;
|
||||
}
|
||||
.more_border{
|
||||
border-bottom: 1rpx solid #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.footer_r{
|
||||
display: flex;
|
||||
.footer_btn{
|
||||
padding: 13rpx 30rpx 13rpx 30rpx;
|
||||
padding: 13rpx 25rpx 13rpx 25rpx;
|
||||
border-radius: 50rpx;
|
||||
border: 1rpx solid #999999;
|
||||
font-size: 28rpx;
|
||||
font-size: 23rpx;
|
||||
color: #333333;
|
||||
margin-left: 20rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.footer_btn_bcg{
|
||||
border: 1rpx solid #FD3F3F;
|
||||
@ -258,3 +304,10 @@ page{
|
||||
}
|
||||
}
|
||||
}
|
||||
.openShow{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
height: 100vh;
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
</view>
|
||||
<view class="head_search" :style="{'width':searchWidth+'px','height':statusHeight+4+'px'}">
|
||||
<image class="head_search_img" src="../../static/search_img.png" mode="widthFix"></image>
|
||||
<input class="head_search_input" type="text" placeholder="请输入搜索内容" v-model="searchtext"/>
|
||||
<input class="head_search_input" type="text" placeholder="输入订单商品名称"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_nav">
|
||||
@ -18,196 +18,51 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_cont" :style="{'padding-top':statusHeight+headerHeight+61+'px'}">
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view v-for="(item,index) in shop_orderlist" :key="index" class="order_list" @click="orderDetail(item)">
|
||||
<view class="order_type">{{item.orderStatus}}</view>
|
||||
<view class="order_time">{{item.createTime}}</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_li" v-for="(i,idx) in item.orderInfoList" :key="index">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
<image class="order_scroll_img_url" :src="i.image" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_x">共{{item.totalNum}}件、 实付:<text class="order_price">{{item.payPrice}}</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_l">
|
||||
<block v-if="item.status == 2 || item.status == 3 || item.status == 5">
|
||||
<view class="more_text" @click.stop="more_arr(1,item)">更多</view>
|
||||
<view class="more_open" v-if="item.openShow">
|
||||
<view class="more_j"></view>
|
||||
<view class="more_cont">
|
||||
<view class="more_item more_border">分享</view>
|
||||
<view class="more_item" @click.stop="remove(item)">删除订单</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn" v-if="item.status == 0" @click.stop="cancel(item)">取消订单</view>
|
||||
<view class="order_btn" v-if="item.status == 1" @click.stop="confirmReceipt(item)">确认收货</view>
|
||||
<view class="order_btn" v-if="item.status == 2" @click.stop="evaluate(item)">去评价</view>
|
||||
<view class="order_btn" v-if="item.status == 2" @click.stop="assDetail(item)">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order_list" @click="orderDetail()">
|
||||
<view class="order_type">已完成</view>
|
||||
<view class="order_time">2025/1/15 17:20 周三</view>
|
||||
<view class="order_scroll">
|
||||
<scroll-view class="order_scroll_ul" :scroll-with-animation="true" :enhanced="true" :show-scrollbar="false" scroll-x="true">
|
||||
<view class="order_scroll_li">
|
||||
<view class="order_scroll_img">
|
||||
<image class="order_scroll_img_url" src="../../static/Mask.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="order_x">共3件、 实付:<text class="order_price">485</text></view>
|
||||
<view class="order_bottom">
|
||||
<view class="order_l">更多</view>
|
||||
<view class="order_r">
|
||||
<view class="order_btn" @click.stop="assDetail()">申请售后</view>
|
||||
<view class="order_btn order_bcg">再来一单</view>
|
||||
</view>
|
||||
<view class="empty" v-if="img_err && decs">
|
||||
<view class="empty_cont">
|
||||
<image class="empty_cont_img" :src="img_err" mode="widthFix"></image>
|
||||
<view class="empty_cont_title">{{decs}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="load_desc">{{decs}}</view>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<view class="openShow" v-if="openShow" @click="more_arr(2,show_id)"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -216,6 +71,7 @@ import { ref,computed } from 'vue';
|
||||
import { useCounterStore } from '@/store/counter'; // 引入 Pinia Store
|
||||
import { storeToRefs } from 'pinia';//实现解构付值
|
||||
import { onLoad,onShow,onPullDownRefresh,onReachBottom } from "@dcloudio/uni-app"
|
||||
import { orderlist,ordercancel,orderdel,ordertake } from "@/server/api.js"
|
||||
const counterStore = useCounterStore(); // 使用 Store
|
||||
//使用pinia:storeToRefs方法包裹(保持响应式更新,不使用视图无法更新)
|
||||
const {statusHeight,headerHeight,statusBartop,ButtonWidth,ButtonHeight } = storeToRefs(counterStore);
|
||||
@ -223,21 +79,27 @@ const navList = ref(['全部','待支付','备货中','待收货','待评价']);
|
||||
const active = ref(0);
|
||||
// 定义响应式数据,存储页面宽度
|
||||
const pageWidth = ref(0);
|
||||
const shop_orderlist = ref([]);
|
||||
const decs = ref('');
|
||||
const pages = ref(0);
|
||||
const limits = ref(10);
|
||||
const type = ref("");
|
||||
const img_err = ref("");
|
||||
const show_id = ref({});
|
||||
const openShow = ref(false);
|
||||
// 获取页面宽度
|
||||
const updatePageWidth = () => {
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
pageWidth.value = systemInfo.windowWidth;
|
||||
};
|
||||
|
||||
const searchWidth = computed(() => {
|
||||
return pageWidth.value - statusHeight.value - ButtonWidth.value - 35;
|
||||
});
|
||||
const assDetail=()=>{
|
||||
const assDetail=(item)=>{
|
||||
uni.navigateTo({
|
||||
url:`/order/assedit/assedit`
|
||||
})
|
||||
};
|
||||
|
||||
// 判断是否有上一页
|
||||
const getPages = () => {
|
||||
const pages = getCurrentPages();
|
||||
@ -254,37 +116,202 @@ const handleBack = () => {
|
||||
});
|
||||
}
|
||||
};
|
||||
const clickOrder=(index)=>{
|
||||
if(index == 4){
|
||||
const evaluate = (item) =>{
|
||||
// uni.navigateTo({
|
||||
// url:`/order/orderevallist/orderevallist?type=0`
|
||||
// })
|
||||
uni.navigateTo({
|
||||
url:`/order/orderevallist/orderevallist?type=0`
|
||||
url:`/order/editeval/editeval?orderNo=${item.orderId}`
|
||||
})
|
||||
return false
|
||||
}
|
||||
//显示更多
|
||||
const more_arr = (type,e) =>{
|
||||
if(type == 1){
|
||||
show_id.value = {id:e.id};
|
||||
openShow.value = !openShow.value
|
||||
shop_orderlist.value.forEach(item => {
|
||||
if(e.id == item.id){
|
||||
item.openShow = true;
|
||||
}else{
|
||||
item.openShow = false;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
show_id.value = {};
|
||||
openShow.value = false
|
||||
shop_orderlist.value.forEach(item => {
|
||||
if(e.id == item.id){
|
||||
item.openShow = false;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
const clickOrder=(index)=>{
|
||||
if(active.value == index) return false;
|
||||
active.value = index;
|
||||
shop_orderlist.value = [];
|
||||
decs.value = '';
|
||||
pages.value = 0;
|
||||
if(index == 1){
|
||||
type.value = "0"
|
||||
}else if(index == 2){
|
||||
type.value = "5"
|
||||
}else if(index == 3){
|
||||
type.value = "2"
|
||||
}else if(index == 4){
|
||||
type.value = "3"
|
||||
}else{
|
||||
type.value = "";
|
||||
}
|
||||
const orderDetail=()=>{
|
||||
api_orderlist();
|
||||
}
|
||||
const orderDetail=(item)=>{
|
||||
uni.navigateTo({
|
||||
url:`/order/orderDetail/orderDetail`
|
||||
url:`/order/orderDetail/orderDetail?orderId=${item.orderId}`
|
||||
})
|
||||
};
|
||||
|
||||
const api_orderlist=()=>{
|
||||
pages.value = pages.value + 1;
|
||||
img_err.value = "";
|
||||
decs.value = "—— 加载中... ——";
|
||||
const params = {
|
||||
type:type.value,
|
||||
page:pages.value,
|
||||
limit:limits.value
|
||||
}
|
||||
return orderlist(params).then(({data}) => {
|
||||
decs.value = '—— 上拉加载更多 ——';
|
||||
data.list.forEach(item => {
|
||||
item.openShow = false;
|
||||
})
|
||||
shop_orderlist.value = shop_orderlist.value.concat(data.list);
|
||||
if(pages.value == 1 && !data.list.length){
|
||||
img_err.value = "../../static/Empty/order_lisr_img.png"
|
||||
decs.value = "—— 暂无订单记录 ——"
|
||||
}else if(data.list.length < 10){
|
||||
decs.value = '—— 嗷呜,已经到底啦 ——';
|
||||
}
|
||||
}).catch(({message}) => {
|
||||
img_err.value = "../../static/Empty/err.png"
|
||||
decs.value = `—— ${message} ——`;
|
||||
})
|
||||
}
|
||||
//确认收货
|
||||
const confirmReceipt = (item)=>{
|
||||
ordertake(item.id).then(({message}) => {
|
||||
uni.showToast({
|
||||
title:message,
|
||||
icon:'success',
|
||||
success: () => {
|
||||
setTimeout(()=>{
|
||||
shop_orderlist.value = [];
|
||||
decs.value = '';
|
||||
pages.value = 0;
|
||||
api_orderlist();
|
||||
},1400)
|
||||
}
|
||||
})
|
||||
}).catch(({message}) => {
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
//删除订单
|
||||
const remove = (item)=>{
|
||||
uni.showModal({
|
||||
content:"您确定要删除当前订单吗?",
|
||||
confirmText:'确定',
|
||||
confirmColor:'#F14D48',
|
||||
success: ({confirm}) => {
|
||||
if (confirm) {
|
||||
orderdel(item.id).then(({message}) => {
|
||||
uni.showToast({
|
||||
title:message,
|
||||
icon:'success',
|
||||
success: () => {
|
||||
setTimeout(()=>{
|
||||
shop_orderlist.value = [];
|
||||
decs.value = '';
|
||||
pages.value = 0;
|
||||
api_orderlist();
|
||||
},1400)
|
||||
}
|
||||
})
|
||||
}).catch(({message}) => {
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
//取消订单
|
||||
const cancel = (item)=>{
|
||||
uni.showModal({
|
||||
content:"您确定要取消当前订单吗?",
|
||||
confirmText:'确定',
|
||||
confirmColor:'#F14D48',
|
||||
success: ({confirm}) => {
|
||||
if (confirm) {
|
||||
ordercancel(item.id).then(({message}) => {
|
||||
uni.showToast({
|
||||
title:message,
|
||||
icon:'success',
|
||||
success: () => {
|
||||
setTimeout(()=>{
|
||||
shop_orderlist.value = [];
|
||||
decs.value = '';
|
||||
pages.value = 0;
|
||||
api_orderlist();
|
||||
},1400)
|
||||
}
|
||||
})
|
||||
}).catch(({message}) => {
|
||||
uni.showModal({
|
||||
content:message,
|
||||
showCancel: false
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
//使用 uni.onLoad 监听页面加载
|
||||
onLoad((options) => {
|
||||
const { type } = options;
|
||||
if(type == 0 || type == 1 || type == 2 || type == 3 || type == 4 ){
|
||||
active.value = type;
|
||||
if(options.type){
|
||||
active.value = options.type;
|
||||
}else{
|
||||
active.value = 0;
|
||||
}
|
||||
if(options.type == 1){
|
||||
type.value = "0"
|
||||
}else if(options.type == 2){
|
||||
type.value = "5"
|
||||
}else if(options.type == 3){
|
||||
type.value = "2"
|
||||
}else if(options.type == 4){
|
||||
type.value = "3"
|
||||
}else{
|
||||
type.value = "";
|
||||
}
|
||||
api_orderlist();
|
||||
updatePageWidth();
|
||||
});
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
onShow(() => {});
|
||||
onPullDownRefresh(()=>{
|
||||
shop_orderlist.value = [];
|
||||
decs.value = '';
|
||||
pages.value = 0;
|
||||
api_orderlist();
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
onReachBottom(()=>{
|
||||
|
||||
api_orderlist();
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -95,7 +95,7 @@ page{
|
||||
margin: 20rpx 20rpx 0 20rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
padding: 0 25rpx 0 25rpx;
|
||||
padding: 0 20rpx 0 20rpx;
|
||||
box-shadow: 0 4rpx 8rpx rgba(0,0,0,.05);
|
||||
.order_type{
|
||||
font-size: 34rpx;
|
||||
@ -182,15 +182,56 @@ page{
|
||||
justify-content: space-between;
|
||||
padding: 25rpx 0 25rpx 0;
|
||||
.order_l{
|
||||
width: 90rpx;
|
||||
height: 55rpx;
|
||||
position: relative;
|
||||
.more_text{
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
height: 55rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.more_open{
|
||||
position: absolute;
|
||||
left: -10rpx;
|
||||
z-index: 9999;
|
||||
top: 55rpx;
|
||||
.more_j{
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 15rpx solid transparent;
|
||||
border-right: 15rpx solid transparent;
|
||||
border-bottom: 15rpx solid #333333;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
.more_cont{
|
||||
background-color: #333333;
|
||||
border-radius: 10rpx;
|
||||
padding: 0rpx 20rpx 0rpx 20rpx;
|
||||
margin-top: -2rpx;
|
||||
.more_item{
|
||||
font-size: 26rpx;
|
||||
color: #FFFFFF;
|
||||
height: 65rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 125rpx;
|
||||
}
|
||||
.more_border{
|
||||
border-bottom: 1rpx solid #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.order_r{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
.order_btn{
|
||||
width: 158rpx;
|
||||
height: 64rpx;
|
||||
padding-left: 23rpx;
|
||||
padding-right: 21rpx;
|
||||
height: 55rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 33rpx;
|
||||
border: 1rpx solid #D9D9D9;
|
||||
@ -198,18 +239,13 @@ page{
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #999999;
|
||||
font-size: 26rpx;
|
||||
margin-left: 25rpx;
|
||||
font-size: 23rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.order_bcg{
|
||||
width: 158rpx;
|
||||
height: 64rpx;
|
||||
background: #FF0000;
|
||||
border-radius: 33rpx;
|
||||
border: 1rpx solid #FF0000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #ffffff;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
@ -218,3 +254,51 @@ page{
|
||||
}
|
||||
}
|
||||
}
|
||||
.load_desc{
|
||||
font-size: 28rpx;
|
||||
color: #aaa;
|
||||
text-align: center;
|
||||
padding-top: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
.empty{
|
||||
height:480rpx;
|
||||
margin:200rpx 20rpx 0rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.empty_cont{
|
||||
.empty_cont_img{
|
||||
margin: 0 auto;
|
||||
width: 355rpx;
|
||||
height: 280rpx;
|
||||
display: flex;
|
||||
}
|
||||
.empty_cont_title{
|
||||
font-size: 28rpx;
|
||||
color: #aaaaaa;
|
||||
text-align: center;
|
||||
}
|
||||
.empty_cont_btn{
|
||||
margin: 0 auto;
|
||||
width: 154rpx;
|
||||
height: 46rpx;
|
||||
border-radius: 30rpx;
|
||||
border: 1rpx solid #FF0000;
|
||||
color: #FF0000;
|
||||
line-height: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.openShow{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
z-index: 99;
|
||||
height: 100vh;
|
||||
}
|
@ -148,7 +148,11 @@ page{
|
||||
}
|
||||
}
|
||||
.user_cont_li_left_boder{
|
||||
box-shadow: -10rpx 0 10rpx -5rpx rgba(244, 244, 244, 0.8); /* 左边框阴影 */
|
||||
// box-shadow: -10rpx 0 10rpx -5rpx rgba(244, 244, 244, 0.8); /* 左边框阴影 */
|
||||
background-image: url("../../static/order/2168_03.jpg");
|
||||
background-repeat: no-repeat; /* 防止重复 */
|
||||
background-position: left center; /* 水平靠左,垂直居中 */
|
||||
background-size: auto 100%; /* 宽度自适应,高度填满 */
|
||||
}
|
||||
}
|
||||
.price::before {
|
||||
|
144
server/api.js
@ -127,11 +127,147 @@ export const citylist = (data) => {
|
||||
export const deliverytimes = (data) => {
|
||||
return request({url:`/api/front/delivery/times`,method:'GET',data});
|
||||
}
|
||||
//我的优惠券
|
||||
export const couponlist = (data) => {
|
||||
return request({url:`/api/front/coupon/list`,method:'GET',data});
|
||||
}
|
||||
//计算订单价格
|
||||
export const computedprice = (data) => {
|
||||
return request({url:`/api/front/order/computed/price`,method:'POST',data});
|
||||
}
|
||||
//创建订单
|
||||
export const ordercreate = (data) => {
|
||||
return request({url:`/api/front/order/create`,method:'POST',data});
|
||||
}
|
||||
//获取支付配置
|
||||
export const payconfig = (data) => {
|
||||
return request({url:`/api/front/order/get/pay/config`,method:'GET',data});
|
||||
}
|
||||
//订单列表
|
||||
export const orderlist = (data) => {
|
||||
return request({url:`/api/front/order/list`,method:'GET',data});
|
||||
}
|
||||
//订单详情
|
||||
export const orderdetail = (orderId) => {
|
||||
return request({url:`/api/front/order/detail/${orderId}`,method:'GET'});
|
||||
}
|
||||
//删除订单
|
||||
export const orderdel = (id) => {
|
||||
return request({url:`/api/front/order/del?id=${id}`,method:'POST',contenttype:'x-www-form-urlencoded'});
|
||||
}
|
||||
//订单取消
|
||||
export const ordercancel = (id) => {
|
||||
return request({url:`/api/front/order/cancel?id=${id}`,method:'POST',contenttype:'x-www-form-urlencoded'});
|
||||
}
|
||||
//订单头部数量
|
||||
export const orderdata = (data) => {
|
||||
return request({url:`/api/front/order/data`,method:'GET',data});
|
||||
}
|
||||
//订单支付
|
||||
export const paypayment = (data) => {
|
||||
return request({url:`/api/front/pay/payment`,method:'POST',data});
|
||||
}
|
||||
//查询支付结果
|
||||
export const payqueryPayResult = (data) => {
|
||||
return request({url:`/api/front/pay/queryPayResult`,method:'GET',data});
|
||||
}
|
||||
//评价订单
|
||||
export const orderReplycomment = (data) => {
|
||||
return request({url:`/api/front/order/orderReply/comment`,method:'POST',data});
|
||||
}
|
||||
//评论中心-列表
|
||||
export const orderReplylist = (data) => {
|
||||
return request({url:`/api/front/order/orderReply/list`,method:'GET',data});
|
||||
}
|
||||
//待评价商品信息查询
|
||||
export const orderReplyproduct = (data) => {
|
||||
return request({url:`/api/front/order/orderReply/product`,method:'POST',data});
|
||||
}
|
||||
//订单收货
|
||||
export const ordertake = (id) => {
|
||||
return request({url:`/api/front/order/take?id=${id}`,method:'POST',contenttype:'x-www-form-urlencoded'});
|
||||
}
|
||||
//修改订单
|
||||
export const orderupdateOrder = (data) => {
|
||||
return request({url:`/api/front/order/updateOrder`,method:'POST',data});
|
||||
}
|
||||
//退款/售后-售后记录
|
||||
export const returnapplyRecordsList = (data) => {
|
||||
return request({url:`/api/front/return/applyRecordsList`,method:'GET',data});
|
||||
}
|
||||
//退款/售后-售后申请列表
|
||||
export const returncanApplyOrderList = (data) => {
|
||||
return request({url:`/api/front/return/canApplyOrderList`,method:'GET',data});
|
||||
}
|
||||
//获取退款计算
|
||||
export const returncomputedPrice = (data) => {
|
||||
return request({url:`/api/front/return/computedPrice`,method:'POST',data});
|
||||
}
|
||||
//售后记录详情
|
||||
export const returngetApplyRecord = (id) => {
|
||||
return request({url:`/api/front/return/getApplyRecord/${id}`,method:'GET'});
|
||||
}
|
||||
//获取申请订单退款信息
|
||||
export const returngetOrder = (orderId) => {
|
||||
return request({url:`/api/front/return/getOrder/${orderId}`,method:'GET'});
|
||||
}
|
||||
//订单退款申请
|
||||
export const returnreturnApply = (data) => {
|
||||
return request({url:`/api/front/return/returnApply`,method:'POST',data});
|
||||
}
|
||||
//我的优惠券
|
||||
export const couponlist = (data) => {
|
||||
return request({url:`/api/front/coupon/list`,method:'GET',data});
|
||||
}
|
||||
//当前订单可用优惠券
|
||||
export const couponsorder = (preOrderNo) => {
|
||||
return request({url:`/api/front/coupons/order/${preOrderNo}`,method:'GET'});
|
||||
}
|
||||
//优惠券分页列表
|
||||
export const frontcoupons = (data) => {
|
||||
return request({url:`/api/front/coupons`,method:'GET',data});
|
||||
}
|
||||
//新人注册券
|
||||
export const frontnewUserCoupon = (data) => {
|
||||
return request({url:`/api/front/newUserCoupon`,method:'GET',data});
|
||||
}
|
||||
//领券
|
||||
export const couponreceive = (data) => {
|
||||
return request({url:`/api/front/coupon/receive`,method:'POST',data});
|
||||
}
|
||||
//图片上传
|
||||
export const uploadimage = (data) => {
|
||||
return request({url:`/api/front/user/upload/image`,method:'POST',data});
|
||||
}
|
||||
//添加收藏产品
|
||||
export const collectadd = (data) => {
|
||||
return request({url:`/api/front/collect/add`,method:'POST',data});
|
||||
}
|
||||
//批量收藏
|
||||
export const collectall = (data) => {
|
||||
return request({url:`/api/front/collect/all`,method:'POST',data});
|
||||
}
|
||||
//取消收藏产品(通过商品)
|
||||
export const collectcancel = (proId,data) => {
|
||||
return request({url:`/api/front/collect/cancel/${proId}`,method:'POST',data});
|
||||
}
|
||||
//取消收藏产品
|
||||
export const collectdelete = (data) => {
|
||||
return request({url:`/api/front/collect/delete`,method:'POST',data});
|
||||
}
|
||||
//我的收藏列表
|
||||
export const collectuser = (data) => {
|
||||
return request({url:`/api/front/collect/user`,method:'GET',data});
|
||||
}
|
||||
//个人中心-用户信息
|
||||
export const frontuser = (data) => {
|
||||
return request({url:`/api/front/user`,method:'GET',data});
|
||||
}
|
||||
//修改个人资料
|
||||
export const useredit = (data) => {
|
||||
return request({url:`/api/front/user/edit`,method:'POST',data});
|
||||
}
|
||||
//热门搜索
|
||||
export const searchkeyword = (data) => {
|
||||
return request({url:`/api/front/search/keyword`,method:'GET',data});
|
||||
}
|
||||
//分享配置
|
||||
export const frontshare = (data) => {
|
||||
return request({url:`/api/front/share`,method:'GET',data});
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ const type = 'dev'
|
||||
* prod生产
|
||||
*/
|
||||
if(type === 'dev'){
|
||||
url = "http://xx2qui.natappfree.cc";
|
||||
url = "http://yz29xy.natappfree.cc";
|
||||
}
|
||||
if(type === 'test'){
|
||||
url = "https://japiuat.3721zh.com/webapp";
|
||||
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 774 B |
BIN
static/eval/good_aver.png
Normal file
After Width: | Height: | Size: 545 B |
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 782 B |
Before Width: | Height: | Size: 782 B After Width: | Height: | Size: 545 B |
BIN
static/eval/ordinary_aver.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
static/order/2168_03.jpg
Normal file
After Width: | Height: | Size: 1.4 KiB |
41
uni_modules/uni-data-select/changelog.md
Normal file
@ -0,0 +1,41 @@
|
||||
## 1.0.9(2025-03-26)
|
||||
- 优化 默认背景为白色与整体组件保持风格统一
|
||||
## 1.0.8(2024-03-28)
|
||||
- 修复 在vue2下:style动态绑定导致编译失败的bug
|
||||
## 1.0.7(2024-01-20)
|
||||
- 修复 长文本回显超过容器的bug,超过容器部分显示省略号
|
||||
## 1.0.6(2023-04-12)
|
||||
- 修复 微信小程序点击时会改变背景颜色的 bug
|
||||
## 1.0.5(2023-02-03)
|
||||
- 修复 禁用时会显示清空按钮
|
||||
## 1.0.4(2023-02-02)
|
||||
- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
|
||||
- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
|
||||
## 1.0.3(2023-01-16)
|
||||
- 修复 不关联服务空间报错的问题
|
||||
## 1.0.2(2023-01-14)
|
||||
- 新增 属性 `format` 可用于格式化显示选项内容
|
||||
## 1.0.1(2022-12-06)
|
||||
- 修复 当where变化时,数据不会自动更新的问题
|
||||
## 0.1.9(2022-09-05)
|
||||
- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
|
||||
## 0.1.8(2022-08-29)
|
||||
- 修复 点击的位置不准确
|
||||
## 0.1.7(2022-08-12)
|
||||
- 新增 支持 disabled 属性
|
||||
## 0.1.6(2022-07-06)
|
||||
- 修复 pc端宽度异常的bug
|
||||
## 0.1.5
|
||||
- 修复 pc端宽度异常的bug
|
||||
## 0.1.4(2022-07-05)
|
||||
- 优化 显示样式
|
||||
## 0.1.3(2022-06-02)
|
||||
- 修复 localdata 赋值不生效的 bug
|
||||
- 新增 支持 uni.scss 修改颜色
|
||||
- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
|
||||
## 0.1.2(2022-05-08)
|
||||
- 修复 当 value 为 0 时选择不生效的 bug
|
||||
## 0.1.1(2022-05-07)
|
||||
- 新增 记住上次的选项(仅 collection 存在时有效)
|
||||
## 0.1.0(2022-04-22)
|
||||
- 初始化
|
@ -0,0 +1,561 @@
|
||||
<template>
|
||||
<view class="uni-stat__select">
|
||||
<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
|
||||
<view class="uni-stat-box" :class="{'uni-stat__actived': current}">
|
||||
<view class="uni-select" :class="{'uni-select--disabled':disabled}">
|
||||
<view class="uni-select__input-box" @click="toggleSelector">
|
||||
<view v-if="current" class="uni-select__input-text">{{textShow}}</view>
|
||||
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
|
||||
<view v-if="current && clear && !disabled" @click.stop="clearVal">
|
||||
<uni-icons type="clear" color="#c0c4cc" size="24" />
|
||||
</view>
|
||||
<view v-else>
|
||||
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
|
||||
<view class="uni-select__selector" :style="getOffsetByPlacement" v-if="showSelector">
|
||||
<view :class="placement=='bottom'?'uni-popper__arrow_bottom':'uni-popper__arrow_top'"></view>
|
||||
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
||||
<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
|
||||
<text>{{emptyTips}}</text>
|
||||
</view>
|
||||
<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index"
|
||||
@click="change(item)">
|
||||
<text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/**
|
||||
* DataChecklist 数据选择器
|
||||
* @description 通过数据渲染的下拉框组件
|
||||
* @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
|
||||
* @property {String} value 默认值
|
||||
* @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
|
||||
* @property {Boolean} clear 是否可以清空已选项
|
||||
* @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
|
||||
* @property {String} label 左侧标题
|
||||
* @property {String} placeholder 输入框的提示文字
|
||||
* @property {Boolean} disabled 是否禁用
|
||||
* @property {String} placement 弹出位置
|
||||
* @value top 顶部弹出
|
||||
* @value bottom 底部弹出(default)
|
||||
* @event {Function} change 选中发生变化触发
|
||||
*/
|
||||
|
||||
export default {
|
||||
name: "uni-data-select",
|
||||
mixins: [uniCloud.mixinDatacom || {}],
|
||||
props: {
|
||||
localdata: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请选择'
|
||||
},
|
||||
emptyTips: {
|
||||
type: String,
|
||||
default: '无选项'
|
||||
},
|
||||
clear: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
defItem: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
|
||||
format: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
placement: {
|
||||
type: String,
|
||||
default: 'bottom'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showSelector: false,
|
||||
current: '',
|
||||
mixinDatacomResData: [],
|
||||
apps: [],
|
||||
channels: [],
|
||||
cacheKey: "uni-data-select-lastSelectedValue",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.debounceGet = this.debounce(() => {
|
||||
this.query();
|
||||
}, 300);
|
||||
if (this.collection && !this.localdata.length) {
|
||||
this.debounceGet();
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
typePlaceholder() {
|
||||
const text = {
|
||||
'opendb-stat-app-versions': '版本',
|
||||
'opendb-app-channels': '渠道',
|
||||
'opendb-app-list': '应用'
|
||||
}
|
||||
const common = this.placeholder
|
||||
const placeholder = text[this.collection]
|
||||
return placeholder ?
|
||||
common + placeholder :
|
||||
common
|
||||
},
|
||||
valueCom() {
|
||||
// #ifdef VUE3
|
||||
return this.modelValue;
|
||||
// #endif
|
||||
// #ifndef VUE3
|
||||
return this.value;
|
||||
// #endif
|
||||
},
|
||||
textShow() {
|
||||
// 长文本显示
|
||||
let text = this.current;
|
||||
return text;
|
||||
},
|
||||
getOffsetByPlacement() {
|
||||
switch (this.placement) {
|
||||
case 'top':
|
||||
return "bottom:calc(100% + 12px);";
|
||||
case 'bottom':
|
||||
return "top:calc(100% + 12px);";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
localdata: {
|
||||
immediate: true,
|
||||
handler(val, old) {
|
||||
if (Array.isArray(val) && old !== val) {
|
||||
this.mixinDatacomResData = val
|
||||
}
|
||||
}
|
||||
},
|
||||
valueCom(val, old) {
|
||||
this.initDefVal()
|
||||
},
|
||||
mixinDatacomResData: {
|
||||
immediate: true,
|
||||
handler(val) {
|
||||
if (val.length) {
|
||||
this.initDefVal()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
debounce(fn, time = 100) {
|
||||
let timer = null
|
||||
return function(...args) {
|
||||
if (timer) clearTimeout(timer)
|
||||
timer = setTimeout(() => {
|
||||
fn.apply(this, args)
|
||||
}, time)
|
||||
}
|
||||
},
|
||||
// 执行数据库查询
|
||||
query() {
|
||||
this.mixinDatacomEasyGet();
|
||||
},
|
||||
// 监听查询条件变更事件
|
||||
onMixinDatacomPropsChange() {
|
||||
if (this.collection) {
|
||||
this.debounceGet();
|
||||
}
|
||||
},
|
||||
initDefVal() {
|
||||
let defValue = ''
|
||||
if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
|
||||
defValue = this.valueCom
|
||||
} else {
|
||||
let strogeValue
|
||||
if (this.collection) {
|
||||
strogeValue = this.getCache()
|
||||
}
|
||||
if (strogeValue || strogeValue === 0) {
|
||||
defValue = strogeValue
|
||||
} else {
|
||||
let defItem = ''
|
||||
if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
|
||||
defItem = this.mixinDatacomResData[this.defItem - 1].value
|
||||
}
|
||||
defValue = defItem
|
||||
}
|
||||
if (defValue || defValue === 0) {
|
||||
this.emit(defValue)
|
||||
}
|
||||
}
|
||||
const def = this.mixinDatacomResData.find(item => item.value === defValue)
|
||||
this.current = def ? this.formatItemName(def) : ''
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {[String, Number]} value
|
||||
* 判断用户给的 value 是否同时为禁用状态
|
||||
*/
|
||||
isDisabled(value) {
|
||||
let isDisabled = false;
|
||||
|
||||
this.mixinDatacomResData.forEach(item => {
|
||||
if (item.value === value) {
|
||||
isDisabled = item.disable
|
||||
}
|
||||
})
|
||||
|
||||
return isDisabled;
|
||||
},
|
||||
|
||||
clearVal() {
|
||||
this.emit('')
|
||||
if (this.collection) {
|
||||
this.removeCache()
|
||||
}
|
||||
},
|
||||
change(item) {
|
||||
if (!item.disable) {
|
||||
this.showSelector = false
|
||||
this.current = this.formatItemName(item)
|
||||
this.emit(item.value)
|
||||
}
|
||||
},
|
||||
emit(val) {
|
||||
this.$emit('input', val)
|
||||
this.$emit('update:modelValue', val)
|
||||
this.$emit('change', val)
|
||||
if (this.collection) {
|
||||
this.setCache(val);
|
||||
}
|
||||
},
|
||||
toggleSelector() {
|
||||
if (this.disabled) {
|
||||
return
|
||||
}
|
||||
|
||||
this.showSelector = !this.showSelector
|
||||
},
|
||||
formatItemName(item) {
|
||||
let {
|
||||
text,
|
||||
value,
|
||||
channel_code
|
||||
} = item
|
||||
channel_code = channel_code ? `(${channel_code})` : ''
|
||||
|
||||
if (this.format) {
|
||||
// 格式化输出
|
||||
let str = "";
|
||||
str = this.format;
|
||||
for (let key in item) {
|
||||
str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
|
||||
}
|
||||
return str;
|
||||
} else {
|
||||
return this.collection.indexOf('app-list') > 0 ?
|
||||
`${text}(${value})` :
|
||||
(
|
||||
text ?
|
||||
text :
|
||||
`未命名${channel_code}`
|
||||
)
|
||||
}
|
||||
},
|
||||
// 获取当前加载的数据
|
||||
getLoadData() {
|
||||
return this.mixinDatacomResData;
|
||||
},
|
||||
// 获取当前缓存key
|
||||
getCurrentCacheKey() {
|
||||
return this.collection;
|
||||
},
|
||||
// 获取缓存
|
||||
getCache(name = this.getCurrentCacheKey()) {
|
||||
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||
return cacheData[name];
|
||||
},
|
||||
// 设置缓存
|
||||
setCache(value, name = this.getCurrentCacheKey()) {
|
||||
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||
cacheData[name] = value;
|
||||
uni.setStorageSync(this.cacheKey, cacheData);
|
||||
},
|
||||
// 删除缓存
|
||||
removeCache(name = this.getCurrentCacheKey()) {
|
||||
let cacheData = uni.getStorageSync(this.cacheKey) || {};
|
||||
delete cacheData[name];
|
||||
uni.setStorageSync(this.cacheKey, cacheData);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
$uni-base-color: #6a6a6a !default;
|
||||
$uni-main-color: #333 !default;
|
||||
$uni-secondary-color: #909399 !default;
|
||||
$uni-border-3: #e5e5e5;
|
||||
|
||||
/* #ifndef APP-NVUE */
|
||||
@media screen and (max-width: 500px) {
|
||||
.hide-on-phone {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
.uni-stat__select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// padding: 15px;
|
||||
/* #ifdef H5 */
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-stat-box {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.uni-stat__actived {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
// outline: 1px solid #2979ff;
|
||||
}
|
||||
|
||||
.uni-label-text {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: $uni-base-color;
|
||||
margin: auto 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.uni-select {
|
||||
font-size: 14px;
|
||||
border: 1px solid $uni-border-3;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
padding: 0 5px;
|
||||
padding-left: 10px;
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
user-select: none;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
border-bottom: solid 1px $uni-border-3;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
height: 35px;
|
||||
|
||||
&--disabled {
|
||||
background-color: #f5f7fa;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
}
|
||||
|
||||
.uni-select__label {
|
||||
font-size: 16px;
|
||||
// line-height: 22px;
|
||||
height: 35px;
|
||||
padding-right: 10px;
|
||||
color: $uni-secondary-color;
|
||||
}
|
||||
|
||||
.uni-select__input-box {
|
||||
height: 35px;
|
||||
width: 0px;
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-select__input {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.uni-select__input-plac {
|
||||
font-size: 14px;
|
||||
color: $uni-secondary-color;
|
||||
}
|
||||
|
||||
.uni-select__selector {
|
||||
/* #ifndef APP-NVUE */
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #EBEEF5;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 3;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.uni-select__selector-scroll {
|
||||
/* #ifndef APP-NVUE */
|
||||
max-height: 200px;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
/* #ifdef H5 */
|
||||
@media (min-width: 768px) {
|
||||
.uni-select__selector-scroll {
|
||||
max-height: 600px;
|
||||
}
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.uni-select__selector-empty,
|
||||
.uni-select__selector-item {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
line-height: 35px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
/* border-bottom: solid 1px $uni-border-3; */
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
.uni-select__selector-item:hover {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.uni-select__selector-empty:last-child,
|
||||
.uni-select__selector-item:last-child {
|
||||
/* #ifndef APP-NVUE */
|
||||
border-bottom: none;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.uni-select__selector__disabled {
|
||||
opacity: 0.4;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* picker 弹出层通用的指示小三角 */
|
||||
.uni-popper__arrow_bottom,
|
||||
.uni-popper__arrow_bottom::after,
|
||||
.uni-popper__arrow_top,
|
||||
.uni-popper__arrow_top::after,
|
||||
{
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 6px;
|
||||
}
|
||||
|
||||
.uni-popper__arrow_bottom {
|
||||
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||
top: -6px;
|
||||
left: 10%;
|
||||
margin-right: 3px;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: #EBEEF5;
|
||||
}
|
||||
|
||||
.uni-popper__arrow_bottom::after {
|
||||
content: " ";
|
||||
top: 1px;
|
||||
margin-left: -6px;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
|
||||
.uni-popper__arrow_top {
|
||||
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||
bottom: -6px;
|
||||
left: 10%;
|
||||
margin-right: 3px;
|
||||
border-bottom-width: 0;
|
||||
border-top-color: #EBEEF5;
|
||||
}
|
||||
|
||||
.uni-popper__arrow_top::after {
|
||||
content: " ";
|
||||
bottom: 1px;
|
||||
margin-left: -6px;
|
||||
border-bottom-width: 0;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.uni-select__input-text {
|
||||
// width: 280px;
|
||||
width: 100%;
|
||||
color: $uni-main-color;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.uni-select__input-placeholder {
|
||||
color: $uni-base-color;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uni-select--mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
</style>
|
88
uni_modules/uni-data-select/package.json
Normal file
@ -0,0 +1,88 @@
|
||||
{
|
||||
"id": "uni-data-select",
|
||||
"displayName": "uni-data-select 下拉框选择器",
|
||||
"version": "1.0.9",
|
||||
"description": "通过数据驱动的下拉框选择器",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
"select",
|
||||
"uni-data-select",
|
||||
"下拉框",
|
||||
"下拉选"
|
||||
],
|
||||
"repository": "https://github.com/dcloudio/uni-ui",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.1"
|
||||
},
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": ["uni-load-more"],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y",
|
||||
"alipay": "n"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "n",
|
||||
"app-harmony": "u",
|
||||
"app-uvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "u",
|
||||
"百度": "u",
|
||||
"字节跳动": "u",
|
||||
"QQ": "u",
|
||||
"京东": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
8
uni_modules/uni-data-select/readme.md
Normal file
@ -0,0 +1,8 @@
|
||||
## DataSelect 下拉框选择器
|
||||
> **组件名:uni-data-select**
|
||||
> 代码块: `uDataSelect`
|
||||
|
||||
当选项过多时,使用下拉菜单展示并选择内容
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
25
uni_modules/uni-load-more/changelog.md
Normal file
@ -0,0 +1,25 @@
|
||||
## 1.3.6(2024-10-15)
|
||||
- 修复 微信小程序中的getSystemInfo警告
|
||||
## 1.3.5(2024-10-12)
|
||||
- 修复 微信小程序中的getSystemInfo警告
|
||||
## 1.3.4(2024-10-12)
|
||||
- 修复 微信小程序中的getSystemInfo警告
|
||||
## 1.3.3(2022-01-20)
|
||||
- 新增 showText属性 ,是否显示文本
|
||||
## 1.3.2(2022-01-19)
|
||||
- 修复 nvue 平台下不显示文本的bug
|
||||
## 1.3.1(2022-01-19)
|
||||
- 修复 微信小程序平台样式选择器报警告的问题
|
||||
## 1.3.0(2021-11-19)
|
||||
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
|
||||
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more)
|
||||
## 1.2.1(2021-08-24)
|
||||
- 新增 支持国际化
|
||||
## 1.2.0(2021-07-30)
|
||||
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
|
||||
## 1.1.8(2021-05-12)
|
||||
- 新增 组件示例地址
|
||||
## 1.1.7(2021-03-30)
|
||||
- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug
|
||||
## 1.1.6(2021-02-05)
|
||||
- 调整为uni_modules目录规范
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"uni-load-more.contentdown": "Pull up to show more",
|
||||
"uni-load-more.contentrefresh": "loading...",
|
||||
"uni-load-more.contentnomore": "No more data"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
import en from './en.json'
|
||||
import zhHans from './zh-Hans.json'
|
||||
import zhHant from './zh-Hant.json'
|
||||
export default {
|
||||
en,
|
||||
'zh-Hans': zhHans,
|
||||
'zh-Hant': zhHant
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"uni-load-more.contentdown": "上拉显示更多",
|
||||
"uni-load-more.contentrefresh": "正在加载...",
|
||||
"uni-load-more.contentnomore": "没有更多数据了"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"uni-load-more.contentdown": "上拉顯示更多",
|
||||
"uni-load-more.contentrefresh": "正在加載...",
|
||||
"uni-load-more.contentnomore": "沒有更多數據了"
|
||||
}
|
84
uni_modules/uni-load-more/package.json
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"id": "uni-load-more",
|
||||
"displayName": "uni-load-more 加载更多",
|
||||
"version": "1.3.6",
|
||||
"description": "LoadMore 组件,常用在列表里面,做滚动加载使用。",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
"uniui",
|
||||
"加载更多",
|
||||
"load-more"
|
||||
],
|
||||
"repository": "https://github.com/dcloudio/uni-ui",
|
||||
"engines": {
|
||||
"HBuilderX": ""
|
||||
},
|
||||
"directories": {
|
||||
"example": "../../temps/example_temps"
|
||||
},
|
||||
"dcloudext": {
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "无",
|
||||
"data": "无",
|
||||
"permissions": "无"
|
||||
},
|
||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||
"type": "component-vue"
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": ["uni-scss"],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "y",
|
||||
"aliyun": "y",
|
||||
"alipay": "n"
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "y",
|
||||
"app-nvue": "y"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
"Android Browser": "y",
|
||||
"微信浏览器(Android)": "y",
|
||||
"QQ浏览器(Android)": "y"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "y",
|
||||
"IE": "y",
|
||||
"Edge": "y",
|
||||
"Firefox": "y",
|
||||
"Safari": "y"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "y",
|
||||
"阿里": "y",
|
||||
"百度": "y",
|
||||
"字节跳动": "y",
|
||||
"QQ": "y"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
},
|
||||
"Vue": {
|
||||
"vue2": "y",
|
||||
"vue3": "y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
uni_modules/uni-load-more/readme.md
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
### LoadMore 加载更多
|
||||
> **组件名:uni-load-more**
|
||||
> 代码块: `uLoadMore`
|
||||
|
||||
|
||||
用于列表中,做滚动加载使用,展示 loading 的各种状态。
|
||||
|
||||
|
||||
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more)
|
||||
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
|
||||
|
||||
|