Переглянути джерело

Merge branch 'xieying' of gitadmin/tuoheng_qmhh_web into develop

pull/11/head
zhangtao 1 рік тому
джерело
коміт
e3bc56f83d
36 змінених файлів з 851 додано та 22 видалено
  1. +9
    -0
      api/activity.js
  2. +16
    -0
      api/attention.js
  3. +16
    -0
      api/suggestion.js
  4. +6
    -1
      app.json
  5. BIN
      assets/first/activity.png
  6. BIN
      assets/first/suggestion.png
  7. BIN
      assets/img/activitybg.png
  8. BIN
      assets/img/activitytitle.png
  9. BIN
      assets/img/attention.png
  10. BIN
      assets/img/attentionIcon.png
  11. BIN
      assets/img/back.png
  12. BIN
      assets/img/gold.png
  13. BIN
      assets/img/takepart.png
  14. BIN
      assets/img/tips.png
  15. BIN
      assets/img/video.png
  16. BIN
      assets/img/volunteer.png
  17. +91
    -0
      package_first/pages/AddPicture/index.js
  18. +7
    -0
      package_first/pages/AddPicture/index.json
  19. +15
    -0
      package_first/pages/AddPicture/index.wxml
  20. +49
    -0
      package_first/pages/AddPicture/index.wxss
  21. +71
    -0
      package_first/pages/AttentionMethod/index.js
  22. +7
    -0
      package_first/pages/AttentionMethod/index.json
  23. +9
    -0
      package_first/pages/AttentionMethod/index.wxml
  24. +24
    -0
      package_first/pages/AttentionMethod/index.wxss
  25. +106
    -0
      package_first/pages/ProtectionActivity/index.js
  26. +7
    -0
      package_first/pages/ProtectionActivity/index.json
  27. +34
    -0
      package_first/pages/ProtectionActivity/index.wxml
  28. +94
    -0
      package_first/pages/ProtectionActivity/index.wxss
  29. +131
    -0
      package_first/pages/ProtectionSuggestion/index.js
  30. +8
    -0
      package_first/pages/ProtectionSuggestion/index.json
  31. +20
    -0
      package_first/pages/ProtectionSuggestion/index.wxml
  32. +81
    -0
      package_first/pages/ProtectionSuggestion/index.wxss
  33. +12
    -0
      pages/FirstPage/index.js
  34. +9
    -1
      pages/FirstPage/index.wxss
  35. +1
    -20
      project.config.json
  36. +28
    -0
      project.private.config.json

+ 9
- 0
api/activity.js Переглянути файл

@@ -0,0 +1,9 @@
const {request} = require("../request/index")

export const api_westreamSuggest = function (data) {
return request({
url: '/westreamSuggest/add',
method: 'POST',
data
})
}

+ 16
- 0
api/attention.js Переглянути файл

@@ -0,0 +1,16 @@
const {request} = require("../request/index")

export const api_getIsApply = function (data) {
return request({
url: '/westreamTiktok/getIsApply',
method: 'GET',
data
})
}
export const api_TiktokAdd = function (data) {
return request({
url: '/westreamTiktok/add',
method: 'POST',
data
})
}

+ 16
- 0
api/suggestion.js Переглянути файл

@@ -0,0 +1,16 @@
const {request} = require("../request/index")

export const api_westreamSuggest = function (data) {
return request({
url: '/westreamSuggest/add',
method: 'POST',
data
})
}
export const api_getUserInfo = function (data) {
return request({
url: '/westreamUser/userInfo',
method: 'GET',
data
})
}

+ 6
- 1
app.json Переглянути файл

