Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eMall_miniapp
Project
Project
Details
Activity
Releases
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
高宇
eMall_miniapp
Commits
afb6cdd3
Commit
afb6cdd3
authored
Jul 27, 2023
by
wdy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
9e18c4e0
902f179f
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
500 additions
and
174 deletions
+500
-174
README.md
README.md
+1
-1
index.vue
chooseshop/index.vue
+2
-2
manifest.json
manifest.json
+2
-2
package-lock.json
package-lock.json
+1
-1
pages.json
pages.json
+3
-3
checkout.vue
pages/checkout/checkout.vue
+54
-26
goods.vue
pages/goods/goods.vue
+82
-31
login.vue
pages/login/login.vue
+99
-17
privateProtocol.vue
pages/login/privateProtocol.vue
+14
-14
userProtocol.vue
pages/login/userProtocol.vue
+1
-1
index.vue
pages/menu/index.vue
+203
-53
payment.vue
pages/order/payment/payment.vue
+10
-10
setting.vue
pages/setting/setting.vue
+4
-4
search.vue
pages/shop/search.vue
+17
-5
profile.vue
pages/user/profile.vue
+5
-2
index.js
store/index.js
+1
-1
template.h5.html
template.h5.html
+1
-1
No files found.
README.md
View file @
afb6cdd3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
## 前言
## 前言
-
linjiashop-uniapp,是
[
邻家小铺
](
http://microapp.gitee.io/linjiashop/
)
的uniapp版本,通过uniapp技术达到一套代码覆盖全平台(H5,Android,IOS,微信小程序,其他如支付宝,qq,头条小程序也可以通过简单的适配实现)的目的
-
linjiashop-uniapp,是
[
商圈plus
](
http://microapp.gitee.io/linjiashop/
)
的uniapp版本,通过uniapp技术达到一套代码覆盖全平台(H5,Android,IOS,微信小程序,其他如支付宝,qq,头条小程序也可以通过简单的适配实现)的目的
-
项目地址
[
gitee
](
https://gitee.com/microapp/linjiashop-uniapp
)
,
[
github
](
https://github.com/microapp-store/linjiashop-uniapp
)
-
项目地址
[
gitee
](
https://gitee.com/microapp/linjiashop-uniapp
)
,
[
github
](
https://github.com/microapp-store/linjiashop-uniapp
)
-
[
官方文档:http://microapp.gitee.io/linjiashop/
](
http://microapp.gitee.io/linjiashop/ecosystem/uniapp.html
)
-
[
官方文档:http://microapp.gitee.io/linjiashop/
](
http://microapp.gitee.io/linjiashop/ecosystem/uniapp.html
)
-
linjiashop-uniapp使用了
[
uView组件
](
https://www.uviewui.com
)
作为前端框架,开发过程可以多看其官方文档
-
linjiashop-uniapp使用了
[
uView组件
](
https://www.uviewui.com
)
作为前端框架,开发过程可以多看其官方文档
...
...
chooseshop/index.vue
View file @
afb6cdd3
<
template
>
<
template
>
<view
class=
"chooseshop"
>
<view
class=
"chooseshop"
>
<u-search
placeholder=
"输入购物中心名称"
bg-color=
"#eee"
:show-action=
"false"
input-align=
"center"
<
!--
<
u-search
placeholder=
"输入购物中心名称"
bg-color=
"#eee"
:show-action=
"false"
input-align=
"center"
style=
"margin: 0 40rpx;"
></u-search>
style=
"margin: 0 40rpx;"
></u-search>
-->
<view>
<view>
<view
class=
"onetitle"
@
click=
"showaddress"
>
{{
city
}}
</view>
<view
class=
"onetitle"
@
click=
"showaddress"
>
{{
city
}}
</view>
<view
class=
"address"
v-if=
"show"
>
<view
class=
"address"
v-if=
"show"
>
...
...
manifest.json
View file @
afb6cdd3
{
{
"name"
:
"
邻家小铺
"
,
"name"
:
"
商圈plus
"
,
"appid"
:
"__UNI__4ED93C0"
,
"appid"
:
"__UNI__4ED93C0"
,
"description"
:
"轻量、简介的开源小商城系统"
,
"description"
:
"轻量、简介的开源小商城系统"
,
"versionName"
:
"1.0.0"
,
"versionName"
:
"1.0.0"
,
...
@@ -149,6 +149,6 @@
...
@@ -149,6 +149,6 @@
"enable"
:
false
"enable"
:
false
}
}
},
},
"title"
:
"
邻家小铺
"
"title"
:
"
商圈plus
"
}
}
}
}
package-lock.json
View file @
afb6cdd3
{
{
"name"
:
"
邻家小铺
"
,
"name"
:
"
商圈plus
"
,
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
...
...
pages.json
View file @
afb6cdd3
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
},
{
},
{
"path"
:
"pages/goods/goods"
,
"path"
:
"pages/goods/goods"
,
"style"
:
{}
"style"
:
{}
},
{
},{
"path"
:
"pages/goods/list"
,
"path"
:
"pages/goods/list"
,
"style"
:
{}
"style"
:
{}
},
{
},
{
...
@@ -391,11 +391,11 @@
...
@@ -391,11 +391,11 @@
]
]
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
"navigationBarTextStyle"
:
"black"
,
"navigationBarTitleText"
:
"
邻家小铺
"
,
"navigationBarTitleText"
:
"
商圈plus
"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"backgroundColor"
:
"#FFFFFF"
"backgroundColor"
:
"#FFFFFF"
},
},
...
...
pages/checkout/checkout.vue
View file @
afb6cdd3
...
@@ -7,22 +7,22 @@
...
@@ -7,22 +7,22 @@
</view>
</view>
<view
class=
"list"
>
<view
class=
"list"
>
<view
class=
"item"
v-for=
"(item,index) in cartList"
:key=
"index"
>
<view
class=
"item"
>
<u-row
gutter=
"16"
>
<u-row
gutter=
"16"
>
<u-col
:span=
"3"
>
<u-col
:span=
"3"
>
<u-image
width=
"100%"
height=
"150rpx"
:src=
"imgUrl+
item.goods
.pic"
></u-image>
<u-image
width=
"100%"
height=
"150rpx"
:src=
"imgUrl+
goodsList
.pic"
></u-image>
</u-col>
</u-col>
<u-col
:span=
"9"
@
click=
"toGoods(
item.goods
.id)"
>
<u-col
:span=
"9"
@
click=
"toGoods(
goodsList
.id)"
>
<view
class=
"gl-name"
>
{{
item
.
goods
.
name
}}
</view>
<view
class=
"gl-name"
>
{{
goodsList
.
name
}}
</view>
<view
class=
"gl-descript"
>
{{
item
.
goods
.
descript
}}
</view>
<view
class=
"gl-descript"
>
{{
goodsList
.
descript
}}
</view>
<view
class=
"gl-price"
>
<view
class=
"gl-price"
>
<u-row>
<u-row>
<u-col
:span=
"6"
>
<u-col
:span=
"6"
>
¥
{{
formatPrice
(
item
.
goods
.
price
)
}}
¥
{{
formatPrice
(
price
)
}}
</u-col>
</u-col>
<u-col
:span=
"6"
>
<u-col
:span=
"6"
>
x
{{
item
.
count
}}
x
{{
count
}}
</u-col>
</u-col>
</u-row>
</u-row>
</view>
</view>
...
@@ -59,12 +59,18 @@
...
@@ -59,12 +59,18 @@
tel
:
''
tel
:
''
},
},
chooseAddrId
:
''
,
chooseAddrId
:
''
,
cartList
:
[]
cartList
:
[],
goodsList
:[],
count
:
0
,
sku
:
''
,
businessMessage
:
{},
price
:
0
}
}
},
},
computed
:
{
computed
:
{
totalPrice
()
{
totalPrice
()
{
return
this
.
cartList
.
reduce
((
total
,
item
)
=>
total
+
(
parseFloat
(
item
.
goods
.
price
)
*
item
.
count
),
0
)
// return this.cartList.reduce((total, item) => total + (parseFloat(item.goods.price) * item.count), 0)
return
parseFloat
(
this
.
price
)
*
this
.
count
}
}
},
},
...
@@ -72,21 +78,42 @@
...
@@ -72,21 +78,42 @@
let
chooseAddrId
=
uni
.
getStorageSync
(
'chooseAddrId'
)
let
chooseAddrId
=
uni
.
getStorageSync
(
'chooseAddrId'
)
console
.
log
(
'defAddrId'
,
chooseAddrId
)
console
.
log
(
'defAddrId'
,
chooseAddrId
)
this
.
chooseAddrId
=
chooseAddrId
this
.
chooseAddrId
=
chooseAddrId
this
.
getMessage
()
this
.
init
()
this
.
init
()
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
ids
=
option
.
ids
console
.
log
(
"option"
,
JSON
.
parse
(
decodeURIComponent
(
option
.
data
)))
uni
.
setStorageSync
(
'idCarts'
,
option
.
ids
)
const
data
=
JSON
.
parse
(
decodeURIComponent
(
option
.
data
))
this
.
goodsList
=
data
.
goods
this
.
count
=
data
.
count
this
.
sku
=
data
.
sku
if
(
data
.
sku
.
price
)
{
this
.
price
=
data
.
sku
.
sel
.
price
}
else
{
this
.
price
=
data
.
goods
.
price
}
console
.
log
(
"this.price"
,
this
.
price
)
// this.ids = option.ids
// uni.setStorageSync('idCarts', option.ids)
},
},
methods
:
{
methods
:
{
getMessage
(){
const
that
=
this
uni
.
getStorage
({
key
:
'business'
,
success
:
function
(
res
){
that
.
ishaveBusiness
=
true
that
.
businessMessage
=
res
.
data
console
.
log
(
"商圈数据"
,
that
.
businessMessage
)
}
})
},
init
()
{
init
()
{
const
baseApi
=
this
.
baseApi
const
baseApi
=
this
.
baseApi
let
url
=
'user/order/prepareCheckout
?idCarts='
+
this
.
ids
let
url
=
'user/order/prepareCheckout
Address'
if
(
this
.
chooseAddrId
)
{
if
(
this
.
chooseAddrId
)
{
url
+=
'
&
chosenAddressId='
+
this
.
chooseAddrId
url
+=
'
?
chosenAddressId='
+
this
.
chooseAddrId
}
}
this
.
$u
.
get
(
url
).
then
(
res
=>
{
this
.
$u
.
get
(
url
).
then
(
res
=>
{
let
addr
=
res
.
addr
let
addr
=
res
.
addr
...
@@ -96,12 +123,12 @@
...
@@ -96,12 +123,12 @@
this
.
addr
=
addr
this
.
addr
=
addr
this
.
chooseAddrId
=
addr
.
id
this
.
chooseAddrId
=
addr
.
id
}
}
let
cartList
=
res
.
list
//
let cartList = res.list
for
(
const
index
in
cartList
)
{
//
for (const index in cartList) {
let
cart
=
cartList
[
index
]
//
let cart = cartList[index]
}
//
}
this
.
cartList
=
cartList
//
this.cartList = cartList
});
});
},
},
formatPrice
(
price
)
{
formatPrice
(
price
)
{
...
@@ -120,15 +147,16 @@
...
@@ -120,15 +147,16 @@
this
.
$u
.
toast
(
'请选择收货地址'
)
this
.
$u
.
toast
(
'请选择收货地址'
)
return
return
}
}
let
idCarts
=
''
let
idCarts
=
this
.
goodsList
.
id
for
(
var
i
in
this
.
cartList
)
{
//
for (var i in this.cartList) {
idCarts
+=
this
.
cartList
[
i
].
id
+
','
//
idCarts += this.cartList[i].id + ','
}
//
}
const
params
=
{
const
params
=
{
idAddress
:
this
.
chooseAddrId
,
idAddress
:
this
.
chooseAddrId
,
idCarts
:
idCarts
idCarts
:
this
.
goodsList
.
id
}
}
this
.
$u
.
post
(
'user/order/save?idAddress='
+
this
.
chooseAddrId
+
'&idCarts='
+
idCarts
).
then
(
res
=>
{
const
message
=
""
this
.
$u
.
post
(
'user/order/saveOrder?idAddress='
+
this
.
chooseAddrId
+
'&idGoods='
+
idCarts
+
'&idSku='
+
this
.
sku
.
sel
.
id
+
'&message='
+
message
+
'&count='
+
this
.
count
+
'&tenantId='
+
this
.
businessMessage
.
id
).
then
(
res
=>
{
const
order
=
res
const
order
=
res
uni
.
setStorageSync
(
'chooseAddrId'
,
undefined
)
uni
.
setStorageSync
(
'chooseAddrId'
,
undefined
)
uni
.
getStorageSync
(
'idCarts'
,
undefined
)
uni
.
getStorageSync
(
'idCarts'
,
undefined
)
...
...
pages/goods/goods.vue
View file @
afb6cdd3
...
@@ -24,14 +24,14 @@
...
@@ -24,14 +24,14 @@
<u-icon
name=
"heart"
:size=
"40"
:color=
"likeColor"
></u-icon>
<u-icon
name=
"heart"
:size=
"40"
:color=
"likeColor"
></u-icon>
<view
class=
"text u-line-1"
>
收藏
</view>
<view
class=
"text u-line-1"
>
收藏
</view>
</view>
</view>
<view
class=
"item car"
@
click=
"toCart"
>
<
!--
<
view
class=
"item car"
@
click=
"toCart"
>
<u-badge
class=
"car-num"
:count=
"cartCount"
type=
"error"
:offset=
"[-3, -6]"
></u-badge>
<u-badge
class=
"car-num"
:count=
"cartCount"
type=
"error"
:offset=
"[-3, -6]"
></u-badge>
<u-icon
name=
"shopping-cart"
:size=
"40"
></u-icon>
<u-icon
name=
"shopping-cart"
:size=
"40"
></u-icon>
<view
class=
"text u-line-1"
>
购物车
</view>
<view
class=
"text u-line-1"
>
购物车
</view>
</view>
</view>
-->
</view>
</view>
<view
class=
"
right
"
>
<view
class=
"
buyButton
"
>
<
view
class=
"cart btn u-line-1"
@
click=
"showSkuPop('cart')"
>
加入购物车
</view
>
<
!--
<view
class=
"cart btn u-line-1"
@
click=
"showSkuPop('cart')"
>
加入购物车
</view>
--
>
<view
class=
"buy btn u-line-1"
@
click=
"showSkuPop('buy')"
>
立即购买
</view>
<view
class=
"buy btn u-line-1"
@
click=
"showSkuPop('buy')"
>
立即购买
</view>
</view>
</view>
</view>
</view>
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</u-col>
</u-col>
<u-col
:span=
"8"
class=
"right"
>
<u-col
:span=
"8"
class=
"right"
>
<view
class=
"price"
>
{{
formatPrice
(
price
)
}}
</view>
<view
class=
"price"
>
{{
formatPrice
(
price
)
}}
</view>
<view
class=
"stock"
>
剩余
<text
class=
"stock_num"
>
{{
stock
}}
</text>
件
</view>
<view
class=
"stock"
>
剩余
<text
class=
"stock_num"
>
{{
goods
.
stock
}}
</text>
件
</view>
<template
v-if=
"!sku.none_sku"
>
<template
v-if=
"!sku.none_sku"
>
<view
class=
"tips"
>
{{
hasSel
?
'已选择'
:
'请选择'
}}
<view
class=
"tips"
>
{{
hasSel
?
'已选择'
:
'请选择'
}}
<text
v-for=
"(item,index) in sku.tree"
:key=
"index"
style=
"padding-left:10rpx;"
>
<text
v-for=
"(item,index) in sku.tree"
:key=
"index"
style=
"padding-left:10rpx;"
>
...
@@ -129,7 +129,7 @@
...
@@ -129,7 +129,7 @@
},
},
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
getCartCount
()
//
this.getCartCount()
const
baseApi
=
this
.
baseApi
;
const
baseApi
=
this
.
baseApi
;
this
.
$u
.
get
(
'goods/'
+
this
.
goods
.
id
).
then
(
res
=>
{
this
.
$u
.
get
(
'goods/'
+
this
.
goods
.
id
).
then
(
res
=>
{
let
goods
=
res
.
goods
let
goods
=
res
.
goods
...
@@ -198,36 +198,64 @@
...
@@ -198,36 +198,64 @@
this
.
showSku
=
true
;
this
.
showSku
=
true
;
},
},
buy
()
{
buy
()
{
console
.
log
(
"this.goods"
,
this
.
goods
)
console
.
log
(
"this.count"
,
this
.
count
)
let
idSku
=
''
;
let
idSku
=
''
;
console
.
log
(
"this.sku"
,
this
.
sku
)
if
(
!
this
.
sku
.
none_sku
)
{
if
(
!
this
.
sku
.
none_sku
)
{
idSku
=
this
.
sku
.
sel
.
id
;
if
(
this
.
sku
.
sel
)
{
if
(
!
idSku
){
idSku
=
this
.
sku
.
sel
.
id
;
this
.
$u
.
toast
(
'请选择商品规格'
)
if
(
!
idSku
){
return
;
// this.$u.toast('请选择商品规格')
}
uni
.
showToast
({
}
title
:
'请选择商品规格'
const
params
=
{
})
idGoods
:
this
.
goods
.
id
,
return
;
count
:
this
.
count
,
}
idSku
:
idSku
}
this
.
$u
.
post
(
'user/cart/add/'
,
params
).
then
(
res
=>
{
this
.
showSku
=
false
;
if
(
'cart'
==
this
.
actionType
)
{
this
.
$u
.
toast
(
'成功加入购物车'
);
this
.
init
()
}
else
{
}
else
{
this
.
$u
.
route
({
uni
.
showToast
({
t
ype
:
'switchTab
'
,
t
itle
:
'请选择商品规格
'
,
url
:
'/pages/shop/cart
'
icon
:
'none
'
})
})
return
;
}
}
})
}
const
params
=
{
idGoods
:
this
.
goods
.
id
,
count
:
this
.
count
,
idSku
:
idSku
}
const
goodsData
=
{
goods
:
this
.
goods
,
count
:
this
.
count
,
sku
:
this
.
sku
}
this
.
$u
.
post
(
'user/cart/add/'
,
params
).
then
(
res
=>
{
this
.
showSku
=
false
;
// if ('cart' == this.actionType) {
// this.$u.toast('成功加入购物车');
// this.init()
// } else {
// this.$u.route({
// type: 'switchTab',
// url: '/pages/shop/cart'
// })
// }
// uni.navigateTo({
// url:'/pages/shop/cart'
// })
const
data
=
encodeURIComponent
(
JSON
.
stringify
(
goodsData
))
this
.
$u
.
route
({
url
:
'/pages/checkout/checkout'
,
params
:
{
data
:
data
}
})
})
},
},
//todo 商品规格选择算法待优化
//todo 商品规格选择算法待优化
selSku
(
category
,
node
)
{
selSku
(
category
,
node
)
{
...
@@ -403,6 +431,29 @@
...
@@ -403,6 +431,29 @@
margin-right
:
30rpx
;
margin-right
:
30rpx
;
}
}
.buy
{
background-color
:
#ff7900
;
}
}
.buyButton
{
display
:
flex
;
font-size
:
28rpx
;
align-items
:
center
;
position
:
absolute
;
right
:
26rpx
;
.btn
{
line-height
:
66rpx
;
padding
:
0
30rpx
;
border-radius
:
36rpx
;
color
:
#ffffff
;
}
.cart
{
background-color
:
#ed3f14
;
margin-right
:
30rpx
;
}
.buy
{
.buy
{
background-color
:
#ff7900
;
background-color
:
#ff7900
;
}
}
...
...
pages/login/login.vue
View file @
afb6cdd3
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<view
class=
"wrap"
>
<view
class=
"wrap"
>
<view
class=
"top"
></view>
<view
class=
"top"
></view>
<view
class=
"content"
>
<view
class=
"content"
>
<view
class=
"title"
>
欢迎登录
邻家小铺
</view>
<view
class=
"title"
>
欢迎登录
商圈plus
</view>
<u-form-item>
<u-form-item>
<u-input
type=
"number"
v-model=
"tel"
placeholder=
"请输入手机号"
/>
<u-input
type=
"number"
v-model=
"tel"
placeholder=
"请输入手机号"
/>
</u-form-item>
</u-form-item>
<!--
<view
class=
"tips"
>
未注册的手机号验证后自动创建
邻家小铺
账号
</view>
-->
<!--
<view
class=
"tips"
>
未注册的手机号验证后自动创建
商圈plus
账号
</view>
-->
<button
@
tap=
"submit"
:style=
"[inputStyle]"
class=
"getSmsCode"
>
获取短信验证码
</button>
<button
@
tap=
"submit"
:style=
"[inputStyle]"
class=
"getSmsCode"
>
获取短信验证码
</button>
<view
class=
"alternative"
>
<view
class=
"alternative"
>
<view
class=
"password"
@
click=
"passwordLogin"
>
密码登录
</view>
<view
class=
"password"
@
click=
"passwordLogin"
>
密码登录
</view>
...
@@ -16,26 +16,26 @@
...
@@ -16,26 +16,26 @@
</view>
</view>
<view
class=
"bottom"
>
<view
class=
"bottom"
>
<view
class=
"loginType"
>
<view
class=
"loginType"
>
<!-- #ifdef APP-PLUS -->
<
view
class=
"wechat item"
@
click=
"loginBy('wechat')
"
>
<
button
class=
"wechat item"
open-type=
"getPhoneNumber"
@
getphonenumber=
"getPhoneNumber
"
>
<view
class=
"icon"
>
<view
class=
"icon"
>
<u-icon
size=
"70"
name=
"weixin-fill"
color=
"rgb(83,194,64)"
></u-icon>
<u-icon
size=
"70"
name=
"weixin-fill"
color=
"rgb(83,194,64)"
></u-icon>
</view>
</view>
微信
微信
</
view
>
</
button
>
<view
class=
"QQ item"
@
click=
"loginBy('QQ')"
>
<
!--
<
view
class=
"QQ item"
@
click=
"loginBy('QQ')"
>
<view
class=
"icon"
>
<view
class=
"icon"
>
<u-icon
size=
"70"
name=
"qq-fill"
color=
"rgb(17,183,233)"
></u-icon>
<u-icon
size=
"70"
name=
"qq-fill"
color=
"rgb(17,183,233)"
></u-icon>
</view>
</view>
QQ
QQ
</view>
</view>
-->
<!-- #endif -->
</view>
</view>
<view
class=
"hint"
>
<view
class=
"hint"
>
登录代表同意
登录代表同意
<text
class=
"link"
@
click=
"goPage('/
pages/login/userProtocol')"
>
邻家小铺
用户协议
</text>
、
<text
class=
"link"
@
click=
"goPage('/
login/login/userProtocol')"
>
商圈plus
用户协议
</text>
、
<text
class=
"link"
@
click=
"goPage('/
pages
/login/privateProtocol')"
>
隐私政策,
</text>
<text
class=
"link"
@
click=
"goPage('/
login
/login/privateProtocol')"
>
隐私政策,
</text>
并授权使用您的
邻家小铺
账号信息(如昵称、头像、收获地址)以便您统一管理
并授权使用您的
商圈plus
账号信息(如昵称、头像、收获地址)以便您统一管理
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -58,8 +58,7 @@
...
@@ -58,8 +58,7 @@
return
style
;
return
style
;
}
}
},
},
onLoad
(){
onLoad
()
{},
},
methods
:
{
methods
:
{
submit
()
{
submit
()
{
if
(
!
(
this
.
tel
&&
this
.
tel
.
length
==
11
&&
this
.
tel
.
startsWith
(
'1'
)))
{
if
(
!
(
this
.
tel
&&
this
.
tel
.
length
==
11
&&
this
.
tel
.
startsWith
(
'1'
)))
{
...
@@ -77,7 +76,78 @@
...
@@ -77,7 +76,78 @@
})
})
},
},
loginBy
(
type
)
{
loginBy
(
type
)
{
this
.
$u
.
toast
(
'第三方账号登录开发中,敬请期待'
)
// this.$u.toast('第三方账号登录开发中,敬请期待')
var
that
=
this
uni
.
getProvider
({
service
:
'oauth'
,
success
:
function
(
res
)
{
console
.
log
(
res
.
provider
);
//支持微信、qq和微博等
if
(
~
res
.
provider
.
indexOf
(
'weixin'
))
{
uni
.
login
({
provider
:
'weixin'
,
success
:
function
(
loginRes
)
{
console
.
log
(
"App微信获取用户信息成功"
,
loginRes
);
// that.getApploginData(loginRes) //请求登录接口方法
},
fail
:
function
(
res
)
{
console
.
log
(
"App微信获取用户信息失败"
,
res
);
}
})
}
}
});
},
getPhoneNumber
(
e
)
{
console
.
log
(
"eeeeeeee"
,
e
.
detail
.
code
)
let
code2
=
e
.
detail
.
code
if
(
e
.
detail
.
errMsg
==
'getPhoneNumber:ok'
)
{
uni
.
login
({
provider
:
'weixin'
,
success
:
infoRes
=>
{
let
code
=
infoRes
.
code
;
console
.
log
(
"code"
,
code
)
this
.
$u
.
post
(
'wechat/getWxOpenId?code='
+
code
).
then
(
res
=>
{
console
.
log
(
res
,
"vvvvvvvvvvvv"
)
let
openid
=
res
.
openId
this
.
$u
.
post
(
'wechat/getUserInfoByOpenId?code='
+
code2
+
'&openId='
+
openid
).
then
(
res2
=>
{
console
.
log
(
"res2"
,
res2
)
if
(
res2
.
user
.
mobile
)
{
console
.
log
(
"到这来"
)
this
.
$u
.
vuex
(
'vuex_token'
,
res2
.
token
)
this
.
$u
.
vuex
(
'vuex_user'
,
res2
.
user
)
if
(
res2
.
user
.
avatar
&&
res2
.
user
.
avatar
!==
''
)
{
this
.
$u
.
vuex
(
'vuex_avatar'
,
this
.
baseApi
+
'/file/getImgStream?idFile='
+
res2
.
user
.
avatar
);
}
else
{
if
(
res2
.
user
.
wechatHeadImgUrl
&&
res2
.
user
.
wechatHeadImgUrl
!==
''
)
{
//如果拉取到用户微信头像,则展示微信头像
this
.
$u
.
vuex
(
'vuex_avatar'
,
res2
.
user
.
wechatHeadImgUrl
)
}
}
// this.$u.route({
// type: 'switchTab',
// url: '/pages/user/profile'
// })
uni
.
reLaunch
({
url
:
'/pages/user/profile'
})
}
})
})
},
fail
(
res
)
{
uni
.
showToast
({
title
:
'登录授权失败'
,
icon
:
'none'
,
})
}
});
}
},
},
goPage
(
url
)
{
goPage
(
url
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
...
@@ -155,11 +225,19 @@
...
@@ -155,11 +225,19 @@
align-items
:
center
;
align-items
:
center
;
color
:
$u-content-color
;
color
:
$u-content-color
;
font-size
:
28rpx
;
font-size
:
28rpx
;
background-color
:
#ffffff
!
important
;
border
:
0px
!
important
;
&
:
:
after
{
border
:
none
;
}
}
}
}
}
.hint
{
.hint
{
padding
:
20rpx
40rpx
;
position
:
fixed
;
bottom
:
0
;
padding
:
40rpx
40rpx
;
font-size
:
20rpx
;
font-size
:
20rpx
;
color
:
$u-tips-color
;
color
:
$u-tips-color
;
...
@@ -168,5 +246,9 @@
...
@@ -168,5 +246,9 @@
}
}
}
}
}
}
/
deep
/
.button
{
border
:
0px
!
important
;
}
}
}
</
style
>
</
style
>
pages/login/privateProtocol.vue
View file @
afb6cdd3
<
template
>
<
template
>
<view
class=
"wrap"
>
<view
class=
"wrap"
>
<view
class=
"pp-content"
>
邻家小铺重视用户的隐私权,我们也深知您向邻家小铺提供各种信息是基于对邻家小铺的完全信任。在使用邻家小铺各项服务前,请您务必仔细阅读并透彻理解本《隐私权政策》,在确认充分理解并同意后再开始使用邻家小铺服务。如对本政策内容有任何疑问、意见或建议,您可通过邻家小铺公布的联系方式与我们联系。邻家小铺的宗旨是以诚信为本,我们一定会以负责的态度对待您提交给我们的信息,邻家小铺
郑重承诺如下:
</view>
<view
class=
"pp-content"
>
商圈plus重视用户的隐私权,我们也深知您向商圈plus提供各种信息是基于对商圈plus的完全信任。在使用商圈plus各项服务前,请您务必仔细阅读并透彻理解本《隐私权政策》,在确认充分理解并同意后再开始使用商圈plus服务。如对本政策内容有任何疑问、意见或建议,您可通过商圈plus公布的联系方式与我们联系。商圈plus的宗旨是以诚信为本,我们一定会以负责的态度对待您提交给我们的信息,商圈plus
郑重承诺如下:
</view>
<view
class=
"pp-items"
>
<view
class=
"pp-items"
>
1、
邻家小铺
郑重承诺不会出售用户的任何信息,并保护您的电子邮件、手机号码、姓名等个人隐私信息。
<br>
1、
商圈plus
郑重承诺不会出售用户的任何信息,并保护您的电子邮件、手机号码、姓名等个人隐私信息。
<br>
2、
邻家小铺
采取了有效的措施保护您的个人隐私资料。除非根据法律或政府的强制性规定,否则在未得到用户的许可之前,我们不会把用户的任何个人资料提供给无关的第三方(包括公司或个人)。
2、
商圈plus
采取了有效的措施保护您的个人隐私资料。除非根据法律或政府的强制性规定,否则在未得到用户的许可之前,我们不会把用户的任何个人资料提供给无关的第三方(包括公司或个人)。
</view>
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
下面是具体的阐述本网站如何处理用户的隐私问题:
下面是具体的阐述本网站如何处理用户的隐私问题:
...
@@ -12,16 +12,16 @@
...
@@ -12,16 +12,16 @@
<view
class=
"pp-title1"
>
一、我们所收集的信息以及如何使用:
</view>
<view
class=
"pp-title1"
>
一、我们所收集的信息以及如何使用:
</view>
<view
class=
"pp-title2"
>
用户提交资料
</view>
<view
class=
"pp-title2"
>
用户提交资料
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
当您注册
邻家小铺
时,您需要提供手机号,以便我们识别您的身份或与您联络。我们会利用一些有效方法,确认您的个人资料的正确性与有效性。
当您注册
商圈plus
时,您需要提供手机号,以便我们识别您的身份或与您联络。我们会利用一些有效方法,确认您的个人资料的正确性与有效性。
</view>
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
在您使用
邻家小铺
服务过程中,为识别账号异常状态、了解产品适配性、向您提供更契合您需求的页面展示和搜索结果,我们可能会自动收集您的使用情况并存储为网络日志信息,包括
在您使用
商圈plus
服务过程中,为识别账号异常状态、了解产品适配性、向您提供更契合您需求的页面展示和搜索结果,我们可能会自动收集您的使用情况并存储为网络日志信息,包括
</view>
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
设备信息:我们会根据您在使用
邻家小铺
服务中的具体操作,接收并记录您所使用的设备相关信息(包括设备型号、操作系统版本、设备设置、唯一设备标识符、设备环境、移动应用列表等软硬件特征信息)、设备所在位置相关信息(包括您授权的GPS位置以及WLAN接入点、蓝牙和基站等传感器信息)。
设备信息:我们会根据您在使用
商圈plus
服务中的具体操作,接收并记录您所使用的设备相关信息(包括设备型号、操作系统版本、设备设置、唯一设备标识符、设备环境、移动应用列表等软硬件特征信息)、设备所在位置相关信息(包括您授权的GPS位置以及WLAN接入点、蓝牙和基站等传感器信息)。
</view>
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
服务日志信息:当您使用
邻家小铺
服务时,我们会自动收集您对我们服务的详细使用情况,作为服务日志保存,包括但不限于浏览、搜索查询、关注企业、监控企业以及IP地址、浏览器类型、电信运营商、使用语言、访问日期和时间等。
服务日志信息:当您使用
商圈plus
服务时,我们会自动收集您对我们服务的详细使用情况,作为服务日志保存,包括但不限于浏览、搜索查询、关注企业、监控企业以及IP地址、浏览器类型、电信运营商、使用语言、访问日期和时间等。
</view>
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
请注意,单独的设备信息、服务日志信息是无法识别特定自然人身份的信息。如果我们将这类非个人信息与其他信息结合用于识别特定自然人身份,或者将其与个人信息结合使用,则在结合使用期间,这类非个人信息将被视为个人信息,除取得您授权或法律法规另有规定外,我们会将这类信息进行匿名处理。
请注意,单独的设备信息、服务日志信息是无法识别特定自然人身份的信息。如果我们将这类非个人信息与其他信息结合用于识别特定自然人身份,或者将其与个人信息结合使用,则在结合使用期间,这类非个人信息将被视为个人信息,除取得您授权或法律法规另有规定外,我们会将这类信息进行匿名处理。
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
<view
class=
"pp-title2"
>
非个人资料辨别
</view>
<view
class=
"pp-title2"
>
非个人资料辨别
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
我们除了向您收集个人资料以便为您提供服务以外,还可能通过您的IP地址收集一些非个人隐私的统计资料,使我们能够进一步改善
邻家小铺
的服务。例如,当您浏览一个网页时,此网址、当时的时间、您所使用的浏览器性质、给您提供接入服务的ISP等,都会被自动记录下来。
我们除了向您收集个人资料以便为您提供服务以外,还可能通过您的IP地址收集一些非个人隐私的统计资料,使我们能够进一步改善
商圈plus
的服务。例如,当您浏览一个网页时,此网址、当时的时间、您所使用的浏览器性质、给您提供接入服务的ISP等,都会被自动记录下来。
</view>
</view>
...
@@ -55,11 +55,11 @@
...
@@ -55,11 +55,11 @@
(2) 根据有关法律法规的要求或按照法院或相关政府部门的要求;
<br>
(2) 根据有关法律法规的要求或按照法院或相关政府部门的要求;
<br>
(3) 为维护
邻家小铺
的合法权益;
<br>
(3) 为维护
商圈plus
的合法权益;
<br>
(4) 为维护
邻家小铺
的用户和社会公众的合法权益;
<br>
(4) 为维护
商圈plus
的用户和社会公众的合法权益;
<br>
(5)
邻家小铺
认为有必要的其他情况。
<br>
(5)
商圈plus
认为有必要的其他情况。
<br>
</view>
</view>
<view
class=
"pp-title1"
>
三、信息的更新和删除
</view>
<view
class=
"pp-title1"
>
三、信息的更新和删除
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
...
@@ -71,14 +71,14 @@
...
@@ -71,14 +71,14 @@
</view>
</view>
<view
class=
"pp-title1"
>
五、本政策如何更新
</view>
<view
class=
"pp-title1"
>
五、本政策如何更新
</view>
<view
class=
"pp-content"
>
<view
class=
"pp-content"
>
邻家小铺
可能会对隐私权政策进行修改。如果在使用用户个人信息政策方面有大幅度修改时,我们会通过电子邮件通知您。本隐私保护制度最后一次更新时间为2020年8月29日。
商圈plus
可能会对隐私权政策进行修改。如果在使用用户个人信息政策方面有大幅度修改时,我们会通过电子邮件通知您。本隐私保护制度最后一次更新时间为2020年8月29日。
</view>
</view>
<view
class=
"pp-title1"
>
六、如何联系我们
</view>
<view
class=
"pp-title1"
>
六、如何联系我们
</view>
<view
class=
"pp-content"
>
您可以通过以下方式与我们联系,我们将在收到您的需求后,在15个工作日内予以回复:
</view>
<view
class=
"pp-content"
>
您可以通过以下方式与我们联系,我们将在收到您的需求后,在15个工作日内予以回复:
</view>
<view
class=
"pp-items"
>
<view
class=
"pp-items"
>
a) 如对本政策内容有任何疑问、意见或建议,您可通过
邻家小铺
客服与我们联系;
<br>
a) 如对本政策内容有任何疑问、意见或建议,您可通过
商圈plus
客服与我们联系;
<br>
b) 如发现个人信息可能被泄露,您可以通过
邻家小铺
客服进行投诉举报;
b) 如发现个人信息可能被泄露,您可以通过
商圈plus
客服进行投诉举报;
</view>
</view>
...
...
pages/login/userProtocol.vue
View file @
afb6cdd3
<
template
>
<
template
>
<view
class=
"wrap"
>
<view
class=
"wrap"
>
<view
class=
"pp-content"
>
欢迎使用
邻家小铺
平台(以下简称“本平台”),本协议自开始使用网站,或成为网站的注册用户时即产生法律效力。本协议包括本平台网站内容的使用政策及本平台隐私政策。您在使用本平台提供的各项服务之前,应仔细阅读本服务公约。如您不同意本服务公约或随时对其的修改,您可以主动取消本平台提供的服务;您一旦使用本平台服务,即视为您已了解并完全同意本服务公约各项内容,并成为本平台用户(以下简称“用户”)。
</view>
<view
class=
"pp-content"
>
欢迎使用
商圈plus
平台(以下简称“本平台”),本协议自开始使用网站,或成为网站的注册用户时即产生法律效力。本协议包括本平台网站内容的使用政策及本平台隐私政策。您在使用本平台提供的各项服务之前,应仔细阅读本服务公约。如您不同意本服务公约或随时对其的修改,您可以主动取消本平台提供的服务;您一旦使用本平台服务,即视为您已了解并完全同意本服务公约各项内容,并成为本平台用户(以下简称“用户”)。
</view>
<view
class=
"pp-title1"
>
1.服务条款的确认
</view>
<view
class=
"pp-title1"
>
1.服务条款的确认
</view>
<view
class=
"pp-content"
>
本网站根据业务发展需要,有可能随时决定更改本协议条款。如本协议条款有任何变更,将在"本平台"网站上刊载公告或通过邮件的方式通知用户。如您不同意相关变更,应立即停止使用本网站所提供的服务。经修订的条款一经在本网站公布,立即自动生效。如果您继续使用本网站的服务,则表示您接受经修订的条款。除另行声明外,本平台上任何使服务范围扩大或功能增强的新内容,均受本协议约束。
</view>
<view
class=
"pp-content"
>
本网站根据业务发展需要,有可能随时决定更改本协议条款。如本协议条款有任何变更,将在"本平台"网站上刊载公告或通过邮件的方式通知用户。如您不同意相关变更,应立即停止使用本网站所提供的服务。经修订的条款一经在本网站公布,立即自动生效。如果您继续使用本网站的服务,则表示您接受经修订的条款。除另行声明外,本平台上任何使服务范围扩大或功能增强的新内容,均受本协议约束。
</view>
<view
class=
"pp-title1"
>
2.账户注册及使用
</view>
<view
class=
"pp-title1"
>
2.账户注册及使用
</view>
...
...
pages/menu/index.vue
View file @
afb6cdd3
...
@@ -8,26 +8,73 @@
...
@@ -8,26 +8,73 @@
</view>
</view>
<!-- 主体区域 -->
<!-- 主体区域 -->
<view
class=
"u-menu-wrap"
>
<view
class=
"u-menu-wrap"
>
<!--一级栏目页 -->
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
<scroll-view
scroll-y
scroll-with-animation
class=
"u-tab-view menu-scroll-view"
:scroll-top=
"scrollTop"
:scroll-into-view=
"itemId
"
>
:scroll-into-view=
"itemId"
style=
"width: 160rpx;
"
>
<view
v-for=
"(item,index) in tabbar"
:key=
"index"
class=
"u-tab-item"
:class=
"[current == index ? 'u-tab-item-active' : '']"
<view
v-for=
"(item,index) in tabbar"
:key=
"index"
class=
"u-tab-item"
@
tap
.
stop=
"swichMenu(index)"
>
:class=
"[current == index ? 'u-tab-item-active' : '']"
@
tap
.
stop=
"swichMenu(index)"
>
<text
class=
"u-line-1"
>
{{
item
.
name
}}
</text>
<text
class=
"u-line-1"
>
{{
item
.
name
}}
</text>
</view>
</view>
</scroll-view>
</scroll-view>
<scroll-view
:scroll-top=
"scrollRightTop"
scroll-y
scroll-with-animation
class=
"right-box"
@
scroll=
"rightScroll"
>
<!-- 默认显示的页面 -->
<scroll-view
:scroll-top=
"scrollRightTop"
scroll-y
scroll-with-animation
class=
"right-box"
@
scroll=
"rightScroll"
style=
"width: calc(100vw - 160rpx);"
v-if=
"isShow"
>
<view
class=
"page-view"
>
<view
class=
"page-view"
>
<view
class=
"class-item"
:id=
"'item' + index"
v-for=
"(item , index) in tabbar"
:key=
"index"
>
<view
class=
"class-item"
:id=
"'item' + index"
v-for=
"(item , index) in tabbar"
:key=
"index"
>
<view
class=
"item-title"
>
<view
style=
"display: flex;"
>
<text>
{{
item
.
name
}}
</text>
<view
class=
"item-title"
>
<text>
{{
item
.
name
}}
</text>
</view>
<view
@
click
.
stop=
"click(index,item.children)"
style=
"width: 57%;padding-right: 20rpx;"
>
<u-tabs
:list=
"item.children"
:current=
"currentList[index].current"
@
change=
"change"
:gutter=
"100"
></u-tabs>
</view>
<view
class=
"more-title"
v-if=
"item.isshowMore"
@
click=
"getmoreGoods(item,index)"
>
<view>
MORE
</view>
<u-icon
name=
"arrow-right"
></u-icon>
</view>
</view>
</view>
<view
class=
"item-container"
>
<view
class=
"item-container"
v-if=
"item.children[currentList[index].current].goods"
>
<u-tabs
:list=
"item.children"
:is-scroll=
"false"
:current=
"currentList[index].current"
@
change=
"change(index)"
></u-tabs>
<view
class=
"thumb-box"
<!--
<view
class=
"thumb-box"
v-for=
"(item1, index1) in item.children"
:key=
"index1"
@
click=
"toCategory(item1)"
>
v-for=
"(item1, index1) in item.children[currentList[index].current].goods"
:key=
"index1"
<image
class=
"item-menu-image"
:src=
"baseApi+'/file/getImgStream?idFile='+item1.icon"
mode=
""
></image>
@
click=
"toCategory(item1)"
>
<image
class=
"item-menu-image"
:src=
"baseApi+'/file/getImgStream?idFile='+item1.pic"
mode=
""
></image>
<view
class=
"item-menu-name"
>
{{
item1
.
name
}}
</view>
<view
class=
"item-menu-name"
>
{{
item1
.
name
}}
</view>
</view>
</view>
<view
v-else
class=
"nodata"
>
<span>
暂无数据
</span>
</view>
</view>
</view>
</scroll-view>
<!-- 点击更多之后显示的页面 -->
<scroll-view
:scroll-top=
"scrollRightTop"
scroll-y
scroll-with-animation
class=
"right-box"
@
scroll=
"rightScroll"
style=
"width: calc(100vw - 160rpx);"
v-else
>
<view
class=
"page-view"
>
<view
class=
"class-item"
>
<view
style=
"display: flex;"
>
<view
class=
"item-title"
>
<text>
{{
columnList
.
name
}}
</text>
</view>
<view
style=
"width: 57%;padding-right: 20rpx;"
>
<u-tabs
:list=
"columnList.children"
:current=
"moreCurrtnt"
@
change=
"morechange"
:gutter=
"100"
></u-tabs>
</view>
<!--
<view
class=
"more-title"
v-if=
"item.isshowMore"
@
click=
"getmoreGoods(item,index)"
>
<view>
MORE
</view>
<u-icon
name=
"arrow-right"
></u-icon>
</view>
-->
</view>
-->
</view>
</view>
<view
class=
"item-container"
>
<view
class=
"thumb-box"
v-for=
"(item1, index1) in goodsList"
:key=
"index1"
@
click=
"toCategory(item1)"
>
<image
class=
"item-menu-image"
:src=
"baseApi+'/file/getImgStream?idFile='+item1.pic"
mode=
""
></image>
<view
class=
"item-menu-name"
>
{{
item1
.
name
}}
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</scroll-view>
...
@@ -50,17 +97,21 @@
...
@@ -50,17 +97,21 @@
scrollRightTop
:
0
,
// 右边栏目scroll-view的滚动条高度
scrollRightTop
:
0
,
// 右边栏目scroll-view的滚动条高度
timer
:
null
,
// 定时器
timer
:
null
,
// 定时器
baseApi
:
this
.
baseApi
,
baseApi
:
this
.
baseApi
,
businessMessage
:{}
,
// 商圈数据
businessMessage
:
{},
// 商圈数据
list
:
[],
list
:
[],
// tab列表
current
:
0
,
columnList
:
[],
// 栏目列表
currentList
:
[
goodsList
:
[],
// 全部商品列表
{
currentIndex
:
0
,
currentList
:
[{
current
:
0
current
:
0
},
},
{
{
current
:
0
current
:
0
}
}
]
],
moreCurrtnt
:
0
,
isshowMore
:
false
,
// 是否显示more
isShow
:
true
}
}
},
},
onLoad
()
{
onLoad
()
{
...
@@ -68,38 +119,98 @@
...
@@ -68,38 +119,98 @@
// this.init()
// this.init()
},
},
methods
:
{
methods
:
{
change
(
index
,
item
)
{
// tab页点击事件
console
.
log
(
"index"
,
index
,
"item"
,
item
)
click
(
index
,
item
)
{
this
.
current
=
index
;
console
.
log
(
"item"
,
index
,
"item"
,
item
)
const
id
=
this
.
currentIndex
this
.
currentList
[
index
].
current
=
id
const
columnsId
=
item
[
id
].
id
this
.
$u
.
get
(
'/goods/queryGoodsByColumnsId?tenantId='
+
this
.
businessMessage
.
id
+
'&columnsId='
+
columnsId
)
.
then
(
res
=>
{
console
.
log
(
"商品"
,
res
)
if
(
res
.
records
.
length
>
6
)
{
this
.
tabbar
[
index
].
isshowMore
=
true
this
.
tabbar
[
index
].
children
[
id
].
goods
=
res
.
records
.
slice
(
0
,
6
)
}
else
{
this
.
tabbar
[
index
].
isshowMore
=
false
this
.
tabbar
[
index
].
children
[
id
].
goods
=
res
.
records
}
})
},
},
getMessage
(){
// tab切换方法(获取点tab标签的下标)
change
(
index
)
{
console
.
log
(
"index"
,
index
)
this
.
currentIndex
=
index
;
},
morechange
(
index
)
{
console
.
log
(
"aaaaaaaaaaa"
)
this
.
moreCurrtnt
=
index
const
id
=
this
.
columnList
.
children
[
index
].
id
this
.
$u
.
get
(
'/goods/queryGoodsByColumnsId?tenantId='
+
this
.
businessMessage
.
id
+
'&columnsId='
+
id
).
then
(
response
=>
{
console
.
log
(
"所有商品"
,
response
)
this
.
goodsList
=
response
.
records
})
},
//获取栏目列表
getMessage
()
{
const
that
=
this
const
that
=
this
uni
.
getStorage
({
uni
.
getStorage
({
key
:
'business'
,
key
:
'business'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// that.ishaveBusiness = true
// that.ishaveBusiness = true
that
.
businessMessage
=
res
.
data
that
.
businessMessage
=
res
.
data
console
.
log
(
"商圈数据"
,
that
.
businessMessage
)
console
.
log
(
"商圈数据"
,
that
.
businessMessage
)
that
.
init
()
}
}
})
})
this
.
$nextTick
(()
=>
{
//
this.$nextTick(()=>{
this
.
init
()
//
this.init()
},
1000
)
//
},1000)
},
},
init
()
{
init
()
{
this
.
$u
.
get
(
'columns/mobile/list?tenantId='
+
this
.
businessMessage
.
id
).
then
(
res
=>
{
this
.
$u
.
get
(
'columns/mobile/list?tenantId='
+
this
.
businessMessage
.
id
).
then
(
res
=>
{
res
.
forEach
(
item
=>
{
if
(
item
.
children
[
0
].
goods
)
{
if
(
item
.
children
[
0
].
goods
.
length
>
6
)
{
item
.
isshowMore
=
true
item
.
children
[
0
].
goods
=
item
.
children
[
0
].
goods
.
slice
(
0
,
6
)
}
else
{
item
.
isshowMore
=
false
}
}
else
{
item
.
isshowMore
=
false
}
})
this
.
tabbar
=
res
this
.
tabbar
=
res
console
.
log
(
"this.tabbar"
,
this
.
tabbar
)
this
.
getMenuItemTop
()
this
.
getMenuItemTop
()
})
})
},
},
// 点击MORE
getmoreGoods
(
res
,
index
)
{
this
.
isShow
=
false
this
.
columnList
=
res
console
.
log
(
"选择栏目数据"
,
res
)
console
.
log
(
"栏目下标"
,
index
)
this
.
moreCurrtnt
=
this
.
currentIndex
const
id
=
this
.
currentIndex
const
id1
=
res
.
children
[
id
].
id
this
.
$u
.
get
(
'/goods/queryGoodsByColumnsId?tenantId='
+
this
.
businessMessage
.
id
+
'&columnsId='
+
id1
).
then
(
response
=>
{
console
.
log
(
"所有商品"
,
response
)
this
.
goodsList
=
response
.
records
})
},
toSearch
()
{
toSearch
()
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'/pages/shop/search'
url
:
'/pages/shop/search'
})
})
},
},
toCategory
(
category
)
{
toCategory
(
category
)
{
console
.
log
(
'c'
,
category
)
console
.
log
(
'c'
,
category
)
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'/pages/menu/list'
,
url
:
'/pages/menu/list'
,
params
:
{
params
:
{
...
@@ -109,10 +220,11 @@
...
@@ -109,10 +220,11 @@
},
},
// 点击左边的栏目切换
// 点击左边的栏目切换
async
swichMenu
(
index
)
{
async
swichMenu
(
index
)
{
this
.
isShow
=
true
if
(
this
.
arr
.
length
==
0
)
{
if
(
this
.
arr
.
length
==
0
)
{
await
this
.
getMenuItemTop
()
await
this
.
getMenuItemTop
()
}
}
if
(
index
==
this
.
current
)
return
//
if (index == this.current) return
this
.
scrollRightTop
=
this
.
oldScrollTop
this
.
scrollRightTop
=
this
.
oldScrollTop
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
this
.
scrollRightTop
=
this
.
arr
[
index
];
this
.
scrollRightTop
=
this
.
arr
[
index
];
...
@@ -223,17 +335,20 @@
...
@@ -223,17 +335,20 @@
/* #endif */
/* #endif */
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
.content
{
.content
{
display
:
flex
;
display
:
flex
;
.left
{
.left
{
width
:
20%
;
width
:
20%
;
height
:
91vh
;
height
:
91vh
;
overflow
:
scroll
;
overflow
:
scroll
;
background-color
:
#eeeeee
;
background-color
:
#eeeeee
;
.list
{
.list
{
width
:
100%
;
width
:
100%
;
.list-item
{
.list-item
{
background-color
:
#eeeeee
;
background-color
:
#eeeeee
;
color
:
#333
;
color
:
#333
;
width
:
100%
;
width
:
100%
;
...
@@ -242,7 +357,8 @@
...
@@ -242,7 +357,8 @@
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
}
}
.checkListItem
{
.checkListItem
{
background-color
:
#fff
;
background-color
:
#fff
;
color
:
red
;
color
:
red
;
width
:
100%
;
width
:
100%
;
...
@@ -253,39 +369,44 @@
...
@@ -253,39 +369,44 @@
}
}
}
}
}
}
.right
{
.right
{
width
:
80%
;
width
:
80%
;
min-height
:
91vh
;
min-height
:
91vh
;
background-color
:
#fff
;
background-color
:
#fff
;
.shop
{
.shop
{
width
:
100%
;
width
:
100%
;
height
:
80rpx
;
height
:
80rpx
;
.shop-item
{
.shop-item
{
display
:
flex
;
display
:
flex
;
height
:
80rpx
;
height
:
80rpx
;
align-items
:
center
;
align-items
:
center
;
.text
{
margin-left
:
30rpx
;
.text
{
display
:
flex
;
margin-left
:
30rpx
;
height
:
80rpx
;
display
:
flex
;
align-items
:
center
;
height
:
80rpx
;
align-items
:
center
;
}
}
.right
{
.right
{
position
:
absolute
;
position
:
absolute
;
right
:
18rpx
;
right
:
18rpx
;
}
}
}
}
}
}
}
}
}
}
}
}
.u-search-box
{
.u-search-box
{
padding
:
10rpx
30rpx
;
padding
:
10rpx
30rpx
;
margin-bottom
:
30rpx
;
margin-bottom
:
30rpx
;
}
}
.u-search-inner
{
.u-search-inner
{
background-color
:
rgb
(
234
,
234
,
234
);
background-color
:
rgb
(
234
,
234
,
234
);
border-radius
:
100rpx
;
border-radius
:
100rpx
;
...
@@ -293,6 +414,7 @@
...
@@ -293,6 +414,7 @@
align-items
:
center
;
align-items
:
center
;
padding
:
10rpx
16rpx
;
padding
:
10rpx
16rpx
;
}
}
.u-search-text
{
.u-search-text
{
font-size
:
24rpx
;
font-size
:
24rpx
;
color
:
$u-tips-color
;
color
:
$u-tips-color
;
...
@@ -304,9 +426,8 @@
...
@@ -304,9 +426,8 @@
display
:
flex
;
display
:
flex
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.u-tab-view
{
.u-tab-view
{
width
:
200rpx
;
height
:
100%
;
height
:
100%
;
}
}
...
@@ -350,6 +471,10 @@
...
@@ -350,6 +471,10 @@
.page-view
{
.page-view
{
padding
:
16rpx
;
padding
:
16rpx
;
/
deep
/
.u-tab-item
{
padding
:
0
10rpx
!
important
;
}
}
}
.class-item
{
.class-item
{
...
@@ -367,6 +492,19 @@
...
@@ -367,6 +492,19 @@
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
$u-main-color
;
color
:
$u-main-color
;
font-weight
:
bold
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
margin-right
:
20rpx
;
}
.more-title
{
font-size
:
26rpx
;
color
:
$u-main-color
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
float
:
right
;
width
:
100rpx
;
}
}
.item-menu-name
{
.item-menu-name
{
...
@@ -376,13 +514,13 @@
...
@@ -376,13 +514,13 @@
}
}
.item-container
{
.item-container
{
width
:
8
0%
;
width
:
10
0%
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
}
}
.thumb-box
{
.thumb-box
{
width
:
33
.333333
%
;
width
:
33%
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
...
@@ -394,4 +532,16 @@
...
@@ -394,4 +532,16 @@
width
:
120rpx
;
width
:
120rpx
;
height
:
120rpx
;
height
:
120rpx
;
}
}
</
style
>
/
deep
/
.u-tab-item
{
padding
:
0
20rpx
;
}
.nodata
{
height
:
100rpx
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
</
style
>
\ No newline at end of file
pages/order/payment/payment.vue
View file @
afb6cdd3
...
@@ -54,14 +54,14 @@
...
@@ -54,14 +54,14 @@
this
.
orderSn
=
option
.
orderSn
this
.
orderSn
=
option
.
orderSn
this
.
totalPrice
=
option
.
totalPrice
this
.
totalPrice
=
option
.
totalPrice
//使用微信访问本系统的时候获取微信openid,否则不获取
//使用微信访问本系统的时候获取微信openid,否则不获取
const
userAgent
=
window
.
navigator
.
userAgent
.
toLowerCase
()
//
const userAgent = window.navigator.userAgent.toLowerCase()
if
(
userAgent
.
indexOf
(
'micromessenger'
)
<=
-
1
)
{
//
if (userAgent.indexOf('micromessenger')
<=
-
1
)
{
this
.
payWayList
.
push
({
//
this.payWayList.push({
name
:
'alipay'
,
//
name: 'alipay',
text
:
'支付宝'
,
//
text: '支付宝',
img
:
'/static/img/alipay.png'
//
img: '/static/img/alipay.png'
})
//
})
}
//
}
this
.
init
()
this
.
init
()
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
// #ifndef H5
// #ifndef H5
if
(
'wxpay'
===
this
.
payType
)
{
if
(
'wxpay'
===
this
.
payType
)
{
const
that
=
this
this
.
$u
.
post
(
'pay/wx/prepare?orderSn='
+
this
.
orderSn
).
then
(
res
=>
{
this
.
$u
.
post
(
'pay/wx/prepare?orderSn='
+
this
.
orderSn
).
then
(
res
=>
{
uni
.
requestPayment
({
uni
.
requestPayment
({
provider
:
'wxpay'
,
provider
:
'wxpay'
,
...
@@ -112,7 +112,7 @@
...
@@ -112,7 +112,7 @@
signType
:
res
.
signType
,
signType
:
res
.
signType
,
paySign
:
res
.
paySign
,
//签名内容
paySign
:
res
.
paySign
,
//签名内容
success
:
(
e
)
=>
{
success
:
(
e
)
=>
{
me
.
queryPayResult
()
that
.
queryPayResult
()
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
console
.
log
(
"fail"
,
e
);
console
.
log
(
"fail"
,
e
);
...
...
pages/setting/setting.vue
View file @
afb6cdd3
...
@@ -17,14 +17,14 @@
...
@@ -17,14 +17,14 @@
</u-cell-group>
</u-cell-group>
</view>
</view>
<view
class=
"u-m-t-20"
>
<!--
<view
class=
"u-m-t-20"
>
<u-cell-group>
<u-cell-group>
<u-cell-item
icon=
"info-circle"
title=
"关于邻家小铺"
@
click=
"openPage('/pages/setting/about')"
></u-cell-item>
<u-cell-item
icon=
"info-circle"
title=
"关于邻家小铺"
@
click=
"openPage('/pages/setting/about')"
></u-cell-item>
<!-- #ifdef H5 || APP-PLUS -->
<!-- #ifdef H5 || APP-PLUS -->
<
u-cell-item
icon=
"file-text"
title=
"在线文档"
@
click=
"toDoc"
></u-cell-item
>
<
!--
<u-cell-item
icon=
"file-text"
title=
"在线文档"
@
click=
"toDoc"
></u-cell-item>
--
>
<!-- #endif -->
<!-- #endif -->
</u-cell-group>
<!--
</u-cell-group>
</view>
</view>
-->
<view
class=
"u-m-t-20"
>
<view
class=
"u-m-t-20"
>
<u-button
@
click=
"logout"
>
退出
</u-button>
<u-button
@
click=
"logout"
>
退出
</u-button>
</view>
</view>
...
...
pages/shop/search.vue
View file @
afb6cdd3
...
@@ -35,15 +35,28 @@
...
@@ -35,15 +35,28 @@
limit
:
20
,
limit
:
20
,
keyword
:
''
keyword
:
''
},
},
businessMessage
:
{}
}
}
},
},
onLoad
()
{
onLoad
()
{
this
.
init
();
this
.
getMessage
();
},
},
methods
:
{
methods
:
{
getMessage
(){
const
that
=
this
uni
.
getStorage
({
key
:
'business'
,
success
:
function
(
res
){
that
.
ishaveBusiness
=
true
that
.
businessMessage
=
res
.
data
console
.
log
(
"商圈数据"
,
that
.
businessMessage
)
that
.
init
()
}
})
},
init
()
{
init
()
{
const
baseApi
=
this
.
baseApi
;
const
baseApi
=
this
.
baseApi
;
this
.
$u
.
get
(
'/goods/searchHot
'
).
then
(
res
=>
{
this
.
$u
.
get
(
'/goods/searchHot
?tenantId='
+
this
.
businessMessage
.
id
).
then
(
res
=>
{
this
.
noResult
=
true
;
this
.
noResult
=
true
;
let
list
=
res
;
let
list
=
res
;
for
(
const
index
in
list
)
{
for
(
const
index
in
list
)
{
...
@@ -69,11 +82,10 @@
...
@@ -69,11 +82,10 @@
this
.
init
();
this
.
init
();
}
else
{
}
else
{
const
page
=
this
.
listQuery
.
page
;
const
page
=
this
.
listQuery
.
page
;
const
limit
=
this
.
listQuery
.
limit
;
const
limit
=
this
.
listQuery
.
limit
;
const
baseApi
=
this
.
baseApi
;
const
baseApi
=
this
.
baseApi
;
this
.
$u
.
get
(
'goods/search?page='
+
page
+
'&limit='
+
limit
+
'&key='
+
keyword
).
then
(
res
=>
{
this
.
$u
.
get
(
'goods/search?page='
+
page
+
'&limit='
+
limit
+
'&key='
+
keyword
+
'&tenantId='
+
this
.
businessMessage
.
id
).
then
(
res
=>
{
let
list
=
res
.
records
;
let
list
=
res
.
records
;
this
.
noResult
=
!
list
.
length
>
0
;
this
.
noResult
=
!
list
.
length
>
0
;
for
(
const
index
in
list
)
{
for
(
const
index
in
list
)
{
...
@@ -95,7 +107,7 @@
...
@@ -95,7 +107,7 @@
id
:
id
id
:
id
}
}
})
})
}
,
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/user/profile.vue
View file @
afb6cdd3
<
template
>
<
template
>
<view
class=
"wrap"
>
<view
class=
"wrap"
>
<view
class=
"u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30"
>
<view
class=
"u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30"
>
<view
class=
"u-m-r-10"
>
<view
class=
"u-m-r-10"
v-if=
"vuex_avatar!==''"
>
<u-avatar
:src=
"vuex_avatar"
size=
"140"
></u-avatar>
<u-avatar
:src=
"vuex_avatar"
size=
"140"
></u-avatar>
</view>
</view>
<view
class=
"u-m-r-10"
v-else
>
<u-avatar
size=
"140"
></u-avatar>
</view>
<view
class=
"u-flex-1"
>
<view
class=
"u-flex-1"
>
<view
class=
"u-font-18 u-p-b-20"
>
{{
vuex_user
.
nickName
}}
</view>
<view
class=
"u-font-18 u-p-b-20"
>
{{
vuex_user
.
nickName
}}
</view>
<view
class=
"u-font-14 u-tips-color"
v-if=
"vuex_user.nickName !== '未登录'"
>
小铺ID:
{{
vuex_user
.
mobile
}}
<view
class=
"u-font-14 u-tips-color"
v-if=
"vuex_user.nickName !== '未登录'"
>
小铺ID:
{{
vuex_user
.
mobile
}}
</view>
</view>
<view
class=
"u-font-14 u-tips-color"
v-if=
"vuex_user.nickName == '未登录'"
@
click=
"toLogin"
>
点击登录
邻家小铺
账号
<view
class=
"u-font-14 u-tips-color"
v-if=
"vuex_user.nickName == '未登录'"
@
click=
"toLogin"
>
点击登录
商圈plus
账号
</view>
</view>
</view>
</view>
<!--
<view
class=
"u-m-l-10 u-p-10"
>
<!--
<view
class=
"u-m-l-10 u-p-10"
>
...
...
store/index.js
View file @
afb6cdd3
...
@@ -42,7 +42,7 @@ const store = new Vuex.Store({
...
@@ -42,7 +42,7 @@ const store = new Vuex.Store({
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
// 如果vuex_version无需保存到本地永久存储,无需lifeData.vuex_version方式
vuex_version
:
'1.0.1'
,
vuex_version
:
'1.0.1'
,
vuex_demo
:
'绛紫'
,
vuex_demo
:
'绛紫'
,
vuex_avatar
:
lifeData
.
vuex_avatar
?
lifeData
.
vuex_avatar
:
'
http://microapp.gitee.io/linjiashop/logo.jpg
'
,
vuex_avatar
:
lifeData
.
vuex_avatar
?
lifeData
.
vuex_avatar
:
''
,
// 自定义tabbar数据
// 自定义tabbar数据
vuex_tabbar
:
[{
vuex_tabbar
:
[{
iconPath
:
"/static/uview/example/component.png"
,
iconPath
:
"/static/uview/example/component.png"
,
...
...
template.h5.html
View file @
afb6cdd3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<link
rel=
"shortcut icon"
type=
"image/x-icon"
href=
"http://linjiashop.microapp.store/favicon.ico"
>
<link
rel=
"shortcut icon"
type=
"image/x-icon"
href=
"http://linjiashop.microapp.store/favicon.ico"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<title>
<title>
邻家小铺
商圈plus
</title>
</title>
<!-- 正式发布的时候使用,开发期间不启用。↓ -->
<!-- 正式发布的时候使用,开发期间不启用。↓ -->
<script
src=
"/static/common/js/touch-emulator.js"
></script>
<script
src=
"/static/common/js/touch-emulator.js"
></script>
...
...
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