微信公众号内嵌网页

搭建微信公众号,点击 实现链接跳转
这里给出一些常用的插件地址
1.基础设置,通过一个js来调整分辨率,适配不同的手机尺寸
https://github.com/Velg03961485/web-weixin

设计师给的750的图 通过1rem : 100px 来调整

2.时间选择插件(底部轮播滑动)
https://github.com/Velg03961485/phone-select-date

通过引入插件 在js中调用 时间选择对象来实现

3.提示框插件
https://github.com/Velg03961485/layer-of-phone-hint

通过引入外部js ,直接调用方法就能实现 页面弹框提醒
layer.msg(“”)

4.自定义选择
这个插件需要严格的数据格式要求,在传入数据的时候,最好重新组装一下数据结构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$.ajax({ 
type: "POST",
url: "/web/depart/getChildrenStore",
success:function(data){

for(var i=0;i<data.length;i++){
parm.push({
'id':data[i].id,
'value':data[i].name
})
}
//门店选择
var weekdayArr=parm;
var mobileSelect1 = new MobileSelect({
trigger: '#storeModel',
title: '请选择',
wheels: [
{data: weekdayArr}
],
position:[0], //初始化定位 打开时默认选中的哪个 如果不填默认为0
transitionEnd:function(indexArr, data){
// console.log(data); }, callback:function(indexArr, data){ id=data[0].id; $('.select').css('color','black'); } }); }, error:function(data){

}
})

你也可以用这个插件来实现省市级县 联动

5.缓加载demo

https://github.com/Velg03961485/postpone-load-demo

$(‘body’).mLoading(“show”) 加载demo显现

$(‘body’).mLoading(“hide”) 加载demo隐藏