摘要: 一.字符串: 1、多行字符串,使用双撇号进行换行`hello hello` 2、字符串模板(引用变量)。 var a = 5console.log(`${a}`); 3、自动拆分字符串(字符串模板调用方法test,自动将模板里字符拆分为第一个变量template,整个模板的表达式会被拆分成一个数组, 阅读全文
posted @ 2019-11-22 09:48 旧崖 阅读(819) 评论(0) 推荐(0) 编辑
摘要: 使用jsonp来处理跨域 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, input 阅读全文
posted @ 2019-11-20 14:07 旧崖 阅读(883) 评论(0) 推荐(0) 编辑
摘要: 使用jQuery脚本来简化请求 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, in 阅读全文
posted @ 2019-11-20 14:04 旧崖 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 以json格式传输数据 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, input, 阅读全文
posted @ 2019-11-20 14:02 旧崖 阅读(2495) 评论(0) 推荐(0) 编辑
摘要: 基础请求以xml格式传输数据 <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Demo</title> <style> body, inp 阅读全文
posted @ 2019-11-20 14:00 旧崖 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 第一种写法 //引入NODE核心模块 var http = require('http'); var data = require('./data.json'); //创建一个服务器对象 var server = http.createServer(); // 启动http服务并设置端口 serve 阅读全文
posted @ 2019-11-20 10:05 旧崖 阅读(382) 评论(0) 推荐(0) 编辑
摘要: var a = '135去测试不去测试,测试又测试' a.replace(/\u6d4b\u8bd5/g,'你好') ==> "135去你好不去你好,你好又你好" 上文对测试两字进行替换,使用replace方式时需要对中文进行unicode转码 =>http://tool.chinaz.com/to 阅读全文
posted @ 2019-11-15 14:21 旧崖 阅读(319) 评论(0) 推荐(0) 编辑
摘要: state数据 this.state = { //搜索内容字段 searchItem: { orderId: '', phoneNum: '', goodsname: '', }, // 订单列表内容 tabList: [ { name: '全部' }, { name: '待付款' }, { nam 阅读全文
posted @ 2019-11-15 13:57 旧崖 阅读(2055) 评论(0) 推荐(0) 编辑
摘要: import React from 'react' //引入react //创建组件FreightRules class FreightRules extends React.Component<any,any>{ //创建初始字段 //创建文本内容 render(){ return( <div> 1111 </div> ) } } export default FreightRules; //导 阅读全文
posted @ 2019-11-01 11:13 旧崖 阅读(1674) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> document.getElementsByTagName("html")[0].style.fontSize = 100 / 750 * window.screen.width + "px"; </script> 阅读全文
posted @ 2019-10-09 18:45 旧崖 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1.复制功能可以参照官方文档, 2.背景颜色渐变实现 -->wxml -->wxss 阅读全文
posted @ 2019-08-28 12:47 旧崖 阅读(1379) 评论(0) 推荐(0) 编辑
摘要: 1.在标签里传递ID 2.js下载方法 阅读全文
posted @ 2019-08-28 12:38 旧崖 阅读(5417) 评论(0) 推荐(0) 编辑
摘要: 函数节流(throttle):函数在一段时间内多次触发只会执行第一次,在这段时间结束前,不管触发多少次也不会执行函数。 1.添加utils.js文件 2.在需要使用的页面引入utils.js 使用 阅读全文
posted @ 2019-08-28 12:34 旧崖 阅读(1184) 评论(0) 推荐(0) 编辑
摘要: 直接使用{{**|formatTime}} 阅读全文
posted @ 2019-08-02 12:25 旧崖 阅读(664) 评论(0) 推荐(0) 编辑
摘要: +'&t='+new Date().getTime() 阅读全文
posted @ 2019-07-30 18:36 旧崖 阅读(1522) 评论(0) 推荐(0) 编辑
摘要: 1.创建一个空的文件 2.在文件夹里放置web-view 3.在js里接收传递过来的链接 4.在要跳转的页面里的标签添加点击方法 5.定义点击方法 阅读全文
posted @ 2019-07-20 12:04 旧崖 阅读(10591) 评论(0) 推荐(1) 编辑
摘要: success: function(res) { let goodslist = that.data.page == 1 ? [] : that.data.goodslist; let page = res.data.result.length <= 0 ? that.data.page : ++that.data.page; goodslis... 阅读全文
posted @ 2019-07-03 15:07 旧崖 阅读(428) 评论(0) 推荐(0) 编辑
摘要: 说明: 1.使用过滤器 wxml wxs过滤器 第二种 直接在请求接口时循环判断 阅读全文
posted @ 2019-06-27 18:25 旧崖 阅读(13334) 评论(0) 推荐(1) 编辑
摘要: height: calc(100% - 75rpx - 1rpx); 阅读全文
posted @ 2019-06-27 13:59 旧崖 阅读(293) 评论(0) 推荐(0) 编辑