This commit is contained in:
Ling53666
2025-08-18 09:11:51 +08:00
commit 02554225da
2516 changed files with 133155 additions and 0 deletions

View File

@ -0,0 +1,61 @@
.all{
width: 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.box{
width: 90%;
height: 180px;
display: flex;
border: 1px solid #9fa1a3;
border-radius: 20px;
margin-top: 20rpx;
flex-direction: column;
overflow: hidden;
}
.image{
width: 80px;
height: 80px;
border-radius: 10px;
}
.xinxi{
width: 100%;
height: 100px;
display: flex;
margin-left: 20rpx
}
.juzhong{
display:flex;
align-items:center
}
.biaoti{
width: 249px;
margin-left: 10rpx;
}
.text{
font-size: 18px;
font-weight: bold;
}
.form{
width: 100%;
height: 200px;
}
.xian{
width: 100%;
height: 1px;
background-color: #9fa1a3;
}
.zhifu{
display: flex;
justify-content: center;
align-items: center;
width: 90%;
height: 50px;
background-color: #ee8d97;
border-radius: 40px;
position: fixed;
bottom: 40rpx;
}

View File

@ -0,0 +1,37 @@
<view class="all">
<!-- 商品框 -->
<view class="box" >
<view class="xinxi">
<view class="juzhong">
<image class="image" mode="scaleToFill" src="{{commoditiesImage}}" />
</view>
<view class="biaoti">
<view style="margin-top:30rpx">
<text class="text">{{commoditiesName}}</text>
<view style="margin-top:5rpx">
<text>¥{{commoditiesPrice}}</text>
</view>
<view style="margin-top:5rpx">
<text style="color:#898c90">共{{quantity}}件</text>
</view>
</view>
</view>
</view>
<view class="xian"></view>
<view>
<view style="display:flex;justify-content:space-between;margin-top:20rpx">
<text style="font-size:19px;margin-left:30rpx">商品总价</text>
<text style="margin-right:50rpx">¥{{commoditiesPrice}}</text>
</view>
<view class="xian" style="margin-top: 10rpx;"></view>
<view style="display:flex;justify-content:space-between;margin-top:20rpx">
<text style="font-size:19px;margin-left:30rpx">蚂蚁积分</text>
<text style="margin-right:30rpx;color:#a3abb2">暂不可用</text>
</view>
<text></text>
</view>
</view>
<view class="zhifu" onTap="paymoney">
<text style="color:white">支付 ¥{{commoditiesPrice}}</text>
</view>
</view>

View File

@ -0,0 +1,84 @@
import {url} from '../request'
Page({
data:{
},
onLoad(options) {
const commoditiesImage = options.commoditiesImage
const commoditiesName = options.commoditiesName
const commoditiesPrice = options.commoditiesPrice
const quantity = options.quantity
const orderNumber = options.ordernumber
const orderid = options.orderid
console.log(orderid,orderNumber,quantity,commoditiesPrice,commoditiesName,commoditiesImage);
this.setData({
orderNumber:orderNumber,
commoditiesImage:commoditiesImage,
quantity:quantity,
commoditiesPrice:commoditiesPrice,
commoditiesName:commoditiesName,
orderid:orderid
})
},
paymoney(){
console.log(this.data.orderid,'hhhhhhh');
console.log(this.data.orderNumber);
my.getStorage({
key: 'userInfo',
success: (res) => {
const userInfo = res.data;
this.setData({
id: userInfo.id, // 获取 id
});
if (userInfo && userInfo.cookie) {
my.request({
url: url + '/api/Alipay/create/alipay',
method: 'POST',
data: {
userId: userInfo.id,
id: this.data.orderid
},
headers: {
'content-type': 'application/json',
},
dataType: 'json',
success: (res) => {
console.log(res.data.data,'asjkdaskjhdakjs');
const noma = res.data.data
console.log(noma,'noma');
my.tradePay({
tradeNO: noma,
success: (res) => {
console.log(JSON.stringify (res),'zheshichenggongderes');
console.log(res);
my.alert({content:'支付成功'})
my.navigateBack();
},
fail: (res) => {
my.alert({
content: "支付失败",
});
}
});
},
fail: (error) => {
my.alert({ content: '支付失败' });
console.log(res);
},
});
} else {
my.alert({
content: '您未登录,请先登录。',
success: () => {
my.navigateTo({
url: '/pages/denglu/denglu',
});
},
});
}
},
});
}
});

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"styleIsolation": "apply-shared"
}