Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
ybf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xulili
ybf
Commits
2bc6d220
Commit
2bc6d220
authored
Mar 25, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安卓无法上传问题git commit -m 安卓无法上传问题
parent
4af8a81c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
52 deletions
+50
-52
index.html
wx_application/public/index.html
+2
-2
index.html
ybf_wx/public/index.html
+1
-1
aCommon.js
ybf_wx/src/utils/aCommon.js
+9
-5
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+24
-41
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+14
-3
No files found.
wx_application/public/index.html
View file @
2bc6d220
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
亿百分
</title>
<title>
亿百分
</title>
<script
type=
"text/javascript"
src=
"js/jquery-3.4.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-3.4.1.min.js"
></script>
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.
6
.0.js"
></script>
<script
src=
"http://res.wx.qq.com/open/js/jweixin-1.
2
.0.js"
></script>
</head>
</head>
<body>
<body>
<noscript>
<noscript>
...
@@ -15,6 +15,6 @@
...
@@ -15,6 +15,6 @@
</noscript>
</noscript>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
<!-- built files will be auto injected -->
<
script
src=
"http://res.wx.qq.com/open/js/jweixin-1.2.0.js"
></script
>
<
!-- <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> --
>
</body>
</body>
</html>
</html>
ybf_wx/public/index.html
View file @
2bc6d220
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
亿百分
</title>
<title>
亿百分
</title>
<script
type=
"text/javascript"
src=
"js/jquery-3.4.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/jquery-3.4.1.min.js"
></script>
<
script
src=
"http://res.wx.qq.com/open/js/jweixin-1.6.0.js"
></script
>
<
!-- <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> --
>
</head>
</head>
<body>
<body>
<noscript>
<noscript>
...
...
ybf_wx/src/utils/aCommon.js
View file @
2bc6d220
...
@@ -55,7 +55,6 @@ function isIosOrAndroid() {
...
@@ -55,7 +55,6 @@ function isIosOrAndroid() {
Vue
.
prototype
.
getAgentAuth
=
function
()
{
Vue
.
prototype
.
getAgentAuth
=
function
()
{
zlog
(
'%c--->IN: getAgentAuth: location.href ='
,
'color: orange;'
,
location
.
href
)
zlog
(
'%c--->IN: getAgentAuth: location.href ='
,
'color: orange;'
,
location
.
href
)
// alert(`--->zCommon.js: IN.`)
// alert(`--->zCommon.js: IN.`)
let
postData
=
{
let
postData
=
{
// businessId: sessionStorage.getItem('businessId'),
// businessId: sessionStorage.getItem('businessId'),
// pageUrl: encodeURIComponent(this.isIosOrAndroid() === 'android' ? location.href.split('#')[0] : window.initUrl)
// pageUrl: encodeURIComponent(this.isIosOrAndroid() === 'android' ? location.href.split('#')[0] : window.initUrl)
...
@@ -90,7 +89,11 @@ Vue.prototype.getAgentAuth = function () {
...
@@ -90,7 +89,11 @@ Vue.prototype.getAgentAuth = function () {
nonceStr
:
config
.
jsApiSignature
.
nonceStr
,
// 必填,生成签名的随机串
nonceStr
:
config
.
jsApiSignature
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
config
.
jsApiSignature
.
signature
,
// 必填,签名
signature
:
config
.
jsApiSignature
.
signature
,
// 必填,签名
// 根据自己的需求,填写 jsapilist 内容
// 根据自己的需求,填写 jsapilist 内容
jsApiList
:
[
'agentConfig'
]
jsApiList
:
[
'agentConfig'
,
'sendChatMessage'
],
success
:
function
(
res
)
{
},
fail
:
function
(
err
)
{
}
})
})
// alert(`--->zCommon.js: getJsSdkSignature: then: wx.config: end.`)
// alert(`--->zCommon.js: getJsSdkSignature: then: wx.config: end.`)
...
@@ -100,16 +103,15 @@ Vue.prototype.getAgentAuth = function () {
...
@@ -100,16 +103,15 @@ Vue.prototype.getAgentAuth = function () {
// JS-SDK配置信息验证失败时会进入此方法
// JS-SDK配置信息验证失败时会进入此方法
wx
.
error
(
function
(
res
)
{
wx
.
error
(
function
(
res
)
{
// alert("JS-SDK配置信息验证失败 \r\n" + JSON.stringify(res));
})
})
// 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口
// 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口
wx
.
checkJsApi
(
wx
.
checkJsApi
(
{
{
jsApiList
:
[
'agentConfig'
,
'sendChatMessage'
],
jsApiList
:
[
'
config'
,
'
agentConfig'
,
'sendChatMessage'
],
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
errMsg
!=
"checkJsApi:ok"
)
{
if
(
res
.
errMsg
!=
"checkJsApi:ok"
)
{
//
alert("JS-SDK接口检测失败:" + JSON.stringify(res));
alert
(
"JS-SDK接口检测失败:"
+
JSON
.
stringify
(
res
));
return
false
;
return
false
;
}
else
{
}
else
{
wxRequest
(
'/workWx/auth/base/getAgentJsSdkSignature'
,
qs
.
stringify
(
postData
),
header
)
wxRequest
(
'/workWx/auth/base/getAgentJsSdkSignature'
,
qs
.
stringify
(
postData
),
header
)
...
@@ -128,6 +130,7 @@ Vue.prototype.getAgentAuth = function () {
...
@@ -128,6 +130,7 @@ Vue.prototype.getAgentAuth = function () {
signature
:
agentConfig
.
agentJsApiSignature
.
signature
,
// 必填,签名,agentConfig所以为应用签名
signature
:
agentConfig
.
agentJsApiSignature
.
signature
,
// 必填,签名,agentConfig所以为应用签名
jsApiList
:
[
'sendChatMessage'
],
//必填
jsApiList
:
[
'sendChatMessage'
],
//必填
success
:
function
(
res
)
{
success
:
function
(
res
)
{
alert
(
'agentConfigSuccess'
)
// alert(`!-->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: getAgentJsSdkSignature: wx.agentConfig: res.`)
// alert(`!-->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: getAgentJsSdkSignature: wx.agentConfig: res.`)
// alert(`!-->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: getAgentJsSdkSignature: wx.agentConfig: res =${JSON.stringify(res)}`)
// alert(`!-->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: getAgentJsSdkSignature: wx.agentConfig: res =${JSON.stringify(res)}`)
// alert('agentConfig:ok')
// alert('agentConfig:ok')
...
@@ -138,6 +141,7 @@ Vue.prototype.getAgentAuth = function () {
...
@@ -138,6 +141,7 @@ Vue.prototype.getAgentAuth = function () {
// alert('wx.agentConfig 回调'+res.errMsg);
// alert('wx.agentConfig 回调'+res.errMsg);
},
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
alert
(
'agentConfigFailed'
)
// alert('回调失败:'+res.errMsg)
// alert('回调失败:'+res.errMsg)
if
(
res
.
errMsg
.
indexOf
(
'is not a function'
)
>
-
1
)
{
if
(
res
.
errMsg
.
indexOf
(
'is not a function'
)
>
-
1
)
{
alert
(
'<i class="weui-icon-warn">版本过低请升级</i>'
)
alert
(
'<i class="weui-icon-warn">版本过低请升级</i>'
)
...
...
ybf_wx/src/views/sideNav/discount/index.vue
View file @
2bc6d220
...
@@ -91,6 +91,7 @@ export default {
...
@@ -91,6 +91,7 @@ export default {
this
.
zcache
.
userId
=
this
.
$route
.
params
.
userId
;
this
.
zcache
.
userId
=
this
.
$route
.
params
.
userId
;
this
.
zReadyGetUserFromId
();
this
.
zReadyGetUserFromId
();
this
.
getAgentAuth
();
this
.
getAgentAuth
();
this
.
zReadySetVoucherList
()
},
},
mounted
()
{
mounted
()
{
},
},
...
@@ -128,8 +129,7 @@ export default {
...
@@ -128,8 +129,7 @@ export default {
let
postData
=
{
let
postData
=
{
param
:
this
.
zcache
.
userId
param
:
this
.
zcache
.
userId
// param: 'ZhouHeQiang'
// param: 'ZhouHeQiang'
};
}
// alert(`--->userInfoFromId: postData = ${JSON.stringify(postData)}`);
getUserInfoByUserId
(
postData
)
getUserInfoByUserId
(
postData
)
.
then
(
res
=>
{
.
then
(
res
=>
{
// alert(`--->userInfoFromId: res = ${JSON.stringify(res.data[0])}`);
// alert(`--->userInfoFromId: res = ${JSON.stringify(res.data[0])}`);
...
@@ -139,37 +139,33 @@ export default {
...
@@ -139,37 +139,33 @@ export default {
// this.zcache.storeId = Number(res.data[0].stall);
// this.zcache.storeId = Number(res.data[0].stall);
this
.
zReadySetVoucherList
();
this
.
zReadySetVoucherList
();
})
})
.
catch
(
err
=>
{})
;
.
catch
(
err
=>
{})
},
},
// 获取优惠券列表
// 获取优惠券列表
zReadySetVoucherList
()
{
zReadySetVoucherList
()
{
alert
(
'获取优惠券'
)
this
.
zReadyDelVoucherList
();
this
.
zReadyDelVoucherList
();
const
postData
=
{
const
postData
=
{
appCode
:
"0696"
,
// j接口编码
appCode
:
"0696"
,
// j接口编码
mdid
:
this
.
zcache
.
storeId
// mdid: this.zcache.storeId
};
mdid
:
1
}
// alert(`--->PostToEA: postData = ${JSON.stringify(postData)}`);
alert
(
'准备进入请求优惠券列表'
)
zlog
(
"%c--->VoucherList: PD ="
,
"background: orange;"
,
postData
);
getVoucherList
(
postData
).
then
(
res
=>
{
alert
(
'getVoucherList'
)
getVoucherList
(
postData
)
zlog
(
"%c--->VoucherList: RD ="
,
"background: limegreen;"
,
res
);
.
then
(
res
=>
{
this
.
zVoucherSet
(
res
.
result
.
coupons
);
zlog
(
"%c--->VoucherList: RD ="
,
"background: limegreen;"
,
res
);
// alert(`--->PostToEA: Res = ${JSON.stringify(res)}`);
this
.
zVoucherSet
(
res
.
result
.
coupons
);
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
// alert(`--->PostToEA: err = ${JSON.stringify(err)}`);
});
});
},
},
zReadyDelVoucherList
()
{
zReadyDelVoucherList
()
{
this
.
zVoucherDel
();
this
.
zVoucherDel
();
this
.
zVoucherUrlDel
();
this
.
zVoucherUrlDel
();
},
},
zVoucherPick
(
inActiveId
,
inVoucherId
)
{
zVoucherPick
(
inActiveId
,
inVoucherId
)
{
alert
(
'推送'
)
this
.
zcache
.
now
.
activeId
=
String
(
inActiveId
)
this
.
zcache
.
now
.
activeId
=
String
(
inActiveId
)
this
.
zcache
.
now
.
voucherId
=
String
(
inVoucherId
)
this
.
zcache
.
now
.
voucherId
=
String
(
inVoucherId
)
...
@@ -184,15 +180,12 @@ export default {
...
@@ -184,15 +180,12 @@ export default {
zlog
(
"%c--->VoucherWxUrl: PD ="
,
"background: red;"
,
postData
);
zlog
(
"%c--->VoucherWxUrl: PD ="
,
"background: red;"
,
postData
);
getVoucherWxUrl
(
postData
).
then
(
res
=>
{
getVoucherWxUrl
(
postData
).
then
(
res
=>
{
zlog
(
"%c--->VoucherWxUrl: RD ="
,
"background: green;"
,
res
);
this
.
zVoucherUrlSet
(
res
.
result
.
link
)
alert
(
'获取列表成功'
)
this
.
zVoucherUrlSet
(
res
.
result
.
link
);
});
});
},
},
zpick
(
inMsgType
,
inUrl
)
{
zpick
(
inMsgType
,
inUrl
)
{
// alert(`--->discount.vue: zpick: IN.`);
switch
(
inMsgType
)
{
switch
(
inMsgType
)
{
case
"text"
:
case
"text"
:
...
@@ -206,23 +199,21 @@ export default {
...
@@ -206,23 +199,21 @@ export default {
},
},
function
(
res
)
{
function
(
res
)
{
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
// alert("--->discount.vue: zpick: text 分享成功!");
alert
(
"--->discount.vue: zpick: text 分享成功!"
)
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
// alert(
alert
(
'分享失败'
)
// `--->discount.vue: zpick: text 分享失败: res =${res.err_msg}`
// );
}
}
}
}
);
);
break
;
break
;
case
"h5"
:
case
"h5"
:
// alert(`--->discount.vue: zpick: H5: IN.`);
// alert(`--->discount.vue: zpick: H5: IN.`);
alert
(
'zpick'
)
wx
.
invoke
(
wx
.
invoke
(
"sendChatMessage"
,
"sendChatMessage"
,
{
{
msgtype
:
"
text
"
,
//消息类型,必填
msgtype
:
"
news
"
,
//消息类型,必填
news
:
{
news
:
{
link
:
`http://qywx2.100smartdata.com/qrCode?Url=
${
inUrl
}
&activeId=
${
this
.
zcache
.
now
.
activeId
}
&voucherId=
${
this
.
zcache
.
now
.
voucherId
}
&unionId=1234`
,
//H5消息页面url 必填
link
:
`http://qywx2.100smartdata.com/qrCode?Url=
${
inUrl
}
&activeId=
${
this
.
zcache
.
now
.
activeId
}
&voucherId=
${
this
.
zcache
.
now
.
voucherId
}
&unionId=1234`
,
//H5消息页面url 必填
title
:
"领取优惠券"
,
//H5消息标题
title
:
"领取优惠券"
,
//H5消息标题
desc
:
inUrl
,
//H5消息摘要
desc
:
inUrl
,
//H5消息摘要
...
@@ -230,10 +221,11 @@ export default {
...
@@ -230,10 +221,11 @@ export default {
}
}
},
},
function
(
res
)
{
function
(
res
)
{
alert
(
'sendChatMessage'
)
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
// alert("--->discount.vue: zpick: h5 分享成功!");
alert
(
"--->discount.vue: zpick: h5 分享成功!"
)
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
// alert(`--->discount.vue: zpick: h5 分享失败.`);
alert
(
`--->discount.vue: zpick: h5 分享失败.`
)
// alert(
// alert(
// `--->discount.vue: zpick: h5 分享失败: res =${res.err_msg}`
// `--->discount.vue: zpick: h5 分享失败: res =${res.err_msg}`
// );
// );
...
@@ -241,21 +233,12 @@ export default {
...
@@ -241,21 +233,12 @@ export default {
}
}
);
);
break
;
break
;
default
:
default
:
break
;
break
;
}
}
// zlog(
// "%c--->Click: Url =",
// "background: orange;",
// String(this.zlist.voucherUrl)
// );
// window.wx.miniProgram.navigateTo({
// url: this.zlist.voucherUrl
// });
},
},
zVoucherSet
(
inArray
)
{
zVoucherSet
(
inArray
)
{
alert
(
'zVoucherSet'
)
this
.
zlist
.
voucher
=
inArray
;
this
.
zlist
.
voucher
=
inArray
;
},
},
...
...
ybf_wx/src/views/sideNav/register/index.vue
View file @
2bc6d220
...
@@ -36,21 +36,32 @@
...
@@ -36,21 +36,32 @@
},
},
methods
:{
methods
:{
sendMessage
(){
sendMessage
(){
const
url
=
'http://www.baidu.com'
wx
.
invoke
(
wx
.
invoke
(
"sendChatMessage"
,
"sendChatMessage"
,
{
{
msgtype
:
"
text
"
,
//消息类型,必填
msgtype
:
"
news
"
,
//消息类型,必填
news
:
{
news
:
{
link
:
`http://qywx2.100smartdata.com/register`
,
//H5消息页面url 必填
link
:
"http://qywx2.100smartdata.com/register"
,
//H5消息页面url 必填
title
:
"会员拉新"
,
//H5消息标题
title
:
"会员拉新"
,
//H5消息标题
desc
:
'注册成为欧亚会员'
,
//H5消息摘要
desc
:
"注册成为欧亚会员"
,
//H5消息摘要
imgUrl
:
""
//H5消息封面图片URL
imgUrl
:
""
//H5消息封面图片URL
}
}
/* news:
{
link: url, //H5消息页面url 必填
title: "", //H5消息标题
desc: "", //H5消息摘要
imgUrl: "", //H5消息封面图片URL
} */
},
},
function
(
res
)
{
function
(
res
)
{
alert
(
'sendChatMessage'
)
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
alert
(
'发送成功'
)
// alert("--->register.vue: zpick: h5 分享成功!");
// alert("--->register.vue: zpick: h5 分享成功!");
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
alert
(
'发送失败'
)
// alert(`--->register.vue: zpick: h5 分享失败.`);
// alert(`--->register.vue: zpick: h5 分享失败.`);
}
}
}
}
...
...
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