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
4a94b1d0
Commit
4a94b1d0
authored
Apr 05, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页修改
parent
d8baabf8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
157 additions
and
60 deletions
+157
-60
index.html
wx_application/public/counterPageHome/index.html
+2
-1
main.js
wx_application/src/main.js
+40
-40
index.js
wx_application/src/router/index.js
+2
-2
index.vue
wx_application/src/views/mainSale/active/main/index.vue
+112
-16
index.vue
wx_application/src/views/mainSale/me/main/index.vue
+1
-1
No files found.
wx_application/public/counterPageHome/index.html
View file @
4a94b1d0
...
...
@@ -148,7 +148,8 @@
pagination
:
'.swiper-pagination'
,
})
let
info
=
data
.
data
.
stallInfo
$
(
"#logo"
).
attr
(
'src'
,
info
.
logo
)
$
(
"#logo"
).
attr
(
'src'
,
info
.
logo
)
$
(
".title"
).
text
(
info
.
name
)
let
content
=
info
.
summary
.
replace
(
/<img/g
,
'<img style="width:100%;"'
)
$
(
"#address"
).
text
(
info
.
location
)
$
(
"#phone"
).
text
(
info
.
phone
)
...
...
wx_application/src/main.js
View file @
4a94b1d0
...
...
@@ -8,50 +8,50 @@ import Vant from 'vant';
import
{
Toast
}
from
'vant'
;
import
'vant/lib/index.css'
;
import
vConsole
from
'vconsole'
import
VeeValidate
,
{
Validator
}
from
'vee-validate'
//
import VeeValidate, { Validator } from 'vee-validate'
import
cn
from
'vee-validate/dist/locale/zh_CN'
;
Validator
.
addLocale
(
cn
)
Vue
.
use
(
VeeValidate
,
{
locale
:
'zh_CN'
})
//
Vue.use(VeeValidate, {
//
locale: 'zh_CN'
//
})
const
dictionary
=
{
zh_CN
:
{
messages
:
{
required
:
(
val
)
=>
{
let
msg
=
''
switch
(
val
)
{
case
'logo'
:
msg
=
'logo'
break
case
'name'
:
msg
=
'专柜名称'
break
case
'location'
:
msg
=
'专柜地址'
break
case
'number'
:
msg
=
'电话号码'
break
case
'summaryTitle'
:
msg
=
'摘要信息'
break
case
'summary'
:
msg
=
'正文内容'
break
case
'banner'
:
msg
=
'轮播图'
break
default
:;
}
msg
=
msg
+
'不能为空'
return
msg
}
}
}
}
Validator
.
updateDictionary
(
dictionary
)
//
const dictionary = {
//
zh_CN: {
//
messages: {
//
required: (val) => {
//
let msg = ''
//
switch (val) {
//
case 'logo':
//
msg = 'logo'
//
break
//
case 'name':
//
msg = '专柜名称'
//
break
//
case 'location':
//
msg = '专柜地址'
//
break
//
case 'number':
//
msg = '电话号码'
//
break
//
case 'summaryTitle':
//
msg = '摘要信息'
//
break
//
case 'summary':
//
msg = '正文内容'
//
break
//
case 'banner':
//
msg = '轮播图'
//
break
//
default:;
//
}
//
msg = msg + '不能为空'
//
return msg
//
}
//
}
//
}
//
}
//
Validator.updateDictionary(dictionary)
Vue
.
prototype
.
$vConsole
=
new
vConsole
()
Vue
.
config
.
productionTip
=
false
...
...
wx_application/src/router/index.js
View file @
4a94b1d0
...
...
@@ -9,8 +9,8 @@ Vue.use(VueRouter)
const
routes
=
[
{
path
:
'/'
,
name
:
'
M
e'
,
component
:
()
=>
import
(
'@/views/mainSale/
m
e/main/index'
)
name
:
'
mainSal
e'
,
component
:
()
=>
import
(
'@/views/mainSale/
activ
e/main/index'
)
},
{
path
:
'/turntableDetail'
,
...
...
wx_application/src/views/mainSale/active/main/index.vue
View file @
4a94b1d0
...
...
@@ -20,14 +20,18 @@
</div>
<div
class=
"main-menus"
>
<div
class=
"menus-row"
>
<div
class=
"menu"
>
<
!--
<
div
class=
"menu"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['1']"
/>
<div
class=
"menu-text"
>
优惠券核销
</div>
</div>
</div>
-->
<div
class=
"menu"
@
click=
"menu02Click"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['2']"
/>
<div
class=
"menu-text"
>
任务列表
</div>
</div>
<div
class=
"menu"
@
click=
"menu05Click"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['5']"
/>
<div
class=
"menu-text"
>
活动模版
</div>
</div>
<div
class=
"menu"
@
click=
"menu03Click"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['3']"
/>
<div
class=
"menu-text"
>
活动列表
</div>
...
...
@@ -37,15 +41,12 @@
<div
class=
"menu"
@
click=
"menu04Click"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['4']"
/>
<div
class=
"menu-text"
>
专柜维护
</div>
</div>
<div
class=
"menu"
@
click=
"menu05Click"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['5']"
/>
<div
class=
"menu-text"
>
活动模版
</div>
</div>
</div>
<div
class=
"menu"
@
click=
"menu06Click"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['6']"
/>
<div
class=
"menu-text"
>
商品管理
</div>
</div>
<div
class=
"menu"
></div>
</div>
</div>
<div
class=
"main-actives"
>
...
...
@@ -112,6 +113,8 @@
<
script
>
import
axios
from
"axios"
import
{
getStoreDetail
}
from
"@/api/sidebar/voucher"
;
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
import
{
getUserInfoByUserId
}
from
"@/api/sidebar/voucher"
;
export
default
{
name
:
"discountIndex"
,
data
()
{
...
...
@@ -193,16 +196,25 @@ export default {
},
dis
:
{},
oyStallCode
:
''
,
userId
:
''
};
userId
:
''
,
zcache
:
{
nowUrl
:
""
,
preAuthCodeUrl
:
""
,
code
:
""
,
userId
:
""
,
userInfoResOld
:
""
,
userInfoResNew
:
""
}
}
},
created
()
{
this
.
checkNowMenuBar
()
this
.
oyStallCode
=
sessionStorage
.
getItem
(
'oyStallCode'
)
this
.
userId
=
sessionStorage
.
getItem
(
'userId'
)
this
.
getUserInfo
()
this
.
getStore
()
this
.
getFans
()
this
.
zReadyUserId
()
this
.
zTestGetNowUrlInfo
()
// this.oyStallCode = sessionStorage.getItem('oyStallCode')
// this.userId = sessionStorage.getItem('userId')
},
methods
:
{
// 获取用户信息
...
...
@@ -213,13 +225,14 @@ export default {
};
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/user/get?userId="
+
this
.
userId
,
url
:
"http://139.155.48.151:8085/workWx/auth/user/get?userId="
+
this
.
zcache
.
userId
,
method
:
"get"
,
headers
:
headerData
})
.
then
(
res
=>
{
this
.
test
.
manInfo
.
barFrom
=
res
.
data
.
data
.
name
this
.
test
.
manInfo
.
logoUrl
=
res
.
data
.
data
.
avatar
sessionStorage
.
setItem
(
"avatar"
,
res
.
data
.
data
.
avatar
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
...
...
@@ -232,7 +245,7 @@ export default {
};
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId="
+
this
.
userId
,
url
:
"http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId="
+
this
.
zcache
.
userId
,
method
:
"get"
,
headers
:
headerData
})
...
...
@@ -298,6 +311,89 @@ export default {
},
menuTask
()
{
this
.
$router
.
push
({
path
:
"/taskList"
});
},
// 获取code
zReadyUserId
()
{
if
(
this
.
$route
.
query
.
code
===
undefined
){
// alert('没code')
this
.
zTestPreAuthCode
()
}
else
{
// alert('有code')
this
.
zTestGetNowUrlInfo
();
this
.
zTestGetUserInfoByOldToken
();
}
},
// 测试-获取当前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
;
},
// 测试-获取用户信息
zTestGetUserInfoByOldToken
()
{
let
postData
=
{
code
:
this
.
zcache
.
code
,
};
let
headerData
=
{
agentId
:
"1000033"
,
corpId
:
"ww4df265003b43fa0d"
};
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('获取用户信息接口成功')
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
))
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
)
this
.
getUserFromId
(
this
.
zcache
.
userId
)
this
.
getUserInfo
()
})
.
catch
(
err
=>
{
console
.
log
(
err
)
});
},
getUserFromId
(
id
)
{
let
userName
=
id
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
sessionStorage
.
setItem
(
"oyStallCode"
,
res
.
data
[
0
].
oyStallCode
)
this
.
oyStallCode
=
res
.
data
[
0
].
oyStallCode
this
.
getStore
()
this
.
getFans
()
})
.
catch
(
err
=>
{
})
}
}
};
...
...
wx_application/src/views/mainSale/me/main/index.vue
View file @
4a94b1d0
...
...
@@ -131,7 +131,7 @@
},
mounted
()
{
this
.
checkNowMenuBar
()
this
.
zReadyUserId
()
//
this.zReadyUserId()
this
.
zTestGetNowUrlInfo
()
},
...
...
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