# Conflicts:
#	order-app/src/pages/mine/mine.vue
pull/58/head
riverflow 1 month ago
commit e38a27f3a0

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
<option name="ckgOperationStatus" value="SUCCESS" />
<option name="progress" value="0.72" />
</component>
</project>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="itmk-base-web" />
<module name="itmk-base-common" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="itmk-base-common" options="-parameters" />
<module name="itmk-base-web" options="-parameters" />
</option>
</component>
</project>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/itmk-base-parent/itmk-base-common/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/itmk-base-parent/itmk-base-web/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/itmk-base-parent/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/itmk-base-parent/src/main/resources" charset="UTF-8" />
</component>
</project>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/itmk-base-parent/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/api-interface.iml" filepath="$PROJECT_DIR$/.idea/api-interface.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

@ -1,4 +1,10 @@
import http from '../common/http.js'
export const splaceOrderApi = (parm) => {
return http.post("/wxapi/order/splaceOrder", parm)
}
export const getOrderListApi = (parm) => {
return http.get("/wxapi/order/getOrderList", parm)
}
export const cancelOrderApi = (parm) => {
return http.post("/wxapi/order/cancelOrder", parm)
}

@ -65,4 +65,8 @@ export const editAddressApi = (parm) => {
export const getAddressApi = (parm) => {
console.log("查询默认地址成功")
return http.get("/wxapi/address/getAddress", parm)
}
//头像上传
export const uploadImageApi = (parm) => {
return http.upload(parm)
}

@ -1,40 +1,62 @@
const baseUrl = 'http://localhost:8089'
//const baseUrl = 'http://192.168.31.70:8089'
const baseUrl = 'http://localhost:8089'
//const baseUrl = 'http://192.168.31.70:8089'
const http = (options = {}) => {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + options.url || '',
method:options.type || 'GET' ,
data: options.data || {},
header: options.header || {},
}).then((response) => {
console.log(response)
resolve(response.data);
}).catch(error => {
reject(error)
})
});
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + options.url || '',
method: options.type || 'GET',
data: options.data || {},
header: options.header || {},
}).then((response) => {
console.log(response)
resolve(response.data);
}).catch(error => {
reject(error)
})
});
}
const get=(url,data,options={})=>{
options.type='get';
options.data = data;
options.url = url;
return http(options)
const get = (url, data, options = {}) => {
options.type = 'get';
options.data = data;
options.url = url;
return http(options)
}
const post = (url, data, options = {}) => {
options.type = 'post';
options.data = data;
options.url = url;
return http(options)
options.type = 'post';
options.data = data;
options.url = url;
return http(options)
}
const put = (url, data, options = {}) => {
options.type = 'put';
options.data = data;
options.url = url;
return http(options)
options.type = 'put';
options.data = data;
options.url = url;
return http(options)
}
const upload = (parm) => {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: baseUrl + parm.url,
filePath: parm.filePath,
name: 'file',
formData: {
openid: uni.getStorageSync('openid')
},
header: {
// Authorization: uni.getStorageSync("token")
},
success: (res) => {
resolve(res.data);
},
fail: (error) => {
reject(error)
}
})
})
}
export default {
get,
post,
put
get,
post,
put,
upload
}

@ -49,6 +49,7 @@
const scrollTop = ref(0)
const current = ref(0)
const menuHeight = ref(0)
const menuItemHeight = ref(0)
const getImg = () => {
return Math.floor(Math.random() * 35)
@ -104,6 +105,7 @@
// });
uni.navigateTo({
url: '../detail/detail?goods=' + encodeURIComponent(JSON.stringify(item))
});
}

@ -1,24 +1,27 @@
<template>
<view>
<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
<!-- <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
<view class="userinfo u-flex-1" @click="getUserInfo">
<view class="img-container">
<image class="uimage" :src='avatarUrl'></image>
</view>
<!-- 分割线 -->
<u-divider>{{nickName}}</u-divider>
</view>
</view> -->
<view>
<button class="avatar-wrapper" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image class="uimage" :src="avatarUrl"></image>
</button>
<input id="nickname-input" type="nickname" style="text-align: center;" class="weui-input"
placeholder="请选择昵称" v-model="nickName" @blur="onNickName" />
</view>
<view class="u-m-t-20">
<u-cell-group>
<u-cell-item icon="star" title="我的收藏"></u-cell-item>
<u-cell-item icon="photo" title="我的订单"></u-cell-item>
<u-cell-item @click="toOrder" icon="star" title="我的订单"></u-cell-item>
<u-cell-item icon="photo" title="我的收藏"></u-cell-item>
<u-cell-item icon="coupon" title="我的地址"></u-cell-item>
</u-cell-group>
</view>
</view>
</template>
@ -28,12 +31,20 @@
} from '@dcloudio/uni-app';
import {
ref,
<<<<<<< HEAD
onMounted
=======
getCurrentInstance
>>>>>>> 68b2157c4343ab2af362312b5f64deb4e53904e3
} from 'vue'
import {
userLogin
} from '../../api/user.js'
//
const nickName = ref('微信用户')
//
const avatarUrl = ref('/static/user.jpg')
<<<<<<< HEAD
//
onMounted(() => {
const storedAvatar = uni.getStorageSync('avatarUrl')
@ -46,6 +57,33 @@
}
})
=======
const onChooseAvatar = async (e) => {
console.log(e)
avatarUrl.value = e.detail.avatarUrl
uploadImageApi({
url: "/api/upload/uploadImage",
filePath: e.detail.avatarUrl
}).then((res) => {
console.log(res)
})
}
const onNickName = (e) => {
console.log(e)
uni.createSelectorQuery().in(instance) // in(this)
.select("#nickname-input")
.fields({
properties: ["value"],
})
.exec((res) => {
console.log(res)
nickName.value = res?.[0]?.value
console.log('昵称', nickName.value)
})
// nickName.value = e.detail.nickName
}
>>>>>>> 68b2157c4343ab2af362312b5f64deb4e53904e3
//
const getUserInfo = () => {
console.log('获取用户信息')
@ -149,6 +187,21 @@
}
})
}
<<<<<<< HEAD
=======
//
const toOrder = () => {
getUserInfo()
//details.vue
uni.navigateTo({
url: '../order/order'
});
}
onShow(() => {
userLogin()
getUserInfo()
})
>>>>>>> 68b2157c4343ab2af362312b5f64deb4e53904e3
</script>
<style lang="scss">

@ -7,167 +7,52 @@
</view>
<swiper class="swiper-box" :current="swiperCurrent" @transition="transition"
@animationfinish="animationfinish">
<swiper-item class="swiper-item">
<swiper-item v-for="(item,index) in list" :key='index' class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList[0]" :key="res.id">
<view class="order" v-for="(res, index) in orderList[index]" :key="res.id">
<view class="top">
<view class="left">
<u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon>
<view class="store">{{ res.store }}</view>
<view class="store">{{ res.userName }}</view>
<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
</view>
<view class="right">{{ res.deal }}</view>
<view style="margin-left: 6px;;" class="right">{{ res.phone }}</view>
</view>
<view class="item" v-for="(item, index) in res.goodsList" :key="index">
<view class="left">
<image :src="item.goodsUrl" mode="aspectFill"></image>
</view>
<view class="content">
<view class="title u-line-2">{{ item.title }}</view>
<view class="type">{{ item.type }}</view>
<view class="delivery-time">发货时间 {{ item.deliveryTime }}</view>
</view>
<view class="right">
<view class="price">
{{ priceInt(item.price) }}
<text class="decimal">.{{ priceDecimal(item.price) }}</text>
</view>
<view class="number">x{{ item.number }}</view>
</view>
</view>
<view class="total">
{{ totalNum(res.goodsList) }}件商品 合计:
<text class="total-price">
{{ priceInt(totalPrice(res.goodsList)) }}.
<text class="decimal">{{ priceDecimal(totalPrice(res.goodsList)) }}</text>
</text>
</view>
<view class="bottom">
<view class="more">
<u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon>
</view>
<view class="logistics btn">查看物流</view>
<view class="exchange btn">卖了换钱</view>
<view class="evaluate btn">评价</view>
</view>
</view>
<u-loadmore :status="loadStatus[0]" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList[1]" :key="res.id">
<view class="top">
<view class="left">
<u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon>
<view class="store">{{ res.store }}</view>
<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
</view>
<view class="right">{{ res.deal }}</view>
<view class="">
{{res.address}}
</view>
<view class="item" v-for="(item, index) in res.goodsList" :key="index">
<view class="left">
<image :src="item.goodsUrl" mode="aspectFill"></image>
<image :src="item.goodsImage.split(',')[0]" mode="aspectFill"></image>
</view>
<view class="content">
<view class="title u-line-2">{{ item.title }}</view>
<view class="type">{{ item.type }}</view>
<view class="delivery-time">发货时间 {{ item.deliveryTime }}</view>
<view class="title u-line-2">{{ item.goodsName }}</view>
<view class="type">{{ item.specsName }}{{item.goodsUnit}}</view>
<!-- <view class="delivery-time">发货时间 {{ item.deliveryTime }}</view> -->
</view>
<view class="right">
<view class="price">
{{ priceInt(item.price) }}
<text class="decimal">.{{ priceDecimal(item.price) }}</text>
{{ item.price }}
<!-- <text class="decimal">.{{ priceDecimal(item.price) }}</text> -->
</view>
<view class="number">x{{ item.number }}</view>
<view class="number">x{{ item.num }}</view>
</view>
</view>
<view class="total">
{{ totalNum(res.goodsList) }}件商品 合计:
{{ res.goodsList.length }}件商品 合计:
<text class="total-price">
{{ priceInt(totalPrice(res.goodsList)) }}.
<text class="decimal">{{ priceDecimal(totalPrice(res.goodsList)) }}</text>
{{ res.price }}
<!-- <text class="decimal">{{ priceDecimal(totalPrice(res.goodsList)) }}</text> -->
</text>
</view>
<view class="bottom">
<view class="more">
<u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon>
<view @click="cancel(res,index)" v-if="res.status == '0'" class="exchange btn">
</view>
<view class="logistics btn">查看物流</view>
<view class="exchange btn">卖了换钱</view>
<view class="evaluate btn">评价</view>
<view v-if="res.status == '2'" class="evaluate btn"></view>
</view>
</view>
<u-loadmore :status="loadStatus[1]" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<view class="page-box">
<view>
<view class="centre">
<image src="https://cdn.uviewui.com/uview/template/taobao-order.png" mode="">
</image>
<view class="explain">
您还没有相关的订单
<view class="tips">可以去看看有那些想买的</view>
</view>
<view class="btn">随便逛逛</view>
</view>
</view>
</view>
</scroll-view>
</swiper-item>
<swiper-item class="swiper-item">
<scroll-view scroll-y style="height: 100%;width: 100%;" @scrolltolower="reachBottom">
<view class="page-box">
<view class="order" v-for="(res, index) in orderList[3]" :key="res.id">
<view class="top">
<view class="left">
<u-icon name="home" :size="30" color="rgb(94,94,94)"></u-icon>
<view class="store">{{ res.store }}</view>
<u-icon name="arrow-right" color="rgb(203,203,203)" :size="26"></u-icon>
</view>
<view class="right">{{ res.deal }}</view>
</view>
<view class="item" v-for="(item, index) in res.goodsList" :key="index">
<view class="left">
<image :src="item.goodsUrl" mode="aspectFill"></image>
</view>
<view class="content">
<view class="title u-line-2">{{ item.title }}</view>
<view class="type">{{ item.type }}</view>
<view class="delivery-time">发货时间 {{ item.deliveryTime }}</view>
</view>
<view class="right">
<view class="price">
{{ priceInt(item.price) }}
<text class="decimal">.{{ priceDecimal(item.price) }}</text>
</view>
<view class="number">x{{ item.number }}</view>
</view>
</view>
<view class="total">
{{ totalNum(res.goodsList) }}件商品 合计:
<text class="total-price">
{{ priceInt(totalPrice(res.goodsList)) }}.
<text class="decimal">{{ priceDecimal(totalPrice(res.goodsList)) }}</text>
</text>
</view>
<view class="bottom">
<view class="more">
<u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon>
</view>
<view class="logistics btn">查看物流</view>
<view class="exchange btn">卖了换钱</view>
<view class="evaluate btn">评价</view>
</view>
</view>
<u-loadmore :status="loadStatus[3]" bgColor="#f2f2f2"></u-loadmore>
<u-loadmore :status="loadStatus[index]" bgColor="#f2f2f2"></u-loadmore>
</view>
</scroll-view>
</swiper-item>
@ -180,6 +65,10 @@
import {
onReady
} from '@dcloudio/uni-app';
import {
getOrderListApi,
cancelOrderApi
} from '../../api/order.js'
import {
ref,
computed
@ -191,171 +80,48 @@
[],
[]
])
const dataList = ref([{
id: 1,
store: '夏日流星限定贩卖',
deal: '交易成功',
goodsList: [{
goodsUrl: '//img13.360buyimg.com/n7/jfs/t1/103005/7/17719/314825/5e8c19faEb7eed50d/5b81ae4b2f7f3bb7.jpg',
title: '【冬日限定】现货 原创jk制服女2020冬装新款小清新宽松软糯毛衣外套女开衫短款百搭日系甜美风',
type: '灰色;M',
deliveryTime: '付款后30天内发货',
price: '348.58',
number: 2
},
{
goodsUrl: '//img12.360buyimg.com/n7/jfs/t1/102191/19/9072/330688/5e0af7cfE17698872/c91c00d713bf729a.jpg',
title: '【葡萄藤】现货 小清新学院风制服格裙百褶裙女短款百搭日系甜美风原创jk制服女2020新款',
type: '45cm;S',
deliveryTime: '付款后30天内发货',
price: '135.00',
number: 1
}
]
},
{
id: 2,
store: '江南皮革厂',
deal: '交易失败',
goodsList: [{
goodsUrl: '//img14.360buyimg.com/n7/jfs/t1/60319/15/6105/406802/5d43f68aE9f00db8c/0affb7ac46c345e2.jpg',
title: '【冬日限定】现货 原创jk制服女2020冬装新款小清新宽松软糯毛衣外套女开衫短款百搭日系甜美风',
type: '粉色;M',
deliveryTime: '付款后7天内发货',
price: '128.05',
number: 1
}]
},
{
id: 3,
store: '三星旗舰店',
deal: '交易失败',
goodsList: [{
goodsUrl: '//img11.360buyimg.com/n7/jfs/t1/94448/29/2734/524808/5dd4cc16E990dfb6b/59c256f85a8c3757.jpg',
title: '三星SAMSUNG京品家电 UA65RUF70AJXXZ 65英寸4K超高清 HDR 京东微联 智能语音 教育资源液晶电视机',
type: '4K广色域',
deliveryTime: '保质5年',
price: '1998',
number: 3
},
{
goodsUrl: '//img14.360buyimg.com/n7/jfs/t6007/205/4099529191/294869/ae4e6d4f/595dcf19Ndce3227d.jpg!q90.jpg',
title: '美的(Midea)639升 对开门冰箱 19分钟急速净味 一级能效冷藏双开门杀菌智能家用双变频节能 BCD-639WKPZM(E)',
type: '容量大,速冻',
deliveryTime: '保质5年',
price: '2354',
number: 1
}
]
},
{
id: 4,
store: '三星旗舰店',
deal: '交易失败',
goodsList: [{
goodsUrl: '//img10.360buyimg.com/n7/jfs/t22300/31/1505958241/171936/9e201a89/5b2b12ffNe6dbb594.jpg!q90.jpg',
title: '法国进口红酒 拉菲LAFITE传奇波尔多干红葡萄酒750ml*6整箱装',
type: '4K广色域',
deliveryTime: '珍藏10年好酒',
price: '1543',
number: 3
},
{
goodsUrl: '//img10.360buyimg.com/n7/jfs/t1/107598/17/3766/525060/5e143aacE9a94d43c/03573ae60b8bf0ee.jpg',
title: '蓝妹BLUE GIRL酷爽啤酒 清啤 原装进口啤酒 罐装 500ml*9听 整箱装',
type: '一打',
deliveryTime: '口感好',
price: '120',
number: 1
}
]
},
{
id: 5,
store: '三星旗舰店',
deal: '交易成功',
goodsList: [{
goodsUrl: '//img12.360buyimg.com/n7/jfs/t1/52408/35/3554/78293/5d12e9cfEfd118ba1/ba5995e62cbd747f.jpg!q90.jpg',
title: '企业微信 中控人脸指纹识别考勤机刷脸机 无线签到异地多店打卡机WX108',
type: '识别效率高',
deliveryTime: '使用方便',
price: '451',
number: 9
}]
}
])
const list = ref([{
name: '待付款'
name: '全部'
},
{
name: '待发货'
},
{
name: '待收货'
name: '已发货'
},
{
name: '待评价',
count: 12
name: '已收货'
}
])
const currents = ref(0)
const swiperCurrent = ref(0)
const tabsHeight = ref(0)
const dx = ref(0)
const currentPage = ref(1)
const pageSize = ref(3)
const pages = ref(0)
const loadStatus = ref(['loadmore', 'loadmore', 'loadmore', 'loadmore'])
const getOrderList = (idx) => {
for (let i = 0; i < 5; i++) {
let index = Math.round(Math.random() * (dataList.value.length - 1));
// let index = Math.random(0, dataList.value.length - 1);
// console.log('666')
// console.log(index)
let data = JSON.parse(JSON.stringify(dataList.value[index]));
data.id = Math.floor(Math.random() * 100 + 1);
// console.log(data)
orderList.value[idx].push(data);
}
loadStatus.value.splice(currents.value, 1, "loadmore")
}
let priceDecimal = computed(() => {
return val => {
if (val !== parseInt(val)) return val.slice(-2);
else return '00';
}
})
let priceInt = computed(() => {
return val => {
if (val !== parseInt(val)) return val.split('.')[0];
else return val;
}
})
const totalPrice = (item) => {
let price = 0;
item.map(val => {
price += parseFloat(val.price);
});
return price.toFixed(2);
}
const totalNum = (item) => {
let num = 0;
item.map(val => {
num += val.number;
});
return num;
}
const reachBottom = () => {
if (currents.value != 2) {
loadStatus.value.splice(currents.value, 1, "loading")
setTimeout(() => {
getOrderList(currents.value);
}, 1200);
if (currentPage.value < pages.value) {
currentPage.value = ++currentPage.value
getOrderList(currents.value);
} else {
loadStatus.value.splice(currents.value, 1, "nomore")
}
}, 1000);
}
}
const change = (index) => {
loadStatus.value.splice(index, 1, 'loading')
swiperCurrent.value = index;
getOrderList(index);
currentPage.value = 1;
pages.value = 0;
//
orderList.value[currents.value] = [];
}
const transition = ({
detail: {
@ -374,11 +140,66 @@
tabs.value.setFinishCurrent(current);
swiperCurrent.value = current;
currents.value = current;
currentPage.value = 1;
pages.value = 0;
//
orderList.value[currents.value] = [];
getOrderList(current)
}
//
const getOrderList = async (idx) => {
let res = await getOrderListApi({
openid: uni.getStorageSync("openid"),
type: idx == 0 ? '' : idx - 1,
currentPage: currentPage.value,
pageSize: pageSize.value
})
if (res && res.code == 200) {
console.log(res)
if (res.data.records.length == 0) { //
loadStatus.value.splice(currents.value, 1, 'nomore')
return;
}
pages.value = res.data.pages
res.data.records.map(item => {
orderList.value[idx].push(item)
})
if (res.data.total == pages.value) {
loadStatus.value.splice(currents.value, 1, 'nomore')
} else {
loadStatus.value.splice(currents.value, 1, 'loadmore')
}
} else {
loadStatus.value.splice(currents.value, 1, 'nomore')
}
}
//
const cancel = (item, index) => {
uni.showModal({
title: '提示',
content: '确定取消订单吗?',
success: async function(res) {
if (res.confirm) {
console.log('用户点击确定');
console.log(item)
let res = await cancelOrderApi({
orderId: item.orderId
})
if (res && res.code == 200) {
change(index + 1)
getOrderList(index + 1);
}
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}
onReady(() => {
getOrderList(0);
getOrderList(1);
getOrderList(3);
})
</script>
@ -396,7 +217,7 @@
.order {
width: 710rpx;
background-color: #ffffff;
margin: 20rpx auto;
margin: 10rpx auto;
border-radius: 20rpx;
box-sizing: border-box;
padding: 20rpx;
@ -404,8 +225,8 @@
.top {
display: flex;
justify-content: space-between;
// justify-content: space-between;
.left {
display: flex;
align-items: center;
@ -430,8 +251,8 @@
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
}
}
@ -485,7 +306,7 @@
display: flex;
margin-top: 40rpx;
padding: 0 10rpx;
justify-content: space-between;
justify-content: flex-end;
align-items: center;
.btn {

Loading…
Cancel
Save