HBuilderX

HBuilderX

极客开发工具
uni-app

uni-app

开发一次,多端覆盖
uniCloud

uniCloud

云开发平台
HTML5+

HTML5+

增强HTML5的功能体验
MUI

MUI

上万Star的前端框架

有偿提供佳博蓝牙打印机服务

一个打印小票的功能,做了快一个月,又是要文档,又是求助别人,终于弄好了。所以有相似功能还没搞定的同学,可以试试联系我。如果你已经完成了蓝牙发现并且能连接上打印机,只是最后的outputstream.write没有反应,在确认的我方法可以正常打印的情况下 收费是200,如果从蓝牙发现开始,收费500,但是要提供给我打印机的技术文档。另外说一句,如果最后一步outputstream.write这个没反应,最有可能的原因是你的打印机是双模式的,即票据模式和标签模式,而打印机默认是标签模式的。所以导致无法打印。但是我按照文档切换的时候是无效的,所以我就干脆用的标签模式打印,但是标签模式的打印高度是固定的,最后我采取了分段打印的方法,有能力的可以参考,实在不行的可以联系我。暂时只支持安卓时间,苹果没有研究。

继续阅读 »

一个打印小票的功能,做了快一个月,又是要文档,又是求助别人,终于弄好了。所以有相似功能还没搞定的同学,可以试试联系我。如果你已经完成了蓝牙发现并且能连接上打印机,只是最后的outputstream.write没有反应,在确认的我方法可以正常打印的情况下 收费是200,如果从蓝牙发现开始,收费500,但是要提供给我打印机的技术文档。另外说一句,如果最后一步outputstream.write这个没反应,最有可能的原因是你的打印机是双模式的,即票据模式和标签模式,而打印机默认是标签模式的。所以导致无法打印。但是我按照文档切换的时候是无效的,所以我就干脆用的标签模式打印,但是标签模式的打印高度是固定的,最后我采取了分段打印的方法,有能力的可以参考,实在不行的可以联系我。暂时只支持安卓时间,苹果没有研究。

收起阅读 »

MUI input mui-input-password 和 Vue 共同使用失效的问题

Vue mui

<input v-model="password" type="password" class="mui-input-password mui-input" placeholder="设置6位数字密码">
和Vue共用,那个小眼睛失效。无论怎么动态初始化都不好使!

解决办法:

1、在Vue中自定义组件:
Vue.component('p-input', {
mounted:function() {
mui('.mui-input-row input').input();
},
props: ['value', 'placeholder'],
template:
'<input type="password" class="mui-input mui-input-password" :placeholder=placeholder '+
' v-bind:value="value" '+
' v-on:input="$emit(\'input\', $event.target.value)" '+
'>'
})

2、html中这么用:
<p-input v-model="password" placeholder="设置6位数字密码"></p-input>

继续阅读 »

<input v-model="password" type="password" class="mui-input-password mui-input" placeholder="设置6位数字密码">
和Vue共用,那个小眼睛失效。无论怎么动态初始化都不好使!

解决办法:

1、在Vue中自定义组件:
Vue.component('p-input', {
mounted:function() {
mui('.mui-input-row input').input();
},
props: ['value', 'placeholder'],
template:
'<input type="password" class="mui-input mui-input-password" :placeholder=placeholder '+
' v-bind:value="value" '+
' v-on:input="$emit(\'input\', $event.target.value)" '+
'>'
})

2、html中这么用:
<p-input v-model="password" placeholder="设置6位数字密码"></p-input>

收起阅读 »

开发电商app的优势

移动APP

> 更好提升品牌价值

企业在开发APP时,可根据企业品牌特性,通过增加一些新奇趣的营销互动体验模式,提升消费者的App使用感受。同时,借助高质量的内容、视频、秒杀、积分兑换等营销模式,融入于电商软件中,能更好地拉近用户与品牌距离,同时提高产品销量,提升品牌高度。目前,力谱云支持:秒杀、满减、会员积分、分红返利、预付卡、代金券等数十余种营销功能,供企业加速流量变现之路。

继续阅读 »

> 更好提升品牌价值

企业在开发APP时,可根据企业品牌特性,通过增加一些新奇趣的营销互动体验模式,提升消费者的App使用感受。同时,借助高质量的内容、视频、秒杀、积分兑换等营销模式,融入于电商软件中,能更好地拉近用户与品牌距离,同时提高产品销量,提升品牌高度。目前,力谱云支持:秒杀、满减、会员积分、分红返利、预付卡、代金券等数十余种营销功能,供企业加速流量变现之路。

收起阅读 »

开发电商app的优势,力谱云助您开发电商app

移动APP

随着电商企业的蓬勃发展,开发一款专属电商App成为了许多企业进军移动蓝海市场的不二选择。企业通过开发APP可以更有利的发展,那么开发电商App究竟有何优势呢?跟着力谱云,来了解一番吧!

> 用户体验更佳

优化用户体验,一直是企业在开发电商App中,最为看重的一个关键环节。通过AR、VR、AI等黑科技的融合运用,能为用户带来意想不到的惊喜体验, 提升用户粘性。力谱云APP开发平台,目前支持运用直播、大数据等科技技术为移动电商解决方案添砖加瓦。

继续阅读 »

随着电商企业的蓬勃发展,开发一款专属电商App成为了许多企业进军移动蓝海市场的不二选择。企业通过开发APP可以更有利的发展,那么开发电商App究竟有何优势呢?跟着力谱云,来了解一番吧!

> 用户体验更佳

优化用户体验,一直是企业在开发电商App中,最为看重的一个关键环节。通过AR、VR、AI等黑科技的融合运用,能为用户带来意想不到的惊喜体验, 提升用户粘性。力谱云APP开发平台,目前支持运用直播、大数据等科技技术为移动电商解决方案添砖加瓦。

收起阅读 »

uni 文本框循环取值

input

//按钮方法
formSubmit: function(e, key) {
var keys = key * 3;//key是定位所在位置,比如遍历出来的第一行是0,第二行是1,我这边乘以3是因为我一行有3个文本框。
var inpArr = document.getElementsByTagName("input");//定位页面input ,所以这里如果页面有其他不是文本框的input 那要注意了。。。
const vip = inpArr[keys + 2].value;
const svip = inpArr[keys + 1].value;
const ssvip = inpArr[keys].value;
}

//页面代码
<view class="uni-card" v-for="(value, key) in list2" :key="key">
<view class="uni-flex uni-row am-margin-bottom-sm product-list-name">
<view style="flex: 1; line-height: 38upx;">{{ value.proName }}&nbsp;【{{value.proSize}}】</view>
<view class="am-text-right" style="width: 140upx;">
<uni-badge text="待调价" type="danger"></uni-badge>
</view>
</view>
<view class="uni-flex uni-row product-list-right">
<view class="product-list-small">成本价</view>
<view class="product-list-small">SVIP价</view>
<view class="product-list-small">VIP价</view>
<view class="product-list-small">会员价</view>
</view>
<view class="uni-flex uni-row product-list-right">
<view class="product-list-money" style="border: 2upx solid #f1f1f1; font-size: 32upx; color: #FF5101; line-height: 70upx; font-weight: bold;">{{ value.proCbj }}</view>
<view class="product-list-money">
<input type="number" :value="value.proSSVip" name='ssvip1' />
</view>
<view class="product-list-money">
<input type="number" :value="value.proSVip" name='svip1' />
</view>
<view class="product-list-money">
<input type="number" :value="value.proVip" name='vip1' />
</view>
</view>
<view class="product-list-foot-font">
<text class="iconfont icon-yangshengqi" style="font-size: 20upx; color: #aaa; margin-right: 4upx;"></text>
<text style="color: #999; font-size: 26upx;">19-01-12</text>从<text>15.50</text>调为<text>{{ value.money }}</text>,差额<text>{{ value.rate }}</text>
</view>
<view class="am-text-center finance-list-btn">
<button type="warn" @tap="formSubmit(value.proID,key)">确认调价</button>
</view>
</view>

继续阅读 »

//按钮方法
formSubmit: function(e, key) {
var keys = key * 3;//key是定位所在位置,比如遍历出来的第一行是0,第二行是1,我这边乘以3是因为我一行有3个文本框。
var inpArr = document.getElementsByTagName("input");//定位页面input ,所以这里如果页面有其他不是文本框的input 那要注意了。。。
const vip = inpArr[keys + 2].value;
const svip = inpArr[keys + 1].value;
const ssvip = inpArr[keys].value;
}

//页面代码
<view class="uni-card" v-for="(value, key) in list2" :key="key">
<view class="uni-flex uni-row am-margin-bottom-sm product-list-name">
<view style="flex: 1; line-height: 38upx;">{{ value.proName }}&nbsp;【{{value.proSize}}】</view>
<view class="am-text-right" style="width: 140upx;">
<uni-badge text="待调价" type="danger"></uni-badge>
</view>
</view>
<view class="uni-flex uni-row product-list-right">
<view class="product-list-small">成本价</view>
<view class="product-list-small">SVIP价</view>
<view class="product-list-small">VIP价</view>
<view class="product-list-small">会员价</view>
</view>
<view class="uni-flex uni-row product-list-right">
<view class="product-list-money" style="border: 2upx solid #f1f1f1; font-size: 32upx; color: #FF5101; line-height: 70upx; font-weight: bold;">{{ value.proCbj }}</view>
<view class="product-list-money">
<input type="number" :value="value.proSSVip" name='ssvip1' />
</view>
<view class="product-list-money">
<input type="number" :value="value.proSVip" name='svip1' />
</view>
<view class="product-list-money">
<input type="number" :value="value.proVip" name='vip1' />
</view>
</view>
<view class="product-list-foot-font">
<text class="iconfont icon-yangshengqi" style="font-size: 20upx; color: #aaa; margin-right: 4upx;"></text>
<text style="color: #999; font-size: 26upx;">19-01-12</text>从<text>15.50</text>调为<text>{{ value.money }}</text>,差额<text>{{ value.rate }}</text>
</view>
<view class="am-text-center finance-list-btn">
<button type="warn" @tap="formSubmit(value.proID,key)">确认调价</button>
</view>
</view>

收起阅读 »

uni-push开通指南

消息推送 unipush Push

> 文档已迁移至新链接:https://uniapp.dcloud.net.cn/uni-push/open.html
> 如有疑问,可以单独发贴咨询。

继续阅读 »

> 文档已迁移至新链接:https://uniapp.dcloud.net.cn/uni-push/open.html
> 如有疑问,可以单独发贴咨询。

收起阅读 »

uni-app/mui/小程序 可用的 RSA/SHA/MD5 签名/加密 SDK

之前项目是web 项目, 用的 fucking-util-signature 可以满足需求.

最近准备使用uni-app 开发跨平台应用

但是发现 web-worker 里面不支持 crypto.getRandomValues, 所以搞了个兼容层使其可以完全跨平台使用.

github 地址: fucking-util-signature-all

继续阅读 »

之前项目是web 项目, 用的 fucking-util-signature 可以满足需求.

最近准备使用uni-app 开发跨平台应用

但是发现 web-worker 里面不支持 crypto.getRandomValues, 所以搞了个兼容层使其可以完全跨平台使用.

github 地址: fucking-util-signature-all

收起阅读 »

自已写的一个原生底部选项卡的封装

底部选项卡 nativeObj模式底部选项卡 tabbar

