上传文件有token的时候,添加token
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="px32">
|
||||
<!-- 收货方式 -->
|
||||
<!-- 收货方式 -->
|
||||
<view class="bg-white br16 row u-m-t-32">
|
||||
<!-- <u-tabs
|
||||
:list="addressTabsList"
|
||||
@ -12,11 +12,8 @@
|
||||
@change="changeDelivery"
|
||||
/> -->
|
||||
<!-- 快递配送 -->
|
||||
<view
|
||||
v-show="addressTabsList[addressTabsIndex]['sign'] === 'express'"
|
||||
class="u-flex p24 w-full"
|
||||
@click="onAddressExpress"
|
||||
>
|
||||
<view v-show="addressTabsList[addressTabsIndex]['sign'] === 'express'" class="u-flex p24 w-full"
|
||||
@click="onAddressExpress">
|
||||
<view>
|
||||
<u-icon name="map" size="48" class="right-icon"></u-icon>
|
||||
</view>
|
||||
@ -38,7 +35,7 @@
|
||||
<view>请选择收货地址</view>
|
||||
</template>
|
||||
</view>
|
||||
<view >
|
||||
<view>
|
||||
<u-icon class="ml10" name="arrow-right" />
|
||||
</view>
|
||||
</view>
|
||||
@ -76,15 +73,8 @@
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="bg-white br16 row u-m-t-32">
|
||||
<order-goods
|
||||
:team="{ need: orderInfo.team_need }"
|
||||
:list="goodsLists"
|
||||
:delivery="delivery"
|
||||
:order_type="orderInfo.order_type"
|
||||
:imageWidth="260"
|
||||
:imageHeight="172"
|
||||
mode="comfirm"
|
||||
></order-goods>
|
||||
<order-goods :team="{ need: orderInfo.team_need }" :list="goodsLists" :delivery="delivery"
|
||||
:order_type="orderInfo.order_type" :imageWidth="260" :imageHeight="172" mode="comfirm"></order-goods>
|
||||
<!-- <view>
|
||||
<u-image :src="cloudPath + 'img/banner.png'" width="260" height="172"></u-image>
|
||||
</view>
|
||||
@ -104,16 +94,29 @@
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
<view class="item row-between bg-white br16 row u-m-t-32 p24" @tap="showCoupon = true">
|
||||
<view>优惠券</view>
|
||||
<view class="row">
|
||||
<text class="primary" v-if="orderInfo.discount_amount">-¥{{ orderInfo.discount_amount }}</text>
|
||||
<text v-else-if="usableCoupon.length" class="primary">{{
|
||||
usableCoupon.length + '张可用'
|
||||
}}</text>
|
||||
<text v-else class="muted">无优惠券可用</text>
|
||||
<u-icon name="arrow-right" size="32" color="#999"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bg-white br16 p24 u-m-t-32">
|
||||
<view>
|
||||
备注
|
||||
</view>
|
||||
<view class="flex1 u-m-t-16 mask">
|
||||
xxxx
|
||||
<u-input v-model="value" type="textarea" :border="border" maxlength="150"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="bg-white br16 p24 u-m-t-32 nr row-between" @click="appointmentTime">
|
||||
<view>预约时间</view>
|
||||
<view class="row">
|
||||
@ -121,186 +124,204 @@
|
||||
<u-icon name="arrow-right" size="32"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="bg-white br16 p24 u-m-t-32 nr">
|
||||
<view class="row-between">
|
||||
<view class="row-center">
|
||||
<u-icon name="weixin-circle-fill" color="#28C445" size="80"></u-icon>
|
||||
<view class="u-m-l-16 lg">微信</view>
|
||||
</view>
|
||||
|
||||
<view class="flex1 row-end">
|
||||
<u-radio-group v-model="pay.weixin">
|
||||
<u-radio shape="circle" :active-color="themeColor"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="bg-white br16 p24 u-m-t-32 nr">
|
||||
<view class="row-between">
|
||||
<view class="row-center">
|
||||
<u-icon name="weixin-circle-fill" color="#28C445" size="80"></u-icon>
|
||||
<view class="u-m-l-16 lg">微信</view>
|
||||
</view>
|
||||
|
||||
<view class="flex1 row-end">
|
||||
<u-radio-group v-model="pay.weixin">
|
||||
<u-radio shape="circle" :active-color="themeColor"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
|
||||
<!-- #ifdef MP-ALIPAY -->
|
||||
<view class="bg-white br16 p24 u-m-t-32 nr">
|
||||
<view class="row-between">
|
||||
<view class="row-center">
|
||||
<u-icon name="zhifubao-circle-fill" color="#1477FE" size="80"></u-icon>
|
||||
<view class="u-m-l-16 lg">支付宝</view>
|
||||
</view>
|
||||
|
||||
<view class="flex1 row-end">
|
||||
<u-radio-group v-model="pay.alipay">
|
||||
<u-radio shape="circle" :active-color="themeColor"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
<view class="bg-white br16 p24 u-m-t-32 nr">
|
||||
<view class="row-between">
|
||||
<view class="row-center">
|
||||
<u-icon name="zhifubao-circle-fill" color="#1477FE" size="80"></u-icon>
|
||||
<view class="u-m-l-16 lg">支付宝</view>
|
||||
</view>
|
||||
|
||||
<view class="flex1 row-end">
|
||||
<u-radio-group v-model="pay.alipay">
|
||||
<u-radio shape="circle" :active-color="themeColor"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
|
||||
<view class="fixed bg-white row-between px48 u-padding-top-20 u-padding-bottom-20">
|
||||
<view class="column u-text-center">
|
||||
<view class="row-center">
|
||||
<view class="count">共1件</view>
|
||||
<view class="count">共{{orderInfo.total_num}}件</view>
|
||||
<view class="u-m-l-8">合计:</view>
|
||||
<view class="primary" style="margin-top: -8rpx;">
|
||||
<price-format :price="12.9" :subscriptSize="34" :firstSize="56" :secondSize="34"></price-format>
|
||||
<price-format :price="orderInfo.order_amount" :subscriptSize="34" :firstSize="56" :secondSize="34"></price-format>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-l-64 flex1">
|
||||
<u-button hover-class="none"
|
||||
@click="onSubmitOrder"
|
||||
:customStyle="{height: '92rpx', backgroundColor: themeColor, color: '#fff', border: 'none', paddingTop: '8rpx'}"
|
||||
:hair-line="false"
|
||||
shape="circle">
|
||||
去支付
|
||||
<u-button hover-class="none" @click="onSubmitOrder"
|
||||
:customStyle="{ height: '92rpx', backgroundColor: themeColor, color: '#fff', border: 'none', paddingTop: '8rpx' }"
|
||||
:hair-line="false" shape="circle">
|
||||
去支付
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
<appointment-time v-model="timePopup" @close="timePopup = false" @update="handleSubmitMobile"/>
|
||||
<u-popup v-model="showCoupon" border-radius="14" mode="bottom" closeable>
|
||||
<view class="pop-title row-between">
|
||||
<view class="title">优惠券</view>
|
||||
</view>
|
||||
<view v-if="showCoupon">
|
||||
<tabs :active="couponTabsIndex" :config="{ underLineWidth: 100 }">
|
||||
<tab :title="'可使用优惠券 (' + usableCoupon.length + ')'">
|
||||
<coupon-obj :list="usableCoupon" :type="0" @change="onSelectCoupon"
|
||||
:coupon-id="couponId"></coupon-obj>
|
||||
</tab>
|
||||
<tab :title="'不可用优惠券 (' + unusableCoupon.length + ')'">
|
||||
<coupon-obj :list="unusableCoupon" :type="1" @change="onSelectCoupon"></coupon-obj>
|
||||
</tab>
|
||||
</tabs>
|
||||
</view>
|
||||
</u-popup>
|
||||
<appointment-time v-model="timePopup" @close="timePopup = false" @update="handleSubmitMobile" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { orderBuy, getOrderCoupon, getDelivery } from '@/api/order'
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
timePopup: false,
|
||||
pay: {
|
||||
weixin: 0,
|
||||
alipay: 0
|
||||
},
|
||||
showLoading: false, // Loading: 显示 | 隐藏
|
||||
goods: {}, // 商品信息
|
||||
// 地址Tabs列表
|
||||
addressTabsList: [
|
||||
{
|
||||
id: 1,
|
||||
sign: 'express',
|
||||
name: '快递配送'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
sign: 'store',
|
||||
name: '门店自提'
|
||||
}
|
||||
],
|
||||
addressTabsIndex: 0, // 地址Tabs索引
|
||||
goodsLists: [], // 商品列表
|
||||
orderInfo: {}, // 订单信息
|
||||
address: {}, // 收货地址信息
|
||||
addressId: '', // 收货地址ID
|
||||
storeInfo: {}, // 门店信息
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
const data = JSON.parse(decodeURIComponent(options.data))
|
||||
console.log("data>>>", data);
|
||||
this.goods = data.goods
|
||||
|
||||
//#ifdef MP-WEIXIN
|
||||
this.pay.weixin = 1
|
||||
//#endif
|
||||
|
||||
//#ifdef MP-ALIPAY
|
||||
this.pay.alipay = 1
|
||||
//#endif
|
||||
|
||||
// 配送方式
|
||||
getDelivery()
|
||||
.then(({ code, data, msg }) => {
|
||||
// 请求结果判断
|
||||
if (code != 1) throw new Error(msg)
|
||||
return data
|
||||
})
|
||||
.then((data) => {
|
||||
// 快递
|
||||
if (!data.is_express) {
|
||||
this.addressTabsList = this.addressTabsList.filter(
|
||||
(item) => item.sign !== 'express'
|
||||
)
|
||||
}
|
||||
// 自提
|
||||
if (!data.is_selffetch) {
|
||||
this.addressTabsList = this.addressTabsList.filter(
|
||||
(item) => item.sign !== 'store'
|
||||
)
|
||||
}
|
||||
})
|
||||
// 页面数据初始化
|
||||
.then(() => {
|
||||
this.handleOrderMethods('info')
|
||||
this.initCouponData()
|
||||
})
|
||||
// 监听全局事件
|
||||
.then(() => {
|
||||
uni.$on('selectaddress', (params) => {
|
||||
this.addressId = params.id
|
||||
this.handleOrderMethods('info')
|
||||
})
|
||||
|
||||
uni.$on('payment', (params) => {
|
||||
setTimeout(() => {
|
||||
uni.$off('payment')
|
||||
|
||||
if (params.result) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/pay_result/pay_result?id=${params.order_id}`
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/user_order/user_order'
|
||||
})
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
|
||||
uni.$on('store', (params) => {
|
||||
this.storeInfo = params
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
// 取消全局监听
|
||||
uni.$off(['selectaddress', 'store'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
appointmentTime() {
|
||||
this.timePopup = true
|
||||
import { orderBuy, getOrderCoupon, getDelivery } from '@/api/order'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timePopup: false,
|
||||
pay: {
|
||||
weixin: 0,
|
||||
alipay: 0
|
||||
},
|
||||
showLoading: false, // Loading: 显示 | 隐藏
|
||||
goods: {}, // 商品信息
|
||||
// 地址Tabs列表
|
||||
addressTabsList: [
|
||||
{
|
||||
id: 1,
|
||||
sign: 'express',
|
||||
name: '快递配送'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
sign: 'store',
|
||||
name: '门店自提'
|
||||
}
|
||||
],
|
||||
addressTabsIndex: 0, // 地址Tabs索引
|
||||
goodsLists: [], // 商品列表
|
||||
orderInfo: {}, // 订单信息
|
||||
address: {}, // 收货地址信息
|
||||
addressId: '', // 收货地址ID
|
||||
storeInfo: {}, // 门店信息
|
||||
couponId: '', // 优惠券ID
|
||||
couponTabsIndex: 0, // 优惠券Tabs索引
|
||||
usableCoupon: [], // 优惠券--可使用
|
||||
unusableCoupon: [], // 优惠券--不可用
|
||||
showCoupon: false, // 显示优惠券Popup
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化优惠券数据
|
||||
initCouponData() {
|
||||
getOrderCoupon({
|
||||
goods: this.goods
|
||||
onLoad(options) {
|
||||
const data = JSON.parse(decodeURIComponent(options.data))
|
||||
console.log("data>>>", data);
|
||||
this.goods = data.goods
|
||||
|
||||
//#ifdef MP-WEIXIN
|
||||
this.pay.weixin = 1
|
||||
//#endif
|
||||
|
||||
//#ifdef MP-ALIPAY
|
||||
this.pay.alipay = 1
|
||||
//#endif
|
||||
|
||||
// 配送方式
|
||||
getDelivery()
|
||||
.then(({ code, data, msg }) => {
|
||||
// 请求结果判断
|
||||
if (code != 1) throw new Error(msg)
|
||||
return data
|
||||
})
|
||||
.then((data) => {
|
||||
// 快递
|
||||
if (!data.is_express) {
|
||||
this.addressTabsList = this.addressTabsList.filter(
|
||||
(item) => item.sign !== 'express'
|
||||
)
|
||||
}
|
||||
// 自提
|
||||
if (!data.is_selffetch) {
|
||||
this.addressTabsList = this.addressTabsList.filter(
|
||||
(item) => item.sign !== 'store'
|
||||
)
|
||||
}
|
||||
})
|
||||
// 页面数据初始化
|
||||
.then(() => {
|
||||
this.handleOrderMethods('info')
|
||||
this.initCouponData()
|
||||
})
|
||||
// 监听全局事件
|
||||
.then(() => {
|
||||
uni.$on('selectaddress', (params) => {
|
||||
this.addressId = params.id
|
||||
this.handleOrderMethods('info')
|
||||
})
|
||||
|
||||
uni.$on('payment', (params) => {
|
||||
setTimeout(() => {
|
||||
uni.$off('payment')
|
||||
|
||||
if (params.result) {
|
||||
uni.redirectTo({
|
||||
url: `/pages/pay_result/pay_result?id=${params.order_id}`
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/user_order/user_order'
|
||||
})
|
||||
}
|
||||
}, 500)
|
||||
})
|
||||
|
||||
uni.$on('store', (params) => {
|
||||
this.storeInfo = params
|
||||
})
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
|
||||
onUnload() {
|
||||
// 取消全局监听
|
||||
uni.$off(['selectaddress', 'store'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
appointmentTime() {
|
||||
this.timePopup = true
|
||||
},
|
||||
|
||||
// 初始化优惠券数据
|
||||
initCouponData() {
|
||||
getOrderCoupon({
|
||||
goods: this.goods
|
||||
})
|
||||
.then(({ code, data, msg }) => {
|
||||
if (code != 1) throw new Error(msg)
|
||||
return data
|
||||
@ -312,163 +333,182 @@
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
|
||||
// 点击订单提交
|
||||
onSubmitOrder() {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '是否确认下单?',
|
||||
confirmColor: '#FF2C3C',
|
||||
success: ({ confirm }) => {
|
||||
if (!confirm) return
|
||||
|
||||
this.handleOrderMethods('submit')
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 订单处理
|
||||
handleOrderMethods(action) {
|
||||
// 订单提交数据
|
||||
const orderFrom = {
|
||||
action,
|
||||
goods: this.goods,
|
||||
delivery_type: this.delivery,
|
||||
use_integral: this.useIntegral,
|
||||
address_id: this.addressId,
|
||||
coupon_id: this.couponId,
|
||||
bargain_launch_id: this.bargainLaunchId == -1 ? '' : this.bargainLaunchId
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case 'info':
|
||||
this.initPageData(orderFrom)
|
||||
break
|
||||
case 'submit':
|
||||
this.handleOrderSubmit(orderFrom)
|
||||
break
|
||||
}
|
||||
},
|
||||
|
||||
// 初始化页面数据
|
||||
async initPageData(from) {
|
||||
this.showLoading = true
|
||||
|
||||
try {
|
||||
const { code, data, msg } = await orderBuy(from)
|
||||
|
||||
if (code == 1) {
|
||||
this.address = data.address
|
||||
this.goodsLists = data.goods_lists
|
||||
//TODO
|
||||
if (data.selffetch_info) {
|
||||
this.storeInfo = data.selffetch_info.selffetch_shop
|
||||
? data.selffetch_info.selffetch_shop
|
||||
: {}
|
||||
this.userConsignee = data.selffetch_info.contact
|
||||
this.userMobile = data.selffetch_info.mobile
|
||||
}
|
||||
|
||||
this.orderInfo = data
|
||||
this.$nextTick(() => {
|
||||
this.isFirstLoading = false
|
||||
})
|
||||
} else {
|
||||
throw new Error(msg)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
this.$toast({ title: '网络异常,请重新进入页面' })
|
||||
} finally {
|
||||
this.showLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
// 点击选择收货地址
|
||||
onAddressExpress() {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/pages/address/address?type=${1}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 订单处理
|
||||
// handleOrderMethods(action) {
|
||||
// // 订单提交数据
|
||||
// const orderFrom = {
|
||||
// action,
|
||||
// goods: this.goods,
|
||||
// delivery_type: this.delivery,
|
||||
// use_integral: this.useIntegral,
|
||||
// address_id: this.addressId,
|
||||
// coupon_id: this.couponId,
|
||||
// bargain_launch_id: this.bargainLaunchId == -1 ? '' : this.bargainLaunchId
|
||||
// }
|
||||
|
||||
// switch (action) {
|
||||
// case 'info':
|
||||
// this.initPageData(orderFrom)
|
||||
// break
|
||||
// case 'submit':
|
||||
// this.handleOrderSubmit(orderFrom)
|
||||
// break
|
||||
// }
|
||||
// },
|
||||
|
||||
// // 订单提交
|
||||
// async handleOrderSubmit(from) {
|
||||
// this.showLoading = true
|
||||
|
||||
// from.remark = this.userRemark
|
||||
// from.type = this.type
|
||||
|
||||
// try {
|
||||
// const { code, data, msg } = this.teamId ? await teamBuy(from) : await orderBuy(from)
|
||||
|
||||
// if (code == 1) {
|
||||
// uni.redirectTo({
|
||||
// url: `/pages/payment/payment?from=${data.type}&order_id=${data.order_id}`
|
||||
// })
|
||||
// } else {
|
||||
// throw new Error(msg)
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// // this.$toast({ title: '下单异常,请重新操作' })
|
||||
// } finally {
|
||||
// this.showLoading = false
|
||||
// }
|
||||
// },
|
||||
},
|
||||
computed: {
|
||||
delivery() {
|
||||
return this.addressTabsList[this.addressTabsIndex]['id']
|
||||
|
||||
// 选择优惠券
|
||||
onSelectCoupon(value) {
|
||||
this.couponId = value
|
||||
this.showCoupon = false
|
||||
this.handleOrderMethods('info')
|
||||
},
|
||||
|
||||
// 点击订单提交
|
||||
onSubmitOrder() {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '是否确认下单?',
|
||||
confirmColor: '#FF2C3C',
|
||||
success: ({ confirm }) => {
|
||||
if (!confirm) return
|
||||
|
||||
this.handleOrderMethods('submit')
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 订单处理
|
||||
handleOrderMethods(action) {
|
||||
// 订单提交数据
|
||||
const orderFrom = {
|
||||
action,
|
||||
goods: this.goods,
|
||||
delivery_type: this.delivery,
|
||||
use_integral: this.useIntegral,
|
||||
address_id: this.addressId,
|
||||
coupon_id: this.couponId,
|
||||
bargain_launch_id: this.bargainLaunchId == -1 ? '' : this.bargainLaunchId
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case 'info':
|
||||
this.initPageData(orderFrom)
|
||||
break
|
||||
case 'submit':
|
||||
this.handleOrderSubmit(orderFrom)
|
||||
break
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
// 初始化页面数据
|
||||
async initPageData(from) {
|
||||
this.showLoading = true
|
||||
|
||||
try {
|
||||
const { code, data, msg } = await orderBuy(from)
|
||||
|
||||
if (code == 1) {
|
||||
this.address = data.address
|
||||
this.goodsLists = data.goods_lists
|
||||
//TODO
|
||||
if (data.selffetch_info) {
|
||||
this.storeInfo = data.selffetch_info.selffetch_shop
|
||||
? data.selffetch_info.selffetch_shop
|
||||
: {}
|
||||
this.userConsignee = data.selffetch_info.contact
|
||||
this.userMobile = data.selffetch_info.mobile
|
||||
}
|
||||
|
||||
this.orderInfo = data
|
||||
this.$nextTick(() => {
|
||||
this.isFirstLoading = false
|
||||
})
|
||||
} else {
|
||||
throw new Error(msg)
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
this.$toast({ title: '网络异常,请重新进入页面' })
|
||||
} finally {
|
||||
this.showLoading = false
|
||||
}
|
||||
},
|
||||
|
||||
// 点击选择收货地址
|
||||
onAddressExpress() {
|
||||
uni.navigateTo({
|
||||
url: `/bundle/pages/address/address?type=${1}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 订单处理
|
||||
// handleOrderMethods(action) {
|
||||
// // 订单提交数据
|
||||
// const orderFrom = {
|
||||
// action,
|
||||
// goods: this.goods,
|
||||
// delivery_type: this.delivery,
|
||||
// use_integral: this.useIntegral,
|
||||
// address_id: this.addressId,
|
||||
// coupon_id: this.couponId,
|
||||
// bargain_launch_id: this.bargainLaunchId == -1 ? '' : this.bargainLaunchId
|
||||
// }
|
||||
|
||||
// switch (action) {
|
||||
// case 'info':
|
||||
// this.initPageData(orderFrom)
|
||||
// break
|
||||
// case 'submit':
|
||||
// this.handleOrderSubmit(orderFrom)
|
||||
// break
|
||||
// }
|
||||
// },
|
||||
|
||||
// // 订单提交
|
||||
// async handleOrderSubmit(from) {
|
||||
// this.showLoading = true
|
||||
|
||||
// from.remark = this.userRemark
|
||||
// from.type = this.type
|
||||
|
||||
// try {
|
||||
// const { code, data, msg } = this.teamId ? await teamBuy(from) : await orderBuy(from)
|
||||
|
||||
// if (code == 1) {
|
||||
// uni.redirectTo({
|
||||
// url: `/pages/payment/payment?from=${data.type}&order_id=${data.order_id}`
|
||||
// })
|
||||
// } else {
|
||||
// throw new Error(msg)
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// // this.$toast({ title: '下单异常,请重新操作' })
|
||||
// } finally {
|
||||
// this.showLoading = false
|
||||
// }
|
||||
// },
|
||||
},
|
||||
computed: {
|
||||
delivery() {
|
||||
return this.addressTabsList[this.addressTabsIndex]['id']
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.num {
|
||||
color: #4E5969;
|
||||
}
|
||||
|
||||
.mask {
|
||||
color: #86909C;
|
||||
}
|
||||
|
||||
.fixed {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.count {
|
||||
color: #86909C;
|
||||
}
|
||||
.num {
|
||||
color: #4E5969;
|
||||
}
|
||||
|
||||
.mask {
|
||||
color: #86909C;
|
||||
}
|
||||
|
||||
.fixed {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.count {
|
||||
color: #86909C;
|
||||
}
|
||||
|
||||
.pop-title {
|
||||
height: 100rpx;
|
||||
border-bottom: 1rpx solid #f2f2f2;
|
||||
}
|
||||
|
||||
.pop-title .title {
|
||||
margin-left: 30rpx;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user