Browse Source

feat: page-growing+;

pull/2/head
Fox-33 2 weeks ago
parent
commit
dc82802166
6 changed files with 271 additions and 37 deletions
  1. +3
    -0
      pages.json
  2. +1
    -1
      pages/index/index.vue
  3. +227
    -0
      pages_order/growing/activity/applyEmail.vue
  4. +6
    -2
      pages_order/growing/activity/index.vue
  5. +34
    -34
      pages_order/growing/activity/markPopup.vue
  6. BIN
      pages_order/static/activity/icon-nav.png

+ 3
- 0
pages.json View File

@ -85,6 +85,9 @@
{ {
"path": "growing/activity/index" "path": "growing/activity/index"
}, },
{
"path": "growing/activity/applyEmail"
},
{ {
"path": "growing/achievement/index" "path": "growing/achievement/index"
}, },


+ 1
- 1
pages/index/index.vue View File

@ -93,7 +93,7 @@
} }
}, },
onLoad() { onLoad() {
// this.$utils.navigateTo(`/pages_order/growing/activity/index`)
this.$utils.navigateTo(`/pages_order/growing/activity/applyEmail`)
// uni.navigateTo({ // uni.navigateTo({
// url: `/pages_order/order/orderConfirm/index` // url: `/pages_order/order/orderConfirm/index`
// }) // })


+ 227
- 0
pages_order/growing/activity/applyEmail.vue View File

@ -0,0 +1,227 @@
<template>
<view class="page__view">
<navbar leftClick @leftClick="$utils.navigateBack" >
<image class="icon-nav" src="@/pages_order/static/activity/icon-nav.png" mode="widthFix"></image>
</navbar>
<view class="main">
<view class="card">
<view class="card-header">申请邮寄纸质版</view>
<view class="form">
<uv-form
ref="form"
:model="form"
:rules="rules"
errorType="toast"
>
<view class="form-item">
<uv-form-item prop="name" :customStyle="formItemStyle">
<view class="form-item-label">
<image class="icon" src="@/static/image/icon-require.png" mode="widthFix"></image>
姓名
</view>
<view class="form-item-content">
<formInput v-model="form.name"></formInput>
</view>
</uv-form-item>
</view>
<view class="form-item">
<uv-form-item prop="phone" :customStyle="formItemStyle">
<view class="form-item-label">
<image class="icon" src="@/static/image/icon-require.png" mode="widthFix"></image>
电话
</view>
<view class="form-item-content">
<formInput v-model="form.phone"></formInput>
</view>
</uv-form-item>
</view>
<view class="form-item">
<uv-form-item prop="address" :customStyle="formItemStyle">
<view class="form-item-label">
<image class="icon" src="@/static/image/icon-require.png" mode="widthFix"></image>
邮寄地址
</view>
<view class="form-item-content">
<formInput v-model="form.address"></formInput>
</view>
</uv-form-item>
</view>
</uv-form>
</view>
</view>
</view>
<view class="bottom">
<view class="flex btn" @click="onSubmit">提交</view>
</view>
</view>
</template>
<script>
import formInput from '@/pages_order/components/formInput.vue'
export default {
components: {
formInput,
},
data() {
return {
id: null,
form: {
name: null,
phone: null,
address: null,
},
rules: {
'name': {
type: 'string',
required: true,
message: '请输入姓名',
},
'phone': {
type: 'string',
required: true,
message: '请输入电话',
},
'address': {
type: 'string',
required: true,
message: '请输入邮寄地址',
},
},
}
},
onLoad(arg) {
const { id } = arg
this.id = id
},
methods: {
async onSubmit() {
try {
await this.$refs.form.validate()
const {
} = this.form
const params = {
}
// todo: fetch
// await this.$fetch('updateAddress', params)
uni.showToast({
icon: 'success',
title: '提交成功',
});
setTimeout(() => {
this.$utils.navigateBack()
}, 800)
} catch (err) {
console.log('onSave err', err)
}
},
},
}
</script>
<style lang="scss" scoped>
.page__view {
width: 100vw;
height: 100vh;
position: relative;
background: linear-gradient(to right, #21FEEC, #019AF9);
/deep/ .nav-bar__view {
position: fixed;
top: 0;
left: 0;
}
.icon-nav {
width: 392rpx;
height: auto;
}
}
.main {
height: 100%;
padding-top: calc(var(--status-bar-height) + 142rpx);
box-sizing: border-box;
}
.card {
width: 100%;
height: 100%;
padding: 40rpx;
box-sizing: border-box;
font-family: PingFang SC;
font-weight: 400;
line-height: 1.4;
background: linear-gradient(#DAF3FF, #FBFEFF 90rpx, #FBFEFF);
border: 2rpx solid #FFFFFF;
border-radius: 48rpx;
&-header {
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1.4;
color: #191919;
}
}
.form {
&-item {
margin-top: 32rpx;
border-bottom: 2rpx solid #EEEEEE;
&-label {
font-family: PingFang SC;
font-weight: 400;
font-size: 26rpx;
line-height: 1.4;
color: #181818;
.icon {
margin-right: 8rpx;
width: 16rpx;
height: auto;
}
}
&-content {
}
}
}
.bottom {
position: fixed;
left: 0;
bottom: 0;
width: 100vw;
background: #FFFFFF;
box-sizing: border-box;
padding: 32rpx 40rpx;
padding-bottom: calc(env(safe-area-inset-bottom) + 32rpx);
box-sizing: border-box;
.btn {
width: 100%;
padding: 14rpx 0;
font-family: PingFang SC;
font-weight: 500;
font-size: 36rpx;
line-height: 1;
color: #FFFFFF;
background: linear-gradient(to right, #21FEEC, #019AF9);
border: 2rpx solid #00A9FF;
border-radius: 41rpx;
}
}
</style>

+ 6
- 2
pages_order/growing/activity/index.vue View File

@ -89,6 +89,7 @@
}, },
data() { data() {
return { return {
id: null,
tabs: [ tabs: [
{ id: 'highlights', name: '活动掠影' }, { id: 'highlights', name: '活动掠影' },
{ id: 'thoughts', name: '学员心得' }, { id: 'thoughts', name: '学员心得' },
@ -99,7 +100,10 @@
scrollIntoView: null, scrollIntoView: null,
} }
}, },
onLoad() {
onLoad(arg) {
const { id } = arg
this.id = id
this.getData() this.getData()
}, },
methods: { methods: {
@ -133,7 +137,7 @@
// todo // todo
}, },
onApplyEmail() { onApplyEmail() {
// todo
this.$utils.navigateTo(`/pages_order/growing/activity/applyEmail?id=${this.id}`)
}, },
}, },
} }


+ 34
- 34
pages_order/growing/activity/markPopup.vue View File

@ -3,7 +3,7 @@
<uv-popup ref="popup" mode="bottom" bgColor="none" > <uv-popup ref="popup" mode="bottom" bgColor="none" >
<view class="popup__view"> <view class="popup__view">
<view class="flex header"> <view class="flex header">
<view class="title">标记有我</view>
<view class="title">新增回顾</view>
<button class="btn" @click="close">关闭</button> <button class="btn" @click="close">关闭</button>
</view> </view>
<view class="form"> <view class="form">
@ -37,7 +37,7 @@
</uv-form> </uv-form>
</view> </view>
<view class="footer"> <view class="footer">
<button class="flex btn" @click="onSubmit">提交</button>
<button class="flex btn" @click="onPublish">发布</button>
</view> </view>
</view> </view>
</uv-popup> </uv-popup>
@ -45,37 +45,37 @@
</template> </template>
<script> <script>
export default {
data() {
return {
form: {
image: null,
},
rules: {
'content': {
type: 'image',
required: true,
message: '请上传图片',
export default {
data() {
return {
form: {
image: null,
}, },
},
}
},
methods: {
onUpload() {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //
success: res => {
let image = res.tempFilePaths[0] // cover
this.$Oss.ossUpload(image)
.then(url => {
this.form.image = url
})
}
});
rules: {
'image': {
type: 'string',
required: true,
message: '请上传图片',
},
},
}
}, },
async onSubmit() {
methods: {
onUpload() {
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'], //
success: res => {
let image = res.tempFilePaths[0] // cover
this.$Oss.ossUpload(image)
.then(url => {
this.form.image = url
})
}
});
},
async onPublish() {
try { try {
await this.$refs.form.validate() await this.$refs.form.validate()
@ -90,7 +90,7 @@ export default {
uni.showToast({ uni.showToast({
icon: 'success', icon: 'success',
title: '提交成功',
title: '发布成功',
}); });
this.$emit('submitted') this.$emit('submitted')
@ -101,8 +101,8 @@ export default {
console.log('onSave err', err) console.log('onSave err', err)
} }
}, },
},
}
},
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>


BIN
pages_order/static/activity/icon-nav.png View File

Before After
Width: 573  |  Height: 81  |  Size: 19 KiB

Loading…
Cancel
Save