现有的5 app中官方的原生底部tabbar选项卡例子简直反人类,分布在配置文件,util.js,index.html三个文件里面,而且还不会自动判断,稍微改点东西就出错,气到七窍生烟。一怒之下自己写了一个封装,用起来还不错,希望能帮到像我一样的人。
html中的使用方法:

    var tabBarSet = {  
        activeIndex: 0,//载入时激活的选项  
        textSize: "12px",  
        fontSrc: "_www/fonts/mui.ttf",  
        color: "#ccc",  
        colorActive: "#f60",  
        items: [{  
                icon: "\ue262",  
                iconSize: "26px",  
                text: "首页",  
                click: function() {  
                    mess.innerHTML = "点击了首页";  
                    console.log("点击了首页");  
                }  
            },  
            {  
                icon: "\ue464",  
                iconSize: "26px",  
                text: "上传",  
                click: function() {  
                    mess.innerHTML = "点击了上传";  
                    console.log("点击了上传");  
                }  
            },  
            {  
                icon: "\ue502",  
                iconSize: "26px",  
                text: "设置",  
                click: function() {  
                    var theurl = $.json("server") === null ? server : $.json("server");  
                    mui.prompt("请输入服务器地址(需加https://)", theurl, "修改服务器ip地址", function(e) {  
                        if (e.index === 1) {  
                            $.json("server", e.value);  
                            server = e.value;  
                            mui.toast("服务器地址已修改为"   e.value);  
                        }  
                    }, "div");  
                    document.querySelector('.mui-popup-input input').value = theurl;  
                }  
            }  
        ]  
    };  
    mui.plusReady(function() {  
        hh_tabbar(tabBarSet)  
    });

tabbar.js =>

(function() {  
    var xview = plus.nativeObj.View.getViewById("hhtabBar");  
    if (xview != null) {  
        xview.close();  
    }  
    var nview = null;  
    var nviewtags = [];  
    nview = new plus.nativeObj.View("hhtabBar");  
    window.hh_tabbarClear = function() {  
        nview.reset();  
    }  
    window.hh_tabbar = function(tabBarSet) {  
        var persent = 100 / (tabBarSet.items.length);  
        nview.setStyle({  
            left: "0px",  
            bottom: "0px",  
            width: "100%",  
            height: "60px"  
        });  
        nviewtags = [];  
        var currLeft = 0;  
        for (var i = 0; i < tabBarSet.items.length; i++) {  
            var tjson = tabBarSet.items[i];  
            nviewtags.push({  
                tag: "font",  
                id: "bar" + i,  
                text: tjson.icon,  
                position: {  
                    top: "5px",  
                    left: currLeft + "%",  
                    width: persent + "%",  
                    height: "50%"  
                },  
                textStyles: {  
                    fontSrc: tabBarSet.fontSrc,  
                    align: 'center',  
                    color: tabBarSet.color,  
                    size: tjson.iconSize  
                }  
            });  
            nviewtags.push({  
                tag: "font",  
                id: "barText" + i,  
                text: tjson.text,  
                position: {  
                    top: "50%",  
                    left: currLeft + "%",  
                    width: persent + "%",  
                    height: "50%"  
                },  
                textStyles: {  
                    align: 'center',  
                    color: tabBarSet.color,  
                    size: tabBarSet.textSize  
                }  
            });  
            currLeft += persent;  
        }  
        //画最上面的那条线  
        nviewtags.push({  
            tag: 'rect',  
            id: 'BorderTop',  
            position: {  
                top: '0px',  
                left: '0px',  
                width: '100%',  
                height: '1px'  
            },  
            rectStyles: {  
                color: '#ccc'  
            }  
        });  
        nview.draw(nviewtags);  
        var myself = plus.webview.currentWebview();  
        myself.append(nview);  
        var pageW = window.innerWidth;  
        nview.addEventListener("click", function(e) {  
            var clientX = e.clientX;  
            var currIndex = 0;  
            var widthBlock = pageW / tabBarSet.items.length;  
            for (var i = 0; i < tabBarSet.items.length; i++) {  
                if (e.clientX > i * widthBlock && e.clientX < (i + 1) * widthBlock) {  
                    currIndex = i;  
                    tabbarUpdate(i, tabBarSet.colorActive);  
                } else {  
                    tabbarUpdate(i, tabBarSet.color);  
                }  
            }  
            tabBarSet.items[currIndex].click.apply(nview, [e]);  
        });  
        for (var i = 0; i < tabBarSet.items.length; i++) {  
            if (tabBarSet.activeIndex === i) {  
                tabbarUpdate(i, tabBarSet.colorActive);  
            } else {  
                tabbarUpdate(i, tabBarSet.color);  
            }  
        }  
    };  
    var tabbarUpdate = function(TheIndex, TheColor) {  
        var thetag = nviewtags[TheIndex * 2];  
        thetag.textStyles.color = TheColor;  
        nview.drawText(thetag.text, thetag.position, thetag.textStyles, "bar" + TheIndex);  

        thetag = nviewtags[TheIndex * 2 + 1];  
        thetag.textStyles.color = TheColor;  
        nview.drawText(thetag.text, thetag.position, thetag.textStyles, "barText" + TheIndex);  
    }  
})();
继续阅读 »

现有的5 app中官方的原生底部tabbar选项卡例子简直反人类,分布在配置文件,util.js,index.html三个文件里面,而且还不会自动判断,稍微改点东西就出错,气到七窍生烟。一怒之下自己写了一个封装,用起来还不错,希望能帮到像我一样的人。
html中的使用方法:

    var tabBarSet = {  
        activeIndex: 0,//载入时激活的选项  
        textSize: "12px",  
        fontSrc: "_www/fonts/mui.ttf",  
        color: "#ccc",  
        colorActive: "#f60",  
        items: [{  
                icon: "\ue262",  
                iconSize: "26px",  
                text: "首页",  
                click: function() {  
                    mess.innerHTML = "点击了首页";  
                    console.log("点击了首页");  
                }  
            },  
            {  
                icon: "\ue464",  
                iconSize: "26px",  
                text: "上传",  
                click: function() {  
                    mess.innerHTML = "点击了上传";  
                    console.log("点击了上传");  
                }  
            },  
            {  
                icon: "\ue502",  
                iconSize: "26px",  
                text: "设置",  
                click: function() {  
                    var theurl = $.json("server") === null ? server : $.json("server");  
                    mui.prompt("请输入服务器地址(需加https://)", theurl, "修改服务器ip地址", function(e) {  
                        if (e.index === 1) {  
                            $.json("server", e.value);  
                            server = e.value;  
                            mui.toast("服务器地址已修改为"   e.value);  
                        }  
                    }, "div");  
                    document.querySelector('.mui-popup-input input').value = theurl;  
                }  
            }  
        ]  
    };  
    mui.plusReady(function() {  
        hh_tabbar(tabBarSet)  
    });

tabbar.js =>

