Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0863868f
authored
Sep 10, 2020
by
wjw
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
ww-服务项目和订单评价
parent
9c35354c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
226 additions
and
11 deletions
pages/commodity/project/project.js
pages/commodity/project/project.wxml
pages/commodity/project/project.wxss
pages/pay/order-comment/order-comment.js
pages/pay/order-comment/order-comment.wxml
pages/commodity/project/project.js
View file @
0863868f
Page
({
data
:
{
bannerIndex
:
0
,
banner
:
[
{
id
:
0
,
img
:
''
},
{
id
:
1
,
img
:
''
},
{
id
:
2
,
img
:
''
}
]
},
onLoad
:
function
(
options
)
{
},
/**
* banner 切换图片同步自定义标识组件
* @function
* @param {object} - funcEvent
* @returns
*/
onSwiperChange
:
function
(
funcEvent
)
{
this
.
setData
({
bannerIndex
:
funcEvent
.
detail
.
current
})
},
})
\ No newline at end of file
pages/commodity/project/project.wxml
View file @
0863868f
<!--pages/home/home/home.wxml-->
<text>pages/home/home/home.wxml</text>
<navigation class="navigation" titleText="所有项目服务" color="#FFFFFF" backIcon="/image/back-w.png"></navigation>
<view class="container">
<view class="banner">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="5000" duration="500" bindchange="onSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item" data-item="{{item}}" bindtap="bannerClick">
{{item.id}}
<image class="banner-swiper-image" src="{{item.img}}"></image>
</swiper-item>
</block>
</swiper>
<view class="banner-swiper-point">
<swiper-point bannerActiveIndex="{{bannerIndex}}"></swiper-point>
</view>
</view>
<block>
<view class="project-wrapper">
<view class="project-title"></view>
<block>
<view class="project-item row">
<view class="project-cover">
<!-- <image></image> -->
</view>
<view class="project-content row">
<view class="project-info">
<view class="project-name">
<text>海错图平日票</text>
<text></text>
</view>
<view class="project-msg col">
<text>周一至周五</text>
<text>周一至周五</text>
<text>周一至周五</text>
</view>
</view>
<view class="project-price-wrapper col align-e">
<view class="project-price-special row align-c">
<view class="price-wrap">
<text class="price-symbol">¥</text>
<text class="price-special">42</text>
<text class="price-symbol">/人</text>
</view>
<view class="price-special-msg">
<text>业主价</text>
</view>
</view>
</view>
</view>
</view>
</block>
</view>
</block>
</view>
pages/commodity/project/project.wxss
View file @
0863868f
/* pages/home/home/home.wxss */
\ No newline at end of file
.container {
height: 100%;
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%, #F3F4F6 100%, #F3F4F6 100%);
}
.banner {
z-index: 9;
position: relative;
width: 750rpx;
height: 800rpx;
background-color: #ccc;
}
.banner-swiper,
.banner-swiper-item,
.banner-swiper-image {
position: absolute;
top: 0 !important;
left: 0 !important;
width: 750rpx;
height: 800rpx;
}
.banner-swiper-point {
position: relative;
top: 723rpx;
left: 0;
}
.project-wrapper {
width: 670rpx;
margin-top: 48rpx;
padding: 36rpx 32rpx 14rpx;
background-color: #fff;
}
.project-title {
height: 88rpx;
background-color: #ccc;
}
.project-item {
margin-top: 48rpx;
padding-bottom: 50rpx;
border-bottom: 1px solid #E2E7EF;
}
.project-cover {
width: 128rpx;
height: 128rpx;
background-color: #ccc;
}
.project-content {
margin-left: 24rpx;
width: 100%;
}
.project-info {
}
.project-name {
height: 46rpx;
color: #15191F;
font-size: 30rpx;
font-weight: 600;
}
.project-msg text {
margin-top: 8rpx;
color: #959DA9;
font-size: 22rpx;
}
.project-price-wrapper {
flex: 1;
}
.project-price-special {
}
.price-wrap {
color: #EF4E4E;
letter-spacing: 2rpx;
display: table-cell;
vertical-align: bottom;
}
.price-symbol {
font-size: 24rpx;
}
.price-special {
font-size: 34rpx;
}
.price-special-msg {
width: 78rpx;
height: 32rpx;
color: #E8D0AF;
font-size: 18rpx;
text-align: center;
line-height: 32rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4rpx;
}
image {
width: 100%;
height: 100%;
}
pages/pay/order-comment/order-comment.js
View file @
0863868f
...
...
@@ -2,9 +2,12 @@ let App = getApp()
Page
({
data
:
{
scoreServe
:
'4.0'
,
// 服务分数
scoreProduct
:
'5.0'
,
// 产品分数
scoreEnvironment
:
'5.0'
,
// 环境分数
imageBase
:
App
.
globalData
.
appImageBase
,
cur
:
-
1
,
scoreServe
:
0
,
// 服务分数
scoreProduct
:
0
,
// 产品分数
scoreProductGray
:
5
,
scoreEnvironment
:
0
,
// 环境分数
orderInfo
:
{
name
:
'精灵鸟理想国年卡'
,
price
:
'1680.00'
,
...
...
@@ -32,7 +35,26 @@ Page({
* @param
* @returns
*/
c
hangeScore
:
function
(
event
)
{
onC
hangeScore
:
function
(
event
)
{
console
.
log
(
event
)
const
{
index
}
=
event
.
currentTarget
.
dataset
let
{
cur
}
=
this
.
data
this
.
setData
({
cur
:
index
-
1
})
},
onChangeScoreProduct
:
function
(
event
)
{
const
{
type
,
index
}
=
event
.
currentTarget
.
dataset
let
{
scoreProduct
,
scoreProductGray
}
=
this
.
data
if
(
type
===
'1'
)
{
scoreProduct
=
index
+
1
}
else
{
scoreProduct
+=
index
+
1
}
scoreProductGray
=
5
-
scoreProduct
this
.
setData
({
scoreProduct
,
scoreProductGray
})
}
})
\ No newline at end of file
pages/pay/order-comment/order-comment.wxml
View file @
0863868f
...
...
@@ -46,8 +46,19 @@
<view class="score-left">
<text>产品评价</text>
</view>
<view class="score-star">
<l-rate size="40" score="{{scoreProduct}}" active-color="#F7BE6E" inActive-color="#F3F4F6" bind:linChange="onChangeScore" />
<view class="score-star row">
<block wx:for="{{scoreProduct}}" wx:key="index">
<image class="star" src="{{imageBase + 'star-yellow.png'}}" bindtap="onChangeScoreProduct" data-index="{{index}}" data-type="1"></image>
</block>
<block wx:for="{{scoreProductGray}}" wx:key="index">
<image class="star" src="{{imageBase + 'star-gray.png'}}" bindtap="onChangeScoreProduct" data-index="{{index}}" data-type="2"></image>
</block>
<!-- <block wx:for="{{5}}" wx:key="index">
<view class="star" bindtap="onChangeScore" data-index="{{index}}">
<image wx:if="{{cur >= n}}" src="{{imageBase + 'star-yellow.png'}}"></image>
<image wx:if="{{cur < n}}" src="{{imageBase + 'star-gray.png'}}"></image>
</view>
</block> -->
</view>
<view class="score">
<text>{{scoreProduct + '星'}}</text>
...
...
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