智慧保安互联网APP
shuishen
2021-08-13 18bc56d4176b90ab5a1afceddcfa3ce55da5e070
配置文件更改
3 files modified
43 ■■■■ changed files
manifest.json 20 ●●●●● patch | view | raw | blame | history
store/actions.js 14 ●●●●● patch | view | raw | blame | history
template.h5.html 9 ●●●● patch | view | raw | blame | history
manifest.json
@@ -22,7 +22,10 @@
            "delay" : 0
        },
        /* 模块配置 */
        "modules" : {},
        "modules" : {
            "Geolocation" : {},
            "Maps" : {}
        },
        /* 应用发布信息 */
        "distribute" : {
            /* android打包配置 */
@@ -56,7 +59,20 @@
            "ios" : {},
            /* SDK配置 */
            "sdkConfigs" : {
                "ad" : {}
                "ad" : {},
                "geolocation" : {
                    "baidu" : {
                        "__platform__" : [ "ios", "android" ],
                        "appkey_ios" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG",
                        "appkey_android" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG"
                    }
                },
                "maps" : {
                    "baidu" : {
                        "appkey_ios" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG",
                        "appkey_android" : "T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG"
                    }
                }
            },
            "icons" : {
                "android" : {
store/actions.js
@@ -4,8 +4,7 @@
const getLocationData = (userId) => {
    var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "mapqq");
    var geolocation = new qq.maps.Geolocation("T7RBZ-62U3X-RSQ4P-ZZVCB-WE7JT-HRBOG", "myapp");
    var positionNum = 0;
    var options = {
        timeout: 8000
@@ -88,7 +87,6 @@
            //     // dataType: 'JSON',
            success: (res) => {
                if (res.statusCode == 200) {
                    console.log(res)
                    if (res.data.error_code == "400") {
                        uni.showToast({
                            title: '密码错误,请重试',
@@ -98,7 +96,6 @@
                        return;
                    }
                    store.commit('getUserData', res.data)
                    // console.log(res.data,123542);
                    data.isit = true;
                    data.userName = res.data.nick_name; //警袁姓名
                    data.userID = res.data.user_id; //警袁id
@@ -106,8 +103,13 @@
                    data.accounts = data.name;
                    data.pass = data.pass;
                    // data.userPhon = res.user_id;
                    uni.getLocation({
                        type: 'wgs84',
                        geocode: true,
                        success: (res) => {
                        }
                    })
                    getLocationData(res.data.user_id)
                    setInterval(function() {
                            getLocationData(res.data.user_id);
                        },
template.h5.html
@@ -9,6 +9,7 @@
        <title>
            <%= htmlWebpackPlugin.options.title %>
        </title>
        <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
        <script>
            document.addEventListener('DOMContentLoaded', function() {
                document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
@@ -17,7 +18,13 @@
        <!-- 百度地图api -->
        <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js">
        </script>
        <link rel="stylesheet" href="<%= BASE_URL %>static/index.css" />
        <!-- 微信支持 -->
        <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
        <!-- <script src="./js/wx.js"></script> -->
        <!-- uni 的 SDK -->
        <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js">
        </script>
    </head>
    <body>
        <noscript>