需要一个普通订单列表跟详情入口
This commit is contained in:
4
.env
4
.env
@@ -1,6 +1,6 @@
|
|||||||
# API
|
# API
|
||||||
VITE_SYSTEM_URL = "http://ea252b67.natappfree.cc"
|
# VITE_SYSTEM_URL = "http://ea252b67.natappfree.cc"
|
||||||
# VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api"
|
VITE_SYSTEM_URL = "https://dev.cqjcteach.cn/prod-api"
|
||||||
|
|
||||||
# 第三方客户 channelId
|
# 第三方客户 channelId
|
||||||
VITE_CHANNEL_ID = "7b81ec142eca42baa045820793b821bb"
|
VITE_CHANNEL_ID = "7b81ec142eca42baa045820793b821bb"
|
||||||
|
|||||||
@@ -53,6 +53,15 @@ export const addOrder = data => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 创建普通订单接口 */
|
||||||
|
export const createOrder = data => {
|
||||||
|
return http({
|
||||||
|
url: '/api/service/order/normal',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/** 我的拼团列表 */
|
/** 我的拼团列表 */
|
||||||
export const getMyGroupList = data => {
|
export const getMyGroupList = data => {
|
||||||
return http({
|
return http({
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
"name" : "密谈IM",
|
"name" : "密谈IM",
|
||||||
"appid" : "__UNI__9EFDC69",
|
"appid" : "__UNI__9EFDC69",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.1.1",
|
"versionName" : "1.1.2",
|
||||||
"versionCode" : 110,
|
"versionCode" : 111,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||||
import { getProductDetail, addOrder } from '@/api/mall'
|
import { getProductDetail, addOrder, createOrder } from '@/api/mall'
|
||||||
import { reactive, ref } from 'vue'
|
import { reactive, ref } from 'vue'
|
||||||
import { formatRMB } from '@/utils'
|
import { formatRMB } from '@/utils'
|
||||||
import { getUserAddress } from '@/api'
|
import { getUserAddress } from '@/api'
|
||||||
@@ -30,7 +30,9 @@
|
|||||||
/** 默认地址 */
|
/** 默认地址 */
|
||||||
address: '',
|
address: '',
|
||||||
/** 可选数量 */
|
/** 可选数量 */
|
||||||
maxNum: 1
|
maxNum: 1,
|
||||||
|
/** 是否发起拼团 */
|
||||||
|
startGroup: true
|
||||||
})
|
})
|
||||||
/** 顶部地址信息 */
|
/** 顶部地址信息 */
|
||||||
const topRessData = reactive({
|
const topRessData = reactive({
|
||||||
@@ -140,10 +142,17 @@
|
|||||||
skuId: formData.spec
|
skuId: formData.spec
|
||||||
}
|
}
|
||||||
tixian.value.close()
|
tixian.value.close()
|
||||||
|
if (formData.startGroup) {
|
||||||
const res = await addOrder(data)
|
const res = await addOrder(data)
|
||||||
await refreshUserInfo()
|
await refreshUserInfo()
|
||||||
await showToast('订单提交成功', 'success')
|
await showToast('订单提交成功', 'success')
|
||||||
navigateTo('/pages/shop-together/detail', { id: res.data.groupId })
|
navigateTo('/pages/shop-together/detail', { id: res.data.groupId })
|
||||||
|
} else {
|
||||||
|
const res = await createOrder(data)
|
||||||
|
await refreshUserInfo()
|
||||||
|
await showToast('订单提交成功', 'success')
|
||||||
|
navigateBack()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
@@ -256,6 +265,29 @@
|
|||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
class="pay-way-item"
|
||||||
|
@click="formData.startGroup = !formData.startGroup"
|
||||||
|
>
|
||||||
|
<view class="icon">
|
||||||
|
<image
|
||||||
|
src="/static/images/public/pingtuan.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
class="left-icon"
|
||||||
|
></image>
|
||||||
|
<text>发起拼团</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="check">
|
||||||
|
<image
|
||||||
|
v-show="formData.startGroup"
|
||||||
|
src="/static/images/public/check-to-confirm.png"
|
||||||
|
mode="aspectFit"
|
||||||
|
class="check-icon"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 底部按钮 -->
|
<!-- 底部按钮 -->
|
||||||
|
|||||||
@@ -126,6 +126,10 @@
|
|||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
margin-bottom: 110rpx;
|
margin-bottom: 110rpx;
|
||||||
|
.pay-way-item + .pay-way-item {
|
||||||
|
border-top: 2rpx solid #e6e6e6;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
.pay-way-item {
|
.pay-way-item {
|
||||||
padding: 32rpx;
|
padding: 32rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
BIN
static/images/public/pingtuan.png
Normal file
BIN
static/images/public/pingtuan.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user