Merge remote-tracking branch 'origin/dev' into dev
@@ -1,41 +1,44 @@
|
||||
<template>
|
||||
<div class="AppDialogue">
|
||||
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false"></u-navbar>
|
||||
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false" height="88"></u-navbar>
|
||||
<!-- <scroll-view scroll-y="true" class="scroll-Y" @scroll="scroll"> -->
|
||||
<div class="service-content" v-if="!messageList.length">
|
||||
<div class="text-content">
|
||||
<div class="text-left">
|
||||
<div>嘿,你好呀!</div>
|
||||
<p>我是您的<span>「Copilot小助理」</span>,</p>
|
||||
<p>有什么问题都可以问我哟~</p>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/service.png" alt="" class="service-img">
|
||||
<!-- <div class="top-select" @click="showType=true">
|
||||
{{typeList[type].dictName || '选择应用'}} <u-icon name="arrow-down" color="#fff" size="28"></u-icon>
|
||||
</div> -->
|
||||
<div class="service-content" v-if="!messageList.length">
|
||||
<div class="text-content">
|
||||
<div class="text-left">
|
||||
<div>嘿,你好呀!</div>
|
||||
<p>我是您的<span>「Copilot小助理」</span>,</p>
|
||||
<p>有什么问题都可以问我哟~</p>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/service.png" alt="" class="service-img">
|
||||
</div>
|
||||
<div class="list-bg" v-if="messageList.length"></div>
|
||||
<div class="list-content" v-if="messageList.length">
|
||||
<div v-for="(item, index) in messageList" :key="index">
|
||||
<div class="send-time">{{item.createTime.substring(5, 16)}}</div>
|
||||
<div :class="item.userType == 1 ? 'item-left' : 'item-right'">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType == 1">
|
||||
<div class="item" :class="'item'+index">
|
||||
<u-icon name="play-right-fill" color="#CCE2FF" size="20" v-if="item.userType != 1" class="u-icon-right"></u-icon>
|
||||
<u-icon name="play-left-fill" color="#F3F5F7" size="20" v-if="item.userType == 1" class="u-icon-left"></u-icon>
|
||||
<div class="voice-div" v-if="item.sdkFileUrl" @click="play(item.sdkFileUrl, index)">
|
||||
<span>8”</span>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-d.gif" alt="" v-if="item.isPlay">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-j.png" alt="" v-else>
|
||||
</div>
|
||||
<p v-if="!item.sdkFileUrl">{{item.content || ''}}</p>
|
||||
</div>
|
||||
<div class="list-bg" v-if="messageList.length"></div>
|
||||
<div class="list-content" v-if="messageList.length">
|
||||
<div v-for="(item, index) in messageList" :key="index">
|
||||
<div class="send-time">{{item.createTime.substring(5, 16)}}</div>
|
||||
<div :class="item.userType == 1 ? 'item-left' : 'item-right'">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType == 1">
|
||||
<div class="item" :class="'item'+index">
|
||||
<u-icon name="play-right-fill" color="#CCE2FF" size="20" v-if="item.userType != 1" class="u-icon-right"></u-icon>
|
||||
<u-icon name="play-left-fill" color="#F3F5F7" size="20" v-if="item.userType == 1" class="u-icon-left"></u-icon>
|
||||
<div class="voice-div" v-if="item.sdkFileUrl" @click="play(item.sdkFileUrl, index)">
|
||||
<span>8”</span>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-d.gif" alt="" v-if="item.isPlay">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-j.png" alt="" v-else>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType != 1">
|
||||
<p v-if="!item.sdkFileUrl">{{item.content || ''}}</p>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType != 1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </scroll-view> -->
|
||||
<div class="fixed-bottom">
|
||||
<div class="type-text" v-if="type == 'text'">
|
||||
<u-input type="text" placeholder="输入您的问题…" height="80" input-align="left" :clearable="false" placeholder-style="color:#666;" v-model="content" @confirm="sendMsg"></u-input>
|
||||
<u-input type="text" placeholder="输入您的问题…" height="80" input-align="left" :clearable="false" placeholder-style="color:#666;" v-model="content" @confirm="sendMsg" :adjust-position="false"></u-input>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/send.png" alt="" v-if="content.length" @click="sendMsg">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/microphone-btn.png" alt="" v-else @click="microPhone">
|
||||
</div>
|
||||
@@ -59,7 +62,25 @@
|
||||
<button class="login-btn" open-type="getPhoneNumber" @getphonenumber="handleAdminLogin" v-if="!token">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/question-icon.png" alt="">登录
|
||||
</button>
|
||||
<u-select v-model="showType" :list="typeList" value-name="dictValue"
|
||||
label-name="dictName" @confirm="confirmType"></u-select>
|
||||
<AiLogin ref="login"/>
|
||||
<!-- <u-popup v-model="showPopup" mode="bottom">
|
||||
<div class="popup-content">
|
||||
<div class="pop-header">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/question-icon.png" alt=""> 慧知会言
|
||||
</div>
|
||||
<p class="pop-title">申请获取你当前的位置信息</p>
|
||||
<div class="pop-text">
|
||||
<p>微信位置信息</p>
|
||||
<u-icon name="checkbox-mark" color="#2EC871" size="36"></u-icon>
|
||||
</div>
|
||||
<div class="pop-btn">
|
||||
<div>拒绝</div>
|
||||
<div class="pop-confirm">接受</div>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup> -->
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -95,7 +116,15 @@ export default {
|
||||
],
|
||||
current: 1,
|
||||
pages: 2,
|
||||
areaId: ''
|
||||
areaId: '',
|
||||
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
|
||||
typeList: [
|
||||
{dictValue: '1', dictName: '文本助理'},
|
||||
{dictValue: '2', dictName: '日常助理'}
|
||||
],
|
||||
type: '',
|
||||
showType: false,
|
||||
showPopup: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -292,6 +321,9 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
confirmType(val) {
|
||||
this.type = val[0].value;
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -305,13 +337,30 @@ page {
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
.top-select {
|
||||
line-height: 64px;
|
||||
background: #026AF2;
|
||||
border-radius: 32px;
|
||||
position: fixed;
|
||||
left: 28px;
|
||||
text-align: center;
|
||||
padding: 0 24px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 28px;
|
||||
color: #FFF;
|
||||
z-index: 9;
|
||||
u-icon {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
.service-content {
|
||||
width: 100%;
|
||||
height: 420px;
|
||||
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
|
||||
background-size: 100vw;
|
||||
background-repeat: no-repeat;
|
||||
padding-top: 20px;
|
||||
padding-top: 84px;
|
||||
box-sizing: border-box;
|
||||
.text-content {
|
||||
margin: 0 0 0 32px;
|
||||
@@ -509,8 +558,6 @@ page {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.login-btn {
|
||||
position: fixed;
|
||||
bottom: 500px;
|
||||
@@ -535,5 +582,65 @@ page {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
.popup-content {
|
||||
padding: 32px 28px 68px;
|
||||
box-sizing: border-box;
|
||||
.pop-header {
|
||||
padding-bottom: 28px;
|
||||
line-height: 20px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
img {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
margin-right: 16px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.pop-title {
|
||||
line-height: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
color: #222;
|
||||
padding-bottom: 28px;
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
}
|
||||
.pop-text {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 38px 0;
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
p {
|
||||
line-height: 40px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
.pop-btn {
|
||||
padding: 56px 0;
|
||||
div {
|
||||
display: inline-block;
|
||||
width: calc(50% - 38px);
|
||||
line-height: 72px;
|
||||
background: #F2F2F2;
|
||||
border-radius: 8px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
text-align: center;
|
||||
}
|
||||
.pop-confirm {
|
||||
margin-left: 38px;
|
||||
background-color: #2EC871;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
185
src/project/baiduAI/AppRecord2/AppRecord.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<div class="AppRecord">
|
||||
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false" :height="44"></u-navbar>
|
||||
<div class="list-bg">
|
||||
<div class="search-content">
|
||||
<u-search v-model="searchVal" :clearabled="true" placeholder="请输入搜索关键词…" :show-action="false"
|
||||
bg-color="#fff" search-icon-color="#E2E8F1" color="#666" height="72" @search="getSearchList" @clear="handerClear">
|
||||
</u-search>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="item">
|
||||
<p class="item-text">111111111111</p>
|
||||
<div class="time-flex">
|
||||
<p class="time-text">2024-06-02 10:21:23</p>
|
||||
<div class="item-view">
|
||||
<p>查看对话</p>
|
||||
<div class="del-btn">
|
||||
<img src="./img/del-img.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!messageList.length"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {mapActions, mapState} from "vuex";
|
||||
export default {
|
||||
customNavigation: true,
|
||||
enablePullDownRefresh: true,
|
||||
name: 'AppRecord',
|
||||
appName: 'Copilot小助理(记录)',
|
||||
data() {
|
||||
return {
|
||||
backgroundNavbar: {
|
||||
background: 'url(https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/header-bg.jpeg) no-repeat',
|
||||
backgroundSize: 'cover',
|
||||
},
|
||||
searchVal: '',
|
||||
messageList: [
|
||||
// {
|
||||
// userType: 0,
|
||||
// sdkFileUrl: 'http://test87ftp.cunwuyun.cn/20240104/output.mp3',
|
||||
// isPlay: false
|
||||
// }
|
||||
],
|
||||
current: 1,
|
||||
pages: 2,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
},
|
||||
onShow() {
|
||||
//this.getHistoryList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
if(this.current > this.pages) {
|
||||
return this.$u.toast('没有更多记录')
|
||||
}
|
||||
this.current = this.current + 1
|
||||
this.getHistoryList()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['autoLogin']),
|
||||
getHistoryList() {
|
||||
if(!this.token) {
|
||||
return this.$u.toast("请先进行登录")
|
||||
}
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10&content=${this.searchVal}`).then(res => {
|
||||
if(res.code == 0 && res.data.records.length) {
|
||||
res.data.records.map((item) => {
|
||||
if(item.sdkFileUrl) {
|
||||
item.isPlay = false
|
||||
}
|
||||
})
|
||||
this.messageList = this.current == 1 ? res.data.records : [...res.data.records, ...this.messageList]
|
||||
var idPage = res.data.records.length-1
|
||||
this.$nextTick(() => {
|
||||
uni.pageScrollTo({
|
||||
duration: 300,
|
||||
selector: this.current == 1 ? `.item${this.messageList.length-1}` : `.item${idPage}`
|
||||
});
|
||||
})
|
||||
this.pages = res.data.pages
|
||||
this.$hideLoading()
|
||||
}else {
|
||||
if(this.current == 1) {
|
||||
this.messageList = []
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getSearchList() {
|
||||
this.current = 1
|
||||
this.getHistoryList()
|
||||
},
|
||||
handerClear() {
|
||||
this.searchVal = ''
|
||||
this.getSearchList()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~dvcp-wui/common";
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
.AppRecord {
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
.list-bg {
|
||||
width: 100%;
|
||||
height: 420px;
|
||||
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
background-size: 100vw;
|
||||
background-repeat: no-repeat;
|
||||
.search-content {
|
||||
padding: 32px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
background: linear-gradient(to bottom, #D7EDFE, #EAF5FE);
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
padding: 144px 32px 364px;
|
||||
.item {
|
||||
.item-text {
|
||||
line-height: 40px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
padding: 18px;
|
||||
background-color: #CCE2FF;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.time-flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 40px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
.time-text {
|
||||
color: #999;
|
||||
padding-top: 34px;
|
||||
}
|
||||
.item-view {
|
||||
p {
|
||||
display: inline-block;
|
||||
font-size: 28px;
|
||||
color: #216AFD;
|
||||
}
|
||||
div {
|
||||
display: inline-block;
|
||||
padding: 34px 0 34px 38px;
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
256
src/project/baiduAI/AppRecord2/Detail.vue
Normal file
@@ -0,0 +1,256 @@
|
||||
<template>
|
||||
<div class="Detail">
|
||||
<u-navbar title="Copilot小助理" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar" :is-back="false" :height="44"></u-navbar>
|
||||
<div class="list-bg">
|
||||
<div class="search-content">
|
||||
<u-search v-model="searchVal" :clearabled="true" placeholder="请输入搜索关键词…" :show-action="false"
|
||||
bg-color="#fff" search-icon-color="#E2E8F1" color="#666" height="72" @search="getSearchList" @clear="handerClear">
|
||||
</u-search>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div v-for="(item, index) in messageList" :key="index">
|
||||
<div class="send-time">{{item.createTime.substring(5, 16)}}</div>
|
||||
<div :class="item.userType == 1 ? 'item-left' : 'item-right'">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType == 1">
|
||||
<div class="item" :class="'item'+index">
|
||||
<u-icon name="play-right-fill" color="#CCE2FF" size="20" v-if="item.userType != 1" class="u-icon-right"></u-icon>
|
||||
<u-icon name="play-left-fill" color="#F3F5F7" size="20" v-if="item.userType == 1" class="u-icon-left"></u-icon>
|
||||
<div class="voice-div" v-if="item.sdkFileUrl" @click="play(item.sdkFileUrl, index)">
|
||||
<span>8”</span>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-d.gif" alt="" v-if="item.isPlay">
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/play-j.png" alt="" v-else>
|
||||
</div>
|
||||
<p v-if="!item.sdkFileUrl">{{item.content || ''}}</p>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/baiduAI/user-img.png" alt="" class="user-img" v-if="item.userType != 1">
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!messageList.length"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {mapActions, mapState} from "vuex";
|
||||
export default {
|
||||
customNavigation: true,
|
||||
enablePullDownRefresh: true,
|
||||
name: 'Detail',
|
||||
data() {
|
||||
return {
|
||||
backgroundNavbar: {
|
||||
background: 'url(https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/header-bg.jpeg) no-repeat',
|
||||
backgroundSize: 'cover',
|
||||
},
|
||||
searchVal: '',
|
||||
messageList: [
|
||||
// {
|
||||
// userType: 0,
|
||||
// sdkFileUrl: 'http://test87ftp.cunwuyun.cn/20240104/output.mp3',
|
||||
// isPlay: false
|
||||
// }
|
||||
],
|
||||
current: 1,
|
||||
pages: 2,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
},
|
||||
onShow() {
|
||||
this.getHistoryList()
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
if(this.current > this.pages) {
|
||||
return this.$u.toast('没有更多记录')
|
||||
}
|
||||
this.current = this.current + 1
|
||||
this.getHistoryList()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['autoLogin']),
|
||||
getHistoryList() {
|
||||
if(!this.token) {
|
||||
return this.$u.toast("请先进行登录")
|
||||
}
|
||||
this.$loading()
|
||||
this.$instance.post(`/app/appaicopilotinfo/list?current=${this.current}&size=10&content=${this.searchVal}`).then(res => {
|
||||
if(res.code == 0 && res.data.records.length) {
|
||||
res.data.records.map((item) => {
|
||||
if(item.sdkFileUrl) {
|
||||
item.isPlay = false
|
||||
}
|
||||
})
|
||||
this.messageList = this.current == 1 ? res.data.records : [...res.data.records, ...this.messageList]
|
||||
var idPage = res.data.records.length-1
|
||||
this.$nextTick(() => {
|
||||
uni.pageScrollTo({
|
||||
duration: 300,
|
||||
selector: this.current == 1 ? `.item${this.messageList.length-1}` : `.item${idPage}`
|
||||
});
|
||||
})
|
||||
this.pages = res.data.pages
|
||||
this.$hideLoading()
|
||||
}else {
|
||||
if(this.current == 1) {
|
||||
this.messageList = []
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
getSearchList() {
|
||||
this.current = 1
|
||||
this.getHistoryList()
|
||||
},
|
||||
handerClear() {
|
||||
this.searchVal = ''
|
||||
this.getSearchList()
|
||||
},
|
||||
play(src, index) {
|
||||
innerAudioContext.stop();
|
||||
if(this.messageList[index].isPlay) {
|
||||
innerAudioContext.onStop(() => {
|
||||
this.messageList[index].isPlay = false
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.messageList.map((item) => {
|
||||
if(item.sdkFileUrl) {
|
||||
item.isPlay = false
|
||||
}
|
||||
})
|
||||
this.messageList[index].isPlay = true
|
||||
innerAudioContext.src = src;
|
||||
|
||||
this.$nextTick(() => {
|
||||
innerAudioContext.play();
|
||||
})
|
||||
innerAudioContext.onEnded(() => {
|
||||
this.messageList[index].isPlay = false
|
||||
})
|
||||
},
|
||||
playStop(index) {
|
||||
innerAudioContext.stop();
|
||||
innerAudioContext.onStop(() => {
|
||||
this.messageList[index].isPlay = false
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~dvcp-wui/common";
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
.Detail {
|
||||
height: 100vh;
|
||||
background-color: #fff;
|
||||
position: relative;
|
||||
.list-bg {
|
||||
width: 100%;
|
||||
height: 420px;
|
||||
background-image: url("https://cdn.cunwuyun.cn/wechat/biaopin/residentAssistant/content-top-bg.png");
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
background-size: 100vw;
|
||||
background-repeat: no-repeat;
|
||||
.search-content {
|
||||
padding: 32px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
background: linear-gradient(to bottom, #D7EDFE, #EAF5FE);
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
padding: 144px 32px 364px;
|
||||
.send-time {
|
||||
display: block;
|
||||
width: 100%;
|
||||
line-height: 28px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 20px;
|
||||
color: #999;
|
||||
text-align: center;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
.user-img {
|
||||
display: inline-block;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.item {
|
||||
display: inline-block;
|
||||
max-width: 440px;
|
||||
border-radius: 8px;
|
||||
padding: 18px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 28px;
|
||||
position: relative;
|
||||
.voice-div {
|
||||
img {
|
||||
width: 26px;
|
||||
height: 28px;
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
color: #333;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC;
|
||||
line-height: 28px;
|
||||
margin-right: 68px;
|
||||
}
|
||||
}
|
||||
p {
|
||||
word-break: break-all;
|
||||
line-height: 40px;
|
||||
font-family: SourceHanSansCN-Regular;
|
||||
font-size: 32px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
.item-right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
.item {
|
||||
background-color: #CCE2FF;
|
||||
}
|
||||
.user-img {
|
||||
margin-left: 24px;
|
||||
}
|
||||
.u-icon-right {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
right: -12px;
|
||||
}
|
||||
}
|
||||
.item-left {
|
||||
.item {
|
||||
background-color: #F3F5F7;
|
||||
}
|
||||
.user-img {
|
||||
margin-right: 24px;
|
||||
}
|
||||
.u-icon-left {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: -12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/baiduAI/AppRecord2/img/del-img.png
Normal file
|
After Width: | Height: | Size: 679 B |
BIN
src/project/baiduAI/AppRecord2/record.png
Normal file
|
After Width: | Height: | Size: 795 B |
BIN
src/project/baiduAI/AppRecord2/record_selected.png
Normal file
|
After Width: | Height: | Size: 806 B |
@@ -27,7 +27,7 @@
|
||||
<image :src="item.fileUrl ? item.fileUrl : 'https://cdn.cunwuyun.cn/wechat/fd-store/shop-img.png' " alt="" mode="aspectFill">
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="right-btn" @click="toEvaluateForm(item.id)">
|
||||
<div class="right-btn" @click.stop="toEvaluateForm(item.id)">
|
||||
<div>
|
||||
<img src="https://cdn.cunwuyun.cn/wechat/fd-store/store-detail-edit-icon.png" alt="">评价
|
||||
</div>
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="approve">
|
||||
<div class="approve" @click="$linkTo('./userInfo')">
|
||||
<img class="icon" src="https://cdn.cunwuyun.cn/wxmp/mine/approve.png" alt="">
|
||||
<div class="flex">
|
||||
<span class="cert" v-if="isApprove" v-text="approveLabel" @click="$linkTo('/mods/AppAuth/AppAuth')"/>
|
||||
<span class="cert" v-if="isApprove" v-text="approveLabel"></span>
|
||||
<u-icon v-else name="arrow-right" color="#E7F2FF" size="28"
|
||||
:label="approveLabel" label-color="#E7F2FF" label-pos="left" @click="approve"/>
|
||||
:label="approveLabel" label-color="#E7F2FF" label-pos="left" @click="approve"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-wrap">
|
||||
@@ -39,11 +39,17 @@
|
||||
<div class="block">
|
||||
<img class="icon" :src="item.icon" alt="">
|
||||
</div>
|
||||
<span class="desc" v-if="!item.share">{{ item.label }}</span>
|
||||
<span class="desc solid" v-if="!item.share">{{ item.label }}</span>
|
||||
<button open-type="share" v-else>
|
||||
<span>{{ item.label }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <div class="item" hover-class="bg-hover" @click="scan">
|
||||
<div class="block">
|
||||
<img class="icon" src="https://cdn.cunwuyun.cn/wxmp/mine/saoyisao.png" alt="">
|
||||
</div>
|
||||
<span class="desc">扫一扫</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="logout" v-if="token">
|
||||
@@ -59,31 +65,57 @@ export default {
|
||||
name: "AppMine",
|
||||
appName: "我的",
|
||||
customNavigation: true,
|
||||
navigationBarBackgroundColor: '#ffffff',
|
||||
navigationBarTextStyle: 'black',
|
||||
computed: {
|
||||
...mapState(['user', 'token']),
|
||||
|
||||
isApprove: v => v.user?.status == 2,
|
||||
isApprove() {
|
||||
return this.user?.status == 2;
|
||||
},
|
||||
approveLabel() {
|
||||
return this.user?.status == 2 ? "已认证" :
|
||||
this.user?.status == 1 ? "审核中" :
|
||||
this.user?.status == -1 ? "审核驳回" : "前往认证"
|
||||
return this.user?.areaId? "已认证" : "前往认证"
|
||||
},
|
||||
listGroup() {
|
||||
return [
|
||||
// [
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiating.png",
|
||||
// label: "我的家庭",
|
||||
// path: "./myFamily",
|
||||
// type: 'idNumber'
|
||||
// },
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiaxiang.png",
|
||||
// label: "我的家乡",
|
||||
// path: "/mods/AppHometown/AppHometown",
|
||||
// type: 'token'
|
||||
// }
|
||||
// ],
|
||||
[
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejiaxiang.png",
|
||||
// label: "我的家乡",
|
||||
// path: "/mods/AppHometown/AppHometown",
|
||||
// type: 'token'
|
||||
// },
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-wdjt.png",
|
||||
// label: "我的家庭",
|
||||
// path: "./myFamily",
|
||||
// type: 'token'
|
||||
// },
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-wdjf.png",
|
||||
label: "我的积分",
|
||||
path: "./myIntegral",
|
||||
type: 'token'
|
||||
},
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-wdewm.png",
|
||||
// label: "我的二维码",
|
||||
// path: "./myHarvestQR",
|
||||
// type: 'token'
|
||||
// },
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-sys.png",
|
||||
// label: "扫一扫",
|
||||
// path: "./myHarvestQR",
|
||||
// type: 'scan'
|
||||
// },
|
||||
{
|
||||
icon: "https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-icon-fxxcx.png",
|
||||
label: "分享小程序",
|
||||
path: "./myHarvestQR",
|
||||
type: 'share',
|
||||
share: true
|
||||
},
|
||||
],
|
||||
// [
|
||||
// {
|
||||
// icon: "https://cdn.cunwuyun.cn/wxmp/mine/wodejifen.png",
|
||||
@@ -114,8 +146,7 @@ export default {
|
||||
this.$refs.login.show();
|
||||
} else if (!this.isApprove) {
|
||||
if (this.user.status == 0) {
|
||||
// this.$linkTo('/mods/AppAuth/AppAuth');
|
||||
this.$linkTo('./userInfo')
|
||||
this.$linkTo('/mods/AppAuth/AppAuth');
|
||||
} else {
|
||||
this.$linkTo('/mods/AppAuth/authSuccess')
|
||||
}
|
||||
@@ -129,16 +160,24 @@ export default {
|
||||
}
|
||||
if (type == 'idNumber') {
|
||||
if (this.user.status == 0) {
|
||||
// if (!this.user.phone) {
|
||||
// this.$linkTo('/pages/phone/bingPhoneNumber?from=auth')
|
||||
// } else {
|
||||
// this.$linkTo('/mods/AppAuth/AppAuth')
|
||||
// }
|
||||
this.$linkTo('./userInfo')
|
||||
if (!this.user.phone) {
|
||||
this.$linkTo('/pages/phone/bingPhoneNumber?from=auth')
|
||||
} else {
|
||||
this.$linkTo('/mods/AppAuth/AppAuth')
|
||||
}
|
||||
} else {
|
||||
this.$linkTo(url)
|
||||
}
|
||||
}
|
||||
if (type == 'scan') {
|
||||
this.scan()
|
||||
}
|
||||
if (type == 'share') {
|
||||
|
||||
}
|
||||
if (type == 'null') {
|
||||
this.$u.toast('内容建设中...')
|
||||
}
|
||||
} else {
|
||||
this.$refs.login.show()
|
||||
}
|
||||
@@ -153,7 +192,7 @@ export default {
|
||||
},
|
||||
getAuth() {
|
||||
this.$nextTick(() => {
|
||||
this.token && this.getUserInfo()
|
||||
this.token && this.getUserInfo('qujing')
|
||||
})
|
||||
},
|
||||
onLogout() {
|
||||
@@ -171,13 +210,24 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
scan() {
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
var info = JSON.parse(res.result)
|
||||
uni.navigateTo({url: `./addFamily?avatarUrl=${info.avatarUrl || ''}&nickName=${info.nickName}&openId=${info.openId}`})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
onLoad() {
|
||||
this.getAuth();
|
||||
uni.$on('auth',()=> {
|
||||
this.getAuth();
|
||||
})
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: '欢迎使用数字巫溪治理服务一体化平台~',
|
||||
title: '欢迎使用数字乡村治理服务一体化平台~',
|
||||
path: `/pages/AppModules/AppModules`
|
||||
}
|
||||
},
|
||||
@@ -200,8 +250,8 @@ export default {
|
||||
.header-info {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url("https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-my-nav-bg.png") no-repeat no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background: url('https://cdn.cunwuyun.cn/wechat/biaopin/mine/mine-top-bg.png') no-repeat;
|
||||
background: 100% auto;
|
||||
box-sizing: border-box;
|
||||
padding: 240px 0 0 48px;
|
||||
|
||||
@@ -273,7 +323,7 @@ export default {
|
||||
.approve {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 384px;
|
||||
top: 400px;
|
||||
transform: translateX(-50%);
|
||||
width: 686px;
|
||||
height: 112px;
|
||||
@@ -316,7 +366,7 @@ export default {
|
||||
|
||||
&:last-child {
|
||||
.desc {
|
||||
border-bottom: none !important;
|
||||
// border-bottom: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,7 +392,7 @@ export default {
|
||||
color: #666666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
box-sizing: border-box;
|
||||
|
||||
& > span {
|
||||
width: 100%;
|
||||
@@ -356,6 +406,11 @@ export default {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.solid {
|
||||
border-bottom: 1px solid #EEE;
|
||||
}
|
||||
|
||||
|
||||
.no-border {
|
||||
border-bottom: none;
|
||||
@@ -367,7 +422,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logout {
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
@@ -380,7 +434,7 @@ export default {
|
||||
border-radius: 16px;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
color: #2D7DFF;
|
||||
color: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
85
src/project/wuxi/AppMine/addFamily.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<img :src="familyInfo.avatarUrl" alt="" v-if="familyInfo.avatarUrl">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<p class="user-name">{{familyInfo.nickName}}</p>
|
||||
<div class="btn" @click="add">加为家人</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
appName: "加家人",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
familyInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.familyInfo = {...options}
|
||||
},
|
||||
methods: {
|
||||
add() {
|
||||
this.$instance.post(`/app/appwechatuserrelation/addRelation?openId=${this.familyInfo.openId}`).then(res=> {
|
||||
if(res.code == 0) {
|
||||
this.$u.toast('添加成功')
|
||||
setTimeout(() => uni.navigateBack({}), 1500)
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$u.toast(err)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
padding: 32px 32px 96px 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f6f9;
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
img {
|
||||
width: 176px;
|
||||
height: 176px;
|
||||
border-radius: 88px;
|
||||
margin: 160px auto 24px auto;
|
||||
}
|
||||
.user-name {
|
||||
margin-bottom: 100px;
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 36px;
|
||||
color: #333;
|
||||
}
|
||||
.btn {
|
||||
width: 400px;
|
||||
height: 80px;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
background: #4181FF;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 993 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -1,31 +1,31 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="credit-points">
|
||||
<div class="bg-blue"></div>
|
||||
<div class="header-content">
|
||||
<div class="title">家庭地址</div>
|
||||
<div class="address">
|
||||
<img src="https://cdn.cunwuyun.cn/img/location-blue.svg" alt="">
|
||||
<p>{{ info.resident.currentAreaName || '' }}{{ info.resident.currentAddress || '' }}</p>
|
||||
<div class="user-list" v-if="list.length">
|
||||
<div class="item">
|
||||
<div class="item-left">
|
||||
<img :src="user.avatarUrl" alt="">
|
||||
<div class="user-info">
|
||||
<h3>{{user.nickName}}</h3>
|
||||
<p>{{user.girdName || ''}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="title">家庭成员</div>
|
||||
<div class="item" v-for="(item, index) in info.family" :key="index">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/1.png" alt="" class="banner-top" v-if="item.sex == 1">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/2.png" alt="" class="banner-top" v-else>
|
||||
<div class="user-img">
|
||||
<img v-if="item.photo" :src="item.photo" alt=""/>
|
||||
<img v-else src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt=""/>
|
||||
</div>
|
||||
<div class="item" v-for="(item, index) in list" :key="index" v-if="user.openId != item.openId">
|
||||
<div class="item-left">
|
||||
<img :src="item.avatarUrl" alt="" v-if="item.avatarUrl">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<div class="user-info">
|
||||
<p>{{ item.name }}</p>
|
||||
<div v-if="item.householdName == 1" class="color-5AAD6A">户主</div>
|
||||
<div v-else>{{ $dict.getLabel('householdRelation', item.householdRelation) }}</div>
|
||||
<h3>{{item.nickName}}</h3>
|
||||
<p>{{item.girdName || ''}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-right">
|
||||
<div @click="toTransfer(item)">转积分</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else/>
|
||||
<p class="bottom-text">如果绑定错误,请联系网格员解绑!</p>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -38,25 +38,25 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {}
|
||||
list: [],
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$dict.load('householdRelation').then(() => {
|
||||
this.$nextTick(() => {
|
||||
this.getUser()
|
||||
})
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
getUser() {
|
||||
this.$instance.post(`/app/appresident/detailForWx?id=${this.user.residentId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
getList() {
|
||||
this.$instance.post(`/app/appwechatuserrelation/list`).then(res => {
|
||||
if (res.code === 0 && res.data) {
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
toTransfer(row) {
|
||||
uni.navigateTo({url: `./transferIntrgral?openId=${row.openId}&nickName=${row.nickName}&avatarUrl=${row.avatarUrl || ''}`})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@@ -64,117 +64,70 @@ export default {
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background-color: #f3f6f9;
|
||||
|
||||
.credit-points {
|
||||
.bg-blue {
|
||||
width: 100%;
|
||||
height: 112px;
|
||||
background-color: #197DF0;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: -80px 0 32px 30px;
|
||||
padding: 0 30px 80px;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
|
||||
|
||||
.address {
|
||||
font-size: 32px;
|
||||
color: #666;
|
||||
overflow: hidden;
|
||||
|
||||
.user-list {
|
||||
padding: 32px 32px 0;
|
||||
height: calc(100% - 180px);
|
||||
overflow-y: scroll;
|
||||
.item {
|
||||
padding: 26px;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
margin-bottom: 24px;
|
||||
.item-left {
|
||||
width: calc(100% - 150px);
|
||||
display: flex;
|
||||
img {
|
||||
width: 34px;
|
||||
height: 38px;
|
||||
margin-right: 14px;
|
||||
vertical-align: middle;
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
border-radius: 54px;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 44px;
|
||||
width: 580px;
|
||||
word-break: break-all;
|
||||
float: right;
|
||||
.user-info {
|
||||
margin-left: 20px;
|
||||
h3 {
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 32px;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 120px;
|
||||
}
|
||||
|
||||
.list-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
padding: 0 30px 110px;
|
||||
box-sizing: border-box;
|
||||
margin-left: 30px;
|
||||
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
|
||||
|
||||
.item {
|
||||
width: 630px;
|
||||
height: 192px;
|
||||
background: #FFF;
|
||||
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.08);
|
||||
border-radius: 16px;
|
||||
padding-left: 30px;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 32px;
|
||||
overflow: hidden;
|
||||
|
||||
.banner-top {
|
||||
width: 100%;
|
||||
height: 72px;
|
||||
}
|
||||
|
||||
.user-img {
|
||||
width: 104px;
|
||||
height: 104px;
|
||||
margin: -16px 34px 0 0;
|
||||
border-radius: 50%;
|
||||
float: left;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.user-info {
|
||||
margin-top: -16px;
|
||||
width: calc(100% - 138px);
|
||||
float: right;
|
||||
|
||||
p {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
div {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.color-5AAD6A {
|
||||
color: #5AAD6A;
|
||||
}
|
||||
.item-right {
|
||||
width: 150px;
|
||||
div {
|
||||
width: 126px;
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
background: #2D7DFF;
|
||||
border-radius: 30px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #FFF;
|
||||
margin-top: 26px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom-text {
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
position: fixed;
|
||||
bottom: 92px;
|
||||
left: 180px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
125
src/project/wuxi/AppMine/myHarvestQR.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="AppHarvestQR">
|
||||
<div class="card">
|
||||
<div class="myself">
|
||||
<img class="avatar" :src="user.avatarUrl" alt="" v-if="user.avatarUrl">
|
||||
<img class="avatar" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<div class="info">
|
||||
<div class="name">{{ user.nickName }}</div>
|
||||
<div class="area">{{ user.areaName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qr">
|
||||
<img :src="user.qrCode" alt="">
|
||||
</div>
|
||||
|
||||
<div class="my-qr">我的丰收码</div>
|
||||
|
||||
<div class="pic">
|
||||
<img src="https://cdn.cunwuyun.cn/fengdu/img-zhuangshi.png" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: "AppHarvestQR",
|
||||
data() {
|
||||
return {
|
||||
qrCode: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getQrCode() {
|
||||
this.$instance.post('/app/appwechatuserqujing/queryMyQrCode').then(res=> {
|
||||
if(res?.data) {
|
||||
this.qrCode = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
onLoad() {
|
||||
// this.getQrCode()
|
||||
uni.setNavigationBarTitle({
|
||||
title: '我的丰收码'
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppHarvestQR {
|
||||
padding: 32px;
|
||||
box-sizing: border-box;
|
||||
.card {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
border-radius: 16px;
|
||||
background: #FFF;
|
||||
|
||||
.myself {
|
||||
padding: 72px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.avatar {
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.info {
|
||||
width: calc(100% - 128px);
|
||||
height: 100%;
|
||||
.name {
|
||||
color: #333333;
|
||||
font-size: 34px;
|
||||
font-weight: 500;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.area {
|
||||
color: #999999;
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.qr {
|
||||
margin: 10% auto 24px;
|
||||
width: 542px;
|
||||
height: 542px;
|
||||
border-radius: 32px;
|
||||
border: 8px solid #f6f5f8;
|
||||
padding: 36px;
|
||||
box-sizing: border-box;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.my-qr {
|
||||
color: #999999;
|
||||
font-size: 32px;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
.pic {
|
||||
margin-top: 10%;
|
||||
width: 100%;
|
||||
height: 234px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 234px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
224
src/project/wuxi/AppMine/myIntegral.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<div class="myIntegral">
|
||||
<div class="header-content">
|
||||
<div class="top">
|
||||
<div class="total">
|
||||
<h1>{{info.integral || '0'}}</h1>
|
||||
<p>积分余额</p>
|
||||
</div>
|
||||
<div class="total right-total">
|
||||
<h1>{{info.houseIntegral || '0'}}</h1>
|
||||
<p>家庭积分</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<div class="item">
|
||||
<div class="num">{{ info.serialNo || '0'}}</div>
|
||||
<div class="label">积分排行</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="num">{{ info.totalIntegral|| '0'}}</div>
|
||||
<div class="label">历史累计获取</div>
|
||||
</div>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="">
|
||||
</div>
|
||||
<div class="detail-content" v-if="list && list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-info">
|
||||
<p>{{ item.integralRuleName || ''}}
|
||||
<span v-if="item.integralRuleName && item.eventDesc">:</span>
|
||||
{{ item.eventDesc || '' }}</p>
|
||||
<span> {{ item.doTime }}</span>
|
||||
</div>
|
||||
<div class="item-num" :class="'color-'+ item.integralCalcType">
|
||||
{{ (item.integralCalcType == 1 ? '+' : '-') + item.changeIntegral }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: "myIntegral",
|
||||
appName: "我的积分",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
current: 1,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getToatl()
|
||||
},
|
||||
methods: {
|
||||
getToatl() {
|
||||
this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => {
|
||||
if (res?.data) {
|
||||
this.info = res.data
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegraldetail/list?integralUserId=${this.info.id}¤t=${this.current}&size=10`).then(res => {
|
||||
if (res?.data) {
|
||||
if (this.current > res.data.pages) {
|
||||
return
|
||||
}
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.myIntegral {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
height: calc(100% - 136px);
|
||||
background-color: #f3f6f9;
|
||||
padding-bottom: 30px;
|
||||
|
||||
.header-content {
|
||||
width: 690px;
|
||||
height: 358px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 70px 0 40px 30px;
|
||||
position: relative;
|
||||
.top {
|
||||
width: 100%;
|
||||
height: 213px;
|
||||
z-index: 99;
|
||||
position: relative;
|
||||
.total {
|
||||
width: 50%;
|
||||
padding-top: 48px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
h1 {
|
||||
font-size: 68px;
|
||||
color: #5AAD6A;
|
||||
}
|
||||
p {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
.right-total {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
h1 {
|
||||
color: #4083E9;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
width: 100%;
|
||||
height: 145px;
|
||||
padding: 16px 0;
|
||||
box-sizing: border-box;
|
||||
border-top: 2px solid #EEEEEE;
|
||||
.item {
|
||||
text-align: center;
|
||||
z-index: 99;
|
||||
|
||||
.num {
|
||||
font-family: DIN;
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
width: 360px;
|
||||
height: 250px;
|
||||
top: -40px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
width: 690px;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin: 0 0 0 32px;
|
||||
padding: 16px 30px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.item {
|
||||
padding: 34px 0 32px 0;
|
||||
border-bottom: 2px solid #ddd;
|
||||
display: flex;
|
||||
|
||||
.item-info {
|
||||
width: 500px;
|
||||
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8px;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-num {
|
||||
width: calc(100% - 500px);
|
||||
text-align: right;
|
||||
font-size: 36px;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
.item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
.color-1 {
|
||||
color: #2C51CE !important;
|
||||
}
|
||||
|
||||
.color-0 {
|
||||
color: #E6736E !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
131
src/project/wuxi/AppMine/transferIntrgral.vue
Normal file
@@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="content">
|
||||
<p class="text">积分收入方</p>
|
||||
<img :src="userInfo.avatarUrl" alt="" v-if="userInfo.avatarUrl">
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" v-else>
|
||||
<p class="user-name">{{userInfo.nickName}}</p>
|
||||
<u-input v-model="num" type="number" placeholder="请输入积分数量" :maxlength="11" :border="true" input-align="center" border-color="#ddd" height="76" class="input-num" />
|
||||
<p class="num-text">剩余积分余额:{{total}}</p>
|
||||
<div class="btn" @click="confirm">确认转出</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
appName: "我的家庭",
|
||||
computed: {
|
||||
...mapState(['user', 'token'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
num: '',
|
||||
total: '',
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.userInfo = {...options}
|
||||
this.getIntegral()
|
||||
},
|
||||
methods: {
|
||||
getIntegral() {
|
||||
this.$instance.post(`/app/appintegraluser/girdDetail?id=${this.user.openId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.total = res.data.integral || 0
|
||||
}
|
||||
})
|
||||
},
|
||||
confirm() {
|
||||
if (!/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/g.test(this.num)) {
|
||||
this.num = ''
|
||||
return this.$message.error('积分数量最多只保留两位小数点')
|
||||
}
|
||||
if (this.num > this.total) {
|
||||
return this.$u.toast('转出积分不能大于剩余积分')
|
||||
}
|
||||
this.$instance.post(`/app/appintegraluser/transferIntegral`,{
|
||||
fromId: this.user.openId,
|
||||
ids: [this.userInfo.openId],
|
||||
integral: this.num,
|
||||
integralUserType: '3',
|
||||
integralCalcType: '1'
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('积分转出成功!')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import "~dvcp-wui/common";
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
padding: 32px 32px 96px 32px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f6f9;
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
.text {
|
||||
padding-top: 96px;
|
||||
line-height: 40px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 28px;
|
||||
color: #999;
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
img {
|
||||
width: 176px;
|
||||
height: 176px;
|
||||
border-radius: 88px;
|
||||
margin: 0 auto 24px auto;
|
||||
}
|
||||
.user-name {
|
||||
margin-bottom: 100px;
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 36px;
|
||||
color: #333;
|
||||
}
|
||||
.input-num {
|
||||
width: calc(100% - 144px);
|
||||
margin: 0 0 16px 72px;
|
||||
}
|
||||
.num-text {
|
||||
color: #222;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
margin-bottom: 82px;
|
||||
}
|
||||
.btn {
|
||||
width: 400px;
|
||||
height: 80px;
|
||||
text-align: center;
|
||||
line-height: 80px;
|
||||
background: #4181FF;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,11 +4,14 @@
|
||||
<div class="item-content mar-b8">
|
||||
<div class="item solid">
|
||||
<p class="mar-t22">头像</p>
|
||||
<button class="user-img-div" v-if="editAvatarUrl" open-type="chooseAvatar" @chooseavatar="handleWeixinSync">
|
||||
<!-- <button class="user-img-div" v-if="editAvatarUrl" open-type="chooseAvatar" @chooseavatar="handleWeixinSync">
|
||||
<img v-if="user.avatarUrl && !avatar" :src="user.avatarUrl" class="user-img">
|
||||
<img v-if="avatar" :src="avatar" alt="" class="user-img">
|
||||
<img v-if="!user.avatarUrl && !avatar" src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" class="user-img">
|
||||
</button>
|
||||
</button> -->
|
||||
<div class="user-img-div" v-if="editAvatarUrl">
|
||||
<AiUploader v-model="avatarUrlList" multiple placeholder="上传头像" :limit="1"></AiUploader>
|
||||
</div>
|
||||
<div class="user-img-div" v-else>
|
||||
<img v-if="user.avatarUrl && !avatar" :src="user.avatarUrl" class="user-img">
|
||||
<img v-else src="https://cdn.cunwuyun.cn/dvcp/myFamily/tx.png" alt="" class="user-img">
|
||||
@@ -33,8 +36,8 @@
|
||||
</div>
|
||||
|
||||
<div class="item-content mar-b8">
|
||||
<div class="item solid">
|
||||
<p>姓名</p>
|
||||
<!-- <div class="item solid">
|
||||
<p>真实姓名</p>
|
||||
<div class="item-right" v-if="!editRealName">
|
||||
<p class="name">{{ user.realName || '' }}</p>
|
||||
</div>
|
||||
@@ -46,19 +49,15 @@
|
||||
<p class="name">{{ user.idNumber || '' }}</p>
|
||||
</div>
|
||||
<input class="item-right" v-else type="idNumber" v-model="userIdNumber" maxlength="18" @input="idNumberInput">
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="item">
|
||||
<p>地区</p>
|
||||
<div class="item-right" v-if="!editArea">
|
||||
<p class="name">{{ user.areaName || '' }}</p>
|
||||
<p>所属网格</p>
|
||||
<div class="item-right" v-if="!editGird">
|
||||
<p class="name">{{ user.girdName || '' }}</p>
|
||||
</div>
|
||||
<AiAreaPicker class="item-right" :areaId="$areaId" v-model="userAreaId" :fullName.sync="userAreaName" v-else>
|
||||
<div class="ai-area__wrapper">
|
||||
<span class="label" v-if="userAreaName">{{ userAreaName }}</span>
|
||||
<i v-else>请选择</i>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</div>
|
||||
</AiAreaPicker>
|
||||
<AiPagePicker type="gird" class="item-right" v-model="userGirdId" :params="{formType:2}" @select="handleSelectGrid" nodeKey="id" v-else>
|
||||
<AiMore v-model="userGirdName" />
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -91,17 +90,18 @@ export default {
|
||||
editPhone: false,
|
||||
editRealName: false,
|
||||
editIdNumber: false,
|
||||
editArea: false,
|
||||
editGird: false,
|
||||
avatar: '',
|
||||
userName: '',
|
||||
userPhone: '',
|
||||
userRealName: '',
|
||||
userIdNumber: '',
|
||||
userAreaId: '',
|
||||
userAreaName: '',
|
||||
userGirdId: '',
|
||||
userGirdName: '',
|
||||
btnText: false,
|
||||
isFromTabbar: '',
|
||||
path: '',
|
||||
avatarUrlList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -118,46 +118,53 @@ export default {
|
||||
this.userRealName = this.user.realName
|
||||
this.editIdNumber = true;
|
||||
this.userIdNumber = this.user.idNumber
|
||||
this.editArea = true
|
||||
this.userAreaId = this.user.areaId
|
||||
this.userAreaName = this.user.areaName
|
||||
this.editGird = true
|
||||
this.userGirdId = this.user.girdId
|
||||
this.userGirdName = this.user.girdName
|
||||
this.avatarUrlList = [{'url': this.user.avatarUrl}]
|
||||
},
|
||||
submit() {
|
||||
if(this.flag) return
|
||||
// if(!this.avatar) {
|
||||
// return this.$u.toast('请上传头像')
|
||||
// }
|
||||
// if (!this.userName) {
|
||||
// return this.$u.toast('请输入用户昵称')
|
||||
// }
|
||||
// if (this.userName == '微信用户') {
|
||||
// return this.$u.toast('请修改用户昵称')
|
||||
// }
|
||||
// if (!this.userPhone) {
|
||||
// return this.$u.toast('请输入手机号')
|
||||
// }
|
||||
if (!this.userRealName) {
|
||||
return this.$u.toast('请输入姓名')
|
||||
if(!this.avatarUrlList.length) {
|
||||
return this.$u.toast('请上传头像')
|
||||
}
|
||||
if (!this.userIdNumber) {
|
||||
return this.$u.toast('请输入身份证号')
|
||||
if (!this.userName) {
|
||||
return this.$u.toast('请输入用户昵称')
|
||||
}
|
||||
if (!this.$idCardNoUtil.checkIdCardNo(this.userIdNumber)) {
|
||||
return this.$u.toast('请输入正确的身份证号码')
|
||||
if (this.userName == '微信用户') {
|
||||
return this.$u.toast('请修改用户昵称')
|
||||
}
|
||||
if (!this.userAreaId) {
|
||||
return this.$u.toast('请选择地区')
|
||||
if (!this.userPhone) {
|
||||
return this.$u.toast('请输入手机号')
|
||||
}
|
||||
|
||||
// if (!this.userRealName) {
|
||||
// return this.$u.toast('请输入真实姓名')
|
||||
// }
|
||||
// if (!this.userIdNumber) {
|
||||
// return this.$u.toast('请输入身份证号')
|
||||
// }
|
||||
// if (!this.$idCardNoUtil.checkIdCardNo(this.userIdNumber)) {
|
||||
// return this.$u.toast('请输入正确的身份证号码')
|
||||
// }
|
||||
if (!this.userGirdId) {
|
||||
return this.$u.toast('请选择所属网格')
|
||||
}
|
||||
// if (!this.userAreaId) {
|
||||
// return this.$u.toast('请选择所属地区')
|
||||
// }
|
||||
// if (!/[^0]0{0,2}$/.test(this.userAreaId)) {
|
||||
// return this.$u.toast('所属地区必须选到村级')
|
||||
// }
|
||||
this.flag = true
|
||||
this.$instance.post(`/app/appwechatuserqujing/idNumberEdit`, {
|
||||
avatarUrl: this.avatar,
|
||||
this.$instance.post(`/app/appwechatuserqujing/idNumberAttestation`, {
|
||||
// avatarUrl: this.avatar,
|
||||
avatarUrl: this.avatarUrlList[0].url,
|
||||
nickName: this.userName,
|
||||
phone: this.userPhone,
|
||||
name: this.userRealName,
|
||||
name: this.userName,
|
||||
idNumber: this.userIdNumber,
|
||||
areaId: this.userAreaId,
|
||||
areaName: this.userAreaName
|
||||
girdId: this.userGirdId,
|
||||
girdName: this.userGirdName
|
||||
}).then(res=> {
|
||||
if(res?.code==0) {
|
||||
this.$u.toast('提交成功')
|
||||
@@ -201,20 +208,20 @@ export default {
|
||||
this.upLoad(avatarUrl)
|
||||
}
|
||||
},
|
||||
handleSelectArea(v) {
|
||||
this.userAreaName = v.areaName
|
||||
this.userAreaId = v.id
|
||||
handleSelectGrid(v) {
|
||||
this.userGirdName = v.girdName
|
||||
this.userGirdId = v.id
|
||||
},
|
||||
idNumberInput() {
|
||||
if(this.userIdNumber.length == 18 && this.userRealName) {
|
||||
if(!this.userAreaId) {
|
||||
if(!this.userGirdId) {
|
||||
this.$instance.post(`/app/appresidentapplet/queryDetailByIdNumberAndName`,{
|
||||
name: this.userRealName,
|
||||
idNumber: this.userIdNumber
|
||||
}).then(res=> {
|
||||
if(res.data && res.data.id) {
|
||||
this.userAreaId = res.data.id
|
||||
this.userAreaName = res.data.areaName
|
||||
this.userGirdId = res.data.id
|
||||
this.userGirdName = res.data.girdName
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -377,5 +384,15 @@ export default {
|
||||
.btn-edit {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
::v-deep.ai-uploader {
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
.imgList {
|
||||
width: 228px;
|
||||
height: 200px;
|
||||
display: inline-block!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
377
src/project/wuxi/AppRedemptionPoints/AppRedemptionPoints.vue
Normal file
@@ -0,0 +1,377 @@
|
||||
<template>
|
||||
<div class="AppRedemptionPoints">
|
||||
<div class="fixed-top">
|
||||
<div class="header">
|
||||
<div class="num">
|
||||
<p>积分余额</p>
|
||||
<h3>{{total}}</h3>
|
||||
</div>
|
||||
<div class="btn" @click="toMyOrder">我的订单</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="76" font-size="28" bg-color="#fff" inactive-color="#8891A1"
|
||||
active-color="#1D2229 " :bar-style="barStyle" @change="changeTab" ></u-tabs>
|
||||
<div class="type-select">
|
||||
<div :class="currentType == index ? 'item active' : 'item'" v-for="(item, index) in typeList" :key="index" @click="typeClick(index)">
|
||||
{{item}}
|
||||
<span v-if="index == 1" class="down-icon">⏷</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="point-select" v-if="currentType == 1">
|
||||
<u-tabs :list="pointTypeList" :is-scroll="true" :current="currentPoint" height="80" font-size="24" bg-color="#fff" inactive-color="#666666"
|
||||
active-color="#4181FF" bar-width="0" :bold="false" @change="pointClick" ></u-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="left-list" v-if="leftList.length">
|
||||
<div class="list-info" v-for="(item, index) in leftList" :key="index">
|
||||
<div class="item" @click="toProductDetail(item)">
|
||||
<img :src="item.picUrl" alt="">
|
||||
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGTypeText', item.typeText) }}</div>
|
||||
<div class="content">
|
||||
<p class="text">{{item.title}}</p>
|
||||
<div class="item-money">
|
||||
<h3>{{item.integralPrice}}积分</h3>
|
||||
<p v-if="item.type == 1">+¥{{item.payMoney}}</p>
|
||||
<span v-if="item.type == 1">兑换后再付</span>
|
||||
</div>
|
||||
<div v-if="item.shopStatus == 1">
|
||||
<div class="btn" :class="total >= item.integralPrice ? 'btn1' : 'btn0'" @click.stop="toOrder(item)" v-if="item.stock > 0">{{total >= item.integralPrice ? '去兑换' : '积分不足'}}</div>
|
||||
<div class="btn btn0" v-else>商品缺货</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="btn btn0">店铺停用</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-list" v-if="rightList.length">
|
||||
<div class="list-info" v-for="(item, index) in rightList" :key="index">
|
||||
<div class="item" @click="toProductDetail(item)">
|
||||
<img :src="item.picUrl" alt="">
|
||||
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGTypeText', item.typeText) }}</div>
|
||||
<div class="content">
|
||||
<p class="text">{{item.title}}</p>
|
||||
<div class="item-money">
|
||||
<h3>{{item.integralPrice}}积分</h3>
|
||||
<p v-if="item.type == 1">+¥{{item.payMoney}}</p>
|
||||
<span v-if="item.type == 1">兑换后再付</span>
|
||||
</div>
|
||||
<div v-if="item.shopStatus == 1">
|
||||
<div class="btn" :class="total >= item.integralPrice ? 'btn1' : 'btn0'" @click.stop="toOrder(item)" v-if="item.stock > 0">{{total >= item.integralPrice ? '去兑换' : '积分不足'}}</div>
|
||||
<div class="btn btn0" v-else>商品缺货</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="btn btn0">店铺停用</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!goodsList.length"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'AppRedemptionPoints',
|
||||
appName: '积分兑换',
|
||||
data() {
|
||||
return {
|
||||
tabList: [{name: '全部'}, {name: '积分兑换'}, {name: '低价商品'}],
|
||||
currentTabs: 0,
|
||||
barStyle: {
|
||||
'width': '20px',
|
||||
'height': '3px',
|
||||
'border-radius': '2px',
|
||||
'bottom': '-3px',
|
||||
'background': '#2D7DFF'
|
||||
},
|
||||
typeList: ['最新上架', '积分', '我可兑换的'],
|
||||
currentType: 0,
|
||||
pointTypeList: [{name: '全部'}, {name: '50分以下'}, {name: '100分以下'}, {name: '200分以下'}, {name: '5000分以下'}],
|
||||
currentPoint: 0,
|
||||
goodsList: [],
|
||||
leftList: [],
|
||||
rightList: [],
|
||||
total: 0,
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.getTotal()
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
uni.$on('updateGoodsList', () => {
|
||||
this.getListInit()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
this.getTotal()
|
||||
},
|
||||
methods: {
|
||||
getTotal() {
|
||||
this.$instance.post(`/app/appintegraluser/integralUserInfoFD`).then(res => {
|
||||
if (res?.data) {
|
||||
this.total = res.data.integral || 0
|
||||
}
|
||||
})
|
||||
},
|
||||
getListInit() {
|
||||
this.goodsList = []
|
||||
this.leftList = []
|
||||
this.rightList = []
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/goodsListXCX`, null, {
|
||||
params: {
|
||||
goodsType: this.currentTabs, //商品类型,0:全部、1:积分兑换、2:京东低价商品,默认0
|
||||
orderType: this.currentType == 0 ? 1 : 0, //排序类型,0:积分升序、1:上架时间倒序,默认0
|
||||
filterIntegral: this.currentType == 2 ? true : false, //过滤我可兑换的,默认false
|
||||
integralRange: this.currentType == 1 ? this.currentPoint : '', //积分区间类型,0:全部、1:50分以下、2:100分以下、3:200分以下、4:5000分以下默认0
|
||||
current: this.current
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsList = this.current == 1 ? res.data.records : [...this.goodsList, ...res.data.records]
|
||||
res.data.records.map((item, index) => {
|
||||
item.typeText = item.type == 0 ? 0 : 1
|
||||
if(index%2 ==0) {
|
||||
this.leftList.push(item)
|
||||
}else {
|
||||
this.rightList.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeTab(index) {
|
||||
this.currentTabs = index
|
||||
this.getListInit()
|
||||
},
|
||||
typeClick(index) {
|
||||
this.currentType = index
|
||||
this.getListInit()
|
||||
},
|
||||
pointClick(index) {
|
||||
this.currentPoint = index
|
||||
this.getListInit()
|
||||
},
|
||||
toProductDetail(item) {
|
||||
uni.navigateTo({url: `./productDetails?shopGoodsId=${item.shopGoodsId}&total=${this.total}`})
|
||||
},
|
||||
toMyOrder() {
|
||||
uni.navigateTo({url: './myOrderList'})
|
||||
},
|
||||
toOrder(item) {
|
||||
if(this.total >= item.integralPrice && item.stock > 0) {
|
||||
uni.navigateTo({url: `./placeOrder?shopGoodsId=${item.shopGoodsId}&total=${this.total}&backLevel=3`})
|
||||
}
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.AppRedemptionPoints {
|
||||
.fixed-top {
|
||||
background-color: #f3f6f9;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 32px 24px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
.num {
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 66px;
|
||||
color: #FF6900;
|
||||
line-height: 92px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 168px;
|
||||
height: 64px;
|
||||
border: 1px solid #4181FF;
|
||||
line-height: 62px;
|
||||
border-radius: 44px;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 26px;
|
||||
color: #4181FF;
|
||||
margin-top: 28px;
|
||||
}
|
||||
}
|
||||
.search {
|
||||
background-color: #fff;
|
||||
.type-select {
|
||||
display: flex;
|
||||
border-top: 1px solid #D8D8D8;
|
||||
line-height: 84px;
|
||||
.item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #8891A1;
|
||||
.down-icon {
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
.active {
|
||||
color: #4181FF;
|
||||
.down-icon {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
padding: 396px 0 24px 24px;
|
||||
background-color: #f3f6f9;
|
||||
overflow: hidden;
|
||||
.left-list,
|
||||
.right-list {
|
||||
width: 50%;
|
||||
float: left;
|
||||
}
|
||||
.list-info {
|
||||
width: 100%;
|
||||
}
|
||||
.item {
|
||||
width: calc(100% - 24px);
|
||||
background-color: #fff;
|
||||
border-radius: 20px;
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 340px;
|
||||
border-top-left-radius: 20px;
|
||||
border-top-right-radius: 20px;
|
||||
}
|
||||
.type {
|
||||
padding: 8px 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 20px;
|
||||
line-height: 28px;
|
||||
color: #FFF;
|
||||
border-top-right-radius: 20px;
|
||||
border-bottom-left-radius: 20px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.content {
|
||||
padding: 16px 16px 24px;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
.text {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 26px;
|
||||
color: #222;
|
||||
line-height: 38px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.item-money {
|
||||
width: calc(100% - 160px);
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #FF6900;
|
||||
line-height: 48px;
|
||||
}
|
||||
p {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
font-size: 26px;
|
||||
color: #4181FF;
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 20px;
|
||||
color: #4181FF;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
padding: 14px 32px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 22px;
|
||||
line-height: 28px;
|
||||
border-radius: 44px;
|
||||
position: absolute;
|
||||
bottom: 24px;
|
||||
right: 16px;
|
||||
}
|
||||
.btn1 {
|
||||
background-color: #2D7DFF;
|
||||
color: #FFF;
|
||||
}
|
||||
.btn0 {
|
||||
background-color: #E2E2E2;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item:nth-of-type(2n-1) {
|
||||
margin-right: 22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/project/wuxi/AppRedemptionPoints/img/success.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
20
src/project/wuxi/AppRedemptionPoints/jdH5.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="jdH5">
|
||||
<web-view :src="goodsJdUrl"></web-view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'jdH5',
|
||||
data() {
|
||||
return {
|
||||
goodsJdUrl: ''
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.goodsJdUrl = option.goodsJdUrl
|
||||
},
|
||||
}
|
||||
</script>
|
||||
315
src/project/wuxi/AppRedemptionPoints/myOrderList.vue
Normal file
@@ -0,0 +1,315 @@
|
||||
<template>
|
||||
<div class="myOrderList">
|
||||
<div class="fixed-top">
|
||||
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="90" font-size="28" bg-color="#fff" inactive-color="#8891A1"
|
||||
active-color="#1D2229 " :bar-style="barStyle" @change="changeTab" ></u-tabs>
|
||||
</div>
|
||||
<div class="list-content" v-if="list.length">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="time-flex">
|
||||
<p>{{item.createTime.substring(0, 16)}}</p>
|
||||
<div :class="`status`+item.status">{{ $dict.getLabel('integralSGOStatus', item.status) }}</div>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<img :src="item.goodsPicUrl" alt="">
|
||||
<div class="type" :class="`type`+item.goodsTypeText">{{ $dict.getLabel('integralSGTypeText', item.goodsTypeText) }}</div>
|
||||
<div class="flex-right">
|
||||
<p>{{item.goodsTitle}}</p>
|
||||
<div class="num-flex">
|
||||
<h3>{{item.usedIntegral}}积分<span v-if="item.goodsType == 2">+{{item.payMoney}}元</span></h3>
|
||||
<div>x {{item.quantity}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="tips" v-if="item.goodsType == 2"><span>兑换成功后,点击「去购买」前往京东低价购买</span></p>
|
||||
<p class="tips" v-else>积分兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
||||
<p class="remark" v-if="item.remarks">备注:{{item.remarks}}</p>
|
||||
<div class="flex-btn" v-if="item.goodsType == 2 && item.status != 2">
|
||||
<p></p>
|
||||
<div class="btn confirm" @click="openJd(item)">去购买</div>
|
||||
</div>
|
||||
<div class="flex-btn" v-if="item.goodsType != 2">
|
||||
<p>核销码:<span>{{item.verificationCode}}</span></p>
|
||||
<div class="btn" v-if="item.status == 0" @click="cancel(item)">取消订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else></AiEmpty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'myOrderList',
|
||||
appName: '我的订单',
|
||||
data() {
|
||||
return {
|
||||
tabList: [{name: '全部'}, {name: '待核销'}, {name: '已完成'}, {name: '已取消'}],
|
||||
currentTabs: 0,
|
||||
barStyle: {
|
||||
'width': '20px',
|
||||
'height': '3px',
|
||||
'border-radius': '2px',
|
||||
'bottom': '3px',
|
||||
'background': '#2D7DFF'
|
||||
},
|
||||
list: [],
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.$dict.load(['integralSGOStatus', 'integralSGTypeText']).then(() => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeTab(index) {
|
||||
this.currentTabs = index
|
||||
this.getListInit()
|
||||
},
|
||||
getListInit() {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/listForXCX`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
status: this.currentTabs == 0 ? '' : this.currentTabs - 1,
|
||||
createUserId: this.user.id
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
res.data.records.map((item) => {
|
||||
item.goodsTypeText = item.goodsType == 0 ? 0 : 1
|
||||
})
|
||||
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
},
|
||||
openJd(item) {
|
||||
if(item.goodsType == 1) {
|
||||
uni.navigateTo({url: `./jdH5?goodsJdUrl=${item.goodsJdUrl}`})
|
||||
}else {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: item.goodsJdAppid,
|
||||
path: item.goodsJdUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
cancel(item) {
|
||||
uni.showModal({
|
||||
title: '确认取消此订单?',
|
||||
content: '取消订单后,积分将退回至积分余额',
|
||||
confirmColor: "#2D7DFF",
|
||||
cancelColor: "#2D7DFF",
|
||||
cancelText: "我在想想",
|
||||
confirmText: "确认取消",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.cancelOrder(item)
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelOrder(item) {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/cancelForXCX?id=${item.id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.getListInit()
|
||||
uni.$emit('updateGoodsList')
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current = this.current + 1
|
||||
this.getList()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.myOrderList {
|
||||
min-height: 100%;
|
||||
.fixed-top {
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
.list-content {
|
||||
padding: 112px 24px 24px;
|
||||
background-color: #F3F6F9;
|
||||
.item {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 32px;
|
||||
.time-flex {
|
||||
padding: 0 32px;
|
||||
line-height: 64px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1px solid #ddd;
|
||||
div {
|
||||
color: #2D7DFF;
|
||||
}
|
||||
.status2 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.flex {
|
||||
padding: 32px 32px 0;
|
||||
display: flex;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
img {
|
||||
width: 166px;
|
||||
height: 166px;
|
||||
border-radius: 16px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.type {
|
||||
position: absolute;
|
||||
left: 32px;
|
||||
bottom: 0;
|
||||
border-bottom-left-radius: 16px;
|
||||
border-bottom-right-radius: 16px;
|
||||
width: 166px;
|
||||
text-align: center;
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 18px;
|
||||
color: #FFF;
|
||||
p {
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.flex-right {
|
||||
width: calc(100% - 186px);
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #222;
|
||||
line-height: 34px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
.num-flex {
|
||||
display: flex;
|
||||
h3 {
|
||||
width: calc(100% - 100px);
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #FF6900;
|
||||
line-height: 48px;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 34px;
|
||||
color: #4181FF;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
div {
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #222;
|
||||
line-height: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.tips {
|
||||
display: inline-block;
|
||||
padding: 12px;
|
||||
line-height: 36px;
|
||||
background: #F5FCF5;
|
||||
border-radius: 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #3BBC37;
|
||||
margin: 0 32px 16px 32px;
|
||||
span {
|
||||
display: inline-block;
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.remark {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
line-height: 34px;
|
||||
word-break: break-all;
|
||||
margin: 0 32px 24px 32px;
|
||||
}
|
||||
.flex-btn {
|
||||
padding: 0 32px 32px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
p {
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 28px;
|
||||
color: #2D7DFF;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 136px;
|
||||
text-align: center;
|
||||
line-height: 54px;
|
||||
border: 1px solid #CCC;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 22px;
|
||||
color: #666;
|
||||
}
|
||||
.confirm {
|
||||
border: 1px solid #2D7DFF;
|
||||
background-color: #2D7DFF;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
291
src/project/wuxi/AppRedemptionPoints/placeOrder.vue
Normal file
@@ -0,0 +1,291 @@
|
||||
<template>
|
||||
<div class="placeOrder">
|
||||
<div class="header-info">
|
||||
<div class="flex">
|
||||
<img :src="goodsInfo.picUrl" alt="">
|
||||
<div class="type" :class="`type`+goodsInfo.typeText">{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}</div>
|
||||
<div class="flex-right">
|
||||
<p>{{goodsInfo.title}}</p>
|
||||
<div>
|
||||
<u-number-box v-model="goodsNum" @change="valChange" input-height="44" size="24" :min="1" :max="goodsInfo.stock"></u-number-box>
|
||||
</div>
|
||||
<h3>{{goodsInfo.integralPrice}}积分<span v-if="goodsInfo.type == 2">+¥{{goodsInfo.payMoney}}.00</span></h3>
|
||||
</div>
|
||||
</div>
|
||||
<p class="tips" v-if="goodsInfo.type == 2">兑换成功后,点击「去购买」前往京东低价购买</p>
|
||||
<p class="tips" v-else>积分兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="item-flex" @click="show=true">
|
||||
<div class="label">订单备注</div>
|
||||
<div class="value" :class="value ? '' : 'color-999'">{{value || '无备注'}}<u-icon name="arrow-right" color="#bbb" size="24"></u-icon></div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">积分余额</div>
|
||||
<div class="value color-FF6900">{{total}}积分</div>
|
||||
</div>
|
||||
<div class="item-flex">
|
||||
<div class="label">支付积分</div>
|
||||
<div class="value">减{{(goodsNum*goodsInfo.integralPrice).toFixed(2)}}积分</div>
|
||||
</div>
|
||||
<div class="item-flex" v-if="goodsInfo.type == 2">
|
||||
<div class="label">京东支付</div>
|
||||
<div class="value color-999">¥{{(goodsNum*goodsInfo.payMoney).toFixed(2)}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<u-popup v-model="show" mode="bottom">
|
||||
<div class="textarea">
|
||||
<u-input v-model="value" type="textarea" :height="120" :auto-height="true" placeholder="请输入备注" :clearable="false" maxlength="1000" />
|
||||
<p>字数{{value.length}}/1000</p>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<span @click="value=''">清空内容</span>
|
||||
<span class="confirm" @click="confirm">保存</span>
|
||||
</div>
|
||||
</u-popup>
|
||||
<div class="bottom-btn" @click="confirmOrder()">
|
||||
<div>提交订单</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'placeOrder',
|
||||
appName: '提交订单',
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
show: false,
|
||||
total: 0,
|
||||
goodsInfo: {},
|
||||
goodsNum: 1,
|
||||
backLevel: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.total = option.total
|
||||
this.backLevel = option.backLevel
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
this.goodsInfo.typeText = this.goodsInfo.type == 0 ? 0 : 1
|
||||
}
|
||||
})
|
||||
},
|
||||
valChange(e) {
|
||||
this.goodsNum = e.value
|
||||
},
|
||||
confirm() {
|
||||
this.show = false
|
||||
},
|
||||
confirmOrder() {
|
||||
this.$instance.post(`/app/appintegralsupermarketorder/add`, {
|
||||
shopId: this.goodsInfo.shopId,
|
||||
goodsId: this.goodsInfo.id,
|
||||
remarks: this.value,
|
||||
quantity: this.goodsNum
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
uni.$emit('updateGoodsList')
|
||||
this.toSuccess()
|
||||
}
|
||||
})
|
||||
},
|
||||
toSuccess() {
|
||||
var integralPrice = this.goodsNum*this.goodsInfo.integralPrice
|
||||
uni.navigateTo({url: `./successOrder?integralPrice=${integralPrice}&backLevel=${this.backLevel}&shopGoodsId=${this.goodsInfo.shopGoodsId}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.placeOrder {
|
||||
.header-info {
|
||||
padding: 48px 32px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
.flex {
|
||||
margin-bottom: 32px;
|
||||
display: flex;
|
||||
position: relative;
|
||||
img {
|
||||
width: 166px;
|
||||
height: 166px;
|
||||
border-radius: 16px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.type {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-bottom-left-radius: 16px;
|
||||
border-bottom-right-radius: 16px;
|
||||
width: 166px;
|
||||
text-align: center;
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 18px;
|
||||
color: #FFF;
|
||||
p {
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.flex-right {
|
||||
width: calc(100% - 186px);
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #222;
|
||||
line-height: 34px;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
div {
|
||||
text-align: right;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 34px;
|
||||
color: #FF6900;
|
||||
line-height: 48px;
|
||||
span {
|
||||
display: inline-block;
|
||||
font-size: 34px;
|
||||
color: #4181FF;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.tips {
|
||||
display: inline-block;
|
||||
padding: 12px;
|
||||
line-height: 36px;
|
||||
background: #F5FCF5;
|
||||
border-radius: 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #3BBC37;
|
||||
span {
|
||||
display: inline-block;
|
||||
scale: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content {
|
||||
padding: 0 32px;
|
||||
background-color: #fff;
|
||||
.item-flex {
|
||||
display: flex;
|
||||
padding: 30px 0;
|
||||
font-size: 26px;
|
||||
line-height: 34px;
|
||||
font-family: PingFangSC-Regular;
|
||||
.label {
|
||||
color: #222;
|
||||
width: 120px;
|
||||
}
|
||||
.value {
|
||||
width: calc(100% - 120px);
|
||||
text-align: right;
|
||||
color: #222;
|
||||
}
|
||||
.color-FF6900 {
|
||||
color: #FF6900;
|
||||
}
|
||||
.color-999 {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.textarea {
|
||||
margin: 32px 32px 24px;
|
||||
width: calc(100% - 64px);
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
background: #f7f7f7;
|
||||
border-radius: 8px;
|
||||
p {
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 36px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
padding: 0 32px 24px;
|
||||
height: 64px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
span {
|
||||
display: inline-block;
|
||||
line-height: 64px;
|
||||
font-size: 26px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #666;
|
||||
}
|
||||
.confirm {
|
||||
width: 144px;
|
||||
text-align: center;
|
||||
background: #1365dd;
|
||||
border-radius: 32px;
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.bottom-btn {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding: 20px 32px;
|
||||
box-sizing: border-box;
|
||||
div {
|
||||
width: 100%;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
text-align: center;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
background: #4181FF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
165
src/project/wuxi/AppRedemptionPoints/pointsPublicity.vue
Normal file
@@ -0,0 +1,165 @@
|
||||
<template>
|
||||
<div class="pointsPublicity">
|
||||
<div class="header">
|
||||
<img :src="`${cdn}/publicity-header.png`" alt="">
|
||||
<div class="title">{{user.girdName}}积分公示</div>
|
||||
</div>
|
||||
<div class="list-content">
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<span class="blue-tips"></span>
|
||||
<p class="title">{{item.classOne}}</p>
|
||||
<div class="item-info">
|
||||
<p class="mini-title">{{item.classTwo}}</p>
|
||||
<div class="text-flex">
|
||||
<p>{{item.classThree}}</p>
|
||||
<div>
|
||||
<img :src="`${cdn}/star-icon.png`" alt="">+{{item.integral}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-if="!list.length"></AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapActions, mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'pointsPublicity',
|
||||
appName: '积分公示',
|
||||
data() {
|
||||
return {
|
||||
cdn: "https://cdn.cunwuyun.cn/fengdu",
|
||||
list: [],
|
||||
current: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad() {
|
||||
this.getAuth()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['getUserInfo']),
|
||||
getList() {
|
||||
this.$instance.post(`/app/appintegralpublicityinfo/list?current=${this.current}&girdId=${this.user.girdId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
},
|
||||
getAuth() {
|
||||
this.$nextTick(() => {
|
||||
this.getUserInfo('qujing')
|
||||
this.getList()
|
||||
|
||||
})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body{
|
||||
background-color: #fff;
|
||||
}
|
||||
.pointsPublicity {
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 9;
|
||||
background-color: #f3f6f9;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 216px;
|
||||
}
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #222;
|
||||
line-height: 40px;
|
||||
padding: 38px 32px;
|
||||
}
|
||||
}
|
||||
.list-content {
|
||||
padding: 332px 32px 32px;
|
||||
.item {
|
||||
width: 100%;
|
||||
background: #FFF;
|
||||
box-shadow: inset 0 0 0 0 #EEEEEE;
|
||||
padding: 32px 32px 0;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
margin-bottom: 24px;
|
||||
.blue-tips {
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
left: 0;
|
||||
width: 8px;
|
||||
height: 36px;
|
||||
background: #2D7DFF;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.title {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.item-info {
|
||||
width: 100%;
|
||||
padding: 32px 0;
|
||||
border-top: 1px solid #eee;
|
||||
.mini-title {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 34px;
|
||||
color: #333;
|
||||
line-height: 40px;
|
||||
word-break: break-all;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
.text-flex {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
p {
|
||||
width: calc(100% - 160px);
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 26px;
|
||||
color: #666;
|
||||
word-break: break-all;
|
||||
}
|
||||
div {
|
||||
width: 160px;
|
||||
text-align: right;
|
||||
font-family: DINAlternate-Bold;
|
||||
font-weight: 700;
|
||||
font-size: 30px;
|
||||
color: #FF7109;
|
||||
img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-right: 8px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-info:nth-of-type(2) {
|
||||
border-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
185
src/project/wuxi/AppRedemptionPoints/productDetails.vue
Normal file
@@ -0,0 +1,185 @@
|
||||
<template>
|
||||
<div class="productDetails" v-if="goodsInfo.picUrl">
|
||||
<img :src="goodsInfo.picUrl" alt="">
|
||||
<div class="type" :class="`type`+goodsInfo.typeText">{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}</div>
|
||||
<div class="product-info">
|
||||
<p>{{goodsInfo.title}}</p>
|
||||
<h3>{{goodsInfo.integralPrice}}积分<span v-if="goodsInfo.type == 2">+¥{{goodsInfo.payMoney}}<span v-if="goodsInfo.type == 2">(兑换后再付)</span></span></h3>
|
||||
<div>零售单价¥{{goodsInfo.retailPrice}}</div>
|
||||
<span class="tips" v-if="goodsInfo.type == 2">兑换成功后,点击「去购买」前往京东低价购买</span>
|
||||
<span class="tips" v-else>积分兑换商品,可到固定的兑换点进行「核销兑换」</span>
|
||||
</div>
|
||||
<div class="product-content">
|
||||
<p>商品描述:</p>
|
||||
<p v-html="goodsInfo.description"></p>
|
||||
</div>
|
||||
<div class="btn" @click="toOrder()" v-if="goodsInfo.shopStatus == 1">
|
||||
<div :class="total >= goodsInfo.integralPrice ? 'status1' : 'status0'" v-if="goodsInfo.stock > 0">{{total >= goodsInfo.integralPrice ? '立即兑换' : '积分不足'}}</div>
|
||||
<div class="status0" v-else>商品缺货</div>
|
||||
</div>
|
||||
<div class="btn" v-else>
|
||||
<div class="status0">店铺停用</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'productDetails',
|
||||
appName: '兑换商品',
|
||||
data() {
|
||||
return {
|
||||
shopGoodsId: '',
|
||||
goodsInfo: {},
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.total = option.total
|
||||
this.$dict.load(['integralSGTypeText']).then(() => {
|
||||
this.getDetail()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
this.goodsInfo.typeText = this.goodsInfo.type == 0 ? 0 : 1
|
||||
}
|
||||
})
|
||||
},
|
||||
toOrder() {
|
||||
if(this.total >= this.goodsInfo.integralPrice && this.goodsInfo.stock > 0 && this.goodsInfo.status == 1) {
|
||||
uni.navigateTo({url: `./placeOrder?shopGoodsId=${this.goodsInfo.shopGoodsId}&total=${this.total}&backLevel=4`})
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.productDetails {
|
||||
background-color: #f3f6f9;
|
||||
position: relative;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 750px;
|
||||
}
|
||||
.type {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
line-height: 42px;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 30px;
|
||||
color: #FFF;
|
||||
padding: 16px 16px 16px 36px;
|
||||
border-bottom-left-radius: 40px;
|
||||
}
|
||||
.type2 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type1 {
|
||||
background-color: #E64E39;
|
||||
}
|
||||
.type0 {
|
||||
background-color: #FF6900;
|
||||
}
|
||||
.product-info {
|
||||
padding: 32px;
|
||||
background-color: #fff;
|
||||
margin-bottom: 24px;
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 48px;
|
||||
color: #222;
|
||||
letter-spacing: 0;
|
||||
line-height: 76px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 44px;
|
||||
color: #FF6900;
|
||||
margin-bottom: 8px;
|
||||
span {
|
||||
font-size: 44px;
|
||||
color: #4181FF;
|
||||
margin-left: 8px;
|
||||
span {
|
||||
font-weight: 400;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
div {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-weight: 400;
|
||||
font-size: 24px;
|
||||
color: #999;
|
||||
line-height: 34px;
|
||||
margin-bottom: 24px;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.tips {
|
||||
display: inline-block;
|
||||
padding: 12px;
|
||||
line-height: 36px;
|
||||
background: #F5FCF5;
|
||||
border-radius: 16px;
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 24px;
|
||||
color: #3BBC37;
|
||||
}
|
||||
}
|
||||
.product-content {
|
||||
padding: 34px 64px 162px;
|
||||
background-color: #fff;
|
||||
p {
|
||||
font-family: PingFangSC-Regular;
|
||||
font-size: 32px;
|
||||
color: #666;
|
||||
line-height: 60px;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
padding: 20px 32px;
|
||||
box-sizing: border-box;
|
||||
div {
|
||||
width: 100%;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
text-align: center;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
}
|
||||
.status1 {
|
||||
color: #FFF;
|
||||
background: #4181FF;
|
||||
}
|
||||
.status0 {
|
||||
color: #666;
|
||||
background: #E2E2E2;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
145
src/project/wuxi/AppRedemptionPoints/successOrder.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="successOrder">
|
||||
<img src="./img/success.png" alt="">
|
||||
|
||||
|
||||
<div v-if="goodsInfo.type == 0">
|
||||
<h3>提交成功</h3>
|
||||
<p>提交「积分兑换」订单成功,扣减 <span>{{integralPrice}}积分</span></p>
|
||||
<div class="btn-flex">
|
||||
<div @click="back">返回</div>
|
||||
<div @click="toOrderList">查看订单</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h3>兑换成功</h3>
|
||||
<p>提交「京东低价商品」订单成功,扣减 <span>{{integralPrice}}积分</span><br/>
|
||||
可点击下方按钮前往京东商城进行低价购买
|
||||
</p>
|
||||
<div class="btn" @click="openJd">去购买</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex";
|
||||
|
||||
export default {
|
||||
name: 'successOrder',
|
||||
appName: '提交订单',
|
||||
data() {
|
||||
return {
|
||||
integralPrice: 0,
|
||||
backLevel: 1,
|
||||
shopGoodsId: '',
|
||||
goodsInfo: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
onLoad(option) {
|
||||
console.log(option)
|
||||
this.integralPrice = option.integralPrice
|
||||
this.backLevel = option.backLevel
|
||||
this.shopGoodsId = option.shopGoodsId
|
||||
this.getDetail()
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.goodsInfo = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
openJd() {
|
||||
if(this.goodsInfo.type == 1) {
|
||||
uni.navigateTo({url: `./jdH5?goodsJdUrl=${this.goodsInfo.jdUrl}`})
|
||||
}else {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: this.goodsInfo.jdAppid,
|
||||
path: this.goodsInfo.jdUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack({delta: Number(this.backLevel)})
|
||||
},
|
||||
toOrderList() {
|
||||
uni.redirectTo({
|
||||
url: './myOrderList'
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body{
|
||||
background-color: #fff;
|
||||
}
|
||||
.successOrder {
|
||||
padding: 0 60px;
|
||||
text-align: center;
|
||||
img {
|
||||
width: 240px;
|
||||
height: 232px;
|
||||
margin: 168px auto 32px auto;
|
||||
}
|
||||
h3 {
|
||||
font-family: PingFangSC-SNaNpxibold;
|
||||
font-weight: 600;
|
||||
font-size: 40px;
|
||||
color: #333;
|
||||
line-height: 56px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
p {
|
||||
color: #333;
|
||||
font-size: 30px;
|
||||
font-family: PingFangSC;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
margin-bottom: 80px;
|
||||
span {
|
||||
color: #FF6900;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 410px;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
background: #2D7DFF;
|
||||
border-radius: 44px;
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.btn-flex {
|
||||
font-family: PingFangSC-Medium;
|
||||
font-weight: 500;
|
||||
font-size: 34px;
|
||||
margin: 0 auto;
|
||||
div {
|
||||
display: inline-block;
|
||||
width: 272px;
|
||||
text-align: center;
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
border-radius: 44px;
|
||||
color: #FFF;
|
||||
background-color: #2D7DFF;
|
||||
}
|
||||
div:nth-of-type(1) {
|
||||
background-color: #E5EFFF;
|
||||
color: #2D7DFF;
|
||||
margin-right: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||