| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362 |
- <template>
- <view>
-
- <!-- #ifdef APP-PLUS -->
- <es-nav-title title="支付" ></es-nav-title>
- <!-- #endif -->
-
- <view class="inner-box">
- <!-- 收货人 -->
- <view class="address-box" v-if="address==null" @click="openAddress()">
- <view class="left">
- <view class="name-box">
- <text class="text name">添加收货地址</text>
- </view>
- </view>
- <view class="arrow-box">
- <image src="/static/images/arrow_gray.png" mode=""></image>
- </view>
- </view>
- <view class="address-box" v-if="address!=null" @click="openAddress()">
- <view class="left">
- <view class="name-box">
- <text class="text name">{{address.realName}}</text>
- <text class="text" v-if="address.phone!=null">{{address.phone}}</text>
- </view>
- <view class="address">
- {{address.address}}
- </view>
- </view>
- <view class="arrow-box">
- <image src="/static/images/arrow_gray.png" mode=""></image>
- </view>
- </view>
-
- <view class="other-info">
- <view class="title">支付明细</view>
- <view class="item">
- <view class="left">
- <text class="label">应付金额:</text>
- </view>
- <view class="right">
- <text class="text" >{{payPrice}}</text>
- </view>
- </view>
- <view class="item" v-if="order!=null&&(order.userCouponId==null||order.userCouponId==0)" @click.stop="openCoupon()">
- <view class="left">
- <text class="label">优惠券:</text>
- </view>
- <view class="right">
- <text class="text">{{couponText}}</text>
- <image v-if="userCouponId!=0" @click.stop="delCoupon()" class="ic-close" src="/static/images/close.png"></image>
- <image class="ic-back" src="/static/images/arrow_gray.png"></image>
- </view>
- </view>
- <view class="item" >
- <view class="left">
- <text class="label">优惠金额:</text>
- </view>
- <view class="right">
- <text class="text">{{discountMoney}}</text>
- </view>
- </view>
- <view class="item">
- <view class="left">
- <text class="label">支付金额:</text>
- </view>
- <view class="right">
- <text class="text">{{payMoney}}</text>
- </view>
- </view>
- <view class="item">
- <view class="left">
- <text class="label">物流代收:</text>
- </view>
- <view class="right">
- <text class="text">{{payRemain}}</text>
- </view>
- </view>
- <view class="item">
- <view class="left">
- <text class="label">邮费:</text>
- </view>
- <view class="right">
- <text class="text">{{payDelivery}}</text>
- </view>
- </view>
- </view>
- <view class="pay-type">
- <view class="title">支付方式</view>
- <radio-group @change="payTypeChange" >
- <view class="item" v-if="checkPayType('1')&&choose!=1" >
- <view class="left" >
- <image src="/static/images/wecha_pay.png" mode=""></image>
- <text class="text">全款支付</text>
- </view>
- <label>
- <radio :value="1" :checked="payType=='1'" />
- </label>
- </view>
- <view class="item" v-if="checkPayType('2')" >
- <view class="left" >
- <image src="/static/image/pay_de.png" mode=""></image>
- <text class="text">物流代收</text>
- </view>
- <label>
- <radio :value="2" :checked="payType=='2'" />
- </label>
- </view>
- <view class="item" v-if="checkPayType('3')&&choose!=2" >
- <view class="left">
- <image src="/static/image/pay_1.png" mode=""></image>
- <text class="text">货到付款</text>
- </view>
- <label>
- <radio :value="3" :checked="payType=='3'" />
- </label>
- </view>
- </radio-group>
- </view>
-
- <!-- <view class="other-info" v-if="payType=='1'&&order!=null&&order.companyId!=null&&order.companyId>0&&giftPrice<=payPrice"> -->
- <view class="other-info" v-if="gifts.length>0">
- <view class="title">赠品</view>
- <view class="drug-list" >
- <view v-for="(product) in gifts" class="drug-item" >
- <view class="img-box">
- <image :src="product.image" mode="aspectFill"></image>
- </view>
- <view class="drug-info" >
- <view>
- <view class="name-box ellipsis2">
- {{product.productName}}
- </view>
- <view class="spec">{{product.sku}}</view>
- </view>
- <view class="num-box">
- <view class="use">
- {{product.usageMethod}}
- </view>
- <view class="price">
- <text class="unit">¥</text>
- <text class="num">{{product.price.toFixed(2)}}</text>
- </view>
- <view class="amount">x{{product.count}}</view>
- </view>
-
- </view>
- </view>
- </view>
- </view>
- <!-- 备注 -->
- <view class="remarks" v-if="order!=null">
- <input type="text" v-model="order.remark" placeholder="备注留言(选填)" placeholder-class="input" />
- </view>
- </view>
-
- <uni-popup ref="popCoupon" type="bottom" borderRadius="10rpx 10rpx 0px 0px">
- <view class="coupon">
- <view class="coupon-box" v-if="coupons.length>0" >
- <view @click="couponSelect(item)" class="coupon-item" v-for="(item) in coupons">
- <view class="left" >
- <image v-if="item.status==0" src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/appimgs/0fdd75d89db84458886d38e615011048.png" mode="widthFix"></image>
- <image v-if="item.status!=0" src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/appimgs/d950e4c7af1e4464be1a7777e9dca576.png" mode="widthFix"></image>
- <view style="z-index: 999;">
- ¥<span class="num">{{item.price.toFixed(2)}}</span>
- </view>
- <view class="pic-num" >满{{item.minPrice.toFixed(2)}}元可用</view>
- </view>
- <view class="right">
- <view class="title">
- {{item.title}}
- </view>
- <view class="btns">
- <view v-if="item.status==0||item.status==2" >{{item.limitTime}} 到期</view>
- <view v-if="item.status==1">使用时间 {{item.useTime}}</view>
- <view class="bnt gray" v-if="item.status==1" >已使用</view>
- <view class="bnt gray" v-if="item.status==2" >已过期</view>
- <view class="btn" v-if="item.status==0" >使用</view>
- </view>
- </view>
- </view>
- </view>
- <view class="empty" v-if="coupons.length==0">
- <image src="https://zkzh-2025.oss-cn-beijing.aliyuncs.com/appimgs/cf4a86b913a04341bb44e34bb4d37aa2.png"></image>
- </view>
- </view>
- </uni-popup>
-
-
- <uni-popup ref="popTip" type="dialog">
- <uni-popup-dialog cancelText="支付失败" confirmText="支付成功" mode="base" content="是否已支付成功?" title="提示" :duration="2000" :before-close="true" @close="confirmTip" @confirm="confirmTip"></uni-popup-dialog>
- </uni-popup>
-
- <!-- 底部按钮 -->
- <view class="btn-box">
- <view class="btn" v-if="order!=null" @click="payOrder()">支付{{payMoney}}元</view>
- </view>
-
- <uni-popup ref="popPayType" type="bottom" borderRadius="10rpx 10rpx 0px 0px">
- <view class="pay-box">
- <view class="title">请选择支付方式</view>
- <view class="pay-list">
- <view class="pay-item alipay" @click="doAlipay()">
- <image src="/static/images/alipay.png"></image>
- <view class="name">支付宝支付</view>
- </view>
- <view class="pay-item wx" @click="doWxPay()">
- <image src="/static/images/wx.png"></image>
- <view class="name" >微信支付</view>
- </view>
- </view>
-
- </view>
-
- </uni-popup>
-
- <uni-popup ref="popCopyTip" type="dialog">
- <uni-popup-dialog cancelText="取消" confirmText="复制链接" mode="base" content="请点击“复制链接”按钮在浏览器中粘贴打开。?" title="提示" :duration="2000" :before-close="true" @close="closeCopyTip" @confirm="confirmCopyTip"></uni-popup-dialog>
- </uni-popup>
-
- </view>
- </template>
- <script>
-
- import * as jweixin from 'weixin-js-sdk'
- import {getConfigByKey} from '@/api/common'
- import {getAddressByDefault} from '@/api/userAddress.js'
- import {getMyEnableCouponList} from '@/api/user.js'
- import {getPackageById} from '@/api/package.js'
- import {getPackageOrderById,pay,compute,aliPayment,H5WxPayment,H5AliPayment} from '@/api/packageOrder'
-
- export default {
- data() {
- return {
- giftPrice:0.00,
- payTypes:[],
- addressId:null,
- wxPay: true,
- address:null,
- orderId:null,
- order:null,
- items:null,
- payType:"1",
- couponText:"请选择优惠券",
- userCouponId:0,
- coupons:[],
- couponShow:false,
- payMoney:0.00,
- discountMoney:0,
- payRemain:0,
- payDelivery:0,
- payPrice:0,
- gifts:[],
- alipayQrCode:null,
- showPayTips:false,
- choose: 0
- }
- },
- onLoad(option) {
- this.choose = option.choose || 0
- this.payType = this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
- this.orderId=option.orderId;
- var that=this;
- uni.$on('updateAddress', (e) => {
- that.addressId=e.addressId;
- that.address=e;
- that.address.address=e.province+e.city+e.district+e.detail
- });
- this.getAddressByDefault();
- this.getPackageOrderById();
- // this.getPackageById();
- this.getConfigByKey();
-
- uni.hideNavigationBarLoading();
-
- },
- onShow() {
- if(this.showPayTips){
- this.$refs.popPayType.close();
- this.$refs.popTip.open();
- this.showPayTips=false;
- }
- },
- methods: {
-
- getAddressByDefault(){
- var data={};
- getAddressByDefault(data).then(
- res => {
- if(res.code==200){
- if(res.data!=null){
- this.addressId=res.data.addressId;
- this.address=res.data;
- this.address.address=res.data.province+res.data.city+res.data.district+res.data.detail
- }
- }else{
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- }
- },
- rej => {}
- );
- },
- getConfigByKey(){
- var that=this;
- var data={key:"his.package"}
- getConfigByKey(data).then(
- res => {
- if(res.code==200){
- this.giftPrice=JSON.parse(res.data).giftPrice;
- console.log(this.giftPrice)
- }
- },
- rej => {}
- );
- },
- checkPayType(payType){
- var flag=false
- this.payTypes.forEach(function(value,index,array){
- if(value.toString()==payType.toString()){
- flag=true;
- }
- });
- return flag;
- },
- payTypeChange(e){
- console.log(e.detail.value)
- this.payType=e.detail.value;
- this.compute()
- },
- couponSelect(item){
- this.$refs.popCoupon.close();
- //计算金额
- this.userCouponId=item.id;
- console.log(item)
- this.couponText=item.price+"元优惠券"
- this.compute()
- },
- openCoupon(){
- this.$refs.popCoupon.open("bottom")
- },
- delCoupon(){
- this.userCouponId=0;
- this.couponText="请选择优惠券";
- this.compute();
- },
- compute(){
- var data={
- payType:this.payType, // choose 1:付邮费领取 2:加粉领取,付邮费领取payType为3
- orderId:this.orderId,
- userCouponId:this.userCouponId
- }
- console.log(data)
- compute(data).then(
- res => {
- if(res.code==200){
- this.payPrice=res.moneys.payPrice.toFixed(2);
- this.payMoney=res.moneys.payMoney.toFixed(2);
- this.discountMoney=res.moneys.discountMoney.toFixed(2);
- this.payDelivery=res.moneys.payDelivery.toFixed(2);
- this.payRemain=res.moneys.payRemain.toFixed(2);
- this.gifts=res.moneys.gifts;
- }
- else{
- this.payType=1;
- this.compute()
- this.userCouponId=0;
- this.couponText="请选择优惠券"
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- }
- },
- err => {
- }
- );
- },
- getMyEnableCouponList(){
- var data={
- orderId:this.orderId
- }
- if(this.package.isShow==0){
- data.couponType=5;
- data.cateId=this.package.privateType
- }
- else if(this.package.isShow==1){
- data.couponType=6;
- data.cateId=this.package.diseaseType
- }
- getMyEnableCouponList(data).then(
- res => {
- if(res.code==200){
- this.coupons=res.data;
- }
- },
- err => {
- }
- );
- },
- getPackageOrderById(){
- var data={orderId:this.orderId};
- getPackageOrderById(data).then(res => {
- if(res.code==200){
- this.order=res.order;
- this.choose = res.choose || 0
- this.payType = this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
- this.compute();
- this.getPackageById(this.order.packageId);
- }
- },
- rej => {}
- );
- },
- getPackageById(packageId){
- let data={packageId:packageId};
- if(this.choose == 1 || this.choose == 2) {
- data={
- packageId:packageId,
- choose: this.choose
- };
- }
- getPackageById(data).then(
- res => {
- if(res.code==200){
- this.package=res.data;
- this.payTypes=res.data.payType.split(',');
- this.payType=this.choose == 1 ? 3:this.choose == 2 ? 1 :this.payType
- this.getMyEnableCouponList();
- }else{
-
- }
- },
- rej => {}
- );
- },
- openAddress(){
- uni.navigateTo({
- url: '/pages/user/address'
- });
- },
- closeTip(){
- this.$refs.popTip.close()
- },
- confirmTip() {
- uni.showLoading({title:"请稍侯...",mask:true});
- setTimeout(()=>{
- uni.hideLoading();
- this.getPackagOrderInfo();
- },2000);
- },
- getPackagOrderInfo(){
- getPackageOrderById({orderId:this.orderId}).then(res => {
- this.$refs.popTip.close();
- if(res.code==200){
- this.order=res.order;
- if(res.order.status==1){ //1:代付款 2:已支付
- uni.showToast({title: '未支付成功',icon: 'none'});
- }
- else if(res.order.status==2){ //1:代付款 2:已支付
- this.$refs.popTip.close();
-
- // #ifdef APP-PLUS
- if(plus.runtime.channel=="baidu"){ //获取百度渠道标识
- let bdCmdType=uni.getStorageSync("bdCmdType");
- if(bdCmdType!=null && parseInt(bdCmdType)<=2){
- //this.$registerIdCode("orders",2,res.order.payPrice.toString()); //已下单
- }
- }
- // #endif
- uni.redirectTo({
- url:"./packageOrderPaySuccess?orderId="+this.order.orderId
- });
- }
- }
- },
- rej => {}
- );
- },
-
-
- closeCopyTip(){
- this.$refs.popCopyTip.close()
- },
- confirmCopyTip() {
- this.$refs.popCopyTip.close();
- var that=this;
- uni.setClipboardData({
- data:that.alipayQrCode,
- success:()=>{
- uni.showToast({
- title:'内容已成功复制到剪切板',
- icon:'none'
- })
- that.showPayTips=true;
- }
- });
- },
- doAlipay(){
- var data = {
- orderId:this.order.orderId,
- };
- var that=this;
- // #ifdef H5
- uni.showLoading();
- H5AliPayment(data).then(
- res => {
- uni.hideLoading()
- if(res.code==200){
- if(res.type=="tz"){
- window.location.href =res.data.body.url
- }
- else if(res.type=='hf'){
- console.log(res)
- that.alipayQrCode=res.data.qr_code;
- that.$refs.popCopyTip.open();
- }
-
- }else{
- uni.showToast({icon:'none',title: res.msg});
- }
- },
- rej => {}
- );
- // #endif
-
- // #ifdef APP-PLUS
- const tzCashier=uni.requireNativePlugin("TZBank-Cashier");
- uni.showLoading();
- aliPayment(data).then(res => {
- uni.hideLoading()
- this.$refs.popPayType.close();
- this.$refs.popTip.open();
- console.log("qxj res:"+JSON.stringify(res));
- console.log("qxj orderFlowNo:"+res.data.body.orderFlowNo+" businessCstNo:"+res.data.body.orderNo+" platMerCstNo:"+res.data.body.platMerCstNo);
- if(res.code==200){
- if(res.type=="tz"){
- const match = res.data.body.url.match(/[\?&]businessCstNo=([^&]+)/);
- const businessCstNo = match ? match[1] : null;
- console.log("qxj tzCashier:"+tzCashier+" businessCstNo:"+businessCstNo);
- tzCashier.pay({
- env:0,
- wxMiniProgramType:0,
- wxAppId:'wx703c4bd07bbd1695',
- wxUniversalLink:"https://yjf.runtzh.com/",
- orderFlowNo:res.data.body.orderFlowNo,
- businessCstNo:businessCstNo,
- platMerCstNo:res.data.body.platMerCstNo
- },(res)=>{
- console.log("qxj 支付成功:"+JSON.stringify(res));
- });
- }
- else if(res.type=='hf'){
- if (uni.getSystemInfoSync().platform == 'android') {
- var alipayScheme ='alipays://platformapi/startApp?&saId=10000007&qrcode=' + res.data.qr_code;
-
- }else{
- var alipayScheme ='alipay://platformapi/startApp?&saId=10000007&qrcode=' + res.data.qr_code;
- }
- console.log(alipayScheme)
- // 在uni-app中使用plus.runtime.openURL打开URL
- plus.runtime.openURL(alipayScheme, function(error) {
- // console.error('打开支付宝失败: ' + error.message);
- // 处理打开支付宝失败的情况,比如提示用户或者跳转到其他支付方式
- });
-
-
-
- }
- }
- else{
- uni.showToast({
- title:res.msg,
- icon:'none'
- })
-
- }
-
- },
- rej => {}
- );
- // #endif
- },
-
- doWxPay(){
- var that=this;
- var data = {
- orderId:this.orderId,
- };
- // #ifdef H5
- if(String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger"){
- uni.showLoading();
- H5WxPayment(data).then(
- res => {
- uni.hideLoading()
- if(res.code==200){
- if(res.type=="tz"){
- window.location.href =res.data.body.url
- // uni.setStorageSync("h5PayUrl",res.data.body.url);
- // console.log(res.data.body.url)
- // uni.redirectTo({
- // url:"/pages/store/payH5"
- // })
- }
- else if(res.type=='hf'){
- var payObj=JSON.parse(res.data.pay_info);
- jweixin.config({
- debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
- appId: payObj.appId, // 必填,公众号的唯一标识
- timestamp: payObj.timeStamp, // 必填,生成签名的时间戳
- nonceStr: payObj.nonceStr, // 必填,生成签名的随机串
- signature: payObj.paySign, // 必填,签名
- jsApiList: ['chooseWXPay'] // 必填,需要使用的JS接口列表
- })
- jweixin.ready(function() {
- jweixin.chooseWXPay({
- timestamp: payObj.timeStamp, // 时间戳
- nonceStr: payObj.nonceStr, // 随机数
- package: payObj.package, //
- signType: payObj.signType,
- paySign: payObj.paySign, // 签名
- success: function() {
- uni.showToast({ title:'支付成功' });
-
- setTimeout(() => {
- uni.navigateTo({
- url: `/pages/store/packageOrderPaySuccess?orderId=${that.orderId}`
- });
- },2000);
- },
- cancel: function() {
- uni.showToast({ title:'取消支付', icon:'none' });
- },
- fail: function(res) {
- uni.showToast({title:'支付失败'+JSON.stringify(res),icon:'none'});
- }
- })
- })
- }
-
- }else{
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- }
- },
- rej => {}
- );
- }
- else{
- uni.showToast({
- title:'请在微信内打开',
- icon:'none'
- })
- }
- // #endif
-
- // #ifdef APP-PLUS
- plus.share.getServices(function(res){
- var sweixin = null;
- for(var i=0;i<res.length;i++){
- var t = res[i];
- if(t.id == 'weixin'){
- sweixin = t;
- }
- }
- if(sweixin){
- console.log('调起小程序')
- that.$refs.popPayType.close()
- that.$refs.popTip.open()
- //唤起微信跳转小程序
- sweixin.launchMiniProgram({
- id:getApp().globalData.miniprogamId,
- path:'pages_order/packagePayment?orderId='+that.orderId+"&payMethod=app",
- type:0
- },function(){
- console.log("微信唤起成功");
- return true;
- },function(e){
- console.log("微信唤起失败",e);
- uni.showToast({
- title:'微信唤起失败,请检查是否有微信应用',
- icon:'none'
- })
- return false;
- })
-
- }else{
- uni.showToast({
- title:'微信唤起失败,请检查是否有微信应用',
- icon:'none',
- duration:3000
- });
- return false;
- }
-
- },function(res){
- console.log(JSON.stringify(res));
- });
- // #endif
- },
-
- payOrder(){
- var that=this;
- var data = {
- payType:this.payType,
- userCouponId:this.userCouponId,
- addressId:this.addressId,
- remark:this.order.remark,
- orderId:this.order.orderId,
- };
- uni.showLoading();
- pay(data).then(
- res => {
- console.log(res)
- uni.hideLoading()
- if(res.code==200){
- that.$refs.popPayType.open("bottom")
- }else{
- uni.showToast({
- icon:'none',
- title: res.msg,
- });
- }
- },
- rej => {}
- );
-
- }
- }
- }
- </script>
- <style lang="scss">
-
- page{
- position: relative;
- }
- .inner-box{
- padding: 20upx 20upx 300upx;
- .address-box{
- box-sizing: border-box;
- min-height: 171upx;
- background: #FFFFFF;
- border-radius: 16upx;
- background-image: url(/static/images/address_bg.png);
- background-repeat: no-repeat;
- background-size: 100% 30upx;
- background-position: left bottom;
- padding: 38upx 30upx 36upx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .left{
- width: 92%;
- .name-box{
- display: flex;
- align-items: center;
- .text{
- font-size: 32upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #111111;
- line-height: 1;
- &.name{
- margin-right: 30upx;
- }
- }
- }
- .address{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 42upx;
- text-align:left;
- margin-top: 23upx;
- }
- }
- .arrow-box{
- width: 12upx;
- height: 23upx;
- display: flex;
- align-items: cenetr;
- justify-content: cenetr;
- image{
- width: 100%;
- height: 100%;
- }
- }
- }
- .goods-list{
- margin-top: 20upx;
- padding: 0 30upx;
- background-color: #FFFFFF;
- border-radius: 16upx;
- .item{
- padding: 30upx 0;
- border-bottom: 1px solid #EDEEEF;
- display: flex;
- align-items: center;
- .img-box{
- width: 160upx;
- height: 160upx;
- margin-right: 30upx;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .info-box{
- width: calc(100% - 190upx);
- height: 160upx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .name-box{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 40upx;
- .tag{
- display: inline-block;
- padding: 0 6upx;
- height: 30upx;
- background: linear-gradient(90deg, #2583EB 0%, #E0F5FF 100%);
- border-radius: 4upx;
- margin-right: 10upx;
- font-size: 22upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 30upx;
- float: left;
- margin-top: 7upx;
- }
- }
- .spec{
- margin-top: 10upx;
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- }
- .price-num{
- display: flex;
- align-items: center;
- justify-content: space-between;
- .price{
- display: flex;
- align-items: flex-end;
- .unit{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 1.2;
- margin-right: 4upx;
- }
- .num{
- font-size: 32upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 1;
- }
- }
- .num{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- }
- }
- }
- }
- .sub-total{
- height: 88upx;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- .label{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
- .price{
- display: flex;
- align-items: flex-end;
- .unit{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FF6633;
- line-height: 1.2;
- margin-right: 4upx;
- }
- .num{
- font-size: 32upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF6633;
- line-height: 1;
- }
- }
- }
- }
- .other-info{
- margin-top: 20upx;
- background-color: #fff;
- border-radius: 20upx;
- overflow: hidden;
- padding: 0 30upx;
- .title{
- height: 80upx;
- line-height: 80upx;
- font-size: 30upx;
- color: #000;
- font-weight: bold;
- border-bottom: 2upx solid #eeeeee;
- }
- .drug-list{
- margin-top: 15rpx;
- .drug-item{
- padding-bottom: 15upx;
- border-bottom: 1px soli #F0F0F0;
- display: flex;
- align-items: center;
- .img-box{
- width: 160upx;
- height: 160upx;
- margin-right: 30upx;
- flex-shrink: 0;
- image{
- width: 100%;
- height: 100%;
- }
- }
- .drug-info{
- width: calc(100% - 190upx);
- height: 160upx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .name-box{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 40upx;
- .tag{
- display: inline-block;
- padding: 0 6upx;
- height: 30upx;
- background: linear-gradient(90deg, #2583EB 0%, #2BC7A4 100%);
- border-radius: 4upx;
- margin-right: 10upx;
- font-size: 22upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- line-height: 30upx;
- float: left;
- margin-top: 7upx;
- }
- }
- .spec{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- margin-top: 10upx;
- }
- .num-box{
- display: flex;
- align-items: center;
- justify-content: space-between;
- .price{
- display: flex;
- align-items: flex-end;
- .unit{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 1.2;
- margin-right: 4upx;
- }
- .num{
- font-size: 32upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #111111;
- line-height: 1;
- }
- }
- .use{
- font-size: 24upx;
- font-family: PingFang SC;
- color: #999999;
- }
- .amount{
- font-size: 24upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- }
- }
- }
- }
- }
- .item{
- height: 80upx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- &:last-child{
- border-bottom: none;
- }
- .left{
- flex: 1;
- display: flex;
- align-items: center;
- .label{
- min-width: 140rpx;
- font-size: 28upx;
- color: #000;
- }
- .text{
- font-size: 28upx;
- color: #1b1b1b;
- }
- }
- .right{
- display: flex;
- align-items: center;
- justify-content: flex-end;
- .text{
- font-size: 28upx;
- color: #1b1b1b;
- }
- .ic-close{
- margin-left: 10rpx;
- width: 30rpx;
- height:30rpx;
- }
- .ic-back{
- margin-left: 10rpx;
- width: 15rpx;
- height:30rpx;
- }
- }
- .item-btn{
- max-width: 200rpx;
- padding: 0rpx 15rpx;
- height: 48upx;
- border-radius: 24upx;
- line-height: 48upx;
- font-size: 24upx;
- color: #000;
- border: 1upx solid #d8d8d8;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- }
- }
-
- .remarks{
- height: 88upx;
- padding: 0 30upx;
- background: #FFFFFF;
- border-radius: 16upx;
- margin-top: 20upx;
- display: flex;
- align-items: center;
- input{
- width: 100%;
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #000000;
- }
- .input{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- }
- }
- }
-
-
- .btn-box{
- width: 100%;
- padding: 30rpx 30upx 0rpx;
- position: fixed;
- bottom: 0;
- left: 0;
- box-sizing: border-box;
- background-color: #ffffff;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- .btn{
- margin-bottom: 20rpx;
- width: 100%;
- height: 88upx;
- line-height: 88upx;
- text-align: center;
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- background: #2583EB;
- border-radius: 10upx;
- position: relative;
- .contact-btn {
- position: absolute;
- width:100%;
- height:100%;
- display: flex;
- opacity: 0;
- }
- }
- .btn1{
- margin-bottom: 20rpx;
- width: 100%;
- height: 88upx;
- line-height: 88upx;
- text-align: center;
- font-size: 34upx;
- font-family: PingFang SC;
- font-weight: 400;
- color: #2583EB;
- border: 1rpx solid #2583EB;
- border-radius: 10upx;
- position: relative;
- .contact-btn {
- position: absolute;
- width:100%;
- height:100%;
- display: flex;
- opacity: 0;
- }
- }
- }
- .pay-type{
- box-sizing: border-box;
- background: #FFFFFF;
- border-radius: 16upx;
- margin-top: 20upx;
- padding: 40upx 30upx 20rpx;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- .title{
- font-size: 28upx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #999999;
- line-height: 1;
- margin-bottom: 10upx;
- }
- .item{
- padding: 15upx 0upx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .left{
- display: flex;
- align-items: center;
- image{
- width: 44upx;
- height: 44upx;
- margin-right: 20upx;
- }
- .text{
- font-size: 30upx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #222222;
- line-height: 1;
- }
- }
- }
- }
- .coupon{
- background-color: #fff;
- border-radius: 30rpx 30rpx 0rpx 0rpx;
- height: 100%;
- .empty{
- display: flex;
- align-items: center;
- justify-content: center;
- height: 650rpx;
- width: 100%;
- image{
- width: 280rpx;
- height: 200rpx;
- }
- }
- }
- .coupon-box{
- overflow-y: auto;
-
- padding: 80rpx 20rpx 80rpx;
- height: 650rpx;
- width: 100%;
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: flex-start;
- box-sizing: border-box;
- .coupon-item{
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- margin-bottom: 16rpx;
- height:170rpx;
- &:last-child{
- margin-bottom: 0rpx;
- }
- .left{
- color: #fff;
- font-size: 36rpx;
- font-weight: bold;
- text-align: center;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- position: relative;
- width: 230rpx;
- image{
- position: absolute;
- width: 230rpx;
- height:170rpx;
- color: #fff;
- }
- .num{
- font-size: 40rpx;
- }
- .pic-num{
- font-size: 20rpx;
- z-index: 99;
- }
- }
- .right{
-
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: flex-start;
- height:170rpx;
- width: calc(100% - 230rpx);
- padding: 0 17rpx 0 24rpx;
- background-color: #fff;
- box-sizing: border-box;
- .title{
- width: 100%;
- font-size: 0.3 * 100rpx;
- color: #282828;
- height: 0.93 * 100rpx;
- line-height: 0.93 * 100rpx;
- border-bottom: 1px solid #f0f0f0;
- }
- .btns{
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- font-size: 0.2 * 100rpx;
- color: #999;
- height: 0.76 * 100rpx;
- .btn{
- width: 1.36 * 100rpx;
- height: 0.44 * 100rpx;
- border-radius: 0.22 * 100rpx;
- font-size: 0.22 * 100rpx;
- color: #fff;
- text-align: center;
- line-height: 0.44 * 100rpx;
- background-color: #2583EB;
- .gray{
- background-color: #ccc;
- }
- }
-
- }
- }
- }
-
- }
- .pay-box{
- border-radius: 30rpx 30rpx 0rpx 0rpx;
- padding: 30rpx;
- height: 350rpx;
- background-color: #fff;
- width: 100%;
- display:flex;
- flex-direction: column;
- text-align: center;
- justify-content: flex-start;
- .title{
- font-size: 32rpx;
- font-weight: bold;
- color: #111;
- }
- .pay-list{
- margin-top: 50rpx;
- display:flex;
- text-align: center;
- justify-content: center;
- .pay-item{
- margin: 10rpx;
- padding: 30rpx 0rpx;
- border-radius: 60rpx;
- background-color: green;
- flex: 1;
- display:flex;
- text-align: center;
- justify-content: center;
- image{
- width:40rpx;
- height:40rpx;
- }
- .name{
- margin-left: 15rpx;
- font-size: 32rpx;
- font-weight: bold;
- color: #fff;
- }
-
-
- }
- .wx{
- background-color: #09ba08;
- }
- .alipay{
- background-color: #04a9ed;
- }
- }
-
- }
- </style>
|