no message
This commit is contained in:
parent
e24a07c0fb
commit
3cf58ca7b7
@ -7,21 +7,22 @@
|
|||||||
<view class="my-icons"></view>
|
<view class="my-icons"></view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
<view class="box-xianze">
|
<view class="box-xianze" v-for="(item,index) in dataList" :key="index">
|
||||||
<view class="box-left">
|
<view class="box-left" @click="choose(item)">
|
||||||
<view style="display: flex;align-items: center;margin-bottom: 5px;">
|
<view style="display: flex;align-items: center;margin-bottom: 5px;">
|
||||||
<view class="tapl">默认</view>
|
<view v-if="item.ifDefault == 1" class="tapl">默认</view>
|
||||||
<view class="">具体的详细地址</view>
|
<view class="">{{item.address}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center; font-size: 14px; color: #666666;">
|
<view style="display: flex;align-items: center; font-size: 14px; color: #666666;">
|
||||||
<view class=""> 用户姓名</view>
|
<view class=""> {{item.name}}</view>
|
||||||
<view class=""> 186549451154</view>
|
<view class=""> {{item.mobile}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box-right">
|
<view class="box-right" @click="goedit(item)">
|
||||||
<u-icon name="edit-pen-fill" size="22"></u-icon>
|
<u-icon name="edit-pen-fill" size="22"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="bottom-anniu" @click="goedit()">
|
<view class="bottom-anniu" @click="goedit()">
|
||||||
<view class="">新增收货地址</view>
|
<view class="">新增收货地址</view>
|
||||||
</view>
|
</view>
|
||||||
@ -31,24 +32,54 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
import request from '../../utils/request'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
|
dataList: '',
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goedit() {
|
getList() {
|
||||||
|
request({
|
||||||
|
url: 'business/userManager/mtUserExpressAddress/getList',
|
||||||
|
method: 'get',
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.dataList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goedit(data) {
|
||||||
|
|
||||||
|
if (data != null) {
|
||||||
|
console.log(data)
|
||||||
|
//传值
|
||||||
|
uni.$on('unAddressInfo', function() {
|
||||||
|
uni.$emit('addressInfo', data)
|
||||||
|
})
|
||||||
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesHome/editress/editress'
|
url: '/pagesHome/editress/editress'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
choose(data) {
|
||||||
|
//传值
|
||||||
|
uni.$on('unChooseAddr', function() {
|
||||||
|
uni.$emit('chooseAddr', data)
|
||||||
|
})
|
||||||
|
uni.navigateBack()
|
||||||
|
},
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
<view class="top-lanmu">
|
<view class="top-lanmu">
|
||||||
<view style="width: 90%;margin: 0 auto;">
|
<view style="width: 90%;margin: 0 auto;">
|
||||||
<view class="title-bai">0</view>
|
<view class="title-bai">{{myPoints}}</view>
|
||||||
<view class="size-bai">
|
<view class="size-bai">
|
||||||
<uni-icons type="location" color="#ffffff" size="16"></uni-icons>
|
<uni-icons type="location" color="#ffffff" size="16"></uni-icons>
|
||||||
<text>蓝鲸加油站(总站)</text>
|
<text>蓝鲸加油站(总站)</text>
|
||||||
@ -103,6 +103,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
myPoints: 0,
|
||||||
categoryList: {},
|
categoryList: {},
|
||||||
integralGiftList: {},
|
integralGiftList: {},
|
||||||
title: '',
|
title: '',
|
||||||
@ -126,6 +127,9 @@
|
|||||||
this.getCategoryList();
|
this.getCategoryList();
|
||||||
this.getIntegralGiftList();
|
this.getIntegralGiftList();
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getUserInfoList()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
transferIndex(index, categoryId) {
|
transferIndex(index, categoryId) {
|
||||||
this.qhindex = index
|
this.qhindex = index
|
||||||
@ -160,7 +164,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取个人积分信息
|
|
||||||
gojg(nmb) {
|
gojg(nmb) {
|
||||||
if (nmb == 1) {
|
if (nmb == 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -200,7 +204,19 @@
|
|||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
},
|
||||||
|
// 查询我的积分
|
||||||
|
getUserInfoList() {
|
||||||
|
request({
|
||||||
|
url: '/business/userManager/user/getByUniApp',
|
||||||
|
method: 'get',
|
||||||
|
// params:{}
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.myPoints = res.data.points
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
uni.$off('goodsInfo')
|
uni.$off('goodsInfo')
|
||||||
|
@ -1,65 +1,76 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="container">
|
<view class="container">
|
||||||
|
|
||||||
<view class="my-header">
|
<view class="my-header">
|
||||||
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
||||||
<view class="my-text">编辑收货地址</view>
|
<view class="my-text">收获信息</view>
|
||||||
<view class="my-icons"></view>
|
<view class="my-icons"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dataform">
|
<view class="box-gang">
|
||||||
<u-form :model="dataForm" ref="uForm">
|
|
||||||
<u-form-item label="姓名"><u-input v-model="dataForm.name" /></u-form-item>
|
|
||||||
|
|
||||||
</u-form>
|
|
||||||
</view>
|
|
||||||
<!-- <view class="box-gang">
|
|
||||||
<view class="g-name">联系人</view>
|
<view class="g-name">联系人</view>
|
||||||
<input type="text" placeholder="请填写收货人" v-model='name' />
|
<input type="text" placeholder="请填写收货人" v-model='dataForm.name' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang">
|
<view class="box-gang">
|
||||||
<view class="g-name">手机号</view>
|
<view class="g-name">手机号</view>
|
||||||
<input type="text" placeholder="请填写手机号" v-model='mobile' />
|
<input type="text" placeholder="请填写手机号" v-model='dataForm.mobile' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang">
|
<view class="box-gang">
|
||||||
<view class="g-name">所在地区</view>
|
<view class="g-name">所在地区</view>
|
||||||
<input type="text" placeholder="请填写所在地区" v-model='address' />
|
<input type="text" placeholder="请填写所在地区" v-model='dataForm.address' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang">
|
<view class="box-gang">
|
||||||
<view class="g-name">详细地区</view>
|
<view class="g-name">详细地区</view>
|
||||||
<input type="text" placeholder="请填写详细地区" v-model='fullAddress' />
|
<input type="text" placeholder="请填写详细地区" v-model='dataForm.fullAddress' />
|
||||||
</view>
|
</view>
|
||||||
<view class="box-gang-bt">
|
<view class="box-gang-bt">
|
||||||
<view class="g-name">默认地址</view>
|
<view class="g-name">默认地址</view>
|
||||||
<u-switch v-model="value" @change="change"></u-switch>
|
<u-switch v-model="value" @change="change"></u-switch>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<!-- 顶部区域 -->
|
<!-- 顶部区域 -->
|
||||||
<!--
|
|
||||||
<view class="bottom-anniu" @click="goedit()">
|
<view class="bottom-anniu" @click="goedit()">
|
||||||
<view class="">提交</view>
|
<view class="">提交</view>
|
||||||
</view> -->
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
import request from '../../utils/request'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
value: true,
|
value: true,
|
||||||
dataForm: {
|
dataForm: {
|
||||||
|
id: null,
|
||||||
name: '',
|
name: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
address: '',
|
address: '',
|
||||||
ifDfault: '',
|
ifDefault: '',
|
||||||
fullAddress: '',
|
fullAddress: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
uni.$on('addressInfo', (data) => {
|
||||||
|
if (data != null) {
|
||||||
|
this.dataForm = data
|
||||||
|
if (this.dataForm.ifDefault == 1) {
|
||||||
|
this.value = true
|
||||||
|
} else {
|
||||||
|
this.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uni.$emit('unAddressInfo')
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -71,6 +82,42 @@
|
|||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},
|
},
|
||||||
goedit() {
|
goedit() {
|
||||||
|
if (this.value) {
|
||||||
|
this.dataForm.ifDefault = 1
|
||||||
|
} else {
|
||||||
|
this.dataForm.ifDefault = 2
|
||||||
|
}
|
||||||
|
let url = 'business/userManager/mtUserExpressAddress'
|
||||||
|
if (this.dataForm.id != null) {
|
||||||
|
request({
|
||||||
|
url: url,
|
||||||
|
method: 'put',
|
||||||
|
data: this.dataForm
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '修改成功',
|
||||||
|
icon: 'none'
|
||||||
|
}),
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
request({
|
||||||
|
url: url,
|
||||||
|
method: 'post',
|
||||||
|
data: this.dataForm
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '提交成功',
|
||||||
|
icon: 'none'
|
||||||
|
}),
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
console.log("123123", this.dataForm)
|
console.log("123123", this.dataForm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +183,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.dataform {
|
.dataform {
|
||||||
margin: 20px auto;
|
background-color: #ffffff;
|
||||||
|
|
||||||
|
margin: 20px 20px 20px 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
uni.$on('goodsInfo', (data) => {
|
uni.$on('goodsInfo', (data) => {
|
||||||
this.goodsInfo = data
|
this.goodsInfo = data
|
||||||
if (this.goodsInfo != null) {
|
if (this.goodsInfo != null) {
|
||||||
@ -67,8 +70,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.$emit('un')
|
uni.$emit('un')
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -76,6 +77,7 @@
|
|||||||
change() {},
|
change() {},
|
||||||
click() {},
|
click() {},
|
||||||
dataProcessing() {
|
dataProcessing() {
|
||||||
|
this.giftImages = []
|
||||||
if (this.goodsInfo.giftImages != null && this.goodsInfo.giftImages != undefined) {
|
if (this.goodsInfo.giftImages != null && this.goodsInfo.giftImages != undefined) {
|
||||||
const myGiftImages = JSON.parse(this.goodsInfo.giftImages);
|
const myGiftImages = JSON.parse(this.goodsInfo.giftImages);
|
||||||
myGiftImages.forEach(res => {
|
myGiftImages.forEach(res => {
|
||||||
|
@ -38,7 +38,8 @@
|
|||||||
<view class="">
|
<view class="">
|
||||||
<view class="">家庭住址</view>
|
<view class="">家庭住址</view>
|
||||||
<view class="hui-time">
|
<view class="hui-time">
|
||||||
山东省济南市槐荫区兴福路
|
<!-- 山东省济南市槐荫区兴福路 -->
|
||||||
|
{{addrInfo.address}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -74,7 +75,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="endbox">
|
<view class="endbox">
|
||||||
<view style="color: #666666;font-size: 14px;">共{{value}}件商品,合计:</view>
|
<view style="color: #666666;font-size: 14px;">共{{value}}件商品,合计:</view>
|
||||||
<view style="color: red;"> <text style="font-weight: bold;font-size: 20px;">140.00</text> 积分</view>
|
<view style="color: red;"> <text style="font-weight: bold;font-size: 20px;">{{allPoints}}</text> 积分
|
||||||
|
</view>
|
||||||
|
<view style="color: red;"> <text style="font-weight: bold;font-size: 20px;">+¥{{allAmout}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -85,8 +89,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="bottom-box">
|
<view class="bottom-box">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view style="color: red;"> <text style="font-weight: bold;font-size: 20px;">140.00</text> 积分</view>
|
<view style="color: red;">
|
||||||
<view style="color: #9d9d9d; font-size: 12px; ">积分账户0.00</view>
|
<text style="font-weight: bold;font-size: 20px;">{{allPoints}}</text> 积分
|
||||||
|
<text style="font-weight: bold;font-size: 20px;">+¥{{allAmout}}</text>
|
||||||
|
</view>
|
||||||
|
<view style="color: #9d9d9d; font-size: 12px; ">积分账户{{myPoints}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="andeniu">
|
<view class="andeniu">
|
||||||
<text>选择</text>
|
<text>选择</text>
|
||||||
@ -106,11 +113,17 @@
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
myPoints: 0, //我的积分
|
||||||
goodsInfo: '',
|
goodsInfo: '',
|
||||||
title: '',
|
title: '',
|
||||||
qhindex: 0,
|
qhindex: 0,
|
||||||
value: 1,
|
value: 1,
|
||||||
baseUrl: config.baseUrl,
|
baseUrl: config.baseUrl,
|
||||||
|
allPoints: 0,
|
||||||
|
allAmout: 0,
|
||||||
|
addrInfo: {
|
||||||
|
address: '请填写地址'
|
||||||
|
},
|
||||||
|
|
||||||
tapList: [{
|
tapList: [{
|
||||||
text: '到店自提'
|
text: '到店自提'
|
||||||
@ -131,9 +144,25 @@
|
|||||||
this.goodsInfo = data
|
this.goodsInfo = data
|
||||||
if (this.goodsInfo != null) {
|
if (this.goodsInfo != null) {
|
||||||
this.dataProcessing()
|
this.dataProcessing()
|
||||||
|
this.allData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
uni.$emit('un')
|
uni.$emit('un')
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
uni.$on('chooseAddr', (data) => {
|
||||||
|
this.addrInfo = data
|
||||||
|
})
|
||||||
|
uni.$emit('unChooseAddr')
|
||||||
|
|
||||||
|
if (this.addrInfo == '' || this.addrInfo == null) {
|
||||||
|
this.getAddr()
|
||||||
|
}
|
||||||
|
// 查询剩余积分
|
||||||
|
this.getUserInfoList()
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -142,16 +171,13 @@
|
|||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
dataProcessing() {
|
dataProcessing() {
|
||||||
|
|
||||||
if (this.goodsInfo.deliveryMethod != null && this.goodsInfo.deliveryMethod != undefined) {
|
if (this.goodsInfo.deliveryMethod != null && this.goodsInfo.deliveryMethod != undefined) {
|
||||||
const deliveryData = JSON.parse(this.goodsInfo.deliveryMethod);
|
const deliveryData = JSON.parse(this.goodsInfo.deliveryMethod);
|
||||||
|
|
||||||
this.deliveryMethod = deliveryData.join('+');
|
this.deliveryMethod = deliveryData.join('+');
|
||||||
} else {
|
} else {
|
||||||
this.deliveryMethod = '无配送信息'
|
this.deliveryMethod = '无配送信息'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
valChange(e) {
|
valChange(e) {
|
||||||
console.log('当前值为: ' + e.value)
|
console.log('当前值为: ' + e.value)
|
||||||
@ -166,7 +192,65 @@
|
|||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
},
|
||||||
|
// 金额计算
|
||||||
|
allData() {
|
||||||
|
|
||||||
|
console.log("hhhhhhhhhhhhhhhhhhhhhhhhh")
|
||||||
|
this.allPoints = 0
|
||||||
|
this.allAmout = 0
|
||||||
|
let allPoints = new BigNumber(this.allPoints)
|
||||||
|
let allAmout = new BigNumber(this.allAmout)
|
||||||
|
// 数量
|
||||||
|
if (this.value < 1) {
|
||||||
|
this.value = 1
|
||||||
}
|
}
|
||||||
|
let value = new BigNumber(this.value)
|
||||||
|
|
||||||
|
allPoints.times(value)
|
||||||
|
if (this.goodsInfo.exchangeMethod == '积分+金额') {
|
||||||
|
allPoints.times(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 更新组件的值
|
||||||
|
this.allPoints = Number(allPoints).toFixed(2);
|
||||||
|
this.allAmout = Number(allAmout).toFixed(2);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
getAddr() {
|
||||||
|
request({
|
||||||
|
url: 'business/userManager/mtUserExpressAddress/getList',
|
||||||
|
method: 'get',
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log("res", res.data)
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
this.addrInfo = res.data[0]
|
||||||
|
} else {
|
||||||
|
this.addrInfo.address = '请填写地址'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 查询我的积分
|
||||||
|
getUserInfoList() {
|
||||||
|
request({
|
||||||
|
url: '/business/userManager/user/getByUniApp',
|
||||||
|
method: 'get',
|
||||||
|
// params:{}
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.myPoints = res.data.points
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -37,11 +37,9 @@
|
|||||||
console.log(this.$baseUrl);
|
console.log(this.$baseUrl);
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {},
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
wxlogin() {
|
wxlogin() {},
|
||||||
},
|
|
||||||
getPhone(e) {
|
getPhone(e) {
|
||||||
let that = this
|
let that = this
|
||||||
// if (this.privacyPolicyChecked == false) {
|
// if (this.privacyPolicyChecked == false) {
|
||||||
@ -87,10 +85,14 @@
|
|||||||
console.log('请求成功', rex)
|
console.log('请求成功', rex)
|
||||||
if (rex.data.code == 200) {
|
if (rex.data.code == 200) {
|
||||||
|
|
||||||
uni.setStorageSync('App-Token', rex.data.data.token);
|
uni.setStorageSync('App-Token', rex.data.data
|
||||||
|
.token);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
console.log("swq",uni.getStorageSync('App-Token'));
|
console.log("swq", uni.getStorageSync(
|
||||||
|
'App-Token'));
|
||||||
},
|
},
|
||||||
fail: (res) => {
|
fail: (res) => {
|
||||||
console.log("fail", res);
|
console.log("fail", res);
|
||||||
@ -154,6 +156,7 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dl {
|
.dl {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: #2F72F7;
|
background: #2F72F7;
|
||||||
@ -161,6 +164,7 @@
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-box {
|
.top-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 60vh;
|
height: 60vh;
|
||||||
@ -169,6 +173,7 @@
|
|||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dl-box {
|
.dl-box {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
@ -176,6 +181,7 @@
|
|||||||
color: white;
|
color: white;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kk-box {
|
.kk-box {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 45px;
|
height: 45px;
|
||||||
@ -185,6 +191,7 @@
|
|||||||
border: 1px solid #F0F3FA;
|
border: 1px solid #F0F3FA;
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dbottom {
|
.dbottom {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
<view class="b-box">
|
<view class="b-box">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="hui-size">我的积分</view>
|
<view class="hui-size">我的积分</view>
|
||||||
<view class="lan-num">0</view>
|
<view class="lan-num">{{myPoints}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="anniu">
|
<view class="anniu" @click="login">
|
||||||
积分上传
|
积分签到
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -57,18 +57,20 @@
|
|||||||
|
|
||||||
components: {
|
components: {
|
||||||
|
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getUserInfoList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 查询我的积分
|
// 查询我的积分
|
||||||
getUserInfoList() {
|
getUserInfoList() {
|
||||||
request({
|
request({
|
||||||
url: '/business/userManager/user/name/'+1,
|
url: '/business/userManager/user/getByUniApp',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// params:{}
|
// params:{}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
this.myPoints = res.data.points
|
||||||
console.log("hello world",res)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -79,6 +81,11 @@
|
|||||||
|
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 先查询今天是否签到过
|
||||||
|
login() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import { getToken } from '@/utils/auth'
|
import {
|
||||||
|
getToken
|
||||||
|
} from '@/utils/auth'
|
||||||
import errorCode from '@/utils/errorCode'
|
import errorCode from '@/utils/errorCode'
|
||||||
import { toast, showConfirm, tansParams } from '@/utils/common'
|
import {
|
||||||
|
toast,
|
||||||
|
showConfirm,
|
||||||
|
tansParams
|
||||||
|
} from '@/utils/common'
|
||||||
|
|
||||||
let timeout = 10000
|
let timeout = 10000
|
||||||
const baseUrl = config.baseUrl
|
const baseUrl = config.baseUrl
|
||||||
@ -39,7 +45,9 @@ const request = config => {
|
|||||||
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
|
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
store.dispatch('LogOut').then(res => {
|
store.dispatch('LogOut').then(res => {
|
||||||
uni.reLaunch({ url: '/pages/login/login' })
|
uni.reLaunch({
|
||||||
|
url: 'pagesLogin/login/login'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -54,7 +62,9 @@ const request = config => {
|
|||||||
resolve(res.data)
|
resolve(res.data)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
let { message } = error
|
let {
|
||||||
|
message
|
||||||
|
} = error
|
||||||
if (message === 'Network Error') {
|
if (message === 'Network Error') {
|
||||||
message = '后端接口连接异常'
|
message = '后端接口连接异常'
|
||||||
} else if (message.includes('timeout')) {
|
} else if (message.includes('timeout')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user