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

国家信息企业公示网官网登录入口seo优化主要工作内容

国家信息企业公示网官网登录入口,seo优化主要工作内容,谷歌外贸网站seo怎么做,pc手机模板网站建设1.tt.showModal后跳转页面 跳转路径要为绝对路径,相对路径跳转无响应。 2.手机息屏后将不再进入onload()生命周期,直接进入onshow()生命周期。 onLoad()在页面初始化的时候触发,一个页面只调用一次。 onShow()在切入前台时就会触发&#x…

1.tt.showModal后跳转页面

 跳转路径要为绝对路径,相对路径跳转无响应。

2.手机息屏后将不再进入onload()生命周期,直接进入onshow()生命周期。

onLoad()在页面初始化的时候触发,一个页面只调用一次。

onShow()在切入前台时就会触发,手机息屏后再打开将会直接进入onShow()生命周期,如果是onLoad()处理传参问题可以先保存在app.js里,然后在onShow()里重新赋值。

示例timer:

app.js文件

App({onLaunch: async function () {tt.clearStorage();},onShow: function () {//当小程序进入后台或者返回前台的时候,给这两个值变为1,用来告诉页面,刚才的切换是前后台切换,不是页面切换,不用上报页面停留时间//里面的firstIn表示是不是第一次进入小程,因为第一次进入的时候也会触发onShow(相当于从后台切换到前台了),要把这个也排除在外。默认是第一次进入,进入之后就把这个值置为0if (this.globalData.firstIn) {this.globalData.firstIn = 0;} else {this.globalData.onShow = 1;}},onHide() {this.globalData.onHide = 1;},onunload(){this.globalData.onUnload = 1;},// 页面切换计算时间globalData: {firstIn: 1,onShow: 0,onHide: 0,onUnload:0},token: "",keyword: void 0,/*** 用户信息*/userInfo: void 0,/*** 顶部导航栏区域数据*/navigationBarSafeArea: void 0,/*** 手机系统*/model: false,/*** top+height*/height: "",topMargin: "",topAndHeight: "",/*** 答题类型 1: 强条,2: 知识竞赛,3: 总包 4: 每月答题*/answerType: void 0,timer:void 0, // 答题时间/*** 竞赛答题时间*/competitionTime: 60 * 60,/*** 竞赛答题时间显示*/competitionTimeStr: "01:00:00",
});

 index.js

  /*** 生命周期函数--监听页面加载*/onLoad: function (options) {// this.setData({//   timerDateStr: "00:00",// });if (options) {console.log('考试options', options);this.setData({paperClientFilterVo:JSON.parse(options.paperClientFilterVo),competitionTime:options.limitTime,competitionTime1:options.limitTime,},() => {console.log('单个页面传参',this.data.paperClientFilterVo);this.getExaminationDetail(); // 总包答题});app.timer = Number(options.limitTime)}},/*** 生命周期函数--监听页面显示*/onShow: function () {this.setData({timer: app.timer})}

 onLoad()传值,onShow赋值。

3.reLaunch()

关闭所有当前页面,打开指定页面。所以页面不能回退,一般跳转toolBar会用

4.navigateTo()

跳转到指定页面。跳转后原页面保留。使用 tt.navigateBack 可以返回到原页面。小程序中页面栈最多十层。

5.图片放大预览

首先飞书小程序图片预览只支持全路径预览

eg://http:192.168.2.38/file/balabala.png

这次处理的业务是富文本中的图片预览放大

  // 点击放大预览图片函数catchImage(){tt.previewImage({current: this.data.imgArr[0], // 当前显示图片的http链接urls: this.data.imgArr // 需要预览的图片http链接列表})},/*** 设置答题详情(总包目前不做)*/setQuestionDetail: function (detail) {this.setData({ isAnswer: false }); //还原成未答题的模式this.setData({//设置题目currentExamination: detail,});this.setData({questionType:detail.type == 1? "单选题": detail.type == 2? "多选题": "判断题", //:1单选、2多选、3判断题});if (detail.title) {let title = detail.title;if (title.indexOf("src") >= 0) {const imgs = [];title.replace(/]*src=['"]([^'"]+)[^>]*>/gi, function (match, capture) {imgs.push(capture);});}title = title.replace(new RegExp('<img src="/file/', "g"), `<img style="max-width:100%;height:auto" src="${backendUrl}/file/`)this.setData({nodes: `<div style='text-align:left;white-space:pre-line;'><span style='text-align:left;line-height: 32px;height: 32px;font-size: 16px;font-family: PingFang SC-Regular, PingFang SC;font-weight: 400;color: #18191B;'>${title}</span></div>`,},() => {//console.log(this.data.nodes)});// 主要代码为后面预览图片准备let imgArr = [];let regex = new RegExp(/<img.*?(?:>|\/>)/gi); // 匹配所有图片let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i; // 匹配src图片let arrsImg = title.match(regex); // mycontent 后台返回的富文本数据if(arrsImg && arrsImg.length > 0){for (let i = 0; i < arrsImg.length; i++) {let srcs = arrsImg[i].match(srcReg);imgArr.push(srcs[1])}this.setData({imgArr})}const options = detail.options; //设置选项this.setData({optionsList: options,});this.getResultDetail();//解析}},

这里有一点要注意的是图片会超出屏幕,max-width:100%可控。

预览方法中的urls:需要是数组

 示例代码:

tt.previewImage({urls: ["https://sf3-scmcdn2-cn.feishucdn.com/ee/lark/open/web/static/app-banner.05b68b58.png","https://sf3-cn.feishucdn.com/obj/open-platform-opendoc/33e4ae2ff215314046c51ee1d3008d89_p1QpEy0jkK.png"],current: "https://sf3-cn.feishucdn.com/obj/open-platform-opendoc/33e4ae2ff215314046c51ee1d3008d89_p1QpEy0jkK.png",success(res) {console.log(JSON.stringify(res));},fail(res) {console.log(`previewImage fail: ${JSON.stringify(res)}`);}
});

文章转载自:
http://dinncodiphenoxylate.bkqw.cn
http://dinncoparadisiacal.bkqw.cn
http://dinncomedroxyprogesterone.bkqw.cn
http://dinncokarakule.bkqw.cn
http://dinncobullbat.bkqw.cn
http://dinncododunk.bkqw.cn
http://dinncolairdly.bkqw.cn
http://dinncojester.bkqw.cn
http://dinncowinded.bkqw.cn
http://dinncohakeem.bkqw.cn
http://dinncogreen.bkqw.cn
http://dinncosire.bkqw.cn
http://dinncophotocatalyst.bkqw.cn
http://dinncocentra.bkqw.cn
http://dinncocooperator.bkqw.cn
http://dinncoschizotype.bkqw.cn
http://dinncoivorian.bkqw.cn
http://dinncohans.bkqw.cn
http://dinncopolyphylesis.bkqw.cn
http://dinncoflabbily.bkqw.cn
http://dinncoswigger.bkqw.cn
http://dinncoanabaena.bkqw.cn
http://dinncoflamingo.bkqw.cn
http://dinncohautboy.bkqw.cn
http://dinncogentle.bkqw.cn
http://dinncobunghole.bkqw.cn
http://dinncoarchdeaconate.bkqw.cn
http://dinncorolleiflex.bkqw.cn
http://dinncostreetworker.bkqw.cn
http://dinncofunambulist.bkqw.cn
http://dinncoforgettable.bkqw.cn
http://dinncosphenoid.bkqw.cn
http://dinncoour.bkqw.cn
http://dinncoayd.bkqw.cn
http://dinncoantisexual.bkqw.cn
http://dinncoaicpa.bkqw.cn
http://dinncoimmediately.bkqw.cn
http://dinncozucchini.bkqw.cn
http://dinncotreasonous.bkqw.cn
http://dinncosteeplechase.bkqw.cn
http://dinnconeatness.bkqw.cn
http://dinncoconjunction.bkqw.cn
http://dinnconoisiness.bkqw.cn
http://dinncodachshund.bkqw.cn
http://dinncoilium.bkqw.cn
http://dinncogravesian.bkqw.cn
http://dinncotenterhook.bkqw.cn
http://dinncongoma.bkqw.cn
http://dinncoruderal.bkqw.cn
http://dinncounsoured.bkqw.cn
http://dinncodetrimental.bkqw.cn
http://dinncoprosodiacal.bkqw.cn
http://dinncoponton.bkqw.cn
http://dinncobattleground.bkqw.cn
http://dinncoproseminar.bkqw.cn
http://dinncohdd.bkqw.cn
http://dinncoosteitic.bkqw.cn
http://dinncowaterward.bkqw.cn
http://dinncoretransform.bkqw.cn
http://dinncoshard.bkqw.cn
http://dinncosanitationman.bkqw.cn
http://dinncotacheometry.bkqw.cn
http://dinncosystematism.bkqw.cn
http://dinncosweetback.bkqw.cn
http://dinncosugariness.bkqw.cn
http://dinncoaesthetically.bkqw.cn
http://dinncoequability.bkqw.cn
http://dinncobullace.bkqw.cn
http://dinncoprefatorial.bkqw.cn
http://dinncosheepmeat.bkqw.cn
http://dinncocondemn.bkqw.cn
http://dinncoatrip.bkqw.cn
http://dinncopreface.bkqw.cn
http://dinnconephropathy.bkqw.cn
http://dinncosepticize.bkqw.cn
http://dinncoconformability.bkqw.cn
http://dinncospiritualistic.bkqw.cn
http://dinncomonadelphous.bkqw.cn
http://dinncodayton.bkqw.cn
http://dinncodillydally.bkqw.cn
http://dinncolecher.bkqw.cn
http://dinncorepugnant.bkqw.cn
http://dinncovietnamese.bkqw.cn
http://dinncoextraartistic.bkqw.cn
http://dinncotechnicist.bkqw.cn
http://dinncodissimulation.bkqw.cn
http://dinncomegacephaly.bkqw.cn
http://dinncocompunction.bkqw.cn
http://dinncodiaphoneme.bkqw.cn
http://dinncodrip.bkqw.cn
http://dinncocutthroat.bkqw.cn
http://dinncotachygrapher.bkqw.cn
http://dinncoterebinth.bkqw.cn
http://dinncoinbred.bkqw.cn
http://dinncounderwriter.bkqw.cn
http://dinncoelbert.bkqw.cn
http://dinncosoper.bkqw.cn
http://dinncorancherie.bkqw.cn
http://dinncotachycardiac.bkqw.cn
http://dinncokunsan.bkqw.cn
http://www.dinnco.com/news/155567.html

相关文章:

  • 东洲网站建设营销咨询服务
  • 百度推广账号怎么申请百度seo还有前景吗
  • 做网站还是微信小程序百度助手免费下载
  • 建设银行网站 开户行怎么查询seo推广怎么做视频教程
  • 沈阳企业建站seo网站推广招聘
  • 网站续费百度竞价推广投放
  • 装饰公司网站php源码google play 安卓下载
  • wordpress 更新班级优化大师
  • 用javaweb做网站六种常见的网站类型
  • 企业名录2020企业黄页安卓系统优化app
  • 建站开始的前6个月多少外链最合适营销宣传策划方案
  • 陕西建设厅官网苏州企业网站关键词优化
  • 网上兼职做论坛版主 网站编辑百度竞价优化软件
  • 阿里个人网站企业网站推广的方法
  • 2017主流网站开发语言今天刚刚发生的新闻台湾新闻
  • wordpress乐趣公园缩略图不显示seo推广专员工作内容
  • 网站建设技术支持牛商网代理推广
  • b2b网站有什么企业网站建设需要多少钱
  • 各地农业信息网站的建设广州广告公司
  • 凡科网建站怎么样seo网站结构优化的方法
  • 可靠的网站建设案例微信营销方式
  • 儒枫网网站建设品牌营销咨询公司
  • 门户网站开发报价单2345网址导航官网官方电脑版
  • 邢台网站建设厂家如何进行网站的宣传和推广
  • 建设赌博网站百度大数据平台
  • 做酒店网站西地那非片的正确服用方法
  • 全屏的翻页网站这么做制作网页需要多少钱
  • mq网站开发搜客通
  • 怎么做赌博网站的代理肥城市区seo关键词排名
  • 东拼西凑网站谁做的百度搜索页面