Commit 92247613aa8ee7c6fe539252794b19c089688509

Authored by vking
1 parent 10edd02a

feedback

... ... @@ -135,7 +135,8 @@
}
},
"usingComponents":{
"layout":"/components/layout"
"layout":"/components/layout",
"fb":"/components/common/feedback"
},
"debug": true,
"sitemapLocation": "sitemap.json"
... ...
// components/common/feedback.js
const mans=[
'oB-xJ5KJCIasaEdgMRckqoL1cwg8',
'oB-xJ5BjnTvdgQGLHsjioNHH0eE8',
'oB-xJ5MEi2mTMrBTiYImD9cpGH6o',
];
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
hasDispaly:false,
top:(Math.random()*70+10)
},
ready: function() {
let openid=wx.getStorageSync('customer_openid');
if(!openid) return;
if(mans.includes(openid)){
const logger =wx.getLogManager()
let consoleLog=console.log
console.log=function () {
consoleLog(...arguments)
logger.debug(...arguments)
}
this.setData({
hasDispaly:true
})
}
},
/**
* 组件的方法列表
*/
methods: {
}
})
... ...
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<!--components/common/feedback.wxml-->
<cover-view class="button-none feedback" wx:if="{{hasDispaly}}" style="top:{{top}}%">
<button class="button-none" open-type="feedback">反馈</button>
</cover-view>
... ...
/* components/common/feedback.wxss */
.feedback{
position: fixed;
right: 20rpx;
box-sizing: border-box;
width: 80rpx;
height: 80rpx;
top:50%;
background-color: rgba(200,0,0,0.2);
z-index: 9999;
padding: 0;
line-height: 80rpx;
border-radius: 50%;
}
.button-none{
box-sizing: border-box;
width: 80rpx;
height: 80rpx;
background-color: rgba(200,0,0,0.2);
color: #fefefe;
font-size: 24rpx;
font-weight: bold;
border-radius: 50%;
line-height: 80rpx;
padding: 0;
}
\ No newline at end of file
... ...
... ... @@ -222,4 +222,5 @@
<view class="white-font font32r reserve-button flex-cc" catchtap="complete">选好了</view>
</view>
</view>
</layout>
\ No newline at end of file
</layout>
<fb></fb>
\ No newline at end of file
... ...