会员相关更新、商品列表更新
This commit is contained in:
1
App.vue
1
App.vue
@@ -8,7 +8,6 @@
|
|||||||
uni.cache.set('menuInfo', uni.getMenuButtonBoundingClientRect());
|
uni.cache.set('menuInfo', uni.getMenuButtonBoundingClientRect());
|
||||||
// #endif
|
// #endif
|
||||||
uni.cache.set('NAME', '零点八零');
|
uni.cache.set('NAME', '零点八零');
|
||||||
this.userlogin()
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,23 +12,36 @@
|
|||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<view class="navbar_tow flex-between"
|
<view class="navbar_tow flex-between"
|
||||||
:style="{'height':HeighT.customBar+'px','marginTop':HeighT.heightBar+'px','padding-right':HeighT.custwidth + 'px'}">
|
:style="{'height':HeighT.customBar + ( (HeighT.heightBar - systemInfo.statusBarHeight)*2 )+'px','marginTop': ( HeighT.heightBar - (HeighT.heightBar - systemInfo.statusBarHeight))+'px','padding-right':HeighT.custwidth + 'px'}">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- 标题搜索框 -->
|
<!-- 标题搜索框 -->
|
||||||
<view v-if="search&&opacity">
|
<view class="flex-between" v-if="opacity&&inputshow">
|
||||||
<u--input
|
<view class="navbar_tow_one flex-start" v-if="iconshow" @click="clicknavigateBack">
|
||||||
class="search"
|
<u-icon name="arrow-left" :color="iconcolor" size="40"></u-icon>
|
||||||
v-model="searchVal"
|
</view>
|
||||||
placeholder="想吃什么搜一搜"
|
<view class="navbar_tow_tow " @click="inputFocus" style="position: relative;">
|
||||||
@confirm="confirmSearch"
|
<u--input
|
||||||
prefixIcon="search"
|
placeholder="请输入内容"
|
||||||
prefixIconStyle="font-size: 22px;color: #909399"
|
class="custom-input"
|
||||||
:customStyle="{height:'100%',marginLeft:'20rpx',backgroundColor:'#eee',padding: '0'}"
|
border="surround"
|
||||||
></u--input>
|
:focus="focus"
|
||||||
|
@confirm="confirmSearch"
|
||||||
|
v-model="searchVal"
|
||||||
|
:readonly="readonly"
|
||||||
|
prefixIcon="search"
|
||||||
|
prefixIconStyle="font-size: 18px;color: #909399"
|
||||||
|
placeholderStyle="font-size: 14px;color: #999"
|
||||||
|
fontSize="14px"
|
||||||
|
:customStyle="{padding: '3rpx 10rpx ',width: '400rpx',borderRadius: '30rpx',backgroundColor: '#eee'}"
|
||||||
|
|
||||||
|
>
|
||||||
|
</u--input>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 正常导航栏 -->
|
||||||
<view class="flex-between" @click="clicknavigateBack" v-else>
|
<view class="flex-between" @click="clicknavigateBack" v-else>
|
||||||
<view class="navbar_tow_one flex-start" v-if="iconshow">
|
<view class="navbar_tow_one flex-start" v-if="iconshow">
|
||||||
<u-icon name="arrow-left" :color="iconcolor" size="40"></u-icon>
|
<u-icon name="arrow-left" :color="iconcolor" size="40"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<!-- #ifndef MP-WEIXIN -->
|
<!-- #ifndef MP-WEIXIN -->
|
||||||
<view class="navbar_tow_tow" v-if="opacity || titleshow" :style="{color: namecolor}">
|
<view class="navbar_tow_tow" v-if="opacity || titleshow" :style="{color: namecolor}">
|
||||||
@@ -46,7 +59,10 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -54,7 +70,9 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
Topdistance: '',
|
Topdistance: '',
|
||||||
searchVal: ""
|
searchVal: "",
|
||||||
|
systemInfo: '',
|
||||||
|
// keyword
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -93,6 +111,18 @@
|
|||||||
navigateBacknavtitle: {
|
navigateBacknavtitle: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
inputshow:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
focus:{
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
readonly: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -103,11 +133,18 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.GetTop()
|
this.GetTop()
|
||||||
|
wx.getSystemInfo({
|
||||||
|
success: res => {
|
||||||
|
this.systemInfo = res;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
// 当组件挂载完成后获取距离
|
// 当组件挂载完成后获取距离
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
GetTop() {
|
GetTop() {
|
||||||
this.$u.getRect('.navbar').then(res => {
|
this.$u.getRect('.navbar').then(res => {
|
||||||
this.Topdistance = res.height //滚动距离
|
this.Topdistance = res.height //滚动距离
|
||||||
@@ -121,6 +158,14 @@
|
|||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索点击处理
|
||||||
|
*/
|
||||||
|
inputFocus() {
|
||||||
|
console.log(123)
|
||||||
|
this.$emit('searchStatus', 'searchClick')
|
||||||
|
},
|
||||||
confirmSearch () {
|
confirmSearch () {
|
||||||
this.$emit('searchVal', this.searchVal)
|
this.$emit('searchVal', this.searchVal)
|
||||||
}
|
}
|
||||||
@@ -131,7 +176,7 @@
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
page {
|
page {
|
||||||
background: #F9F9F9;
|
background: #F7F7F7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbarcontent {
|
.navbarcontent {
|
||||||
@@ -205,12 +250,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar_tow_tow {
|
.navbar_tow_tow {
|
||||||
|
width: 200rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
flex: auto;
|
flex: auto;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
position: relative;
|
||||||
|
.u--input {
|
||||||
|
width: 200rpx;
|
||||||
|
input{
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
11
pages.json
11
pages.json
@@ -4,7 +4,7 @@
|
|||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "black"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -172,7 +172,14 @@
|
|||||||
"path": "pages/order_food/order_food",
|
"path": "pages/order_food/order_food",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "balck"
|
"navigationBarTextStyle": "black"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/order_food/order_food_search",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom",
|
||||||
|
"navigationBarTextStyle": "black"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
scanCodehandle(i) {
|
scanCodehandle(i) {
|
||||||
|
console.log(1)
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
uni.scanCode({
|
uni.scanCode({
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
@@ -67,31 +68,18 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (this.usershopUserinfo.isVip == 0) {
|
uni.pro.navigateTo('member/memberdetails', {
|
||||||
// 跳转到开通页面
|
shopId_id: uni.cache.get('shopUser'),
|
||||||
uni.navigateTo({
|
})
|
||||||
url: '/pages/member/activatedmemberone?shopId=' + uni.cache.get('shopUser')
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.pro.navigateTo('member/memberdetails', {
|
|
||||||
shopId_id: uni.cache.get('shopUser'),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
memberindex(i) {
|
memberindex(i) {
|
||||||
|
console.log(2)
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
if (this.usershopUserinfo.isVip == 0) {
|
uni.pro.navigateTo('member/index', {
|
||||||
// 跳转到开通页面
|
shopId: uni.cache.get('shopUser'),
|
||||||
uni.navigateTo({
|
type: 'index',
|
||||||
url: '/pages/member/activatedmemberone?shopId=' + uni.cache.get('shopUser')
|
})
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.pro.navigateTo('member/index', {
|
|
||||||
shopId: uni.cache.get('shopUser'),
|
|
||||||
type: 'index',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
let data = {
|
let data = {
|
||||||
shopName: this.usershopUserinfo.shopName,
|
shopName: this.usershopUserinfo.shopName,
|
||||||
|
|||||||
@@ -1,180 +0,0 @@
|
|||||||
<template>
|
|
||||||
<!-- 账单明细 -->
|
|
||||||
<view>
|
|
||||||
<view class="bild">
|
|
||||||
<view class="bildLeft">
|
|
||||||
<text>我的余额</text>
|
|
||||||
<view>{{info.amount}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="bildRight">
|
|
||||||
<text>我的积分</text>
|
|
||||||
<view>{{info.levelConsume}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="navTop">
|
|
||||||
<view @click="clickEvent(1)" :class="[active==1?'fonts':'']">
|
|
||||||
余额明细
|
|
||||||
<view :class="[active==1?'xian':'']" style="left: 36rpx;"> </view>
|
|
||||||
</view>
|
|
||||||
<view @click="clickEvent(2)" :class="[active==2?'fonts':'']">
|
|
||||||
积分明细
|
|
||||||
<view :class="[active==2?'xian':'']" style="left: 36rpx;"> </view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="listStyle" v-for="(item,i) in list" :key="i">
|
|
||||||
<!-- <image :src="require('')" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
|
|
||||||
<view class="listrigth">
|
|
||||||
<view>{{item.biz_name}}</view>
|
|
||||||
<view :class="[item.type == '+'?'colorStyle':'']">{{item.type}}{{item.amount}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="listrigth2">
|
|
||||||
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
|
||||||
<view>余额:{{item.balance}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
active: 1,
|
|
||||||
list: [],
|
|
||||||
form: {
|
|
||||||
page: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
memberId: null
|
|
||||||
},
|
|
||||||
info: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
this.info = e
|
|
||||||
this.form.memberId = e.memberId
|
|
||||||
this.getlist()
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
this.getlist()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
// 检测是否包含In
|
|
||||||
checkIn(str) {
|
|
||||||
let reg = RegExp(/In/)
|
|
||||||
return str.match(reg)
|
|
||||||
},
|
|
||||||
async getlist() {
|
|
||||||
if (this.active == 1) {
|
|
||||||
let res = await this.api.queryMemberAccount(this.form)
|
|
||||||
if (res.code == 0) {
|
|
||||||
if (this.form.page == 1) {
|
|
||||||
this.list = res.data.list
|
|
||||||
} else {
|
|
||||||
this.form.page++
|
|
||||||
this.list.push(res.data.list)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.list = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clickEvent(i) {
|
|
||||||
this.active = i
|
|
||||||
this.getlist()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
|
||||||
.bild {
|
|
||||||
height: 320rpx;
|
|
||||||
background-image: url('https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/czmxbg.png');
|
|
||||||
background-size: 750rpx 320rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.bildLeft,
|
|
||||||
.bildRight {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 32rpx;
|
|
||||||
|
|
||||||
>view,
|
|
||||||
>text {
|
|
||||||
text-align: center;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view {
|
|
||||||
margin-top: 34rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.navTop {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: center;
|
|
||||||
color: #333;
|
|
||||||
margin-top: -60rpx;
|
|
||||||
padding: 0 120rpx;
|
|
||||||
|
|
||||||
.fonts {
|
|
||||||
font-size: 34rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.xian {
|
|
||||||
width: 58rpx;
|
|
||||||
height: 6rpx;
|
|
||||||
background: #FFAA62;
|
|
||||||
border-radius: 2rpx 2rpx 2rpx 2rpx;
|
|
||||||
position: absolute;
|
|
||||||
bottom: -16rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.listStyle {
|
|
||||||
padding: 28rpx;
|
|
||||||
padding-top: 50rpx;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.listrigth,
|
|
||||||
.listrigth2 {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
// padding-left: 32rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.listrigth {
|
|
||||||
.colorStyle {
|
|
||||||
color: #FF7127;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.listrigth2 {
|
|
||||||
margin-top: 6rpx;
|
|
||||||
|
|
||||||
>view {
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -21,17 +21,22 @@
|
|||||||
<view :class="[active==2?'xian':'']" style="left: 36rpx;"> </view>
|
<view :class="[active==2?'xian':'']" style="left: 36rpx;"> </view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="listStyle" v-for="(item,i) in list" :key="i">
|
<view class="listStyle " v-for="(item,i) in list" :key="i">
|
||||||
<!-- <image :src="require('')" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
|
<image class="head_img" :src="item.head_img?item.head_img:'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/head_default.png'" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image>
|
||||||
<view class="listrigth">
|
<view class="flex-start">
|
||||||
<view>{{item.biz_name}}</view>
|
<view class="listStyle_left">
|
||||||
<view :class="[item.type == '+'?'colorStyle':'']">{{item.type}}{{item.amount}}
|
<view class="listrigth">
|
||||||
|
<view>{{item.biz_name}}</view>
|
||||||
|
<view :class="[item.type == '+'?'colorStyle':'']">{{item.type}}{{item.amount}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="listrigth2">
|
||||||
|
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||||
|
<view>余额:{{item.balance}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="listrigth2">
|
|
||||||
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
|
||||||
<view>余额:{{item.balance}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -150,7 +155,9 @@
|
|||||||
|
|
||||||
.listrigth,
|
.listrigth,
|
||||||
.listrigth2 {
|
.listrigth2 {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// padding-left: 32rpx;
|
// padding-left: 32rpx;
|
||||||
@@ -167,9 +174,17 @@
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.listStyle_left{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.head_img{
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 32rpx;
|
||||||
|
}
|
||||||
.listrigth2 {
|
.listrigth2 {
|
||||||
margin-top: 6rpx;
|
margin-top: 16rpx;
|
||||||
|
|
||||||
>view {
|
>view {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@@ -1,169 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="towcontentitem">
|
|
||||||
<view class="towcontentitemone flex-start">
|
|
||||||
<image class="towcontentitemoneimage" :src="userInfo.logo" mode="aspectFill"></image>
|
|
||||||
<view class="towcontentitemonetext flex-colum-start">
|
|
||||||
<text class="towcontentitemonetextone">{{userInfo.shopName || '暂无昵称'}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="towcontentitemthere flex-start">
|
|
||||||
余额:<text class="towcontentitemtheretext">{{userInfo.amount || '0.00'}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="towcontentitemtow flex-between">
|
|
||||||
<text class="towcontentitemtowetext">VIP{{userInfo.code || '无'}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="towcontentitevip">
|
|
||||||
VIP{{userInfo.isVip||''}}
|
|
||||||
</view>
|
|
||||||
<image src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/drder/erweima.png" class="imgStyle" mode=""
|
|
||||||
@click="clickEvent"></image>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
props: ['userInfo'],
|
|
||||||
data() {
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
console.log(this.userInfo, '调试1113')
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
clickEvent() {
|
|
||||||
if (this.userInfo.amount) {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(this.userInfo)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.towcontentitem {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
padding: 32rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
background: linear-gradient(126deg, #FFFBF2 0%, #F2D093 100%);
|
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
right: 68rpx;
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 240rpx;
|
|
||||||
height: 232rpx;
|
|
||||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/member.png) no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemimage {
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
z-index: 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemone {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
|
|
||||||
.towcontentitemoneimage {
|
|
||||||
width: 76rpx;
|
|
||||||
height: 76rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.towcontentitemonetext {
|
|
||||||
height: 76rpx;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
|
|
||||||
.towcontentitemonetextone {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemonetexttow {
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #422A07;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemprogressa {
|
|
||||||
padding: 8rpx 44rpx;
|
|
||||||
z-index: 10;
|
|
||||||
position: relative;
|
|
||||||
margin-top: 54rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemtow {
|
|
||||||
margin-top: 84rpx;
|
|
||||||
z-index: 10;
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #422A07;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitevip {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 92rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
font-size: 20rpx;
|
|
||||||
background: #F4C380;
|
|
||||||
border-radius: 0rpx 12rpx 0rpx 12rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 40rpx;
|
|
||||||
color: #fff;
|
|
||||||
font-family: Source Han Sans CN-Medium;
|
|
||||||
font-weight: Medium;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemthere {
|
|
||||||
margin-left: 92rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: Medium;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #333333;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.towcontentitemtheretext {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.imgStyle {
|
|
||||||
width: 54rpx;
|
|
||||||
height: 52rpx;
|
|
||||||
position: absolute;
|
|
||||||
right: 50rpx;
|
|
||||||
bottom: 30rpx;
|
|
||||||
// border: 2px solid #fff;
|
|
||||||
z-index: 666;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
encryptedData: d.detail.encryptedData,
|
encryptedData: d.detail.encryptedData,
|
||||||
iv: d.detail.iv,
|
iv: d.detail.iv,
|
||||||
})
|
})
|
||||||
this.phonetitle = res.data
|
this.telephone = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,14 @@
|
|||||||
birthDay: this.birthDay
|
birthDay: this.birthDay
|
||||||
})
|
})
|
||||||
if ( res.code == 0 ) {
|
if ( res.code == 0 ) {
|
||||||
|
|
||||||
this.$emit('getRegisterMember', false)
|
this.$emit('getRegisterMember', false)
|
||||||
|
let res = await this.api.loginwxuserInfo({
|
||||||
|
userId: uni.cache.get('userInfo').id
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
uni.cache.set('userInfo', res.data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -240,6 +247,8 @@
|
|||||||
.reg-head-img{
|
.reg-head-img{
|
||||||
width: 120rpx;
|
width: 120rpx;
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
padding: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.reg-head-edit{
|
.reg-head-edit{
|
||||||
|
|||||||
@@ -1,332 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="content">
|
|
||||||
<card :userInfo="userInfo"></card>
|
|
||||||
<view class="therecontent">
|
|
||||||
<input type="number" v-model="amount" placeholder="自定义金额">
|
|
||||||
</view>
|
|
||||||
<view class="fourcontent flex-start">
|
|
||||||
<view class="fourcontentlnage" v-for="(item,index) in listdata" :key="index">
|
|
||||||
<view class="flex-colum" :class="index == inputshow?'fourcontentitems':'fourcontentitem'"
|
|
||||||
@click="clickinput(item,index)">
|
|
||||||
<text>{{item.minNum}}元</text>
|
|
||||||
<text style="margin-top: 10rpx;">充{{item.minNum}}送{{item.handselNum}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="fivecontent" @tap="$u.debounce(userbalancerechangesub, 500)">
|
|
||||||
立即充值
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import card from './components/card.vue'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
card
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
inputshow: 0,
|
|
||||||
listdata: [],
|
|
||||||
amount: '',
|
|
||||||
userInfo: {},
|
|
||||||
shopId: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
this.shopId = e.shopId
|
|
||||||
if (e.type == 'list') { //从列表进来的
|
|
||||||
this.paygetShopByMember(e.shopId)
|
|
||||||
} else {
|
|
||||||
this.paygetShopByMember(e.shopId)
|
|
||||||
}
|
|
||||||
this.paygetActive(e.shopId) //列表
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async paygetShopByMember(w) {
|
|
||||||
let res = await this.api.paygetShopByMember({
|
|
||||||
page: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
userId: uni.cache.get('userInfo').id,
|
|
||||||
shopId: this.shopId
|
|
||||||
})
|
|
||||||
this.userInfo = res.data.list[0]
|
|
||||||
},
|
|
||||||
async paygetActive() {
|
|
||||||
let res = await this.api.paygetActive({
|
|
||||||
shopId: this.shopId,
|
|
||||||
page: 1,
|
|
||||||
pageSize: 10
|
|
||||||
})
|
|
||||||
try {
|
|
||||||
this.listdata = res.data.list
|
|
||||||
this.amount = res.data.list[0].minNum
|
|
||||||
} catch (e) {
|
|
||||||
//TODO handle the exception
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async userbalancerechangesub() {
|
|
||||||
if (this.amount == null || this.amount == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '金额不能为空',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.amount <= 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '金额必须大于0',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let res = await this.api.paymemeberIn({
|
|
||||||
shopId: this.shopId, // 判断显示哪家的作品,
|
|
||||||
amount: this.amount // 判断显示哪家的作品,
|
|
||||||
})
|
|
||||||
if (res.code == 0) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '加载中',
|
|
||||||
mask: true
|
|
||||||
})
|
|
||||||
// #ifdef MP-WEIXIN
|
|
||||||
uni.requestPayment({
|
|
||||||
provider: 'wxpay', //支付类型-固定值
|
|
||||||
partnerid: res.data.appId, // 微信支付商户号
|
|
||||||
timeStamp: res.data.timeStamp, // 时间戳(单位:秒)
|
|
||||||
nonceStr: res.data.nonceStr, // 随机字符串
|
|
||||||
package: res.data.package, // 固定值
|
|
||||||
signType: res.data.signType, //固定值
|
|
||||||
paySign: res.data.paySign, //签名
|
|
||||||
success: (res) => {
|
|
||||||
uni.showToast({
|
|
||||||
title: "支付成功"
|
|
||||||
})
|
|
||||||
uni.hideLoading()
|
|
||||||
setTimeout(res => {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 500)
|
|
||||||
},
|
|
||||||
fail: (res) => {
|
|
||||||
uni.hideLoading()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
uni.hideLoading()
|
|
||||||
// #endif
|
|
||||||
}
|
|
||||||
},
|
|
||||||
clickinput(a, b) {
|
|
||||||
console.log(a, b)
|
|
||||||
this.inputshow = b
|
|
||||||
this.amount = a.minNum
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page {
|
|
||||||
background: #F9F9F9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 0 28rpx;
|
|
||||||
|
|
||||||
.towcontentitem {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
padding: 32rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
background: linear-gradient(126deg, #FFFBF2 0%, #F2D093 100%);
|
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
right: 68rpx;
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 240rpx;
|
|
||||||
height: 232rpx;
|
|
||||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/member.png) no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemimage {
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
z-index: 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemone {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
|
|
||||||
.towcontentitemoneimage {
|
|
||||||
width: 76rpx;
|
|
||||||
height: 76rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.towcontentitemonetext {
|
|
||||||
height: 76rpx;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
|
|
||||||
.towcontentitemonetextone {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemonetexttow {
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #422A07;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemprogressa {
|
|
||||||
padding: 8rpx 44rpx;
|
|
||||||
z-index: 10;
|
|
||||||
position: relative;
|
|
||||||
margin-top: 54rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemtow {
|
|
||||||
margin-top: 84rpx;
|
|
||||||
z-index: 10;
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #422A07;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitevip {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 92rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
font-size: 20rpx;
|
|
||||||
background: #F4C380;
|
|
||||||
border-radius: 0rpx 12rpx 0rpx 12rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 40rpx;
|
|
||||||
color: #fff;
|
|
||||||
font-family: Source Han Sans CN-Medium;
|
|
||||||
font-weight: Medium;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemthere {
|
|
||||||
margin-left: 92rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: Medium;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #333333;
|
|
||||||
|
|
||||||
.towcontentitemtheretext {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.therecontent {
|
|
||||||
margin-top: 32rpx;
|
|
||||||
position: relative;
|
|
||||||
padding: 22rpx 32rpx;
|
|
||||||
width: 100%;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
|
|
||||||
input {
|
|
||||||
padding-left: 30rpx;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.therecontent::after {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 32rpx;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
content: '¥';
|
|
||||||
display: inline-block;
|
|
||||||
width: 28rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fourcontent {
|
|
||||||
.fourcontentlnage {
|
|
||||||
width: 33.33%;
|
|
||||||
|
|
||||||
.fourcontentitem {
|
|
||||||
margin: 24rpx 10rpx;
|
|
||||||
padding: 16rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
// border: 1rpx solid #333333;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Roboto-Medium, Roboto;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fourcontentitems {
|
|
||||||
margin: 24rpx 10rpx;
|
|
||||||
padding: 16rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background: #F1CB66;
|
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
||||||
border: 2rpx solid #F1CB66;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Roboto-Medium, Roboto;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.fivecontent {
|
|
||||||
position: relative;
|
|
||||||
bottom: 44rpx;
|
|
||||||
margin-top: 62rpx;
|
|
||||||
padding: 20rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: PingFang SC-Bold, PingFang SC;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #FFFFFF;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background: #F1CB66;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -70,11 +70,14 @@
|
|||||||
<view class="rechargeBox">
|
<view class="rechargeBox">
|
||||||
<view class="agreement">
|
<view class="agreement">
|
||||||
<u-checkbox-group>
|
<u-checkbox-group>
|
||||||
<u-checkbox shape="circle" activeColor="#E3AD7F" @change="radioChange" size="30"></u-checkbox>
|
<u-checkbox shape="circle" activeColor="#E3AD7F" @change="radioChange" size="30">
|
||||||
|
<view style="width: 100rpx;height: 100rpx;"></view>
|
||||||
|
</u-checkbox>
|
||||||
</u-checkbox-group>
|
</u-checkbox-group>
|
||||||
<text>已同意</text>
|
<text>已同意</text>
|
||||||
<text class="agreement_text" @click="Privacy(1)">《用户储值协议》</text>
|
<text class="agreement_text" @click="viewProtocol">《用户隐私协议》</text>
|
||||||
<text class="agreement_text" @click="Privacy(3)">《用户授权协议》</text>
|
<!-- <text class="agreement_text" @click="viewProtocol">《用户储值协议》</text> -->
|
||||||
|
<!-- <text class="agreement_text" @click="viewProtocol">《用户授权协议》</text> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
|
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -116,9 +119,9 @@
|
|||||||
this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
|
this.shopId = this.getQueryString(decodeURIComponent(e.q), 'shopId')
|
||||||
this.tokenShow = false;
|
this.tokenShow = false;
|
||||||
// 等待登录结果返回
|
// 等待登录结果返回
|
||||||
if (!uni.cache.get('token')) {
|
// if (!uni.cache.get('token')) {
|
||||||
await this.$onLaunched;
|
// await this.$onLaunched;
|
||||||
}
|
// }
|
||||||
this.init();
|
this.init();
|
||||||
} else{
|
} else{
|
||||||
this.shopId = e.shopId;
|
this.shopId = e.shopId;
|
||||||
@@ -173,25 +176,16 @@
|
|||||||
uni.pro.navigateTo(item.url, this.userInfo)
|
uni.pro.navigateTo(item.url, this.userInfo)
|
||||||
},
|
},
|
||||||
|
|
||||||
async Privacy(e) {
|
|
||||||
if (e == 1) {
|
/**
|
||||||
//用户协议
|
* 查看协议
|
||||||
let res = await this.api.agreementgetAgreementOne({
|
*/
|
||||||
discern: 0
|
viewProtocol (){
|
||||||
});
|
wx.openPrivacyContract({
|
||||||
uni.pro.navigateTo('my/about/agreement', {
|
success: () => {}, // 打开成功
|
||||||
discern: 0,
|
fail: () => {}, // 打开失败
|
||||||
list: res.data.content
|
complete: () => {}
|
||||||
});
|
})
|
||||||
} else {
|
|
||||||
let res3 = await this.api.agreementgetAgreementOne({
|
|
||||||
discern: 3
|
|
||||||
});
|
|
||||||
uni.pro.navigateTo('my/about/agreement', {
|
|
||||||
discern: 3,
|
|
||||||
list: res3.data.content
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -216,18 +210,26 @@
|
|||||||
* 拉起地图
|
* 拉起地图
|
||||||
*/
|
*/
|
||||||
openLocation () {
|
openLocation () {
|
||||||
|
console.log('123');
|
||||||
uni.openLocation({
|
uni.openLocation({
|
||||||
latitude: Number(this.userInfo.lat), // 目的地的纬度,浮点数,范围为-90~90
|
latitude: Number(this.usershopUserinfo.lat), // 目的地的纬度,浮点数,范围为-90~90
|
||||||
longitude: Number(this.userInfo.lng), // 目的地的经度,浮点数,范围为-180~180
|
longitude: Number(this.usershopUserinfo.lng), // 目的地的经度,浮点数,范围为-180~180
|
||||||
scale: 18, // 缩放比例,范围5~18
|
scale: 18, // 缩放比例,范围5~18
|
||||||
name: this.userInfo.shopName, // 位置名
|
name: this.usershopUserinfo.shopName, // 位置名
|
||||||
address: this.userInfo.address, // 地址的详细说明
|
address: this.usershopUserinfo.address, // 地址的详细说明
|
||||||
success() {
|
success() {
|
||||||
console.log('导航启动成功');
|
console.log('导航启动成功');
|
||||||
|
|
||||||
},
|
},
|
||||||
fail(error) {
|
fail(error) {
|
||||||
console.log('导航启动失败', error);
|
console.log('导航启动失败', error);
|
||||||
|
if ( error.errMsg == "openLocation:fail invalid_coordinate") {
|
||||||
|
uni.showToast({
|
||||||
|
title: "门店经纬度无效",
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -278,6 +280,13 @@
|
|||||||
* 充值
|
* 充值
|
||||||
*/
|
*/
|
||||||
async userbalancerechangesub() {
|
async userbalancerechangesub() {
|
||||||
|
if (!this.isProtocol) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '请勾选协议',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this.amount == null || this.amount == '') {
|
if (this.amount == null || this.amount == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '金额不能为空',
|
title: '金额不能为空',
|
||||||
@@ -317,9 +326,7 @@
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
let pages = getCurrentPages()
|
let pages = getCurrentPages()
|
||||||
if ( pages.length > 1) {
|
if ( pages.length > 1) {
|
||||||
setTimeout(res => {
|
this.paygetShopByMember()
|
||||||
uni.navigateBack()
|
|
||||||
}, 500)
|
|
||||||
} else {
|
} else {
|
||||||
setTimeout(res => {
|
setTimeout(res => {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
|
|||||||
@@ -40,17 +40,24 @@
|
|||||||
size: 10, //页容量
|
size: 10, //页容量
|
||||||
status: 'loadmore',
|
status: 'loadmore',
|
||||||
},
|
},
|
||||||
userId: uni.cache.get('userInfo').id
|
userId: uni.cache.get('userInfo').id,
|
||||||
|
type: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
console.log(e)
|
||||||
|
if ( e.type ) {
|
||||||
|
this.type = e.type;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.list = []
|
this.list = []
|
||||||
this.form = {
|
this.form = {
|
||||||
page: 1, //页数
|
page: 1, //页数
|
||||||
size: 10, //页容量
|
size: 10, //页容量
|
||||||
status: 'loadmore',
|
status: 'loadmore',
|
||||||
},
|
},
|
||||||
this.paygetShopByMember()
|
this.paygetShopByMember()
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.paygetShopByMember()
|
this.paygetShopByMember()
|
||||||
@@ -86,9 +93,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
eeInfo(item) {
|
eeInfo(item) {
|
||||||
uni.pro.navigateTo('member/memberdetails', {
|
if ( this.type && this.type == 'user_payCode') {
|
||||||
shopId_id: item.shopId
|
uni.navigateTo({
|
||||||
})
|
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(item)
|
||||||
|
})
|
||||||
|
} else if ( this.type && this.type == 'user_recharge') {
|
||||||
|
uni.pro.navigateTo('member/index', {
|
||||||
|
shopId: item.shopId,
|
||||||
|
type: 'index',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.pro.navigateTo('member/memberdetails', {
|
||||||
|
shopId_id: item.shopId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,304 +0,0 @@
|
|||||||
<template>
|
|
||||||
<!-- 会员详情 -->
|
|
||||||
<view class="content">
|
|
||||||
<card :userInfo="userInfo"></card>
|
|
||||||
<view class="memberdetailsStyle">
|
|
||||||
<text>会员详情</text>
|
|
||||||
<view @click="goUrl('member/billDetails')">
|
|
||||||
<text>账单明细</text>
|
|
||||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
|
||||||
</view>
|
|
||||||
<view @click="goUrlinfo('member/index')">
|
|
||||||
<text>会员充值</text>
|
|
||||||
<uni-icons type="right" style="color: #333;" size="20"></uni-icons>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import card from './components/card.vue'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
card
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
shopId_id: null,
|
|
||||||
inputshow: 0,
|
|
||||||
memberlist: {},
|
|
||||||
listdata: [],
|
|
||||||
amount: '',
|
|
||||||
userInfo: {},
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(e) {
|
|
||||||
console.log(e)
|
|
||||||
this.shopId_id = e.shopId_id
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.paygetShopByMember(this.shopId_id)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async paygetShopByMember(w) {
|
|
||||||
let res = await this.api.paygetShopByMember({
|
|
||||||
page: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
userId: uni.cache.get('userInfo').id,
|
|
||||||
shopId: w
|
|
||||||
})
|
|
||||||
this.userInfo = res.data.list[0]
|
|
||||||
},
|
|
||||||
clickinput(a, b) {
|
|
||||||
console.log(a, b)
|
|
||||||
this.inputshow = b
|
|
||||||
this.amount = a.minNum
|
|
||||||
},
|
|
||||||
goUrl(url) {
|
|
||||||
uni.pro.navigateTo(url, this.userInfo)
|
|
||||||
},
|
|
||||||
goUrlinfo(url) {
|
|
||||||
uni.pro.navigateTo(url, {
|
|
||||||
shopId: this.shopId_id,
|
|
||||||
type: 'list'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page {
|
|
||||||
background: #F9F9F9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
padding: 0 28rpx;
|
|
||||||
|
|
||||||
.towcontentitem {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
padding: 32rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
background: linear-gradient(126deg, #FFFBF2 0%, #F2D093 100%);
|
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
right: 68rpx;
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
width: 240rpx;
|
|
||||||
height: 232rpx;
|
|
||||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/member.png) no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemimage {
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
z-index: 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemone {
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
z-index: 9;
|
|
||||||
|
|
||||||
.towcontentitemoneimage {
|
|
||||||
width: 76rpx;
|
|
||||||
height: 76rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.towcontentitemonetext {
|
|
||||||
height: 76rpx;
|
|
||||||
margin-left: 16rpx;
|
|
||||||
|
|
||||||
.towcontentitemonetextone {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemonetexttow {
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #422A07;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemprogressa {
|
|
||||||
padding: 8rpx 44rpx;
|
|
||||||
z-index: 10;
|
|
||||||
position: relative;
|
|
||||||
margin-top: 54rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemtow {
|
|
||||||
margin-top: 84rpx;
|
|
||||||
z-index: 10;
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #422A07;
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitevip {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 92rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
font-size: 20rpx;
|
|
||||||
background: #F4C380;
|
|
||||||
border-radius: 0rpx 12rpx 0rpx 12rpx;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 40rpx;
|
|
||||||
color: #fff;
|
|
||||||
font-family: Source Han Sans CN-Medium;
|
|
||||||
font-weight: Medium;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentitemthere {
|
|
||||||
margin-left: 92rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: Medium;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #333333;
|
|
||||||
|
|
||||||
.towcontentitemtheretext {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.therecontent {
|
|
||||||
margin-top: 32rpx;
|
|
||||||
position: relative;
|
|
||||||
padding: 22rpx 32rpx;
|
|
||||||
width: 100%;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
|
|
||||||
input {
|
|
||||||
padding-left: 30rpx;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.therecontent::after {
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 32rpx;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
content: '¥';
|
|
||||||
display: inline-block;
|
|
||||||
width: 28rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fourcontent {
|
|
||||||
.fourcontentlnage {
|
|
||||||
width: 33.33%;
|
|
||||||
|
|
||||||
.fourcontentitem {
|
|
||||||
margin: 24rpx 10rpx;
|
|
||||||
padding: 16rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
border: 1rpx solid #333333;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Roboto-Medium, Roboto;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fourcontentitems {
|
|
||||||
margin: 24rpx 10rpx;
|
|
||||||
padding: 16rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background: #F1CB66;
|
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
||||||
border: 2rpx solid #F1CB66;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-family: Roboto-Medium, Roboto;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.fivecontent {
|
|
||||||
position: relative;
|
|
||||||
bottom: 44rpx;
|
|
||||||
margin-top: 62rpx;
|
|
||||||
padding: 20rpx 0;
|
|
||||||
text-align: center;
|
|
||||||
width: 100%;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: PingFang SC-Bold, PingFang SC;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #FFFFFF;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
background: #F1CB66;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 会员详情
|
|
||||||
.memberdetailsStyle {
|
|
||||||
margin-top: 32rpx;
|
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 32rpx;
|
|
||||||
height: 252rpx;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
>text {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333333;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -23,13 +23,13 @@
|
|||||||
<view class="card_cen_right" v-if="userInfo.isVip != 0">查看特权</view>
|
<view class="card_cen_right" v-if="userInfo.isVip != 0">查看特权</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_bom" v-if="userInfo.isVip != 0">
|
<view class="card_bom" v-if="userInfo.isVip != 0">
|
||||||
<view class="card_bom_item">
|
<view class="card_bom_item" @click="itemClick(1)">
|
||||||
<text>{{userInfo.amount || '0.00'}}</text><text>储值</text>
|
<text>{{userInfo.amount || '0.00'}}</text><text>储值</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_bom_item">
|
<view class="card_bom_item">
|
||||||
<text>0</text><text>积分</text>
|
<text>0</text><text>积分</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_bom_item">
|
<view class="card_bom_item" @click="itemClick(3)">
|
||||||
<text>0</text><text>优惠券</text>
|
<text>0</text><text>优惠券</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="card_bom_item">
|
<view class="card_bom_item">
|
||||||
@@ -93,39 +93,53 @@
|
|||||||
list: ['鸿运当头',"财运亨通","时来运转","否极泰来","花逢时发"],
|
list: ['鸿运当头',"财运亨通","时来运转","否极泰来","花逢时发"],
|
||||||
index: 0,
|
index: 0,
|
||||||
text: ""
|
text: ""
|
||||||
}
|
},
|
||||||
|
usershopUserinfo:{},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.shopId_id = e.shopId_id
|
this.shopId_id = e.shopId_id
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.paygetShopByMember()
|
this.init();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* 获取会员卡信息
|
* 获取店铺信息
|
||||||
*/
|
*/
|
||||||
async paygetShopByMember() {
|
async init() {
|
||||||
let res = await this.api.paygetShopByMember({
|
let res = await this.api.shopUserInfo({
|
||||||
page: 1,
|
"shopId": this.shopId_id,
|
||||||
pageSize: 10,
|
"userId": uni.cache.get('userInfo').id,
|
||||||
userId: uni.cache.get('userInfo').id,
|
|
||||||
shopId: this.shopId_id
|
|
||||||
})
|
})
|
||||||
this.userInfo = res.data.list[0];
|
if (res.code == 0) {
|
||||||
|
this.userInfo = res.data
|
||||||
|
}
|
||||||
if ( this.userInfo.isVip == 0 ) {
|
if ( this.userInfo.isVip == 0 ) {
|
||||||
this.memberOpen = true;
|
this.memberOpen = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
itemClick ( type ) {
|
||||||
|
if ( type == 1) {
|
||||||
|
uni.pro.navigateTo('member/index', {
|
||||||
|
shopId: this.userInfo.shopId,
|
||||||
|
type: 'index',
|
||||||
|
})
|
||||||
|
} else if ( type == 3 ) {
|
||||||
|
uni.pro.navigateTo('user/coupon')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册会员卡
|
* 注册会员卡
|
||||||
* @param {Object} e
|
* @param {Object} e
|
||||||
*/
|
*/
|
||||||
getRegisterMember (e) {
|
getRegisterMember (e) {
|
||||||
this.memberOpen = e;
|
this.memberOpen = e;
|
||||||
this.paygetShopByMember()
|
this.init()
|
||||||
},
|
},
|
||||||
|
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="box_item flex-between" style="position:relative;">
|
<view class="box_item flex-between" style="position:relative;">
|
||||||
<text class="top_box_one_text"></text>
|
<text class="top_box_one_text"></text>
|
||||||
<input type="number" v-model="form.checkCode" placeholder="请输入验证码" style="padding-right: 140rpx;" />
|
<input type="number" v-model="form.checkCode" placeholder="请输入验证码" style="padding-right: 140rpx;color: #333" />
|
||||||
<view class="top_box_one_texts">
|
<view class="top_box_one_texts">
|
||||||
<view v-if="showText == true" class="yzm" @click="CodeRegister">{{ Recapture }}</view>
|
<view v-if="showText == true" class="yzm" @click="CodeRegister">{{ Recapture }}</view>
|
||||||
<view v-else style="color: #ccc; background-color: #f9f9f9; border-radius:16px; padding: 10rpx;">
|
<view v-else style="color: #ccc; background-color: #f9f9f9; border-radius:16px; padding: 10rpx;">
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-colum">
|
<view class="flex-colum">
|
||||||
<view class="Box_bottom" @click="userInfosavePayPassword">确定</view>
|
<view class="Box_bottom" :class="(form.checkCode!=''&&form.password!=''&&form.payPassword!='')?'active':''" @click="userInfosavePayPassword">确定</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -52,8 +52,13 @@
|
|||||||
Recapture: '获取验证码'
|
Recapture: '获取验证码'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad(e) {
|
||||||
|
// if ( e.shopUserInfo ) {
|
||||||
|
// this.shopUserInfo = JSON.parse(e.shopUserInfo);
|
||||||
|
// this.isPwd = this.shopUserInfo.isPwd;
|
||||||
|
// this.mobile = this.shopUserInfo.telephone.slice(0, 3)+'****'+this.shopUserInfo.telephone.slice(7);
|
||||||
|
// this.form.mobile = this.shopUserInfo.telephone;
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -62,7 +67,7 @@
|
|||||||
// post 手机验证码
|
// post 手机验证码
|
||||||
phone: this.form.mobile
|
phone: this.form.mobile
|
||||||
});
|
});
|
||||||
if (res) {
|
if (res.code == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '验证码获取成功',
|
title: '验证码获取成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -150,9 +155,10 @@
|
|||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// 获取用户信息
|
|
||||||
this.loginwxuserInfo()
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
// 获取用户信息
|
||||||
|
this.loginwxuserInfo()
|
||||||
uni.navigateBack();
|
uni.navigateBack();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
@@ -196,7 +202,7 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #999999;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -238,7 +244,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
line-height: 96rpx;
|
line-height: 96rpx;
|
||||||
background: #999;
|
background-color: #999;
|
||||||
border-radius: 48rpx;
|
border-radius: 48rpx;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||||
@@ -246,6 +252,9 @@
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.Box_bottom.active{
|
||||||
|
background-color: #E3AD7F;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -419,7 +419,7 @@
|
|||||||
|
|
||||||
.flex-between {
|
.flex-between {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 24rpx 28rpx;
|
padding: 48rpx 28rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
|
||||||
.fixedview_one {
|
.fixedview_one {
|
||||||
|
|||||||
@@ -94,15 +94,18 @@
|
|||||||
<view class="method_list_top">
|
<view class="method_list_top">
|
||||||
<view class="method_list_top_left">
|
<view class="method_list_top_left">
|
||||||
<image class="icon" :src="item.url" mode="aspectFill"/>
|
<image class="icon" :src="item.url" mode="aspectFill"/>
|
||||||
<text class="name"> {{ item.name }} </text>
|
<view class="method_list_top_cen">
|
||||||
|
<view class="name"> {{ item.name }} </view>
|
||||||
|
<view class="method_list_bom" v-if="item.type == 1">
|
||||||
|
<text class="balance">会员卡余额 ¥{{amountVIP?amountVIP.amount:0}}</text>
|
||||||
|
<text class="topUpNow" @click="goRecharge">去充值</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-radio activeColor="#E8AD7B" icon-size="36" size="36" :name="index+1">
|
<u-radio activeColor="#E8AD7B" icon-size="36" size="36" :name="index+1">
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</view>
|
</view>
|
||||||
<view class="method_list_bom" v-if="item.type == 1">
|
|
||||||
<text class="balance">会员卡余额 ¥{{amountVIP?amountVIP.amount:0}}</text>
|
|
||||||
<text class="topUpNow" @click="goRecharge">去充值</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
@@ -361,16 +364,9 @@
|
|||||||
goRecharge() {
|
goRecharge() {
|
||||||
// 判断是否绑定手机,只有下单时候有,会员列表肯定有
|
// 判断是否绑定手机,只有下单时候有,会员列表肯定有
|
||||||
// console.log(this.amountVIP.isVip, '调试1')
|
// console.log(this.amountVIP.isVip, '调试1')
|
||||||
if (this.amountVIP.isVip == 0) {
|
uni.pro.navigateTo('/pages/member/index', {
|
||||||
// 跳转到开通页面
|
shopId: uni.cache.get('shopUser')
|
||||||
uni.navigateTo({
|
})
|
||||||
url: '/pages/member/activatedmemberone?shopId=' + uni.cache.get('shopUser')
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
uni.pro.navigateTo('/pages/member/index', {
|
|
||||||
shopId: uni.cache.get('shopUser')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -422,18 +418,26 @@
|
|||||||
} else {
|
} else {
|
||||||
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
|
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
|
||||||
// console.log(isPwd,'是否设置了支付密码')
|
// console.log(isPwd,'是否设置了支付密码')
|
||||||
if (uni.cache.get('userInfo').isPwd == 0) {
|
if ( this.amountVIP.isVip == 0 ) {//非会员情况
|
||||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
|
||||||
shopId_id: uni.cache.get('shopUser')
|
this.goRecharge();
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading()
|
console.log(this.amountVIP)
|
||||||
// this.payPasswordShow = false;
|
if (uni.cache.get('userInfo').isPwd == 0) {
|
||||||
this.ispws = true
|
uni.navigateTo({
|
||||||
this.$nextTick(() => {
|
url: '/pages/member/setPassword?shopUserInfo=' + JSON.stringify(this.amountVIP)
|
||||||
// this.$refs.payPwd.onPayUp();
|
})
|
||||||
})
|
|
||||||
|
} else {
|
||||||
|
uni.hideLoading()
|
||||||
|
// this.payPasswordShow = false;
|
||||||
|
this.ispws = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
// this.$refs.payPwd.onPayUp();
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -534,8 +538,8 @@
|
|||||||
} else if (res.data == 3) {
|
} else if (res.data == 3) {
|
||||||
this.showToastUppop('未设置支付密码')
|
this.showToastUppop('未设置支付密码')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
uni.navigateTo({
|
||||||
shopId_id: uni.cache.get('shopUser')
|
url: '/pages/member/setPassword?shopUserInfo=' + JSON.stringify(this.amountVIP)
|
||||||
})
|
})
|
||||||
}, 1500)
|
}, 1500)
|
||||||
|
|
||||||
@@ -906,24 +910,25 @@
|
|||||||
.paymentMethod_content{
|
.paymentMethod_content{
|
||||||
background-color: $uni-bg-color;
|
background-color: $uni-bg-color;
|
||||||
border-radius: 22rpx;
|
border-radius: 22rpx;
|
||||||
padding:30rpx 0;
|
padding:30rpx 0 0 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.paymentMethod_title{
|
.paymentMethod_title{
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
margin-bottom: 30rpx;
|
// margin-bottom: 30rpx;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.method_list{
|
.method_list{
|
||||||
padding: 20rpx 30rpx;
|
padding: 40rpx 30rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.method_list_top{
|
.method_list_top{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
.method_list_top_left{
|
.method_list_top_left{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
.icon{
|
.icon{
|
||||||
width: 54.67rpx!important;
|
width: 54.67rpx!important;
|
||||||
height: 48rpx!important;
|
height: 48rpx!important;
|
||||||
@@ -934,13 +939,18 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
.method_list_top_cen{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.method_list_bom{
|
.method_list_bom{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
.balance{
|
.balance{
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
margin-left: 70rpx;
|
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
.topUpNow{
|
.topUpNow{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- 顶部面板 -->
|
<!-- 顶部面板 -->
|
||||||
<view class="top--panel">
|
<view class="top--panel">
|
||||||
<navseat :opacity='opacity' :search="true" @searchVal="searchVal" :titleshow='true' @navigateBacknav='navigateBacknav'
|
<navseat :opacity='opacity' :inputshow="true" :readonly="true" @searchStatus="searchStatus" :titleshow='true' @navigateBacknav='navigateBacknav'
|
||||||
:navigateBacknavtitle='true'></navseat>
|
:navigateBacknavtitle='true'></navseat>
|
||||||
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
|
<!-- 顶部面板,可添加所需要放在页面顶部的内容代码。比如banner图 -->
|
||||||
<image class="panelimgbackground"
|
<image class="panelimgbackground"
|
||||||
@@ -59,14 +59,15 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view v-if="item.isPauseSale != 0 " class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
|
<view v-if="item.isPauseSale != 0 || item.isSale == 0 " class="flex-between" style="margin-top: 32rpx;margin-bottom: 48rpx;">
|
||||||
<view class="panelfiveitemsex flex-between">
|
<view class="panelfiveitemsex flex-between">
|
||||||
<view class="panelfiveitemsex_oen"><text>¥</text><text>{{item.lowPrice}}</text><text>/份</text></view>
|
<view class="panelfiveitemsex_oen"><text>¥</text><text>{{item.lowPrice}}</text><text>/份</text></view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="panelfiveitemNum" >
|
<view class="panelfiveitemNum" >
|
||||||
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
|
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
|
||||||
<text class="t">已售罄</text>
|
<text class="t" v-if="item.isSale == 0" >非可售时间</text>
|
||||||
|
<text class="t" v-else-if="item.isPauseSale != 0" >已售罄</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -106,7 +107,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.isPauseSale != 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;background-color: rgba(255,255,255,0.5);"></view>
|
<view v-if="item.isPauseSale != 0 || item.isSale == 0" style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 9,background-color: rgba(255,255,255,0.5);"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -143,7 +144,7 @@
|
|||||||
<image class="goodsImg" src="@/static/1.gif" mode="" v-else :lazy-load="true"></image>
|
<image class="goodsImg" src="@/static/1.gif" mode="" v-else :lazy-load="true"></image>
|
||||||
<view v-if="item.name=='热销'" class="topSort" :class="'c'+(index1+1)">TOP{{index1+1}}
|
<view v-if="item.name=='热销'" class="topSort" :class="'c'+(index1+1)">TOP{{index1+1}}
|
||||||
</view>
|
</view>
|
||||||
<view class="goods_right">
|
<view class="goods_right" style="overflow: hidden;">
|
||||||
<!-- <text class="suit" v-if="item1.suit > 1">「{{item1.suit}}份起点」</text> -->
|
<!-- <text class="suit" v-if="item1.suit > 1">「{{item1.suit}}份起点」</text> -->
|
||||||
<view class="name">{{ item1.name }}</view>
|
<view class="name">{{ item1.name }}</view>
|
||||||
<view class="lookBack" v-if="item.name=='热销'">本店回头客第{{index1+1}}名</view>
|
<view class="lookBack" v-if="item.name=='热销'">本店回头客第{{index1+1}}名</view>
|
||||||
@@ -151,11 +152,12 @@
|
|||||||
<view class="monthlySale">月售{{item1.stockNumber}}</view>
|
<view class="monthlySale">月售{{item1.stockNumber}}</view>
|
||||||
|
|
||||||
|
|
||||||
<view v-if="item1.isPauseSale != 0 " class="flex-between">
|
<view v-if="item1.isPauseSale != 0 || item.isSale == 0 " class="flex-between">
|
||||||
<view class="money">¥<text class="money_num">{{ item1.lowPrice }}</text>/份</view>
|
<view class="money">¥<text class="money_num">{{ item1.lowPrice }}</text>/份</view>
|
||||||
<view class="flex-end" >
|
<view class="flex-end" >
|
||||||
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
|
<view class="sku-wrap flex-center" style="background-color: #CECECE;">
|
||||||
<text class="t">已售罄</text>
|
<text class="t" v-if="item1.isSale == 0" >非可售时间</text>
|
||||||
|
<text class="t" v-else-if="item1.isPauseSale != 0" >已售罄</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -196,7 +198,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item1.isPauseSale != 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;background-color: rgba(255,255,255,0.5);"></view>
|
<view v-if="item1.isPauseSale != 0 || item1.isSale == 0 " style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 9background-color: rgba(255,255,255,0.5);"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fill-last" :style="{ 'height':fillHeight + 'px' }"></view>
|
<view class="fill-last" :style="{ 'height':fillHeight + 'px' }"></view>
|
||||||
@@ -444,8 +446,6 @@
|
|||||||
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
|
this.tableCode = this.getQueryString(decodeURIComponent(e.q), 'code')
|
||||||
uni.cache.set('tableCode', this.tableCode)
|
uni.cache.set('tableCode', this.tableCode)
|
||||||
}
|
}
|
||||||
uni.cache.set('types', 'types');
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
if (this.socketTicket) {
|
if (this.socketTicket) {
|
||||||
@@ -465,10 +465,9 @@
|
|||||||
scrollTop: 0,
|
scrollTop: 0,
|
||||||
duration: 0
|
duration: 0
|
||||||
});
|
});
|
||||||
if (!uni.cache.get('token')) {
|
console.log(uni.cache.get('token'))
|
||||||
await this.$onLaunched;
|
|
||||||
}
|
console.log(14)
|
||||||
uni.$on('message', this.getMessage)
|
|
||||||
_this.getLocation()
|
_this.getLocation()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -494,6 +493,7 @@
|
|||||||
userId: uni.cache.get('userInfo').id,
|
userId: uni.cache.get('userInfo').id,
|
||||||
"type": "connect",
|
"type": "connect",
|
||||||
})
|
})
|
||||||
|
uni.$on('message', this.getMessage)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -563,7 +563,12 @@
|
|||||||
// e.currentTarget.src
|
// e.currentTarget.src
|
||||||
},
|
},
|
||||||
|
|
||||||
searchVal (e) {
|
searchStatus (e) {
|
||||||
|
if ( e == "searchClick" ) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/order_food/order_food_search?tableCode=' + uni.cache.get('tableCode')
|
||||||
|
});
|
||||||
|
}
|
||||||
console.log(e)
|
console.log(e)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -736,7 +741,7 @@
|
|||||||
* @param {Object} index1
|
* @param {Object} index1
|
||||||
*/
|
*/
|
||||||
async clickspecifications(item1, index, index1, type) {
|
async clickspecifications(item1, index, index1, type) {
|
||||||
if ( item1.isPauseSale != 0 ) {
|
if ( item1.isPauseSale != 0 || item1.isSale == 0 ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.skuidname = []
|
this.skuidname = []
|
||||||
@@ -956,6 +961,7 @@
|
|||||||
* @param {Object} msg
|
* @param {Object} msg
|
||||||
*/
|
*/
|
||||||
getMessage(msg) { //wss 回显数据
|
getMessage(msg) { //wss 回显数据
|
||||||
|
console.log(msg)
|
||||||
if (msg == 1) { // 网络在连接
|
if (msg == 1) { // 网络在连接
|
||||||
this.fixedtrue = true
|
this.fixedtrue = true
|
||||||
return false
|
return false
|
||||||
@@ -1064,7 +1070,6 @@
|
|||||||
/* 获取最后一项的高度,设置填充高度。判断和填充时做了 +-20 的操作,是为了滚动时更好的定位 */
|
/* 获取最后一项的高度,设置填充高度。判断和填充时做了 +-20 的操作,是为了滚动时更好的定位 */
|
||||||
let last = res[res.length - 1].height;
|
let last = res[res.length - 1].height;
|
||||||
if (last - 20 < this.scrollHeight) {
|
if (last - 20 < this.scrollHeight) {
|
||||||
// this.fillHeight = this.scrollHeight - last + 20; //这是吸到顶部的距离
|
|
||||||
this.fillHeight = 200;
|
this.fillHeight = 200;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -1110,10 +1115,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$bg: #fafafa;
|
|
||||||
$tabLeft: 200upx;
|
|
||||||
$itemH: 100upx;
|
|
||||||
$cartH: 90upx;
|
|
||||||
|
|
||||||
/* 容器 */
|
/* 容器 */
|
||||||
.container {
|
.container {
|
||||||
@@ -1310,8 +1312,7 @@
|
|||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
.sku-wrap {
|
.sku-wrap {
|
||||||
width: 138rpx;
|
padding: 10rpx 20rpx;
|
||||||
height: 54rpx;
|
|
||||||
background: #E3AD7F;
|
background: #E3AD7F;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -2077,8 +2078,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sku-wrap {
|
.sku-wrap {
|
||||||
width: 138rpx;
|
padding: 10rpx 20rpx;
|
||||||
height: 54rpx;
|
|
||||||
background: #E3AD7F;
|
background: #E3AD7F;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
|
|||||||
1456
pages/order_food/order_food_search.vue
Normal file
1456
pages/order_food/order_food_search.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
|||||||
<view class="code-wrap">
|
<view class="code-wrap">
|
||||||
<view class="num-wrap">
|
<view class="num-wrap">
|
||||||
<text class="t">账户余额:</text>
|
<text class="t">账户余额:</text>
|
||||||
<text class="num">{{shopInfo.amount || '--'}}</text>
|
<text class="num">{{shopInfo.amount || '0'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="line-code">
|
<view class="line-code">
|
||||||
<tki-barcode ref="tkiBarcode" show :opations="tkiOptions"></tki-barcode>
|
<tki-barcode ref="tkiBarcode" show :opations="tkiOptions"></tki-barcode>
|
||||||
|
|||||||
@@ -1,353 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="container">
|
|
||||||
<view class="towcontent">
|
|
||||||
<view class="towcontentlistxitem flex-start">
|
|
||||||
<view class="towcontentlistxitembox flex-colum"
|
|
||||||
:class="towcontentclickindex == index?'towcontentlistxitemboxopacity':''"
|
|
||||||
v-for="(item,index) in listbox" :key="index" @click="towcontentclick(index,item)">
|
|
||||||
<text>{{item.name}}</text>
|
|
||||||
<image v-if="towcontentclickindex == index"
|
|
||||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
|
|
||||||
</image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="containertop">
|
|
||||||
<view class="containertopbox">
|
|
||||||
<view class="containertopboxitem flex-start" v-for="(item,index) in list" :key="index">
|
|
||||||
<view class="containertopboxitemleft flex-colum"
|
|
||||||
:class="item.status == 0?'':'containertopboxitemlefts'">
|
|
||||||
<view class="containertopboxitemleft_one"
|
|
||||||
:class="item.status == 0?'':'containertopboxitemleft_ones'">
|
|
||||||
<text style="font-size: 28rpx;">¥</text>
|
|
||||||
<text>{{item.couponsAmount || 0}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="containertopboxitemleft_tow"
|
|
||||||
:class="item.status == 0?'':'containertopboxitemleft_tows'">
|
|
||||||
优惠券(元)
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="containertopboxitemright">
|
|
||||||
<view class="containertopboxitemright_one">
|
|
||||||
无门槛使用
|
|
||||||
</view>
|
|
||||||
<view class="containertopboxitemright_tow">
|
|
||||||
通用红包券
|
|
||||||
</view>
|
|
||||||
<view class="containertopboxitemright_there">
|
|
||||||
有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
:class="item.status == 0?'containertopboxitemright_four':'containertopboxitemright_fours'">
|
|
||||||
{{item.status == 0 ? '兑换积分':'已过期'}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
|
||||||
v-if="is_end" mode="aspectFill"></image>
|
|
||||||
<u-loadmore :status="form.status" iconSize='24' fontSize='24' height='40' />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
listbox: [{
|
|
||||||
name: '全部',
|
|
||||||
type: ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '未使用',
|
|
||||||
type: '0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '已过期',
|
|
||||||
type: '1'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
towcontentclickindex: 0,
|
|
||||||
list: [],
|
|
||||||
is_end:false,
|
|
||||||
form: {
|
|
||||||
page: 1, //页数
|
|
||||||
size: 10, //页容量
|
|
||||||
status: 'loadmore',
|
|
||||||
statuses: ''
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
this.ordermineCouponsthis()
|
|
||||||
},
|
|
||||||
onReachBottom() {
|
|
||||||
this.ordermineCouponsthis()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init_fn(e) {
|
|
||||||
this.list = []
|
|
||||||
this.form = {
|
|
||||||
page: 1, //页数
|
|
||||||
size: 10, //页容量
|
|
||||||
status: 'loadmore',
|
|
||||||
statuses: ''
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
if (e) {
|
|
||||||
this.form.statuses = e
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
//TODO handle the exception
|
|
||||||
}
|
|
||||||
this.ordermineCouponsthis()
|
|
||||||
},
|
|
||||||
async ordermineCouponsthis() {
|
|
||||||
try {
|
|
||||||
let res = await this.api.ordermineCoupons({
|
|
||||||
userId: uni.cache.get('userInfo').id,
|
|
||||||
status: this.form.statuses,
|
|
||||||
page: this.form.page,
|
|
||||||
size: this.form.size,
|
|
||||||
orderId:""
|
|
||||||
})
|
|
||||||
if (res.data.pages < this.form.page) {
|
|
||||||
this.form.status = 'nomore'
|
|
||||||
if (this.form.page == 1 && res.data.list == 0) {
|
|
||||||
this.is_end = true
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
this.form.status = 'loading';
|
|
||||||
this.form.page = ++this.form.page;
|
|
||||||
setTimeout(() => {
|
|
||||||
this.list = [...this.list, ...res.data.list];
|
|
||||||
this.form.status = 'loading';
|
|
||||||
if (res.data.pageNum == res.data.pages) {
|
|
||||||
this.form.status = 'nomore';
|
|
||||||
} else {
|
|
||||||
this.form.status = 'loading';
|
|
||||||
}
|
|
||||||
}, 500)
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
//TODO handle the exception
|
|
||||||
}
|
|
||||||
},
|
|
||||||
towcontentclick(index, item) {
|
|
||||||
this.towcontentclickindex = index
|
|
||||||
this.form.statuses = item.type
|
|
||||||
this.init_fn(item.type)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
page {
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
.towcontent {
|
|
||||||
padding: 0 28rpx;
|
|
||||||
border-top: 16rpx solid #F9F9F9;
|
|
||||||
|
|
||||||
.towcontentlistxitem {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 32rpx;
|
|
||||||
|
|
||||||
.towcontentlistxitembox {
|
|
||||||
width: 33%;
|
|
||||||
font-family: PingFang SC, PingFang SC;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333333;
|
|
||||||
|
|
||||||
image {
|
|
||||||
margin-top: 6rpx;
|
|
||||||
width: 38.83rpx;
|
|
||||||
height: 8.62rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.towcontentlistxitemboxopacity {
|
|
||||||
width: 33%;
|
|
||||||
font-family: PingFang SC, PingFang SC;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 38.83rpx;
|
|
||||||
height: 8.62rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertop {
|
|
||||||
padding: 40rpx 32rpx;
|
|
||||||
|
|
||||||
.containertopbox {
|
|
||||||
.containertopboxitem::after {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 14rpx;
|
|
||||||
left: 14rpx;
|
|
||||||
content: '';
|
|
||||||
display: inline-block;
|
|
||||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/coupontop.png) no-repeat;
|
|
||||||
width: 72.83rpx;
|
|
||||||
height: 77.14rpx;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitem {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
width: 100%;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.containertopboxitemleft {
|
|
||||||
position: relative;
|
|
||||||
width: 182rpx;
|
|
||||||
height: 192rpx;
|
|
||||||
background: #F1CB66;
|
|
||||||
border-radius: 18rpx 0rpx 0rpx 18rpx;
|
|
||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
|
||||||
|
|
||||||
::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0rpx;
|
|
||||||
left: 166rpx;
|
|
||||||
background: #f9f9f9;
|
|
||||||
display: inline-block;
|
|
||||||
width: 32rpx;
|
|
||||||
height: 16rpx;
|
|
||||||
border-radius: 0 0 32rpx 32rpx;
|
|
||||||
z-index: 999;
|
|
||||||
}
|
|
||||||
|
|
||||||
::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0rpx;
|
|
||||||
left: 166rpx;
|
|
||||||
background: #f9f9f9;
|
|
||||||
display: inline-block;
|
|
||||||
width: 32rpx;
|
|
||||||
height: 16rpx;
|
|
||||||
line-height: 32rpx;
|
|
||||||
border-radius: 32rpx 32rpx 0 0;
|
|
||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(255, 255, 255, 0.16);
|
|
||||||
z-index: 999;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemleft_one {
|
|
||||||
text {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 60rpx;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemleft_ones {
|
|
||||||
text {
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemleft_tow {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemleft_tows {
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemlefts {
|
|
||||||
background: #F7F7F7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemright {
|
|
||||||
position: relative;
|
|
||||||
padding: 0 32rpx;
|
|
||||||
flex: auto;
|
|
||||||
height: 192rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
|
||||||
border-radius: 0rpx 18rpx 18rpx 0rpx;
|
|
||||||
|
|
||||||
.containertopboxitemright_one {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #666666;
|
|
||||||
padding: 12rpx 0;
|
|
||||||
border-bottom: 1rpx dotted #707070;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemright_tow {
|
|
||||||
margin-top: 14rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 32rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemright_there {
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemright_four {
|
|
||||||
position: absolute;
|
|
||||||
right: 32rpx;
|
|
||||||
top: 50%;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #FFFFFF;
|
|
||||||
padding: 0 14rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
line-height: 48rpx;
|
|
||||||
text-align: center;
|
|
||||||
background: #FE665E;
|
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.containertopboxitemright_fours {
|
|
||||||
position: absolute;
|
|
||||||
right: 32rpx;
|
|
||||||
top: 50%;
|
|
||||||
font-family: PingFang SC, PingFang SC;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
|
||||||
padding: 0 14rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
line-height: 48rpx;
|
|
||||||
text-align: center;
|
|
||||||
background: #F7F7F7;
|
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="containertop">
|
<view class="containertop">
|
||||||
<view class="containertopbox">
|
<view class="containertopbox">
|
||||||
<view class="containertopboxitem flex-start" v-for="(item,index) in list" :key="index">
|
<view class="containertopboxitem flex-start" v-for="(item,index) in list" :key="index">
|
||||||
@@ -32,15 +33,16 @@
|
|||||||
无门槛使用
|
无门槛使用
|
||||||
</view>
|
</view>
|
||||||
<view class="containertopboxitemright_tow">
|
<view class="containertopboxitemright_tow">
|
||||||
通用红包券
|
<view>通用红包券</view>
|
||||||
|
<view
|
||||||
|
:class="item.status == 0?'containertopboxitemright_four containertopboxitemright_btn':'containertopboxitemright_fours containertopboxitemright_btn'">
|
||||||
|
{{item.status == 0 ? '去使用':'已过期'}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="containertopboxitemright_there">
|
<view class="containertopboxitemright_there">
|
||||||
有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
|
有效期至:{{$u.timeFormat(item.endTime, 'yyyy/mm/dd') || '0'}}
|
||||||
</view>
|
</view>
|
||||||
<view
|
|
||||||
:class="item.status == 0?'containertopboxitemright_four':'containertopboxitemright_fours'">
|
|
||||||
{{item.status == 0 ? '兑换积分':'已过期'}}
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
<image style="margin:32rpx auto;" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/nomore.png"
|
||||||
@@ -191,6 +193,7 @@
|
|||||||
.containertop {
|
.containertop {
|
||||||
padding: 40rpx 32rpx;
|
padding: 40rpx 32rpx;
|
||||||
.containertopbox {
|
.containertopbox {
|
||||||
|
margin-top: 8rpx;
|
||||||
.containertopboxitem::after {
|
.containertopboxitem::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 14rpx;
|
bottom: 14rpx;
|
||||||
@@ -204,7 +207,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.containertopboxitem {
|
.containertopboxitem {
|
||||||
margin-top: 20rpx;
|
margin-bottom: 32rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
@@ -212,7 +215,7 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 182rpx;
|
width: 182rpx;
|
||||||
height: 192rpx;
|
height: 192rpx;
|
||||||
background: #F1CB66;
|
background: #E3AD7F;
|
||||||
border-radius: 18rpx 0rpx 0rpx 18rpx;
|
border-radius: 18rpx 0rpx 0rpx 18rpx;
|
||||||
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||||
|
|
||||||
@@ -287,19 +290,21 @@
|
|||||||
|
|
||||||
.containertopboxitemright_one {
|
.containertopboxitemright_one {
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: bold;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
padding: 12rpx 0;
|
padding: 16rpx 0 16rpx 0;
|
||||||
border-bottom: 1rpx dotted #707070;
|
border-bottom: 1rpx dotted #707070;
|
||||||
}
|
}
|
||||||
|
|
||||||
.containertopboxitemright_tow {
|
.containertopboxitemright_tow {
|
||||||
margin-top: 14rpx;
|
margin-top: 18rpx;
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: bold;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.containertopboxitemright_there {
|
.containertopboxitemright_there {
|
||||||
@@ -308,37 +313,23 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999999;
|
color: #999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.containertopboxitemright_four {
|
.containertopboxitemright_btn{
|
||||||
position: absolute;
|
|
||||||
right: 32rpx;
|
|
||||||
top: 50%;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #FFFFFF;
|
padding: 8rpx 22rpx;
|
||||||
padding: 0 14rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
line-height: 48rpx;
|
|
||||||
text-align: center;
|
|
||||||
background: #FE665E;
|
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.containertopboxitemright_four {
|
||||||
|
color: #FFFFFF;
|
||||||
|
background: #333;
|
||||||
|
}
|
||||||
|
|
||||||
.containertopboxitemright_fours {
|
.containertopboxitemright_fours {
|
||||||
position: absolute;
|
|
||||||
right: 32rpx;
|
|
||||||
top: 50%;
|
|
||||||
font-family: PingFang SC, PingFang SC;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999999;
|
color: #999999;
|
||||||
padding: 0 14rpx;
|
|
||||||
height: 48rpx;
|
|
||||||
line-height: 48rpx;
|
|
||||||
text-align: center;
|
|
||||||
background: #F7F7F7;
|
background: #F7F7F7;
|
||||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,12 +21,17 @@
|
|||||||
<view class="list_item">
|
<view class="list_item">
|
||||||
<view class="list_item_left">账号</view>
|
<view class="list_item_left">账号</view>
|
||||||
<view class="list_item_right ">
|
<view class="list_item_right ">
|
||||||
<button open-type="getPhoneNumber" @getphonenumber="getPhone">
|
<button v-if="!mobile" open-type="getPhoneNumber" @getphonenumber="getPhone">
|
||||||
<view class="flex-colum-end">
|
<view class="flex-colum-end">
|
||||||
<view class="text">{{phonetitle || '请授权手机号'}}</view>
|
<view class="text">请授权手机号</view>
|
||||||
<view class="place" v-if="phonetitle">绑定的手机号不能修改</view>
|
|
||||||
</view>
|
</view>
|
||||||
</button>
|
</button>
|
||||||
|
<view v-else >
|
||||||
|
<view class="flex-colum-end">
|
||||||
|
<view class="text">{{phonetitle }}</view>
|
||||||
|
<view class="place">绑定的手机号不能修改</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list_item">
|
<view class="list_item">
|
||||||
@@ -64,7 +69,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="save" @click="sumbit">保存</view>
|
<view class="save active" @click="$u.debounce(sumbit, 500)">保存</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -104,6 +109,7 @@
|
|||||||
userHeadImg: "",
|
userHeadImg: "",
|
||||||
nickName: '',
|
nickName: '',
|
||||||
birthDay: "",
|
birthDay: "",
|
||||||
|
mobile: "",
|
||||||
phonetitle: ""
|
phonetitle: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -120,6 +126,7 @@
|
|||||||
}
|
}
|
||||||
this.birthDay = this.userInfo.birthDay;
|
this.birthDay = this.userInfo.birthDay;
|
||||||
this.phonetitle = this.userInfo.telephone ? (this.userInfo.telephone.substr(0, 3) + "****" + this.userInfo.telephone.substr(7)) : ""
|
this.phonetitle = this.userInfo.telephone ? (this.userInfo.telephone.substr(0, 3) + "****" + this.userInfo.telephone.substr(7)) : ""
|
||||||
|
this.mobile = this.userInfo.telephone;
|
||||||
this.date = this.getDate({ format: true})
|
this.date = this.getDate({ format: true})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -163,9 +170,6 @@
|
|||||||
* @param {Object} d
|
* @param {Object} d
|
||||||
*/
|
*/
|
||||||
async getPhone(d) {
|
async getPhone(d) {
|
||||||
if ( this.phonetitle ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (d.detail.iv) {
|
if (d.detail.iv) {
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
@@ -176,7 +180,8 @@
|
|||||||
encryptedData: d.detail.encryptedData,
|
encryptedData: d.detail.encryptedData,
|
||||||
iv: d.detail.iv,
|
iv: d.detail.iv,
|
||||||
})
|
})
|
||||||
this.phonetitle = res.data
|
this.phonetitle = res.data.substr(0, 3) + "****" + res.data.substr(7)
|
||||||
|
this.mobile = res.data;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -243,7 +248,7 @@
|
|||||||
nickName: this.nickName,
|
nickName: this.nickName,
|
||||||
sex: this.sex,
|
sex: this.sex,
|
||||||
birthDay: this.birthDay,
|
birthDay: this.birthDay,
|
||||||
telephone: this.phonetitle == '请授权手机号' ? '' : this.phonetitle
|
telephone: this.mobile,
|
||||||
})
|
})
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
@@ -305,6 +310,7 @@
|
|||||||
margin-right: 16rpx;
|
margin-right: 16rpx;
|
||||||
}
|
}
|
||||||
button{
|
button{
|
||||||
|
outline: none;
|
||||||
text{
|
text{
|
||||||
color: #fff!important;
|
color: #fff!important;
|
||||||
}
|
}
|
||||||
@@ -312,6 +318,9 @@
|
|||||||
button::after{
|
button::after{
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
button:active {
|
||||||
|
background-color: inherit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -320,7 +329,7 @@
|
|||||||
height: 96rpx;
|
height: 96rpx;
|
||||||
line-height: 96rpx;
|
line-height: 96rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background: #E0E0E0;
|
background-color: #E0E0E0;
|
||||||
border-radius: 48rpx;
|
border-radius: 48rpx;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@@ -331,6 +340,10 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
.save.active{
|
||||||
|
background-color: #E3AD7F;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,227 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="content">
|
|
||||||
<view v-if="isPwd == 0">
|
|
||||||
<view class="contenttext flex-center">
|
|
||||||
{{form.password.length == 6?'请再次确认支付密码':"请设置新密码,用于支付验证"}}
|
|
||||||
</view>
|
|
||||||
<view class="contentbox flex-between">
|
|
||||||
<view class="contentboxitem flex-colum">
|
|
||||||
{{consumeFee.slice(0,1)}}
|
|
||||||
</view>
|
|
||||||
<view class="contentboxitem flex-colum">
|
|
||||||
{{consumeFee.slice(1,2)}}
|
|
||||||
</view>
|
|
||||||
<view class="contentboxitem flex-colum">
|
|
||||||
{{consumeFee.slice(2,3)}}
|
|
||||||
</view>
|
|
||||||
<view class="contentboxitem flex-colum">
|
|
||||||
{{consumeFee.slice(3,4)}}
|
|
||||||
</view>
|
|
||||||
<view class="contentboxitem flex-colum">
|
|
||||||
{{consumeFee.slice(4,5)}}
|
|
||||||
</view>
|
|
||||||
<view class="contentboxitem flex-colum">
|
|
||||||
{{consumeFee.slice(5,6)}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="" v-else>
|
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<cwx-keyboard ref="keyboard" v-if="isPwd == 0" @confirmEvent="confirmEvent"
|
|
||||||
:money.sync="consumeFee"></cwx-keyboard>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import cwxKeyboard from '@/components/cwx-keyboard/cwx-keyboard';
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
cwxKeyboard
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isPwd: uni.cache.get('userInfo').isPwd,
|
|
||||||
form: {
|
|
||||||
mobile: uni.cache.get('userInfo').telephone,
|
|
||||||
password: '', //密码
|
|
||||||
payPassword: '', //二次密码
|
|
||||||
checkCode: ''
|
|
||||||
},
|
|
||||||
passwords: false,
|
|
||||||
payPasswords: false,
|
|
||||||
// 注册定时器 初始值
|
|
||||||
second: 60,
|
|
||||||
showText: true,
|
|
||||||
Recapture: '发送验证码',
|
|
||||||
consumeFee: '', //第一遍
|
|
||||||
consumeFees: '', //第二遍
|
|
||||||
money: '',
|
|
||||||
showoverlay: true
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad() {
|
|
||||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
|
||||||
uni.setNavigationBarTitle({
|
|
||||||
title: '忘记支付密码', // 标题文本,必须是字符串
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
consumeFee(newVal, oldVal) {
|
|
||||||
if (this.form.password.length == 6) {
|
|
||||||
this.form.payPassword = newVal
|
|
||||||
if (this.form.payPassword.length == 6) {
|
|
||||||
this.userInfosavePayPassword()
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.form.password = newVal
|
|
||||||
if (this.form.password.length == 6) {
|
|
||||||
this.$refs.keyboard._handleClearKey() //清空
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
confirmEvent(e) {
|
|
||||||
console.log(e)
|
|
||||||
},
|
|
||||||
async CodeRegister() {
|
|
||||||
const res = await this.api.phoneValidateCode({
|
|
||||||
// post 手机验证码
|
|
||||||
phone: this.form.mobile
|
|
||||||
});
|
|
||||||
if (res) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '验证码获取成功',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
// 定时器
|
|
||||||
this.showText = false;
|
|
||||||
this.Recapture = '重新获取';
|
|
||||||
var interval = setInterval(() => {
|
|
||||||
let times = --this.second;
|
|
||||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
|
||||||
}, 1000);
|
|
||||||
setTimeout(() => {
|
|
||||||
clearInterval(interval);
|
|
||||||
this.second = 60;
|
|
||||||
this.showText = true;
|
|
||||||
}, 60000);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loginwxuserInfo() {
|
|
||||||
let res = await this.api.loginwxuserInfo({
|
|
||||||
userId: uni.cache.get('userInfo').id
|
|
||||||
})
|
|
||||||
if (res.code == 0) {
|
|
||||||
uni.cache.set('userInfo', res.data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async userInfosavePayPassword() {
|
|
||||||
if (this.form.mobile.length != 11 && this.isPwd == 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '手机号必须是11位',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.password == null || this.form.password == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入密码',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.payPassword == null || this.form.payPassword == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入确认密码',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.password.length != 6 || this.form.payPassword.length != 6) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '密码必须是6位',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.payPassword != this.form.password) {
|
|
||||||
this.$refs.keyboard._handleClearKey() //清空
|
|
||||||
this.form.payPassword = ''
|
|
||||||
this.form.password = ''
|
|
||||||
uni.showToast({
|
|
||||||
title: '密码和确认密码不一致',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.form.checkCode == null || this.form.checkCode == '') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请输入验证码',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let res = await this.api.loginresetPwd({
|
|
||||||
pwd: this.form.password,
|
|
||||||
code: this.form.checkCode
|
|
||||||
})
|
|
||||||
|
|
||||||
if (res.code == 0) {
|
|
||||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '修改成功',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '设置成功',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 获取用户信息
|
|
||||||
this.loginwxuserInfo()
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateBack();
|
|
||||||
}, 1000);
|
|
||||||
} else {
|
|
||||||
this.$refs.keyboard._handleClearKey() //清空
|
|
||||||
this.form.payPassword = ''
|
|
||||||
this.form.password = ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.content {
|
|
||||||
height: 100%;
|
|
||||||
background: #FFFFFF;
|
|
||||||
|
|
||||||
.contenttext {
|
|
||||||
padding: 48rpx 0;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 40rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contentbox {
|
|
||||||
margin-top: 48rpx;
|
|
||||||
padding: 0 56rpx;
|
|
||||||
|
|
||||||
.contentboxitem {
|
|
||||||
width: 88rpx;
|
|
||||||
height: 88rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
||||||
border: 2rpx solid #999999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,384 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="container">
|
|
||||||
<!-- <view class="user-info-wrap" @click="clickinformation">
|
|
||||||
<view style="width: 108rpx; height: 108rpx;border-radius: 50%;">
|
|
||||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
|
|
||||||
:src="userInfo.headImg" mode="aspectFill">
|
|
||||||
</image>
|
|
||||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-else src="@/static/avatar.png"
|
|
||||||
mode="aspectFill">
|
|
||||||
</image>
|
|
||||||
</view>
|
|
||||||
<view class="info flex-colum-start">
|
|
||||||
<text class="phone">{{userInfo.nickName || '无'}}</text>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<navseat :opacity='opacity' class="navseat" title='个人中心' :iconshow="false" :titleshow='true'></navseat>
|
|
||||||
<view class="boxtop">
|
|
||||||
<!-- #ifndef MP-WEIXIN -->
|
|
||||||
<view :style="{'height':Topdistance+'px'}"></view>
|
|
||||||
<!-- #endif -->
|
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
|
||||||
<view :style="{'height':HeighT.customBar+HeighT.heightBar+'px'}"></view>
|
|
||||||
<!-- #endif -->
|
|
||||||
<view class="boxtop_top flex-between">
|
|
||||||
<view class="boxtop_topleft">
|
|
||||||
<view class="flex-start" v-if="userInfo" @click="clickinformation">
|
|
||||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
|
|
||||||
:src="userInfo.headImg" mode="aspectFill">
|
|
||||||
</image>
|
|
||||||
<text>{{userInfo.nickName || '无'}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="flex-start" v-else @click="loginClick">
|
|
||||||
<text>去登录</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<image style="width: 44rpx; height: 42.26rpx;" @click="clickphone()"
|
|
||||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/kf.png" mode="aspectFill">
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<image @click="memberlist" class="boxtop_botton"
|
|
||||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/member.png" mode="aspectFit"></image>
|
|
||||||
</view>
|
|
||||||
<view class="userinfoone" v-if="teblist.length!=0">
|
|
||||||
<view class="userinfoonebox">
|
|
||||||
<view class="userinfooneboxitem flex-between" @click="clickinfo(item,index)"
|
|
||||||
v-for="(item,index) in teblist" :key="index">
|
|
||||||
<view class="userinfooneboxitemleft flex-start">
|
|
||||||
<image :src="item.shareImg" mode="aspectFill"></image>
|
|
||||||
<text>{{item.name}}</text>
|
|
||||||
</view>
|
|
||||||
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<listitem :list='list' v-if="list.length!=0"></listitem>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
|
||||||
import listitem from "@/components/listitem.vue";
|
|
||||||
import navseat from '@/components/navseat.vue'
|
|
||||||
export default {
|
|
||||||
components: {
|
|
||||||
listitem,
|
|
||||||
navseat
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
titlename: '个人中心',
|
|
||||||
opacity: false,
|
|
||||||
userInfo: {},
|
|
||||||
teblist: [],
|
|
||||||
list: [],
|
|
||||||
Topdistance: '',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad() {},
|
|
||||||
computed: {
|
|
||||||
HeighT() { //手机类型的尺寸
|
|
||||||
return this.$store.getters.is_BarHeight
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
setTimeout(() => {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.GetTop()
|
|
||||||
});
|
|
||||||
}, 1000)
|
|
||||||
// 当组件挂载完成后获取距离
|
|
||||||
|
|
||||||
},
|
|
||||||
onPageScroll(e) {
|
|
||||||
if (e.scrollTop <= 44) { //搜索导航栏
|
|
||||||
this.opacity = false
|
|
||||||
} else {
|
|
||||||
this.opacity = true
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
if (uni.cache.get('token')) {
|
|
||||||
this.init_fn()
|
|
||||||
this.loginwxuserInfo()
|
|
||||||
this.tbPlatformDict()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
clickphone() {
|
|
||||||
uni.makePhoneCall({
|
|
||||||
phoneNumber: uni.cache.get('userInfo').custPhone
|
|
||||||
});
|
|
||||||
},
|
|
||||||
clickinformation() {
|
|
||||||
uni.pro.navigateTo('user/information')
|
|
||||||
},
|
|
||||||
//获取元素距离顶部的距离
|
|
||||||
GetTop() {
|
|
||||||
this.$u.getRect('.content').then(res => {
|
|
||||||
console.log(1111, res)
|
|
||||||
this.Topdistance = res.height //滚动距离
|
|
||||||
})
|
|
||||||
},
|
|
||||||
memberlist() {
|
|
||||||
if (uni.cache.get('token')) {
|
|
||||||
uni.pro.navigateTo('member/list')
|
|
||||||
} else {
|
|
||||||
this.loginClick()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
//退出登录
|
|
||||||
boxClick() {
|
|
||||||
uni.showModal({
|
|
||||||
title: '注意',
|
|
||||||
content: '确定要退出登录吗?',
|
|
||||||
success: async (res) => {
|
|
||||||
if (res.confirm) {
|
|
||||||
try {
|
|
||||||
await this.api.loginOut();
|
|
||||||
} catch (e) {
|
|
||||||
//TODO handle the exception
|
|
||||||
}
|
|
||||||
uni.cache.clear();
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
loginClick() {
|
|
||||||
uni.cache.clear();
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/login/login'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 精选推荐
|
|
||||||
// 下面初始数据
|
|
||||||
init_fn() {
|
|
||||||
this.list = []
|
|
||||||
this.form = {
|
|
||||||
address: uni.cache.get('getLocationstorage').address, //地址
|
|
||||||
lng: uni.cache.get('getLocationstorage').lng,
|
|
||||||
lat: uni.cache.get('getLocationstorage').lat,
|
|
||||||
type: '', //品类
|
|
||||||
orderBy: 5, //0.今日上新 1.离我最近 2.销量优先 3.价格优先 4.热榜推荐
|
|
||||||
other: '', //附近1KM 1选中 0不选中
|
|
||||||
page: 1, //页数
|
|
||||||
size: 10, //页容量
|
|
||||||
dateType: '',
|
|
||||||
status: 'loadmore'
|
|
||||||
}
|
|
||||||
this.onLoadlist()
|
|
||||||
},
|
|
||||||
async onLoadlist() {
|
|
||||||
try {
|
|
||||||
let res = await this.api.indexlist(this.form)
|
|
||||||
if (res.data.pages < this.form.page) {
|
|
||||||
this.form.status = 'nomore'
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
this.form.status = 'loading';
|
|
||||||
this.form.page = ++this.form.page;
|
|
||||||
setTimeout(() => {
|
|
||||||
this.list = [...this.list, ...res.data.list];
|
|
||||||
this.form.status = 'loading';
|
|
||||||
if (res.data.pageNum == res.data.pages) {
|
|
||||||
this.form.status = 'nomore';
|
|
||||||
} else {
|
|
||||||
this.form.status = 'loading';
|
|
||||||
}
|
|
||||||
}, 500)
|
|
||||||
}
|
|
||||||
} catch (e) {}
|
|
||||||
},
|
|
||||||
clickinfo(item, index) {
|
|
||||||
switch (item.jumpType) {
|
|
||||||
case 'scan': //特殊处理点击
|
|
||||||
switch (item.value) {
|
|
||||||
case 'loginOut':
|
|
||||||
this.boxClick()
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case 'scan_applet':
|
|
||||||
uni.navigateToMiniProgram(JSON.parse(item.value))
|
|
||||||
break
|
|
||||||
case 'relative': //内部页面
|
|
||||||
uni.pro.navigateTo(item.absUrl)
|
|
||||||
break;
|
|
||||||
case 'absolute': //外链url
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/webview/webview?url=${item.menuUrl}`
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loginwxuserInfo() {
|
|
||||||
let res = await this.api.loginwxuserInfo({
|
|
||||||
userId: uni.cache.get('userInfo').id
|
|
||||||
})
|
|
||||||
if (res.code == 0) {
|
|
||||||
uni.cache.set('userInfo', res.data);
|
|
||||||
this.userInfo = uni.cache.get('userInfo')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async tbPlatformDict() {
|
|
||||||
let res = await this.api.tbPlatformDict({
|
|
||||||
type: 'ownMenu'
|
|
||||||
})
|
|
||||||
// console.log(res)
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.teblist = res.data
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// / 更换头像
|
|
||||||
onChooseAvatar(e) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '上传中',
|
|
||||||
mask: true
|
|
||||||
})
|
|
||||||
console.log(e.detail.avatarUrl)
|
|
||||||
let file = e.detail.avatarUrl;
|
|
||||||
uploadImage(file, 'avatar',
|
|
||||||
result => {
|
|
||||||
//将上传后的图片以对象(官方要求的格式)的形式存入uni-file-picker的value值imageValue(imageValue值的结构为数组包对象)用于图片回显
|
|
||||||
// let objAge = {
|
|
||||||
// 'url': result,
|
|
||||||
// 'extname': 'png',
|
|
||||||
// 'name': 'imgss.png'
|
|
||||||
// };
|
|
||||||
// this.userlist.avatar.push(objAge)
|
|
||||||
this.userInfo.avatar = result
|
|
||||||
console.log(this.userInfo.avatar)
|
|
||||||
uni.hideLoading()
|
|
||||||
}, result => {
|
|
||||||
uni.hideLoading()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
orderHandle(type) {
|
|
||||||
this.useStorage.set('orderType', type);
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/order/order'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.user-info-wrap {
|
|
||||||
position: relative;
|
|
||||||
padding: 48rpx 32rpx 88rpx 32rpx;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 750rpx;
|
|
||||||
background: #FFD158;
|
|
||||||
border-radius: 0rpx 0rpx 40rpx 0rpx;
|
|
||||||
|
|
||||||
.info {
|
|
||||||
flex: 1;
|
|
||||||
padding-left: $paddingSize;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
.name {
|
|
||||||
input {
|
|
||||||
text-align: left;
|
|
||||||
font-size: 32upx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.phone {
|
|
||||||
padding-top: 8upx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-info-wrap::after {
|
|
||||||
position: absolute;
|
|
||||||
content: '';
|
|
||||||
bottom: 40rpx;
|
|
||||||
right: 0;
|
|
||||||
width: 40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
text-align: center;
|
|
||||||
background-image: radial-gradient(40rpx at 0px 0px, rgba(0, 0, 0, 0) 40rpx, #fff 40rpx);
|
|
||||||
}
|
|
||||||
|
|
||||||
.boxtop {
|
|
||||||
width: 100%;
|
|
||||||
height: 542rpx;
|
|
||||||
background: url(https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/user.png) no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.boxtop_top {
|
|
||||||
padding: 0 32rpx;
|
|
||||||
margin-top: 52rpx;
|
|
||||||
|
|
||||||
.boxtop_topleft {
|
|
||||||
.flex-start {
|
|
||||||
text {
|
|
||||||
margin-left: 18rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 36rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.boxtop_botton {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
bottom: 0;
|
|
||||||
transform: translatex(-50%);
|
|
||||||
width: 654rpx;
|
|
||||||
height: 160rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.userinfoone {
|
|
||||||
position: relative;
|
|
||||||
padding: 48rpx 28rpx;
|
|
||||||
width: 100%;
|
|
||||||
// top: -40rpx;
|
|
||||||
background: #F6F6F6;
|
|
||||||
// border-radius: 40rpx 0 0rpx 0rpx;
|
|
||||||
|
|
||||||
.userinfoonebox {
|
|
||||||
padding: 32rpx 20rpx 32rpx 52rpx;
|
|
||||||
border-radius: 22rpx;
|
|
||||||
background: #FFFFFF;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.userinfooneboxitem {
|
|
||||||
width: 100%;
|
|
||||||
margin-top: 32rpx;
|
|
||||||
|
|
||||||
.userinfooneboxitemleft {
|
|
||||||
image {
|
|
||||||
width: 41.33rpx;
|
|
||||||
height: 36.9rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
text {
|
|
||||||
margin-left: 32rpx;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #333333;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.userinfooneboxitem:nth-child(1) {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -8,8 +8,8 @@
|
|||||||
<image class="my_info_left_head" :src="userInfo.headImg" mode="aspectFill"></image>
|
<image class="my_info_left_head" :src="userInfo.headImg" mode="aspectFill"></image>
|
||||||
<view class="name">{{userInfo.nickName || '无'}}</view>
|
<view class="name">{{userInfo.nickName || '无'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="my_info_right_qr" v-if="userInfo" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_qRcode.png'" mode="aspectFill"></image>
|
<image class="my_info_right_qr" @click="clickEvent" v-if="shopInfo.isVip!=0" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_qRcode.png'" mode="aspectFill"></image>
|
||||||
<view class="my_info_right" v-else>
|
<view class="my_info_right" @click="clickEvent" v-else>
|
||||||
<text>免费入会</text>
|
<text>免费入会</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -57,18 +57,19 @@
|
|||||||
teblist: [],
|
teblist: [],
|
||||||
myAssetsList: [
|
myAssetsList: [
|
||||||
{ name: "储值", type: "recharge", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"},
|
{ name: "储值", type: "recharge", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/storedValue.png"},
|
||||||
{ name: "积分", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
|
// { name: "积分", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/points.png"},
|
||||||
{ name: "优惠券", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"},
|
{ name: "优惠券", type: "my_coupon", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/coupon.png"},
|
||||||
{ name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
|
// { name: "权益卡", type: "", num: 0, icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/equityCard.png"}
|
||||||
],
|
],
|
||||||
myFunList: [
|
myFunList: [
|
||||||
{ name: "我的优惠券", type: "my_coupon", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_coupon.png"},
|
{ name: "我的优惠券", type: "my_coupon", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_coupon.png"},
|
||||||
{ name: "我的订单", type: "my_order", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_order.png"},
|
{ name: "我的订单", type: "my_order", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_order.png"},
|
||||||
{ name: "收货地址", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_address.png"},
|
// { name: "收货地址", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_address.png"},
|
||||||
{ name: "个人资料", type: "my_info", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/personal.png"},
|
{ name: "个人资料", type: "my_info", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/personal.png"},
|
||||||
{ name: "我的会员卡", type: "my_member", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_member.png"},
|
{ name: "我的会员卡", type: "my_member", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/my_member.png"},
|
||||||
{ name: "关于", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"},
|
// { name: "关于", type: "", icon: "https://czg-qr-order.oss-cn-beijing.aliyuncs.com/my/inRegard.png"},
|
||||||
],
|
],
|
||||||
|
shopInfo: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {},
|
onLoad() {},
|
||||||
@@ -82,13 +83,23 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
if (uni.cache.get('token')) {
|
this.init_fn()
|
||||||
this.init_fn()
|
this.loginwxuserInfo()
|
||||||
this.loginwxuserInfo()
|
if (uni.cache.get('shopUser') ) {
|
||||||
this.tbPlatformDict()
|
this.getShopInfo();
|
||||||
|
} else{
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 下面初始数据
|
||||||
|
init_fn() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户信息
|
||||||
|
*/
|
||||||
async loginwxuserInfo() {
|
async loginwxuserInfo() {
|
||||||
let res = await this.api.loginwxuserInfo({
|
let res = await this.api.loginwxuserInfo({
|
||||||
userId: uni.cache.get('userInfo').id
|
userId: uni.cache.get('userInfo').id
|
||||||
@@ -98,6 +109,8 @@
|
|||||||
this.userInfo = uni.cache.get('userInfo')
|
this.userInfo = uni.cache.get('userInfo')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
async tbPlatformDict() {
|
async tbPlatformDict() {
|
||||||
let res = await this.api.tbPlatformDict({
|
let res = await this.api.tbPlatformDict({
|
||||||
type: 'ownMenu'
|
type: 'ownMenu'
|
||||||
@@ -107,10 +120,7 @@
|
|||||||
this.teblist = res.data
|
this.teblist = res.data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 下面初始数据
|
|
||||||
init_fn() {
|
|
||||||
|
|
||||||
},
|
|
||||||
clickphone() {
|
clickphone() {
|
||||||
uni.makePhoneCall({
|
uni.makePhoneCall({
|
||||||
phoneNumber: uni.cache.get('userInfo').custPhone
|
phoneNumber: uni.cache.get('userInfo').custPhone
|
||||||
@@ -123,8 +133,54 @@
|
|||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取店铺信息
|
||||||
|
*/
|
||||||
|
async getShopInfo() {
|
||||||
|
let res = await this.api.shopUserInfo({
|
||||||
|
"shopId": uni.cache.get('shopUser'),
|
||||||
|
"userId": uni.cache.get('userInfo').id,
|
||||||
|
})
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.shopInfo = res.data
|
||||||
|
}
|
||||||
|
if ( res.data.isVip == 0 ) {
|
||||||
|
this.memberOpen = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看二维码
|
||||||
|
*/
|
||||||
|
clickEvent() {
|
||||||
|
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||||
|
if ( this.shopInfo.isVip == 0 ) {
|
||||||
|
uni.pro.navigateTo('member/memberdetails', {
|
||||||
|
shopId_id: uni.cache.get('shopUser')
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/pay_code/pay_code?shopInfo=' + JSON.stringify(this.shopInfo)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else{
|
||||||
|
uni.pro.navigateTo('member/list', {
|
||||||
|
type: 'user_payCode'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
clickTo(item, index) {
|
clickTo(item, index) {
|
||||||
|
let shopId = null;
|
||||||
|
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||||
|
shopId = uni.cache.get('shopUser');
|
||||||
|
} else{
|
||||||
|
|
||||||
|
}
|
||||||
switch (item.type) {
|
switch (item.type) {
|
||||||
case 'my_order':
|
case 'my_order':
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
@@ -132,14 +188,20 @@
|
|||||||
});
|
});
|
||||||
break
|
break
|
||||||
case 'my_member':
|
case 'my_member':
|
||||||
if (uni.cache.get('token')) {
|
uni.pro.navigateTo('member/list')
|
||||||
uni.pro.navigateTo('member/list')
|
|
||||||
} else {
|
|
||||||
this.loginClick()
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
case 'recharge':
|
case 'recharge':
|
||||||
uni.pro.navigateTo('member/index')
|
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
|
||||||
|
uni.pro.navigateTo('member/index', {
|
||||||
|
shopId: uni.cache.get('shopUser'),
|
||||||
|
type: 'index',
|
||||||
|
})
|
||||||
|
} else{
|
||||||
|
uni.pro.navigateTo('member/list', {
|
||||||
|
type: 'user_recharge'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
case 'my_coupon': //内部页面
|
case 'my_coupon': //内部页面
|
||||||
uni.pro.navigateTo('user/coupon')
|
uni.pro.navigateTo('user/coupon')
|
||||||
@@ -238,7 +300,7 @@
|
|||||||
}
|
}
|
||||||
.my_assets_list{
|
.my_assets_list{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-around;
|
||||||
padding: 0 38rpx;
|
padding: 0 38rpx;
|
||||||
.my_list_item{
|
.my_list_item{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user