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
e7407e23
Commit
e7407e23
authored
5 years ago
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券发放限制&活动专柜切换名称
parent
cb885303
master
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
187 additions
and
57 deletions
+187
-57
index.html
wx_application/public/register/index.html
+1
-1
App.vue
wx_application/src/App.vue
+7
-0
active.js
wx_application/src/api/active.js
+2
-2
test.js
wx_application/src/api/test.js
+8
-0
loading.vue
wx_application/src/components/loading.vue
+1
-3
index.js
wx_application/src/router/index.js
+5
-0
loading.js
wx_application/src/store/modules/loading.js
+16
-0
aTestCF.js
wx_application/src/utils/aTestCF.js
+43
-0
activeList.vue
wx_application/src/views/active/activeList.vue
+4
-2
createActive.vue
wx_application/src/views/active/createActive.vue
+28
-24
createBigWheelActive.vue
wx_application/src/views/active/createBigWheelActive.vue
+1
-0
test.vue
wx_application/src/views/active/test.vue
+27
-0
addCoupon.vue
wx_application/src/views/coupon/addCoupon.vue
+22
-5
manage.vue
wx_application/src/views/goods/manage.vue
+5
-2
index.vue
wx_application/src/views/mainSale/active/main/index.vue
+14
-17
addGroup.vue
ybf_admin/src/pages/in/contact/components/addGroup.vue
+1
-0
editGroup.vue
ybf_admin/src/pages/in/contact/components/editGroup.vue
+1
-0
index.html
ybf_wx/public/register/index.html
+1
-1
No files found.
wx_application/public/register/index.html
View file @
e7407e23
...
...
@@ -2,7 +2,7 @@
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
会员拉新
</title>
<title>
注册会员
</title>
<script
src=
"../js/jquery-3.4.1.min.js"
></script>
<style>
html
,
body
{
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/App.vue
View file @
e7407e23
<
template
>
<div
id=
"app"
>
<loading
v-if=
"LOADING"
/>
<router-view
/>
</div>
</
template
>
<
script
>
import
{
getXToken
}
from
"./utils/aCommon"
;
import
Loading
from
'./components/loading'
;
import
{
mapState
}
from
'vuex'
;
getXToken
();
export
default
{
name
:
"App"
,
components
:
{
Loading
},
computed
:
{
...
mapState
([
'LOADING'
])
}
};
</
script
>
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/api/active.js
View file @
e7407e23
...
...
@@ -83,9 +83,9 @@ export function getAllCouponsByOyStallCode(id) {
/**
* 现有开展活动
*/
export
function
getCurrentActive
()
{
export
function
getCurrentActive
(
stallCode
)
{
return
request
({
url
:
`activity/underway`
,
url
:
`activity/underway
?oyStallCode=
${
stallCode
}
`
,
method
:
'get'
})
}
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/api/test.js
0 → 100644
View file @
e7407e23
import
request
from
'@/utils/aTestCF'
;
export
function
getTemplateList
()
{
return
request
({
url
:
'template/list?pageNo=1&pageSize=10'
,
method
:
'post'
})
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
wx_application/src/components/loading.vue
View file @
e7407e23
<
template
>
<div
id=
"loading"
v-if=
"show"
>
<div
id=
"loading"
>
<van-loading
type=
"spinner"
size=
"80px"
></van-loading>
</div>
</
template
>
...
...
@@ -7,10 +7,8 @@
<
script
>
export
default
{
name
:
"loading"
,
// props: ["show"],
data
()
{
return
{
show
:
false
};
}
};
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/router/index.js
View file @
e7407e23
...
...
@@ -32,6 +32,11 @@ const routes = [
name
:
'activeList'
,
component
:
()
=>
import
(
'../views/active/activeList.vue'
)
},
{
path
:
'/test'
,
name
:
'Test'
,
component
:
()
=>
import
(
'../views/active/test'
)
},
{
path
:
'/createBigWheelActive'
,
name
:
'createBigWheelActive'
,
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/store/modules/loading.js
0 → 100644
View file @
e7407e23
export
default
{
namespace
:
true
,
state
:
{
LOADING
:
false
},
mutations
:
{
showLoading
(
state
)
{
console
.
log
(
'show-loading'
);
state
.
LOADING
=
true
},
hideLoading
(
state
)
{
console
.
log
(
'hide-loading'
);
state
.
LOADING
=
false
}
},
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
wx_application/src/utils/aTestCF.js
0 → 100644
View file @
e7407e23
import
axios
from
'axios'
import
md5
from
"js-md5"
import
qs
from
'qs'
import
store
from
'@/store'
let
BASE_API
=
"http://175.31.197.83:8084"
const
zlog
=
console
.
log
.
bind
(
console
)
// ztest
// 创建 axios 实例
const
service
=
axios
.
create
({
baseURL
:
BASE_API
,
timeout
:
20000
,
paramsSerializer
:
params
=>
qs
.
stringify
(
params
,
{
arrayFormat
:
'repeat'
})
})
// request 拦截器
service
.
interceptors
.
request
.
use
(
request
=>
{
// zlog('--->request: request:', request)
store
.
commit
(
'showLoading'
)
return
request
},
error
=>
{
store
.
commit
(
'hideLoading'
)
Promise
.
reject
(
error
)
}
)
// response 拦截器
service
.
interceptors
.
response
.
use
(
response
=>
{
store
.
commit
(
'hideLoading'
)
return
response
},
error
=>
{
store
.
commit
(
'hideLoading'
)
return
Promise
.
reject
(
error
)
}
)
export
default
service
\ No newline at end of file
This diff is collapsed.
Click to expand it.
wx_application/src/views/active/activeList.vue
View file @
e7407e23
...
...
@@ -73,11 +73,13 @@ export default {
couponList
:
[],
wheel_params
:
{
pageNo
:
1
,
pageSize
:
3
pageSize
:
3
,
oyStallCode
:
sessionStorage
.
getItem
(
"oyStallCode"
)
},
coupon_params
:
{
pageNo
:
1
,
pageSize
:
3
pageSize
:
3
,
oyStallCode
:
sessionStorage
.
getItem
(
"oyStallCode"
)
}
};
},
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/views/active/createActive.vue
View file @
e7407e23
...
...
@@ -59,9 +59,17 @@
<van-cell
:required=
"true"
title=
"活动Logo"
style=
"font-size: 14px"
>
<van-uploader
:max-count=
"1"
v-model=
"logo_imgs"
:after-read=
"afterLogoRead"
></van-uploader>
</van-cell>
<van-cell
:required=
"true"
title=
"单日最大发放数量"
>
<van-cell
:required=
"true"
title=
"选择优惠券"
:value=
"checked_coupon.name"
is-link
@
click=
"handleChoseCoupon"
center
/>
<van-cell
:required=
"true"
title=
"总发放数量"
>
<van-stepper
v-model=
"
maxNumber
"
v-model=
"
totalLimit
"
:show-plus=
"false"
:show-minus=
"false"
input-width=
"140px"
...
...
@@ -76,22 +84,22 @@
class="right noborder"
readonly
clickable
:value="
maxNumber
"
:value="
totalLimit
"
placeholder="请输入限制次数"
@touchstart.native.stop="
maxNumber
_show = true"
@touchstart.native.stop="
totalLimit
_show = true"
/>
<van-number-keyboard
v-model="
maxNumber
"
:show="
maxNumber
_show"
v-model="
totalLimit
"
:show="
totalLimit
_show"
:maxlength="6"
@blur="
maxNumber
_show = false"
@blur="
totalLimit
_show = false"
/>
</div>
</template>-->
</van-cell>
<van-cell
:required=
"true"
title=
"
总
发放数量"
>
<van-cell
:required=
"true"
title=
"
单日最大
发放数量"
>
<van-stepper
v-model=
"
totalLimit
"
v-model=
"
maxNumber
"
:show-plus=
"false"
:show-minus=
"false"
input-width=
"140px"
...
...
@@ -106,27 +114,19 @@
class="right noborder"
readonly
clickable
:value="
totalLimit
"
:value="
maxNumber
"
placeholder="请输入限制次数"
@touchstart.native.stop="
totalLimit
_show = true"
@touchstart.native.stop="
maxNumber
_show = true"
/>
<van-number-keyboard
v-model="
totalLimit
"
:show="
totalLimit
_show"
v-model="
maxNumber
"
:show="
maxNumber
_show"
:maxlength="6"
@blur="
totalLimit
_show = false"
@blur="
maxNumber
_show = false"
/>
</div>
</template>-->
</van-cell>
<van-cell
:required=
"true"
title=
"选择优惠券"
:value=
"checked_coupon.name"
is-link
@
click=
"handleChoseCoupon"
center
/>
</van-cell-group>
<!-- 活动描述 -->
<van-cell
:required=
"true"
class=
"detail"
>
...
...
@@ -275,7 +275,8 @@ export default {
res
.
data
.
forEach
(
i
=>
{
let
item
=
i
;
// item.label = i.name + " ID:" + i.id;
item
.
name
=
i
.
name
+
" ID:"
+
i
.
id
+
' 剩余:'
+
i
.
validNumber
+
'张'
;
item
.
name
=
i
.
name
+
" ID:"
+
i
.
id
+
" 剩余:"
+
i
.
validNumber
+
"张"
;
temp
.
push
(
item
);
});
this
.
coupons
=
temp
;
...
...
@@ -328,7 +329,9 @@ export default {
return
false
;
}
if
(
Number
(
this
.
totalLimit
)
>
this
.
checked_coupon
.
validNumber
)
{
this
.
$toast
(
`优惠券总发放数量不可大于当前优惠券剩余数量
${
this
.
checked_coupon
.
validNumber
}
`
);
this
.
$toast
(
`优惠券总发放数量不可大于当前优惠券剩余数量
${
this
.
checked_coupon
.
validNumber
}
`
);
return
false
;
}
if
(
Number
(
this
.
maxNumber
)
>
Number
(
this
.
totalLimit
))
{
...
...
@@ -338,6 +341,7 @@ export default {
let
params
=
{
activityInfo
:
{
id
:
0
,
oyStallCode
:
sessionStorage
.
getItem
(
"oyStallCode"
),
activityName
:
this
.
title
,
activityType
:
"coupon"
,
startTime
:
this
.
startTime1
,
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/views/active/createBigWheelActive.vue
View file @
e7407e23
...
...
@@ -721,6 +721,7 @@ export default {
let
params
=
{
activityInfo
:
{
id
:
0
,
oyStallCode
:
sessionStorage
.
getItem
(
'oyStallCode'
),
activityName
:
this
.
basicInfo
.
title
,
activityType
:
"wheel"
,
startTime
:
this
.
basicInfo
.
startTime1
,
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/views/active/test.vue
0 → 100644
View file @
e7407e23
<
template
>
<div
id=
"page"
>
<p>
测试
</p>
</div>
</
template
>
<
script
>
import
*
as
API_Test
from
'@/api/test'
export
default
{
name
:
'test'
,
components
:
{},
data
()
{
return
{
}
},
created
(){
API_Test
.
getTemplateList
().
then
(
res
=>
{
console
.
log
(
'成功了'
);
})
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
This diff is collapsed.
Click to expand it.
wx_application/src/views/coupon/addCoupon.vue
View file @
e7407e23
...
...
@@ -55,6 +55,20 @@
/>
</
template
>
</van-cell>
<van-cell
title=
"是否商户券"
>
<van-radio-group
v-model=
"addForm.lmshid"
class=
"right"
>
<van-radio
name=
"1"
style=
"float:left;"
>
是
</van-radio>
<van-radio
name=
"0"
style=
"float:right;"
>
否
</van-radio>
</van-radio-group>
</van-cell>
<!-- <van-cell title="品牌代码">
<van-field
v-model="addForm.brand"
placeholder="请输入品牌代码"
class="right"
style="font-size:14px;"
/>
</van-cell> -->
<van-cell
title=
"优惠券类型"
style=
"font-size:14px;"
>
<
template
slot=
"default"
>
<div
class=
"npbr"
>
...
...
@@ -243,6 +257,8 @@ export default {
name
:
""
,
begin_date
:
""
,
end_date
:
""
,
lmshid
:
''
,
brand
:
''
,
type
:
""
,
unit
:
""
,
instruction
:
""
,
...
...
@@ -268,7 +284,6 @@ export default {
this
.
minStartDate
=
new
Date
((
new
Date
()
/
1000
+
3600
)
*
1000
);
this
.
minEndDate
=
new
Date
((
new
Date
()
/
1000
+
86400
)
*
1000
);
this
.
create_times
=
1
;
console
.
log
(
"create_times"
,
this
.
create_times
);
},
methods
:
{
timeFormat
(
time
)
{
...
...
@@ -335,6 +350,10 @@ export default {
this
.
$toast
(
"请输入优惠券名称"
);
return
false
;
}
if
(
!
this
.
addForm
.
lmshid
)
{
this
.
$toast
(
"请选择是否为商户券"
);
return
false
;
}
if
(
!
this
.
addForm
.
type
)
{
this
.
$toast
(
"请选择优惠券类型"
);
return
false
;
...
...
@@ -351,7 +370,7 @@ export default {
this
.
$toast
(
"请输入结束时间"
);
return
false
;
}
if
(
new
Date
(
this
.
beginDate
)
>=
new
Date
(
this
.
endDate
))
{
if
(
new
Date
(
this
.
beginDate
)
>=
new
Date
(
this
.
endDate
))
{
this
.
$toast
(
"开始时间不能大于等于结束时间!"
);
return
false
;
}
...
...
@@ -382,7 +401,6 @@ export default {
addCoupon
(
this
.
addForm
)
.
then
(
res
=>
{
this
.
create_times
=
1
;
console
.
log
(
res
,
"res"
);
if
(
res
.
errorCode
==
"fail"
)
{
this
.
$toast
(
"活动创建失败!"
);
}
else
{
...
...
@@ -391,7 +409,6 @@ export default {
})
.
catch
(
error
=>
{
this
.
create_times
=
1
;
console
.
log
(
error
);
});
}
}
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/views/goods/manage.vue
View file @
e7407e23
...
...
@@ -176,8 +176,11 @@ export default {
},
// 筛选状态
handleStatus
(
value
,
isCheck
)
{
const
currentStatus
=
this
.
statusData
.
filter
(
item
=>
item
.
value
===
value
)[
0
]
currentStatus
.
isCheck
=
!
currentStatus
.
isCheck
if
(
!
isCheck
)
{
this
.
statusData
.
map
(
item
=>
{
item
.
isCheck
=
item
.
value
===
value
})
}
},
// 配置
toConfig
(
id
)
{
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/views/mainSale/active/main/index.vue
View file @
e7407e23
...
...
@@ -241,7 +241,12 @@ export default {
this
.
zReadyUserId
()
this
.
zTestGetNowUrlInfo
()
}
this
.
GET_CurrentActive
()
},
mounted
()
{
if
(
sessionStorage
.
getItem
(
'oyStallCode'
))
{
console
.
log
(
'oyStallCode'
,
sessionStorage
.
getItem
(
'oyStallCode'
));
this
.
GET_CurrentActive
();
}
},
methods
:
{
// 跳转到 活动详情
...
...
@@ -262,7 +267,8 @@ export default {
},
// 获取当前 活动
GET_CurrentActive
()
{
getCurrentActive
().
then
(
res
=>
{
let
code
=
sessionStorage
.
getItem
(
'oyStallCode'
);
getCurrentActive
(
code
).
then
(
res
=>
{
this
.
currentActives
=
res
.
data
||
[];
})
},
...
...
@@ -317,8 +323,6 @@ export default {
headers
:
headerData
})
.
then
(
res
=>
{
console
.
log
(
res
);
if
(
res
.
data
.
data
!=
null
)
{
if
(
res
.
data
!=
[])
{
sessionStorage
.
setItem
(
"personalFan"
,
res
.
data
.
data
.
length
)
...
...
@@ -329,12 +333,10 @@ export default {
}
}
else
{
console
.
log
(
'zheli'
);
if
(
res
.
data
.
errorCode
==
"84061"
)
{
sessionStorage
.
setItem
(
"personalFan"
,
0
)
resolve
(
0
)
}
else
{
console
.
log
(
'?'
);
sessionStorage
.
setItem
(
"personalFan"
,
''
)
resolve
(
''
)
}
...
...
@@ -400,8 +402,6 @@ export default {
JsonStr
.
end_time
=
timeNow
;
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
({
// url:
// "http://175.31.197.83:8085/workWx/auth/contact/getUserBehaviorData",
url
:
"http://175.31.197.83:8085/workWx/auth/contact/getUserBehaviorData"
,
method
:
"post"
,
headers
:
{
...
...
@@ -458,7 +458,6 @@ export default {
})
},
getAllInfo
(
list
)
{
console
.
log
(
'getAllInfo'
);
Promise
.
all
([
this
.
getUserInfo
(),
this
.
getFans
(),
this
.
getAllFans
(),
this
.
getAddFans
(
1
,
this
.
zcache
.
userId
),
this
.
getAddFans
(
2
,
list
),
this
.
getStore
()]).
then
(
res
=>
{
console
.
log
(
'进来了'
);
console
.
log
(
res
,
'promise'
);
...
...
@@ -540,7 +539,6 @@ export default {
this
.
url
=
this
.
zcache
.
nowUrl
},
zTestPreAuthCode
()
{
console
.
log
(
'获取code'
)
this
.
overlayShow
=
true
// alert('获取code')
const
basicInfo
=
{
...
...
@@ -597,12 +595,11 @@ export default {
},
// 获取店铺code
getUserFromId
(
id
)
{
console
.
log
(
1
);
let
userName
=
id
;
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
sessionStorage
.
setItem
(
"oyStallCode"
,
res
.
data
[
0
].
oyStallCode
)
this
.
oyStallCode
=
res
.
data
[
0
].
oyStallCode
;
this
.
GET_CurrentActive
()
// this.getAllInfo()
this
.
getAllNewFans
()
})
...
...
This diff is collapsed.
Click to expand it.
ybf_admin/src/pages/in/contact/components/addGroup.vue
View file @
e7407e23
...
...
@@ -182,6 +182,7 @@ export default {
parentId
:
[
{
required
:
true
,
message
:
"请选择上级部门"
,
trigger
:
"change"
}
],
oyStallName
:
[{
required
:
true
,
message
:
'请填写门店名称'
,
trigger
:
"change"
}],
oyStallCode
:
[{
required
:
true
,
validator
:
idNumber
,
trigger
:
"blur"
}],
oyStallMemberId
:
[
{
required
:
false
,
validator
:
memberNumber
,
trigger
:
"blur"
}
...
...
This diff is collapsed.
Click to expand it.
ybf_admin/src/pages/in/contact/components/editGroup.vue
View file @
e7407e23
...
...
@@ -145,6 +145,7 @@ export default {
{
max
:
50
,
message
:
"长度在50个字符以内"
,
trigger
:
"blur"
},
],
parentId
:
[{
required
:
true
,
message
:
"请选择上级部门"
,
trigger
:
"change"
}],
oyStallName
:
[{
required
:
true
,
message
:
'请填写门店名称'
,
trigger
:
"change"
}],
oyStallCode
:
[{
required
:
true
,
validator
:
idNumber
,
trigger
:
"blur"
}],
clerkIds
:
[{
required
:
true
,
message
:
"主管不能为空"
,
trigger
:
"blur"
}]
},
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/public/register/index.html
View file @
e7407e23
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"UTF-8"
>
<title>
会员拉新
</title>
<title>
注册会员
</title>
<script
src=
"../js/jquery-3.4.1.min.js"
></script>
<style>
html
,
...
...
This diff is collapsed.
Click to expand it.
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