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
ba76420e
Commit
ba76420e
authored
Jan 21, 2021
by
xieyishang
Browse files
Options
Browse Files
Download
Plain Diff
111~
parents
330720f7
9b436f38
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
712 additions
and
51 deletions
+712
-51
components/vegetablesOrderItem/vegetablesOrderItem.vue
components/vegetablesOrderItem/vegetablesOrderItem.vue
+264
-0
manifest.json
manifest.json
+4
-8
pages.json
pages.json
+12
-4
pages/buyingVegetables/buyingVegetables.vue
pages/buyingVegetables/buyingVegetables.vue
+375
-0
pages/index/index.vue
pages/index/index.vue
+48
-39
utils/api/merchant.js
utils/api/merchant.js
+9
-0
No files found.
components/vegetablesOrderItem/vegetablesOrderItem.vue
0 → 100644
View file @
ba76420e
<
template
>
<!-- 外卖订单卡片 -->
<view
class=
"orderItemss"
@
tap=
"operation"
data-action=
"orderDetails"
:data-orderid=
'dataorder.order_id'
hover-class=
"uni-list-cell-hover"
>
<view
class=
"shopinfo flex ali-c"
>
<image
class=
"imgs"
:src=
"staticUrl+dataorder.photo"
mode=
""
></image>
<view
class=
"titlebox flex1"
>
<view
class=
"title flex ali-c jus-b"
>
<text
class=
"bt"
>
{{
dataorder
.
shop_name
}}
</text>
<view
class=
"zt"
>
{{
dataorder
.
order_status
}}
</view>
</view>
<view
class=
"time"
>
{{
dataorder
.
create_time
}}
</view>
</view>
</view>
<view
class=
"beizhu flex jus-b ali-c"
style=
"border-bottom: 1px solid #f1f1f1;"
>
<text
class=
"price"
>
{{
dataorder
.
username_tel
}}
</text>
</view>
<!-- 上面的是 -->
<!-- reorder -->
<view
class=
"mingxi oneline"
v-for=
"(item,index) in dataorder.products"
:key=
"index"
>
{{
item
.
productname
}}
x
{{
item
.
num
}}
</view>
<view
class=
"beizhu flex jus-b ali-c"
>
<text
class=
"beizhutext oneline flex1"
v-if=
"dataorder.remark"
>
备注:
{{
dataorder
.
remark
||
''
}}
</text>
<text
class=
"beizhutext oneline flex1"
v-if=
"dataorder.message"
>
退款原因:
{{
dataorder
.
message
||
''
}}
</text>
<text
class=
"price"
>
合计:¥
{{
dataorder
.
total
}}
</text>
</view>
<view
class=
"orderItemss_foot jus-b"
>
<view
class=
"titmeboxs ali-c"
>
<text
style=
"color: #FF6900;"
></text>
</view>
<view
class=
"btnbox flex flex1 jus-e"
>
<block
v-for=
"(action,index) in dataorder.order_operation"
:key=
"index"
>
<view
:class=
"action.class_name"
:data-orderid=
'dataorder.order_id'
@
tap.stop=
"operation"
:data-action=
'action.way'
:data-is_ld=
'dataorder.buytype'
>
{{
action
.
name
}}
</view>
</block>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
immediatelyOrder
,
refuseOrder
,
consentEleRefund
,
refuseEleRefund
}
from
"
@/utils/api/api.js
"
;
export
default
{
name
:
"
orderItemss
"
,
props
:[
"
dataorder
"
,
"
tabindex
"
,
"
index
"
,
"
status
"
],
data
()
{
return
{
};
},
mounted
()
{
console
.
log
(
'
啊啊啊啊
'
)
},
updated
(){
console
.
log
(
'
玩了
'
)
},
watch
:{
dataorder
(){
console
.
log
(
'
变了
'
)
}
},
computed
:
{
staticUrl
()
{
//静态资源地址
return
this
.
$store
.
state
.
staticUrl
;
}
},
methods
:{
/**
* 订单操作
*
*/
operation
(
event
)
{
let
action
=
event
.
currentTarget
.
dataset
.
action
;
let
order_id
=
event
.
currentTarget
.
dataset
.
orderid
;
let
index
=
this
.
index
;
uni
.
setStorageSync
(
'
obj
'
,{
order_id
,
index
});
console
.
log
(
order_id
,
'
aaa
'
)
switch
(
action
)
{
case
'
immediatelyOrder
'
:
//立即接单 OK
this
.
immediatelyOrderfun
(
order_id
,
action
,
index
);
break
;
case
'
refuseOrder
'
:
//拒接此单 OK
this
.
refuseOrderfun
(
order_id
,
action
,
index
);
break
;
case
'
orderDetails
'
:
//订单详情
this
.
toxq
(
order_id
,
order_id
);
break
;
case
'
consentEleRefund
'
:
//同意退款
this
.
consentEleRefund
(
order_id
,
action
,
index
);
break
;
case
'
refuseEleRefund
'
:
//拒绝退款
this
.
refuseEleRefund
(
order_id
,
action
,
index
);
break
;
default
:
//其他的 退款啥的 处理ok了
console
.
info
(
"
1111
"
,
action
);
break
;
}
},
async
consentEleRefund
(
order_id
,
action
,
index
){
// 同意退款
let
res
=
await
consentEleRefund
({
order_id
:
this
.
dataorder
.
order_id
,
});
this
.
$api
.
msg
(
res
.
msg
);
if
(
res
.
code
==
0
){
this
.
$emit
(
"
reload
"
,{
index
});
}
},
// 拒绝退款
async
refuseEleRefund
(
order_id
,
action
,
index
){
let
res
=
await
refuseEleRefund
({
order_id
:
this
.
dataorder
.
order_id
,
});
this
.
$api
.
msg
(
res
.
msg
);
if
(
res
.
code
==
0
){
this
.
$emit
(
"
reload
"
,{
index
});
}
},
toxq
(){
//进入详情
uni
.
navigateTo
({
url
:
'
/pages/order/detail/detail?id=
'
+
this
.
dataorder
.
order_id
});
},
//删除订单
deleteOrderFun
(){
this
.
dataorder
.
index
=
this
.
index
;
this
.
$emit
(
'
deleteOrderFun
'
,
this
.
dataorder
);
},
//立即接单 方法 外卖的
async
immediatelyOrderfun
(
order_id
,
action
,
index
){
let
res
=
await
immediatelyOrder
({
order_id
:
this
.
dataorder
.
order_id
,
})
this
.
$api
.
msg
(
res
.
msg
);
if
(
res
.
code
==
0
){
this
.
$emit
(
"
reload
"
,{
index
});
}
},
//商家拒绝接单的方法
async
refuseOrderfun
(
order_id
,
action
,
index
){
let
res
=
await
refuseOrder
({
order_id
:
this
.
dataorder
.
order_id
,
});
this
.
$api
.
msg
(
res
.
msg
);
if
(
res
.
code
==
0
){
this
.
$emit
(
"
reload
"
,{
index
});
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
.uni-list-cell-hover
{
background
:
#fbfbfb
;
opacity
:
.7
;
}
//单个订单
.orderItemss
{
background
:
#FFFFFF
;
padding
:
30upx
20upx
;
border-radius
:
14upx
;
margin-bottom
:
20upx
;
.shopinfo
{
.imgs
{
width
:
71upx
;
height
:
71upx
;
margin-right
:
25upx
;
}
.titlebox
{
.title
{
font-family
:
PingFang
SC
;
font-weight
:bold
;
.bt
{
font-size
:
28upx
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
}
.zt
{
font-size
:
30upx
;
color
:rgba
(
255
,
105
,
0
,
1
)
;
}
}
.time
{
font-size
:
24upx
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
margin-top
:
5upx
;
}
}
}
.mingxi
{
margin-top
:
10upx
;
margin-bottom
:
10upx
;
font-size
:
30upx
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
border-bottom
:
1px
solid
rgb
(
241
,
241
,
241
);
}
.beizhu
{
margin-top
:
20upx
;
// border-top: 1px solid #EFF0F4;
height
:
80upx
;
line-height
:
80upx
;
.beizhutext
{
font-size
:
28upx
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
}
.price
{
font-size
:
30upx
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
}
}
//底部
.orderItemss_foot
{
border-top
:
1px
solid
#EFF0F4
;
padding-top
:
24upx
;
.titmeboxs
{
color
:
#333333
;
font-size
:
30upx
;
.shuzi
{
color
:
#FF6900
;
}
}
.msgtuikuan
{
font-size
:
32upx
;
color
:rgba
(
255
,
102
,
0
,
1
)
;
}
.btnbox
{
}
.btns
{
width
:
152upx
;
height
:
62upx
;
line-height
:
62upx
;
text-align
:
center
;
border
:
1px
solid
rgba
(
204
,
204
,
204
,
1
);
border-radius
:
4upx
;
font-size
:
26upx
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
margin-left
:
20upx
;
}
.btns1
{
border-radius
:
4upx
;
margin-left
:
20upx
;
width
:
152upx
;
height
:
62upx
;
line-height
:
62upx
;
text-align
:
center
;
background
:rgba
(
255
,
102
,
0
,
1
)
;
color
:
#FFFFFF
;
border
:
0
;
}
}
}
</
style
>
manifest.json
View file @
ba76420e
...
@@ -43,23 +43,19 @@
...
@@ -43,23 +43,19 @@
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.CHANGE_WIFI_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FLASHLIGHT
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_ACCOUNTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_TASKS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.INTERNET
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.INTERNET
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MODIFY_AUDIO_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.MOUNT_UNMOUNT_FILESYSTEMS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_CONTACTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_LOGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.READ_PHONE_STATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.RECEIVE_BOOT_COMPLETED
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.RECORD_AUDIO
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.RECORD_AUDIO
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.REORDER_TASKS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.VIBRATE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WAKE_LOCK
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_CONTACTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_CONTACTS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_EXTERNAL_STORAGE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.WRITE_EXTERNAL_STORAGE
\"
/>"
"<uses-permission android:name=
\"
android.permission.WRITE_SETTINGS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.FOREGROUND_SERVICE
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.GET_TASKS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.REORDER_TASKS
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.RECEIVE_BOOT_COMPLETED
\"
/>"
,
"<uses-permission android:name=
\"
android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
\"
/>"
]
]
},
},
/*
ios打包配置
*/
/*
ios打包配置
*/
...
...
pages.json
View file @
ba76420e
...
@@ -445,8 +445,16 @@
...
@@ -445,8 +445,16 @@
"navigationBarTitleText"
:
"立即发货"
,
"navigationBarTitleText"
:
"立即发货"
,
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
},
{
"path"
:
"pages/buyingVegetables/buyingVegetables"
,
"style"
:
{
"navigationBarTitleText"
:
"提货订单"
,
"enablePullDownRefresh"
:
false
}
}
,{
,{
"path"
:
"pages/locationDetailed/locationDetailed"
,
"path"
:
"pages/locationDetailed/locationDetailed"
,
"style"
:
"style"
:
...
@@ -455,7 +463,7 @@
...
@@ -455,7 +463,7 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
}
,{
,{
"path"
:
"pages/guidegoods/guidegoods"
,
"path"
:
"pages/guidegoods/guidegoods"
,
"style"
:
"style"
:
...
@@ -473,7 +481,7 @@
...
@@ -473,7 +481,7 @@
"enablePullDownRefresh"
:
false
"enablePullDownRefresh"
:
false
}
}
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
...
...
pages/buyingVegetables/buyingVegetables.vue
0 → 100644
View file @
ba76420e
<
template
>
<!-- 订单列表页面 -->
<view
class=
"content"
>
<view
class=
"navbar"
>
<scroll-view
:scroll-x=
"true"
style=
"width: 100vw;"
:scroll-left=
"scrleft"
:scroll-with-animation=
"true"
>
<view
class=
"ali-c"
>
<view
v-for=
"(item, index) in navListTow"
:key=
"index"
class=
"nav-item"
:class=
"
{current: tabCurrentIndex === index}"
@click="tabClick(index,item)">
{{
item
.
status_name
}}
</view>
</view>
</scroll-view>
</view>
<view
class=
"orderlist"
>
<vegetablesOrderItem
@
reload=
"reload"
v-for=
"(item,index) in orderlist"
:index=
'index'
:status=
"status"
:dataorder=
"item"
:key=
"index"
></vegetablesOrderItem>
</view>
<pageScrollTo
v-if=
"isshowtop"
></pageScrollTo>
</view>
</
template
>
<
script
>
import
{
eleOrderStatus
,
eleOrderList
}
from
"
@/utils/api/api.js
"
;
import
vegetablesOrderItem
from
"
@/components/vegetablesOrderItem/vegetablesOrderItem.vue
"
;
import
empty
from
"
@/components/empty
"
;
import
pageScrollTo
from
"
@/components/pageScrollTo/pageScrollTo.vue
"
export
default
{
components
:
{
vegetablesOrderItem
,
empty
,
pageScrollTo
},
data
()
{
return
{
tabCurrentIndex
:
0
,
navListTow
:
[],
page
:
0
,
orderlist
:
[],
isshowall
:
true
,
status
:
""
,
//状态
isshowtop
:
false
,
is_loading_done
:
false
,
action
:
''
,
isClick
:
true
,
//是否能点击
scrleft
:
0
,
};
},
onLoad
(
options
)
{
this
.
tabCurrentIndex
=
0
;
//先写死
//获取全部的状态列表
//方法请求
this
.
page
=
0
;
this
.
orderlist
=
[];
this
.
isshowall
=
true
;
this
.
eleOrderStatusfun
();
},
onShow
()
{
this
.
action
=
''
;
uni
.
$on
(
"
isDelorder
"
,
res
=>
{
let
index
=
uni
.
getStorageSync
(
'
obj
'
).
index
;
let
orderlist
=
this
.
orderlist
;
this
.
action
=
res
.
action
;
if
(
res
.
action
==
"
immediatelyOrder
"
||
res
.
action
==
"
refuseOrder
"
)
{
//接单 拒绝接单
if
(
this
.
status
!=
'
all
'
)
{
//只有不是在全部订单下才删除这一项
orderlist
.
splice
(
index
,
1
);
//删除某项
this
.
$set
(
this
,
'
orderlist
'
,
orderlist
);
}
else
{
this
.
listDeal
();
}
}
uni
.
$off
(
'
isDelorder
'
);
//取消监听
})
if
(
this
.
action
==
''
)
{
this
.
listDeal
();
}
},
//下拉刷新
onPullDownRefresh
()
{
this
.
is_loading_done
=
false
;
this
.
page
=
0
;
this
.
orderlist
=
[];
this
.
isshowall
=
true
;
// this.eleOrderListfun();
},
onPageScroll
(
e
)
{
uni
.
setStorageSync
(
'
scrollTop
'
,
e
.
scrollTop
);
//处理返回顶部
if
(
e
.
scrollTop
>
300
)
{
this
.
isshowtop
=
true
;
}
else
{
this
.
isshowtop
=
false
;
}
},
onReachBottom
()
{
if
(
this
.
is_loading_done
==
false
)
{
//还没加载完毕则继续加载
uni
.
showLoading
({
title
:
'
加载中
'
,
mask
:
false
})
// this.eleOrderListfun();
}
else
{
uni
.
showLoading
({
title
:
'
已全部加载完毕
'
,
mask
:
false
})
setTimeout
(
function
()
{
uni
.
hideLoading
()
},
1000
);
}
},
onUnload
()
{
//页面卸载的时候
uni
.
setStorageSync
(
'
obj
'
,
{
order_id
:
''
,
index
:
-
1
});
uni
.
$off
(
'
isDelorder
'
);
//取消监听
uni
.
setStorageSync
(
'
scrollTop
'
,
0
);
},
methods
:
{
listDeal
()
{
let
order_id
=
uni
.
getStorageSync
(
'
obj
'
).
order_id
;
let
index
=
uni
.
getStorageSync
(
'
obj
'
).
index
;
// uni.showLoading({
// title: "请稍后..."
// });
// eleOrderList({
// page: Math.ceil((index + 1) / 10),
// status: this.status,
// is_dianping: "", //点评
// sale_status: "" //售后状态
// }).then(res => {
// console.log(res, order_id, '这里了')
// uni.hideLoading();
// for (let item of res.data) {
// console.log(item, '这里了')
// if (item.order_id == order_id) {
// this.$set(this.orderlist, index, item);
// break;
// }
// }
// })
},
reload
(
e
)
{
//抢单成功后
let
index
=
e
.
index
;
if
(
this
.
status
==
'
all
'
)
{
this
.
listDeal
();
}
else
{
let
orderlist
=
this
.
orderlist
;
orderlist
.
splice
(
index
,
1
);
//删除某项
this
.
$set
(
this
,
'
orderlist
'
,
orderlist
);
}
},
//获取订单状态
async
eleOrderStatusfun
()
{
let
res
=
await
eleOrderStatus
({});
if
(
res
.
code
==
0
)
{
// this.navListTow = res.data;
this
.
navListTow
=
[{
status
:
"
all
"
,
status_id
:
"
all
"
,
status_name
:
"
全部
"
},
{
status
:
"
1
"
,
status_id
:
"
1
"
,
status_name
:
"
未提货
"
},
{
status
:
"
1
"
,
status_id
:
"
1
"
,
status_name
:
"
已提货
"
}]
// this.eleOrderListfun();//获取订单列表
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
},
//获取订单列表
async
eleOrderListfun
()
{
this
.
isClick
=
false
;
//不能点击tab了
this
.
page
++
;
uni
.
showLoading
({
title
:
'
加载中...
'
});
let
res
=
await
eleOrderList
({
page
:
this
.
page
,
status
:
this
.
status
,
is_dianping
:
""
,
//点评
sale_status
:
""
,
//售后状态
});
uni
.
hideLoading
();
//结束加载
this
.
isClick
=
true
;
//能点击tab了
uni
.
stopPullDownRefresh
();
//结束下拉刷新
if
(
res
.
code
==
0
)
{
if
(
res
.
data
==
null
||
res
.
data
.
length
==
0
)
{
this
.
is_loading_done
=
true
;
}
else
{
this
.
orderlist
=
[...
this
.
orderlist
,
...
res
.
data
];
}
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
uni
.
pageScrollTo
({
scrollTop
:
uni
.
getStorageSync
(
'
scrollTop
'
),
duration
:
0
});
},
//发货功能
todelivery
()
{
uni
.
navigateTo
({
url
:
"
/pages/order/delivery/delivery?id=1
"
,
})
},
//核销功能
tocheckx
()
{
//处理 传参 请求 提示核销成功
this
.
$api
.
msg
(
"
核销成功(测试提示)
"
);
},
jump_detail
()
{
uni
.
navigateTo
({
url
:
'
/pages/order/detail/detail
'
});
},
//swiper 切换
changeTab
(
e
)
{
this
.
tabCurrentIndex
=
e
.
target
.
current
;
},
//顶部tab点击 切换数据
tabClick
(
index
,
item
)
{
if
(
this
.
isClick
)
{
this
.
tabCurrentIndex
=
index
;
this
.
page
=
0
;
this
.
orderlist
=
[];
this
.
isshowall
=
true
;
this
.
is_loading_done
=
false
,
this
.
status
=
item
.
status
;
this
.
scrleft
=
index
*
45
;
// this.eleOrderListfun();
}
},
//删除订单
deleteOrder
(
index
)
{
uni
.
showLoading
({
title
:
'
请稍后
'
})
setTimeout
(()
=>
{
this
.
navList
[
this
.
tabCurrentIndex
].
orderList
.
splice
(
index
,
1
);
uni
.
hideLoading
();
},
600
)
},
//取消订单
cancelOrder
(
item
)
{
uni
.
showLoading
({
title
:
'
请稍后
'
})
setTimeout
(()
=>
{
let
{
stateTip
,
stateTipColor
}
=
this
.
orderStateExp
(
9
);
item
=
Object
.
assign
(
item
,
{
state
:
9
,
stateTip
,
stateTipColor
})
//取消订单后删除待付款中该项
let
list
=
this
.
navList
[
1
].
orderList
;
let
index
=
list
.
findIndex
(
val
=>
val
.
id
===
item
.
id
);
index
!==
-
1
&&
list
.
splice
(
index
,
1
);
uni
.
hideLoading
();
},
600
)
},
//订单状态文字和颜色
orderStateExp
(
state
)
{
let
stateTip
=
''
,
stateTipColor
=
'
#fa436a
'
;
switch
(
+
state
)
{
case
1
:
stateTip
=
'
待付款
'
;
break
;
case
2
:
stateTip
=
'
待发货
'
;
break
;
case
9
:
stateTip
=
'
订单已关闭
'
;
stateTipColor
=
'
#909399
'
;
break
;
//更多自定义
}
return
{
stateTip
,
stateTipColor
};
}
},
}
</
script
>
<
style
lang=
"scss"
>
page
,
.content
{
background
:
$page-color-base
;
height
:
100%
;
}
.fl-fx
{
position
:
fixed
;
width
:
100%
;
z-index
:
999
;
}
.swiper-box
{
height
:
calc
(
100%
-
40px
);
}
.list-scroll-content
{
height
:
100%
;
}
.navbar
{
width
:
100vw
;
display
:
flex
;
line-height
:
80upx
;
padding
:
0
10upx
;
background
:
#fff
;
box-shadow
:
0
1px
10upx
rgba
(
0
,
0
,
0
,
.06
);
position
:
relative
;
z-index
:
10
;
.nav-item
{
min-width
:
160upx
;
flex
:
1
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
100%
;
font-size
:
30upx
;
color
:
$font-color-dark
;
position
:
relative
;
&
.current
{
color
:
$base-color
;
&
:after
{
content
:
''
;
position
:
absolute
;
left
:
50%
;
bottom
:
0
;
transform
:
translateX
(
-50%
);
width
:
88upx
;
height
:
0
;
border-bottom
:
2px
solid
$base-color
;
}
}
}
}
.orderlist
{
padding
:
40upx
24upx
0
24upx
;
box-sizing
:
border-box
;
}
</
style
>
pages/index/index.vue
View file @
ba76420e
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
</navigator>
</navigator>
</view>
</view>
<view
class=
"jiu_max"
v-if=
"shop_type == 'goods'"
>
<view
class=
"jiu_max"
v-if=
"shop_type == 'goods'"
>
<!-- 商城订单 -->
<!-- 商城订单 -->
<navigator
url=
"/pages/order/shopOrder"
>
<navigator
url=
"/pages/order/shopOrder"
>
<view
class=
"jiu_min"
>
<view
class=
"jiu_min"
>
...
@@ -301,7 +301,7 @@
...
@@ -301,7 +301,7 @@
<view
class=
"jiu_max "
@
click=
"download"
v-if=
"shop_type == 'ele'&&is_bld"
>
<view
class=
"jiu_max "
@
click=
"download"
v-if=
"shop_type == 'ele'&&is_bld"
>
<view>
<view>
<view
class=
"jiu_min"
>
<view
class=
"jiu_min"
>
<view>
<view>
<image
class=
"img"
src=
"/static/icon/download.png"
mode=
""
></image>
<image
class=
"img"
src=
"/static/icon/download.png"
mode=
""
></image>
</view>
</view>
...
@@ -337,7 +337,7 @@
...
@@ -337,7 +337,7 @@
</view>
</view>
<view
class=
"BH"
></view>
<view
class=
"BH"
></view>
...
@@ -350,7 +350,8 @@
...
@@ -350,7 +350,8 @@
<
script
>
<
script
>
import
{
import
{
getskipShop
,
getskipShop
,
activity_nucleus
activity_nucleus
,
ele_carry
}
from
"
@/utils/api/merchant.js
"
;
}
from
"
@/utils/api/merchant.js
"
;
import
uniBadge
from
"
@/components/uni/uni-badge/uni-badge.vue
"
import
uniBadge
from
"
@/components/uni/uni-badge/uni-badge.vue
"
import
uniIcon
from
"
@/components/uni/uni-icon/uni-icon.vue
"
import
uniIcon
from
"
@/components/uni/uni-icon/uni-icon.vue
"
...
@@ -408,8 +409,8 @@
...
@@ -408,8 +409,8 @@
});
});
}
}
if
(
uni
.
getSystemInfoSync
().
platform
!=
'
ios
'
)
{
if
(
uni
.
getSystemInfoSync
().
platform
!=
'
ios
'
)
{
getApp
().
hgServiceFun
();
getApp
().
hgServiceFun
();
}
else
{
}
else
{
getApp
().
getIosLocation
(
2
,
'
index
'
);
getApp
().
getIosLocation
(
2
,
'
index
'
);
...
@@ -434,14 +435,14 @@
...
@@ -434,14 +435,14 @@
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
is_bld
=
res
.
data
.
is_bld
this
.
is_bld
=
res
.
data
.
is_bld
// this.is_bld = 1
// this.is_bld = 1
}
}
})
})
this
.
storeIndexfun
();
this
.
storeIndexfun
();
if
(
uni
.
getStorageSync
(
'
dwstatus
'
)
==
''
)
{
if
(
uni
.
getStorageSync
(
'
dwstatus
'
)
==
''
)
{
getApp
().
getnewsRemind
().
then
(
res
=>
{
getApp
().
getnewsRemind
().
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
if
(
this
.
$store
.
state
.
Timer
==
''
)
{
if
(
this
.
$store
.
state
.
Timer
==
''
)
{
let
Timer
=
setInterval
(()
=>
{
let
Timer
=
setInterval
(()
=>
{
getApp
().
getnewsRemind
(
2
);
getApp
().
getnewsRemind
(
2
);
...
@@ -450,14 +451,16 @@
...
@@ -450,14 +451,16 @@
}
}
}
}
})
})
}
else
{
}
else
{
if
(
uni
.
getStorageSync
(
'
dwstatus
'
)
==
3
||
uni
.
getStorageSync
(
'
dwstatus
'
)
==
0
)
{
if
(
uni
.
getStorageSync
(
'
dwstatus
'
)
==
3
||
uni
.
getStorageSync
(
'
dwstatus
'
)
==
0
)
{
//this.$api.msg('不是第一次')
//this.$api.msg('不是第一次')
getApp
().
getIosLocation
(
2
,
'
index
'
);
getApp
().
getIosLocation
(
2
,
'
index
'
);
}
else
{
}
else
{
//this.$api.msg('第一次')
//this.$api.msg('第一次')
getApp
().
getnewsRemind
().
then
(
res
=>
{
getApp
().
getnewsRemind
().
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
if
(
this
.
$store
.
state
.
Timer
==
''
)
{
if
(
this
.
$store
.
state
.
Timer
==
''
)
{
let
Timer
=
setInterval
(()
=>
{
let
Timer
=
setInterval
(()
=>
{
getApp
().
getnewsRemind
(
2
);
getApp
().
getnewsRemind
(
2
);
...
@@ -466,12 +469,9 @@
...
@@ -466,12 +469,9 @@
}
}
}
}
})
})
}
}
}
}
},
},
methods
:
{
methods
:
{
saoma
(
e
)
{
saoma
(
e
)
{
...
@@ -479,25 +479,34 @@
...
@@ -479,25 +479,34 @@
success
:
res
=>
{
success
:
res
=>
{
if
(
res
.
scanType
==
'
QR_CODE
'
)
{
//二维码
if
(
res
.
scanType
==
'
QR_CODE
'
)
{
//二维码
let
param
=
this
.
GetRequest
(
res
.
result
);
let
param
=
this
.
GetRequest
(
res
.
result
);
param
.
shop_id
=
this
.
shop_id
// param.shop_id = 81
activity_nucleus
(
param
).
then
(
res
=>
{
if
(
param
.
type
==
10
)
{
// 菜市场买菜核销
if
(
res
.
code
==
0
)
{
console
.
log
(
param
);
uni
.
showModal
({
ele_carry
(
param
).
then
(
res
=>
{
title
:
'
提示
'
,
if
(
res
.
code
==
0
){
content
:
res
.
msg
,
uni
.
showToast
({
showCancel
:
false
,
title
:
"
核销成功
"
,
confirmText
:
'
确定
'
,
icon
:
"
none
"
,
success
()
{
duration
:
3000
})
}
}
else
{
})
this
.
$api
.
msg
(
res
.
msg
);
}
else
{
}
this
.
$api
.
msg
(
res
.
msg
);
})
}
}
else
if
(
param
.
type
==
9
)
{
//零元领核销
})
activity_nucleus
(
param
).
then
(
res
=>
{
return
;
if
(
res
.
code
==
0
)
{
uni
.
showToast
({
}
else
{
title
:
"
核销成功
"
,
icon
:
"
none
"
,
duration
:
3000
})
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
})
}
}
else
{
//https://www.mxnzp.com/api/barcode/create
//https://www.mxnzp.com/api/barcode/create
//barcode=6902538005141
//barcode=6902538005141
//&app_id=ihrnqdrpunchxsfr
//&app_id=ihrnqdrpunchxsfr
...
@@ -524,7 +533,7 @@
...
@@ -524,7 +533,7 @@
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/pages/addEditEleProduct/addEditEleProduct?results=
'
+
JSON
.
stringify
(
results
)
url
:
'
/pages/addEditEleProduct/addEditEleProduct?results=
'
+
JSON
.
stringify
(
results
)
})
})
}
else
{
}
else
{
results
.
isScanCode
=
false
;
results
.
isScanCode
=
false
;
results
.
code
=
res
.
result
;
results
.
code
=
res
.
result
;
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
utils/api/merchant.js
View file @
ba76420e
...
@@ -103,4 +103,13 @@ export function activity_user(data){
...
@@ -103,4 +103,13 @@ export function activity_user(data){
*/
*/
export
function
activity_update
(
data
){
export
function
activity_update
(
data
){
return
request
.
post
(
"
ele/activity_update
"
,
data
,
{
noAuth
:
true
});
return
request
.
post
(
"
ele/activity_update
"
,
data
,
{
noAuth
:
true
});
}
/**
* 修改活动
* @param {} data
*/
export
function
ele_carry
(
data
){
return
request
.
post
(
"
ele/ele_carry
"
,
data
,
{
noAuth
:
true
});
}
}
\ No newline at end of file
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