Commit 98f4e4b4 by 程智春

vConsole

parent 32f5173f
......@@ -19,6 +19,10 @@
>{{this.$store.state.sceneModule.songCopyright.some(item=>item==shopInfo.shopCode)?'送颂科技提供技术支持':'小工蚁(上股交N板企业300258)提供平台服务'}}</p> -->
</div>
<div class="height7"></div>
<div class="hide-wrap" v-if="showHideWrap" @click="showActionSheet">
<i class="ant-fenlei-line" style="font-size:22px"></i>
</div>
</div>
</template>
......@@ -30,18 +34,82 @@ export default {
shopInfo: {
logoUrl:''
},
showVConsole : 0,
showHideWrap : false,
};
},
created(){
this.shopInfo = this.mpApp.globalData.shopInfo
this.shopInfo.logoUrl = DFSImg(this.shopInfo.logoUrl, 400, 400)
console.log(this.shopInfo,'mpapp123')
if(wx.getStorageSync('workBox')){
this.showHideWrap = true
}
},
onLoad() {
},
onShow(){
},
methods:{
showVConsoles(){
this.showVConsole++;
if (this.showVConsole >= 10) {
this.showVConsole=0;
wx.setStorageSync('workBox','1')
this.showHideWrap = true
}
},
showActionSheet(){
let vm = this
wx.showActionSheet({
itemList: ['复制页面路径', '隐藏工具箱'],
success (res) {
console.log(res.tapIndex)
if(res.tapIndex == 0){
vm.copyUrl()
}else if(res.tapIndex == 1){
vm.hideUtils()
}
},
fail (res) {
console.log(res.errMsg)
}
})
},
copyUrl(){
let pages = getCurrentPages()
let currentPage = pages[pages.length - 1]
let route = currentPage.route
let options = currentPage.options
console.log(route,options,'currentPage')
let query = ''
for(let attr in options){
query = attr + '=' + options[attr] + '&'
}
let href = '/' + route
if(query){
href += '?' + query
}
console.log(query)
wx.setClipboardData({
data: href,
success (res) {
}
})
},
hideUtils(){
this.showHideWrap = false
wx.removeStorageSync('workBox','1')
}
}
}
</script>
......@@ -84,4 +152,19 @@ export default {
height: 50px;
}
}
.hide-wrap{
width: 40px !important;
height: 40px;
border-radius: 50%;
background-color: white;
position: fixed;
bottom: 100px;
right: 20px;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 5px;
font-size: 20px;
}
</style>
......@@ -50,9 +50,14 @@ export default {
onLoad(options) {
let ss = wx.getStorageSync("sessionid");
this.ss = ss ? `&sessionid=${ss}` : "";
if (!ss) {
this.params += this.params.includes("logOut") ? "" : "&logOut=true";
}
if(wx.getStorageSync("workBox")){
this.params += `&workBox=${wx.getStorageSync("workBox")}`
}
// tabbar 跳转
let homeIndex = checkTabbarPage("/");
homeIndex != 0 && homeIndex == this.index && (this.index = 0);
......
......@@ -77,8 +77,14 @@ export default {
},
onLoad(options) {
this.options = options;
Object.assign(this.$data, this.$options.data());
if(wx.getStorageSync("workBox")){
this.params += `&workBox=${wx.getStorageSync("workBox")}`
}
let op=wx.getStorageSync("openid")
if (op) {
this.params += '&open_id='+wx.getStorageSync("openid");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment