Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
e-shield-miniprogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 61ea3e86
authored
Sep 08, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增隐私协议弹框
1 parent
b8638a4a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
86 deletions
package-lock.json
package.json
pages/findCar/findCar.wxml
pages/trace/trace.js
pages/trace/trace.wxml
utils/wxrequest.js
package-lock.json
View file @
61ea3e8
{
{
"name"
:
"e-shield-miniprogram"
,
"lockfileVersion"
:
3
,
"requires"
:
true
,
"requires"
:
true
,
"packages"
:
{
"lockfileVersion"
:
1
,
""
:
{
"dependencies"
:
{
"dependencies"
:
{
"glsx-applet-component"
:
{
"glsx-applet-component"
:
"^1.1.24"
"version"
:
"1.1.25"
,
}
"resolved"
:
"https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.25.tgz"
,
},
"integrity"
:
"sha512-tE84hW6y+1YG6hFroDEUvP/0rC0Bsgk/Z+xkKfp2++V3qs/7xFtYvz15ShThMSemLd7lcZCi0aMh9Xp4QNytLA=="
"node_modules/glsx-applet-component"
:
{
"version"
:
"1.1.24"
,
"resolved"
:
"https://registry.npmmirror.com/glsx-applet-component/-/glsx-applet-component-1.1.24.tgz"
,
"integrity"
:
"sha512-3XTG9J99rgKVJpcC7aKS/+N7CaS+MNYdy5qmWH8siFaRFiSo1PeBRDaprfjCazaud/c31RvpoDFUof/fxNkxjw=="
}
}
}
}
}
}
package.json
View file @
61ea3e8
{
{
"dependencies"
:
{
"dependencies"
:
{
"glsx-applet-component"
:
"^1.1.2
4
"
"glsx-applet-component"
:
"^1.1.2
5
"
}
}
}
}
pages/findCar/findCar.wxml
View file @
61ea3e8
<web-view src="{{url}}" bindmessage="receiveMsg"></web-view>
\ No newline at end of file
\ No newline at end of file
<web-view src="{{url}}" bindmessage="receiveMsg"></web-view>
pages/trace/trace.js
View file @
61ea3e8
...
@@ -2,87 +2,93 @@
...
@@ -2,87 +2,93 @@
const
WXRequest
=
require
(
'../../utils/wxrequest.js'
);
const
WXRequest
=
require
(
'../../utils/wxrequest.js'
);
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
url
:
''
,
url
:
''
,
init
:
false
init
:
false
,
},
lat
:
''
,
lng
:
''
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
var
that
=
this
;
var
that
=
this
;
wx
.
getLocation
({
this
.
setData
({
success
:
function
(
res
)
{
lng
:
options
.
lng
,
/*that.setData({
lat
:
options
.
lat
url: `${WXRequest.domain}h5/dist/trace.html?originLat=${res.latitude}&originLng=${res.longitude}`
})
});*/
},
wx
.
openLocation
({
latitude
:
Number
(
options
.
lat
),
longitude
:
Number
(
options
.
lng
)
});
},
fail
(
res
){
console
.
log
(
res
)
}
})
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{
onReady
:
function
()
{
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
if
(
this
.
data
.
init
){
let
_this
=
this
;
wx
.
navigateBack
()
if
(
this
.
data
.
init
)
{
}
wx
.
navigateBack
()
},
return
false
;
}
wx
.
getLocation
({
success
:
function
(
res
)
{
/*that.setData({
url: `${WXRequest.domain}h5/dist/trace.html?originLat=${res.latitude}&originLng=${res.longitude}`
});*/
wx
.
openLocation
({
latitude
:
Number
(
_this
.
data
.
lat
),
longitude
:
Number
(
_this
.
data
.
lng
)
});
},
fail
(
res
)
{
console
.
log
(
res
)
}
})
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
:
function
()
{
onHide
:
function
()
{
this
.
setData
({
this
.
setData
({
init
:
true
init
:
true
});
});
},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
:
function
()
{
onUnload
:
function
()
{
},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
}
}
})
})
\ No newline at end of file
\ No newline at end of file
pages/trace/trace.wxml
View file @
61ea3e8
<!-- <web-view src="{{url}}"></web-view> -->
<!-- <web-view src="{{url}}"></web-view> -->
<!-- 新增隐私协议弹框 开始 -->
<glsx-privacy appletName="虎哥e盾"></glsx-privacy>
<!-- 新增隐私协议弹框 end -->
\ No newline at end of file
\ No newline at end of file
utils/wxrequest.js
View file @
61ea3e8
const
domain
=
'https://e-shield.didihu.com.cn/otmini/'
;
//正式环境
//
const domain = 'https://e-shield.didihu.com.cn/otmini/'; //正式环境
//
const domain = 'https://e-shield.hhxtechnology.com/otmini/'; //正式环境
const
domain
=
'https://e-shield.hhxtechnology.com/otmini/'
;
//正式环境
//const domain = 'https://devwx.glsx.com.cn/otmini/'; //开发环境
//const domain = 'https://devwx.glsx.com.cn/otmini/'; //开发环境
/*
/*
新e盾找车
新e盾找车
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment