Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
xieyishang
lumastoreapp
Commits
ac524802
Commit
ac524802
authored
Dec 12, 2020
by
home
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zxf
parent
fed5ec73
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1790 additions
and
71 deletions
+1790
-71
App.vue
App.vue
+2
-1
components/bory-dateTimePicker/bory-dateTimePicker.vue
components/bory-dateTimePicker/bory-dateTimePicker.vue
+407
-0
components/bory-dateTimePicker/uitls/util.js
components/bory-dateTimePicker/uitls/util.js
+40
-0
pages.json
pages.json
+25
-2
pages/addEditEleProduct/addEditEleProduct.vue
pages/addEditEleProduct/addEditEleProduct.vue
+0
-1
pages/index/index.vue
pages/index/index.vue
+118
-65
pages/publishActivities/activityDetail/activityDetail.vue
pages/publishActivities/activityDetail/activityDetail.vue
+131
-0
pages/publishActivities/activityList/activityList.vue
pages/publishActivities/activityList/activityList.vue
+455
-0
pages/publishActivities/publishActivity/publishActivity.vue
pages/publishActivities/publishActivity/publishActivity.vue
+556
-0
static/lingqu.png
static/lingqu.png
+0
-0
utils/api/merchant.js
utils/api/merchant.js
+54
-0
utils/debug.js
utils/debug.js
+2
-2
utils/picture.png
utils/picture.png
+0
-0
No files found.
App.vue
View file @
ac524802
...
...
@@ -123,7 +123,8 @@
console
.
log
(
'
这里
'
)
let
res
=
await
newsRemind
({
uid
:
this
.
$store
.
state
.
userInfo
.
user_id
,
cid
:
cid
cid
:
cid
,
});
if
(
res
.
code
==
0
){
...
...
components/bory-dateTimePicker/bory-dateTimePicker.vue
0 → 100644
View file @
ac524802
This diff is collapsed.
Click to expand it.
components/bory-dateTimePicker/uitls/util.js
0 → 100644
View file @
ac524802
/**
* 获取某年某月有多少天
*/
export
const
getOneMonthDays
=
(
year
,
month
)
=>
{
month
=
Number
(
month
);
const
baseMonthsDays
=
[
31
,
28
,
31
,
30
,
31
,
30
,
31
,
31
,
30
,
31
,
30
,
31
];
if
(
year
%
4
==
0
&&
(
year
%
100
!=
0
||
year
%
400
==
0
)){
if
(
month
===
1
){
baseMonthsDays
[
month
]
=
29
;
}
}
return
baseMonthsDays
[
month
];
}
/**
* 获取日期的年月日时分秒
*/
export
const
getTimeArray
=
(
date
)
=>
{
const
year
=
date
.
getFullYear
();
const
month
=
date
.
getMonth
()
+
1
;
const
day
=
date
.
getDate
();
const
hour
=
date
.
getHours
();
const
minute
=
date
.
getMinutes
();
const
second
=
date
.
getSeconds
();
return
[
year
,
month
,
day
,
hour
,
minute
,
second
];
}
/**
* 小于10的数字前面补0
*/
export
const
addZero
=
(
num
)
=>
{
return
num
<
10
?
'
0
'
+
num
:
num
;
}
/**
* 获取当前值在数组中的索引
*/
export
const
getIndexOfArray
=
(
value
,
array
)
=>
{
let
index
=
array
.
findIndex
(
item
=>
item
==
value
);
return
index
>
-
1
?
index
:
0
;
}
\ No newline at end of file
pages.json
View file @
ac524802
...
...
@@ -395,8 +395,31 @@
"navigationBarTitleText"
:
"物流发货"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
}
},{
"path"
:
"pages/publishActivities/activityList/activityList"
,
"style"
:
{
//机型列表
"navigationBarTitleText"
:
"活动列表"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"enablePullDownRefresh"
:
true
}
],
},{
"path"
:
"pages/publishActivities/publishActivity/publishActivity"
,
"style"
:
{
//机型列表
activityDetail
"navigationBarTitleText"
:
"发布免费活动"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
}
},{
"path"
:
"pages/publishActivities/activityDetail/activityDetail"
,
"style"
:
{
//机型列表
activityDetail
"navigationBarTitleText"
:
"活动详情"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"enablePullDownRefresh"
:
true
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
""
,
...
...
pages/addEditEleProduct/addEditEleProduct.vue
View file @
ac524802
...
...
@@ -158,7 +158,6 @@
<view
class=
"inputbox flex"
>
<picker
mode=
"date"
fields=
"day"
:value=
"form.manufacture_date"
@
change=
"bindDateChange"
>
<input
disabled=
"true"
class=
"input flex1"
type=
"text"
v-model=
"form.manufacture_date"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写生产日期"
/>
<!--
<view
class=
"uni-input"
>
{{
date
}}
</view>
-->
</picker>
</view>
</view>
...
...
pages/index/index.vue
View file @
ac524802
...
...
@@ -310,6 +310,19 @@
</view>
</view>
</view>
<!-- url="/pages/publishActivities/activityList/activityList" -->
<view
class=
"jiu_max "
>
<navigator
url=
"/pages/publishActivities/activityList/activityList"
>
<view
class=
"jiu_min"
>
<view>
<image
class=
"img"
src=
"/static/icon/download.png"
mode=
""
></image>
</view>
<view>
0元领活动
</view>
</view>
</navigator>
</view>
</view>
<view
class=
"BH"
></view>
...
...
@@ -320,7 +333,8 @@
<
script
>
import
{
getskipShop
getskipShop
,
activity_nucleus
}
from
"
@/utils/api/merchant.js
"
;
import
uniBadge
from
"
@/components/uni/uni-badge/uni-badge.vue
"
import
uniIcon
from
"
@/components/uni/uni-icon/uni-icon.vue
"
...
...
@@ -419,6 +433,19 @@
saoma
(
e
)
{
uni
.
scanCode
({
success
:
res
=>
{
if
(
res
.
scanType
==
'
QR_CODE
'
)
{
let
param
=
this
.
GetRequest
(
res
.
result
);
param
.
shop_id
=
this
.
shop_id
activity_nucleus
(
param
).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
$api
.
msg
(
res
.
msg
);
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
})
return
;
}
else
if
(
res
.
scanType
==
'
EAN_13
'
)
{
uni
.
request
({
url
:
'
https://www.mxnzp.com/api/barcode/goods/details
'
,
//仅为示例,并非真实接口地址。
data
:
{
...
...
@@ -429,7 +456,7 @@
},
method
:
'
GET
'
,
success
:
(
results
)
=>
{
console
.
log
(
results
);
//
console.log(results);
if
(
results
.
data
.
code
==
0
)
{
// this.$api.msg(results.data.msg);
results
.
isScanCode
=
false
;
...
...
@@ -443,12 +470,12 @@
uni
.
navigateTo
({
url
:
'
/pages/addEditEleProduct/addEditEleProduct?results=
'
+
JSON
.
stringify
(
results
)
})
console
.
log
(
results
)
//
console.log(results)
}
},
fail
:
(
results
)
=>
{
console
.
log
(
results
);
//
console.log(results);
results
.
isScanCode
=
false
;
results
.
code
=
res
.
result
;
uni
.
navigateTo
({
...
...
@@ -457,8 +484,34 @@
}
})
}
}
});
},
// 解析链接中的参数
/**
* 解析url地址的参数
* @param {string} urlStr
*/
GetRequest
:
(
urlStr
)
=>
{
if
(
typeof
urlStr
==
"
undefined
"
)
{
var
url
=
decodeURI
(
location
.
search
);
//获取url中"?"符后的字符串
}
else
{
var
url
=
"
?
"
+
urlStr
.
split
(
"
?
"
)[
1
];
}
var
theRequest
=
new
Object
();
if
(
url
.
indexOf
(
"
?
"
)
!=
-
1
)
{
var
str
=
url
.
substr
(
1
);
var
strs
=
str
.
split
(
"
&
"
);
for
(
var
i
=
0
;
i
<
strs
.
length
;
i
++
)
{
theRequest
[
strs
[
i
].
split
(
"
=
"
)[
0
]]
=
decodeURI
(
strs
[
i
].
split
(
"
=
"
)[
1
]);
}
}
return
theRequest
;
},
jump
()
{
uni
.
navigateTo
({
url
:
'
/pages/edit/pro_manage/pro_manage?money_type=
'
+
this
.
money_type
+
'
&
'
+
'
activity_type=
'
+
this
.
activity_type
...
...
@@ -474,12 +527,12 @@
let
that
=
this
uni
.
showModal
({
title
:
'
复制链接在电脑端浏览器打开
'
,
content
:
`
${
that
.
$store
.
state
.
uploadurl
}
api/index/excel?shop_id=
${
this
.
shop_id
}
`
,
content
:
`
${
that
.
$store
.
state
.
uploadurl
}
api/index/excel?shop_id=
${
that
.
shop_id
}
`
,
confirmText
:
'
复制
'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
uni
.
setClipboardData
({
data
:
`
${
that
.
$store
.
state
.
uploadurl
}
api/index/excel?shop_id=
${
th
is
.
shop_id
}
`
,
data
:
`
${
that
.
$store
.
state
.
uploadurl
}
api/index/excel?shop_id=
${
th
at
.
shop_id
}
`
,
success
:
()
=>
{
//复制成功的回调函数
uni
.
showToast
({
//提示
title
:
'
复制成功
'
...
...
pages/publishActivities/activityDetail/activityDetail.vue
0 → 100644
View file @
ac524802
<
template
>
<view>
<view
class=
""
>
<view
class=
""
style=
"text-align: center;height: 120upx;line-height: 120upx;font-weight: bold;font-size: 32upx;"
>
以有
<text
style=
"color: #21B94C;font-size: 60upx;"
>
150
</text>
人领取 还剩50人未领取
</view>
</view>
<view
class=
""
style=
"height: 160upx;padding: 0 24upx;background-color: rgb(255, 255, 255);margin-bottom: 20upx;"
v-if=
"getDetail.length > 0 "
v-for=
"(item,index) in getDetail"
>
<view
class=
"fx "
style=
"justify-content: space-between;background-color: #fff; align-items: center;
height: 100%"
>
<view
class=
"fx"
style=
"width: 75%;align-items: center;"
>
<view
style=
"height: 120upx;width: 120upx;border-radius: 120upx;text-align: center;line-height: 80upx;overflow: hidden;"
>
<image
:src=
"item.face"
style=
"display: inline;"
></image>
</view>
<view
style=
"margin:0 0 0 10upx;width: 75%;padding: 20upx 10upx;"
>
<view
style=
"font: 34upx 微软雅黑;padding-bottom:10upx ;"
class=
"oneline"
>
{{
item
.
nickname
}}
</view>
<view
style=
"font-size:20upx;color:rgb(116, 113, 113);padding-top: 10upx;"
>
{{
item
.
verification_time
}}
</view>
</view>
</view>
<view
style=
"width: 15%;height: 104upx;"
>
<!--
<text
style=
"color:#DC143C;padding: 0 12upx;border-radius: 10upx;font-size: 32upx;"
>
</text>
-->
<image
src=
"/static/lingqu.png"
mode=
""
style=
"width:100% ;height: 100%;display: inline;"
></image>
</view>
<!-- 关注插槽 -->
<!--
<slot
name=
"before"
></slot>
-->
</view>
<!--
<slot
name=
"content"
>
</slot>
-->
</view>
<view
v-if=
"getDetail.length
<
=
0
"
style=
"text-align: center;width: 100%;height:1000upx;line-height: 1000upx;font-size: 50upx;color:#8C8C8C ;"
>
还没有人领取~~
</view>
</view>
</
template
>
<
script
>
import
{
activity_user
}
from
'
@/utils/api/merchant.js
'
;
export
default
{
data
(){
return
{
shop_id
:
''
,
activity_id
:
''
,
getDetail
:[],
page
:
1
}
},
onReachBottom
()
{
console
.
log
(
'
触底加载
'
);
activity_user
({
shop_id
:
this
.
shop_id
,
activity_id
:
this
.
activity_id
,
nucleus
:
1
,
page
:
this
.
page
}).
then
(
res
=>
{
if
(
res
.
code
==
0
&&
res
.
data
.
list
.
length
>
0
){
this
.
page
++
this
.
getDetail
=
res
.
data
.
list
uni
.
stopPullDownRefresh
();
}
else
{
uni
.
$api
.
msg
(
'
没有更多数据了
'
)
}
})
},
onPullDownRefresh
()
{
this
.
page
=
1
activity_user
({
shop_id
:
this
.
shop_id
,
activity_id
:
this
.
activity_id
,
nucleus
:
1
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
getDetail
=
res
.
data
.
list
uni
.
stopPullDownRefresh
();
}
})
},
onLoad
(
options
)
{
let
that
=
this
that
.
activity_id
=
options
.
activity_id
uni
.
getStorage
({
key
:
'
userInfo
'
,
success
(
res
)
{
that
.
shop_id
=
res
.
data
.
shop_id
}
})
activity_user
({
shop_id
:
that
.
shop_id
,
activity_id
:
that
.
activity_id
,
nucleus
:
1
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
this
.
getDetail
=
res
.
data
.
list
}
})
},
}
</
script
>
<
style
>
page
{
background-color
:
#EEEEEE
;
}
.fx
{
display
:
flex
;
}
.guanzhu
{
padding
:
24
upx
;
border-top
:
2
upx
solid
#eee
;
/* border-bottom: 1upx solid #eee; */
}
.pd24
{
padding
:
24
upx
}
</
style
>
pages/publishActivities/activityList/activityList.vue
0 → 100644
View file @
ac524802
This diff is collapsed.
Click to expand it.
pages/publishActivities/publishActivity/publishActivity.vue
0 → 100644
View file @
ac524802
This diff is collapsed.
Click to expand it.
static/lingqu.png
0 → 100644
View file @
ac524802
6.31 KB
utils/api/merchant.js
View file @
ac524802
...
...
@@ -47,6 +47,60 @@ export function getshopclass(data){
}
/**
* @param {Object} data
*/
//获取分类 列表
export
function
activity_nucleus
(
data
){
return
request
.
post
(
"
/ele/activity_nucleus
"
,
data
,
{
noAuth
:
true
});
}
/**
* 添加免费领东西活动
* @param {Object} data
*/
export
function
activity_add
(
data
){
return
request
.
post
(
"
/ele/activity_add
"
,
data
,
{
noAuth
:
true
});
}
/**
* 获取活动列表
* @param {Object} data
*/
export
function
activity_select
(
data
){
return
request
.
post
(
"
/ele/activity_select
"
,
data
,
{
noAuth
:
true
});
}
/**
* 关闭活动
* @param {Object} data
*/
export
function
activity_close
(
data
){
return
request
.
post
(
"
/ele/activity_close
"
,
data
,
{
noAuth
:
true
});
}
/**
* 活动详情
* @param {} data
*/
export
function
activity_find
(
data
){
return
request
.
post
(
"
/ele/activity_find
"
,
data
,
{
noAuth
:
true
});
}
/**
*
* @param {} data
*/
export
function
activity_user
(
data
){
return
request
.
post
(
"
/ele/activity_user
"
,
data
,
{
noAuth
:
true
});
}
/**
* 修改活动
* @param {} data
*/
export
function
activity_update
(
data
){
return
request
.
post
(
"
/ele/activity_update
"
,
data
,
{
noAuth
:
true
});
}
\ No newline at end of file
utils/debug.js
View file @
ac524802
...
...
@@ -5,9 +5,9 @@ module.exports = {
isdebug
:
false
,
//正式
//
isdebug:false,//正式
//
isdebug:true,//测试
isdebug
:
true
,
//测试
xqdebug
:
false
,
//正式权限
...
...
utils/picture.png
deleted
100644 → 0
View file @
fed5ec73
5.41 KB
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