first commit
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.bottom-button {
|
||||
width: 160px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.van-button {
|
||||
position: initial !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="地址管理" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div v-if="vLoading && !vLoading.value">
|
||||
<van-address-list
|
||||
v-if="addressList && addressList.length>0 "
|
||||
v-model="chosenAddressId"
|
||||
:list="addressList"
|
||||
default-tag-text="默认"
|
||||
@add="onAdd"
|
||||
@edit="onEdit"
|
||||
></van-address-list>
|
||||
|
||||
<van-empty v-else description="暂无地址">
|
||||
<van-button round type="danger" class="bottom-button" @click="onAdd">新增地址</van-button>
|
||||
</van-empty>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
chosenAddressId: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onAdd() {
|
||||
location.replace('/mobile/welfare/mine/addressEdit')
|
||||
},
|
||||
onEdit(item, index) {
|
||||
location.replace('/mobile/welfare/mine/addressEdit?id=' + item.id)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
await this.selectAddressList()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
window.addEventListener('pageshow', e => {
|
||||
if (e.persisted || (window.performance && window.performance.navigation.type === 2)) {
|
||||
vue.selectAddressList()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,109 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="地址管理" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<div v-if="vLoading && !vLoading.value">
|
||||
<van-address-edit
|
||||
ref="address"
|
||||
:area-list="areaList"
|
||||
:show-delete="addressId"
|
||||
:address-info="addressInfo"
|
||||
show-set-default
|
||||
show-search-result
|
||||
tel-maxlength="11"
|
||||
:area-columns-placeholder="['请选择', '请选择', '请选择']"
|
||||
@save="onSave"
|
||||
@delete="onDelete"
|
||||
></van-address-edit>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/areaList.js"){};include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
areaList: areaList,
|
||||
addressInfo: {},
|
||||
addressId: null
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async onSave(content) {
|
||||
const loading = this.$toast.loading({
|
||||
message: '保存中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
content.userName = content.name
|
||||
const resp = await $.post('/mobile/welfare/mine/doSaveUserAddress', content)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
let welfareProjectId = window.sessionStorage.getItem("welfareProjectId");
|
||||
if (welfareProjectId) {
|
||||
location.replace('/mobile/welfare/list/receive?projectId=' + welfareProjectId)
|
||||
window.sessionStorage.removeItem("welfareProjectId");
|
||||
} else {
|
||||
location.replace('/mobile/welfare/mine/address')
|
||||
}
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
async onDelete(content) {
|
||||
const loading = this.$toast.loading({
|
||||
message: '删除中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post('/mobile/welfare/mine/deleteAddress', {id: content.id})
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
setTimeout(() => {
|
||||
window.location.replace('/mobile/welfare/mine/address')
|
||||
}, 1000)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.startLoading()
|
||||
this.addressId = GetQueryString("id") === '' ? null : GetQueryString("id")
|
||||
if (this.addressId) {
|
||||
const resp = await $.get('/mobile/welfare/mine/findOneUserAddress', {id: this.addressId})
|
||||
if (resp.code === 0) {
|
||||
this.addressInfo = resp.data
|
||||
}
|
||||
this.closeLoading()
|
||||
} else {
|
||||
this.addressInfo.name = "${@shiro.getPrincipalProperty('username')}";
|
||||
this.closeLoading()
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,63 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-cell-group--inset {
|
||||
margin: 0 16px;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="个人信息" left-arrow placeholder fixed
|
||||
@click-left="history.back()"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div class="mt10" v-if="vLoading && !vLoading.value">
|
||||
<van-cell-group class="van-cell-group--inset">
|
||||
<van-cell>
|
||||
<template #title>
|
||||
<div style="font-weight: bold;font-size: 15px">个人信息</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的福利" url="/mobile/welfare/mine/myWelfare">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="star"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的地址" url="/mobile/welfare/mine/address">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="location"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :border="false" is-link title="我的签名" url="/mobile/welfare/mine/sign">
|
||||
<template #icon>
|
||||
<van-icon class="van-cell__left-icon" color="red" name="coupon"></van-icon>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
tarBarActive: 1
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.startLoading()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,210 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.content {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.base-one-circle {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
padding: 10px 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
background: radial-gradient(circle at left bottom, transparent 10px, #fff 0) top left / 40% 50% no-repeat,
|
||||
radial-gradient(circle at left top, transparent 10px, #fff 0) bottom left /40% 50% no-repeat,
|
||||
radial-gradient(circle at right bottom, transparent 10px, #fff 0) top right /60% 50% no-repeat,
|
||||
radial-gradient(circle at right top, transparent 10px, #fff 0) bottom right /60% 50% no-repeat;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.base-one-circle .left_img {
|
||||
min-width: 100px;
|
||||
width: 120px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.base-one-circle .right_content {
|
||||
flex: 1;
|
||||
max-width: calc(100% - 120px);
|
||||
width: calc(100% - 120px);
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.welfare_name {
|
||||
width: calc(100% - 50px);;
|
||||
max-width: 100%;
|
||||
word-break: break-word;
|
||||
height: 40px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.welfare_time {
|
||||
height: 25px;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
color: gray
|
||||
}
|
||||
|
||||
.welfare_gift {
|
||||
font-size: 12px;
|
||||
color: gray;
|
||||
margin-top: 10px;
|
||||
line-height: 15px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.receive_img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.van-image__img {
|
||||
border-radius: 10px;
|
||||
object-fit: revert;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的福利" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
|
||||
<!-- <van-tabs v-model="tabActive" @change="tabChange">
|
||||
<van-tab title="全部"></van-tab>
|
||||
<van-tab title="已领取"></van-tab>
|
||||
<van-tab title="未领取"></van-tab>
|
||||
</van-tabs>-->
|
||||
|
||||
<div class="content">
|
||||
<template v-for="item in welfareList">
|
||||
<div class="base-one-circle">
|
||||
<div class="left_img">
|
||||
<img :src="FILE_STREAM_PREVIEW_ADDRESS+'?id='+item.cover" alt=""
|
||||
class="van-image__img"
|
||||
v-if="item.cover">
|
||||
<image v-else src="/assets/mobile/svg/welfare/welfareHome.svg"></image>
|
||||
</div>
|
||||
<div class="right_content" @click="openView(item)">
|
||||
<div class="welfare_name van-ellipsis">【{{item.name}}】</div>
|
||||
<div class="welfare_time">
|
||||
<template v-if="new Date().getTime()>moment(item.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(item.choiceTimeEnd).valueOf()">
|
||||
<div style="flex: 1">选择开始时间:{{item.choiceTimeStart}}</div>
|
||||
<div style="flex: 1">选择结束时间:{{item.choiceTimeEnd}}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="flex: 1">发放开始时间:{{item.provideTimeStart}}</div>
|
||||
<div style="flex: 1">发放结束时间:{{item.provideTimeEnd}}</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="welfare_gift">
|
||||
<div style="width: 60px;" v-if="item.isReceive">已领礼品:</div>
|
||||
<div style="width: 60px;" v-if="!item.isReceive">已选礼品:</div>
|
||||
<div style="width: calc(100% - 60px);word-break: break-word">
|
||||
{{item.flexible?item.welfareOptionName:item.gift}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="welfare_gift" v-if="item.provideMode===3">
|
||||
<div style="width: 60px;">快递单号:</div>
|
||||
<div>
|
||||
{{item.courierNumber}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="receive_img">
|
||||
<template v-if="new Date().getTime()>moment(item.choiceTimeStart).valueOf()
|
||||
&&new Date().getTime()<moment(item.choiceTimeEnd).valueOf()">
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-if="item.isSelect&&!item.isReceive">已选择
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="!item.isSelect&&!item.isReceive">未选择
|
||||
</div>
|
||||
<!-- <image v-if="o.isSelect" src="/assets/mobile/svg/welfare/ylq.svg"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.svg"></image>-->
|
||||
</template>
|
||||
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="item.isSelect&&item.isReceive">已选择
|
||||
</div>
|
||||
<div class="van-ellipsis"
|
||||
style="font-size: 15px;font-weight: bold;flex: 2;color: rgb(24,103,179);margin-right: 5px;"
|
||||
v-else-if="item.isSelect&&!item.isReceive">未选择
|
||||
</div>
|
||||
<!-- <image v-if="o.isSelect" src="/assets/mobile/svg/welfare/ylq.svg"></image>
|
||||
<image v-else src="/assets/mobile/svg/welfare/wlq.svg"></image>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
fullWelfareList: [],
|
||||
welfareList: [],
|
||||
tabActive: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(item) {
|
||||
location.replace('/mobile/welfare/list/receive?projectId=' + item.id + '&type=view')
|
||||
},
|
||||
async getData() {
|
||||
const resp = await $.post('/mobile/welfare/mine/getMyWelfare', {tabActive: this.tabActive})
|
||||
this.fullWelfareList = resp.data
|
||||
this.welfareList = resp.data
|
||||
},
|
||||
tabChange(val) {
|
||||
if (val === 0) {
|
||||
this.welfareList = this.fullWelfareList
|
||||
}
|
||||
switch (val) {
|
||||
case 0: {
|
||||
this.welfareList = this.fullWelfareList
|
||||
break
|
||||
}
|
||||
case 1: {
|
||||
this.welfareList = this.fullWelfareList.filter(v => v.isReceive || [1].includes(v.provideMode))
|
||||
break
|
||||
}
|
||||
case 2: {
|
||||
this.welfareList = this.fullWelfareList.filter(v => !v.isReceive)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.startLoading()
|
||||
this.getData()
|
||||
this.closeLoading()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,126 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
#signature {
|
||||
/*height: calc(100vh - 136px);*/
|
||||
height: 300px;
|
||||
background: #fff;
|
||||
border: 1px dashed grey;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.button-operation {
|
||||
display: flex;
|
||||
height: 50px;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
/*bottom: 0;*/
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.button-operation > div {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.button-operation > div > button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-sticky>
|
||||
<van-nav-bar title="我的签名" left-arrow
|
||||
@click-left="history.go(-1)"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div id="signature"></div>
|
||||
<div class="button-operation">
|
||||
<div>
|
||||
<van-button type="danger" @click="reset">重写</van-button>
|
||||
</div>
|
||||
<div>
|
||||
<van-button type="info" @click="save">保存</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include("/mobile/welfare/include/mixins.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins, welfareMixins],
|
||||
data() {
|
||||
return {
|
||||
userSign: {
|
||||
data: null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
const val = $('#signature').jSignature("getData", "default")
|
||||
$('#signature').jSignature('clear')
|
||||
this.userSign.data = null
|
||||
},
|
||||
async save() {
|
||||
const slength = $("#signature").jSignature('getData', 'native').length
|
||||
if (slength === 0 && !this.userSign.data) {
|
||||
this.$toast('请先签字!')
|
||||
return
|
||||
}
|
||||
|
||||
const loading = this.$toast.loading({
|
||||
message: '保存中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
this.userSign.data = $('#signature').jSignature("getData", "default")
|
||||
const resp = await $.post('/mobile/welfare/mine/saveMySignature', this.userSign)
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
this.userSign = resp.data
|
||||
this.$toast.success('保存成功!')
|
||||
}
|
||||
},
|
||||
async getSignature() {
|
||||
const resp = await $.get('/mobile/welfare/mine/getMySignature')
|
||||
if (resp.code === 0) {
|
||||
this.userSign = resp.data
|
||||
if (this.userSign.data) {
|
||||
$('#signature').jSignature("setData", resp.data.data)
|
||||
// $('#signature').jSignature("importData", resp.data.data)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
$('#signature').jSignature({
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
lineWidth: 1
|
||||
})
|
||||
document.body.addEventListener('touchmove', function (e) {
|
||||
e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)
|
||||
}, {passive: false}); //passive 参数不能省略,用来兼容ios和android
|
||||
},
|
||||
created() {
|
||||
this.getSignature()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user