Commit 07edb666 authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents 4014633c 6092ca5c
import { request } from '../utils/request';
// 创建临时订单-立即抢购时调用
export function groupBuyConfirm(data) {
return request({
url: '/sgyrdd/previewOrder/groupBuy/confirm',
method: 'POST',
data,
});
}
<template> <template>
<view class="package-details"> <view class="package-details">
<view class="search">
<wd-icon color="#fff" name="thin-arrow-left" class="icon" @tap="back"></wd-icon>
<!-- <view class="searchBox">
<image class="magnifyingGlass" src="@/static/shop/search.png" mode="aspectFill" />
<input type="text" :value="test" class="text" />
</view> -->
<!-- <view class="icon-box">
<i class="iconfont icon icon-shoucang"></i>
<i class="iconfont icon icon-fenxiang"></i>
</view> -->
</view>
<wd-popup <wd-popup
v-model="showpopup" v-model="showpopup"
position="bottom" position="bottom"
...@@ -245,7 +256,6 @@ const currentLatitudeAndLongitude = ref({}); ...@@ -245,7 +256,6 @@ const currentLatitudeAndLongitude = ref({});
const shopId = ref(''); const shopId = ref('');
const showpopup = ref(false); const showpopup = ref(false);
const prodSkusInfo = ref({}); const prodSkusInfo = ref({});
const showDetail = ref(false);
// 商品优惠券 // 商品优惠券
const productCoupons = ref([]); const productCoupons = ref([]);
onLoad((options) => { onLoad((options) => {
...@@ -265,6 +275,11 @@ function alert() { ...@@ -265,6 +275,11 @@ function alert() {
show.value = true; show.value = true;
} }
} }
function back() {
xma.navigateBack({
delta: 1,
});
}
/** /**
* 跳转支付 * 跳转支付
*/ */
...@@ -414,6 +429,59 @@ page { ...@@ -414,6 +429,59 @@ page {
position: relative; position: relative;
padding-bottom: 110 * 2rpx; padding-bottom: 110 * 2rpx;
margin: 0 auto; margin: 0 auto;
.search {
width: 710rpx;
height: 80rpx;
// background: rgba(255, 255, 255, 0.8);
border-radius: 16rpx 16rpx 16rpx 16rpx;
opacity: 0.8;
margin: 0 auto;
margin-top: 44rpx;
display: flex;
align-items: center;
padding-left: 20rpx;
box-sizing: border-box;
position: absolute;
top: 0;
z-index: 99;
.arrow {
width: 15rpx;
height: 24rpx;
}
.icon {
font-size: 28rpx;
}
.searchBox {
width: 129 * 2rpx;
height: 26 * 2rpx;
background: rgba(243, 243, 243, 0.4);
border-radius: 28rpx 28rpx 28rpx 28rpx;
display: flex;
align-items: center;
padding-left: 20rpx;
margin-left: 20rpx;
.magnifyingGlass {
width: 26rpx;
height: 26rpx;
}
.text {
margin-left: 10rpx;
font-size: 24rpx;
}
}
.icon-box {
display: flex;
align-content: center;
margin-left: 86rpx;
.icon {
font-size: 40rpx;
color: #fff;
}
.icon-fenxiang {
margin-left: 20rpx;
}
}
}
.title-box { .title-box {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -79,12 +79,23 @@ ...@@ -79,12 +79,23 @@
<script setup> <script setup>
import Header from '@/pages/order/components/Header/index.vue'; import Header from '@/pages/order/components/Header/index.vue';
import { groupBuyConfirm } from '@/api/confirmOrder';
const selectType = ref('wx'); const selectType = ref('wx');
const skuId = ref('');
const prodId = ref('');
onLoad((options) => {
const { prodId, skuId } = options;
prodId.value = prodId;
skuId.value = skuId;
groupBuyConfirmFn(prodId, skuId);
});
function radioChange(evt) { function radioChange(evt) {
const { value } = evt.detail; const { value } = evt.detail;
selectType.value = value; selectType.value = value;
} }
function groupBuyConfirmFn(prodId, skuId) {
groupBuyConfirm({ prodId, skuId }).then((res) => {});
}
function submitOrder() { function submitOrder() {
// TODO: 跳转到确认订单页面,并��带所选的支付方式 // TODO: 跳转到确认订单页面,并��带所选的支付方式
xma.redirectTo({ xma.redirectTo({
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
<!-- 搜索 --> <!-- 搜索 -->
<view class="search"> <view class="search">
<wd-icon color="#fff" name="thin-arrow-left" class="icon" @tap="back"></wd-icon> <wd-icon color="#fff" name="thin-arrow-left" class="icon" @tap="back"></wd-icon>
<view class="searchBox"> <!-- <view class="searchBox">
<image class="magnifyingGlass" src="@/static/shop/search.png" mode="aspectFill" /> <image class="magnifyingGlass" src="@/static/shop/search.png" mode="aspectFill" />
<input type="text" :value="test" class="text" /> <input type="text" :value="test" class="text" />
</view> </view> -->
<view class="icon-box"> <!-- <view class="icon-box">
<i class="iconfont icon icon-shoucang"></i> <i style="color: red" class="iconfont icon icon-shoucang"></i>
<i class="iconfont icon icon-fenxiang"></i> <i style="color: red" class="iconfont icon icon-fenxiang"></i>
</view> </view> -->
</view> </view>
<view class="swiper"> <view class="swiper">
<wd-swiper <wd-swiper
...@@ -315,7 +315,7 @@ const commentTotal = ref(0); ...@@ -315,7 +315,7 @@ const commentTotal = ref(0);
// 周边推荐类型列表 // 周边推荐类型列表
const recommendedTypesOfPeripherals = ref([]); const recommendedTypesOfPeripherals = ref([]);
// 商户id // 商户id
const shopId = ref('1626126617850544129'); const shopId = ref('');
const tagList2 = ref([{ name: '免费停车', id: 1 }]); const tagList2 = ref([{ name: '免费停车', id: 1 }]);
// 周边推荐-商家列表 // 周边推荐-商家列表
const recommendedListOfPeripherals = ref([]); const recommendedListOfPeripherals = ref([]);
...@@ -325,6 +325,7 @@ onLoad((options) => { ...@@ -325,6 +325,7 @@ onLoad((options) => {
peripheryRecomFn(); peripheryRecomFn();
}); });
groupBuyListFn(options.shopId); groupBuyListFn(options.shopId);
shopId.value = options.shopId;
couponShopListFn(options.shopId); couponShopListFn(options.shopId);
getEvaluationPageFn(); getEvaluationPageFn();
}); });
...@@ -680,7 +681,7 @@ page { ...@@ -680,7 +681,7 @@ page {
.icon-box { .icon-box {
display: flex; display: flex;
align-content: center; align-content: center;
margin-left: 86rpx; margin-left: auto;
.icon { .icon {
font-size: 40rpx; font-size: 40rpx;
color: #fff; color: #fff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment