当前位置: 首页 > wzjs >正文

网站图片被盗连怎么办北京名片设计制作

网站图片被盗连怎么办,北京名片设计制作,教育培训网站案例,上海设计公司官网直接上图上代码吧 // login/login.js const app getApp() Page({/*** 页面的初始数据*/data: {},/*** 生命周期函数--监听页面加载*/onLoad(options) {},/*** 生命周期函数--监听页面初次渲染完成*/onReady() {},/*** 生命周期函数--监听页面显示*/onShow() {},/*** 生命周期函…

直接上图上代码吧

// login/login.js
const app = getApp()
Page({/*** 页面的初始数据*/data: {},/*** 生命周期函数--监听页面加载*/onLoad(options) {},/*** 生命周期函数--监听页面初次渲染完成*/onReady() {},/*** 生命周期函数--监听页面显示*/onShow() {},/*** 生命周期函数--监听页面隐藏*/onHide() {},/*** 生命周期函数--监听页面卸载*/onUnload() {},/*** 页面相关事件处理函数--监听用户下拉动作*/onPullDownRefresh() {},/*** 页面上拉触底事件的处理函数*/onReachBottom() {},/*** 用户点击右上角分享*/onShareAppMessage() {},handleClick({currentTarget}){let userType = currentTarget.dataset.type// debuggerapp.globalData.userType =  currentTarget.dataset.typeconst targetPath = userType === 'a' ? '/pages/person/home/home' : '/pages/company/gift/gift';wx.switchTab({ url: targetPath }); // 关键:跳转到Tab页}
})
<!--login/login.wxml-->
<text>login/login.wxml</text>
<view><button data-type="a" bind:tap="handleClick">登陆个人</button></view>
<view><button data-type="b" bind:tap="handleClick">登陆企业</button></view>

1,这是我的目录解构

开启自定义tabbar开关custom:true,

然后list需要把所有tabar页面都注册进去

// app.json{"pages": ["login/login","pages/person/home/home","pages/person/vip/vip","pages/person/person/person","pages/company/gift/gift","pages/company/mine/mine","pages/company/order/order"],"tabBar": {"custom": true,"color": "#7A7E83","selectedColor": "#3cc51f","borderStyle": "black","backgroundColor": "#ffffff","list": [{ "pagePath": "pages/person/home/home", "text": "首页"},{ "pagePath": "pages/person/vip/vip", "text": "会员"},{ "pagePath": "pages/person/person/person", "text": "个人中心"},{ "pagePath": "pages/company/gift/gift", "text": "礼品"},{ "pagePath": "pages/company/order/order", "text": "订单"},{ "pagePath": "pages/company/mine/mine", "text": "我的"}]},"window": {"backgroundTextStyle": "light","navigationBarBackgroundColor": "#fff","navigationBarTitleText": "WeChat","navigationBarTextStyle": "black"},"usingComponents": {}
}

2.自定义tabbar文件夹  custom-tab-bar

// custom-tab-bar/index.js
Component({data: {tabList: [],     // 根据用户类型动态设置activeIndex: 0   // 当前选中Tab},methods: {switchTab(e) {// const path = e.currentTarget.dataset.path;// const index = e.currentTarget.dataset.index;// wx.switchTab({ url: path });// this.setData({ activeIndex: index });const { path, index } = e.currentTarget.dataset;console.log(path)wx.switchTab({url: path,success: () => {console.log('跳转成功');this.setData({ activeIndex: index });},fail: (err) => {console.error('跳转失败:', err);}});},// 根据用户类型更新Tab列表updateTabList(userType) {const tabs = {a: [{ pagePath: "/pages/person/home/home", text: "首页"},{ pagePath: "/pages/person/vip/vip", text: "会员"},{ pagePath: "/pages/person/person/person", text: "个人中心"}],b: [{ pagePath: "/pages/company/gift/gift", text: "礼品"},{ pagePath: "/pages/company/order/order", text: "订单"},{ pagePath: "/pages/company/mine/mine", text: "我的"}]};this.setData({ tabList: tabs[userType] });}},
});
//index.json{"component": true
}
<!-- custom-tab-bar/index.wxml -->
<!-- <view class="tab-bar"><block wx:for="{{tabList}}" wx:key="index"><view class="tab-item {{activeIndex === index ? 'active' : ''}}" bindtap="switchTab"data-path="{{item.pagePath}}"data-index="{{index}}"><image src="{{activeIndex === index ? item.selectedIconPath : item.iconPath}}"></image><text>{{item.text}}</text></view></block>
</view> -->
<!-- custom-tab-bar/index.wxml -->
<cover-view class="tab-bar"><block wx:for="{{tabList}}" wx:key="index"><cover-view class="tab-item {{activeIndex === index ? 'active' : ''}}"bindtap="switchTab"data-path="{{item.pagePath}}"data-index="{{index}}"><cover-image class="tab-icon" src="{{activeIndex === index ? item.selectedIconPath : item.iconPath}}" /><cover-view class="tab-text">{{item.text}}</cover-view></cover-view></block>
</cover-view>
/* custom-tab-bar/index.wxss */
.tab-bar {position: fixed;bottom: 0;left: 0;right: 0;height: 100rpx; /* 高度与原生TabBar一致 */background: #ffffff;display: flex;align-items: center;justify-content: space-around;box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05); /* 顶部阴影 */z-index: 9999; /* 确保层级最高 */
}.tab-item {display: flex;flex-direction: column;align-items: center;justify-content: center;height: 100%;padding: 0 20rpx;
}.tab-icon {width: 48rpx;height: 48rpx;margin-bottom: 4rpx;
}.tab-text {font-size: 20rpx;color: #666666;
}/* 选中状态样式 */
.tab-item.active .tab-text {color: #007AFF; /* 主题色 */
}.tab-item.active .tab-icon {filter: brightness(0.8); /* 图标选中效果 */
}

3.自定义util

// util/changetab.js
const app = getApp()
module.exports = Behavior({methods: {updateTabBarIndex(index) {const userType = app.globalData.userType;const tabBar = this.getTabBar();if (tabBar) {tabBar.updateTabList(userType);tabBar.setData({ activeIndex: index })};}}
});

z最后在各个tabbar对于的页面的onshow中引入util方法

// pages/person/home/home.js
const changeTab = require('../../../util/changeTab')
Page({behaviors:[changeTab],/*** 页面的初始数据*/data: {},/*** 生命周期函数--监听页面显示*/onShow() {this.updateTabBarIndex(0); },/*** 生命周期函数--监听页面隐藏*/onHide() {},/*** 生命周期函数--监听页面卸载*/onUnload() {},/*** 页面相关事件处理函数--监听用户下拉动作*/onPullDownRefresh() {},/*** 页面上拉触底事件的处理函数*/onReachBottom() {},/*** 用户点击右上角分享*/onShareAppMessage() {}
})


文章转载自:

http://hp9vIWKS.gtmdq.cn
http://762yZIgA.gtmdq.cn
http://LCKYQm0x.gtmdq.cn
http://Dr9ehUCY.gtmdq.cn
http://oS3C1EVV.gtmdq.cn
http://apeADif0.gtmdq.cn
http://gtmJH2j9.gtmdq.cn
http://bVWlHk6F.gtmdq.cn
http://iouqnZEh.gtmdq.cn
http://xV0sr5o6.gtmdq.cn
http://VX3Q9RQB.gtmdq.cn
http://GvSeOjTn.gtmdq.cn
http://WXEwJqQf.gtmdq.cn
http://ll8EKpDw.gtmdq.cn
http://G2PibIka.gtmdq.cn
http://xnebBnbr.gtmdq.cn
http://zIxixczc.gtmdq.cn
http://EUWuphQd.gtmdq.cn
http://pek9mnIV.gtmdq.cn
http://mFyEtXPS.gtmdq.cn
http://hKsvCpAa.gtmdq.cn
http://HghT35pR.gtmdq.cn
http://8G53Vpo7.gtmdq.cn
http://3wIsHtZl.gtmdq.cn
http://5xoA2gBb.gtmdq.cn
http://HDZtvYBO.gtmdq.cn
http://dkwn7KLX.gtmdq.cn
http://k2mdRLhg.gtmdq.cn
http://JzCcLNq7.gtmdq.cn
http://v2TQS6HR.gtmdq.cn
http://www.dtcms.com/wzjs/638965.html

相关文章:

  • 刷赞抖音推广网站东营网站设计制作
  • 漯河网上商城网站建设做变性手术视频网站
  • 虚拟主机如何搭建网站宁晋网站建设
  • 四川门户网站建设管理规定网站后台管理代码
  • 金融网站建设案例wordpress插件重写
  • 清河做网站成都互联网营销师培训
  • 丹徒网站建设要多少钱企业网站建设费用记入什么科目
  • 开发小程序多少报价seo的基本步骤包括哪些
  • 电商网站有哪些官网html表白网页制作源码
  • 网页设计制作一个餐饮网站域名注册了后怎么建设网站
  • 网站建设与管理实践收获怎么写多久可以做网站
  • 扬州专业外贸网站建设推广h5商城网站建设
  • 微信如何做微商城网站建设简单的网页
  • 策勒网站建设wordpress标签404
  • 国企公司网站制作做电影下载网站好
  • 东台网站建设找哪家好下载百度卫星导航
  • 订阅号可以做网站么国家企业信息信用信息公示网址
  • 宁波网络推广方案公司推荐seo课程简介
  • 做网站用模版免费刷粉网站推广
  • 企业 网站 建设 规范怎么制作海报
  • 门户网站做做网站百度新闻源
  • 大连建设主管部门官方网站wordpress注册邮件
  • 摄影婚纱网站建设吉林品牌网站建设商家
  • 网站建设选择什么模式wordpress分录信息主题
  • 怎么在网上做公司的网站在哪里可以看免费的视频
  • 闸北区网站设计与制wordpress调整时间
  • 人和做网站网络营销专员是干嘛的
  • 装修队做网站个人网站域名备案步骤
  • 宁波规划建设局网站查域名138
  • 鹰潭律师网站建设怎么做网站页面免费的