Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
fe81399e
Commit
fe81399e
authored
Apr 02, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维护信息未成功
parent
aa19b01b
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
254 additions
and
264 deletions
+254
-264
package.json
wx_application/package.json
+1
-0
index.html
wx_application/public/counterPageHome/index.html
+1
-1
code.jpg
wx_application/public/img/code.jpg
+0
-0
voucher.js
wx_application/src/api/sidebar/voucher.js
+9
-8
main.js
wx_application/src/main.js
+3
-0
aCommon.js
wx_application/src/utils/aCommon.js
+9
-21
chargeCode.vue
wx_application/src/views/counter/chargeCode.vue
+35
-5
counterEdit copy.vue
wx_application/src/views/counter/counterEdit copy.vue
+0
-105
counterEdit.vue
wx_application/src/views/counter/counterEdit.vue
+69
-30
counterInfo.vue
wx_application/src/views/counter/counterInfo.vue
+24
-6
pushStoreInfo.vue
wx_application/src/views/counter/pushStoreInfo.vue
+36
-21
index.vue
wx_application/src/views/mainSale/active/main/index.vue
+0
-4
index.vue
wx_application/src/views/mainSale/me/main/index.vue
+56
-52
index.html
ybf_wx/public/register/index.html
+8
-9
index.vue
ybf_wx/src/views/qrCode/index.vue
+1
-1
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+2
-1
No files found.
wx_application/package.json
View file @
fe81399e
...
...
@@ -17,6 +17,7 @@
"jssdk"
:
"^0.0.1"
,
"vant"
:
"^2.5.9"
,
"vconsole"
:
"^3.3.4"
,
"vee-validate"
:
"^3.2.5"
,
"vue"
:
"^2.6.10"
,
"vue-quill-editor"
:
"^3.0.6"
,
"vue-router"
:
"^3.1.6"
,
...
...
wx_application/public/counterPageHome/index.html
View file @
fe81399e
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"UTF-8"
>
<title>
会员拉新
</title>
<title>
专柜首页
</title>
<link
rel=
"stylesheet"
href=
"../css/swiper.css"
/>
<link
rel=
"stylesheet"
href=
"../css/iconfont.css"
>
<script
src=
"../js/jquery-3.4.1.min.js"
></script>
...
...
wx_application/public/img/code.jpg
0 → 100644
View file @
fe81399e
1.35 KB
wx_application/src/api/sidebar/voucher.js
View file @
fe81399e
...
...
@@ -3,15 +3,16 @@ import qs from 'qs'
export
function
getUserInfoByUserId
(
params
)
{
return
requestCF
({
url
:
'/admin/auth/addressbook/clerk/get
ByUserIdOrUserName
'
,
url
:
'/admin/auth/addressbook/clerk/get
StallCodeByClerkId
'
,
method
:
'get'
,
params
})
}
// export function ApiLoginSubmit(inData) {
// return requestCF({
// url: '/admin/common/login',
// method: 'post',
// data: qs.stringify(inData)
// })
// }
// 门店维护
export
function
editStore
(
data
)
{
return
requestCF
({
url
:
'/admin/auth/stall/settingOrUpdateStall'
,
method
:
'post'
,
data
})
}
wx_application/src/main.js
View file @
fe81399e
...
...
@@ -7,7 +7,10 @@ import './lib/rem';
import
Vant
from
'vant'
;
import
{
Toast
}
from
'vant'
;
import
'vant/lib/index.css'
;
import
vConsole
from
'vconsole'
Vue
.
prototype
.
$vConsole
=
new
vConsole
()
Vue
.
config
.
productionTip
=
false
Vue
.
use
(
Vant
);
...
...
wx_application/src/utils/aCommon.js
View file @
fe81399e
...
...
@@ -21,10 +21,7 @@ async function getXToken() {
await
wxRequest
(
'/workWx/auth/oauth2/getAccessToken'
,
qs
.
stringify
(
postData
)).
then
(
res
=>
{
if
(
res
.
result
===
'success'
)
{
sessionStorage
.
setItem
(
'XToken'
,
res
.
data
)
console
.
log
(
'%c--->getXToken: RD ='
,
'background: limegreen;'
,
res
)
}
else
{
console
.
log
(
'%c--->getXToken: N/A. '
,
'background: red;'
)
// this.$message({
// message: res.errorMsg,
// type: 'error'
...
...
@@ -66,17 +63,9 @@ Vue.prototype.getAgentAuth = function () {
}
// alert(`--->zCommon.js: header =${JSON.stringify(header)}`)
console
.
log
(
'%c--->getAgentAuth: getJsSdkSignature: PD ='
,
'background: orange;'
,
header
)
wxRequest
(
'/workWx/auth/base/getJsSdkSignature'
,
qs
.
stringify
(
postData
),
header
)
.
then
(
res
=>
{
// alert(`--->zCommon.js: getJsSdkSignature: then.`)
// alert(`--->zCommon.js: getJsSdkSignature: then: res =${JSON.stringify(res)}`)
if
(
res
.
result
===
'success'
)
{
console
.
log
(
'%c--->getAgentAuth: getJsSdkSignature: RD ='
,
'background: limegreen;'
,
res
.
data
)
// alert(`--->zCommon.js: getJsSdkSignature: then: res.result === "success".`)
let
config
=
res
.
data
wx
.
config
({
beta
:
true
,
...
...
@@ -86,7 +75,7 @@ Vue.prototype.getAgentAuth = function () {
nonceStr
:
config
.
jsApiSignature
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
config
.
jsApiSignature
.
signature
,
// 必填,签名
// 根据自己的需求,填写 jsapilist 内容
jsApiList
:
[
'agentConfig'
,
'sendChatMessage'
],
jsApiList
:
[
'agentConfig'
,
'sendChatMessage'
,
'selectExternalContact'
,
'shareToExternalContact'
],
success
:
function
(
res
)
{
},
fail
:
function
(
err
)
{
...
...
@@ -106,7 +95,7 @@ Vue.prototype.getAgentAuth = function () {
// 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口
wx
.
checkJsApi
(
{
jsApiList
:
[
'config'
,
'agentConfig'
,
'sendChatMessage'
],
jsApiList
:
[
'config'
,
'agentConfig'
,
'sendChatMessage'
,
'selectExternalContact'
,
'shareToExternalContact'
],
success
:
function
(
res
)
{
if
(
res
.
errMsg
!=
"checkJsApi:ok"
)
{
// alert("JS-SDK接口检测失败:" + JSON.stringify(res));
...
...
@@ -126,7 +115,7 @@ Vue.prototype.getAgentAuth = function () {
timestamp
:
agentConfig
.
agentJsApiSignature
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
agentConfig
.
agentJsApiSignature
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
agentConfig
.
agentJsApiSignature
.
signature
,
// 必填,签名,agentConfig所以为应用签名
jsApiList
:
[
'sendChatMessage'
],
//必填
jsApiList
:
[
'sendChatMessage'
,
'selectExternalContact'
,
'shareToExternalContact'
],
//必填
success
:
function
(
res
)
{
// alert('agentConfigSuccess')
// alert(`!-->zCommon.js: getJsSdkSignature: then: wx.ready: wx.checkJsApi: getAgentJsSdkSignature: wx.agentConfig: res.`)
...
...
@@ -188,7 +177,7 @@ function configWx(to) {
let
config
=
res
.
data
wx
.
config
({
beta
:
true
,
debug
:
tru
e
,
//调试的时候可以开启
debug
:
fals
e
,
//调试的时候可以开启
appId
:
config
.
jsApiSignature
.
appId
,
// 必填,公众号的唯一标识
timestamp
:
config
.
jsApiSignature
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
config
.
jsApiSignature
.
nonceStr
,
// 必填,生成签名的随机串
...
...
@@ -208,7 +197,7 @@ function configWx(to) {
// router.push(to)
if
(
res
.
errMsg
!=
"checkJsApi:ok"
)
{
//
alert("JS-SDK接口检测失败:" + JSON.stringify(res));
alert
(
"JS-SDK接口检测失败:"
+
JSON
.
stringify
(
res
));
return
false
;
}
}
...
...
@@ -232,9 +221,9 @@ function configWx(to) {
timestamp
:
agentConfig
.
agentJsApiSignature
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
agentConfig
.
agentJsApiSignature
.
nonceStr
,
// 必填,生成签名的随机串
signature
:
agentConfig
.
agentJsApiSignature
.
signature
,
// 必填,签名,agentConfig所以为应用签名
jsApiList
:
[
'getCurExternalContact'
],
//必填
jsApiList
:
[
'getCurExternalContact'
,
'selectExternalContact'
,
'shareToExternalContact'
],
//必填
success
:
function
(
res
)
{
alert
(
'agentConfig:ok'
)
//
alert('agentConfig:ok')
// alert(`--->configWx/getJsSdkSignature/getAgentJsSdkSignature: then: agentConfig: res =${res}`)
// alert(`--->configWx/getJsSdkSignature/getAgentJsSdkSignature: then: agentConfig: to =${JSON.stringify(to)}`)
sessionStorage
.
setItem
(
'zConfigWx'
,
'Pass'
)
...
...
@@ -284,13 +273,12 @@ function getUnionid(to) {
wxRequest
(
'/workWx/auth/contact/getExternalContact'
,
postData
,
header
,
'get'
).
then
(
res
=>
{
if
(
res
.
result
==
'success'
)
{
sessionStorage
.
setItem
(
'unionid'
,
res
.
data
.
externalContact
.
unionId
)
console
.
log
(
'%c--->UnionId: RES: '
,
'background: limegreen;'
,
res
.
data
.
externalContact
.
unionId
)
router
.
push
(
to
)
}
})
}
else
{
console
.
log
(
'%c--->UnionId: N/A'
,
'background: red;'
)
console
.
log
(
res
,
'res'
)
console
.
log
()
}
});
}
...
...
wx_application/src/views/counter/chargeCode.vue
View file @
fe81399e
<
template
>
<div>
<div></div>
<div>
收款码
</div>
<div
class=
"bg"
>
<div
class=
"bd"
>
<div
class=
"title"
>
收款码
</div>
<div
class=
"img"
><img
src=
"../../../public/img/code.jpg"
alt=
""
></div>
</div>
<!--
<div>
收款码
</div>
-->
</div>
</
template
>
...
...
@@ -11,6 +14,33 @@ export default {
}
</
script
>
<
style
>
<
style
scoped
>
.bg
{
background-color
:
#a7cfff
;
display
:
flex
;
justify-content
:
center
;
height
:
100%
;
}
.bd
{
margin-top
:
25px
;
width
:
90%
;
height
:
50%
;
background-color
:
#fff
;
box-shadow
:
0px
2px
4px
0px
rgba
(
221
,
221
,
221
,
1
);
}
.title
{
background-color
:
#f1f1f1
;
height
:
18%
;
justify-content
:
center
;
display
:
flex
;
align-items
:
center
;
font-size
:
22px
;
}
.img
{
justify-content
:
center
;
display
:
flex
;
align-items
:
center
;
height
:
82%
;
}
</
style
>
</
style
>
\ No newline at end of file
wx_application/src/views/counter/counterEdit copy.vue
deleted
100644 → 0
View file @
aa19b01b
<
template
>
<div
class=
"container"
>
<div
class=
"flex-start"
>
<van-uploader
v-model=
"bannerList"
:max-count=
"4"
/>
<div>
<quill-editors
@
ChangeText=
"(text)=>
{content=text}" :title="title" />
<!--
<van-uploader
class=
"avatar-uploader"
/>
D -->
<quill-editor
v-model=
"content"
ref=
"myQuillEditor"
:options=
"editorOption"
@
change=
"onEditorChange($event)"
></quill-editor>
</div>
</div>
<div
class=
"creat"
>
保存信息
</div>
</div>
</
template
>
<
script
>
import
QuillEditors
from
"@/components/quill"
// import { quillEditor } from "vue-quill-editor"
// import "quill/dist/quill.core.css"
// import "quill/dist/quill.snow.css"
// import "quill/dist/quill.bubble.css"
const
toolbarOptions
=
[
[{
size
:
[
"small"
,
false
,
"large"
,
"huge"
]
}],
// 字体大小
[
"image"
]
// 链接、图片、视频
]
export
default
{
components
:
{
// quillEditor
QuillEditors
},
data
()
{
return
{
bannerList
:
[],
content
:
''
,
isClear
:
false
,
detail
:
""
,
editorOption
:
{
placeholder
:
""
,
theme
:
"snow"
,
// or 'bubble'
modules
:
{
toolbar
:
{
container
:
toolbarOptions
,
handlers
:
{
// image: function(value) {
// if (value) {
// // 触发input框选择图片文件
// document.querySelector(".avatar-uploader input").click();
// } else {
// this.quill.format("image", false);
// }
// }
}
}
}
},
header
:
{
},
// 有的图片服务器要求请求头需要有token
serverUrl
:
"https://139.219.7.104:8021/file/upload"
,
// title:
}
},
methods
:
{
change
(
val
)
{
console
.
log
(
val
)
},
onEditorChange
({
editor
,
html
,
text
})
{
console
.
log
(
this
.
content
,
'内容'
)
console
.
log
(
html
,
'html'
)
console
.
log
(
editor
,
'editor'
)
console
.
log
(
text
,
'text'
)
this
.
$emit
(
"input"
,
this
.
content
);
},
}
}
</
script
>
<
style
>
</
style
>
<
style
scoped
>
.container
{
min-height
:
100%
;
height
:
auto
;
background
:
#F8F8F8
;
display
:
flex
;
justify-content
:
space-between
;
flex-direction
:
column
;
align-items
:
center
;
}
.content
{
background
:
#fff
;
height
:
auto
;
}
.creat
{
margin
:
20px
0
;
width
:
343px
;
height
:
40px
;
line-height
:
40px
;
background
:
rgba
(
117
,
178
,
253
,
1
);
border-radius
:
10px
;
font-size
:
16px
;
font-weight
:
bold
;
color
:
rgba
(
255
,
255
,
255
,
1
);
text-align
:
center
;
bottom
:
0
;
}
</
style
>
wx_application/src/views/counter/counterEdit.vue
View file @
fe81399e
...
...
@@ -3,12 +3,11 @@
<div
class=
"flex-start top"
>
<div
class=
"flex-start"
>
<van-cell-group
class=
"gn"
>
<van-cell
title=
"专柜LOGO"
center
class=
"logo"
>
<van-cell
title=
"专柜LOGO"
>
<template
slot=
"default"
>
<van-uploader
v-model=
"addForm.logo"
:max-count=
"1"
class=
"input"
>
<div
class=
"cube"
style=
"width:54px;height:50px;"
>
<van-icon
name=
"photo"
size=
"40"
/>
<div
class=
"mb"
>
点击替换
</div>
<van-uploader
v-model=
"addForm.logoList"
:max-count=
"1"
class=
"input"
:after-read=
"afterRead"
:before-read=
"beforeRead"
@
delete=
"deleteLogo"
>
<div>
<van-icon
name=
"photo"
size=
"20"
/>
</div>
</van-uploader>
</
template
>
...
...
@@ -18,20 +17,15 @@
<van-field
v-model=
"addForm.name"
placeholder=
"输入名称"
class=
"input"
/>
</
template
>
</van-cell>
<van-cell
title=
"门店"
>
<
template
slot=
"default"
>
<van-field
v-model=
"addForm.store"
placeholder=
"输入名称"
class=
"input"
/>
</
template
>
</van-cell>
<van-cell
title=
"专柜地址"
>
<
template
slot=
"default"
>
<van-field
v-model=
"addForm.
address
"
placeholder=
"输入名称"
class=
"input"
/>
<van-field
v-model=
"addForm.
location
"
placeholder=
"输入名称"
class=
"input"
/>
</
template
>
</van-cell>
<div
class=
"border"
>
<div
class=
"des"
>
摘要信息
</div>
<van-field
v-model=
"addForm.
abstract
"
v-model=
"addForm.
summaryTitle
"
rows=
"4"
autosize
type=
"textarea"
...
...
@@ -44,24 +38,25 @@
</div>
<div
class=
"flex-start fwb"
>
<div
class=
"txt"
>
轮播图
</div>
<van-uploader
v-model=
"bannerList"
:max-count=
"4"
class=
"pic"
/>
<van-field
v-model=
"addForm.title"
placeholder=
"标题(不超过30个字)"
maxlength=
"30"
></van-field>
<quill-editor
v-model=
"content"
ref=
"myQuillEditor"
:options=
"editorOption"
@
change=
"onEditorChange($event)"
></quill-editor>
<van-uploader
v-model=
"bannerList"
:max-count=
"4"
class=
"pic"
:before-read=
"beforeRead"
/>
<quill-editor
v-model=
"addForm.summary"
ref=
"myQuillEditor"
:options=
"editorOption"
@
change=
"onEditorChange($event)"
@
delete=
"deleteBanner"
></quill-editor>
</div>
</div>
<div
class=
"creat"
>
保存信息
</div>
<div
class=
"creat"
@
click=
"handleSave"
>
保存信息
</div>
</div>
</template>
<
script
>
import
{
quillEditor
,
Quill
}
from
"vue-quill-editor"
;
import
{
container
,
ImageExtend
,
QuillWatch
}
from
"quill-image-extend-module"
;
import
{
editStore
}
from
"@/api/sidebar/voucher"
;
import
"quill/dist/quill.core.css"
;
import
"quill/dist/quill.snow.css"
;
import
"quill/dist/quill.bubble.css"
;
Quill
.
register
(
"modules/ImageExtend"
,
ImageExtend
);
import
axios
from
'axios'
import
{
log
}
from
'util'
;
const
toolbarOptions
=
[
[{
size
:
[
"small"
,
false
,
"large"
,
"huge"
]
}],
// 字体大小
[
"image"
]
// 图片
...
...
@@ -75,16 +70,17 @@ export default {
data
()
{
return
{
addForm
:
{
logo
:
[],
abstract
:
''
,
s
tor
e
:
''
,
logo
List
:
[],
logo
:
''
,
s
ummaryTitl
e
:
''
,
name
:
''
,
address
:
''
,
title
:
''
location
:
''
,
summary
:
''
},
oyStallCode
:
''
,
list
:
[],
bannerList
:
[],
title
:
""
,
content
:
""
,
// 富文本框参数设置
editorOption
:
{
modules
:
{
...
...
@@ -92,9 +88,6 @@ export default {
name
:
"file"
,
// 图片参数名
// size: 3,
action
:
"http://139.155.48.151:8084/admin/auth/util/saveImg"
,
// response 为一个函数用来获取服务器返回的具体图片地址
// 例如服务器返回{code: 200; data:{ url: 'baidu.com'}}
// 则 return res.data.url
response
:
res
=>
{
return
res
.
data
.
imgPath
;
},
...
...
@@ -117,16 +110,62 @@ export default {
}
};
},
mounted
()
{
this
.
addForm
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
},
methods
:
{
change
(
val
)
{
console
.
log
(
val
)
;
console
.
log
(
val
)
},
onEditorChange
({
editor
,
html
,
text
})
{
console
.
log
(
this
.
content
,
"内容"
)
this
.
$emit
(
"input"
,
this
.
content
)
this
.
$emit
(
"input"
,
this
.
addForm
.
summary
)
},
beforeRead
(
file
)
{
//上传之前校验
if
(
file
.
type
!==
'image/jpeg'
&&
file
.
type
!==
'image/png'
)
{
Toast
(
'只允许上传jpg/png格式的图片!'
)
return
false
}
return
true
},
async
afterRead
(
file
)
{
this
.
addForm
.
logo
=
await
this
.
getImgUrl
(
file
.
file
)
//使用上传的方法。file.file
},
async
getImgUrl
(
file
)
{
let
params
=
new
FormData
()
params
.
append
(
'file'
,
file
)
let
url
=
'http://139.155.48.151:8084/admin/auth/util/saveImg'
const
img
=
await
axios
.
post
(
url
,
params
)
let
urls
=
img
.
data
.
data
.
imgPath
console
.
log
(
urls
,
'urls'
)
return
urls
},
deleteLogo
(
file
)
{
this
.
addForm
.
logo
=
''
},
async
handleSave
()
{
let
list
=
[]
let
carousel
=
'http://139.155.48.151/img/39e948a1-83ae-4769-bd8b-cbdca065a17a.jpeg,http://139.155.48.151/img/1f10d588-13bf-4436-98f0-88bebe557f6f.jpg'
this
.
addForm
.
oyStallCode
=
1
let
lists
=
''
await
this
.
bannerList
.
forEach
(
async
item
=>
{
let
img
=
await
this
.
getImgUrl
(
item
.
file
)
console
.
log
(
img
,
'imggggg'
)
list
.
push
(
img
)
lists
=
list
.
toString
()
})
console
.
log
(
carousel
,
'carousel111'
)
console
.
log
(
lists
,
'lists'
)
editStore
(
Object
.
assign
(
this
.
addForm
,{
carousel
})).
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
})
},
deleteBanner
(
file
)
{
}
}
}
;
}
</
script
>
<
style
>
</
style
>
...
...
wx_application/src/views/counter/counterInfo.vue
View file @
fe81399e
...
...
@@ -38,7 +38,12 @@ import "quill/dist/quill.snow.css"
import
"quill/dist/quill.bubble.css"
export
default
{
data
()
{
return
{};
return
{
oyStallCode
:
''
}
},
mounted
()
{
this
.
getAgentAuth
()
},
methods
:
{
handleEdit
()
{
...
...
@@ -47,14 +52,27 @@ export default {
getChargeCode
()
{
this
.
$router
.
push
(
"chargeCode"
)
},
handlePushInfo
()
{
this
.
$router
.
push
(
"pushStoreInfo"
)
},
handleCounterHome
()
{
handleCounterHome
()
{
this
.
$router
.
push
(
"counterHome"
)
},
handlePushInfo
()
{
this
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
let
url
=
`http://oysales.oywanhao.com:8087/counterPageHome?oyStallCode=
${
this
.
oyStallCode
}
`
wx
.
invoke
(
"shareToExternalContact"
,
{
title
:
'专柜首页'
,
// 消息的标题
desc
:
'专柜首页详情'
,
// 消息的描述
link
:
url
,
// 消息链接
imgUrl
:
''
// 消息封面
},
function
(
res
)
{
if
(
res
.
err_msg
==
"shareToExternalContact:ok"
)
{
this
.
$router
.
push
({
path
:
"counterInfo"
})
}
else
{
console
.
log
(
res
.
err_msg
,
'错误信息'
)
}
})
}
}
}
};
</
script
>
<
style
scoped
>
...
...
wx_application/src/views/counter/pushStoreInfo.vue
View file @
fe81399e
<
template
>
<div
class=
"container"
>
<div>
<!-- 搜索框 --
>
<div>
推送
</div>
<!--
<div
>
<van-search
v-model=
"inputValue"
placeholder=
"请输入搜索关键词"
/>
</div>
<van-checkbox-group
v-model=
"list"
@
change=
"onChange"
>
...
...
@@ -14,13 +14,16 @@
<van-checkbox
slot=
"right-icon"
catch:tap=
"noop"
:name=
"item.id"
/>
</van-cell>
</van-cell-group>
</van-checkbox-group>
<div>
外部联系人{{ info }}
</div>
</van-checkbox-group>
-->
</div>
</template>
<
script
>
import
axios
from
"axios"
;
import
{
wxRequest
}
from
'@/utils/aWxRequest'
// import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
// let vConsole = new VConsole()
export
default
{
data
()
{
return
{
...
...
@@ -47,24 +50,36 @@ export default {
this
.
getList
()
},
methods
:
{
getList
()
{
alert
(
'获取外部联系人'
)
alert
(
sessionStorage
.
getItem
(
'userId'
))
sessionStorage
.
getItem
(
'userId'
)
this
.
userId
=
sessionStorage
.
getItem
(
'userId'
)
axios
({
url
:
"/workWx/auth/contact/listExternalContacts?userId="
+
this
.
userId
,
method
:
"get"
,
headers
:
headerData
})
.
then
(
res
=>
{
alert
(
'获取外部联系人成功'
)
alert
(
'JSON.stringify(res)'
)
this
.
userInfo
=
JSON
.
stringify
(
res
)
getList
()
{
let
url
=
'http://oysales.oywanhao.com:8087/counterPageHome'
wx
.
invoke
(
"shareToExternalContact"
,
{
title
:
'专柜首页'
,
// 消息的标题
desc
:
'专柜首页详情'
,
// 消息的描述
link
:
url
,
// 消息链接
imgUrl
:
''
// 消息封面
},
function
(
res
)
{
if
(
res
.
err_msg
==
"shareToExternalContact:ok"
)
{
this
.
$router
.
push
({
path
:
"counterInfo"
})
}
else
{
console
.
log
(
res
.
err_msg
,
'错误信息'
)
}
})
.
catch
(
err
=>
{
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
});
// this.userId = sessionStorage.getItem('userId')
// let postData = {
// userId: this.userId
// }
// let header = {
// token: sessionStorage.getItem('XToken'),
// corpId: 'ww4df265003b43fa0d',
// agentId: '1000033'
// }
// wx.invoke('selectExternalContact', { "filterType": 0}, function(res){
// if(res.err_msg == "selectExternalContact:ok"){
// console.log(res,'联系人列表')
// }else {
// console.log('获取失败')
// }
// })
},
onChange
(
val
)
{
},
toggle
(
event
)
{
...
...
wx_application/src/views/mainSale/active/main/index.vue
View file @
fe81399e
...
...
@@ -48,11 +48,7 @@
</div>
<div
class=
"main-actives"
>
<div
class=
"actives-banners"
>
<!--
<img
class=
"actives-banner-small"
:src=
"test.activeInfo.icon['0']"
>
-->
<div
class=
"actives-banner-title"
>
现有开展活动
</div>
<!--
<img
class=
"actives-banner-small"
:src=
"test.cache.imgUrl"
>
-->
</div>
<div
class=
"actives-main"
>
<div
class=
"active-logos"
>
...
...
wx_application/src/views/mainSale/me/main/index.vue
View file @
fe81399e
...
...
@@ -69,8 +69,11 @@
</
template
>
<
script
>
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
;
import
axios
from
"axios"
;
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
import
axios
from
"axios"
// import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
import
{
editStore
}
from
"@/api/sidebar/voucher"
;
// let vConsole = new VConsole()
export
default
{
name
:
"me"
,
...
...
@@ -157,12 +160,6 @@
},
// 获取code
zReadyUserId
()
{
/* zlog(
"%c--->this.zcache.code =",
"color: orange;",
this.$route.query.code
) */
if
(
this
.
$route
.
query
.
code
===
undefined
){
// alert('没code')
this
.
zTestPreAuthCode
()
...
...
@@ -172,69 +169,76 @@
this
.
zTestGetUserInfoByOldToken
();
}
},
// 测试-获取当前Url信息
zTestGetNowUrlInfo
()
{
// alert('获取url')
this
.
zcache
.
nowUrl
=
JSON
.
stringify
(
this
.
$route
.
query
);
this
.
zcache
.
code
=
String
(
this
.
$route
.
query
.
code
);
this
.
url
=
this
.
zcache
.
nowUrl
},
zTestPreAuthCode
()
{
// alert('获取code')
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
// appId: "wwd1cdbca7b8b2b6c4",
appId
:
"ww4df265003b43fa0d"
,
redirectUrI
:
encodeURIComponent
(
"oysales.oywanhao.com:8087"
),
responseType
:
"code"
,
scope
:
"snsapi_base"
,
state
:
"ztest"
,
tail
:
"#wechat_redirect"
};
// 测试-获取当前Url信息
zTestGetNowUrlInfo
()
{
this
.
zcache
.
nowUrl
=
JSON
.
stringify
(
this
.
$route
.
query
);
this
.
zcache
.
code
=
String
(
this
.
$route
.
query
.
code
);
this
.
url
=
this
.
zcache
.
nowUrl
},
zTestPreAuthCode
()
{
// alert('获取code')
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
// appId: "wwd1cdbca7b8b2b6c4",
appId
:
"ww4df265003b43fa0d"
,
redirectUrI
:
encodeURIComponent
(
"oysales.oywanhao.com:8087"
),
responseType
:
"code"
,
scope
:
"snsapi_base"
,
state
:
"ztest"
,
tail
:
"#wechat_redirect"
};
let
url
=
basicInfo
.
head
+
"appid="
+
basicInfo
.
appId
+
"&redirect_uri="
+
basicInfo
.
redirectUrI
+
"&response_type="
+
basicInfo
.
responseType
+
"&scope="
+
basicInfo
.
scope
+
"&state="
+
basicInfo
.
state
+
basicInfo
.
tail
;
this
.
zcache
.
preAuthCodeUrl
=
url
;
window
.
location
.
href
=
url
;
},
let
url
=
basicInfo
.
head
+
"appid="
+
basicInfo
.
appId
+
"&redirect_uri="
+
basicInfo
.
redirectUrI
+
"&response_type="
+
basicInfo
.
responseType
+
"&scope="
+
basicInfo
.
scope
+
"&state="
+
basicInfo
.
state
+
basicInfo
.
tail
;
this
.
zcache
.
preAuthCodeUrl
=
url
;
window
.
location
.
href
=
url
;
},
// 测试-获取用户信息
zTestGetUserInfoByOldToken
()
{
// alert('获取用户信息')
let
postData
=
{
code
:
this
.
zcache
.
code
,
};
let
headerData
=
{
agentId
:
"100003
2
"
,
agentId
:
"100003
3
"
,
corpId
:
"ww4df265003b43fa0d"
};
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
)
;
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
)
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code="
+
this
.
zcache
.
code
,
method
:
"post"
,
headers
:
headerData
,
})
.
then
(
res
=>
{
// alert('获取用户信息接口成功')
this
.
userInfo
=
JSON
.
stringify
(
res
);
this
.
zcache
.
userInfoResNew
=
"RESOK:"
+
res
.
data
.
data
.
userId
;
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
));
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
);
// alert('获取用户信息接口成功')
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
))
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
)
this
.
getUserFromId
(
this
.
zcache
.
userId
)
})
.
catch
(
err
=>
{
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
console
.
log
(
err
)
});
},
getUserFromId
(
id
)
{
let
userName
=
id
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
// alert('获取成功')
sessionStorage
.
setItem
(
"oyStallCode"
,
res
.
data
[
0
].
oyStallCode
)
this
.
storeCode
=
res
.
data
[
0
].
oyStallCode
})
.
catch
(
err
=>
{
})
},
handleDetail
(
type
){
if
(
type
===
'message'
){
this
.
$router
.
push
(
'/message'
)
...
...
ybf_wx/public/register/index.html
View file @
fe81399e
...
...
@@ -56,16 +56,15 @@
</div>
<script>
function
GetQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
)
var
context
=
""
if
(
r
!=
null
)
context
=
r
[
2
]
reg
=
null
r
=
null
return
context
==
null
||
context
==
""
||
context
==
"undefined"
?
""
:
context
;
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
)
var
context
=
""
if
(
r
!=
null
)
context
=
r
[
2
]
reg
=
null
r
=
null
return
context
==
null
||
context
==
""
||
context
==
"undefined"
?
""
:
context
;
}
// alert(GetQueryString("storeCode"))
const
storecode
=
GetQueryString
(
"storeCode"
)
$
(
function
()
{
showQRInfo
()
...
...
ybf_wx/src/views/qrCode/index.vue
View file @
fe81399e
...
...
@@ -21,7 +21,7 @@ export default {
// alert('--->arCode: mounted: IN.')
this
.
cleanUrl
()
// this.getAcessToken();
this
.
createCode
()
;
this
.
createCode
()
},
methods
:
{
cleanUrl
()
{
...
...
ybf_wx/src/views/sideNav/register/index.vue
View file @
fe81399e
...
...
@@ -29,7 +29,8 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
logoUrl
:
"/mainSale/4.png"
}
],
storeCode
:
''
storeCode
:
''
,
oyStallCode
:
''
}
},
created
()
{
...
...
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