Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mini_own
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
geruidan
mini_own
Commits
90609146
Commit
90609146
authored
Sep 13, 2023
by
geruidan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上线授权通知
parent
1d69e533
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
269 additions
and
154 deletions
+269
-154
App.vue
App.vue
+25
-20
components/sh-privacy/index.vue
components/sh-privacy/index.vue
+75
-0
env.js
env.js
+5
-10
manifest.json
manifest.json
+12
-11
md.md
md.md
+8
-8
pages/index/defalutScreen.vue
pages/index/defalutScreen.vue
+68
-37
pages/public/callCenter.vue
pages/public/callCenter.vue
+0
-66
shopro/store/index.js
shopro/store/index.js
+3
-1
shopro/store/modules/privacy.js
shopro/store/modules/privacy.js
+70
-0
static/style/common.scss
static/style/common.scss
+3
-1
No files found.
App.vue
View file @
90609146
<
script
>
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
export
default
{
onLaunch
:
function
()
{
this
.
$store
.
commit
(
'
getPrivacySetting
'
);
//是否需要授权
},
onShow
:
function
()
{
},
onHide
:
function
()
{
}
onShow
:
function
()
{},
onHide
:
function
()
{}
}
</
script
>
<
style
lang=
"scss"
>
@import
"uview-ui/index.scss"
;
@import
'@/static/style/common.scss'
;
@import
'@/static/style/total.scss'
;
page
{
-webkit-overflow-scrolling
:
touch
;
// ios滑动不流畅
height
:
100%
;
// background: #f0f0f0;
width
:
100%
;
font-size
:
30rpx
;
font-family
:
OPPOSANS
;
word-break
:
break-all
;
//英文文本不换行
white-space
:
normal
;
}
// tab图标
.uni-tabbar
.uni-tabbar__icon
{
width
:
25px
!
important
;
height
:
25px
!
important
;
}
page
{
-webkit-overflow-scrolling
:
touch
;
// ios滑动不流畅
height
:
100%
;
// background: #f0f0f0;
width
:
100%
;
font-size
:
30rpx
;
font-family
:
OPPOSANS
;
word-break
:
break-all
;
//英文文本不换行
white-space
:
normal
;
}
// tab图标
.uni-tabbar
.uni-tabbar__icon
{
width
:
25px
!
important
;
height
:
25px
!
important
;
}
</
style
>
components/sh-privacy/index.vue
0 → 100644
View file @
90609146
<
template
>
<view>
<u-modal
:show=
"showPrivacy"
title=
"用户隐私保护提示"
:showConfirmButton=
"false"
>
<view
class=
"slot-content"
>
<slot
name=
"default"
>
<view
class=
"privacyCon"
>
感谢您使用本应用,您使用本应用的服务之前请仔细阅读并同意
<text
class=
"blue"
@
click=
"handleOpenPrivacyContract()"
>
《用户隐私保护指引》
</text>
。当您点击同意并开始使用产品服务时,即表示你已理解并同意该条款内容,该条款将对您产生法律约束力。如您拒绝,将无法使用相应服务。
</view>
<view
class=
"privacyBtn"
>
<button
id=
"agree-btn"
type=
"primary"
class=
"item agree"
open-type=
"agreePrivacyAuthorization"
@
agreeprivacyauthorization=
"handleAgreePrivacyAuthorization"
>
同意
</button>
<!--
<u-button
open-type=
"agreePrivacyAuthorization"
@
agreeprivacyauthorization=
"agreeprivacyauthorization"
type=
"primary"
text=
"同意并继续"
color=
"#00c791"
></u-button>
-->
<!--
<button
id=
"agree-btn"
open-type=
"agreePrivacyAuthorization"
bindagreeprivacyauthorization=
"handleAgreePrivacyAuthorization"
>
同意
</button>
-->
<u-button
type=
"default"
plain
text=
"不同意"
@
click=
"unAgreeAuth"
color=
"#00c791"
></u-button>
</view>
</slot>
</view>
</u-modal>
</view>
</
template
>
<
script
>
import
{
mapActions
,
mapGetters
}
from
'
vuex
'
export
default
{
data
()
{
return
{
}
},
computed
:
{
...
mapGetters
([
'
showPrivacy
'
])
},
methods
:
{
// 打开用户隐私保护文件
handleOpenPrivacyContract
()
{
this
.
$store
.
commit
(
'
openPrivacyContract
'
);
},
//是否需要授权
handleAgreePrivacyAuthorization
()
{
this
.
$store
.
commit
(
'
agreePrivacyAuthorization
'
);
},
// 不同意
unAgreeAuth
()
{
// this.$u.toast("同意也得同意不同意也得同意。哈哈哈哈");
uni
.
exitMiniProgram
({
success
:
()
=>
{
console
.
log
(
'
退出小程序成功
'
);
}
})
},
created
()
{
}
}
}
</
script
>
<
style
lang=
"scss"
>
.privacyCon
{
margin-bottom
:
30rpx
;
}
.privacyBtn
{
button
{
margin-bottom
:
30rpx
;
}
}
#agree-btn
{
color
:
#00c791
;
}
</
style
>
env.js
View file @
90609146
...
...
@@ -3,20 +3,15 @@
*/
// export const BASE_URL = 'http://172.18.0.229:9001' //后台根域名 https://demo.shopro.top
export
const
BASE_URL
=
'
https://wx
cs
.zhonghuihaotai.com
'
//后台根域名 https://demo.shopro.top
export
const
BASE_URL
=
'
https://wx.zhonghuihaotai.com
'
//后台根域名 https://demo.shopro.top
// export const BASE_URL = 'https://wxcs.zhonghuihaotai.com' //后台根域名 https://demo.shopro.top
export
const
API_URL
=
`
${
BASE_URL
}
/api/a1/`
//后台接口域名
export
const
IMG_URL
=
'
http://file.shopro.top
'
//全局网络图片地址变量,css背景图片地址变量在uni.scss
export
const
MAP_KEY
=
'
426ebc3f1bbaced***89ee6061a98
'
;
//高德地图开发者Web服务key,逆坐标解析
export
const
HAS_LIVE
=
false
//后台是否开通直播权限,根据情况在manifest.json中,开启注释相应组件的引入,pages.json中打开直播
// http://172.18.1.66:9001/api/a1/mall/homePage/mp?code={前端传入的code}
export
const
MALL_ID
=
"
1
06975910000477
"
;
export
const
COMPANY_ID
=
"
99999999
8
"
;
export
const
APP_
SECRET
=
"
F61F93E15F6346A88BCE3781E0EFC3BB
"
;
//secretid
export
const
MALL_ID
=
"
1
89099911100589
"
;
export
const
COMPANY_ID
=
"
2023032
8
"
;
export
const
APP_
ID
=
"
wx91fa336def077983
"
;
//小程序APPID
export
const
APP_KEY
=
"
a20511dcfd6b07114afacbb482b2e7e0
"
;
//appkey
export
const
APP_ID
=
"
wx60c6530c49c52ff7
"
;
//小程序APPID
\ No newline at end of file
manifest.json
View file @
90609146
...
...
@@ -54,12 +54,12 @@
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
"wx
60c6530c49c52ff7
"
,
"appid"
:
"wx
91fa336def077983
"
,
"setting"
:
{
"urlCheck"
:
tru
e
,
"urlCheck"
:
fals
e
,
"minified"
:
false
,
"es6"
:
fals
e
,
"postcss"
:
tru
e
"es6"
:
tru
e
,
"postcss"
:
fals
e
},
"usingComponents"
:
true
,
"permission"
:
{
...
...
@@ -67,13 +67,14 @@
"desc"
:
"获取您的信息位置"
}
},
"functionalPages"
:
true
,
"plugins"
:
{
"myPlugin"
:
{
"version"
:
"1.8.5"
,
"provider"
:
"wxae5e29812005203f"
}
}
"functionalPages"
:
true
,
"plugins"
:
{
"myPlugin"
:
{
"version"
:
"1.8.5"
,
"provider"
:
"wxae5e29812005203f"
}
},
"__usePrivacyCheck__"
:
true
},
"mp-alipay"
:
{
"usingComponents"
:
true
...
...
md.md
View file @
90609146
...
...
@@ -13,19 +13,19 @@
AppSecret: 7f2855a8ff743f1f295ecb9af07f5998
```
#### 正式
### 微信步数(zhmp):正式
```
商城:133507311100590
企业:202203282
APPID: wx60c6530c49c52ff7
```
### 理品堂步数小程序
### 理品堂步数小程序 ---- 不用
```
企业:741
商城id:169782111100588
AppID(小程序ID) :wxf462b300a28539ec
AppSecret(小程序密钥) :aafbb74ee3e6dcc1c567d6c6ac721870
```
### 微信步数(zhmp):正式
```
商城:133507311100590
企业:202203282
APPID: wx60c6530c49c52ff7
```
### 无步数商城小程序 :正式 中汇豪泰小程序
...
...
@@ -78,7 +78,7 @@ appsecrect:b54c621093db1abcecac2882e42abb43
```
### 康喜日鲜小程序
### 康喜日鲜小程序
--不用选择企业,需设置企业id
```
APPID:wxd309f8271bf6472d
APPsecret:a57b7789d6e50492e33c80b63f950d8e
...
...
pages/index/defalutScreen.vue
View file @
90609146
<
template
>
<view
class=
""
>
<view
class=
"load"
>
<u-loading-page
loading-color=
"#61b077"
color=
"#61b077"
:loading=
"loading"
></u-loading-page>
<u-loading-page
loading-color=
"#61b077"
color=
"#61b077"
:loading=
"loading"
></u-loading-page>
</view>
<view
class=
"screen-container"
>
<!-- 康喜日鲜 -->
<image
class=
"bg"
:src=
"defalutBg"
mode=
"scaleToFill"
/>
<!-- 康喜生鲜 -->
<!--
<image
class=
"bg"
src=
"https://img.zhonghuihaotai.com/file_20230711101151AaeuQ.png"
mode=
"scaleToFill"
/>
-->
<!-- :disabled="loading" -->
<button
@
click=
"enter"
class=
"btn"
>
<button
@
click=
"enter"
class=
"btn"
>
马上进入
</button>
</view>
<sh-privacy></sh-privacy>
</view>
</
template
>
<
script
>
import
http
from
'
@/shopro/request/index
'
;
import
store
from
'
@/shopro/store
'
;
import
store
from
'
@/shopro/store
'
;
import
{
defalutBg
}
from
"
@/shopro/utils/config.js
"
;
...
...
@@ -34,36 +30,41 @@
mapActions
,
mapGetters
}
from
'
vuex
'
import
shPrivacy
from
'
@/components/sh-privacy/index.vue
'
;
export
default
{
components
:
{
shPrivacy
,
},
data
()
{
return
{
unregistered
:
false
,
checkSessionStatus
:
false
,
loading
:
true
,
companyId
:
""
,
defalutBg
:
defalutBg
companyId
:
""
,
defalutBg
:
defalutBg
,
showPrivacy
:
false
}
},
computed
:
{
...
mapGetters
([
'
userInfo
'
,
'
todayNum
'
])
},
methods
:
{
...
mapActions
([
'
getPhoneNumber
'
,
'
registerInfoFn
'
,
'
authCheck
'
,
'
getUserInfo
'
,
'
enterprise
'
]),
...
mapActions
([
'
getPhoneNumber
'
,
'
registerInfoFn
'
,
'
authCheck
'
,
'
getUserInfo
'
,
'
enterprise
'
]),
// 马上进入
enter
()
{
if
(
this
.
unregistered
&&
!
this
.
loading
)
{
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
}
else
{
}
else
{
this
.
getInfoPhoneNumber
()
}
},
// 自动注册
async
autoRegister
(
companyId
){
async
autoRegister
(
companyId
)
{
let
register
=
await
this
.
registerInfoFn
(
companyId
);
if
(
register
)
{
//注册成功
this
.
unregistered
=
true
;
this
.
unregistered
=
true
;
uni
.
navigateTo
({
url
:
'
/pages/h5/index
'
,
})
...
...
@@ -72,23 +73,23 @@
// 获取手机号
async
getInfoPhoneNumber
(
e
)
{
let
list
=
await
this
.
enterprise
()
if
(
list
.
length
==
1
)
{
if
(
list
.
length
==
1
)
{
this
.
autoRegister
(
list
[
0
].
companyId
)
}
else
{
}
else
{
uni
.
navigateTo
({
url
:
'
/pages/user/enterprise
'
})
}
},
},
async
auth
()
{
let
auth
=
await
this
.
authCheck
();
console
.
log
(
"
调用authcheck的值
"
+
auth
)
console
.
log
(
"
调用authcheck的值
"
+
auth
)
this
.
loading
=
false
;
let
that
=
this
;
let
that
=
this
;
if
(
auth
==
0
)
{
that
.
unregistered
=
true
;
}
else
if
(
auth
==
2001
)
{
that
.
unregistered
=
false
;
}
else
if
(
auth
==
2001
)
{
that
.
unregistered
=
false
;
}
},
async
loginSession
()
{
...
...
@@ -108,14 +109,15 @@
*/
if
(
this
.
checkSessionStatus
&&
token
)
{
let
token
=
uni
.
getStorageSync
(
'
token
'
);
console
.
log
(
"
token的值====================
"
+
token
)
console
.
log
(
"
token的值====================
"
+
token
)
this
.
auth
();
}
else
{
console
.
log
(
"
走吗1
"
)
// session 不存在,调用login。userInfo 。更新session
uni
.
login
({
success
:
function
(
info
)
{
//调用code
console
.
log
(
"
code000000000000000000000000==========
"
,
info
.
code
,
that
.
companyId
)
console
.
log
(
"
code000000000000000000000000==========
"
,
info
.
code
,
that
.
companyId
)
that
.
$store
.
commit
(
'
wxCode
'
,
info
.
code
);
//按钮切换全选。
let
userInfo
=
that
.
getUserInfo
(
info
.
code
);
userInfo
.
then
(
res
=>
{
...
...
@@ -125,22 +127,22 @@
console
.
log
(
"
checkcode拿到了拿到了
"
)
console
.
log
(
checkCode
)
that
.
unregistered
=
true
;
}
else
if
(
checkCode
==
2001
)
{
}
else
if
(
checkCode
==
2001
)
{
that
.
unregistered
=
false
;
}
})
})
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
console
.
log
(
err
)
that
.
loading
=
false
;
uni
.
showToast
({
title
:
err
,
duration
:
2000
,
icon
:
'
none
'
icon
:
'
none
'
});
}
})
}
...
...
@@ -163,7 +165,32 @@
that
.
loginSession
()
}
})
},
// // 获取隐私授权
// privacySetting() {
// wx.getPrivacySetting({
// success: res => {
// console.log(
// res) // 返回结果为: res = { needAuthorization: true/false, privacyContractName: '《xxx隐私保护指引》' }
// if (res.needAuthorization) {
// // 需要弹出隐私协议
// this.showPrivacy=true
// } else {
// this.showPrivacy=true
// // 用户已经同意过隐私协议,所以不需要再弹出隐私协议,也能调用已声明过的隐私接口
// // wx.getUserProfile()
// // wx.chooseMedia()
// // wx.getClipboardData()
// // wx.startRecord()
// }
// },
// fail: () => {},
// complete: () => {}
// })
// },
//授权callback
privacyCal
(){
this
.
showPrivacy
=
false
}
},
onHide
()
{},
...
...
@@ -172,25 +199,29 @@
},
onReady
()
{
wx
.
clearStorage
();
if
(
COMPANY_ID
)
{
//配置了COMPANY_ID用COMPANY_ID 。否则用router上的COMPANY_ID
if
(
COMPANY_ID
)
{
//配置了COMPANY_ID用COMPANY_ID 。否则用router上的COMPANY_ID
this
.
companyId
=
COMPANY_ID
}
if
(
this
.
$Route
.
query
.
companyId
)
{
if
(
this
.
$Route
.
query
.
companyId
)
{
this
.
companyId
=
this
.
$Route
.
query
.
companyId
}
if
(
!
COMPANY_ID
&&
!
this
.
$Route
.
query
.
companyId
)
{
if
(
!
COMPANY_ID
&&
!
this
.
$Route
.
query
.
companyId
)
{
this
.
companyId
=
""
}
uni
.
setStorageSync
(
"
companyId
"
,
this
.
companyId
)
uni
.
setStorageSync
(
"
companyId
"
,
this
.
companyId
)
this
.
getAuth
();
},
onShareAppMessage
(
res
){
onShareAppMessage
(
res
)
{
return
{
path
:
'
pages/index/defalutScreen
'
path
:
'
pages/index/defalutScreen
'
}
},
onLoad
(
options
){
onLoad
(
options
)
{
}
}
...
...
pages/public/callCenter.vue
View file @
90609146
...
...
@@ -48,72 +48,6 @@
}
})
// var userInfo = {
// userId: 'user111111111',
// data: [{
// "key": "real_name",
// "value": "用户A"
// },
// {
// "key": "mobile_phone",
// "value": "13800000000"
// },
// {
// "key": "email",
// "value": "13800000000@163.com"
// },
// {
// "index": 0,
// "key": "account",
// "label": "账号",
// "value": "zhangsan",
// "href": "http://example.domain/user/zhangsan"
// },
// {
// "index": 1,
// "key": "sex",
// "label": "性别",
// "value": "先生"
// },
// {
// "index": 2,
// "key": "reg_date",
// "label": "注册日期",
// "value": "2015-11-16"
// },
// {
// "index": 3,
// "key": "last_login",
// "label": "上次登录时间",
// "value": "2015-12-22 15:38:54"
// },
// {
// "index": 4,
// "key": "avatar",
// "label": "头像",
// "value": "https://ysf.nosdn.127.net/985726b5a8840b84a8a90c6b71642813"
// }
// ],
// }
// myPluginInterface._$configTitle('七鱼客服11'); //设置客服聊天窗口标题
// let product = {
// title: '[1]任天堂(Nintendo)Switch游戏机',
// desc: '任天堂(Nintendo) Switch NS NX掌上游戏机便携 塞尔达马里奥新款游戏机 主机不锁 日版黑机彩色手柄+中文赛/塞尔达传说(指南+地图)',
// note: '$2330',
// picture: 'https://img10.360buyimg.com/n5/s75x75_jfs/t4030/290/29851193/293745/d5e2b731/58ac3506Nbb57b5f6.jpg',
// url: 'https://www.taobao.com/',
// isShow: 1,
// sendByUser: 1,
// sendProToRobot: 1,
// };
// myPluginInterface._$configProduct(product); //配置商品信息
// myPluginInterface._$sendProduct(product); //自动发送
}
},
created
()
{
...
...
shopro/store/index.js
View file @
90609146
...
...
@@ -3,12 +3,14 @@ import Vuex from 'vuex'
Vue
.
use
(
Vuex
)
import
user
from
'
./modules/user.js
'
import
privacy
from
'
./modules/privacy.js
'
// import cart from './modules/cart.js'
// import cofirm from './modules/cofirm.js'
const
store
=
new
Vuex
.
Store
({
modules
:
{
user
user
,
privacy
}
})
...
...
shopro/store/modules/privacy.js
0 → 100644
View file @
90609146
// 用户数据模块
import
http
from
'
@/shopro/request/index
'
import
api
from
"
@/shopro/request/index
"
;
import
{
MALL_ID
,
COMPANY_ID
}
from
"
@/env
"
;
import
qs
from
'
qs
'
;
const
state
=
{
showPrivacy
:
false
,
}
const
getters
=
{
showPrivacy
:
state
=>
state
.
showPrivacy
,
}
const
actions
=
{
}
const
mutations
=
{
// 获取隐私-查询隐私是否需要授权
getPrivacySetting
(
state
)
{
wx
.
getPrivacySetting
({
success
(
res
)
{
console
.
log
(
'
是否需要授权:
'
,
res
.
needAuthorization
,
'
隐私协议的名称为:
'
,
res
.
privacyContractName
);
if
(
res
.
needAuthorization
)
{
state
.
showPrivacy
=
true
}
else
{
state
.
showPrivacy
=
false
}
}
})
},
// 打开协议文章
openPrivacyContract
()
{
wx
.
openPrivacyContract
({
success
:
()
=>
{},
// 打开成功
fail
:
()
=>
{
this
.
$u
.
toast
(
"
遇到错误
"
);
}
})
},
// 同意隐私协议
agreePrivacyAuthorization
(
state
)
{
wx
.
requirePrivacyAuthorize
({
success
:
res
=>
{
console
.
log
(
res
)
state
.
showPrivacy
=
false
}
});
},
}
export
default
{
state
,
mutations
,
actions
,
getters
}
static/style/common.scss
View file @
90609146
...
...
@@ -24,7 +24,9 @@
.brd
{
border-radius
:
20rpx
;
}
.blue
{
color
:
#4395ff
;
}
::-webkit-scrollbar
{
display
:
none
;
width
:
0
!
important
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment