Commit 90bff1235c9514c43150b4c19190981d83c8e76d

Authored by vking
1 parent b8b62949

客服

  1 +// components/tips/service.js
  2 +Component({
  3 + /**
  4 + * 组件的属性列表
  5 + */
  6 + properties: {
  7 +
  8 + },
  9 + lifetimes: {
  10 +
  11 + },
  12 + /**
  13 + * 组件的初始数据
  14 + */
  15 + data: {
  16 + disp:false,
  17 + animation:'',
  18 + },
  19 +
  20 + /**
  21 + * 组件的方法列表
  22 + */
  23 + methods: {
  24 + show(){
  25 + this.setData({
  26 + disp:true,
  27 + animation:'discountShow',
  28 + })
  29 + this.triggerEvent('event',{act:'show'})
  30 + },
  31 + hide(){
  32 + this.setData({
  33 + animation:'discountHide',
  34 + })
  35 + this.triggerEvent('event',{act:'hide'})
  36 + setTimeout(()=>{
  37 + this.setData({
  38 + disp:false,
  39 + })
  40 + },300)
  41 + },
  42 + call(){
  43 + this.triggerEvent('event',{act:'call'})
  44 + wx.makePhoneCall({
  45 + phoneNumber: '400-000-9690'
  46 + })
  47 + },
  48 + }
  49 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/tips/service.wxml-->
  2 +<view class="mask" bindtap="hide" wx:if="{{disp}}" style="z-index: 99999">
  3 + <view class="boost {{animation}}" catchtap="catchtap" wx:if="{{animation}}">
  4 + <view class="header flex-vc" bindtap="hide">
  5 + <view class="title">操作指引</view>
  6 + </view>
  7 + <view class="content" bindtap="hide">
  8 + <button class="item flex-ll button-none" open-type="contact">
  9 + <view class="iconx-view">
  10 + <view class="iconx iconx-msg"></view>
  11 + </view>
  12 + <view class="info">
  13 + <view class="info-title">周到安排在线客服</view>
  14 + <view class="info-desc">线上会话内容将被安全保护,推荐使用</view>
  15 + </view>
  16 + </button>
  17 + <button class="item flex-ll button-none" bindtap="call">
  18 + <view class="iconx-view">
  19 + <view class="iconx iconx-phone"></view>
  20 + </view>
  21 + <view class="info">
  22 + <view class="info-title">电话客服</view>
  23 + <view class="info-desc">400-000-9690</view>
  24 + </view>
  25 + </button>
  26 + </view>
  27 + <view class="cancle" bindtap="hide">取消</view>
  28 + </view>
  29 +</view>
  30 +<view bindtap="show"><slot></slot></view>
  1 +/* components/tips/service.wxss */
  2 +@import "../../app.wxss";
  3 +@keyframes discountShow
  4 +{
  5 + from {bottom: -586rpx;}
  6 + to {bottom: 0rpx;}
  7 +}
  8 +@keyframes discountHide
  9 +{
  10 + from {bottom: 0rpx;}
  11 + to {bottom: -586rpx;}
  12 +}
  13 +.boost{
  14 + width:100%;
  15 + height:586rpx;
  16 + background:rgba(255,255,255,1);
  17 + border-radius:40rpx 40rpx 0rpx 0rpx;
  18 + padding: 30rpx 40rpx;
  19 + box-sizing: border-box;
  20 + position: fixed;
  21 + bottom: 0;
  22 +}
  23 +.boost.discountShow{
  24 + animation: discountShow 0.6s;
  25 +}
  26 +.boost.discountHide{
  27 + animation: discountHide 0.6s;
  28 + bottom: -738rpx;
  29 +}
  30 +.title{
  31 + height:44rpx;
  32 + font-size:32rpx;
  33 + font-family:PingFangSC-Regular,PingFang SC;
  34 + font-weight:400;
  35 + color:rgba(51,51,51,1);
  36 + line-height:44rpx;
  37 +}
  38 +.content{
  39 + margin-top: 40rpx;
  40 +}
  41 +.item{
  42 + height: 178rpx;
  43 + border-bottom: 2rpx solid #F5F5F5;
  44 + box-sizing: border-box;
  45 + width: 100%;
  46 + display: flex;
  47 + display: -webkit-flex;
  48 + justify-content: flex-start;
  49 + align-items: center;
  50 + flex-direction: row;
  51 + -webkit-flex-direction: row;
  52 +}
  53 +.item:last-child{
  54 + border-bottom-width: 0;
  55 +}
  56 +.iconx-view{
  57 + width: 100rpx;
  58 + min-width: 100rpx;
  59 +}
  60 +.iconx{
  61 + background-size: 100% 100%;
  62 + width:40rpx;
  63 + height:40rpx;
  64 + /*margin-right: 60rpx;*/
  65 + /*margin-top: 69rpx;*/
  66 + min-width: 40rpx;
  67 +}
  68 +.iconx-msg{
  69 + background-image: url("http://nosqn.colorcun.com/icon-msg.png");
  70 +}
  71 +.iconx-phone{
  72 + background-image: url("http://nosqn.colorcun.com/icon-phone.png");
  73 +}
  74 +.info{
  75 + width: calc(100% - 100rpx);
  76 +}
  77 +.info-title{
  78 + height:48rpx;
  79 + font-size:34rpx;
  80 + font-family:PingFangSC-Regular,PingFang SC;
  81 + font-weight:400;
  82 + color:rgba(51,51,51,1);
  83 + line-height:48rpx;
  84 + text-align: left;
  85 +}
  86 +.info-desc{
  87 + height:40rpx;
  88 + font-size:28rpx;
  89 + font-family:PingFangSC-Regular,PingFang SC;
  90 + font-weight:400;
  91 + color:rgba(153,153,153,1);
  92 + line-height:40rpx;
  93 + margin-top: 10rpx;
  94 + text-align: left;
  95 +}
  96 +.cancle{
  97 + width:100%;
  98 + height:84rpx;
  99 + background:rgba(245,245,245,1);
  100 + border-radius:42rpx;
  101 + font-size:36rpx;
  102 + font-family:PingFangSC-Regular,PingFang SC;
  103 + font-weight:400;
  104 + color:rgba(102,102,102,1);
  105 + line-height:84rpx;
  106 + text-align: center;
  107 +}
@@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
16 "activity-enter":"/components/activity/enter", 16 "activity-enter":"/components/activity/enter",
17 "showModal":"/components/tips/showModal/showModal", 17 "showModal":"/components/tips/showModal/showModal",
18 "as-phone":"/components/actionSheet/phone", 18 "as-phone":"/components/actionSheet/phone",
19 - "seller-discount":"/components/reserve/seller/discount" 19 + "seller-discount":"/components/reserve/seller/discount",
  20 + "service":"/components/tips/service"
20 } 21 }
21 } 22 }
@@ -196,6 +196,7 @@ @@ -196,6 +196,7 @@
196 196
197 <view class="detail-info Medium tuiding"> 197 <view class="detail-info Medium tuiding">
198 <view class="flex-rr"> 198 <view class="flex-rr">
  199 + <service id="service"><view class="item">联系客服</view></service>
199 <view class="item" bindtap="callSeller">联系商家</view> 200 <view class="item" bindtap="callSeller">联系商家</view>
200 <navigator url="./cancel?id={{detail.id}}" 201 <navigator url="./cancel?id={{detail.id}}"
201 wx:if="{{(detail.hasRunning || detail.status==0) && checkout.status!=3}}" 202 wx:if="{{(detail.hasRunning || detail.status==0) && checkout.status!=3}}"
@@ -6,5 +6,5 @@ @@ -6,5 +6,5 @@
6 <view class="desc">请客订包间,就用周到安排</view> 6 <view class="desc">请客订包间,就用周到安排</view>
7 <button class="launchApp" 7 <button class="launchApp"
8 bindtap="gotoHome" 8 bindtap="gotoHome"
9 - open-type="launchApp" type="primary" app-parameter="wechat" binderror="launchAppError">打开APP</button> 9 + open-type="launchApp" type="primary" app-parameter="wechat" binderror="launchAppError">立即使用</button>
10 </view> 10 </view>