商品详情限购样式

master
santaner 11 months ago
parent 4afa523619
commit 3c08524e11
  1. 96
      pages/goods_details/applyPrice.vue
  2. 77
      pages/goods_details/index.vue
  3. 3
      pages/index/component/homeComb.vue
  4. 5
      pages/index/index.vue
  5. 15
      pages/news_details/index.vue

@ -0,0 +1,96 @@
<template>
<view>
<!-- 输入框示例 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="输入内容" value="对话框预置提示内容!"
placeholder="请输入内容" @confirm="dialogInputConfirm"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
export default {
props: {
specsInfo: {
type: Object,
default: () => {}
},
},
data() {
return {};
},
mounted() {},
methods: {
closeSpecs(){
this.$emit('myevent');
}
}
}
</script>
<style scoped lang="scss">
.specs{
position: fixed;
bottom: 0;
width: 100%;
left: 0;
background-color: #fff;
z-index: 280;
border-radius: 16rpx 16rpx 0 0;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
padding-bottom: 22rpx;
padding-bottom: calc(22rpx+ constant(safe-area-inset-bottom)); /// IOS<11.2/
padding-bottom: calc(22rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
.title{
font-size: 32rpx;
color: #282828;
text-align: center;
margin: 38rpx 0 36rpx 0;
position: relative;
font-weight: bold;
.iconfont{
position: absolute;
right: 30rpx;
top:0;
font-size: 36rpx;
font-weight: normal;
color: #999999;
}
}
.list{
height: 750rpx;
margin: 0 30rpx;
color: #999999;
overflow-x: hidden;
overflow-y: auto;
.item{
padding: 30rpx 0;
border-bottom: 1px solid #eee;
.name{
width: 160rpx;
margin-right: 10rpx;
word-break: break-all;
}
.val{
width: 510rpx;
word-break: break-all;
}
}
}
.bnt{
width: 690rpx;
height: 86rpx;
text-align: center;
line-height: 86rpx;
border-radius: 43rpx;
background-color: var(--view-theme);
font-size: 30rpx;
color: #fff;
margin: 0 auto;
}
}
.specs.on{
transform: translate3d(0, 0, 0);
}
</style>

@ -209,7 +209,32 @@
<navigator v-if="hide_mer_status != 1" :url="'/pages/store/home/index?id='+storeInfo.merchant.mer_id" class="link"
hover-class="none">进店</navigator>
</view>
<view class="score-wrapper">
<view class="score-wrapper" v-if="is_pre == 1">
<view class="item">
商品描述<text>{{storeInfo.merchant.product_score}}</text>
</view>
<view class="item">
卖家服务<text>{{storeInfo.merchant.service_score}}</text>
</view>
<view class="item">
物流服务<text>{{storeInfo.merchant.postage_score}}</text>
</view>
<view class="item">
限购总金额<text>{{pre_count}}</text>
</view>
<view class="item">
剩余额度<text>{{pre_num}}</text>
</view>
<view class="item">
<navigator class="item link" hover-class="none" @click="applyPrice()">申请额度</navigator>
</view>
</view>
<!-- <productWindow :attr="attr" :isShow='1' :iSplus='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @ChangeCartNum="ChangeCartNum" -->
<!-- @attrVal="attrVal" @iptCartNum="iptCartNum" id='product-window' :maxCount="max_count" :minCount="min_count" :svipPrice="svipPrice" :image="storeInfo.image"></productWindow> -->
<!-- <applyPrice></applyPrice> -->
<view class="score-wrapper" v-else>
<view class="item">
商品描述<text>{{storeInfo.merchant.product_score}}</text>
</view>
@ -427,6 +452,7 @@
import discountsGoods from './discountsGoods';
import ClipboardJS from "@/plugin/clipboard/clipboard.js";
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
// import applyPrice from '@/com'
let app = getApp();
export default {
components: {
@ -548,6 +574,11 @@
},
pay_type:4,
pay_image:[],
is_pre:'',
pre_count:'',
pre_used:'',
pre_num:'',
};
},
computed:{
@ -650,6 +681,25 @@
},
// #endif
methods: {
//
applyPrice: function(){
uni.showModal({
title: '申请额度',
content: '',
editable: true,
placeholderText:'请输入申请金额',
confirmText:'确定',
cancelText:'取消',
success: function (res) {
if (res.confirm) {
console.log(res.content);
} else if (res.cancel) {
console.log('取消');
}
}
});
},
call: function(){
uni.makePhoneCall({
//
@ -985,6 +1035,10 @@
that.$set(that, 'min_count', res.data.once_min_count);
that.$set(that, 'svipData', res.data.show_svip_info || null);
that.$set(that, 'svipPrice', res.data.show_svip_info && res.data.show_svip_info.show_svip_price || false);
that.$set(that, 'is_pre', res.data.is_pre);
that.$set(that, 'pre_count', res.data.pre_count);
that.$set(that, 'pre_used', res.data.pre_used);
that.$set(that, 'pre_num', res.data.pre_num);
that.$set(that.specsInfo, 'params', res.data.params);
uni.setNavigationBarTitle({
@ -1303,6 +1357,12 @@
title: '购买个数不能为0!'
})
}
// console.log(that.pre_used + parseFloat(that.attr.productSelect.price) + that.pre_num);
if (that.pre_used + parseFloat(that.attr.productSelect.price) + that.pre_num >= that.pre_count){
return that.$util.Tips({
title: '可购买额度不足,请申请额度'
})
}
let q = {
// productId: that.id,
// cartNum: that.attr.productSelect.cart_num,
@ -2238,6 +2298,7 @@
.score-wrapper {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-top: 30rpx;
.item {
color: #948D8C;
@ -2246,6 +2307,17 @@
margin-left: 10rpx;
color: var(--view-priceColor);
}
flex: 1 0 33.33%;
margin-bottom: 20rpx;
}
.link{
width: 160rpx;
height: 50rpx;
background-image: linear-gradient(-90deg, var(--view-bntColor21) 0%, var(--view-bntColor22) 100%);
border-radius: 25rpx;
color: #fff;
text-align: center;
line-height: 50rpx;
}
}
}
@ -2319,4 +2391,7 @@
}
}
}
::v-deep .uni-modal .uni-modal__textarea {
margin: 20rpx;
}
</style>

@ -338,6 +338,9 @@
</script>
<style lang="scss" scoped>
.header .serch-wrapper .logo{
display: none;
}
.page_count {
position: relative;
overflow: hidden;

@ -1111,6 +1111,7 @@ export default {
</style>
<style lang="scss" scoped>
.bnt1{
color: red;
}
@ -1757,4 +1758,8 @@ page {
font-size: 24rpx;
}
}
.header .serch-wrapper .logo{
display: none;
}
</style>

@ -86,7 +86,6 @@
history.back();
// #endif
}
shareArticle()
},
onShow: function() {
this.getArticleOne();
@ -123,10 +122,20 @@
imgUrl: this.articleInfo.image_input,
success: function() {
// shareArticle
this.shareArticle(this.articleInfo.id);
// this.shareArticle(this.articleInfo.id);
// conso.log('test')
}
};
this.$wechat.wechatEvevt(["updateAppMessageShareData", "updateTimelineShareData"], configAppMessage);
this.$wechat.wechatEvevt([
"updateAppMessageShareData",
"updateTimelineShareData"
], configAppMessage).then(res => {
this.shareArticle(this.articleInfo.id);
console.log('1');
}).catch(err => {
// console.log(err);
console.log('2');
});
}
}

Loading…
Cancel
Save