【干货】封装你的网站成为一个APP!
封装网站做一个APP,百度一下,网络上有很多类似的在线封装,但是无一例外都要钱。虽然价格在100~688不等,但对于我这个白嫖党来说,一分钱都是不必要的。私以为,既然是封装APP这么没技术的东西,为什么要收钱呢?所以今天和大家讲解一下如何封装你的网站成为一个APP!<br /><img id="aimg_B2M2N" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://www.dismall.com/static/image/hrline/1.gif" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br /><br />网络上的封装APP之所以收钱,无非是提供了一些接口在封装APP上,比如什么微信支付,支付宝支付的接口等等。那么我们能不能实现这些功能呢?当然可以!且听我慢慢道来。<br /><img id="aimg_E7lI7" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://www.dismall.com/static/image/hrline/1.gif" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br />准备工具:类似于Fusion APP这样的封装工具,自备图片素材等自己需要的东西。(Fusion APP自带1300多个矢量图)<br />进阶工具:想要完全控制你的APP,并新增很多功能(不管是什么功能),你得先学会一点脚本知识,例如js。<br /><img id="aimg_TdAAn" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://www.dismall.com/static/image/hrline/1.gif" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br />以Fusion APP为例,这玩意儿很有名,我无需介绍。它的核心在于,在基础的封装上,如果你有一定的编程能力就可以在封装的APP内加入你想要的任何功能。即使你不会编程,你也可以封装一个堪比付费封装的APP出来。<br /><strong>它的基础封装包括但不限于:</strong><br />1、侧边栏+侧边栏图片+文字的制作<br />2、底部栏+底部栏图片+文字的制作<br />3、顶部栏(左右)+顶部栏图片+文字的制作<br />4、任何元素的颜色、宽高度、大小、阴影强度等设置<br />5、自带搜索栏,可自定义搜索栏内文字<br />6、横屏竖排控制与状态栏显示<br />7、打开外部第三方应用<br />8、可显示进度条,长按出现菜单,自主选择浏览器UA标识<br />9、APP自动随网页变色、加载网页速度设置快慢<br />10、APP启动、加载完毕、收到新消息时可以弹出框与文字<br /><strong>它的高级封装包括但不限于:</strong><br />1、APP包名、版本号与内部版本号自定义<br />2、网页控制元素(一般是js脚本)<br />3、APP全局js脚本<br />4、引用外部程序并识别<br />5、点击行为代码或脚本<br />6、清除缓存并退出<br />简单地说,任何一个点击的行为你都可以加入代码或脚本,来实现某些行为。加入支付宝微信的第三方支付接口也是可以的。<br /><br /><img id="aimg_MFH6I" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://www.dismall.com/static/image/hrline/1.gif" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br /><strong>我简单做出来的效果是这样的:</strong>把我的discuz网站的2个触屏版封装到了一起,并添加了一些新的链接与第三方接口,这样就不再屈就于打开手机浏览器才能绑定第三方账号的问题了。<br /><img title="12.jpg" id="aimg_5848" aid="5848" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202002/27/161652nylb2mwlbzr5llh2.jpg" src="https://www.dismall.com/data/attachment/forum/202002/27/161652nylb2mwlbzr5llh2.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><img title="42.jpg" id="aimg_5849" aid="5849" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202002/27/161652jatfzdflft6vr6u6.jpg" src="https://www.dismall.com/data/attachment/forum/202002/27/161652jatfzdflft6vr6u6.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><img title="312.jpg" id="aimg_5850" aid="5850" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202002/27/161653p3uubcu6f1rq3r7q.jpg" src="https://www.dismall.com/data/attachment/forum/202002/27/161653p3uubcu6f1rq3r7q.jpg" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /><img id="aimg_Vytkd" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://www.dismall.com/static/image/hrline/1.gif" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br /><br /><br />我不是在打什么公告之类的哈,我只是想介绍给各位站长,毕竟这个软件只要你付出一点时间,就能获取到不错的效果。<br />他又不要钱,也不要什么注册啥的,百度下载了就开始做就行。<br />但是注意!(我差点忘了)<br />1、自己的图片文件名不能带有中文与数字!建议全部英文!<br />2、包名最好默认,非要改,你需要去做一个私签!<br />APP<em>, </em>封装<em>, </em>img<em>, </em>一个<em>, </em>static 一直在用的东西<img id="aimg_qereZ" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://dismall.app1.magcloud.net/public/emotion/face_002.png" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><img id="aimg_I5GTR" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://dismall.app1.magcloud.net/public/emotion/face_002.png" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><img id="aimg_yUmVj" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://dismall.app1.magcloud.net/public/emotion/face_002.png" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" />
頁:
[1]