提交 3e1dc0c9 编写于 作者: D Devil

小程序新增隐私协议

上级 87d92ba4
......@@ -94,6 +94,7 @@ textarea {
.oh { overflow: hidden; }
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
......
......@@ -565,7 +565,7 @@ App({
switch(type) {
// web
case 0 :
my.navigateTo({url: '/pages/web-view/web-view?url='+encodeURIComponent(value)});
this.open_web_view(value);
break;
// 内部页面
......@@ -601,6 +601,14 @@ App({
}
},
/**
* 打开 webview页面
* value [string] url地址
*/
open_web_view(value) {
my.navigateTo({url: '/pages/web-view/web-view?url='+encodeURIComponent(value)});
},
/**
* 是否需要绑定手机号码
*/
......
......@@ -55,7 +55,6 @@ page{
padding-top: 30%;
}
.user-login button {
margin-top: 30rpx;
padding: 0 30rpx;
height: 65rpx;
line-height: 65rpx;
......
......@@ -10,6 +10,14 @@
</view>
<view a:if="{{user == null}}" class="user-login tc">
<view class="cr-888 fs-12">确认登录授权,为您提供更优质的服务</view>
<button type="primary" size="mini" open-type="getAuthorize" scope="userInfo" onGetAuthorize="get_user_info_event">授权登录</button>
<view>确认登录授权,为您提供更优质的服务</view>
<view class="margin-top-sm padding-bottom-xxl">
阅读并同意 《<span class="cr-main" onTap="agreement_event" data-value="userregister">服务协议</span>》 与 《<span class="cr-main" onTap="agreement_event" data-value="userprivacy">隐私政策</span>》
</view>
<view class="margin-top-xxl">
<navigator open-type="navigateBack" hover-class="none" class="dis-inline margin-right-lg">
<button type="default" size="mini" class="cr-888 br" hover-class="none">取消</button>
</navigator>
<button type="primary" size="mini" open-type="getAuthorize" scope="userInfo" onGetAuthorize="get_user_info_event" class="margin-left-lg">同意授权登录</button>
</view>
</view>
......@@ -189,6 +189,28 @@ Page({
}
});
}
}
},
// 协议事件
agreement_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value == null)
{
app.showToast('协议类型有误');
return false;
}
// 是否存在协议 url 地址
var key = 'agreement_'+value+'_url';
var url = app.get_config('config.'+key) || null;
if(url == null)
{
app.showToast('协议url地址有误');
return false;
}
// 打开 webview
app.open_web_view(url);
},
});
......@@ -101,6 +101,7 @@ textarea {
.oh { overflow: hidden; }
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
......
......@@ -515,7 +515,7 @@ App({
switch (type) {
// web
case 0:
swan.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
this.open_web_view(value);
break;
// 内部页面
......@@ -551,6 +551,14 @@ App({
}
},
/**
* 打开 webview页面
* value [string] url地址
*/
open_web_view(value) {
swan.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
},
/**
* 默认弱提示方法
* msg [string] 提示信息
......
......@@ -58,9 +58,6 @@ page{
.user-login {
padding-top: 30%;
}
.user-login button {
margin-top: 30rpx;
}
/**
* 登录确认
......
......@@ -252,4 +252,26 @@ Page({
this.setData({login_type_status: 1});
},
// 协议事件
agreement_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value == null)
{
app.showToast('协议类型有误');
return false;
}
// 是否存在协议 url 地址
var key = 'agreement_'+value+'_url';
var url = app.get_config('config.'+key) || null;
if(url == null)
{
app.showToast('协议url地址有误');
return false;
}
// 打开 webview
app.open_web_view(url);
},
});
\ No newline at end of file
......@@ -22,6 +22,14 @@
<!-- 获取用户信息授权 -->
<view s-else class="user-login tc">
<view class="cr-888 fs-12">确认登录授权,为您提供更优质的服务</view>
<button type="primary" size="mini" open-type="getUserInfo" bindgetuserinfo="get_user_info_event">授权登录</button>
<view>确认登录授权,为您提供更优质的服务</view>
<view class="margin-top-sm padding-bottom-xxl">
阅读并同意 《<span class="cr-main" bindtap="agreement_event" data-value="userregister">服务协议</span>》 与 《<span class="cr-main" bindtap="agreement_event" data-value="userprivacy">隐私政策</span>》
</view>
<view class="margin-top-xxl">
<navigator open-type="navigateBack" hover-class="none" class="dis-inline margin-right-lg">
<button type="default" size="mini" class="cr-888 br" hover-class="none">取消</button>
</navigator>
<button type="primary" size="mini" open-type="getUserInfo" bindgetuserinfo="get_user_info_event" class="margin-left-lg">同意授权登录</button>
</view>
</view>
......@@ -511,7 +511,7 @@ App({
switch (type) {
// web
case 0:
qq.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
this.open_web_view(value);
break;
// 内部页面
......@@ -548,6 +548,14 @@ App({
}
},
/**
* 打开 webview页面
* value [string] url地址
*/
open_web_view(value) {
qq.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
},
/**
* 默认弱提示方法
* msg [string] 提示信息
......
......@@ -101,6 +101,7 @@ textarea {
.oh { overflow: hidden; }
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
......
......@@ -190,6 +190,28 @@ Page({
}
});
}
}
},
// 协议事件
agreement_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value == null)
{
app.showToast('协议类型有误');
return false;
}
// 是否存在协议 url 地址
var key = 'agreement_'+value+'_url';
var url = app.get_config('config.'+key) || null;
if(url == null)
{
app.showToast('协议url地址有误');
return false;
}
// 打开 webview
app.open_web_view(url);
},
});
......@@ -10,6 +10,14 @@
</view>
<view qq:if="{{user == null}}" class="user-login tc">
<view class="cr-888 fs-12">确认登录授权为您提供更优质的服务</view>
<button type="primary" size="mini" open-type="getUserInfo" bindgetuserinfo="get_user_info_event">授权登录</button>
<view>确认登录授权为您提供更优质的服务</view>
<view class="margin-top-sm padding-bottom-xxl">
阅读并同意 <span class="cr-main" bindtap="agreement_event" data-value="userregister">服务协议</span>》 与 《<span class="cr-main" bindtap="agreement_event" data-value="userprivacy">隐私政策</span>
</view>
<view class="margin-top-xxl">
<navigator open-type="navigateBack" hover-class="none" class="dis-inline margin-right-lg">
<button type="default" size="mini" class="cr-888 br" hover-class="none">取消</button>
</navigator>
<button type="primary" size="mini" open-type="getUserInfo" bindgetuserinfo="get_user_info_event" class="margin-left-lg">同意授权登录</button>
</view>
</view>
......@@ -57,7 +57,4 @@ page{
*/
.user-login {
padding-top: 30%;
}
.user-login button {
margin-top: 30rpx;
}
\ No newline at end of file
......@@ -518,7 +518,7 @@ App({
switch (type) {
// web
case 0:
tt.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
this.open_web_view(value);
break;
// 内部页面
......@@ -554,6 +554,14 @@ App({
}
},
/**
* 打开 webview页面
* value [string] url地址
*/
open_web_view(value) {
tt.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
},
/**
* 默认弱提示方法
* msg [string] 提示信息
......
......@@ -102,6 +102,7 @@ textarea {
.oh { overflow: hidden; }
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
......
......@@ -221,6 +221,28 @@ Page({
}
});
}
}
},
// 协议事件
agreement_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value == null)
{
app.showToast('协议类型有误');
return false;
}
// 是否存在协议 url 地址
var key = 'agreement_'+value+'_url';
var url = app.get_config('config.'+key) || null;
if(url == null)
{
app.showToast('协议url地址有误');
return false;
}
// 打开 webview
app.open_web_view(url);
},
});
......@@ -10,6 +10,14 @@
</view>
<view tt:if="{{user == null}}" class="user-login tc">
<view class="cr-888 fs-12">确认登录授权,为您提供更优质的服务</view>
<button type="primary" size="mini" bindtap="get_user_info_event">授权登录</button>
<view>确认登录授权,为您提供更优质的服务</view>
<view class="margin-top-sm padding-bottom-xxl">
阅读并同意 《<span class="cr-main" bindtap="agreement_event" data-value="userregister">服务协议</span>》 与 《<span class="cr-main" bindtap="agreement_event" data-value="userprivacy">隐私政策</span>》
</view>
<view class="margin-top-xxl">
<navigator open-type="navigateBack" hover-class="none" class="dis-inline margin-right-lg">
<button type="default" size="mini" class="cr-888 br" hover-class="none">取消</button>
</navigator>
<button type="primary" size="mini" bindtap="get_user_info_event" class="margin-left-lg">同意授权登录</button>
</view>
</view>
......@@ -57,7 +57,4 @@ page{
*/
.user-login {
padding-top: 30%;
}
.user-login button {
margin-top: 30rpx;
}
\ No newline at end of file
......@@ -516,7 +516,7 @@ App({
switch (type) {
// web
case 0:
wx.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
this.open_web_view(value);
break;
// 内部页面
......@@ -552,6 +552,14 @@ App({
}
},
/**
* 打开 webview页面
* value [string] url地址
*/
open_web_view(value) {
wx.navigateTo({ url: '/pages/web-view/web-view?url=' + encodeURIComponent(value) });
},
/**
* 默认弱提示方法
* msg [string] 提示信息
......
......@@ -101,6 +101,7 @@ textarea {
.oh { overflow: hidden; }
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
......
......@@ -278,4 +278,26 @@ Page({
this.setData({login_type_status: 1});
},
// 协议事件
agreement_event(e) {
var value = e.currentTarget.dataset.value || null;
if(value == null)
{
app.showToast('协议类型有误');
return false;
}
// 是否存在协议 url 地址
var key = 'agreement_'+value+'_url';
var url = app.get_config('config.'+key) || null;
if(url == null)
{
app.showToast('协议url地址有误');
return false;
}
// 打开 webview
app.open_web_view(url);
},
});
......@@ -22,6 +22,14 @@
<!-- 获取用户信息授权 -->
<view wx:else class="user-login tc">
<view class="cr-888 fs-12">确认登录授权,为您提供更优质的服务</view>
<button type="primary" size="mini" bindtap="get_user_info_event">授权登录</button>
<view>确认登录授权,为您提供更优质的服务</view>
<view class="margin-top-sm padding-bottom-xxl">
阅读并同意 《<span class="cr-main" bindtap="agreement_event" data-value="userregister">服务协议</span>》 与 《<span class="cr-main" bindtap="agreement_event" data-value="userprivacy">隐私政策</span>》
</view>
<view class="margin-top-xxl">
<navigator open-type="navigateBack" hover-class="none" class="dis-inline margin-right-lg">
<button type="default" size="mini" class="cr-888 br" hover-class="none">取消</button>
</navigator>
<button type="primary" size="mini" bindtap="get_user_info_event" class="margin-left-lg">同意授权登录</button>
</view>
</view>
......@@ -58,9 +58,6 @@ page{
.user-login {
padding-top: 30%;
}
.user-login button {
margin-top: 30rpx;
}
/**
* 登录确认
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册