Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
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
viitto
mallapp
Commits
a608cd0e
Commit
a608cd0e
authored
Jan 30, 2024
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
ecb92346
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
318 additions
and
332 deletions
+318
-332
index.vue
components/auth/index.vue
+292
-311
goodsku.vue
components/goods/goodsku.vue
+6
-4
manifest.json
manifest.json
+1
-1
goods.vue
pages/goods/goods.vue
+19
-16
No files found.
components/auth/index.vue
View file @
a608cd0e
<
template
>
<div
class=
"auth-page"
>
<u-popup
v-model=
"showDialog"
mode=
"center"
:mask-close-able=
"false"
custom-style=
"padding:0;background:none;"
>
<u-popup
v-model=
"showDialog"
mode=
"center"
:mask-close-able=
"false"
custom-style=
"padding:0;background:none;"
>
<img
:src=
"pageinfo.pic_url"
mode=
"widthFix"
/>
<button
:style=
"sureStyle"
class=
"hotsopt"
open-type=
"getUserInfo"
v-if=
"canIUseGetUserProfile == false"
@
getuserinfo=
"showLogin == true ? getoldUser() : ''"
></button>
<button
:style=
"sureStyle"
class=
"hotsopt"
v-if=
"canIUseGetUserProfile == true"
@
tap=
"showLogin == true ? getUserProfile() : ''"
></button>
<button
:style=
"sureStyle"
class=
"hotsopt"
open-type=
"getUserInfo"
v-if=
"canIUseGetUserProfile == false"
@
getuserinfo=
"showLogin == true ? getoldUser() : ''"
></button>
<button
:style=
"sureStyle"
class=
"hotsopt"
v-if=
"canIUseGetUserProfile == true"
@
tap=
"showLogin == true ? getUserProfile() : ''"
></button>
<button
:style=
"cancelStyle"
class=
"hotsopt"
@
click=
"close"
></button>
</u-popup>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
:cform=
"ComeFrom"
@
goLook=
"goLook"
@
closeBtn=
"closeBtn"
></coupon>
</div>
</
template
>
<
script
>
import
coupon
from
"@/components/coupons/coupons"
;
export
default
{
import
coupon
from
"@/components/coupons/coupons"
;
export
default
{
components
:
{
coupon
,
},
...
...
@@ -53,9 +32,8 @@ export default {
};
},
created
()
{
this
.
pageinfo
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
auth_page
:
{};
this
.
pageinfo
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
auth_page
:
{};
if
(
wx
.
getUserProfile
)
{
console
.
log
(
"进入新的"
);
this
.
canIUseGetUserProfile
=
true
;
...
...
@@ -118,7 +96,7 @@ export default {
that
.
showDialog
=
true
;
uni
.
getProvider
({
service
:
"oauth"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
~
res
.
provider
.
indexOf
(
"weixin"
))
{
uni
.
login
({
provider
:
"weixin"
,
...
...
@@ -164,8 +142,7 @@ export default {
});
//这里请求接口
var
OpenId
=
""
;
that
.
request2
(
{
that
.
request2
({
url
:
"/api/mall/GetWeChatOpenId"
,
data
:
{
Code
:
obj
.
code
,
...
...
@@ -186,23 +163,22 @@ export default {
let
pid
=
uni
.
getStorageSync
(
"pid"
)
?
uni
.
getStorageSync
(
"pid"
).
pid
:
0
;
let
Up
=
uni
.
getStorageSync
(
"Up"
)
?
uni
.
getStorageSync
(
"Up"
).
Up
:
0
;
let
SmallShopId
=
uni
.
getStorageSync
(
"SmallShopId"
)
?
uni
.
getStorageSync
(
"SmallShopId"
).
SmallShopId
:
0
;
let
CounponPassword
=
uni
.
getStorageSync
(
"CounponPassword"
)
?
uni
.
getStorageSync
(
"CounponPassword"
).
CounponPassword
:
0
;
let
KeyWord
=
uni
.
getStorageSync
(
"KeyWord"
)
?
uni
.
getStorageSync
(
"KeyWord"
).
KeyWord
:
""
;
let
EduSchoolId
=
uni
.
getStorageSync
(
"EduSchoolId"
)
?
uni
.
getStorageSync
(
"EduSchoolId"
).
EduSchoolId
:
0
;
let
EduId
=
uni
.
getStorageSync
(
"jxhData"
)
?
uni
.
getStorageSync
(
"jxhData"
).
Id
:
0
;
that
.
request2
(
{
let
SmallShopId
=
uni
.
getStorageSync
(
"SmallShopId"
)
?
uni
.
getStorageSync
(
"SmallShopId"
).
SmallShopId
:
0
;
let
CounponPassword
=
uni
.
getStorageSync
(
"CounponPassword"
)
?
uni
.
getStorageSync
(
"CounponPassword"
).
CounponPassword
:
0
;
let
KeyWord
=
uni
.
getStorageSync
(
"KeyWord"
)
?
uni
.
getStorageSync
(
"KeyWord"
).
KeyWord
:
""
;
let
EduSchoolId
=
uni
.
getStorageSync
(
"EduSchoolId"
)
?
uni
.
getStorageSync
(
"EduSchoolId"
).
EduSchoolId
:
0
;
let
EduId
=
uni
.
getStorageSync
(
"jxhData"
)
?
uni
.
getStorageSync
(
"jxhData"
).
Id
:
0
;
that
.
request2
({
url
:
"/api/AppletLogin/Login"
,
data
:
{
Source
:
1
,
...
...
@@ -217,7 +193,7 @@ export default {
CounponPassword
:
CounponPassword
,
KeyWord
:
KeyWord
,
EduSchoolId
:
EduSchoolId
,
EduId
:
EduId
EduId
:
EduId
},
},
(
res
)
=>
{
...
...
@@ -249,9 +225,9 @@ export default {
let
uid
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
;
uni
.
removeStorageSync
(
"EduSchoolId"
);
that
.
msg
.
Id
=
uid
;
let
IsOpenMiAi
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
.
is_show_miai
:
0
;
//是否开启相亲模式
let
IsOpenMiAi
=
uni
.
getStorageSync
(
"basedata"
)
?
uni
.
getStorageSync
(
"basedata"
).
mall
.
setting
.
is_show_miai
:
0
;
//是否开启相亲模式
if
(
IsOpenMiAi
==
0
)
{
//不是相亲模式的时候去更新头像和昵称
that
.
updateuserinfo
(
that
.
msg
);
//更新用户头像
...
...
@@ -261,8 +237,7 @@ export default {
);
},
updateuserinfo
(
msg
)
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/MemberUser/SetMemberPhoto"
,
data
:
msg
,
},
...
...
@@ -279,17 +254,23 @@ export default {
this
.
showCoupons
=
false
;
},
updateData
()
{
this
.
request2
(
{
this
.
request2
({
url
:
"/api/Mall/GetHome"
,
data
:
{},
},
(
res
)
=>
{
uni
.
setStorageSync
(
"basedata"
,
res
.
data
);
let
basedata
=
uni
.
getStorageSync
(
"basedata"
);
let
isAttestation
=
basedata
?.
user_info
?.
isAttestation
??
0
;
let
IsOpenGuide
=
wx
.
getStorageSync
(
"basedata"
)?.
mall
?.
setting
?.
IsOpenGuide
??
0
;
let
isAttestation
=
0
;
//basedata?.user_info?.isAttestation ?? 0
if
(
basedata
&&
basedata
.
user_info
&&
basedata
.
user_info
.
isAttestation
)
{
isAttestation
=
basedata
.
user_info
.
isAttestation
;
}
let
IsOpenGuide
=
0
;
//wx.getStorageSync("basedata") ? .mall ? .setting ? .IsOpenGuide ? ?
if
(
basedata
&&
basedata
.
mall
&&
basedata
.
mall
.
setting
&&
basedata
.
mall
.
setting
.
IsOpenGuide
)
{
IsOpenGuide
=
basedata
.
mall
.
setting
.
IsOpenGuide
}
if
(
isAttestation
===
0
&&
IsOpenGuide
===
1
)
{
uni
.
navigateTo
({
url
:
"/pages/user-center/user-center"
,
...
...
@@ -299,23 +280,23 @@ export default {
);
},
},
};
};
</
script
>
<
style
>
.auth-page
img
{
.auth-page
img
{
width
:
650
rpx
;
height
:
700
rpx
;
}
}
.auth-page
.hotsopt
{
.auth-page
.hotsopt
{
position
:
absolute
;
background
:
transparent
;
border
:
none
;
outline
:
none
;
}
}
.auth-page
.hotsopt
::after
{
.auth-page
.hotsopt
::after
{
border
:
none
;
}
}
</
style
>
components/goods/goodsku.vue
View file @
a608cd0e
...
...
@@ -36,7 +36,7 @@
<text
class=
"label"
>
购买数量
</text>
<u-number-box
:disabled=
"!skuObj"
v-model=
"gc"
:min=
"1"
:max=
"goodamount"
@
change=
"valChange"
></u-number-box>
</view>
<view
class=
"btn-box"
v-if=
"g.totalStock>0&& g.status==1 && (g.form_id == -1 || g.form_id ==0)"
>
<view
class=
"btn-box"
v-if=
"g.totalStock>0&& g.status==1 && (g.form_id == -1 || g.form_id ==0
||g.form_id>1
)"
>
<view
style=
"flex: 1;"
v-if=
"optionType != 1"
>
<u-button
@
click=
"joinCar"
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn1"
>
加入购物车
</u-button>
</view>
...
...
@@ -44,6 +44,7 @@
<u-button
@
click=
"buy"
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn2"
>
立即购买
</u-button>
</view>
</view>
<!--教育-->
<view
class=
"btn-box"
v-if=
"g.totalStock>0&& g.status==1 && g.form_id ==1"
>
<view
style=
"flex: 1;"
>
<u-button
:ripple=
"true"
:hair-line=
"false"
:custom-style=
"btn4"
@
click=
'signup'
>
立即报名5
</u-button>
...
...
@@ -321,7 +322,7 @@
});
}
},
signup
()
{
//教育报名
signup
()
{
//教育报名
let
ShoppingCartIdList
=
[];
if
(
this
.
skuObj
&&
this
.
skuObj
.
id
)
{
let
good
=
{
...
...
@@ -499,6 +500,7 @@
text-decoration
:
line-through
;
margin-left
:
10
rpx
;
}
.goodsku
{
position
:
relative
;
padding
:
10px
;
...
...
manifest.json
View file @
a608cd0e
...
...
@@ -66,7 +66,7 @@
"quickapp"
:
{},
/*
小程序特有相关
*/
"mp-weixin"
:
{
"appid"
:
"wx5
349e63aea0c8529
"
,
"appid"
:
"wx5
564525562e92ddb
"
,
"setting"
:
{
"urlCheck"
:
false
,
"minified"
:
false
...
...
pages/goods/goods.vue
View file @
a608cd0e
...
...
@@ -349,7 +349,7 @@
<view
class=
"content"
>
{{ g.goods_marketing.limit }}
</view>
</view>
<!-- 优惠 -->
<view
class=
"goods-Discount"
v-if=
"g.goodsPreferentialList.length>0"
>
<view
class=
"goods-Discount"
v-if=
"g.goodsPreferentialList
&& g.goodsPreferentialList
.length>0"
>
<view
class=
"discount-left"
>
优惠
</view>
...
...
@@ -795,6 +795,7 @@
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
res
.
data
.
goods
;
// 报名限制数组
if
(
res
.
data
.
goods
&&
res
.
data
.
goods
.
edu_data
&&
res
.
data
.
goods
.
edu_data
.
ClassCondition
)
{
res
.
data
.
goods
.
edu_data
.
ClassCondition
.
forEach
(
item2
=>
{
if
(
item2
.
ItemType
==
1
)
{
this
.
ItemType1
.
push
(
item2
)
...
...
@@ -808,6 +809,8 @@
this
.
ItemType5
.
push
(
item2
)
}
})
}
// 报名限制数组结束
this
.
g
.
totalStock
=
0
;
this
.
g
.
attr
.
forEach
((
x
)
=>
{
...
...
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