提交 9a8fc6e7 编写于 作者: G gongfuxiang

店铺客服、优惠券、门店客服优化

上级 ff28c1a5
......@@ -1080,10 +1080,10 @@ button[disabled].bg-grey {
* 客服
*/
.header-service {
width: 400rpx;
width: 430rpx;
left: 80rpx;
top: 210rpx;
z-index: 2;
top: 240rpx;
z-index: 10;
font-size: 24rpx;
-webkit-box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
box-shadow: 0 10px 10px rgb(0 0 0 / 30%);
......
......@@ -174,7 +174,7 @@
}
.card-right.failure {
background: #ffffff;
background: linear-gradient(95deg, #f8f8f8 0%, #e0dede 100%);
}
.card-info.failure {
......
......@@ -597,7 +597,7 @@
},
"detail": {
"detail": {
"324777": "To {shop. close_weekname}}, {shop. open-time}}-",
"324777": "To",
"455787": "recommendation",
"b4f3nw": "Activity products",
"ans2p4": "More activities",
......
......@@ -588,7 +588,7 @@
},
"detail": {
"detail": {
"324777": "至{{ shop.close_week_name }},{{ shop.open_time }}-",
"324777": "至",
"455787": "推荐",
"b4f3nw": "活动商品",
"ans2p4": "更多活动",
......
......@@ -19,10 +19,7 @@
<!-- 回到店铺 -->
<view v-if="(shop || null) != null" class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="bg-main br-main cr-white round dis-block text-size" type="default" hover-class="none" size="mini" @tap="shop_event" :data-value="shop.url">
<uni-icons type="shop" size="20" color="#fff" class="pa back-icon"></uni-icons>
<text class="va-m margin-left-xxxl">{{$t('index.index.i78v36')}}</text>
</button>
<button class="bg-white cr-main br-main round dis-block text-size" type="default" hover-class="none" @tap="shop_event" :data-value="shop.url">{{$t('index.index.i78v36')}}</button>
</view>
</view>
</scroll-view>
......
/**
* 领券中心
*/
.coupon-content .item {
padding: 0 24rpx 24rpx 24rpx;
}
.popup-bottom {
box-shadow: inset 0px 1px 3px 0px rgba(0, 0, 0, 0.08);
z-index: 2;
}
\ No newline at end of file
<template>
<view :class="theme_view">
<view class="page-bottom-fixed">
<view class="plugins-coupon-container">
<!-- 优惠劵列表 -->
<view v-if="data_list.length > 0" class="plugins-coupon-container padding-horizontal-main padding-top-main">
<block v-for="(item, index) in data_list" :key="index">
<view :class="'item border-radius-main bg-white spacing-mb ' + (item.is_operable == 0 ? 'item-disabled' : '')">
<view class="v-left fl">
<view class="base single-text" :style="'color:' + item.bg_color_value + ';'">
<text v-if="item.type == 0" class="symbol">{{ currency_symbol }}</text>
<text class="price">{{ item.discount_value }}</text>
<text class="unit">{{ item.type_unit }}</text>
<text v-if="(item.desc || null) != null" class="desc cr-grey">{{ item.desc }}</text>
</view>
<view v-if="(item.use_limit_type_name || null) != null" class="base-tips cr-base single-text text-size-xs">{{ item.use_limit_type_name }}</view>
</view>
<view class="v-right fr cp" @tap="coupon_receive_event" :data-index="index" :data-value="item.id" :style="'background:' + item.bg_color_value + ';'">
<text class="circle"></text>
<text>{{ item.is_operable_name }}</text>
</view>
</view>
</block>
<view v-if="data_list.length > 0" class="coupon-content bg-white pr padding-top-main page-bottom-fixed">
<view class="flex-col">
<block v-for="(item, index) in data_list" :key="index">
<component-coupon-card :propData="item" :propStatusType="item.status_type" :propStatusOperableName="item.status_operable_name" :propIndex="index" propIsProgress @call-back="coupon_receive_event"></component-coupon-card>
</block>
</view>
<!-- 结尾 -->
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
</view>
<view v-else>
<!-- 提示信息 -->
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
</view>
<!-- 结尾 -->
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
<!-- 回到店铺 -->
<view v-if="(shop || null) != null" class="bottom-fixed">
<view class="bottom-line-exclude">
<button class="bg-main br-main cr-white round dis-block" type="default" hover-class="none" size="mini" @tap="shop_event" :data-value="shop.url">
<view class="dis-inline-block va-m">
<uni-icons type="shop" size="16" color="#fff"></uni-icons>
</view>
<text class="va-m margin-left-sm">{{$t('index.index.i78v36')}}</text>
</button>
</view>
</view>
<!-- 回到店铺 -->
<view v-if="(shop || null) != null" class="popup-bottom bottom-fixed bg-white">
<view class="bottom-line-exclude">
<button class="bg-white cr-main br-main round dis-block text-size" type="default" hover-class="none" :data-value="shop.url" @tap="shop_event">{{$t('index.index.i78v36')}}</button>
</view>
</view>
</view>
......@@ -46,7 +27,8 @@
<script>
const app = getApp();
import componentNoData from '@/components/no-data/no-data';
import componentBottomLine from '@/components/bottom-line/bottom-line';
import componentBottomLine from '@/components/bottom-line/bottom-line';
import componentCouponCard from '@/components/coupon-card/coupon-card.vue';
export default {
data() {
......@@ -70,7 +52,8 @@
components: {
componentNoData,
componentBottomLine,
componentBottomLine,
componentCouponCard
},
props: {},
......@@ -184,63 +167,57 @@
});
},
// 优惠劵领取事件
coupon_receive_event(e) {
if (!app.globalData.is_single_page_check()) {
return false;
}
// 参数处理
if ((e || null) == null) {
var index = this.temp_coupon_receive_index;
var value = this.temp_coupon_receive_value;
} else {
var index = e.currentTarget.dataset.index;
var value = e.currentTarget.dataset.value;
this.setData({
temp_coupon_receive_index: index,
temp_coupon_receive_value: value,
});
}
// 登录校验
var user = app.globalData.get_user_info(this, 'coupon_receive_event');
if (user != false) {
var temp_list = this.data_list;
if (temp_list[index]['is_operable'] != 0) {
uni.showLoading({
title: this.$t('common.processing_in_text'),
});
uni.request({
url: app.globalData.get_request_url('receive', 'coupon', 'coupon'),
method: 'POST',
data: {
coupon_id: value,
},
dataType: 'json',
success: (res) => {
uni.hideLoading();
if (res.data.code == 0) {
app.globalData.showToast(res.data.msg, 'success');
if (this.data_base != null && this.data_base.is_repeat_receive != 1) {
temp_list[index]['is_operable'] = 0;
temp_list[index]['is_operable_name'] = this.$t('shop.shop.4q9oe2');
this.setData({
data_list: temp_list,
});
}
} else {
if (app.globalData.is_login_check(res.data, this, 'coupon_receive_event')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.hideLoading();
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
}
}
// 优惠劵领取事件
coupon_receive_event(index, value) {
if (!app.globalData.is_single_page_check()) {
return false;
}
// 参数处理
if ((index || null) == null && (value || null) == null) {
var index = this.temp_coupon_receive_index;
var value = this.temp_coupon_receive_value;
} else {
this.setData({
temp_coupon_receive_index: index,
temp_coupon_receive_value: value,
});
}
// 登录校验
var user = app.globalData.get_user_info(this, 'coupon_receive_event');
if (user != false) {
var temp_list = this.data_list;
if (temp_list[index]['is_operable'] != 0) {
uni.showLoading({
title: this.$t('common.processing_in_text'),
});
uni.request({
url: app.globalData.get_request_url('receive', 'coupon', 'coupon'),
method: 'POST',
data: {
coupon_id: value,
},
dataType: 'json',
success: (res) => {
uni.hideLoading();
if (res.data.code == 0) {
app.globalData.showToast(res.data.msg, 'success');
temp_list[index] = res.data.data.coupon;
this.setData({
data_list: temp_list,
});
} else {
if (app.globalData.is_login_check(res.data, this, 'coupon_receive_event')) {
app.globalData.showToast(res.data.msg);
}
}
},
fail: () => {
uni.hideLoading();
app.globalData.showToast(this.$t('common.internet_error_tips'));
},
});
}
}
},
// 店铺事件
......@@ -255,4 +232,6 @@
},
};
</script>
<style></style>
<style>
@import './shop.css';
</style>
......@@ -146,7 +146,7 @@ page {
.header-service {
left: auto;
right: 24rpx;
top: 382rpx;
top: 246rpx;
}
/**
......
......@@ -90,7 +90,7 @@
<!-- 在线客服 -->
<view v-if="header_service_status && (((data_base.is_service_info || 0) == 1 && (info.service_data || null) != null) || (info.chat_info || null) != null)" class="header-service pa border-radius-main oh bg-white br">
<view v-if="(info.chat_info || null) != null" class="item padding-main br-t single-text">
<view v-if="(info.chat_info || null) != null" class="item padding-main single-text">
<text class="va-m">{{$t('detail.detail.r4124d')}}</text>
<view class="dis-inline-block chat-info cp" @tap="chat_event">
<image class="dis-inline-block va-m" :src="info.chat_info.icon" mode="scaleToFill"></image>
......@@ -98,15 +98,15 @@
</view>
</view>
<block v-if="(info.service_data || null) != null">
<view v-if="(info.service_data.service_qq || null) != null" class="item padding-main br-t single-text">
<view v-if="(info.service_data.service_qq || null) != null" class="item padding-main br-t-f9 single-text">
<text>Q Q:</text>
<text class="cp" @tap="text_copy_event" :data-value="info.service_data.service_qq">{{ info.service_data.service_qq }}</text>
</view>
<view v-if="(info.service_data.service_tel || null) != null" class="item padding-main br-t single-text">
<view v-if="(info.service_data.service_tel || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('order.order.7dxbm5')}}</text>
<text class="cp" @tap="tel_event" :data-value="info.service_data.service_tel">{{ info.service_data.service_tel }}</text>
</view>
<view v-if="(info.service_data.service_weixin_qrcode || null) != null || (info.service_data.service_line_qrcode || null) != null" class="oh qrcode tc br-t padding-top-main">
<view v-if="(info.service_data.service_weixin_qrcode || null) != null || (info.service_data.service_line_qrcode || null) != null" class="oh qrcode tc br-t-f9 padding-top-main">
<view v-if="(info.service_data.service_weixin_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="info.service_data.service_weixin_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="info.service_data.service_weixin_qrcode"></image>
<view>{{$t('detail.detail.54k10s')}}</view>
......
......@@ -53,26 +53,26 @@
</view>
<!-- 在线客服 -->
<view v-if="header_service_status && ((data_base.is_service_info || 0) == 1 || (shop.chat_info || null) != null)" class="header-service pa border-radius-main oh bg-white br">
<view v-if="(shop.chat_info || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.chat_info || null) != null" class="item padding-main single-text">
<text class="va-m">{{$t('detail.detail.r4124d')}}</text>
<view class="dis-inline-block chat-info cp" @tap="chat_event">
<image class="dis-inline-block va-m" :src="shop.chat_info.icon" mode="scaleToFill"></image>
<text class="margin-left-sm va-m cr-blue" :data-value="shop.chat_info.chat_url">{{shop.chat_info.name}}</text>
</view>
</view>
<view v-if="(shop.service_qq || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.service_qq || null) != null" class="item padding-main br-t-f9 single-text">
<text>Q Q:</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.service_qq">{{shop.service_qq}}</text>
</view>
<view v-if="(shop.service_tel || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.service_tel || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('order.order.7dxbm5')}}</text>
<text class="cp" @tap="tel_event" :data-value="shop.service_tel">{{shop.service_tel}}</text>
</view>
<view v-if="(shop.open_week_name || null) != null && (shop.close_week_name || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.open_week_name || null) != null && (shop.close_week_name || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('article-detail.article-detail.728374')}}</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.open_week_name + $t('design.design.gv16tj') + shop.close_week_name + ',' + shop.open_time + '-' + shop.close_time">{{shop.open_week_name}}{{$t('design.design.882220')}}{{shop.close_time}}</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.open_week_name + $t('design.design.gv16tj') + shop.close_week_name + ',' + shop.open_time + '-' + shop.close_time">{{ shop.open_week_name }}{{$t('detail.detail.324777')}}{{ shop.close_week_name }}{{ shop.open_time }}-{{ shop.close_time }}</text>
</view>
<view v-if="(shop.service_weixin_qrcode || null) != null || (shop.service_line_qrcode || null) != null" class="oh qrcode tc br-t padding-top-main">
<view v-if="(shop.service_weixin_qrcode || null) != null || (shop.service_line_qrcode || null) != null" class="oh qrcode tc br-t-f9 padding-top-main">
<view v-if="(shop.service_weixin_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="shop.service_weixin_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="shop.service_weixin_qrcode"></image>
<view>{{$t('detail.detail.54k10s')}}</view>
......
......@@ -60,26 +60,26 @@
</view>
<!-- 在线客服 -->
<view v-if="header_service_status && ((data_base.is_service_info || 0) == 1 || (shop.chat_info || null) != null)" class="header-service pa border-radius-main oh bg-white br">
<view v-if="(shop.chat_info || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.chat_info || null) != null" class="item padding-main single-text">
<text class="va-m">{{$t('detail.detail.r4124d')}}</text>
<view class="dis-inline-block chat-info cp" @tap="chat_event">
<image class="dis-inline-block va-m" :src="shop.chat_info.icon" mode="scaleToFill"></image>
<text class="margin-left-sm va-m cr-blue" :data-value="shop.chat_info.chat_url">{{ shop.chat_info.name }}</text>
</view>
</view>
<view v-if="(shop.service_qq || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.service_qq || null) != null" class="item padding-main br-t-f9 single-text">
<text>Q Q:</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.service_qq">{{ shop.service_qq }}</text>
</view>
<view v-if="(shop.service_tel || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.service_tel || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('order.order.7dxbm5')}}</text>
<text class="cp" @tap="tel_event" :data-value="shop.service_tel">{{ shop.service_tel }}</text>
</view>
<view v-if="(shop.open_week_name || null) != null && (shop.close_week_name || null) != null" class="item padding-main br-t single-text">
<view v-if="(shop.open_week_name || null) != null && (shop.close_week_name || null) != null" class="item padding-main br-t-f9 single-text">
<text>{{$t('article-detail.article-detail.728374')}}</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.open_week_name + $t('design.design.gv16tj') + shop.close_week_name + ',' + shop.open_time + '-' + shop.close_time">{{ shop.open_week_name }}{{$t('detail.detail.324777')}}{{ shop.close_time }}</text>
<text class="cp" @tap="text_copy_event" :data-value="shop.open_week_name + $t('design.design.gv16tj') + shop.close_week_name + ',' + shop.open_time + '-' + shop.close_time">{{ shop.open_week_name }}{{$t('detail.detail.324777')}}{{ shop.close_week_name }}{{ shop.open_time }}-{{ shop.close_time }}</text>
</view>
<view v-if="(shop.service_weixin_qrcode || null) != null || (shop.service_line_qrcode || null) != null" class="oh qrcode tc br-t padding-top-main">
<view v-if="(shop.service_weixin_qrcode || null) != null || (shop.service_line_qrcode || null) != null" class="oh qrcode tc br-t-f9 padding-top-main">
<view v-if="(shop.service_weixin_qrcode || null) != null" class="item padding-bottom-lg dis-inline-block">
<image class="radius cp" :src="shop.service_weixin_qrcode" mode="scaleToFill" @tap="image_show_event" :data-value="shop.service_weixin_qrcode"></image>
<view>{{$t('detail.detail.54k10s')}}</view>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册