<template>
|
<view>
|
<view class='order-submission' v-if="isLoaded">
|
|
<view v-if="cartInfo && cartInfo.length > 0 && !cartInfo[0].isVirtual" class="allAddress"
|
:style="store_self_mention ? '' : 'padding-top:10rpx;'">
|
<view class="addressBox">
|
<view v-if="expressTypeArr.length" class="expressTypeBox cf">
|
<view v-if="expressTypeArr.indexOf(2) >= 0" class="expressType expressType1"
|
:class="expressType == 2 ? 'active' : ''" @click="expressType = 2">现场自提</view>
|
</view>
|
<view v-if="expressType == 2" class="expressTypeTipsBox">
|
<view class="expressTypeTips">
|
<view class="strong">自提注意事项</view>
|
<view>前往指定活动现场,对接现场专属工作人员完成领取操作</view>
|
</view>
|
</view>
|
<view v-if="expressTypeArr.length" class="expressTypeBox cf">
|
<view v-if="expressTypeArr.indexOf(3) >= 0" class="expressType expressType3"
|
:class="expressType == 3 ? 'active' : ''" @click="expressType = 3">线下领取</view>
|
</view>
|
<view v-if="expressType == 3" class="expressTypeTipsBox">
|
<view class="expressTypeTips">
|
<view class="strong">注意事项</view>
|
<view>工作人员将为您线下送货</view>
|
</view>
|
</view>
|
<view v-if="expressTypeArr.length" class="expressTypeBox cf">
|
<view v-if="expressTypeArr.indexOf(1) >= 0" class="expressType expressType2"
|
:class="expressType == 1 ? 'active' : ''" @click="expressType = 1">物流配送</view>
|
</view>
|
<view v-if="expressType == 1" class='address acea-row row-between-wrapper' @click='onAddress'
|
:style="store_self_mention ? '' : 'border-top-left-radius: 14rpx;border-top-right-radius: 14rpx;'">
|
<view class='addressCon' v-if="addressInfo.realName">
|
<view class='name'><text class='default font-color' v-if="addressInfo.isDefault">默认</text>
|
<text class='phone' :class="addressShow ? 'show' : ''"
|
:style="getByteLen(addressInfo.province + addressInfo.city + addressInfo.district + addressInfo.detail) > 34 ? '' : 'padding-right:0'">{{
|
addressInfo.province }}{{ addressInfo.city }}{{ addressInfo.district }}{{
|
addressInfo.detail }}<text
|
v-if="!addressShow && getByteLen(addressInfo.province + addressInfo.city + addressInfo.district + addressInfo.detail) > 34"
|
class="btn" @click.stop="showAddress($event)">展开</text></text>
|
</view>
|
<view class="acea-row">
|
<text class="line2">{{ addressInfo.realName }} {{ addressInfo.phone }}</text>
|
</view>
|
</view>
|
<view class='addressCon' v-else>
|
<view class='setaddress'>设置收货地址</view>
|
</view>
|
<view class='iconfont icon-jiantou'></view>
|
</view>
|
|
</view>
|
</view>
|
<view class="pad30 ">
|
<view class="wrapper_box borRadius14">
|
<orderGoods :cartInfo="cartInfo" :orderProNum="orderProNum"
|
:zonePromotionList="zonePromotionPreviewList"></orderGoods>
|
<view class='wrapper borRadius14'>
|
<view class='item acea-row row-between-wrapper'
|
v-if="orderInfoVo.equityCouponId && Number(orderInfoVo.equityCouponFee) > 0">
|
<!-- <view class="label">
|
使用{{extVipLevelNames[(orderInfoVo.isTestCoupon&&orderInfoVo.isTestCoupon==1)?-1:orderInfoVo.userLv]}}
|
</view> -->
|
<view class="label">
|
使用平台优惠抵扣
|
</view>
|
<view class='discount'>-{{ orderInfoVo.equityCouponFee }}
|
</view>
|
</view>
|
<view class='item acea-row row-between-wrapper'
|
v-if="orderInfoVo.proTotalFee > 0 && !orderInfoVo.bargainId && !orderInfoVo.combinationId && !orderInfoVo.seckillId && (productType === 'normal' || !productType)">
|
<view class="label">优惠券</view>
|
<block v-if="couponReady">
|
<view class='discount' style="min-width: 50%;text-align: right;" @tap='couponTap'
|
v-if="coupon.list.length > 0">{{ couponTitle }}
|
<text class='iconfont icon-jiantou'></text>
|
</view>
|
<view class='discount' v-else>暂无优惠券<text class='iconfont icon-jiantou'></text></view>
|
</block>
|
|
</view>
|
<view class='item acea-row row-between-wrapper' v-if='shippingType == 0'>
|
<view class="label">配送服务</view>
|
<view class='discount' v-if='parseFloat(orderInfoVo.freightFee) > 0'>
|
+¥{{ orderInfoVo.freightFee }}
|
</view>
|
<view class='discount' v-else>免运费</view>
|
</view>
|
<view v-else>
|
<view class="item acea-row row-between-wrapper">
|
<view class="label">联系人</view>
|
<view class="discount textR">
|
<input type="text" placeholder="请填写您的联系姓名" placeholder-style="color:#ccc;"
|
placeholder-class="placeholder" @blur='realName'></input>
|
</view>
|
</view>
|
<view class="item acea-row row-between-wrapper">
|
<view class="label">联系电话</view>
|
<view class="discount textR">
|
<input type="text" placeholder="请填写您的联系电话" placeholder-style="color:#ccc;"
|
placeholder-class="placeholder" @blur='phone'></input>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
|
<view class='wrapper wrapper2 borRadius14' v-if="orderInfoVo.payPrice > 0">
|
<view class='item'>
|
<view class="label">支付方式</view>
|
<view class='list'>
|
<view class='payItem acea-row row-middle' :class='active == index ? "on" : ""'
|
@tap='payItem(index)' v-for="(item, index) in cartArr" :key='index'
|
v-if="item.payStatus == 1" style="position: relative;">
|
<view class='name acea-row row-left-wrapper'>
|
<view class='iconfont '
|
:class='(item.icon) + " " + (animated == true && active == index ? "bounceIn" : "")'>
|
</view>
|
{{ item.name }}
|
</view>
|
<checkbox-group @change="checPayChange">
|
<checkbox value="all" :checked="!!isPaySelect" />
|
</checkbox-group>
|
<view style="width: 100%;height:100%;position:absolute;left: 0;top:0"></view>
|
</view>
|
</view>
|
</view>
|
</view>
|
<view class='wrapper wrapper2 borRadius14'
|
v-if="orderInfoVo.payWay == 1 || orderInfoVo.payCareBean > 0">
|
<view class='item'>
|
<view v-if="!(orderNum == 1 && orderInfoVo.payWay == 1)" class="label"
|
style="white-space: nowrap;color:#000000;">使用悦养豆</view>
|
<view class='list'>
|
<view class='payItem row-middle' style="margin-top:0">
|
<view class='name name2 row-left-wrapper'>
|
账户剩余:<text class="color-orange" style="font-size: 1.2em;font-weight: bold;"
|
:style="selectCareBeanNumber > myCareBean ? 'color:red!important;' : ''">{{
|
toThousands(myCareBean) }}悦养豆</text>
|
</view>
|
<!-- <view class='name name2 row-left-wrapper' v-else>
|
扣减悦养豆
|
</view> -->
|
<view style="right: -12rpx;" class="carnum acea-row row-left"
|
v-if="orderNum == 1 && orderInfoVo.payWay == 1">
|
<view class="carnum_item reduce"
|
:class="selectCareBeanNumber >= careBeanMinNumber + careBeanStep * 25 ? 'on' : ''"
|
@click="careBeanDes">
|
-
|
</view>
|
<view class='carnum_item num '>
|
<input type="number" pattern="[0-9]*" v-model="selectCareBeanNumber"
|
data-name="selectCareBeanNumber" @blur="blurCareBeanNum"></input>
|
</view>
|
<view class="carnum_item plus" :class="selectCareBeanNumber + careBeanStep * 25 <= careBeanMaxNumber
|
? 'on'
|
: ''
|
" @click="careBeanAdd">
|
+
|
</view>
|
</view>
|
<view class="carnum acea-row row-left"
|
v-if="!(orderNum == 1 && orderInfoVo.payWay == 1)">
|
<view class='carnum_item num'>{{ totalCareBeanNumber }}</view>
|
</view>
|
<block v-if="orderNum == 1 && orderInfoVo.payWay == 1">
|
<block v-if="careBeanMinNumber > myCareBean" style="color:red!important;">
|
<view class="tips">*您的悦养豆不足,请挑选其他商品</view>
|
</block>
|
<block v-else>
|
<view class="tips" v-if="totalCareBeanNumber > myCareBean"
|
style="color:red!important;">
|
*您的悦养豆不足,请重新输入</view>
|
</block>
|
</block>
|
<block v-if="!(orderNum == 1 && orderInfoVo.payWay == 1)">
|
<view class="tips" v-if="totalCareBeanNumber > myCareBean"
|
style="color:red!important;">
|
*您的悦养豆不足,请挑选其他商品</view>
|
</block>
|
</view>
|
</view>
|
<view v-if="orderNum == 1 && orderInfoVo.payWay == 1" class="label borRadius14"
|
style="padding: 10rpx;font-size: 23rpx;line-height: 34rpx;color:#0265CA;background-color: #f2f8fc;text-align: center;margin-top:10rpx;">
|
悦养豆使用规则:支持手动调整数量,需为{{ toThousands(careBeanStep * 25) }}的整数倍<text @click="goToThird"
|
style="padding-right: 25rpx;background: url('https://ossacmall.bluedeer.com.cn/app/static/images/icon_gonglue.jpg') right center/auto 1em no-repeat;display:block;margin:0 auto;width: max-content;font-weight: bold;">查看更多赚豆攻略</text>
|
</view>
|
</view>
|
</view>
|
<view
|
:style="(toNumber(orderInfoVo.couponFee) || toNumber(orderInfoVo.deductionPrice) > 0 || toNumber(orderInfoVo.freightFee) > 0) ? 'height:160rpx;' : 'height:130rpx;'">
|
</view>
|
</view>
|
<view class='moneyList borRadius14'
|
v-if="toNumber(orderInfoVo.couponFee) || toNumber(orderInfoVo.deductionPrice) > 0 || toNumber(orderInfoVo.freightFee) > 0">
|
<view class='item acea-row row-between-wrapper' v-if="toNumber(orderInfoVo.couponFee) > 0">
|
<view>优惠券抵扣:</view>
|
<view class='money color-blue'>-¥{{ toNumber(orderInfoVo.couponFee) }}</view>
|
</view>
|
<view class='item acea-row row-between-wrapper' v-if="toNumber(orderInfoVo.deductionPrice) > 0">
|
<view>积分抵扣:</view>
|
<view class='money'>-¥{{ toNumber(orderInfoVo.deductionPrice) }}</view>
|
</view>
|
<view class='item acea-row row-between-wrapper' v-if="toNumber(orderInfoVo.freightFee) > 0">
|
<view>运费:</view>
|
<view class='money color-blue'>+¥{{ toNumber(orderInfoVo.freightFee) }}</view>
|
</view>
|
</view>
|
<view class='footer acea-row row-between-wrapper'>
|
<view>合计:
|
<text style="font-weight: bold;"
|
v-if="toNumber(orderInfoVo.payFee) > 0 || toNumber(totalCareBeanNumber) > 0">
|
<text class="color-blue" v-if="toNumber(orderInfoVo.payFee) > 0">¥{{
|
toNumber(orderInfoVo.payFee)
|
|| 0 }}</text>
|
<text class="color-blue"
|
v-if="toNumber(orderInfoVo.payFee) > 0 && toNumber(totalCareBeanNumber) > 0">+</text>
|
<text class="color-blue" v-if="toNumber(totalCareBeanNumber) > 0">{{
|
toThousands(toNumber(totalCareBeanNumber)) }}悦养豆</text>
|
</text>
|
<text style="font-weight: bold;" class='color-blue' v-else>0</text>
|
</view>
|
<view class='settlement' style='z-index:100' @tap="SubOrder">立即结算</view>
|
</view>
|
</view>
|
<couponListWindow :selectCouponId='couponId' :coupon='coupon' @ChangCouponsClone="ChangCouponsClone"
|
:openType='openType' @ChangCoupons="ChangCoupons" :orderShow="orderShow"></couponListWindow>
|
<addressWindow ref="addressWindow" @changeTextareaStatus="changeTextareaStatus" :address='address'
|
:pagesUrl="pagesUrl" @OnDefaultAddress="OnDefaultAddress" @OnChangeAddress="OnChangeAddress"
|
@changeClose="changeClose"></addressWindow>
|
<view class="saleCode" v-if="saleCodeVisible">
|
<view class="sale-box">
|
<view class="sale-close" @click="handleCloseSaleCode"></view>
|
<view class="sale-title">
|
请输入销售码
|
</view>
|
<input v-model="saleCode" class="sale-code" />
|
<view class="sale-btn">
|
<button class="bg-green" @click="handleCloseSaleCode">取消</button>
|
<form report-submit="true" @submit="handleSubmitSale"><button class="bg-blue"
|
form-type="submit">确定</button>
|
</form>
|
</view>
|
<image src="https://ossacmall.bluedeer.com.cn/app/static/images/bg_pop_xiaoshouma.png" class="bg-sale">
|
</image>
|
</view>
|
</view>
|
</view>
|
</template>
|
<script>
|
let app = getApp();
|
import {
|
HTTP_REQUEST_URL,
|
THIRD_APPID
|
} from '@/config/app';
|
import BigNumber from 'bignumber.js';
|
import {
|
//orderConfirm,
|
getCouponsOrderPrice,
|
orderCreate,
|
postOrderComputed,
|
postOrderComputedSingle,
|
wechatOrderPay,
|
wechatQueryPayResult,
|
loadPreOrderApi,
|
getResetCart
|
} from '@/api/order.js';
|
import {
|
getAddressList,
|
getAddressDefault,
|
getAddressDetail,
|
getUserBean
|
} from '@/api/user.js';
|
import {
|
openPaySubscribe
|
} from '@/utils/SubscribeMessage.js';
|
import {
|
storeListApi,
|
getStoreZoneAndCouponList,
|
signInSales
|
} from '@/api/store.js';
|
import {
|
CACHE_LONGITUDE,
|
CACHE_LATITUDE
|
} from '@/config/cache.js';
|
import couponListWindow from '@/components/couponListWindow';
|
import addressWindow from '@/components/addressWindow';
|
import orderGoods from '@/components/orderGoods';
|
import home from '@/components/home';
|
import {
|
toLogin
|
} from '@/libs/login.js';
|
import {
|
mapGetters
|
} from "vuex";
|
export default {
|
components: {
|
couponListWindow,
|
addressWindow,
|
orderGoods,
|
home,
|
},
|
data() {
|
return {
|
expressTypeArr: [],
|
expressType: '',
|
extVipLevelNames: {
|
'-1': '臻享会员体验券',
|
'0': '普通会员权益券',
|
'1': '畅享会员权益券',
|
'2': '悦享会员权益券',
|
'3': '臻享会员权益券',
|
'4': '臻享专区惠购权'
|
},
|
orderShow: 'orderShow', //下单页面使用优惠券组件不展示tab切换页
|
textareaStatus: true,
|
//支付方式
|
cartArr: [{
|
"name": "微信支付",
|
"icon": "icon-test",
|
value: 'weixin',
|
title: '微信快捷支付',
|
payStatus: 1,
|
},
|
// {
|
// "name": "余额支付",
|
// "icon": "icon-icon-test",
|
// value: 'yue',
|
// title: '可用余额:',
|
// payStatus: 1,
|
// }
|
// {
|
// "name": "线下支付", //offlinePayStatu:1开启线下支付;2关闭;offlinePostage:true有邮费
|
// "icon": "icon-yinhangqia",
|
// value: 'offline',
|
// title: '线下支付',
|
// payStatus: 1,
|
// },
|
],
|
payType: 'weixin', //支付方式
|
openType: 1, //优惠券打开方式 1=使用
|
active: 0, //支付方式切换
|
coupon: {
|
show: false,
|
ready: false,
|
coupon: false,
|
list: [],
|
statusTile: '立即使用'
|
}, //优惠券组件
|
address: {
|
address: false,
|
addressId: 0
|
}, //地址组件
|
addressInfo: {}, //地址信息
|
addressId: 0, //地址id
|
couponId: 0, //优惠券id
|
lastCouponId: 0,
|
cartId: '', //购物车id
|
userInfo: {}, //用户信息
|
mark: '', //备注信息
|
couponTitle: '选择优惠券', //优惠券
|
coupon_price: 0, //优惠券抵扣金额
|
useIntegral: false, //是否使用积分
|
integral_price: 0, //积分抵扣金额
|
integral: 0,
|
ChangePrice: 0, //使用积分抵扣变动后的金额
|
formIds: [], //收集formid
|
status: 0,
|
is_address: false,
|
toPay: false, //修复进入支付时页面隐藏从新刷新页面
|
shippingType: 0,
|
system_store: {},
|
storePostage: 0,
|
contacts: '',
|
contactsTel: '',
|
mydata: {},
|
storeList: [],
|
store_self_mention: 0,
|
cartInfo: [],
|
priceGroup: {},
|
animated: false,
|
totalPrice: 0,
|
integralRatio: "0",
|
pagesUrl: "",
|
orderKey: "",
|
// usableCoupon: {},
|
offlinePostage: "",
|
isAuto: false, //没有授权的不会自动授权
|
isShowAuth: false, //是否隐藏授权
|
payChannel: '',
|
news: true,
|
again: false,
|
addAgain: false,
|
bargain: false, //是否是砍价
|
combination: false, //是否是拼团
|
secKill: false, //是否是秒杀
|
orderInfoVo: {},
|
addressList: [], //地址列表数据
|
orderProNum: 0,
|
preOrderNo: '', //预下单订单号
|
isPaySelect: true,
|
careBeanMaxNumber: 0,
|
careBeanMinNumber: 0,
|
selectCareBeanNumber: 0,
|
totalCareBeanNumber: 0,
|
careBeanRate: 0,
|
careBeanStep: 0,
|
orderNum: 0,
|
isShowConfirm: false,
|
isClicking: false,
|
isPageShow: false,
|
couponReady: false,
|
myCareBean: 0,
|
careBeanReady: false,
|
payWay: 1,
|
ifSales: true,
|
saleCodeVisible: false,
|
saleCode: '',
|
zoneIds: [],
|
isLoaded: false,
|
entranceNameVar: '',
|
addressShow: false,
|
userBkFlag: false,
|
zonePromotionPreviewList: []
|
};
|
},
|
computed: mapGetters(['isLogin', 'systemPlatform', 'productType']),
|
watch: {
|
// cartInfo: {
|
// handler: function(newVal,oldVal) {
|
|
|
// },
|
// deep: true
|
// }
|
},
|
onLoad(options) {
|
let that = this;
|
// #ifdef H5
|
this.payChannel = this.$wechat.isWeixin() ? 'public' : 'weixinh5';
|
// #endif
|
// #ifdef MP
|
this.payChannel = 'routine';
|
// #endif
|
// if (!options.cartId) return this.$util.Tips({
|
// title: '请选择要购买的商品'
|
// }, {
|
// tab: 3,
|
// url: 1
|
// });
|
if (!that.$store.getters.careBeanRate) {
|
uni.$once('updateCareBeanRate', () => {
|
that.careBeanRate = that.$store.getters.careBeanRate;
|
that.careBeanStep = BigNumber(that.careBeanRate).div(100).toNumber();
|
});
|
} else {
|
that.careBeanRate = that.$store.getters.careBeanRate;
|
that.careBeanStep = BigNumber(that.careBeanRate).div(100).toNumber();
|
}
|
this.getUserBean();
|
this.preOrderNo = options.preOrderNo || 0;
|
this.addressId = options.addressId || 0;
|
this.is_address = options.is_address ? true : false;
|
|
that.isLoaded = false;
|
if (this.isLogin) {
|
this.getloadPreOrder();
|
} else {
|
uni.$on('UPDATE_LOGINSTATUS', (data) => {
|
if (data.type == 'login') {
|
this.getloadPreOrder();
|
}
|
});
|
toLogin(this);
|
}
|
},
|
onHide() {
|
this.isPageShow = false;
|
},
|
onShow: function () {
|
console.log('11111111-----------', this.getByteLen('asdfasdfs'))
|
this.isPageShow = true;
|
let that = this
|
let pages = getCurrentPages(),
|
currPage = pages[pages.length - 1];
|
console.log('------------------page onShow start-----------------');
|
console.log('route', currPage.route);
|
console.log('options', currPage.options);
|
console.log('------------------page onShow end-----------------');
|
that.addTrack('yy_pageView', {
|
pageTitle_var: '订单确认',
|
pagePath_var: currPage.$page.fullPath,
|
pageType_var: '订单'
|
});
|
if (currPage.options.userBkFlag) {
|
that.userBkFlag = currPage.options.userBkFlag;
|
}
|
if (currPage.options.couponId) {
|
that.lastCouponId = currPage.options.couponId;
|
}
|
if (currPage.options.entranceNameVar) {
|
that.entranceNameVar = currPage.options.entranceNameVar;
|
}
|
if (currPage.options.use) {
|
that.lastCouponId = currPage.options.use;
|
}
|
// wx.getLaunchOptionsSync
|
this.textareaStatus = true;
|
if (this.isLogin && this.toPay == false) {
|
//this.getaddressInfo();
|
}
|
|
uni.$on("handClick", res => {
|
if (res) {
|
that.system_store = res.address
|
}
|
// 清除监听
|
uni.$off('handClick');
|
})
|
|
if (this.$store.getters.userInfo) {
|
this.userInfo = this.$store.getters.userInfo;
|
}
|
console.log(this.userInfo);
|
},
|
/**
|
* 生命周期函数--监听页面隐藏
|
*/
|
// onHide: function() {
|
// this.isClose = true
|
// },
|
methods: {
|
previewImage(url) {
|
uni.previewImage({
|
urls: [url]
|
})
|
},
|
getByteLen(val) {
|
var len = 0;
|
for (var i = 0; i < val.length; i++) {
|
var length = val.charCodeAt(i);
|
if (length >= 0 && length <= 128) {
|
len += 1;
|
} else {
|
len += 2;
|
}
|
}
|
return len;
|
},
|
goToThird() {
|
let that = this;
|
|
function go() {
|
//第三方小程序
|
let miniProgramInfo = uni.getAccountInfoSync().miniProgram;
|
|
let url = 'pages/main/index?tab=welfare&'
|
url += 'sourceScene=order';
|
|
url += '&agentNo=' + ((that.$store.getters.belong && that.$store.getters.belong.agentNo) ? that.$store
|
.getters.belong.agentNo : '');
|
url += '&agentChannel=' + ((that.$store.getters.belong && that.$store.getters.belong.channel) ? that.$store
|
.getters.belong.channel : ''); //归属代理人渠道
|
url += '&agentCompany=' + ((that.$store.getters.belong && that.$store.getters.belong.companyCode) ? that
|
.$store.getters.belong.companyCode : ''); //agentCompany
|
|
url += '&agentBranch=' + ((that.$store.getters.belong && that.$store.getters.belong.branchCode) ? that
|
.$store.getters.belong.branchCode : ''); //归属代理人支公司
|
url += '&custAgentOrgNo=' + ((that.$store.getters.belong && that.$store.getters.belong.subCode) ? that
|
.$store.getters.belong.subCode : ''); //归属代理人机构编码
|
|
url += 'unionId=' + that.$store.getters.unionId;
|
url += '&mobile=' + ((that.$store.getters.belong && that.$store.getters.belong.mobile) ? that.$store
|
.getters.belong.mobile : that.$store.getters.userInfo.mobile);
|
console.log(url);
|
uni.navigateToMiniProgram({
|
appId: THIRD_APPID,
|
path: url,
|
envVersion: miniProgramInfo.envVersion == 'release' ? 'release' : 'trial',
|
})
|
|
// let params = {};
|
// params['custAgentNo'] = ((that.$store.getters.belong && that.$store.getters.belong.agentNo) ? that
|
// .$store
|
// .getters.belong.agentNo : '');
|
// params['custAgentChnl'] = ((that.$store.getters.belong && that.$store.getters.belong.channel) ? that
|
// .$store
|
// .getters.belong.channel : '');
|
// params['custAgentCoy'] = ((that.$store.getters.belong && that.$store.getters.belong.companyCode) ? that
|
// .$store.getters.belong.companyCode : '');
|
// params['custAgentBranch'] = ((that.$store.getters.belong && that.$store.getters.belong.branchCode) ?
|
// that
|
// .$store.getters.belong.branchCode : '');
|
// params['custAgentOrgNo'] = ((that.$store.getters.belong && that.$store.getters.belong.subCode) ? that
|
// .$store.getters.belong.subCode : '');
|
// let webUrl = 'https://ossacmall.bluedeer.com.cn/qr/index.html?isMall=true' + (miniProgramInfo.envVersion == 'release' ?
|
// '' : '&isTrial=true') + '¶ms=' + encodeURIComponent(JSON.stringify(params)) + '&pageUrl=' +
|
// encodeURIComponent(url);
|
// if (HTTP_REQUEST_URL.indexOf('tohours') > 0) {
|
// webUrl = webUrl.replace('https://ossacmall.bluedeer.com.cn/qr',
|
// 'https://sit.tohours.com/crmeb_web/qr/')
|
// }
|
// uni.navigateTo({
|
// url: '/pages/users/web_page/index?webUel=' + encodeURIComponent(webUrl)
|
// })
|
}
|
if (!that.$store.getters.isLogin) {
|
toLogin(that);
|
that.loginBackFn = function () {
|
go();
|
}
|
} else {
|
go();
|
}
|
},
|
showAddress(e) {
|
e.preventDefault();
|
e.stopPropagation();
|
this.addressShow = true;
|
},
|
getUserBean() {
|
let that = this;
|
getUserBean().then(res2 => {
|
that.careBeanReady = true;
|
//that.myCareBean = res2.data.totalCareBeans;
|
that.myCareBean = res2.data.thisYearUseCount;
|
});
|
},
|
computPriceSingle: function () {
|
let that = this;
|
postOrderComputedSingle({
|
attrValueId: that.cartInfo[0].attrValueId,
|
payCareBean: that.selectCareBeanNumber
|
}).then((res) => {
|
console.log(res);
|
})
|
},
|
iptCareBeanNum: function (e) {
|
if ((e && e.detail && e.detail.value && !isNaN(e.detail.value))) {
|
let num = Number(e.detail.value);
|
this.$set(this, 'selectCareBeanNumber', num);
|
} else {
|
this.$set(this, 'selectCareBeanNumber', '');
|
}
|
},
|
blurCareBeanNum: function (e) {
|
if ((e && e.detail && e.detail.value && !isNaN(e.detail.value))) {
|
let num = Number(e.detail.value);
|
if (num < this.careBeanMinNumber) {
|
num = this.careBeanMinNumber;
|
}
|
if (num > this.careBeanMaxNumber) {
|
num = this.careBeanMaxNumber;
|
}
|
if (num % (this.careBeanStep * 25) !== 0) {
|
num = this.careBeanMinNumber;
|
this.$util.Tips({
|
title: "悦养豆需要为" + this.careBeanStep * 25 + "的倍数"
|
})
|
}
|
this.$set(this, 'selectCareBeanNumber', num);
|
} else {
|
this.$set(this, 'selectCareBeanNumber', this.careBeanMinNumber);
|
}
|
|
this.updatePreOrder();
|
//this.$set(this.cartInfo[0], 'payPrice',this.getSelectPrice(this.cartInfo[0].price,this.selectCareBeanNumber));
|
},
|
careBeanDes: function () {
|
if (this.careBeanMinNumber <= this.selectCareBeanNumber - this.careBeanStep * 25) {
|
this.$set(this, "selectCareBeanNumber", this.selectCareBeanNumber - this.careBeanStep * 25);
|
this.updatePreOrder();
|
//this.$set(this.cartInfo[0], 'payPrice',this.getSelectPrice(this.cartInfo[0].price,this.selectCareBeanNumber));
|
}
|
},
|
careBeanAdd: function () {
|
if (this.careBeanMaxNumber >= this.selectCareBeanNumber + this.careBeanStep * 25) {
|
this.$set(this, "selectCareBeanNumber", this.selectCareBeanNumber + this.careBeanStep * 25);
|
this.updatePreOrder();
|
//this.$set(this, 'selectPrice',this.getSelectPrice(this.cartInfo[0].price,this.selectCareBeanNumber));
|
}
|
},
|
getSelectPrice(price, careBeanNumber) {
|
return BigNumber(price).minus(BigNumber(careBeanNumber).div(this.careBeanRate)).toFixed(2);
|
},
|
checPayChange: function (event) {
|
let value = event.detail.value;
|
if (value.length > 0) {
|
this.isPaySelect = true;
|
} else {
|
this.isPaySelect = false;
|
}
|
},
|
updatePreOrder: function () {
|
console.log('重新预下单 updatePreOrder');
|
let params = {
|
attrValueId: this.cartInfo[0].attrValueId,
|
productId: this.cartInfo[0].productId,
|
productNum: this.cartInfo[0].payNum,
|
"payCareBean": this.selectCareBeanNumber,
|
};
|
if (this.cartInfo[0].zoneId) {
|
params['zoneId'] = this.cartInfo[0].zoneId;
|
}
|
if (this.orderInfoVo.seckillId) {
|
params['seckillId'] = this.orderInfoVo.seckillId;
|
}
|
this.$Order.updatePreOrder({
|
"preOrderType": "buyNow",
|
"orderDetails": [params]
|
}).then((res) => {
|
console.log(res);
|
this.preOrderNo = res.data.preOrderNo;
|
this.getloadPreOrder();
|
});
|
},
|
// 订单详情
|
getloadPreOrder: function () {
|
console.log('获取订单详情 getloadPreOrder');
|
let that = this;
|
loadPreOrderApi(this.preOrderNo).then(res => {
|
let newOrderInfoVo = res.data.orderInfoVo;
|
console.log(12345678, that.addressId);
|
let addressId = that.addressId ? that.addressId : newOrderInfoVo.addressId;
|
if (!that.address || that.address.addressId !== addressId) {
|
that.address.addressId = addressId;
|
that.getaddressInfo();
|
} else {
|
|
}
|
that.getStoreZoneAndCouponList(newOrderInfoVo.orderDetailList)
|
that.getCouponList(false, newOrderInfoVo.proTotalFee).then(function () {
|
that.computedPrice(true, newOrderInfoVo).then((orderInfoVo) => {
|
that.$set(that, 'orderInfoVo', orderInfoVo);
|
console.log(12345, orderInfoVo);
|
that.$set(that, 'cartInfo', JSON.parse(JSON.stringify(orderInfoVo
|
.orderDetailList)));
|
that.$set(that, 'payWay', orderInfoVo.payWay);
|
that.orderProNum = orderInfoVo.orderProNum;
|
that.cartArr[0].payStatus = parseInt(res.data.payWeixinOpen) ===
|
1 ? 1 : 0;
|
that.store_self_mention = res.data.storeSelfMention == 'true' &&
|
that
|
.productType ===
|
'normal' ? true : false;
|
//that.$nextTick(function() {
|
that.orderNum = that.cartInfo.length;
|
that.$refs.addressWindow.getAddressList();
|
let totalCareBeanNumber = 0;
|
that.cartInfo.forEach(function (item, index) {
|
totalCareBeanNumber += item.payNum * item.payCareBean;
|
})
|
that.totalCareBeanNumber = totalCareBeanNumber;
|
if (that.cartInfo.length == 1) {
|
that.careBeanMinNumber = that.cartInfo[0].careBeanMinNumber;
|
that.careBeanMaxNumber = that.cartInfo[0].careBeanMaxNumber;
|
that.selectCareBeanNumber = that.cartInfo[0].payCareBean;
|
}
|
//})
|
that.cartInfo.forEach((item) => {
|
if (!item.isVirtual) {
|
if (item.pickType) {
|
if (item.pickType.indexOf(1) >= 0) {
|
if (that.expressTypeArr.indexOf(1) <= 0) {
|
that.expressTypeArr.push(1);
|
}
|
}
|
if (item.pickType.indexOf(2) >= 0) {
|
if (that.expressTypeArr.indexOf(2) <= 0) {
|
that.expressTypeArr.push(2);
|
}
|
}
|
if (item.pickType.indexOf(3) >= 0) {
|
if (that.expressTypeArr.indexOf(3) <= 0) {
|
that.expressTypeArr.push(3);
|
}
|
}
|
} else {
|
if (that.expressTypeArr.indexOf(1) <= 0) {
|
that.expressTypeArr.push(1);
|
}
|
}
|
}
|
});
|
if (that.userBkFlag) {
|
that.expressTypeArr = [2];
|
}
|
console.log(that.expressTypeArr);
|
if (that.cartInfo[0].isVirtual) {
|
|
} else if (that.expressTypeArr.indexOf(2) >= 0) {
|
that.expressType = 2;
|
} else if (that.expressTypeArr.indexOf(3) >= 0) {
|
that.expressType = 3;
|
} else {
|
that.expressType = 1;
|
}
|
that.isLoaded = true;
|
})
|
});
|
|
|
}).catch(err => {
|
return that.$util.Tips({
|
title: (err && err.message) ? err.message : err
|
});
|
})
|
},
|
getStoreZoneAndCouponList(orderDetailList) {
|
let that = this;
|
that.ifSales = false;
|
getStoreZoneAndCouponList({}).then(res => {
|
const {
|
storeZoneList
|
} = res.data
|
const zoneIds = []
|
storeZoneList.forEach(item => {
|
if (item.zoneType == 3) {
|
zoneIds.push(item.id)
|
}
|
})
|
that.zoneIds = []
|
orderDetailList.forEach(order => {
|
if (order.zoneId && zoneIds.includes(order.zoneId)) {
|
that.zoneIds.push(order.zoneId)
|
that.ifSales = true
|
}
|
})
|
})
|
},
|
/**
|
* 获取门店列表数据
|
*/
|
getList: function () {
|
let longitude = uni.getStorageSync("user_longitude"); //经度
|
let latitude = uni.getStorageSync("user_latitude"); //纬度
|
let data = {
|
latitude: latitude, //纬度
|
longitude: longitude, //经度
|
page: 1,
|
limit: 10
|
}
|
storeListApi(data).then(res => {
|
let list = res.data.list || [];
|
this.$set(this, 'storeList', list);
|
this.$set(this, 'system_store', list[0]);
|
}).catch(err => {
|
return this.$util.Tips({
|
title: (err && err.message) ? err.message : err
|
});
|
})
|
},
|
// 关闭地址弹窗;
|
changeClose: function () {
|
this.$set(this.address, 'address', false);
|
},
|
/*
|
* 跳转门店列表
|
*/
|
showStoreList: function () {
|
|
let that = this
|
if (this.storeList.length > 0) {
|
uni.navigateTo({
|
url: '/pages/users/goods_details_store/index'
|
})
|
}
|
},
|
// 计算订单价格
|
computedPrice: function (isReOrder, orderInfoVo) {
|
console.log('-------重新计算价格');
|
console.log(this.address);
|
console.log(this.addressList);
|
let shippingType = this.shippingType;
|
let otherParams={}
|
if(!orderInfoVo.combinationId){
|
otherParams={
|
couponId:this.couponId
|
}
|
}
|
return new Promise((resolve, reject) => {
|
postOrderComputed({
|
addressId: this.address.addressId,
|
useIntegral: this.useIntegral ? true : false,
|
// couponId: this.couponId,
|
shippingType: this.expressType ? this.expressType : 2,
|
preOrderNo: this.preOrderNo,
|
...otherParams
|
}).then(res => {
|
let data = res.data;
|
if (isReOrder) {
|
console.log('重新选择')
|
orderInfoVo.userIntegral = data.surplusIntegral;
|
orderInfoVo.useIntegral = data.useIntegral;
|
orderInfoVo.usedIntegral = data.usedIntegral;
|
orderInfoVo.surplusIntegral = data.surplusIntegral;
|
orderInfoVo.deductionPrice = data.deductionPrice;
|
orderInfoVo.couponFee = data.couponFee;
|
orderInfoVo.freightFee = data.freightFee;
|
orderInfoVo.payFee = data.payFee;
|
orderInfoVo.proTotalFee = data.proTotalFee;
|
orderInfoVo.userLv = data.userLv;
|
orderInfoVo.isTestCoupon = data.isTestCoupon;
|
this.$set(this, 'zonePromotionPreviewList', data.zonePromotionPreviewList || []);
|
resolve(orderInfoVo);
|
} else {
|
let orderInfoVo = {};
|
orderInfoVo.userIntegral = data.surplusIntegral;
|
orderInfoVo.useIntegral = data.useIntegral;
|
orderInfoVo.usedIntegral = data.usedIntegral;
|
orderInfoVo.surplusIntegral = data.surplusIntegral;
|
orderInfoVo.deductionPrice = data.deductionPrice;
|
orderInfoVo.couponFee = data.couponFee;
|
orderInfoVo.freightFee = data.freightFee;
|
orderInfoVo.payFee = data.payFee;
|
orderInfoVo.proTotalFee = data.proTotalFee;
|
orderInfoVo.userLv = data.userLv;
|
orderInfoVo.isTestCoupon = data.isTestCoupon;
|
this.$set(this, 'zonePromotionPreviewList', data.zonePromotionPreviewList || []);
|
this.$set(this, 'orderInfoVo', orderInfoVo);
|
}
|
}).catch(err => {
|
return this.$util.Tips({
|
title: (err && err.message) ? err.message : err
|
});
|
});
|
});
|
|
|
},
|
addressType: function (e) {
|
let index = e;
|
this.shippingType = parseInt(index);
|
this.computedPrice(true, this.orderInfoVo);
|
if (index == 1) this.getList();
|
},
|
bindPickerChange: function (e) {
|
let value = e.detail.value;
|
this.shippingType = value;
|
this.computedPrice(true, this.orderInfoVo);
|
},
|
ChangCouponsClone: function () {
|
this.$set(this.coupon, 'show', false);
|
},
|
changeTextareaStatus: function () {
|
for (let i = 0, len = this.coupon.list.length; i < len; i++) {
|
this.coupon.list[i].is_use = 0;
|
}
|
this.textareaStatus = true;
|
this.status = 0;
|
this.$set(this.coupon, 'list', this.coupon.list);
|
},
|
/**
|
* 处理点击优惠券后的事件
|
*
|
*/
|
ChangCoupons: function (e, isDel) {
|
// this.usableCoupon = e
|
// this.coupon.coupon = false
|
|
let coupon = e,
|
index = 0,
|
list = this.coupon.list,
|
couponTitle = '请选择',
|
couponId = 0;
|
for (let i = 0, len = list.length; i < len; i++) {
|
if (list[i].id != coupon.id) {
|
list[i].isChecked = 0;
|
} else {
|
index = i;
|
}
|
}
|
|
if (this.couponId == coupon.id) {
|
//不使用优惠券
|
} else {
|
//使用优惠券
|
couponTitle = list[index].name;
|
couponId = list[index].id;
|
}
|
this.couponTitle = couponTitle;
|
this.couponId = couponId;
|
this.$set(this.coupon, 'show', false);
|
this.$set(this.coupon, 'list', list);
|
console.log(this.coupon.list[index]);
|
this.computedPrice(true, this.orderInfoVo);
|
},
|
/**
|
* 使用积分抵扣
|
*/
|
ChangeIntegral: function () {
|
this.useIntegral = !this.useIntegral;
|
this.computedPrice(true, this.orderInfoVo);
|
},
|
/**
|
* 首次进页面展示默认地址
|
*/
|
OnDefaultAddress: function (e) {
|
this.addressInfo = e;
|
this.address.addressId = e.id;
|
this.addressId = e.id;
|
},
|
/**
|
* 选择地址后改变事件
|
* @param object e
|
*/
|
OnChangeAddress: function (e) {
|
this.addressInfo = e;
|
this.address.addressId = e.id;
|
this.addressId = e.id;
|
this.textareaStatus = true;
|
//this.orderInfoVo.addressId = e;
|
this.address.address = false;
|
//this.getaddressInfo();
|
this.computedPrice(true, this.orderInfoVo);
|
},
|
bindHideKeyboard: function (e) {
|
this.mark = e.detail.value;
|
},
|
/**
|
* 获取当前金额可用优惠券
|
*
|
*/
|
getCouponList: function (isOpen, price) {
|
let that = this;
|
return new Promise((resolve, reject) => {
|
getCouponsOrderPrice(that.preOrderNo).then(res => {
|
let arr = res.data;
|
arr.sort((a, b) => {
|
let aSort = a.sort ? a.sort : 0;
|
let bSort = b.sort ? b.sort : 0;
|
if (aSort == bSort) {
|
return 1;
|
} else {
|
return aSort - bSort;
|
}
|
});
|
let hasChooseCoupon = false;
|
if (that.couponId) {
|
arr.map((item, index) => {
|
console.log(item.id);
|
if (that.couponId == item.id + '') {
|
that.couponId = item.id;
|
that.couponTitle = item.name;
|
item.isUse = true;
|
hasChooseCoupon = true;
|
}
|
});
|
}
|
if (hasChooseCoupon) {
|
|
} else if (that.lastCouponId) {
|
arr.map((item, index) => {
|
if (that.lastCouponId == item.couponId + '') {
|
that.couponId = item.id;
|
that.couponTitle = item.name;
|
item.isUse = true;
|
}
|
});
|
} else if (!that.couponReady && arr.length > 0) {
|
console.log(12123123123, that.orderInfoVo.proTotalFee);
|
let maxPrice = price ? price : that.orderInfoVo.proTotalFee;
|
if (maxPrice > 0 && !that.orderInfoVo.bargainId && !that.orderInfoVo
|
.combinationId && !that.orderInfoVo.seckillId && (that.productType ===
|
'normal' || !that.productType)) {
|
that.couponId = arr[0].id;
|
that.couponTitle = arr[0].name;
|
arr[0].isUse = true;
|
}
|
}
|
that.$set(that.coupon, 'list', arr);
|
that.couponReady = true;
|
if (isOpen) {
|
that.openType = 1;
|
}
|
resolve();
|
}).catch((e) => {
|
console.log(e);
|
reject();
|
});
|
});
|
|
},
|
/*
|
* 获取默认收货地址或者获取某条地址信息
|
*/
|
getaddressInfo: function () {
|
let that = this;
|
if (that.address.addressId) {
|
getAddressDetail(that.address.addressId).then(res => {
|
if (res.data) {
|
res.data.isDefault = parseInt(res.data.isDefault);
|
that.addressInfo = res.data ? res.data : {};
|
that.addressId = res.data.id || 0;
|
that.address.addressId = res.data.id || 0;
|
}
|
})
|
} else {
|
getAddressDefault().then(res => {
|
if (res.data) {
|
res.data.isDefault = parseInt(res.data.isDefault);
|
that.addressInfo = res.data ? res.data : {};
|
that.addressId = res.data.id || 0;
|
that.address.addressId = res.data.id || 0;
|
}
|
})
|
}
|
},
|
payItem: function (e) {
|
let that = this;
|
let active = e;
|
that.active = active;
|
that.animated = true;
|
that.payType = that.cartArr[active].value;
|
this.computedPrice(true, this.orderInfoVo);
|
setTimeout(function () {
|
that.car();
|
}, 500);
|
},
|
couponTap: function () {
|
this.coupon.show = true;
|
this.getCouponList('isOpen');
|
},
|
car: function () {
|
let that = this;
|
that.animated = false;
|
},
|
onAddress: function () {
|
let that = this;
|
that.textareaStatus = false;
|
that.address.address = true;
|
that.pagesUrl = '/pages/users/user_address_list/index?preOrderNo=' + this.preOrderNo;
|
this.$refs.addressWindow.getAddressList();
|
},
|
realName: function (e) {
|
this.contacts = e.detail.value;
|
},
|
phone: function (e) {
|
this.contactsTel = e.detail.value;
|
},
|
payment: function (data) {
|
let that = this;
|
orderCreate(data).then(res => {
|
console.log(data);
|
let params = {
|
'orderID_var': data.preOrderNo,
|
'payMethod_var': '',
|
'orderPrice_var': that.orderInfoVo.proTotalFee,
|
'shippingPrice_var': '0.00',
|
'payPrice_var': that.orderInfoVo.payFee,
|
'payCarePoint_var': that.orderInfoVo.payCareBean,
|
'discountPrice_var': that.orderInfoVo.couponFee,
|
'buyQuantity_var': that.cartInfo.map((item) => {
|
return item.payNum
|
}).join(','),
|
'ifUseCoupon_var': that.couponId ? '是' : '否',
|
'couponName_var': that.couponId ? that.couponTitle : '-',
|
'couponID_var': that.couponId ? that.couponId : '-',
|
'productName_var': that.cartInfo.map((item) => {
|
return item.productName
|
}).join(','),
|
'productID_var': that.cartInfo.map((item) => {
|
return item.productId
|
}).join(','),
|
}
|
if (that.orderInfoVo.payFee > 0 && that.totalCareBeanNumber > 0) {
|
params.payMethod_var = '现金+悦养豆'
|
} else if (that.totalCareBeanNumber > 0) {
|
params.payMethod_var = '悦养豆'
|
} else {
|
params.payMethod_var = '现金'
|
};
|
|
that.addTrack('yy_createOrder', params);
|
that.getOrderPay(res.data.orderNo, '支付成功');
|
}).catch(err => {
|
console.log(err);
|
setTimeout(() => {
|
that.isClicking = false;
|
}, 500)
|
uni.hideLoading();
|
return that.$util.Tips({
|
title: (err && err.message) ? err.message : err
|
});
|
});
|
},
|
getOrderPay: function (orderNo, message) {
|
let that = this;
|
let params = {
|
'orderID_var': orderNo,
|
'payMethod_var': '',
|
'orderPrice_var': that.orderInfoVo.proTotalFee,
|
'shippingPrice_var': '0.00',
|
'payPrice_var': that.orderInfoVo.payFee,
|
'payCarePoint_var': that.orderInfoVo.payCareBean,
|
'discountPrice_var': that.orderInfoVo.couponFee,
|
'buyQuantity_var': that.cartInfo.map((item) => {
|
return item.payNum
|
}).join(','),
|
'ifUseCoupon_var': that.couponId ? '是' : '否',
|
'couponName_var': that.couponId ? that.couponTitle : '-',
|
'couponID_var': that.couponId ? that.couponId : '-',
|
'productName_var': that.cartInfo.map((item) => {
|
return item.productName
|
}).join(','),
|
'productID_var': that.cartInfo.map((item) => {
|
return item.productId
|
}).join(','),
|
}
|
if (that.orderInfoVo.payFee > 0 && that.totalCareBeanNumber > 0) {
|
params.payMethod_var = '现金+悦养豆'
|
} else if (that.totalCareBeanNumber > 0) {
|
params.payMethod_var = '悦养豆'
|
} else {
|
params.payMethod_var = '现金'
|
};
|
|
let goPages = '/pages/order_pay_status/index?order_id=' + orderNo + '&msg=' + message;
|
wechatOrderPay({
|
orderNo: orderNo,
|
payChannel: that.payChannel,
|
payType: that.payType,
|
scene: that.productType === 'normal' ? 0 : 1177 //下单时小程序的场景值
|
}).then(res => {
|
console.log('剩余权益券数量', res.data.availableCouponCount);
|
if (res.data.availableCouponCount == 1) {
|
goPages += '&isLastOne=true'
|
}
|
let jsConfig = res.data.jsConfig;
|
switch (res.data.payType) {
|
case 'weixin':
|
// #ifdef MP
|
uni.requestPayment({
|
timeStamp: jsConfig.timeStamp,
|
nonceStr: jsConfig.nonceStr,
|
package: jsConfig.packages,
|
signType: jsConfig.signType,
|
paySign: jsConfig.paySign,
|
ticket: that.productType === 'normal' ? null : jsConfig.ticket,
|
success: function (ress) {
|
console.log('微信支付成功')
|
that.$store.commit('UPDATE_isSystemHide', {
|
isSystemHide: (new Date()).getTime()
|
});
|
wechatQueryPayResult(orderNo).then(res => {
|
uni.hideLoading();
|
uni.$emit('onAddTrack', {
|
name: 'yy_payOrder',
|
data: params
|
});
|
if (params.couponID_var && params.couponID_var !==
|
'-') {
|
// that.addTrack('yy_couponRedeem', {
|
// 'couponName_var': params
|
// .couponName_var,
|
// 'couponId_var': params
|
// .couponID_var,
|
// 'redeemWay_var': '商城核销'
|
// });
|
|
uni.$emit('onAddTrack', {
|
name: 'yy_couponRedeem',
|
data: {
|
'couponName_var': params.couponName_var,
|
'couponId_var': params.couponID_var,
|
'redeemWay_var': '商城核销'
|
}
|
});
|
}
|
|
setTimeout(() => {
|
that.isClicking = false;
|
if (that.orderInfoVo.bargainId || that.orderInfoVo
|
.combinationId || that.pinkId || that
|
.orderInfoVo.seckillId)
|
return that.$util.Tips({
|
title: '支付成功',
|
icon: 'success'
|
}, {
|
tab: 4,
|
url: goPages
|
});
|
return that.$util.Tips({
|
title: '支付成功',
|
icon: 'success'
|
}, {
|
tab: 5,
|
url: goPages
|
});
|
}, 500);
|
|
}).catch(err => {
|
setTimeout(() => {
|
that.isClicking = false;
|
}, 500);
|
uni.hideLoading();
|
return that.$util.Tips({
|
title: (err && err.message) ? err
|
.message : err
|
});
|
})
|
|
},
|
fail: function (e) {
|
console.log('微信支付失败')
|
uni.hideLoading();
|
that.$store.commit('UPDATE_isSystemHide', {
|
isSystemHide: (new Date()).getTime()
|
});
|
setTimeout(() => {
|
that.isClicking = false;
|
}, 500);
|
return that.$util.Tips({
|
title: '取消支付'
|
}, {
|
tab: 5,
|
url: goPages + '&status=2'
|
});
|
},
|
complete: function (e) {
|
uni.hideLoading();
|
//关闭当前页面跳转至订单状态
|
if (e.errMsg == 'requestPayment:cancel') return that.$util
|
.Tips({
|
title: '取消支付'
|
}, {
|
tab: 5,
|
url: goPages + '&status=2'
|
});
|
},
|
})
|
// #endif
|
// #ifdef H5
|
let data = {
|
timestamp: jsConfig.timeStamp,
|
nonceStr: jsConfig.nonceStr,
|
package: jsConfig.packages,
|
signType: jsConfig.signType,
|
paySign: jsConfig.paySign
|
};
|
that.$wechat.pay(data).then(res => {
|
if (res.errMsg == 'chooseWXPay:cancel') {
|
uni.hideLoading();
|
return that.$util.Tips({
|
title: '取消支付'
|
}, {
|
tab: 5,
|
url: goPages + '&status=2'
|
});
|
} else {
|
wechatQueryPayResult(orderNo).then(res => {
|
uni.hideLoading();
|
uni.$emit('onAddTrack', {
|
name: 'yy_payOrder',
|
data: params
|
});
|
if (params.couponID_var && params.couponID_var !==
|
'-') {
|
uni.$emit('onAddTrack', {
|
name: 'yy_couponRedeem',
|
data: {
|
'couponName_var': params.couponName_var,
|
'couponId_var': params.couponID_var,
|
'redeemWay_var': '商城核销'
|
}
|
});
|
}
|
setTimeout(() => {
|
that.isClicking = false;
|
if (that.orderInfoVo.bargainId || that.orderInfoVo
|
.combinationId || that.pinkId || that
|
.orderInfoVo.seckillId)
|
return that.$util.Tips({
|
title: '支付成功',
|
icon: 'success'
|
}, {
|
tab: 4,
|
url: goPages
|
});
|
return that.$util.Tips({
|
title: '支付成功',
|
icon: 'success'
|
}, {
|
tab: 5,
|
url: goPages
|
});
|
}, 500);
|
}).catch(err => {
|
setTimeout(() => {
|
that.isClicking = false;
|
}, 500);
|
uni.hideLoading();
|
return that.$util.Tips({
|
title: (err && err.message) ? err.message :
|
err
|
});
|
})
|
}
|
}).catch(res => {
|
setTimeout(() => {
|
that.isClicking = false;
|
}, 500);
|
uni.hideLoading();
|
return that.$util.Tips({
|
title: '取消支付'
|
}, {
|
tab: 5,
|
url: goPages + '&status=0'
|
});
|
});
|
// #endif
|
break;
|
case 'yue':
|
uni.$emit('onAddTrack', {
|
name: 'yy_payOrder',
|
data: params
|
});
|
|
if (params.couponID_var && params.couponID_var !== '-') {
|
// that.addTrack('yy_couponRedeem', {
|
// 'couponName_var': params.couponName_var,
|
// 'couponId_var': params.couponID_var,
|
// 'redeemWay_var': '商城核销'
|
// });
|
uni.$emit('onAddTrack', {
|
name: 'yy_couponRedeem',
|
data: {
|
'couponName_var': params.couponName_var,
|
'couponId_var': params.couponID_var,
|
'redeemWay_var': '商城核销'
|
}
|
});
|
}
|
uni.hideLoading();
|
setTimeout(() => {
|
that.isClicking = false;
|
return that.$util.Tips({
|
title: message
|
}, {
|
tab: 5,
|
url: goPages + '&status=1'
|
});
|
}, 500);
|
|
break;
|
case 'weixinh5':
|
uni.hideLoading();
|
uni.$emit('onAddTrack', {
|
name: 'yy_payOrder',
|
data: params
|
});
|
if (params.couponID_var && params.couponID_var !== '-') {
|
// that.addTrack('yy_couponRedeem', {
|
// 'couponName_var': params.couponName_var,
|
// 'couponId_var': params.couponID_var,
|
// 'redeemWay_var': '商城核销'
|
// });
|
uni.$emit('onAddTrack', {
|
name: 'yy_couponRedeem',
|
data: {
|
'couponName_var': params.couponName_var,
|
'couponId_var': params.couponID_var,
|
'redeemWay_var': '商城核销'
|
}
|
});
|
}
|
that.$util.Tips({
|
title: '订单创建成功'
|
}, {
|
tab: 5,
|
url: goPages + '&status=0'
|
});
|
setTimeout(() => {
|
location.href = jsConfig.mwebUrl + '&redirect_url=' + window.location
|
.protocol + '//' + window.location.host +
|
goPages + '&status=1';
|
}, 100)
|
setTimeout(() => {
|
that.isClicking = false;
|
}, 500);
|
break;
|
}
|
}).catch(err => {
|
uni.hideLoading();
|
return that.$util.Tips({
|
title: (err && err.message) ? err.message : err
|
});
|
});
|
},
|
SubOrder: function (e) {
|
let that = this,
|
data = {};
|
// that.saleCodeVisible=true
|
// return
|
if (!that.payType) return that.$util.Tips({
|
title: '请选择支付方式'
|
});
|
if (that.expressType == 1 && !that.cartInfo[0].isVirtual) {
|
if (!that.address.addressId) return that.$util.Tips({
|
title: '请选择收货地址'
|
});
|
}
|
|
// if (that.shippingType == 1) {
|
// if (that.contacts == "" || that.contactsTel == "") {
|
// return that.$util.Tips({
|
// title: '请填写联系人或联系人电话'
|
// });
|
// }
|
// if (!/^1(3|4|5|7|8|9|6)\d{9}$/.test(that.contactsTel)) {
|
// return that.$util.Tips({
|
// title: '请填写正确的手机号'
|
// });
|
// }
|
// if (!/^[\u4e00-\u9fa5\w]{2,16}$/.test(that.contacts)) {
|
// return that.$util.Tips({
|
// title: '请填写您的真实姓名'
|
// });
|
// }
|
// if (that.storeList.length == 0) return that.$util.Tips({
|
// title: '暂无门店,请选择其他方式'
|
// });
|
// }
|
console.log(that.orderInfoVo.isTestCoupon && that.orderInfoVo.isTestCoupon == 1, that.orderInfoVo
|
.isTestCoupon);
|
if (that.orderInfoVo.isTestCoupon && that.orderInfoVo.isTestCoupon == 1) {
|
that.$refs.showConfirm.show({
|
title: '温馨提示',
|
content: '当前订单将自动优先使用「臻享体验优惠券」,以专属会员价结算!仅此1次体验机会,错过不再有 。',
|
confirmText: '好的',
|
cancelText: '我再逛逛',
|
center: true,
|
success: function (res) {
|
if (res.confirm) {
|
if (that.ifSales) {
|
that.saleCodeVisible = true
|
} else {
|
that.startPay();
|
}
|
} else {
|
|
}
|
},
|
});
|
} else if (that.totalCareBeanNumber > 0) {
|
if (that.myCareBean < that.totalCareBeanNumber) {
|
return that.$util
|
.Tips({
|
title: '您的悦养豆不足,请挑选其他商品!'
|
});
|
} else if (that.orderInfoVo.payFee <= 0) {
|
that.$refs.showConfirm.show({
|
title: '提示',
|
content: '本次兑换需消耗<span class="strong" style="color:#FF780D;">' + that
|
.totalCareBeanNumber + '</span>悦养豆,无需支付现金,兑换后悦养豆将自动从您账户中扣除',
|
confirmText: '确认支付',
|
center: true,
|
success: function (res) {
|
if (res.confirm) {
|
if (that.ifSales) {
|
that.saleCodeVisible = true
|
} else {
|
that.startPay();
|
}
|
} else {
|
|
}
|
},
|
});
|
} else if (that.ifSales) {
|
that.saleCodeVisible = true
|
} else {
|
that.startPay();
|
}
|
} else if (that.ifSales) {
|
that.saleCodeVisible = true
|
} else {
|
that.startPay();
|
}
|
},
|
// 验证销售码
|
handleSubmitSale() {
|
let that = this
|
if (!that.saleCode) {
|
return that.$util
|
.Tips({
|
title: "请输入销售码!"
|
});
|
}
|
signInSales({
|
salesCode: that.saleCode,
|
zoneId: that.zoneIds[0]
|
}).then(res => {
|
if (res.data) {
|
this.saleCodeVisible = false
|
that.startPay()
|
} else {
|
that.$util
|
.Tips({
|
title: "抱歉呀,当前销售码有误,建议联系你的销售人员核对准确信息后再尝试~"
|
});
|
}
|
})
|
},
|
handleCloseSaleCode() {
|
this.saleCodeVisible = false
|
this.saleCode = ''
|
},
|
startPay() {
|
let that = this;
|
if (that.isClicking) {
|
return false;
|
}
|
that.isClicking = true;
|
console.log(that.addressInfo);
|
let data = {
|
addressId: that.address.addressId,
|
// couponId: that.couponId,
|
payType: that.payType,
|
useIntegral: that.useIntegral,
|
preOrderNo: that.preOrderNo,
|
mark: that.mark,
|
storeId: that.system_store.id || 0,
|
payChannel: that.payChannel || 'weixinh5',
|
salesCode: that.saleCode,
|
entranceNameVar: app.globalData.entranceNameVar,
|
realName: that.addressInfo && that.addressInfo.phone ? that.addressInfo.realName : (this.userInfo
|
.nickname ? this.userInfo.nickname : '-'),
|
phone: that.addressInfo && that.addressInfo.phone ? that.addressInfo.phone : this.userInfo.phone,
|
shippingType: that.expressType ? that.expressType : 2
|
};
|
if(!that.orderInfoVo.combinationId){
|
data.couponId=that.couponId
|
}
|
uni.showLoading({
|
title: '订单支付中'
|
});
|
that.saleCode = ''
|
// #ifdef MP
|
openPaySubscribe().then(() => {
|
that.payment(data);
|
}).catch(() => {
|
setTimeout(() => {
|
that.isClicking = false;
|
}, 500)
|
});
|
// #endif
|
// #ifndef MP
|
that.payment(data);
|
// #endif
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.addressBox {
|
width: 690rpx;
|
margin: 0 auto;
|
border-radius: 14rpx;
|
background-color: #ffffff;
|
padding-bottom: 20rpx;
|
}
|
|
.expressType {
|
width: max-content;
|
font-size: 27rpx;
|
line-height: 3em;
|
float: left;
|
padding-left: 164rpx;
|
padding-right: 0.5em;
|
position: relative;
|
color: #979797;
|
}
|
|
.expressType:before {
|
content: '';
|
display: block;
|
width: 30rpx;
|
height: 30rpx;
|
position: absolute;
|
left: 1em;
|
top: 50%;
|
margin-top: -15rpx;
|
border-radius: 50%;
|
box-sizing: border-box;
|
border: 1px solid #d4d4d4;
|
}
|
|
.expressType:after {
|
content: '';
|
display: block;
|
width: 48rpx;
|
height: 48rpx;
|
position: absolute;
|
left: 98rpx;
|
top: 50%;
|
margin-top: -24rpx;
|
opacity: 0.7;
|
background: url("https://ossacmall.bluedeer.com.cn/app/static/images/icon_express1.png") left center/contain no-repeat;
|
}
|
|
.expressType.active {
|
color: #000000;
|
}
|
|
.expressType.active:before {
|
background: url("https://ossacmall.bluedeer.com.cn/app/static/images/icon_duigou.png") center center/contain no-repeat;
|
border: none;
|
}
|
|
.expressType.active:after {
|
opacity: 1;
|
}
|
|
.expressType2:after {
|
background-image: url("https://ossacmall.bluedeer.com.cn/app/static/images/icon_express2.png");
|
}
|
|
.expressType3:after {
|
background-image: url("https://ossacmall.bluedeer.com.cn/app/static/images/icon_express3.png");
|
}
|
|
.expressTypeTipsBox {
|
padding: 0 25rpx 0 25rpx;
|
}
|
|
.expressTypeTips {
|
box-sizing: border-box;
|
padding: 25rpx 25rpx 25rpx 55rpx;
|
border-radius: 14rpx;
|
background: url("https://ossacmall.bluedeer.com.cn/app/static/images/icon_expressTips.png") 15rpx 25rpx/32rpx auto no-repeat;
|
background-color: #fef7ee;
|
color: #8e3b1f;
|
font-size: 27rpx;
|
line-height: 40rpx;
|
|
.strong {
|
font-size: 30rpx;
|
font-weight: bold;
|
}
|
}
|
|
.line2 {
|
width: 504rpx;
|
}
|
|
.textR {
|
text-align: right;
|
}
|
|
.order-submission .line {
|
width: 100%;
|
height: 3rpx;
|
}
|
|
.order-submission .line image {
|
width: 100%;
|
height: 100%;
|
display: block;
|
}
|
|
.order-submission .address {
|
padding: 28rpx;
|
background-color: #fff;
|
box-sizing: border-box;
|
max-height: unset;
|
}
|
|
.order-submission .address .addressCon {
|
width: 596rpx;
|
font-size: 27rpx;
|
color: #666;
|
}
|
|
|
.order-submission .address .addressCon .name {
|
font-size: 30rpx;
|
color: #282828;
|
font-weight: bold;
|
margin-bottom: 10rpx;
|
word-break: break-all;
|
display: flex;
|
}
|
|
.order-submission .address .addressCon .name .phone {
|
width: 17em;
|
display: block;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
white-space: nowrap;
|
padding-right: 60rpx;
|
box-sizing: border-box;
|
position: relative;
|
|
&.show {
|
white-space: unset;
|
padding-right: 0;
|
}
|
|
.btn {
|
display: block;
|
position: absolute;
|
right: 10rpx;
|
top: 0;
|
color: #197bd1;
|
text-decoration: underline;
|
font-size: 0.8em;
|
}
|
}
|
|
.order-submission .address .addressCon .default {
|
display: inline-block;
|
margin-right: 12rpx;
|
background-color: #f5f5f5;
|
color: #000000 !important;
|
font-size: 23rpx;
|
line-height: 38rpx;
|
height: 39rpx;
|
border-radius: 8rpx;
|
padding-left: 10rpx;
|
padding-right: 10rpx;
|
}
|
|
.order-submission .address .addressCon .setaddress {
|
color: #333;
|
font-size: 28rpx;
|
}
|
|
.order-submission .address .iconfont {
|
font-size: 35rpx;
|
color: #707070;
|
}
|
|
.order-submission .allAddress {
|
width: 100%;
|
// background-image: linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
|
// background-image: -webkit-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
|
// background-image: -moz-linear-gradient(to bottom, #e93323 0%, #f5f5f5 100%);
|
padding: 10rpx 30rpx 0 30rpx;
|
|
}
|
|
.order-submission .allAddress .nav {
|
width: 690rpx;
|
margin: 0 auto;
|
}
|
|
.order-submission .allAddress .nav .item {
|
width: 334rpx;
|
}
|
|
.order-submission .allAddress .nav .item.on {
|
position: relative;
|
width: 230rpx;
|
}
|
|
.order-submission .allAddress .nav .item.on::before {
|
position: absolute;
|
bottom: 0;
|
content: "快递配送";
|
font-size: 28rpx;
|
display: block;
|
height: 0;
|
width: 336rpx;
|
border-width: 0 20rpx 80rpx 0;
|
border-style: none solid solid;
|
border-color: transparent transparent #fff;
|
z-index: 2;
|
border-radius: 14rpx 36rpx 0 0;
|
text-align: center;
|
line-height: 80rpx;
|
}
|
|
.order-submission .allAddress .nav .item:nth-of-type(2).on::before {
|
content: "到店自提";
|
border-width: 0 0 80rpx 20rpx;
|
border-radius: 36rpx 14rpx 0 0;
|
}
|
|
.order-submission .allAddress .nav .item.on2 {
|
position: relative;
|
}
|
|
.order-submission .allAddress .nav .item.on2::before {
|
position: absolute;
|
bottom: 0;
|
content: "到店自提";
|
font-size: 28rpx;
|
display: block;
|
height: 0;
|
width: 401rpx;
|
border-width: 0 0 60rpx 60rpx;
|
border-style: none solid solid;
|
border-color: transparent transparent #f7c1bd;
|
border-radius: 36rpx 14rpx 0 0;
|
text-align: center;
|
line-height: 60rpx;
|
}
|
|
.order-submission .allAddress .nav .item:nth-of-type(1).on2::before {
|
content: "快递配送";
|
border-width: 0 60rpx 60rpx 0;
|
border-radius: 14rpx 36rpx 0 0;
|
}
|
|
.order-submission .allAddress .address {
|
width: 690rpx;
|
min-height: 180rpx;
|
margin: 0 auto;
|
border-radius: 14rpx;
|
}
|
|
.order-submission .allAddress .line {
|
width: 100%;
|
margin: 0 auto;
|
}
|
|
.wrapper_box {
|
background-color: #ffffff;
|
overflow: hidden;
|
margin-top: 14rpx;
|
}
|
|
.order-submission .wrapper .item .discount .placeholder {
|
color: #ccc;
|
}
|
|
.order-submission .wrapper {
|
background-color: #fff;
|
margin-top: 15rpx;
|
}
|
|
.order-submission .wrapper .item {
|
padding: 27rpx 24rpx;
|
font-size: 30rpx;
|
color: #333333;
|
border-bottom: 1px solid #F5F5F5;
|
}
|
|
.order-submission .wrapper .item .label {
|
font-size: 27rpx;
|
color: #979797;
|
|
.tips {
|
display: block;
|
font-size: 23rpx;
|
}
|
}
|
|
|
.order-submission .wrapper .item .discount {
|
font-size: 27rpx;
|
color: #000000;
|
}
|
|
.order-submission .wrapper .item .discount .iconfont {
|
color: #515151;
|
font-size: 30rpx;
|
margin-left: 15rpx;
|
}
|
|
.order-submission .wrapper .item .discount .num {
|
font-size: 32rpx;
|
margin-right: 20rpx;
|
}
|
|
.order-submission .wrapper .item .shipping {
|
font-size: 30rpx;
|
color: #999;
|
position: relative;
|
padding-right: 58rpx;
|
}
|
|
.order-submission .wrapper .item .shipping .iconfont {
|
font-size: 35rpx;
|
color: #707070;
|
position: absolute;
|
right: 0;
|
top: 50%;
|
transform: translateY(-50%);
|
margin-left: 30rpx;
|
}
|
|
.order-submission .wrapper .item textarea {
|
background-color: #f9f9f9;
|
width: auto !important;
|
height: 140rpx;
|
border-radius: 14rpx;
|
margin-top: 30rpx;
|
padding: 15rpx;
|
box-sizing: border-box;
|
font-weight: 400;
|
}
|
|
.order-submission .wrapper .item .placeholder {
|
color: #ccc;
|
}
|
|
.order-submission .wrapper .item .list {
|
margin-top: 0;
|
}
|
|
.order-submission .wrapper .item .list .payItem {
|
width: 100%;
|
margin-top: 20rpx;
|
font-size: 28rpx;
|
color: #282828;
|
position: relative;
|
|
.tips {
|
width: 100%;
|
line-height: 34rpx;
|
font-size: 23rpx;
|
color: #FF780D;
|
text-align: left;
|
}
|
}
|
|
.order-submission .wrapper .item .list .payItem .check_icon {
|
width: 34rpx;
|
height: 34rpx;
|
border-radius: 50%;
|
border: 2rpx solid #979797;
|
}
|
|
.order-submission .wrapper .item .list .payItem.on .check_icon {
|
border-color: #fc5445;
|
color: $theme-color;
|
}
|
|
.order-submission .wrapper .item .list .payItem .name {
|
width: 92%;
|
text-align: left;
|
font-size: 31rpx;
|
line-height: 54rpx;
|
|
&.name2 {
|
font-size: 23rpx;
|
}
|
}
|
|
.order-submission .wrapper .item .list .payItem .name .iconfont {
|
width: 38rpx;
|
height: 44rpx;
|
border-radius: 50%;
|
text-align: center;
|
line-height: 44rpx;
|
background: url("https://ossacmall.bluedeer.com.cn/app/static/images/icon_wxzf.png") center center/contain no-repeat;
|
color: #fff;
|
font-size: 30rpx;
|
margin-right: 15rpx;
|
}
|
|
// .order-submission .wrapper .item .list .payItem .name .iconfont.icon-weixin2 {
|
// background-color: #41b035;
|
// }
|
|
.order-submission .wrapper .item .list .payItem .tip {
|
width: 49%;
|
text-align: center;
|
font-size: 27rpx;
|
color: #aaa;
|
}
|
|
.payItem .carnum {
|
height: 54rpx;
|
position: absolute;
|
right: 0;
|
top: 0;
|
}
|
|
.payItem .carnum view {
|
// border: 1px solid #a4a4a4;
|
width: 140rpx;
|
text-align: center;
|
height: 100%;
|
line-height: 54rpx;
|
color: #dedede;
|
font-size: 45rpx;
|
}
|
|
.payItem .carnum .reduce {
|
width: 70rpx;
|
line-height: 48rpx;
|
|
&.on {
|
color: #282828;
|
}
|
}
|
|
.payItem .carnum .plus {
|
width: 70rpx;
|
line-height: 48rpx;
|
|
&.on {
|
color: #282828;
|
}
|
}
|
|
.payItem .carnum .num {
|
background: rgba(242, 242, 242, 1);
|
color: #282828;
|
font-size: 28rpx;
|
border-radius: 12rpx;
|
line-height: 54rpx;
|
height: 54rpx;
|
|
input {
|
line-height: 54rpx !important;
|
height: 54rpx !important;
|
display: -webkit-inline-box;
|
}
|
}
|
|
.order-submission .moneyList {
|
position: fixed;
|
left: 0;
|
bottom: 100rpx;
|
width: 750rpx;
|
box-sizing: border-box;
|
padding: 30rpx;
|
background: linear-gradient(to top, #F5F5F5 0%, #FFFFFF 100%);
|
border-radius: 15rpx 15rpx 0rpx 0rpx;
|
border: 2rpx solid #F6F6F6;
|
}
|
|
.order-submission .moneyList .item {
|
font-size: 28rpx;
|
color: #979797;
|
}
|
|
.order-submission .moneyList .item~.item {
|
margin-top: 20rpx;
|
}
|
|
.order-submission .moneyList .item .money {
|
font-weight: bold;
|
}
|
|
.order-submission .footer {
|
width: 100%;
|
height: 100rpx;
|
background-color: #fff;
|
padding: 0 30rpx;
|
font-size: 28rpx;
|
color: #333;
|
box-sizing: border-box;
|
position: fixed;
|
bottom: 0;
|
left: 0;
|
}
|
|
.order-submission .footer .settlement {
|
width: 218rpx;
|
height: 76rpx;
|
text-align: center;
|
line-height: 76rpx;
|
background: #016DCC;
|
border-radius: 11rpx 11rpx 11rpx 11rpx;
|
|
font-size: 27rpx;
|
color: #fff;
|
}
|
|
.footer .font-color {
|
color: #FF780D !important;
|
}
|
|
.footer .transparent {
|
opacity: 0
|
}
|
|
.popCareBeanConfirm {
|
position: fixed;
|
left: 0;
|
top: 0;
|
width: 100%;
|
height: 100%;
|
z-index: 1111;
|
background-color: rgba(0, 0, 0, .7);
|
|
.box {
|
width: 570rpx;
|
padding: 75rpx 0 75rpx 0;
|
background: url("https://ossacmall.bluedeer.com.cn/app/static/images/confirm_bg.png") center top/100% auto no-repeat;
|
background-color: #f5f5f5;
|
position: absolute;
|
left: 50%;
|
top: 50%;
|
transform: translate(-50%, -50%);
|
border-radius: 14rpx;
|
}
|
|
.title {
|
lineh-height: 46rpx;
|
font-size: 31rpx;
|
color: #000000;
|
text-align: center;
|
}
|
|
.info {
|
width: 448rpx;
|
font-size: 23rpx;
|
margin: 0 auto;
|
color: #000000;
|
text-align: justify;
|
padding: 97rpx 0 75rpx 0;
|
|
span {
|
color: #FF780D;
|
}
|
}
|
|
.btn_box {
|
display: flex;
|
display: flex;
|
justify-content: space-around;
|
width: 420rpx;
|
margin: 0 auto;
|
text-align: center;
|
}
|
|
.btn {
|
width: 168rpx;
|
font-size: 27rpx;
|
lineh-height: 40rpx;
|
padding: 10rpx 0 10rpx 0;
|
background: #979797;
|
color: #ffffff;
|
border-radius: 11rpx;
|
}
|
|
.ok {
|
background: #016DCC;
|
}
|
}
|
|
.saleCode {
|
position: fixed;
|
left: 0;
|
top: 0;
|
width: 100%;
|
height: 100%;
|
z-index: 1111;
|
background-color: rgba(0, 0, 0, .5);
|
|
.sale-box {
|
width: 473rpx;
|
height: 486rpx;
|
// background: linear-gradient(180deg, #FFFFFF 100%, #FFFFFF 0%), #FFFFFF;
|
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
position: absolute;
|
left: 50%;
|
top: 50%;
|
transform: translate(-50%, -50%);
|
|
.bg-sale {
|
width: 100%;
|
height: 100%;
|
position: absolute;
|
top: 0;
|
left: 0;
|
z-index: 0;
|
}
|
|
.sale-close {
|
position: absolute;
|
right: 0;
|
top: 0;
|
width: 27rpx;
|
height: 27rpx;
|
z-index: 1;
|
background: url("https://ossacmall.bluedeer.com.cn/app/static/images/sale_close.png") center center/30rpx auto no-repeat;
|
}
|
|
.sale-title {
|
font-weight: 500;
|
font-size: 38rpx;
|
color: #002561;
|
text-align: center;
|
font-style: normal;
|
text-transform: none;
|
margin-top: 143rpx;
|
position: relative;
|
z-index: 1;
|
}
|
|
.sale-code {
|
margin: 30rpx 43.5rpx 48rpx 43.5rpx;
|
position: relative;
|
z-index: 1;
|
border: 2rpx solid #D9D9D9;
|
width: 344rpx;
|
height: 82rpx;
|
background: #FFFFFF;
|
caret-color: #016DCC !important;
|
font-size: 31rpx;
|
font-weight: 600;
|
color: #000000;
|
padding: 0 19rpx;
|
}
|
|
.sale-btn {
|
display: flex;
|
justify-content: space-between;
|
width: 382rpx;
|
margin-left: 43.5rpx;
|
align-items: center;
|
position: relative;
|
z-index: 1;
|
font-weight: 500;
|
|
button {
|
border-radius: 11rpx;
|
width: 176rpx;
|
height: 69rpx;
|
color: #FFFFFF;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
}
|
}
|
}
|
</style>
|