123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473 |
- <template>
- <view>
- <!-- 地址 -->
- <uni-notice-bar class="notice-bar" background-color="#FFFFFF" color="#141414" showIcon="true" single="true" :text="notice"></uni-notice-bar>
- <view v-if="tabCurrentIndex == 0" class="address-section">
- <view class="order-content" v-if="addressData.real_name">
- <text class="iconfont iconlocation"></text>
- <view class="cen">
- <view class="top">
- <text class="name">{{ addressData.real_name }}</text>
- <text class="mobile">{{ addressData.phone }}</text>
- </view>
- <text class="address">{{ addressData.province + addressData.city + addressData.district }} {{ addressData.detail }}</text>
- </view>
- <text class="iconfont iconenter"></text>
- </view>
- <view class="order-content" v-if="!addressData.real_name" @click="navTo('/pages/address/addressPink')">
- <view class="addAddress">
- <text class="iconfont iconaddition"></text>
- <text>添加拼团地址</text>
- </view>
- </view>
- <image class="a-bg" :src="addressImg"></image>
- </view>
- <!-- <navigator v-if="tabCurrentIndex == 1" url="/pages/address/shopList" class="address-section">
- <view class="order-content" v-if="shopAddress.name">
- <text class="iconfont iconlocation"></text>
- <view class="cen">
- <view class="top">
- <text class="name">{{ shopAddress.name }}</text>
- <text class="mobile">{{ shopAddress.mobile }}</text>
- </view>
- <text class="address">{{ shopAddress.address }} {{ shopAddress.area }}</text>
- </view>
- <text class="iconfont iconenter"></text>
- </view>
- <view class="order-content" v-if="!shopAddress.name">
- <text class="addAddress">
- <text class="iconfont iconaddition"></text>
- <text>添加收货地址</text>
- </text>
- </view>
- <image class="a-bg" :src="addressImg"></image>
- </navigator> -->
-
- <!-- 商品列表 -->
- <view class="goods">
- <view class="goods-name flex">
- <view class="name">送达时间</view>
- <!-- <view class="time flex" v-if="showMask">
- <view>
- <view @tap="showPicker('linkage')" class="result">{{ resulttime }}</view>
- <w-picker
- mode="linkage"
- :value="defaultRegion1"
- :options="options"
- :level="2"
- default-type="id"
- :default-props="defaultProps1"
- @confirm="onConfirm($event, 'linkage')"
- @cancel="onCancel"
- ref="linkage"
- ></w-picker>
- </view>
- <text class="iconfont iconenter"></text>
- </view> -->
- <view class="red">{{mark}}</view>
- </view>
- <view class="goods-section">
- <view class="pink_name" v-if="pink_type == 1">{{pink_name}}</view>
- <view class="g-item flex_item" v-if="ShowType == 2">
- <scroll-view class="scroll-list" scroll-x>
- <view class="scoll-box" v-for="(ls, ind) in shopList" :key="ls.id">
- <view class="scoll-img"><image :src="ls.productInfo.image"></image></view>
- </view>
- </scroll-view>
- <view class="total">共{{ shopList.length }}件</view>
- </view>
- <view class="gift-item flex_item" v-if="ShowType == 1" v-for="(ls, ind) in shopList" :key="ind">
- <image :src="ls.productInfo.image"></image>
- <view class="right">
- <text class="title clamp">{{ ls.productInfo.store_name }}</text>
- <!-- <text class="spec">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.suk : '默认' }}</text> -->
- <view class="price-box">
- <text class="price">¥{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price }}</text>
- </view>
- <view class="price-box">
- <text class="number">{{ 'x ' + ls.cart_num }}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!-- 金额明细 -->
- <!-- <view class="yt-list">
- <view class="yt-list-cell b-b">
- <text class="cell-tit clamp">支付方式</text>
- <text class="cell-tip">微信</text>
- </view>
- </view> -->
- <view class="goods" v-if="activityPro">
- <view class="goods-section">
- <view class="gift-item flex_item padding-t-0">
- <image :src="activityPro.image"></image>
- <view class="right">
- <text class="title clamp">{{ activityPro.store_name }}</text>
- <!-- <text class="spec">{{ activityPro.attrInfo ? activityPro.attrInfo.suk : '默认' }}</text> -->
- <view class="price-box"><text class="price">免费</text></view>
- </view>
- <view class="iconLeftTip">活动赠品</view>
- </view>
- </view>
- </view>
- <!-- <view class="green_card">
- <view class="box">
- <view class="img"><image src="/static/img/img36.png"></image></view>
- <view class="list flex">
- <view class="tpl">
- <view class="tip" v-if="grade < 100">
- 开通美卡,本单最高可减
- <text>{{ moneyAll.vipPrice }}元</text>
- </view>
- <view class="tip" v-if="grade > 99">
- 您已开通美卡,本单节省
- <text>{{ moneyAll.vipPrice }}元</text>
- </view>
- <view class="top" v-if="grade < 100">一天2毛4,一年约省806元</view>
- <view class="top" v-if="grade > 99">美卡有效期至{{ userInfo.level_valid_time }}</view>
- </view>
- <view class="tpl flex" v-if="grade < 100">
- <view class="money">¥88.00/年</view>
- <radio @click="checkbox" color="#06B163" :checked="checked" />
- </view>
- <view class="member" v-if="grade > 99" @click="ToMemer">
- 我的美卡
- <text class="iconfont iconenter"></text>
- </view>
- </view>
- </view>
- </view> -->
-
- <view class="info">
- <view class="flex">
- <view>商品金额</view>
- <view>¥{{ priceGroupDate.total_price }}</view>
- </view>
- <view class="flex">
- <view>配送费用</view>
- <view>¥{{ priceGroupDate.pay_postage }}</view>
- </view>
- <!-- <view class="flex" v-if="showMask"><view style="color: #ff383e;font-size: 24rpx;">(第一笔订单满19元时,第二单选择相同时段配送免配送费)</view></view> -->
- <view class="flex" v-if="!DeliveryChecked.coupon_price"></view>
- <view class="flex" v-if="DeliveryChecked.coupon_price">
- <view>配送券</view>
- <view class="red">-¥{{ DeliveryChecked.coupon_price }}</view>
- </view>
- </view>
- <!-- 底部 -->
- <view class="footer">
- <view class="price-content">
- <text>实付款:</text>
- <text class="price-tip">¥</text>
- <text class="price">{{ payPrice }}</text>
- </view>
- <text class="submit" :class="{ submitNo: !payType }" @click="payType ? submit() : ''">提交订单</text>
- </view>
- <!-- 优惠券面板 -->
- <view class="mask" :class="maskState === 0 ? 'none' : maskState === 1 ? 'show' : ''" @click="toggleMask">
- <view class="mask-content">
- <!-- 优惠券页面,仿mt -->
- <view class="name">领优惠券</view>
- <view class="coupon-item flex" @click="checkedCp(item)" v-for="(item, index) in couponList" :key="index">
- <view class="left">
- <view class="left-price">
- ¥
- <text>{{ item.coupon_price }}</text>
- </view>
- <view class="left-man">满{{ item.use_min_price }}元使用</view>
- </view>
- <view class="right flex">
- <view class="right-info">
- <view class="info-name">{{ item.coupon_title }}</view>
- <view class="info-tip">限指定商品使用</view>
- <view class="info-tip">有效期至{{ item.end_time }}</view>
- </view>
- <!-- <view class="right-submit">立即领取</view> -->
- </view>
- </view>
- </view>
- </view>
- <!-- 领取商品券 -->
- <view class="mask" :class="goodsState === 0 ? 'none' : goodsState === 1 ? 'show' : ''" @click="goods">
- <view class="mask-content">
- <!-- 优惠券页面,仿mt -->
- <view class="name">领商品券</view>
- <view v-for="(item, index) in goodsList" :key="index" @click="checkedGoods(item)" class="goodsState flex">
- <view class="img"><image src="/static/img/img37.png" mode="scaleToFill"></image></view>
- <view class="delivery-box flex">
- <view class="list-money">
- <view class="tit">
- <text>{{ item.coupon_price }}</text>
- ¥
- </view>
- <view class="price">美天选菜商品券</view>
- </view>
- <view class="row_list_right">
- <view class="title">{{ item.coupon_title }}</view>
- <view class="text">使用日期:{{ item.add_time }} 至{{ item.end_time }}</view>
- </view>
- <view class="use"><text>使用</text></view>
- </view>
- <view class="img"><image src="/static/img/img38.png" mode="scaleToFill"></image></view>
- </view>
- </view>
- </view>
- <view class="check_box flex" v-if="pink_type == 1">
- <view class="ziti-text" @click="Ziti">《用户自提协议》</view>
- <view><radio style="transform: scale(0.75)" @click="Getcheckbox11" color="#3DCF35" :checked="checked11" />同意</view>
- </view>
- <!-- 是否需要食物商品 -->
- <!-- <uni-popup ref="popup" type="center" :maskClick="false">
- <view class="pop-box">
- <view class="pop-tit">是否需要实物商品</view>
- <view class="pop-buttom">
- <view class="pop-sub" style="color: #5dbc7c;" @click="Needyes">是</view>
- <view class="pop-sub" style="color: #FF0000;" @click="Needno">否</view>
- </view>
- </view>
- </uni-popup> -->
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex';
- import { confirm } from '@/api/order.js';
- import { couponsOrder } from '@/api/coupon.js';
- import { computedOrderkey } from '@/api/money.js';
- import { pinkAddress } from '@/api/address.js';
- import { cartAdd } from '@/api/product.js';
- import uniPopup from '@/components/uni-popup/uni-popup.vue';
- import wPicker from '@/components/w-picker/w-picker.vue';
- export default {
- components: {
- wPicker,
- uniPopup
- },
- data() {
- return {
- pink_type:"",//区分拼团订单和普通订单
- pink_name:"",//区分aa团和达人团
- checked11:false,
- mark:"",
- ShowType: 1, //商品显示形式
- checkedPei: false, //是否选择配送券
- checked: false, //是否选择开通美卡
- isBuyVip: 0, //0为未使用配送券,1为使用配送券
- Deliveryid: 0, //选择的配送券id
- userInfo: '', //用户个人信息
- estimated_time: '', //选择配送时间
- resulttime: '请选择送达时间', //选择配送时间传值
- defaultProps1: {
- label: 'name',
- value: 'id',
- children: 'child'
- },
- defaultRegion1: ['1', '9'],
- options: [
- {
- id: '1',
- name: '明日到家',
- child: [
- {
- id: '9',
- name: '请选择送达时间',
- child: []
- },
- {
- id: '11',
- name: '预计16:30前',
- child: []
- },
- {
- id: '10',
- name: '预计10:30前',
- child: []
- }
- ]
- }
- ],
- addressImg: '/static/img/img35.png',
- // 当前选中的支付方式
- tabCurrentIndex: 0,
- notice: '商品到货后,系统将会通知您来取货~',
- navList: [
- {
- state: 0,
- text: '快递配送'
- },
- {
- state: 1,
- text: '到店自提'
- }
- ],
- showMask: true, //是否显示优惠券面板
- maskState: 0, //优惠券面板显示状态
- goodsState: 0, //商品券面板显示状态
- deliveryState: 0, //配送权面板显示状态
- desc: '', //备注
- couponList: [], // 优惠券列表
- deliveryList: [], //配送券列表
- goodsList: [], //商品券列表
- couponChecked: '', //选中的优惠券
- DeliveryChecked: '', //选中的配送券
- GoodsChecked: '', //选中的商品券
- // 收货地址
- addressData: {},
- // 店铺地址
- shopAddress: {
- name: '',
- mobile: '',
- addressName: '',
- address: '',
- area: '',
- default: false
- },
- // 商品列表
- shopList: [],
- // 购物车id
- cartId: '',
- grade: '', //用户等级
- //购物金额详情
- moneyAll: {
- storeFreePostage: 0, //邮费优惠
- storePostage: 0, //邮费
- totalPrice: 0, //总支付金额
- vipPrice: 0 //vip优惠价
- },
- payPrice: 0, //总支付金额
- orderKey: '', //订单id
- checkedPoints: false, //判断是否积分抵扣
- integralShow: false, //是否显示积分抵扣金额
- payType: 1, //1微信 2支付宝
- // payType: true, //是否可支付
- pinkid: '', //保存拼团商品id
- form: '', //0优惠券,3配送券,2商品券
- priceGroupDate: '', //重新计算金额
- activityPro: '' ,//活动赠送商品
- goodsType: '', // 是否为拼团
- neednum: '', // 是否需要食物
- pinkUser: '' ,//是否为团长
- klonId: '', // 接龙id
- };
- },
- onLoad(option) {
- console.log(option,968)
- // 判断是否为拼团商品
- if (option.type == 'pink') {
- this.showMask = false;
- this.pinkid = option.pinkid;
- this.cartAdd(option);
- } else {
- // 判断是否拼团商品过来的
- if (+option.goodsType == 2) {
- this.showMask = false;
- }
- // 保存当前商品在购物车中的id
- this.cartId = option.id;
- this.pinkUser = option.pinkUser
- pinkAddress({}).then(({data}) => {
- this.addressData = data;
- })
-
- this.loadData();
- }
- },
- onShow() {
- // 获取拼团地址
- pinkAddress({}).then(({data}) => {
- this.addressData = data;
- })
- },
- watch: {
- checkedPoints(newValue, oldValue) {
- this.integralShow = false;
- this.payMoneyNub();
- },
- estimated_time(newValue, oldValue) {
- this.payMoneyNub();
- }
- },
- computed: {
- Postage() {
- let money = +this.moneyAll.storePostage;
- if (money == 0) {
- return '免运费';
- } else {
- return '¥' + money;
- }
- },
- payAllMoney() {
- return +this.moneyAll.totalPrice + +this.moneyAll.vipPrice;
- }
- },
- methods: {
- ...mapMutations(['upAddressPageShow']),
- // 选择是
- Needyes(){
- this.neednum = 0;
- this.payMoneyNub()
- this.$refs.popup.close()
- console.log(this.neednum,99)
- },
- //自提服务协议
- Getcheckbox11() {
- let obj = this;
- obj.checked11 = !obj.checked11;
- },
-
- // 跳转到自提协议
- Ziti() {
- uni.navigateTo({
- url: '/pages/rule/Pickrule'
- });
- },
-
- // 选择否
- Needno(){
- this.neednum = 1;
- this.payMoneyNub()
- this.$refs.popup.close()
- console.log(this.neednum,99)
- },
- showPicker(type) {
- this.$refs[type].show();
- },
- onConfirm(res, type) {
- this.resulttime = res.result;
- if (res.value[1] == 10) {
- this.estimated_time = '10:30';
- }
- if (res.value[1] == 11) {
- this.estimated_time = '16:30';
- }
- if (res.value[1] == 9) {
- this.estimated_time = '';
- }
- },
- onCancel() {},
- navTo(url) {
- uni.navigateTo({
- url
- });
- },
- // 添加商品到购物车
- cartAdd(opt) {
- let obj = this;
- cartAdd({
- cartNum: 1, //商品数量
- new: 1, //商品是否新增加到购物车1为不加入0为加入
- mer_id: +opt.merid, //商店id
- combinationId: +opt.gid, //拼团商品id
- productId: +opt.pid //普通商品id
- })
- .then(function(e) {
- let da = e.data;
- // 獲取购物车号
- obj.cartId = da.cartId;
- // 加载数据
- obj.loadData();
- })
- .catch(e => {
- console.log(e);
- });
- },
- //是否选择配送券
- Getcheckbox() {
- let obj = this;
- obj.checkedPei = !obj.checkedPei;
- if (obj.checkedPei == false) {
- obj.Deliveryid = 0;
- obj.payMoneyNub();
- } else {
- obj.Deliveryid = obj.deliveryList[0].id;
- obj.payMoneyNub();
- }
- },
- Toaddress() {
- let addressPageShow = uni.getStorageSync('addaddressPageShowressData');
- if (!addressPageShow) {
- this.upAddressPageShow();
- }
- uni.showModal({
- title: '提示',
- content: '修改地址需要重新下单,是否确认修改?',
- success: function(res) {
- if (res.confirm) {
- uni.navigateTo({
- url: '/pages/index/address'
- });
- } else if (res.cancel) {
- }
- }
- });
- },
- //是否开通美卡
- checkbox() {
- let obj = this;
- obj.checked = !obj.checked;
- console.log(obj.checked, 'checked');
- if (obj.checked == false) {
- obj.isBuyVip = 0;
- obj.payMoneyNub();
- } else {
- obj.isBuyVip = 1;
- obj.payMoneyNub();
- }
- },
- // 计算支付金额
- payMoneyNub() {
- console.log(this.neednum)
- computedOrderkey({
- isBuyVip: this.isBuyVip, //是否使用配送券
- orderkey: this.orderKey,
- useIntegral: this.checkedPoints ? 1 : 0, //是否积分抵扣
- couponId: this.couponChecked.id, //优惠券编号
- goCouponId: this.Deliveryid, //配送券编号
- productCouponId: this.GoodsChecked.id, //商品券编号
- addressId: this.addressData.id, //地址编号
- estimated_time: this.estimated_time,
- is_pink_free: this.neednum,
- isPink: 0,
- jl_id: this.klonId,
- })
- .then(({ data }) => {
- this.payType = true;
- this.integralShow = true;
- // 获取支付金额
- this.payPrice = +data.result.pay_price;
- this.priceGroupDate = data.result;
- // 保存活动赠送商品
- this.activityPro = data.result.activityPro;
- })
- .catch(e => {
- console.log(e);
- this.integralShow = false;
- this.payType = false;
- });
- },
- // 是否使用积分
- checkedIntegral() {
- this.checkedPoints = !this.checkedPoints;
- },
- // 选中优惠券
- checkedCp(item) {
- this.couponChecked = item;
- this.payMoneyNub();
- },
- // 选中配送券
- // checkedDelivery(item) {
- // this.DeliveryChecked = item;
- // this.payMoneyNub();
- // },
- // 选中商品券
- checkedGoods(item) {
- this.GoodsChecked = item;
- this.payMoneyNub();
- },
- //顶部tab点击
- tabClick(index) {
- this.tabCurrentIndex = index;
- },
- // maskState: 0, //优惠券面板显示状态
- // goodsState:0,//商品券面板显示状态
- // deliveryState:0,//配送券面板显示状态
- //显示优惠券面板
- toggleMask(type) {
- if (this.userInfo.discount_coupon_count == 0) {
- return;
- } else {
- let timer = type === 'show' ? 10 : 300;
- let state = type === 'show' ? 1 : 0;
- this.maskState = 2;
- setTimeout(() => {
- this.maskState = state;
- }, timer);
- }
- },
- //显示商品券面板
- goods(type) {
- if (this.userInfo.product_coupon_count == 0) {
- return;
- }
- let timer = type === 'show' ? 10 : 300;
- let state = type === 'show' ? 1 : 0;
- this.goodsState = 2;
- setTimeout(() => {
- this.goodsState = state;
- }, timer);
- },
- //显示配送券面板
- delivery(type) {
- if (this.userInfo.freight_coupon_count == 0) {
- return;
- }
- let timer = type === 'show' ? 10 : 300;
- let state = type === 'show' ? 1 : 0;
- this.deliveryState = 2;
- setTimeout(() => {
- this.deliveryState = state;
- }, timer);
- },
- // 加载优惠券列表
- // couponsOrder() {
- // let obj = this;
- // let money = obj.moneyAll.totalPrice;
- // couponsOrder(
- // {
- // form: 0
- // },
- // money
- // ).then(e => {
- // this.couponList = e.data;
- // });
- // couponsOrder(
- // {
- // form: 2
- // },
- // money
- // ).then(e => {
- // this.goodsList = e.data;
- // });
- // couponsOrder(
- // {
- // form: 3
- // },
- // money
- // ).then(e => {
- // this.deliveryList = e.data;
- // });
- // },
- //获取订单信息
- loadData() {
- let obj = this;
-
- confirm({ cartId: obj.cartId + '' })
- .then(({ data }) => {
- obj.mark = data.mark;
- obj.klonId = data.jl_id;
- // obj.addressData = data.addressInfo || {};
- obj.shopList = data.cartInfo; //商品列表
- if (obj.shopList.length < 2) {
- obj.ShowType = 1;
- } else {
- obj.ShowType = 2;
- }
- obj.moneyAll = data.priceGroup; //金额数据
- obj.orderKey = data.orderKey; //订单key
- obj.userInfo = data.userInfo;
- if(data.combination_id){
- if(data.combination_id > 0){
- obj. pink_type= 1;
- obj. pink_name= data.pink_type ;
- }else{
- obj. pink_type= 0;
- }
- }
- console.log(data.pink_type,55)
- if (data.userInfo.level_info == null) {
- obj.grade = 0;
- } else {
- obj.grade = data.userInfo.level_info.grade;
- }
- // 计算金额
- this.payMoneyNub();
- // 加载各种券
- obj.couponsOrder();
-
- // if( this.pinkid == '' && this.userInfo.day_give == 1 && this.pinkUser == 1) {
- // this.$refs.popup.open()
- // }
- })
- .catch(e => {
- console.log(e.message);
- if (e.message == '未在营业时间') {
- setTimeout(function() {
- uni.switchTab({
- url: '/pages/index/index'
- });
- }, 1000);
- }
- });
- },
- // 购买数量变化
- numberChange(data) {
- this.number = data.number;
- },
- // 修改支付方式
- changePayType(type) {
- this.payType = type;
- },
- // 提交订单
- submit() {
- if(this.pink_type == 1){
- if(this.checked11 === false){
- this.$api.msg('请同意用户自提协议');
- return false;
- }
- }
- if (this.checkedPoints && this.shopList.length > 1) {
- this.$api.msg('积分商品只可单件购买');
- return false;
- }
- if (!this.addressData.real_name) {
- this.$api.msg('请选择收货地址');
- return false;
- }
- // if (this.estimated_time == '' && this.showMask) {
- // this.$api.msg('请选择送达时间');
- // return false;
- // }
- let url = '/pages/money/pay?key=' + this.orderKey + '&estimated_time=' + this.estimated_time + '&free=' + this.neednum + '&pinkUser=' + this.pinkUser + '&klonId=' + this.klonId;
- if (this.pinkid) {
- url += '&pinkid=' + this.pinkid;
- }
- // 判断是否为拼团商品
- if (!this.showMask) {
- url += '&pink=1';
- }
- uni.navigateTo({
- url
- });
- },
- ToMemer() {
- if (this.grade > 99) {
- uni.navigateTo({
- url: '/pages/user/renew'
- });
- }
- if (this.grade < 100) {
- uni.navigateTo({
- url: '/pages/user/card'
- });
- }
- }
- }
- };
- </script>
- <style lang="scss">
- page {
- background: $page-color-base;
- padding-bottom: 100rpx;
- }
- .notice-bar {
- position: relative;
- top: 10rpx;
- }
- .navbar {
- display: flex;
- height: 80rpx;
- padding: 0 5px;
- background: #fff;
- box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
- position: relative;
- z-index: 10;
- .nav-item {
- flex: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- font-size: $font-lg + 4rpx;
- color: $font-color-dark;
- position: relative;
- &.current {
- color: $base-color;
- &:after {
- content: '';
- position: absolute;
- left: 50%;
- bottom: 0;
- transform: translateX(-50%);
- width: 140rpx;
- height: 0;
- border-bottom: 2px solid $base-color;
- }
- }
- }
- }
- .address-section {
- padding: 30rpx 0;
- background: #fff;
- position: relative;
- border-top: 1px solid $border-color-light;
- .order-content {
- min-height: 100rpx;
- display: flex;
- align-items: center;
- .addAddress {
- text-align: center;
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- .iconaddition {
- font-size: 55rpx;
- line-height: 1;
- border-radius: 100rpx;
- margin-right: 20rpx;
- }
- }
- }
- .iconlocation {
- flex-shrink: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 90rpx;
- color: #888;
- font-size: 44rpx;
- }
- .cen {
- display: flex;
- flex-direction: column;
- flex: 1;
- font-size: 28rpx;
- color: $font-color-dark;
- }
- .name {
- font-size: 34rpx;
- margin-right: 24rpx;
- }
- .address {
- margin-top: 16rpx;
- margin-right: 20rpx;
- color: $font-color-light;
- }
- .icon-you {
- font-size: 32rpx;
- color: $font-color-light;
- margin-right: 30rpx;
- }
- .a-bg {
- position: absolute;
- left: 0;
- bottom: 0;
- display: block;
- width: 100%;
- height: 5rpx;
- }
- }
- .pink_name{
- position: absolute;
- top: 20rpx;
- left: 25rpx;
- z-index: 99;
- background-color: #FFF270;
- color: #934721;
- font-size: 22rpx;
- padding: 0rpx 8rpx;
- }
- .goods {
- padding: 15rpx 25rpx;
- padding-bottom: 25rpx;
- background: #ffffff;
- margin-top: 25rpx;
- .iconLeftTip {
- position: absolute;
- top: 20rpx;
- left: 0rpx;
- padding: 5rpx 10rpx;
- background-color: $color-red;
- color: #ffffff;
- font-size: $font-sm - 4rpx;
- }
- .goods-name {
- color: #141414;
- font-size: 24rpx;
- padding: 30rpx 0rpx;
- .name {
- font-size: 35rpx;
- }
- .red {
- color: #ff383e;
- }
- .time {
- text {
- padding-top: 7rpx;
- }
- }
- }
- .goods-section {
- position: relative;
- .g-header {
- display: flex;
- align-items: center;
- height: 84rpx;
- padding: 0 30rpx;
- position: relative;
- }
- .logo {
- display: block;
- width: 50rpx;
- height: 50rpx;
- border-radius: 100px;
- }
- .name {
- font-size: 30rpx;
- color: $font-color-base;
- margin-left: 24rpx;
- }
- .gift-item {
- display: flex;
- margin: 20rpx 30rpx;
- padding-top: 20rpx;
- position: relative;
- image {
- flex-shrink: 0;
- display: block;
- width: 140rpx;
- height: 140rpx;
- border-radius: 4rpx;
- }
- .right {
- flex: 1;
- padding-left: 24rpx;
- overflow: hidden;
- align-self: stretch;
- }
- .title {
- font-size: 30rpx;
- color: $font-color-dark;
- }
- .spec {
- font-size: 26rpx;
- color: $font-color-light;
- }
- .price-box {
- display: flex;
- align-items: center;
- font-size: 32rpx;
- color: $font-color-dark;
- padding-top: 10rpx;
- .price {
- margin-bottom: 4rpx;
- }
- .number {
- font-size: 26rpx;
- color: $font-color-base;
- margin-left: 20rpx;
- }
- }
- .step-box {
- position: relative;
- }
- }
- .g-item {
- width: 100%;
- font-size: 24rpx;
- height: 170rpx;
- .scroll-list {
- width: 80%;
- overflow: hidden;
- white-space: nowrap;
- .scoll-box {
- margin-right: 25rpx;
- text-align: center;
- display: inline-block;
- .scoll-img {
- width: 150rpx;
- height: 150rpx;
- border-radius: 100%;
- image {
- width: 150rpx;
- height: 100%;
- border-radius: 100%;
- }
- }
- }
- }
- .total {
- width: 20%;
- text-align: center;
- color: #515151;
- font-size: 26rpx !important;
- }
- }
- }
- }
- .green_card {
- background: #ffffff;
- padding: 30rpx 27rpx;
- width: 100%;
- margin-top: 15rpx;
- font-size: 26rpx;
- .box {
- background: #f5f5f5;
- padding: 25rpx 25rpx;
- .img {
- width: 100rpx;
- height: 40rpx;
- margin-bottom: 15rpx;
- image {
- width: 100%;
- height: 100%;
- }
- }
- .list {
- .tpl {
- .tip {
- color: #425272;
- text {
- color: #ff383e;
- }
- }
- .top {
- color: #999999;
- padding-top: 15rpx;
- }
- .money {
- padding-right: 10rpx;
- }
- }
- .member {
- color: #425272;
- }
- }
- }
- }
- .yt-list {
- margin-top: 16rpx;
- background: #fff;
- }
- .yt-list-cell {
- display: flex;
- align-items: center;
- padding: 10rpx 30rpx 10rpx 40rpx;
- line-height: 70rpx;
- position: relative;
- &.cell-hover {
- background: #fafafa;
- }
- &.b-b:after {
- left: 30rpx;
- }
- .cell-icon {
- height: 32rpx;
- width: 32rpx;
- font-size: 22rpx;
- color: #fff;
- text-align: center;
- line-height: 32rpx;
- background: #f85e52;
- border-radius: 4rpx;
- margin-right: 12rpx;
- &.hb {
- background: #ffaa0e;
- }
- &.lpk {
- background: #3ab54a;
- }
- }
- .cell-more {
- align-self: center;
- font-size: 24rpx;
- color: $font-color-light;
- margin-left: 8rpx;
- margin-right: -10rpx;
- }
- .cell-tit {
- flex: 1;
- font-size: 26rpx;
- color: $font-color-light;
- margin-right: 10rpx;
- }
- .cell-tip {
- font-size: 26rpx;
- color: $font-color-dark;
- &.disabled {
- color: $font-color-light;
- }
- &.active {
- color: #b3b3b3;
- }
- &.red {
- color: $base-color;
- }
- }
- &.desc-cell {
- .cell-tit {
- max-width: 90rpx;
- }
- }
- .desc {
- flex: 1;
- text-align: right;
- font-size: $font-base;
- color: $font-color-dark;
- }
- }
- .info {
- margin-top: 25rpx;
- background: #ffffff;
- padding-top: 25rpx !important;
- margin-bottom: 25rpx !important;
- padding: 0rpx 25rpx;
- font-size: 28rpx;
- color: #909399;
- view {
- padding-bottom: 10rpx;
- }
- }
- .red {
- color: #ff1a27;
- }
- /* 支付列表 */
- .pay-list {
- padding-left: 40rpx;
- margin-top: 16rpx;
- background: #fff;
- .pay-item {
- display: flex;
- align-items: center;
- padding-right: 20rpx;
- line-height: 1;
- height: 110rpx;
- position: relative;
- }
- .icon-weixinzhifu {
- width: 80rpx;
- font-size: 40rpx;
- color: #6bcc03;
- }
- .icon-alipay {
- width: 80rpx;
- font-size: 40rpx;
- color: #06b4fd;
- }
- .icon-xuanzhong2 {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 60rpx;
- height: 60rpx;
- font-size: 40rpx;
- color: $base-color;
- }
- .tit {
- font-size: 32rpx;
- color: $font-color-dark;
- flex: 1;
- }
- }
- .footer {
- position: fixed;
- left: 0;
- bottom: 0;
- z-index: 995;
- display: flex;
- align-items: center;
- width: 100%;
- height: 90rpx;
- justify-content: space-between;
- font-size: 30rpx;
- background-color: #fff;
- z-index: 998;
- color: $font-color-base;
- box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
- .price-content {
- padding-left: 30rpx;
- }
- .price-tip {
- color: #ff383e;
- margin-left: 8rpx;
- }
- .price {
- font-size: 36rpx;
- color: #ff383e;
- }
- .submit {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 280rpx;
- height: 100%;
- color: #fff;
- font-size: 32rpx;
- background-color: $base-color;
- &.submitNo {
- background-color: $font-color-disabled;
- }
- }
- }
- .check_box {
- padding: 0rpx 25rpx;
- font-size: 28rpx;
- text{
- color: #3DCF35;
- }
- .ziti-text {
- color: $base-color;
- text-decoration: underline;
- }
- }
- /* 优惠券面板 */
- .mask {
- display: flex;
- align-items: flex-end;
- position: fixed;
- left: 0;
- top: var(--window-top);
- bottom: 0;
- width: 100%;
- background: rgba(0, 0, 0, 0);
- z-index: 9995;
- transition: 0.3s;
- .mask-content {
- width: 100%;
- max-height: 70vh;
- background: #f3f3f3;
- transform: translateY(100%);
- transition: 0.3s;
- overflow-y: scroll;
- border-top-left-radius: 25rpx;
- border-top-right-radius: 25rpx;
- .name {
- width: 100%;
- text-align: center;
- padding: 15rpx 15rpx;
- margin-top: 15rpx;
- }
- }
- &.none {
- display: none;
- }
- &.show {
- background: rgba(0, 0, 0, 0.4);
- .mask-content {
- transform: translateY(0);
- }
- }
- }
- /* 优惠券列表 */
- .coupon-item {
- margin: 20rpx 24rpx;
- background: #fff;
- font-size: 26rpx;
- height: 170rpx;
- .left {
- background: #eef9f1;
- width: 28%;
- height: 170rpx;
- text-align: center;
- color: #2dbd59;
- .left-price {
- padding-top: 25%;
- text {
- font-size: 59rpx;
- font-weight: bold;
- }
- }
- }
- .right {
- width: 72%;
- height: 170rpx;
- padding: 0rpx 25rpx;
- .info-name {
- font-weight: bold;
- font-size: 30rpx;
- }
- .info-tip {
- color: #999999;
- font-size: 22rpx;
- padding: 5rpx 0rpx;
- }
- .right-submit {
- background: #2dbd59;
- color: #ffffff;
- border-radius: 25rpx;
- padding: 10rpx 15rpx;
- }
- }
- }
- //配送券
- .deliveryState {
- border-radius: 15rpx;
- margin: 20rpx 24rpx;
- height: 200rpx;
- overflow: hidden;
- background: #ffffff;
- .list-interval {
- border: 1px dashed $border-color-light;
- height: 100%;
- .top,
- .bottom {
- border-radius: 100rpx;
- width: 30rpx;
- height: 30rpx;
- position: absolute;
- background-color: $page-color-base;
- right: -15rpx;
- }
- .top {
- top: -18rpx;
- }
- .bottom {
- bottom: -18rpx;
- }
- }
- .list-money {
- height: 100%;
- image {
- height: 100%;
- width: 20rpx;
- margin-right: 10rpx;
- position: relative;
- }
- .list-money-text {
- width: 220rpx;
- padding: 0 25rpx;
- text-align: center;
- color: #fc4141;
- .tit {
- padding: 15rpx 0rpx;
- font-size: 55rpx;
- font-weight: bold;
- }
- .price {
- padding-bottom: 25rpx;
- color: #999999;
- font-size: 24rpx;
- }
- }
- }
- .row_list_right {
- width: 60%;
- font-size: 26rpx;
- .title {
- text {
- color: #fc4141;
- font-size: 30rpx;
- }
- }
- .text {
- padding: 7rpx;
- color: #999999;
- }
- .use {
- margin-top: 15rpx;
- text {
- border: 2rpx solid #313131;
- padding: 7rpx 20rpx;
- border-radius: 25rpx;
- }
- }
- }
- }
- //商品券
- .goodsState {
- border-radius: 15rpx;
- margin: 20rpx 24rpx;
- height: 200rpx;
- overflow: hidden;
- .img {
- width: 30rpx;
- height: 200rpx;
- image {
- height: 100%;
- width: 100%;
- }
- }
- .delivery-box {
- background: linear-gradient(270deg, rgba(111, 178, 47, 1) 0%, rgba(160, 217, 106, 1) 100%);
- width: 100%;
- height: 100%;
- color: #ffffff;
- .list-money {
- height: 100%;
- font-size: 22rpx;
- text-align: center;
- padding-top: 4%;
- padding-left: 10rpx;
- .tit {
- text {
- font-size: 80rpx;
- }
- }
- }
- .row_list_right {
- width: 43%;
- font-size: 26rpx;
- .title {
- text {
- color: #fc4141;
- font-size: 30rpx;
- }
- }
- .text {
- padding: 7rpx;
- color: #ffffff;
- font-size: 20rpx;
- }
- }
- .use {
- margin-top: 15rpx;
- text {
- background-color: #ffffff;
- font-size: 26rpx;
- padding: 12rpx 30rpx;
- border-radius: 25rpx;
- color: rgba(111, 178, 47, 1);
- }
- }
- }
- }
- .pop-box {
- background: #FFFFFF;
- width: 500rpx;
- border-radius: 15rpx;
- text-align: center;
- .pop-tit {
- font-size: $font-base;
- padding-top: 60rpx;
- }
- .pop-buttom {
- display: flex;
- align-items: center;
- margin-top: 40rpx;
- border-bottom-left-radius: 15rpx;
- border-bottom-right-radius: 15rpx;
- border: 1px solid #f0f0f0;
- height: 80rpx;
- .pop-sub {
- flex: 1;
- text-align: center;
- font-size: $font-base;
- border-right: 1px solid #f0f0f0;
- &:last-of-type {
- border-right: 0;
- }
-
- }
- }
- }
- </style>
|