Commit 52d982d9 authored by Mac's avatar Mac

1

parent 92111a25
......@@ -9,7 +9,7 @@
<text class="small"></text>
<text>{{ goodprice }}</text>
</view>
<view class="amount">库存 {{ goodamount }} {{ g.unit }}</view>
<view class="amount">{{g.form_id ==1?'余位':'库存'}} {{ goodamount }} {{ g.unit }}</view>
<view class="sku">{{ skuObj ? '已选择' : '选择' }} {{ sku }}</view>
<view class="sku_close">
<u-icon name="cross" color="#9F9F9F" @click="cloGood()" size="40" />
......@@ -35,15 +35,15 @@
<text class="label">购买数量</text>
<u-number-box :disabled="!skuObj" v-model="gc" :min="1" :max="goodamount" @change="valChange"></u-number-box>
</view>
<!-- <view class="btn-box" v-if="g.totalStock>0&& g.status==1">
<view class="btn-box" v-if="g.totalStock>0&& g.status==1 && (g.form_id == -1 || g.form_id ==0)">
<view style="flex: 1;" v-if="optionType != 1">
<u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button>
</view>
<view style="flex: 1;" v-if="optionType != 0">
<u-button @click="buy" :ripple="true" :hair-line="false" :custom-style="btn2">立即购买</u-button>
</view>
</view> -->
<view class="btn-box" v-if="g.totalStock>0&& g.status==1">
</view>
<view class="btn-box" v-if="g.totalStock>0&& g.status==1 && g.form_id ==1">
<view style="flex: 1;">
<u-button :ripple="true" :hair-line="false" :custom-style="btn4" @click='signup'>立即报名</u-button>
</view>
......
......@@ -213,6 +213,8 @@
"path": "order-submit"
},{
"path":"education-submit"
},{
"path":"education-success"
}
]
},
......
<template>
<view class="actionsheet" :style="{ 'padding-bottom': bian ? '28px' : '0px' }">
<view class="item" style="width:36px;" @click="goCart">
<view class="item" style="width:36px;" @click="goCart" v-if="formid!=1">
<view style="width: 22px; margin: auto;"><u-icon name="cart-o" size="44" :color="mc"></u-icon></view>
<text class="text" :style="{ color: mc }">购物车</text>
</view>
<view class="item">
<view class="item" v-if="formid!=1">
<view style="width: 22px; margin: auto;"><u-icon name="chat-o" size="44" color="#333"></u-icon></view>
<text class="text">客服</text>
<button open-type="contact" :send-message-title="goodName" :send-message-path="path" :send-message-img="g.coverPic" :show-message-card="true">0</button>
</view>
<view class="item" @click="setFavorite">
<view class="item" @click="setFavorite" v-if="formid!=1">
<view style="width: 22px; margin: auto;"><u-icon :name="favorStatus ? 'like' : 'like-o'" size="44" :color="favorStatus ? mc : '#333'"></u-icon></view>
<text class="text">收藏</text>
</view>
<view class="item2" v-if="totalStock>0 && status==1">
<view class="item2" v-if="totalStock>0 && status==1 && formid!=1">
<view style="flex: 1;"><u-button @click="joinCar" :ripple="true" :hair-line="false" :custom-style="btn1">加入购物车</u-button></view>
<view style="flex: 1;"><u-button @click="buy" :ripple="true" :hair-line="false" :custom-style="btn2">立即购买</u-button></view>
</view>
<view class="item2" v-if="totalStock>0 && status==1 && formid==1" @click='buy'>
<view style="flex: 1;" ><u-button :ripple="true" :hair-line="false" :custom-style="btn4">立即报名</u-button></view>
</view>
<view class="item2" v-if="totalStock==0 ">
<view style="flex: 1;" ><u-button :ripple="true" :hair-line="false" :custom-style="btn3">售馨</u-button></view>
</view>
......@@ -30,7 +33,7 @@
<script>
import auth from "@/components/auth/index";
export default {
props: ['coverPic', 'goodName', 'favorite', 'goodId','totalStock','status'],
props: ['coverPic', 'goodName', 'favorite', 'goodId','totalStock','status','formid'],
data() {
return {
mc: '',
......@@ -54,6 +57,15 @@ export default {
fontSize: '13px',
width: '100%'
},
btn4: {
flex: 1,
height: '100%',
borderRadius: '40px',
border: 'none',
color: '#FFF',
fontSize: '13px',
width: '100%'
},
btn3: {
flex: 1,
height: '100%',
......@@ -80,6 +92,7 @@ export default {
this.bian = this.$utils.is_biang;
this.btn1.background = this.fu;
this.btn2.background = this.mc;
this.btn4.background = this.mc;
this.getfu()
let t = getCurrentPages();
let u = uni.getStorageSync("mall_UserInfo");
......
......@@ -92,8 +92,14 @@
<u-tag v-if='g.price_min!=g.original_price' text="心动价" mode="light" size='mini' type="error" style='font-size: 12px;font-family: aa;margin-right: 10px;'/>
<text class="small"></text>
<text
class="numfont"
>{{ g.price_min == g.price_max ? g.price_min : g.price_min + '-' + g.price_max }}</text>
class="numfont" v-if="g.form_id!=1"
>
{{ g.price_min == g.price_max ? g.price_min : g.price_min + '-' + g.price_max }}
</text>
<text class="numfont" v-if="g.form_id==1">
{{ g.price_min }}
</text>
<text class="small" v-if="g.form_id==1"></text>
</view>
<!-- TODO is_common_user_member_price 普通用户会员价 -->
<!-- TODO is_member_user_member_price 会员用户会员价 -->
......@@ -277,6 +283,7 @@
:good-id="id"
:total-stock="g.totalStock"
:status="g.status"
:formid='g.form_id'
@joincar="joinCar"
@buy="buy"
></goodsaction>
......
......@@ -292,12 +292,13 @@
let form = {};
form.Consignee = that.adressInfo.Consignee;
form.Mobile = that.adressInfo.Mobile;
form.Province = that.adressInfo.Province;
form.City = that.adressInfo.City;
form.District = that.adressInfo.District;
form.ShoppingAddress = that.adressInfo.ShoppingAddress;
form.VersionSource = 1;
form.Province = 0;
form.City = 0;
form.District = 0;
form.ShoppingAddress = '';
form.BuyerMessage = that.BuyerMessage;
form.DeliveryMethod = that.formdata.DeliveryMethod;
form.DeliveryMethod = 2;
form.DetailList = that.DetailList;
form.User_Coupon_Id = that.formdata.User_Coupon_Id;
form.CouponMoney = that.couponPrice;
......@@ -317,25 +318,7 @@
},
res => {
if (res.resultCode == 1) {
if (that.checked == true) {
that.zhaoren = true;
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
let Up = u.UserPageType ? u.UserPageType : 0;
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
if (SmallShopId == 0) {
//如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId ? u.UserSmallShopId : 0;
}
that.path = '/pages/index/index?OrderId=' + res.data.OrderId + "&user_id=" + uid + "&Up=" + Up +
"&SmallShopId=" + SmallShopId + '&JumpType=4';
console.log(that.path)
} else {
that.payBtn = true;
that.payInfo.OrderId = res.data.OrderId;
that.payInfo.total_price = that.ds.total_price;
}
} else {
that.$refs.uToast.show({
......
<template>
</template>
<script>
</script>
<style>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment