Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
marubi-wish-list-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
651fca9e
authored
2019-09-20 16:58:56 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
版本提交
1 parent
00b209ae
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
175 additions
and
20 deletions
src/app.json
src/component/authorize-comp/authorize-comp.js
src/component/authorize-comp/authorize-comp.scss
src/component/authorize-comp/authorize-comp.wxml
src/component/tips-privacy-comp/tips-privacy-comp.js
src/component/tips-privacy-comp/tips-privacy-comp.json
src/component/tips-privacy-comp/tips-privacy-comp.scss
src/component/tips-privacy-comp/tips-privacy-comp.wxml
src/component/tips-prize-comp/tips-prize-comp.js
src/http/fetch-api.js
src/pages/coop/coop.js
src/pages/coupon-detail/coupon-detail.js
src/pages/index/index.js
src/pages/prize-detail/prize-detail.js
src/pages/register/register.js
src/pages/register/register.wxml
src/pages/user-table/user-table.scss
src/pages/user-table/user-table.wxml
src/pages/wish/wish.js
src/app.json
View file @
651fca9
...
...
@@ -33,6 +33,7 @@
"authorize-comp"
:
"../../component/authorize-comp/authorize-comp"
,
"empty-tips"
:
"../../component/empty-tips/empty-tips"
,
"tips-guide-register-comp"
:
"../../component/tips-guide-register-comp/tips-guide-register-comp"
,
"tips-privacy-comp"
:
"../../component/tips-privacy-comp/tips-privacy-comp"
,
"van-popup"
:
"../../ui/vant-weapp/popup/index"
}
}
...
...
src/component/authorize-comp/authorize-comp.js
View file @
651fca9
...
...
@@ -24,6 +24,13 @@ Component({
name
:
"_evt_hide_mask"
});
},
// 不授权
doNotAuth
()
{
// this.hideMask();
this
.
triggerEvent
(
'evtcomp'
,
{
name
:
"_evt_do_not_auth"
});
},
authComplete
()
{
this
.
triggerEvent
(
'evtcomp'
,
{
name
:
"_evt_auth_complete"
...
...
@@ -37,7 +44,7 @@ Component({
}
else
{
wx
.
showToast
({
title
:
"请允许授权"
,
icon
:
"none"
icon
:
"none"
})
}
},
...
...
src/component/authorize-comp/authorize-comp.scss
View file @
651fca9
...
...
@@ -28,21 +28,36 @@
}
.tips
{
margin-top
:
50px
;
font-size
:
32px
;
margin-top
:
12px
;
font-size
:
28px
;
line-height
:
48px
;
padding
:
0
28px
;
@extend
.bb
;
color
:
#333333
;
}
}
.btn
{
@include
cb
(
300px
,
80px
);
.btn-wrap
{
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
80px
;
margin
:
0
auto
;
// margin: 0 auto;
display
:
flex
;
justify-content
:
center
;
.btn
{
@include
cb
(
220px
,
64px
);
margin
:
0
12px
;
}
.gray
{
background
:
transparent
;
background-color
:
#d2d2d2
;
}
}
}
...
...
src/component/authorize-comp/authorize-comp.wxml
View file @
651fca9
...
...
@@ -4,7 +4,10 @@
<view class="logo">
<image mode="widthFix" src="../../image/logo.png" />
</view>
<view class="tips">参与
活动需要您的微信授权哦
</view>
<view class="tips">参与
丸美心愿单活动,需获取您微信相关信息才能创建心愿单和获取礼品哦~
</view>
</view>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
</view>
<view class="btn-wrap">
<button class="btn gray" bindtap="doNotAuth">暂不授权</button>
<button class="btn" open-type="getUserInfo" bindgetuserinfo="bindGetUserInfo">确认授权</button>
</view>
</view>
\ No newline at end of file
...
...
src/component/tips-privacy-comp/tips-privacy-comp.js
0 → 100755
View file @
651fca9
Component
({
options
:
{
styleIsolation
:
'apply-shared'
},
properties
:
{
// 这里定义了innerText属性,属性值可以在组件使用时指定
innerText
:
{
type
:
String
,
value
:
'default value'
,
}
},
data
:
{
// 这里是一些组件内部数据
someData
:
{}
},
methods
:
{
// 这里是一个自定义方法
customMethod
()
{
this
.
triggerEvent
(
'evtcomp'
,
{
name
:
"_evt_custom"
})
},
// 隐藏蒙层
hideMask
()
{
this
.
triggerEvent
(
'evtcomp'
,
{
name
:
"_evt_hide_mask"
});
}
}
})
src/component/tips-privacy-comp/tips-privacy-comp.json
0 → 100755
View file @
651fca9
{
"component"
:
true
}
src/component/tips-privacy-comp/tips-privacy-comp.scss
0 → 100755
View file @
651fca9
@import
'../../assets/scss/mixins'
;
@import
'../../assets/scss/utils'
;
.comp-item
{
position
:
relative
;
width
:
654px
;
height
:
1036px
;
// background-color: wheat;
.bg
{
position
:
absolute
;
width
:
654px
;
height
:
1036px
;
}
.space1
{
height
:
730px
;
}
.btn
{
// @include cb(234px, 64px);
@include
cb
(
300px
,
80px
);
position
:
absolute
;
left
:
0
;
right
:
0
;
top
:
1460px
;
// top: 1260px;
margin
:
0
auto
;
}
}
.close-wrap
{
text-align
:
center
;
color
:
#ffffff
;
.iconfont
{
font-size
:
100px
;
}
}
src/component/tips-privacy-comp/tips-privacy-comp.wxml
0 → 100755
View file @
651fca9
<scroll-view scroll-y="{{true}}" class="comp-item">
<image class="bg" src="../../image/oss/tips/tips-privacy.png" mode="widthFix" />
<view class="space1"></view>
</scroll-view>
<view class="close-wrap">
<span bindtap="hideMask" class="iconfont iconclose1"></span>
</view>
src/component/tips-prize-comp/tips-prize-comp.js
View file @
651fca9
...
...
@@ -56,6 +56,10 @@ Component({
}).
then
((
result
)
=>
{
let
curData
=
app
.
globalData
.
giftData
curData
=
Object
.
assign
(
curData
,
result
);
// modify 2019-09-20
// curData.order.coupon = JSON.parse(JSON.stringify(curData.order));
app
.
globalData
.
giftData
=
curData
;
console
.
log
(
"app.globalData.giftData 333:"
,
app
.
globalData
.
giftData
);
console
.
log
(
JSON
.
stringify
(
app
.
globalData
.
giftData
));
...
...
src/http/fetch-api.js
View file @
651fca9
...
...
@@ -11,7 +11,7 @@ function wxLogin() {
success
:
function
(
res
)
{
// isWxLogin = true;
Store
.
setItem
(
'wxcode'
,
res
.
code
);
resolve
();
resolve
(
res
.
code
);
}
});
});
...
...
@@ -47,7 +47,7 @@ function login() {
wx
.
request
({
url
:
baseUrl
+
'/warubiEyeCreamApi/app/login'
,
data
:
{
code
:
Store
.
getItem
(
'wxcode'
)
code
:
result
},
method
:
'POST'
,
success
:
function
(
res2
)
{
...
...
src/pages/coop/coop.js
View file @
651fca9
...
...
@@ -327,6 +327,12 @@ Page({
}
break
;
// 拒绝授权回首页
case
"_evt_do_not_auth"
:
this
.
hideMask
();
this
.
onPlayTooHandler
();
break
;
// 前往注册页面
case
"_evt_to_register"
:
this
.
hideMask
();
...
...
src/pages/coupon-detail/coupon-detail.js
View file @
651fca9
...
...
@@ -79,6 +79,9 @@ Page({
},
// 查看可用门店
onNearbyStoreHandler
(
evt
)
{
if
(
this
.
data
.
used
){
return
;
}
this
.
wxLocation
();
},
// 使用微信位置
...
...
@@ -175,7 +178,7 @@ Page({
console
.
log
(
res
);
}
});
},
50
);
},
50
0
);
},
//适配不同屏幕大小的canvas
setCanvasSize
(
sz
)
{
...
...
src/pages/index/index.js
View file @
651fca9
...
...
@@ -94,6 +94,11 @@ Page({
this
.
hideMask
();
break
;
// 拒绝授权
case
"_evt_do_not_auth"
:
this
.
hideMask
();
break
;
default
:
break
;
}
...
...
src/pages/prize-detail/prize-detail.js
View file @
651fca9
...
...
@@ -94,6 +94,9 @@ Page({
},
// 查看可用门店
onNearbyStoreHandler
(
evt
)
{
if
(
this
.
data
.
used
){
return
;
}
this
.
wxLocation
();
},
// 使用微信位置
...
...
@@ -189,7 +192,7 @@ Page({
console
.
log
(
res
);
}
});
},
5
0
);
},
100
0
);
},
//适配不同屏幕大小的canvas
...
...
src/pages/register/register.js
View file @
651fca9
...
...
@@ -10,6 +10,7 @@ Page({
redirect
:
"createWish"
,
// 注册完的重定向页面
tipsRegisteredVisible
:
false
,
tipsCommonVisible
:
false
,
tipsPrivacyVisible
:
false
,
// form start
name
:
""
,
mobile
:
""
,
...
...
@@ -153,7 +154,11 @@ Page({
})
},
// 跳转至会员条款
onPolicyHandler
()
{},
onPolicyHandler
()
{
this
.
setData
({
tipsPrivacyVisible
:
true
})
},
// 跳转到登陆页面
toLoginHandler
()
{
app
.
router
.
push
({
...
...
@@ -278,6 +283,14 @@ Page({
})
},
hideMask
()
{
this
.
setData
({
tipsRegisteredVisible
:
false
,
tipsPrivacyVisible
:
false
,
tipsCommonVisible
:
false
,
})
},
// 子组件事件
evtcomp
(
evt
)
{
let
{
...
...
@@ -287,10 +300,7 @@ Page({
switch
(
name
)
{
case
"_evt_hide_mask"
:
this
.
setData
({
tipsRegisteredVisible
:
false
,
tipsCommonVisible
:
false
})
this
.
hideMask
();
break
;
default
:
...
...
src/pages/register/register.wxml
View file @
651fca9
...
...
@@ -99,6 +99,9 @@
<van-popup show="{{ tipsRegisteredVisible }}">
<tips-register-ed-comp bind:evtcomp="evtcomp"></tips-register-ed-comp>
</van-popup>
<van-popup show="{{ tipsPrivacyVisible }}" bind:click-overlay="hideMask">
<tips-privacy-comp bind:evtcomp="evtcomp"></tips-privacy-comp>
</van-popup>
<van-popup show="{{ tipsCommonVisible }}">
<tips-common-comp bind:evtcomp="evtcomp" inner-text="{{tipsInnerText}}"></tips-common-comp>
</van-popup>
...
...
src/pages/user-table/user-table.scss
View file @
651fca9
...
...
@@ -225,7 +225,8 @@ $iptHeight:80px;
margin-bottom
:
30px
;
.label
{
width
:
80px
;
// width: 80px;
width
:
130px
;
}
.val
{
...
...
src/pages/user-table/user-table.wxml
View file @
651fca9
...
...
@@ -82,6 +82,16 @@
<view class="label">地址</view>
<view class="val">{{addressStr}}</view>
</view>
<block wx:if="{{order.logisticsCompany && order.logisticsSn}}">
<view class="form-item">
<view class="label">物流公司</view>
<text selectable="{{true}}" class="val">{{order.logisticsCompany}}</text>
</view>
<view class="form-item">
<view class="label">物流单号</view>
<text selectable="{{true}}" class="val">{{order.logisticsSn}}</text>
</view>
</block>
</view>
<view bindtap="onWishHandler" class="submit-btn">返回首页</view>
</view>
...
...
src/pages/wish/wish.js
View file @
651fca9
...
...
@@ -178,6 +178,8 @@ Page({
curWish
:
curData
,
status
:
curData
.
status
})
// modify 2019-09-20
// curData.order.coupon = JSON.parse(JSON.stringify(curData.order));
app
.
globalData
.
giftData
=
curData
;
console
.
log
(
"app.globalData.giftData 111:"
,
app
.
globalData
.
giftData
);
console
.
log
(
JSON
.
stringify
(
app
.
globalData
.
giftData
));
...
...
Please
register
or
sign in
to post a comment