(function() {  
    var xview = plus.nativeObj.View.getViewById("hhtabBar");  
    if (xview != null) {  
        xview.close();  
    }  
    var nview = null;  
    var nviewtags = [];  
    nview = new plus.nativeObj.View("hhtabBar");  
    window.hh_tabbarClear = function() {  
        nview.reset();  
    }  
    window.hh_tabbar = function(tabBarSet) {  
        var persent = 100 / (tabBarSet.items.length);  
        nview.setStyle({  
            left: "0px",  
            bottom: "0px",  
            width: "100%",  
            height: "60px"  
        });  
        nviewtags = [];  
        var currLeft = 0;  
        for (var i = 0; i < tabBarSet.items.length; i++) {  
            var tjson = tabBarSet.items[i];  
            nviewtags.push({  
                tag: "font",  
                id: "bar" + i,  
                text: tjson.icon,  
                position: {  
                    top: "5px",  
                    left: currLeft + "%",  
                    width: persent + "%",  
                    height: "50%"  
                },  
                textStyles: {  
                    fontSrc: tabBarSet.fontSrc,  
                    align: 'center',  
                    color: tabBarSet.color,  
                    size: tjson.iconSize  
                }  
            });  
            nviewtags.push({  
                tag: "font",  
                id: "barText" + i,  
                text: tjson.text,  
                position: {  
                    top: "50%",  
                    left: currLeft + "%",  
                    width: persent + "%",  
                    height: "50%"  
                },  
                textStyles: {  
                    align: 'center',  
                    color: tabBarSet.color,  
                    size: tabBarSet.textSize  
                }  
            });  
            currLeft += persent;  
        }  
        //画最上面的那条线  
        nviewtags.push({  
            tag: 'rect',  
            id: 'BorderTop',  
            position: {  
                top: '0px',  
                left: '0px',  
                width: '100%',  
                height: '1px'  
            },  
            rectStyles: {  
                color: '#ccc'  
            }  
        });  
        nview.draw(nviewtags);  
        var myself = plus.webview.currentWebview();  
        myself.append(nview);  
        var pageW = window.innerWidth;  
        nview.addEventListener("click", function(e) {  
            var clientX = e.clientX;  
            var currIndex = 0;  
            var widthBlock = pageW / tabBarSet.items.length;  
            for (var i = 0; i < tabBarSet.items.length; i++) {  
                if (e.clientX > i * widthBlock && e.clientX < (i + 1) * widthBlock) {  
                    currIndex = i;  
                    tabbarUpdate(i, tabBarSet.colorActive);  
                } else {  
                    tabbarUpdate(i, tabBarSet.color);  
                }  
            }  
            tabBarSet.items[currIndex].click.apply(nview, [e]);  
        });  
        for (var i = 0; i < tabBarSet.items.length; i++) {  
            if (tabBarSet.activeIndex === i) {  
                tabbarUpdate(i, tabBarSet.colorActive);  
            } else {  
                tabbarUpdate(i, tabBarSet.color);  
            }  
        }  
    };  
    var tabbarUpdate = function(TheIndex, TheColor) {  
        var thetag = nviewtags[TheIndex * 2];  
        thetag.textStyles.color = TheColor;  
        nview.drawText(thetag.text, thetag.position, thetag.textStyles, "bar" + TheIndex);  

        thetag = nviewtags[TheIndex * 2 + 1];  
        thetag.textStyles.color = TheColor;  
        nview.drawText(thetag.text, thetag.position, thetag.textStyles, "barText" + TheIndex);  
    }  
})();
收起阅读 »

uni-app/mui/小程序 可用的 RSA/SHA/MD5 签名/加密 SDK

之前项目是web 项目, 用的 fucking-util-signature 可以满足需求.

最近准备使用uni-app 开发跨平台应用

但是发现 web-worker 里面不支持 crypto.getRandomValues, 所以搞了个兼容层使其可以完全跨平台使用.

github 地址: fucking-util-signature-all

继续阅读 »

之前项目是web 项目, 用的 fucking-util-signature 可以满足需求.

最近准备使用uni-app 开发跨平台应用

但是发现 web-worker 里面不支持 crypto.getRandomValues, 所以搞了个兼容层使其可以完全跨平台使用.

github 地址: fucking-util-signature-all

收起阅读 »

uni-app项目展示屏幕文字滚动效果

uniapp模板 uniapp插件 uniapp

github地址,喜欢的可以star下哦

插件预览图

使用教程

1.插件代码拷贝

  • 下载后把components目录下screenTextScroll.vue文件拷贝到自己项目目录下

2.插件全局配置

  • 在项目里main.js中配置如下代码
import screenTextScroll from './components/screenTextScroll.vue'  

Vue.component('textscroll',screenTextScroll)  

3.插件使用

  • vue页面使用
<template>  
    <view class="content">  
        <textscroll :list="list"/>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  
                list:['1分钟前,无夏购买了会员','2分钟前,无夏购买了会员','3分钟前,无夏购买了会员']  
            };  
        },  
        onLoad() {},  
        methods: {  

        }  
    };  
</script>  

<style>  

</style>  
兼容性

uni-app项目中使用都兼容

继续阅读 »

github地址,喜欢的可以star下哦

插件预览图

使用教程

1.插件代码拷贝

  • 下载后把components目录下screenTextScroll.vue文件拷贝到自己项目目录下

2.插件全局配置

  • 在项目里main.js中配置如下代码
import screenTextScroll from './components/screenTextScroll.vue'  

Vue.component('textscroll',screenTextScroll)  

3.插件使用

  • vue页面使用
<template>  
    <view class="content">  
        <textscroll :list="list"/>  
    </view>  
</template>  

<script>  
    export default {  
        data() {  
            return {  
                list:['1分钟前,无夏购买了会员','2分钟前,无夏购买了会员','3分钟前,无夏购买了会员']  
            };  
        },  
        onLoad() {},  
        methods: {  

        }  
    };  
</script>  

<style>  

</style>  
兼容性

uni-app项目中使用都兼容

收起阅读 »

【疑难杂症】HBuilder 打包后百度/高德原生地图不可用的解决办法

云端打包 高德地图 百度地图

【问题描述】
使用 plus.maps 创建原生百度/高德地图,在真机调试的时候地图显示正常,打包(apk)后地图无法显示。

【问题截图】
HBuilder打包后百度/高德原生地图不可用

【问题原因】
因为 HBuilder 已经不怎么维护,官网推荐使用 HBuilderX,并且推测这两个开发工具的云端打包不是使用的一套系统,
随着 HBuilder 的停止维护对应的云端打包系统也停止了维护,所以产生了此问题。

【解决方案】
下载最新版 HBuilderX 打开项目,直接提交云端打包即可。

【效果展示】
使用 plus.maps 相关接口创建的原生(百度)地图

Hbuilder 打包后百度/高德原生地图不可用

继续阅读 »

【问题描述】
使用 plus.maps 创建原生百度/高德地图,在真机调试的时候地图显示正常,打包(apk)后地图无法显示。

【问题截图】
HBuilder打包后百度/高德原生地图不可用

【问题原因】
因为 HBuilder 已经不怎么维护,官网推荐使用 HBuilderX,并且推测这两个开发工具的云端打包不是使用的一套系统,
随着 HBuilder 的停止维护对应的云端打包系统也停止了维护,所以产生了此问题。

【解决方案】
下载最新版 HBuilderX 打开项目,直接提交云端打包即可。

【效果展示】
使用 plus.maps 相关接口创建的原生(百度)地图

Hbuilder 打包后百度/高德原生地图不可用

收起阅读 »

解决页面被输入框顶起不回弹的问题!

如果输入框在页面中比较低。 激活输入框后, 页面会被顶起, 并且不会自动回来。

如果关闭了页面拉动。 那顶起后用手滑都回不来。 很郁闷。

解决方案:
在输入框加入 @blur="blur_input"
<input type="number" name="pn" @blur="blur_input" v-model="phoneno" maxlength="11"></input>

方法:
blur_input:function() {
uni.pageScrollTo({
scrollTop:0,
})
},

更多uni.pageScrollTo的使用方法。请查看文档。

继续阅读 »

如果输入框在页面中比较低。 激活输入框后, 页面会被顶起, 并且不会自动回来。

如果关闭了页面拉动。 那顶起后用手滑都回不来。 很郁闷。

解决方案:
在输入框加入 @blur="blur_input"
<input type="number" name="pn" @blur="blur_input" v-model="phoneno" maxlength="11"></input>

方法:
blur_input:function() {
uni.pageScrollTo({
scrollTop:0,
})
},

更多uni.pageScrollTo的使用方法。请查看文档。

收起阅读 »