@@ -48,7 +48,12 @@
"pages/askDetail/index",
"pages/uploadBeauty/index",
"pages/beautyDetail/index",
"pages/successPage/index"
"pages/successPage/index",
"pages/ProtectionSuggestion/index",
"pages/ProtectionActivity/index",
"pages/AttentionMethod/index",
"pages/AddPicture/index"

]
},
{

BIN
assets/first/activity.png Переглянути файл

Before After
Width: 109  |  Height: 109  |  Size: 6.4KB

BIN
assets/first/suggestion.png Переглянути файл

Before After
Width: 109  |  Height: 109  |  Size: 5.7KB

BIN
assets/img/activitybg.png Переглянути файл

Before After
Width: 762  |  Height: 454  |  Size: 238KB

BIN
assets/img/activitytitle.png Переглянути файл

Before After
Width: 752  |  Height: 176  |  Size: 19KB

BIN
assets/img/attention.png Переглянути файл

Before After
Width: 1322  |  Height: 4089  |  Size: 971KB

BIN
assets/img/attentionIcon.png Переглянути файл

Before After
Width: 70  |  Height: 70  |  Size: 1.5KB

BIN
assets/img/back.png Переглянути файл

Before After
Width: 200  |  Height: 200  |  Size: 4.1KB

BIN
assets/img/gold.png Переглянути файл

Before After
Width: 30  |  Height: 30  |  Size: 1.0KB

BIN
assets/img/takepart.png Переглянути файл

Before After
Width: 143  |  Height: 73  |  Size: 6.8KB

BIN
assets/img/tips.png Переглянути файл

Before After
Width: 47  |  Height: 47  |  Size: 1.4KB

BIN
assets/img/video.png Переглянути файл

Before After
Width: 70  |  Height: 70  |  Size: 1.6KB

BIN
assets/img/volunteer.png Переглянути файл

Before After
Width: 70  |  Height: 70  |  Size: 1.7KB

+ 91
- 0
package_first/pages/AddPicture/index.js Переглянути файл

@@ -0,0 +1,91 @@
// package_first/pages/AddPicture/index.js
import {api_TiktokAdd} from '../../../api/attention.js';
Page({

/**
* 页面的初始数据
*/
data: {
imageList:[],
imagePreviewList: [],
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {

},
//上传图片
uploadImage(){
wx.chooseMedia({
count: 1 - this.data.imageList.length, // 最多可以选择的图片张数,默认9
mediaType: ['image'], // 图片
sizeType: ['original'], // original 原图,compressed 压缩图,默认二者都有
sourceType: ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有
success:(res) =>{
const list = res.tempFiles.map((item)=> {
return item.tempFilePath
})
// success
let imagePreviewList = this.data.imagePreviewList.concat(list)
let imageList = this.data.imageList.concat(list);
this.setData({ imageList, imagePreviewList })
this.validate('imageList')
},
fail: (e) => {
console.log(e);
}
})
},
})

+ 7
- 0
package_first/pages/AddPicture/index.json Переглянути файл

@@ -0,0 +1,7 @@
{
"usingComponents": {
"list": "../../../components/List/index",
"ImageList": "../../../components/ImageList/index"
},
"navigationBarTitleText": "上传图片"
}

+ 15
- 0
package_first/pages/AddPicture/index.wxml Переглянути файл

@@ -0,0 +1,15 @@
<!--package_first/pages/AddPicture/index.wxml-->
<view>
<view class="add_container">
<view class="title">上传图片</view>
<view class="upload_image" bindtap="uploadImage">
<view>
<image style="height: 70rpx;width:70rpx;" mode="widthFix" src="../../../assets/img/upload.png"></image>
<view class="upload_text">上传图片</view>
</view>
</view>
<view class="button" bindtap="submit">
提交
</view>
</view>
</view>

+ 49
- 0
package_first/pages/AddPicture/index.wxss Переглянути файл

@@ -0,0 +1,49 @@
/* package_first/pages/AddPicture/index.wxss */
.add_container{
width: 100%;
margin: 80rpx 30rpx 0rpx 30rpx;
}
.title{
width: 124rpx;
height: 30rpx;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
line-height: 53rpx;
}
.title::after {
content:"";
display:block;
margin-top: -15rpx;
width: 129rpx;
height: 10rpx;
background: #1E79FA;
opacity: 0.5;
}
.upload_image{
width:calc(100% - 60rpx);
height: 265rpx;
border: 4rpx dotted #006DF7;
border-radius: 10rpx;
text-align: center;
padding: 70rpx 0rpx 0rpx 0rpx;
margin: 52rpx 0rpx 192rpx 0rpx;
}
.upload_text{
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #DDDFDE;
line-height: 53rpx;
margin-top: -10rpx;
}
.button{
width:calc(100% - 80rpx);
text-align: center;
border-radius: 30rpx;
color: white;
background-color: #2878ff;
height: 80rpx;
line-height: 80rpx;
}

+ 71
- 0
package_first/pages/AttentionMethod/index.js Переглянути файл

@@ -0,0 +1,71 @@
// package_first/pages/AttentionMethod/index.js
Page({

/**
* 页面的初始数据
*/
data: {

},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {

},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {

},
goPage(e){
wx.navigateTo({
url: `/package_first/pages/AddPicture/index`,
})
},
})

+ 7
- 0
package_first/pages/AttentionMethod/index.json Переглянути файл

@@ -0,0 +1,7 @@
{
"usingComponents": {
"list": "../../../components/List/index",
"ImageList": "../../../components/ImageList/index"
},
"navigationBarTitleText": "关注抖音"
}

+ 9
- 0
package_first/pages/AttentionMethod/index.wxml Переглянути файл

@@ -0,0 +1,9 @@
<!--package_first/pages/AttentionMethod/index.wxml-->
<view class="attention_container">
<view>
<image class="main" src="../../../assets/img/attention.png" mode=""/>
</view>
<view bindtap="goPage" class="button">
上传图片
</view>
</view>

+ 24
- 0
package_first/pages/AttentionMethod/index.wxss Переглянути файл

@@ -0,0 +1,24 @@
/* package_first/pages/AttentionMethod/index.wxss */
.attention_container{
position: relative;
}
.main{
width: 140%;
height: 2640rpx;
margin-top: -105rpx;
}
.button{
width: calc(100% - 60rpx);
height: 90rpx;
background: #3275E9;
border-radius: 40rpx;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
text-align: center;
line-height: 95rpx;
position: fixed;
bottom: 55rpx;
left: 30rpx;
}

+ 106
- 0
package_first/pages/ProtectionActivity/index.js Переглянути файл

@@ -0,0 +1,106 @@
// package_first/pages/ProtectionActivity/index.js
import {
api_getIsApply,
api_TiktokAdd
} from '../../../api/attention.js';
Page({

/**
* 页面的初始数据
*/
data: {
entersList:[
{
title:'关注抖音',
iconPath:'../../../assets/img/attentionIcon.png'
},
{
title:'学习视频',
iconPath:'../../../assets/img/video.png'
},
{
title:'志愿者活动',
iconPath:'../../../assets/img/volunteer.png'
}
]
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getIsApply()
},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
getIsApply(){
console.log('1111');
const tenantObj = wx.getStorageSync('tenant')
const openid = wx.getStorageSync('openid')
const data = {
tenantId:tenantObj.tenantId,
openid,
}
api_getIsApply(data).then(res=>{
console.log(res);
})
},
goPage(e){
console.log(1111);
wx.navigateTo({
url: `/package_first/pages/AttentionMethod/index`,
})
},
homepage(e){
wx.switchTab({
url: `/pages/FirstPage/index`,
})
}
})

+ 7
- 0
package_first/pages/ProtectionActivity/index.json Переглянути файл

@@ -0,0 +1,7 @@
{
"usingComponents": {
"list": "../../../components/List/index",
"ImageList": "../../../components/ImageList/index"
},
"navigationStyle": "custom"
}

+ 34
- 0
package_first/pages/ProtectionActivity/index.wxml Переглянути файл

@@ -0,0 +1,34 @@
<!--package_first/pages/ProtectionActivity/index.wxml-->
<view class="pageContainer">
<image class="navBg" mode="widthFix" src="../../../assets/img/activitytitle.png" />
<image class="home" bindtap="homepage" src="../../../assets/img/back.png" mode=""/>
</view>
<view class="activity_container">
<view class="top">
<image class="activity_bg" src="../../../assets/img/activitybg.png" mode=""/>
</view>
<view class="main">
<view class="part" wx:key="index" wx:for="{{entersList}}">
<view>
<image class="icon" src="{{item.iconPath}}" mode=""/>
</view>
<view class="middle_text">
<view class="text">
{{item.title}}
</view>
<!-- <view class="marks">
<view>
<image class="marks_icon" src="../../../assets/img/gold.png" mode=""/>
</view>
<view class="marks_text">10积分</view>
</view> -->
</view>
<view class="takepart" wx:if="">
已参加
</view>
<view>
<image class="takepart_icon" bindtap="goPage" src="../../../assets/img/takepart.png" mode=""/>
</view>
</view>
</view>
</view>

+ 94
- 0
package_first/pages/ProtectionActivity/index.wxss Переглянути файл

@@ -0,0 +1,94 @@
/* package_first/pages/ProtectionActivity/index.wxss */

.navBg {
width: 100%;
position: absolute;
top: 0;
}
.activity_container{
margin-top: 175rpx;
width: 103%;
height: 1664rpx;
background-color: #F2F3F6;
position: relative;
}
.activity_bg{
width: 100%;
height: 454rpx;
}
.main{
width: calc(100% - 80rpx);
height: 1221rpx;
background-color: #ffffff;
border-radius: 30rpx 30rpx 0rpx 0rpx;
margin:0rpx 50rpx 0rpx 30rpx;
position: absolute;
top: 268rpx;

}
.part{
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 61rpx 0rpx 0rpx 30rpx ;
}
.middle_text{
padding-left: 39rpx;
}
.marks{
display: flex;
flex-direction: row;
}
.icon{
width: 70rpx;
height: 70rpx;
}
.text{
width: 180rpx;
height: 32rpx;
font-size: 34rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #474747;
line-height: 25rpx;
}
.marks_icon{
width: 30rpx;
height: 30rpx;
margin: 16rpx 10rpx 0rpx 0rpx;
}
.marks_text{
width: 80rpx;
height: 22rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #A2A2A2;
line-height: 60rpx;
}
.takepart{
width: 126rpx;
height: 56rpx;
background: #FE8100;
box-shadow: 0rpx 5rpx 9rpx 0rpx rgba(254,129,0,0.28);
border-radius: 28rpx;
font-size: 22rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #FFFFFF;
line-height: 60rpx;
text-align: center;
margin-left: 65rpx;
}
.takepart_icon{
width: 143rpx;
height: 74rpx;
margin-right: 21rpx;
}
.home{
width: 40rpx;
height: 40rpx;
position: absolute;
top: 60rpx;
left: 30rpx;
}

+ 131
- 0
package_first/pages/ProtectionSuggestion/index.js Переглянути файл

@@ -0,0 +1,131 @@
// package_first/pages/ProtectionSuggestion/ProtectionSuggestion.js
import { api_westreamSuggest,
api_getUserInfo
} from '../../../api/suggestion';
Page({

/**
* 页面的初始数据
*/
data: {
form : {
content:''
},
userInfo:{},
formRules: {
content: {
validator: function (value) {
return value;
},
warning: false
},
},
},

/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {

},

/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {

},

/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getUserInfo()
},

/**
* 生命周期函数--监听页面隐藏
*/
onHide() {

},

/**
* 生命周期函数--监听页面卸载
*/
onUnload() {

},

/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {

},

/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {

},

/**
* 用户点击右上角分享
*/
onShareAppMessage() {

},
remarkInputAction(options){
let content= options.detail.value
this.setData({
form:{
content,
}
})
},

getUserInfo(){
const tenantObj = wx.getStorageSync('tenant')
const openid = wx.getStorageSync('openid')
const data = {
tenantId:tenantObj.tenantId,
openid,
}
api_getUserInfo(data).then(res=>{
let userInfo = res.data
this.setData({
userInfo,
})
})
},

submit(e){
const tenantObj = wx.getStorageSync('tenant')
const openid = wx.getStorageSync('openid')
if(this.data.form.content == ''){
wx.showToast({
title: '还没提交相关建议',
icon:'none'
})
}else{
let data = {
tenantId:tenantObj.tenantId,
openid : openid,
nickname:this.data.userInfo.nickname,
suggestName:this.data.form.content
}
api_westreamSuggest(data).then(res=>{
wx.showToast({
title: '提交成功',
icon:'none',
duration:2000
})

})
}
},
})

+ 8
- 0
package_first/pages/ProtectionSuggestion/index.json Переглянути файл

@@ -0,0 +1,8 @@
{
"usingComponents": {
"list": "../../../components/List/index",
"ImageList": "../../../components/ImageList/index"
},
"navigationBarTitleText": "护河建议",
"navigationBarBackgroundColor": "#f0f2f5"
}

+ 20
- 0
package_first/pages/ProtectionSuggestion/index.wxml Переглянути файл

@@ -0,0 +1,20 @@
<!--package_first/pages/ProtectionSuggestion/ProtectionSuggestion.wxml-->
<view class="suggestion_container">
<view class="main">
<view class="top">
<view>
<image class="text_icon" src="../../../assets/img/tips.png" mode=""/>
</view>
<view class="top_text" >全民护河,全民参与。您的宝贵意见如被采纳,将获得相应积分!</view>
</view>
<view class="bottom">
<view class="suggestion">护河建议</view>
<view class="suggestion_text">
<textarea class="text_content" maxlength="150" bindinput="remarkInputAction" placeholder="请留下您的宝贵意见。" auto-focus="true" value="{{form.content}}" />
</view>
<view class="button" bindtap="submit">
提交
</view>
</view>
</view>
</view>

+ 81
- 0
package_first/pages/ProtectionSuggestion/index.wxss Переглянути файл

@@ -0,0 +1,81 @@
/* package_first/pages/ProtectionSuggestion/ProtectionSuggestion.wxss */
.suggestion_container{
min-height:100vh;
width: 100%;
background-color: rgb(240, 242, 245);
}
.main{
width: 100%;
padding: 30rpx;
}
.top{
padding: 31rpx 39rpx 52rpx 28rpx;
display: flex;
flex-grow:inherit;
height: 173rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 7rpx 0rpx rgba(43,93,184,0.18);
border-radius: 20rpx;
}
.text_icon{
width: 47rpx;
height: 47rpx;
}
.top_text{
width: 100%;
height: 83rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
line-height: 53rpx;
margin-left: 10rpx;
}
.bottom{
width: 100%;
display: flex;
flex-direction: column;
margin-top: 60rpx;
}
.suggestion{
margin-bottom: 56rpx;
width: 127px;
height: 31rpx;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
line-height: 53rpx;
}
.suggestion::after {
content:"";
display:block;
margin-top: -15rpx;
width: 129rpx;
height: 10rpx;
background: #1E79FA;
opacity: 0.5;
}
.text_content{
border-radius: 20rpx;
background-color: #fff;
width:calc(100% - 80rpx);
height: 217rpx;
font-size: 30rpx;
padding-top: 51rpx;
padding-left: 40rpx;
display: block;
text-overflow:ellipsis;
word-wrap:break-word;
}
.button{
width:calc(100% - 80rpx);
text-align: center;
border-radius: 30rpx;
color: white;
background-color: #2878ff;
position: absolute;
bottom: 120rpx;
height: 80rpx;
line-height: 80rpx;
}

+ 12
- 0
pages/FirstPage/index.js Переглянути файл

@@ -39,6 +39,18 @@ Page({
iconPath: '../../assets/first/stores.png',
path: '/package_A/pages/stores/index',
type: 'page'
},
{
title:'护河活动',
iconPath: '../../assets/first/activity.png',
path: '/package_first/pages/ProtectionActivity/index',
type: 'page'
},
{
title:'护河建议',
iconPath: '../../assets/first/suggestion.png',
path: '/package_first/pages/ProtectionSuggestion/index',
type: 'page'
}
],
infoList: ['name', 'location', 'note'],

+ 9
- 1
pages/FirstPage/index.wxss Переглянути файл

@@ -108,14 +108,22 @@
background-color: #ffffff;
border-radius: 8rpx;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
flex: 0 0 25%;
}

.enter_item {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 10rpx;
margin-bottom: 10rpx;
margin-right: 27rpx;
}
.enter_item:nth-child(4n+0) {
margin-right: 0;
}
.enter_icon {
width: 110rpx;

+ 1
- 20
project.config.json Переглянути файл

@@ -54,26 +54,7 @@
"libVersion": "2.19.4",
"appid": "wxd0f247d7272ca1b7",
"projectname": "weixin-app",
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"list": []
},
"plugin": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": []
}
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4

+ 28
- 0
project.private.config.json Переглянути файл

@@ -147,6 +147,34 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "护河建议",
"pathName": "package_first/pages/ProtectionSuggestion/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "护河活动",
"pathName": "package_first/pages/ProtectionActivity/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "关注抖音",
"pathName": "package_first/pages/AttentionMethod/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "上传图片",
"pathName": "package_first/pages/AddPicture/index",
"query": "",
"launchMode": "default",
"scene": null
}
]
}

Завантаження…
Відмінити
Зберегти