Commit 92247613aa8ee7c6fe539252794b19c089688509

Authored by vking
1 parent 10edd02a

feedback

@@ -135,7 +135,8 @@ @@ -135,7 +135,8 @@
135 } 135 }
136 }, 136 },
137 "usingComponents":{ 137 "usingComponents":{
138 - "layout":"/components/layout" 138 + "layout":"/components/layout",
  139 + "fb":"/components/common/feedback"
139 }, 140 },
140 "debug": true, 141 "debug": true,
141 "sitemapLocation": "sitemap.json" 142 "sitemapLocation": "sitemap.json"
  1 +// components/common/feedback.js
  2 +const mans=[
  3 + 'oB-xJ5KJCIasaEdgMRckqoL1cwg8',
  4 + 'oB-xJ5BjnTvdgQGLHsjioNHH0eE8',
  5 + 'oB-xJ5MEi2mTMrBTiYImD9cpGH6o',
  6 +];
  7 +Component({
  8 + /**
  9 + * 组件的属性列表
  10 + */
  11 + properties: {
  12 +
  13 + },
  14 +
  15 + /**
  16 + * 组件的初始数据
  17 + */
  18 + data: {
  19 + hasDispaly:false,
  20 + top:(Math.random()*70+10)
  21 + },
  22 + ready: function() {
  23 + let openid=wx.getStorageSync('customer_openid');
  24 + if(!openid) return;
  25 + if(mans.includes(openid)){
  26 + const logger =wx.getLogManager()
  27 + let consoleLog=console.log
  28 + console.log=function () {
  29 + consoleLog(...arguments)
  30 + logger.debug(...arguments)
  31 + }
  32 + this.setData({
  33 + hasDispaly:true
  34 + })
  35 + }
  36 + },
  37 + /**
  38 + * 组件的方法列表
  39 + */
  40 + methods: {
  41 +
  42 + }
  43 +})
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
  1 +<!--components/common/feedback.wxml-->
  2 +<cover-view class="button-none feedback" wx:if="{{hasDispaly}}" style="top:{{top}}%">
  3 + <button class="button-none" open-type="feedback">反馈</button>
  4 +</cover-view>
  1 +/* components/common/feedback.wxss */
  2 +.feedback{
  3 + position: fixed;
  4 + right: 20rpx;
  5 + box-sizing: border-box;
  6 + width: 80rpx;
  7 + height: 80rpx;
  8 + top:50%;
  9 + background-color: rgba(200,0,0,0.2);
  10 + z-index: 9999;
  11 + padding: 0;
  12 + line-height: 80rpx;
  13 + border-radius: 50%;
  14 +}
  15 +.button-none{
  16 + box-sizing: border-box;
  17 + width: 80rpx;
  18 + height: 80rpx;
  19 + background-color: rgba(200,0,0,0.2);
  20 + color: #fefefe;
  21 + font-size: 24rpx;
  22 + font-weight: bold;
  23 + border-radius: 50%;
  24 + line-height: 80rpx;
  25 + padding: 0;
  26 +}
@@ -222,4 +222,5 @@ @@ -222,4 +222,5 @@
222 <view class="white-font font32r reserve-button flex-cc" catchtap="complete">选好了</view> 222 <view class="white-font font32r reserve-button flex-cc" catchtap="complete">选好了</view>
223 </view> 223 </view>
224 </view> 224 </view>
225 -</layout>  
  225 +</layout>
  226 +<fb></fb>