Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7d77ca1f
authored
Oct 16, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调查问卷需求
1 parent
23447180
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
560 additions
and
12 deletions
app.json
package-lock.json
package.json
packageMine/pages/questionnaire/components/Cascader/Cascader.js
packageMine/pages/questionnaire/components/Cascader/Cascader.json
packageMine/pages/questionnaire/components/Cascader/Cascader.scss
packageMine/pages/questionnaire/components/Cascader/Cascader.wxml
packageMine/pages/questionnaire/components/Checkbox/Checkbox.js
packageMine/pages/questionnaire/components/Checkbox/Checkbox.json
packageMine/pages/questionnaire/components/Checkbox/Checkbox.scss
packageMine/pages/questionnaire/components/Checkbox/Checkbox.wxml
packageMine/pages/questionnaire/components/Radio/Radio.js
packageMine/pages/questionnaire/components/Radio/Radio.json
packageMine/pages/questionnaire/components/Radio/Radio.scss
packageMine/pages/questionnaire/components/Radio/Radio.wxml
packageMine/pages/questionnaire/components/Select/Select.js
packageMine/pages/questionnaire/components/Select/Select.json
packageMine/pages/questionnaire/components/Select/Select.scss
packageMine/pages/questionnaire/components/Select/Select.wxml
packageMine/pages/questionnaire/questionnaire.js
packageMine/pages/questionnaire/questionnaire.json
packageMine/pages/questionnaire/questionnaire.scss
packageMine/pages/questionnaire/questionnaire.wxml
pages/tab/equity/index.js
pages/tab/index/index.js
pages/tab/mall/index.js
pages/tab/mine/index.js
pages/tab/strategy/index.js
utils/share.js
app.json
View file @
7d77ca1
...
...
@@ -8,7 +8,7 @@
"pages/tab/strategy/index"
,
"pages/webView/webView"
,
"pages/Login/Login"
,
"pages/crowdfunding/blank/blank"
"pages/crowdfunding/blank/blank"
],
"requiredPrivateInfos"
:
[
"getLocation"
...
...
@@ -24,8 +24,7 @@
"selectedColor"
:
"#3772EC"
,
"backgroundColor"
:
"#FFFFFF"
,
"borderStyle"
:
"white"
,
"list"
:
[
{
"list"
:
[{
"pagePath"
:
"pages/tab/index/index"
,
"text"
:
"首页"
,
"iconPath"
:
"assets/images/home.png"
,
...
...
@@ -57,8 +56,7 @@
}
]
},
"subpackages"
:
[
{
"subpackages"
:
[{
"root"
:
"packageIndex"
,
"pages"
:
[
"pages/carLife/index"
,
...
...
@@ -100,7 +98,8 @@
"pages/device/list/list"
,
"pages/device/tachograph/tachograph"
,
"pages/vehicleInfo/index/index"
,
"pages/vehicleInfo/carBrandList/carBrandList"
"pages/vehicleInfo/carBrandList/carBrandList"
,
"pages/questionnaire/questionnaire"
]
},
{
...
...
@@ -172,7 +171,6 @@
"goods-action"
:
"/components/GoodsAction/GoodsAction"
,
"stepper"
:
"/components/Stepper/Stepper"
},
"style"
:
"v2"
,
"resolveAlias"
:
{
"~/*"
:
"/*"
},
...
...
package-lock.json
View file @
7d77ca1
...
...
@@ -4,6 +4,11 @@
"lockfileVersion"
:
1
,
"requires"
:
true
,
"dependencies"
:
{
"@vant/weapp"
:
{
"version"
:
"1.11.1"
,
"resolved"
:
"https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.1.tgz"
,
"integrity"
:
"sha512-2QddSq3MsozbTBAgEmW1rhzsEJNWPF2VS427M5pOOn0a7/f6lW+tymwdTcOQCzQONavhFwBv6Lebbs/UjE3Yig=="
},
"glsx-applet-component"
:
{
"version"
:
"1.1.24"
,
"resolved"
:
"https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.1.24.tgz"
,
...
...
package.json
View file @
7d77ca1
...
...
@@ -3,6 +3,7 @@
"version"
:
"1.0.0"
,
"main"
:
"app.js"
,
"dependencies"
:
{
"@vant/weapp"
:
"^1.11.1"
,
"glsx-applet-component"
:
"^1.1.24"
,
"glsx-map-sdk"
:
"^0.2.0"
,
"number-precision"
:
"^1.6.0"
...
...
packageMine/pages/questionnaire/components/Cascader/Cascader.js
0 → 100644
View file @
7d77ca1
// packageMine/pages/questionnaire/components/Cascader/Cascader.js
const
options
=
[{
text
:
'浙江省'
,
value
:
'330000'
,
children
:
[{
text
:
'杭州市'
,
value
:
'330100'
}],
},
{
text
:
'江苏省'
,
value
:
'320000'
,
children
:
[{
text
:
'南京市'
,
value
:
'320100'
}],
},
];
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
show
:
false
,
options
,
fieldValue
:
''
,
cascaderValue
:
''
,
},
/**
* 组件的方法列表
*/
methods
:
{
onClick
()
{
this
.
setData
({
show
:
true
,
})
},
onClose
()
{
this
.
setData
({
show
:
false
})
},
onFinish
(
e
)
{
const
{
selectedOptions
,
value
}
=
e
.
detail
,
fieldValue
=
selectedOptions
.
map
((
option
)
=>
option
.
text
||
option
.
name
).
join
(
'/'
)
this
.
setData
({
fieldValue
,
cascaderValue
:
value
})
this
.
onClose
()
}
}
})
\ No newline at end of file
packageMine/pages/questionnaire/components/Cascader/Cascader.json
0 → 100644
View file @
7d77ca1
{
"component"
:
true
,
"usingComponents"
:
{
"van-cascader"
:
"@vant/weapp/cascader/index"
,
"van-popup"
:
"@vant/weapp/popup/index"
}
}
\ No newline at end of file
packageMine/pages/questionnaire/components/Cascader/Cascader.scss
0 → 100644
View file @
7d77ca1
/* packageMine/pages/questionnaire/components/Cascader/Cascader.wxss */
@import
'../Select/Select.scss'
;
\ No newline at end of file
packageMine/pages/questionnaire/components/Cascader/Cascader.wxml
0 → 100644
View file @
7d77ca1
<view class="select {{!fieldValue?'default':''}}" bindtap="onClick">
<view class="value">
{{fieldValue||'请选择'}}
</view>
</view>
<van-popup show="{{ show }}" round position="bottom" bind:click-overlay="onClose">
<van-cascader title="请选择所在地区" value="{{ cascaderValue }}" active-color="#3772EC" options="{{ options }}" bindclose="onClose" bindfinish="onFinish" />
</van-popup>
\ No newline at end of file
packageMine/pages/questionnaire/components/Checkbox/Checkbox.js
0 → 100644
View file @
7d77ca1
// packageMine/pages/questionnaire/components/Checkbox/Checkbox.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
data
:
Array
},
/**
* 组件的初始数据
*/
data
:
{
chooseList
:
[]
},
/**
* 组件的方法列表
*/
methods
:
{
choose
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
,
{
chooseList
}
=
this
.
data
,
item
=
chooseList
.
findIndex
(
i
=>
i
==
index
)
if
(
item
==
-
1
)
chooseList
.
push
(
index
)
else
chooseList
.
splice
(
item
,
1
)
this
.
setData
({
chooseList
})
}
}
})
\ No newline at end of file
packageMine/pages/questionnaire/components/Checkbox/Checkbox.json
0 → 100644
View file @
7d77ca1
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
packageMine/pages/questionnaire/components/Checkbox/Checkbox.scss
0 → 100644
View file @
7d77ca1
/* packageMine/pages/questionnaire/components/Checkbox/Checkbox.wxss */
.checkbox-item
{
margin-bottom
:
20rpx
;
font-size
:
28rpx
;
color
:
#333333
;
line-height
:
40rpx
;
display
:
flex
;
align-items
:
center
;
word-wrap
:
break-word
;
.icon
{
width
:
24rpx
;
height
:
24rpx
;
border
:
2rpx
solid
#999999
;
border-radius
:
4rpx
;
flex-shrink
:
0
;
margin-right
:
10rpx
;
transition
:
all
.25s
;
}
.active
{
border-color
:
var
(
--
themeColor
);
position
:
relative
;
&
:
:
after
{
width
:
28rpx
;
height
:
28rpx
;
content
:
''
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
animation
:
radio-active
.25s
forwards
;
background
:
url(https://img02.glsx.com.cn/weapp/resource/miniprogram/wuye/questionnaire/checkbox.png)
no-repeat
;
background-size
:
100%
;
}
}
@keyframes
radio-active
{
0
%
{
opacity
:
0
;
transform
:
translate
(
-50%
,-
50%
)
scale
(
.1
);
}
100
%
{
opacity
:
1
;
transform
:
translate
(
-50%
,-
50%
)
scale
(
1
);
}
}
}
\ No newline at end of file
packageMine/pages/questionnaire/components/Checkbox/Checkbox.wxml
0 → 100644
View file @
7d77ca1
<wxs module="fn">
module.exports = {
includes: function (arr, val) {
return arr.indexOf(val) != -1
}
}
</wxs>
<block wx:for="{{data}}" wx:key="index">
<view class="checkbox-item" bindtap="choose" data-index="{{index}}">
<view class="icon {{fn.includes(chooseList,index)?'active':''}}"></view>
{{item}}
</view>
</block>
packageMine/pages/questionnaire/components/Radio/Radio.js
0 → 100644
View file @
7d77ca1
// packageMine/pages/questionnaire/components/Radio/Radio.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
data
:
Array
},
/**
* 组件的初始数据
*/
data
:
{
raidoIndex
:
0
},
/**
* 组件的方法列表
*/
methods
:
{
choose
(
e
)
{
const
{
index
}
=
e
.
currentTarget
.
dataset
,
{
raidoIndex
}
=
this
.
data
if
(
raidoIndex
==
index
)
return
this
.
setData
({
raidoIndex
:
index
})
}
}
})
\ No newline at end of file
packageMine/pages/questionnaire/components/Radio/Radio.json
0 → 100644
View file @
7d77ca1
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
packageMine/pages/questionnaire/components/Radio/Radio.scss
0 → 100644
View file @
7d77ca1
/* packageMine/pages/questionnaire/components/Radio/Radio.wxss */
.radio-item
{
margin-bottom
:
20rpx
;
font-size
:
28rpx
;
color
:
#333333
;
line-height
:
40rpx
;
display
:
flex
;
align-items
:
center
;
word-wrap
:
break-word
;
.icon
{
width
:
24rpx
;
height
:
24rpx
;
border
:
2rpx
solid
#999999
;
border-radius
:
100%
;
flex-shrink
:
0
;
margin-right
:
10rpx
;
transition
:
all
.25s
;
}
.active
{
position
:
relative
;
border-color
:
var
(
--
themeColor
);
&
:
:
after
{
width
:
18rpx
;
height
:
18rpx
;
border-radius
:
100%
;
background-color
:
var
(
--
themeColor
);
content
:
''
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
animation
:
radio-active
.25s
forwards
;
}
}
@keyframes
radio-active
{
0
%
{
opacity
:
0
;
transform
:
translate
(
-50%
,
-50%
)
scale
(
.1
);
}
100
%
{
opacity
:
1
;
transform
:
translate
(
-50%
,
-50%
)
scale
(
1
);
}
}
}
\ No newline at end of file
packageMine/pages/questionnaire/components/Radio/Radio.wxml
0 → 100644
View file @
7d77ca1
<block wx:for="{{data}}" wx:key="index">
<view class="radio-item" bindtap="choose" data-index="{{index}}">
<view class="icon {{index == raidoIndex?'active':''}}"></view>
{{item}}
</view>
</block>
\ No newline at end of file
packageMine/pages/questionnaire/components/Select/Select.js
0 → 100644
View file @
7d77ca1
// packageMine/pages/questionnaire/components/Select/Select.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
data
:
Array
,
},
/**
* 组件的初始数据
*/
data
:
{
value
:
''
,
show
:
false
},
/**
* 组件的方法列表
*/
methods
:
{
onClick
()
{
this
.
setData
({
show
:
true
,
})
},
onClose
()
{
this
.
setData
({
show
:
false
})
},
choose
(
e
)
{
const
{
value
}
=
e
.
detail
this
.
setData
({
value
})
}
}
})
\ No newline at end of file
packageMine/pages/questionnaire/components/Select/Select.json
0 → 100644
View file @
7d77ca1
{
"component"
:
true
,
"usingComponents"
:
{
"van-popup"
:
"@vant/weapp/popup/index"
,
"van-picker"
:
"@vant/weapp/picker/index"
}
}
\ No newline at end of file
packageMine/pages/questionnaire/components/Select/Select.scss
0 → 100644
View file @
7d77ca1
/* packageMine/pages/questionnaire/components/Select/Select.wxss */
.select
{
width
:
100%
;
height
:
72rpx
;
background
:
#FFFFFF
;
border
:
2rpx
solid
#D9D9D9
;
border-radius
:
8rpx
;
box-sizing
:
border-box
;
padding
:
16rpx
20rpx
;
font-size
:
28rpx
;
color
:
#333333
;
position
:
relative
;
overflow
:
hidden
;
&
:
:
after
{
position
:
absolute
;
content
:
''
;
border
:
2rpx
solid
#999
;
border-top
:
none
;
border-left
:
none
;
right
:
20rpx
;
top
:
50%
;
transform
:
translateY
(
-50%
)
rotate
(
45deg
);
box-sizing
:
border-box
;
width
:
16
.14rpx
;
height
:
16
.14rpx
;
transform-origin
:
top
;
}
.value
{
width
:
calc
(
100%
-
44rpx
);
}
}
.default
{
color
:
#999999
;
}
\ No newline at end of file
packageMine/pages/questionnaire/components/Select/Select.wxml
0 → 100644
View file @
7d77ca1
<view class="select {{!value?'default':''}}" bindtap="onClick">
<view class="value">
{{value||'请选择'}}
</view>
</view>
<van-popup show="{{ show }}" round position="bottom" bind:click-overlay="onClose">
<van-picker show-toolbar columns="{{ data }}" bind:change="onChange" bind:cancel="onClose" bind:confirm="onConfirm" />
</van-popup>
\ No newline at end of file
packageMine/pages/questionnaire/questionnaire.js
0 → 100644
View file @
7d77ca1
// packageMine/pages/questionnaire/questionnaire.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
packageMine/pages/questionnaire/questionnaire.json
0 → 100644
View file @
7d77ca1
{
"usingComponents"
:
{
"gl-radio"
:
"./components/Radio/Radio"
,
"gl-checkbox"
:
"./components/Checkbox/Checkbox"
,
"gl-select"
:
"./components/Select/Select"
,
"gl-cascader"
:
"./components/Cascader/Cascader"
,
"gl-textarea"
:
"/components/GlTextarea/GlTextarea"
},
"navigationBarTitleText"
:
"调查问卷"
}
\ No newline at end of file
packageMine/pages/questionnaire/questionnaire.scss
0 → 100644
View file @
7d77ca1
/* packageMine/pages/questionnaire/questionnaire.wxss */
.layout
{
padding
:
30rpx
40rpx
calc
(
178rpx
+
var
(
--
constantSafeAreaInsetBottom
));
padding
:
30rpx
40rpx
calc
(
178rpx
+
var
(
--
envSafeAreaInsetBottom
));
background-color
:
#fff
;
.tips
{
font-size
:
28rpx
;
color
:
#999999
;
line-height
:
40rpx
;
}
.form-box
{
margin-top
:
28rpx
;
border-top
:
2rpx
dotted
#e6e6e6
;
border-bottom
:
2rpx
dotted
#e6e6e6
;
padding-bottom
:
38rpx
;
.title
{
padding
:
40rpx
0
30rpx
;
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#333333
;
letter-spacing
:
0
;
line-height
:
48rpx
;
margin-left
:
20rpx
;
display
:
felx
;
align-items
:
center
;
}
.required
{
position
:
relative
;
&
:
:
before
{
position
:
absolute
;
left
:
-14rpx
;
top
:
46rpx
;
content
:
'*'
;
color
:
#F24724
;
font-weight
:
normal
;
}
}
.item
{
width
:
calc
(
100%
-
60rpx
);
margin-left
:
60rpx
;
}
.textarea
{
height
:
240rpx
;
background
:
#FFFFFF
;
border
:
2rpx
solid
#E6E6E6
;
border-radius
:
8rpx
;
box-sizing
:
border-box
;
padding
:
20rpx
;
}
}
}
.fixed-btn
{
position
:
fixed
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
height
:
148rpx
;
background-color
:
#F8F8F8
;
.default-btn
{
width
:
690rpx
;
border-radius
:
48rpx
;
background-color
:
var
(
--
themeColor
);
}
}
\ No newline at end of file
packageMine/pages/questionnaire/questionnaire.wxml
0 → 100644
View file @
7d77ca1
<view class="layout">
<text class="tips">亲爱的住户,你好。
为了给你提供更好的居住环境和服务,由中海物业发起的调查问卷,邀请您填写,十分感谢!</text>
<view class="form-box">
<view class="title required">1. 单选题单选题单选题是单选题单选题单选题是单选题单选题单选题是单选题单选题单选题是单选题单选题单选题是</view>
<view class="item">
<gl-radio data="{{[1,2,3,4]}}"></gl-radio>
</view>
<view class="title">2. 多选题</view>
<view class="item">
<gl-checkbox data="{{[1,2,3,4]}}"></gl-checkbox>
</view>
<view class="title">3. 选择题</view>
<view class="item">
<gl-select data="{{[1,2,3,4,5]}}"></gl-select>
</view>
<view class="title">4. 多层级选择题</view>
<view class="item">
<gl-cascader></gl-cascader>
</view>
<view class="title">5. 填空题</view>
<view class="textarea item">
<gl-textarea></gl-textarea>
</view>
</view>
</view>
<view class="fixed-btn text-center isFullSucreen">
<button class="default-btn">提交</button>
</view>
\ No newline at end of file
pages/tab/equity/index.js
View file @
7d77ca1
...
...
@@ -316,4 +316,5 @@ Page({
notIntercept
:
true
})
},
onShareAppMessage
(){}
})
\ No newline at end of file
pages/tab/index/index.js
View file @
7d77ca1
...
...
@@ -183,5 +183,6 @@ Page({
this
.
defaultMerchant
=
merchantId
this
.
getMerchantList
()
this
.
getStrategyList
();
}
},
onShareAppMessage
(){}
});
pages/tab/mall/index.js
View file @
7d77ca1
...
...
@@ -101,5 +101,5 @@ Page({
getComponentPage
()
{
return
this
.
selectComponent
(
`#currentChannel_6`
)
},
onShareAppMessage
(){}
})
\ No newline at end of file
pages/tab/mine/index.js
View file @
7d77ca1
...
...
@@ -180,6 +180,6 @@ Page({
this
.
getUserCarList
()
this
.
getMemberCardData
()
},
onShareAppMessage
(){}
})
\ No newline at end of file
pages/tab/strategy/index.js
View file @
7d77ca1
...
...
@@ -40,5 +40,6 @@ Page({
id
,
notIntercept
:
true
})
}
},
onShareAppMessage
(){}
});
utils/share.js
View file @
7d77ca1
...
...
@@ -94,7 +94,7 @@ class Share {
}
getCommonData
()
{
const
WXUSERINFO
=
wx
.
p
.
storage
.
get
(
'wx_user_info'
),
//针对没登录用户,有openid
USERINFO
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
//这个是针对登录的
USERINFO
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
||
{}
//这个是针对登录的
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment