Commit 45d4f3a9 by honghong

申请退款

parent 7956d42d
...@@ -53,9 +53,14 @@ const createPayOrder = (params) =>{ ...@@ -53,9 +53,14 @@ const createPayOrder = (params) =>{
return ApiHttp('/xinrenli/order/orderPay',params,'GET') return ApiHttp('/xinrenli/order/orderPay',params,'GET')
} }
//申请退款
const applyRefund = (params) =>{
return ApiHttp('/xinrenli/order/createPay',params,'POST')
}
//退款 //退款
const refundFunction = (params) =>{ const refundFunction = (params) =>{
return ApiHttp('/xinrenli/order/refund',params,'POST') return ApiHttp('/xinrenli/order/refund',params,'GET')
} }
//查询用户折扣列表 //查询用户折扣列表
...@@ -75,6 +80,7 @@ export { ...@@ -75,6 +80,7 @@ export {
updateOrderFunction, updateOrderFunction,
removeOrderFunction, removeOrderFunction,
createPayOrder, createPayOrder,
applyRefund,
refundFunction, refundFunction,
userDiscountList userDiscountList
} }
\ No newline at end of file
<template> <template>
<view class="content"> <view class="content">
<view class="content-swiper"> <view class="content-swiper">
灯泡灯芯坏了 {{payInfo.title}}
</view> </view>
<view class="content-price"> <view class="content-price">
<text></text>255.00 <text></text>{{payInfo.sumPrice}}
</view> </view>
<view class="content-company"> <view class="content-company">
<text>收款方</text> <text>收款方</text>
<text>XXXXXXXXXX有限公司</text> <text>上海印宏网络科技有限公司</text>
</view> </view>
<button @click="jump">立即支付</button> <button @click="jump">立即支付</button>
</view> </view>
...@@ -22,14 +22,58 @@ ...@@ -22,14 +22,58 @@
return { return {
imgBgUrl: apiBaseConfig.imgBgUrl, imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData, globalData: getApp().globalData,
scrollTopHeader: 0 scrollTopHeader: 0,
orderQuery:{},
payInfo:{
sumPrice:0,
title:''
}
}; };
}, },
onLoad() {}, onLoad(option) {
methods: { if(option.orderQuery){
let info = JSON.parse(decodeURIComponent(option.orderQuery))
console.log(info,'打算今年')
this.orderQuery = info
}
if(option.sumPrice){
this.payInfo.sumPrice = option.sumPrice
this.payInfo.title = option.title
}
},
methods: {
// 支付接口
async handlePay(){
let that = this
const data_back = await createPayOrder(that.orderQuery)
const {code,data} = data_back
if(code === 200){
uni.requestPayment({
provider:'wxpay',
nonceStr: data.nonceStr, // 随机字符串
package: data.packageValue, // 固定值
timeStamp:data.timeStamp, // 时间戳(单位:秒)
signType: data.signType,
paySign: data.paySign,
success: (res) => {
if (res.errMsg == 'requestPayment:ok') {
that.$uniGo.navigateTo({
url:'/demand/prosperity/index'
})
}
},
fail(err) {
console.log('失败')
if (err.errMsg == 'requestPayment:fail cancel') {
}
}
})
}
},
async jump(){ async jump(){
const data_back = await createPayOrder() this.handlePay()
console.log(data_back,'支付')
// this.$uniGo.navigateTo({ // this.$uniGo.navigateTo({
// url: `/demand/prosperity/index` // url: `/demand/prosperity/index`
// }); // });
......
...@@ -64,17 +64,20 @@ ...@@ -64,17 +64,20 @@
<view class="paddding-x-two">驳回理由:{{detailData && detailData.reasonsForRejection ? detailData.reasonsForRejection : '暂无'}}</view> <view class="paddding-x-two">驳回理由:{{detailData && detailData.reasonsForRejection ? detailData.reasonsForRejection : '暂无'}}</view>
<!-- <u--textarea v-model="detailData.value1" placeholder="请输入内容" disabled></u--textarea> --> <!-- <u--textarea v-model="detailData.value1" placeholder="请输入内容" disabled></u--textarea> -->
</view> </view>
<view class="content-reject" v-if="subscript == 3 && subs== '1'"> <view class="content-reject" v-if="subscript == 3 && detailData.status== 5">
<view class=""> <view class="">
<text style="background:#2C66FF"></text>该订单已提交退款,等待商家致电…… <text style="background:#2C66FF"></text>该订单已提交退款,等待商家致电……
</view> </view>
<u--textarea v-model="value1" placeholder="请输入内容" disabled></u--textarea> <view>已支付金额:{{detailData.payAmount}}</view>
<!-- <u--textarea v-model="value1" placeholder="请输入内容" disabled></u--textarea> -->
</view> </view>
<view class="content-reject" v-if="subscript == 3 && subs== '2'"> <view class="content-reject" v-if="subscript == 3 && detailData.status== '6'">
<view class=""> <view class="">
<text></text>该订单已退款 <text></text>该订单已退款
</view> </view>
<u--textarea v-model="value1" placeholder="请输入内容" disabled></u--textarea> <!-- <u--textarea v-model="value1" placeholder="请输入内容" disabled></u--textarea> -->
<view>退款金额:{{detailData.refundAmount}}</view>
<view>已扣除服务金额:{{detailData.payAmount - detailData.refundAmount}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -93,18 +96,15 @@ ...@@ -93,18 +96,15 @@
scrollTopHeader: 0, scrollTopHeader: 0,
detailInfo: {}, //接收的参数 detailInfo: {}, //接收的参数
subscript: '0', subscript: '0',
subs: '1',
detailData: {} detailData: {}
}; };
}, },
onLoad(option) { onLoad(option) {
if (option.detailInfo) { if (option.detailInfo) {
this.detailInfo = JSON.parse(decodeURIComponent(option.detailInfo)) this.detailInfo = JSON.parse(decodeURIComponent(option.detailInfo))
console.log(this.detailInfo, '结束')
this.getOrder() this.getOrder()
} }
return this.subscript = option.subscript
this.subs = option.subs
}, },
methods: { methods: {
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
const data_back = await orderDetailMsgNew({ const data_back = await orderDetailMsgNew({
id: that.detailInfo.id id: that.detailInfo.id
}) })
console.log(data_back, '订单详情')
const { const {
code, code,
data data
...@@ -122,12 +121,6 @@ ...@@ -122,12 +121,6 @@
if (code === 200) { if (code === 200) {
that.detailData = data that.detailData = data
} }
// orderDetailMsgNew({id:that.detailInfo.id}).then(res=>{
// console.log('订单详情',res)
// if(res.code == 200){
// that.detailData = res.data
// }
// })
}, },
} }
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
</template> </template>
<script> <script>
import {createPayOrder,userDiscountList} from '@/api/system/index.js' import {userDiscountList} from '@/api/system/index.js'
import apiBaseConfig from '@/config/index.js'; import apiBaseConfig from '@/config/index.js';
export default { export default {
data() { data() {
...@@ -74,6 +74,7 @@ ...@@ -74,6 +74,7 @@
let that = this let that = this
if (option.detailInfo) { if (option.detailInfo) {
this.detailInfo = JSON.parse(decodeURIComponent(option.detailInfo)) this.detailInfo = JSON.parse(decodeURIComponent(option.detailInfo))
console.log(this.detailInfo,'读书')
} }
uni.$on('payInfo', res => { uni.$on('payInfo', res => {
console.log(res,'打算今年'); console.log(res,'打算今年');
...@@ -93,9 +94,12 @@ ...@@ -93,9 +94,12 @@
// 判断是否使用折扣(使用×折扣) // 判断是否使用折扣(使用×折扣)
return that.isUse ? Number((that.detailInfo.actualAmount - that.payInfo.fullSubtraction) * that.discountList[0].discountRatio).toFixed(2): Number(that.detailInfo.actualAmount - that.payInfo.fullSubtraction).toFixed(2) return that.isUse ? Number((that.detailInfo.actualAmount - that.payInfo.fullSubtraction) * that.discountList[0].discountRatio).toFixed(2): Number(that.detailInfo.actualAmount - that.payInfo.fullSubtraction).toFixed(2)
}else{ }else{
console.log('物质') if(that.discountList.length && that.discountList[0].discountRatio){
return that.detailInfo.actualAmount && that.isUse ? Number(that.detailInfo.actualAmount * that.discountList[0].discountRatio).toFixed(2) : that.detailInfo.actualAmount return that.detailInfo.actualAmount && that.isUse ? Number(that.detailInfo.actualAmount * that.discountList[0].discountRatio).toFixed(2) : that.detailInfo.actualAmount
// return that.detailInfo.actualAmount && that.isUse ? Number(that.detailInfo.actualAmount * 0.1).toFixed(2) : that.detailInfo.actualAmount }else{
that.isUse = false
return that.detailInfo.actualAmount && that.isUse ? Number(that.detailInfo.actualAmount * that.discountList[0].discountRatio).toFixed(2) : that.detailInfo.actualAmount
}
} }
} }
...@@ -103,59 +107,30 @@ ...@@ -103,59 +107,30 @@
methods: { methods: {
async getDisCountList(){ async getDisCountList(){
const data_back = await userDiscountList({useStatus:0}) const data_back = await userDiscountList({useStatus:0})
console.log(data_back,'折扣列表') const {code,rows,total} = data_back
const {code,rows} = data_back if(code === 200 && total > 0){
if(code === 200){
this.discountList = rows this.discountList = rows
this.isUse = true
}else{
this.isUse = false
} }
}, },
// 支付接口
async handlePay(){
let that = this
let orderQuery = {
orderId:that.detailInfo.id,//订单的id
couponId:that.payInfo.id ? that.payInfo.id : '',//优惠券的id
discountId:that.isUse && that.discountList.length ? that.discountList[0].id : '',//折扣的id
}
const data_back = await createPayOrder(orderQuery)
console.log(data_back,'单靠')
const {code,data} = data_back
if(code === 200){
uni.requestPayment({
provider:'wxpay',
nonceStr: data.nonceStr, // 随机字符串
package: data.packageValue, // 固定值
timeStamp:data.timeStamp, // 时间戳(单位:秒)
signType: data.signType,
paySign: data.paySign,
success: (res) => {
console.log(res,'成功')
if (res.errMsg == 'requestPayment:ok') {
that.$uniGo.navigateTo({
url:'/demand/prosperity/index'
})
}
},
fail(err) {
console.log('失败')
if (err.errMsg == 'requestPayment:fail cancel') {
}
}
})
}
},
jump(val) { jump(val) {
let that = this
if (val == 1) { if (val == 1) {
this.$uniGo.navigateTo({ this.$uniGo.navigateTo({
url: `/my/coupon/index?type=pay` url: `/my/coupon/index?type=pay`
}); });
} else { } else {
this.handlePay() let orderQuery = {
// this.$uniGo.navigateTo({ orderId:that.detailInfo.id,//订单的id
// url: `/demand/confirm/index` couponId:that.payInfo.id ? that.payInfo.id : '',//优惠券的id
// }); discountId:that.isUse && that.discountList.length ? that.discountList[0].id : '',//折扣的id
}
this.$uniGo.navigateTo({
url: `/demand/confirm/index?orderQuery=${encodeURIComponent(JSON.stringify(orderQuery))}&sumPrice=${that.sumPrice}&title=${this.detailInfo.title}`
});
} }
}, },
changeUse(e) { changeUse(e) {
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="index-content-item"> <view class="index-content-item" v-if="couponLoseList.length">
<view class="index-content-item-nav index-content-item-navx baiyin-flex baiyin-flex-c-b"> <view class="index-content-item-nav index-content-item-navx baiyin-flex baiyin-flex-c-b">
<text></text> <text></text>
<view>不可用优惠券(2)</view> <view>不可用优惠券{{couponLoseList.length}}</view>
</view> </view>
<view class="index-content-item-qu" v-for="(info,ix) in couponLoseList"> <view class="index-content-item-qu" v-for="(info,ix) in couponLoseList">
<image class="index-content-item-qu-bg" src="@/static/icon/xy02.png" mode=""></image> <image class="index-content-item-qu-bg" src="@/static/icon/xy02.png" mode=""></image>
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
data() { data() {
return { return {
imgBgUrl: apiBaseConfig.imgBgUrl, imgBgUrl: apiBaseConfig.imgBgUrl,
globalData: getApp().globalData,
scrollTopHeader: 0, scrollTopHeader: 0,
inviteList: [], inviteList: [],
total: 0 total: 0
...@@ -57,21 +56,40 @@ ...@@ -57,21 +56,40 @@
}, },
onShareAppMessage(options) { onShareAppMessage(options) {
var that = this; var that = this;
// 设置菜单中的转发按钮触发转发事件时的转发内容 let token = uni.getStorageSync('token')
var shareObj = { if(token){
title: "新人力小程序", // 默认是小程序的名称(可以写slogan等) var shareObj = {
path: '/my/login/login', // 默认是当前页面,必须是以‘/'开头的完整路径 title: "新人力小程序", // 默认是小程序的名称(可以写slogan等)
}; path: `/my/login/login?id=${that.$store.state.login.userInfo.user.id}`, // 默认是当前页面,必须是以‘/'开头的完整路径
// 来自页面内的按钮的转发 };
if (options.from == 'button') { // 来自页面内的按钮的转发
var eData = options.target.dataset; if (options.from == 'button') {
console.log(eData.name); // shareBtn var eData = options.target.dataset;
// 此处可以修改 shareObj 中的内容 console.log(eData.name); // shareBtn
shareObj.path = '/my/login/login'; // 此处可以修改 shareObj 中的内容
shareObj.path = '/my/login/login?id=${that.$store.state.login.userInfo.user.id}';
}
console.log("shareObj",shareObj)
// 返回shareObj
return shareObj;
// 设置菜单中的转发按钮触发转发事件时的转发内容
}else{
uni.showModal({
title: '请登录',
content: '您需要登录才能使用该功能',
success: (res) => {
if (res.confirm) {
that.$uniGo.reLaunch({
url:'/my/login/login'
})
} else if (res.cancel) {
uni.navigateBack()
}
}
})
} }
console.log("shareObj",shareObj)
// 返回shareObj
return shareObj;
}, },
onLoad() { onLoad() {
...@@ -82,7 +100,6 @@ ...@@ -82,7 +100,6 @@
// 获取邀请列表 // 获取邀请列表
async getList() { async getList() {
const data_back = await queryInviteListGet() const data_back = await queryInviteListGet()
console.log(data_back, '第三节')
const { const {
code, code,
rows, rows,
......
...@@ -23,10 +23,12 @@ ...@@ -23,10 +23,12 @@
loginParams:{ loginParams:{
xcxCode:'' xcxCode:''
}, },
token:'' token:'',
InviterId:'',//邀请人的id
} }
}, },
onLoad() { onLoad(option) {
console.log(option.id,'第三节')
let that = this let that = this
// 获取系统的高度 // 获取系统的高度
uni.getSystemInfo({ uni.getSystemInfo({
...@@ -35,6 +37,9 @@ ...@@ -35,6 +37,9 @@
} }
}) })
this.getUserInfo() this.getUserInfo()
if(option.id){
this.InviterId = option.id
}
}, },
methods: { methods: {
// 1.调用微信自带登录方法获取code // 1.调用微信自带登录方法获取code
...@@ -50,7 +55,14 @@ ...@@ -50,7 +55,14 @@
// 2.获取sessionKey,openId // 2.获取sessionKey,openId
async getSessionkeyAndOpenId(xcxCode) { async getSessionkeyAndOpenId(xcxCode) {
let that = this let that = this
const back_data = await login({xcxCode:xcxCode}) let codeParams = {}
if(that.InviterId){
that.$set(codeParams,'xcxCode',xcxCode)
that.$set(codeParams,'InviterId',that.InviterId)
}else{
that.$set(codeParams,'xcxCode',xcxCode)
}
const back_data = await login(codeParams)
const {code,data} = back_data const {code,data} = back_data
if(code === 200){ if(code === 200){
uni.setStorageSync('token',data.token) uni.setStorageSync('token',data.token)
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
<view class="reject flex-1 hiddenMore"> <view class="reject flex-1 hiddenMore">
驳回理由:{{item.reasonsForRejection ? item.reasonsForRejection : '暂无'}} 驳回理由:{{item.reasonsForRejection ? item.reasonsForRejection : '暂无'}}
</view> </view>
<button @click.stop="handleAgainAdd(item)" class="buttoncl" style="margin-left: 20rpx;">重新发布</button> <button @click.stop="handleAgainAdd(item)" class="buttoncl"
style="margin-left: 20rpx;">重新发布</button>
</view> </view>
<!-- // 待支付 --> <!-- // 待支付 -->
...@@ -46,9 +47,10 @@ ...@@ -46,9 +47,10 @@
</view> </view>
<!-- // 已接单 --> <!-- // 已接单 -->
<view class="buttoncolor" v-if="subscript == '3'"> <view class="buttoncolor" v-if="subscript == '3'">
<button class="buttoncl" @click.stop="abolish(2,item)">退款</button> <button v-if="item.status == 3" style="background: red;" class="buttoncl" @click.stop="abolish(2,item)">退款</button>
<button class="buttonclde" @click.stop="abolish(3,item)">详情</button> <button v-else-if="item.status == 6" class="buttonclde buttonGray"
<button class="buttonclde" @click.stop="abolish(4,item)">已退款</button> @click.stop="abolish(4,item)">已退款</button>
<button class="buttoncl" @click.stop="abolish(3,item)">详情</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -82,15 +84,15 @@ ...@@ -82,15 +84,15 @@
show: false, show: false,
title: '确认取消订单吗', title: '确认取消订单吗',
titbut: '取消订单', titbut: '取消订单',
currentId:'',//当前的id currentId: '', //当前的id
actualAmount:0,//实付金饿 actualAmount: 0, //实付金饿
} }
}, },
mounted(){ mounted() {
this.timer = setInterval(()=>{ this.timer = setInterval(() => {
this.countDown() this.countDown()
},1000) }, 1000)
}, },
methods: { methods: {
// 1小时倒计时 // 1小时倒计时
...@@ -110,7 +112,7 @@ ...@@ -110,7 +112,7 @@
// 跳转详情页 // 跳转详情页
jump(data) { jump(data) {
this.$uniGo.navigateTo({ this.$uniGo.navigateTo({
url: `/demand/index/index?detailInfo=${encodeURIComponent(JSON.stringify(data))}` url: `/demand/index/index?detailInfo=${encodeURIComponent(JSON.stringify(data))}&subscript=${this.subscript}`
// url: `/demand/index/index?subscript=${this.subscript}` // url: `/demand/index/index?subscript=${this.subscript}`
}); });
}, },
...@@ -121,8 +123,8 @@ ...@@ -121,8 +123,8 @@
}); });
}, },
// 取消订单1 立即退款2 // 取消订单1 立即退款2
abolish(val,data) { abolish(val, data) {
console.log(data.id,data.actualAmount,'数控') console.log(data.id, data.actualAmount, '数控')
this.currentId = data.id this.currentId = data.id
this.actualAmount = data.actualAmount this.actualAmount = data.actualAmount
if (val == 1) { if (val == 1) {
...@@ -135,12 +137,13 @@ ...@@ -135,12 +137,13 @@
this.show = true this.show = true
} else if (val == 3) { } else if (val == 3) {
this.$uniGo.navigateTo({ this.$uniGo.navigateTo({
url: `/demand/index/index?subscript=${this.subscript}&subs=${'1'}` url: `/demand/index/index?detailInfo=${encodeURIComponent(JSON.stringify(data))}&subscript=${this.subscript}`
// url: `/demand/index/index?subscript=${this.subscript}`
}); });
} else if (val == 4) { } else if (val == 4) {
this.$uniGo.navigateTo({ // this.$uniGo.navigateTo({
url: `/demand/index/index?subscript=${this.subscript}&subs=${'2'}` // url: `/demand/index/index?subscript=${this.subscript}&subs=${'2'}`
}); // });
} }
}, },
//重新发布按钮事件 //重新发布按钮事件
...@@ -156,7 +159,7 @@ ...@@ -156,7 +159,7 @@
}, },
// 取消订单2 立即退款3 // 取消订单2 立即退款3
aindexst(val) { aindexst(val) {
this.$emit('getVal',val,this.currentId,this.actualAmount) this.$emit('getVal', val, this.currentId, this.actualAmount)
this.show = false this.show = false
} }
} }
...@@ -273,6 +276,10 @@ ...@@ -273,6 +276,10 @@
color: #FD0100; color: #FD0100;
line-height: 44rpx; line-height: 44rpx;
} }
.buttonGray{
border: 1rpx solid #666666 !important;
color: #666666 !important;
}
.reject { .reject {
margin-top: 20rpx; margin-top: 20rpx;
......
...@@ -59,7 +59,8 @@ ...@@ -59,7 +59,8 @@
myNeedList, myNeedList,
orderDetailList, orderDetailList,
removeOrderFunction, removeOrderFunction,
refundFunction refundFunction,
applyRefund
} from '../../api/system/index.js' } from '../../api/system/index.js'
import apiBaseConfig from '@/config/index.js'; import apiBaseConfig from '@/config/index.js';
import uniGo from '@/utils/unIGO.js'; import uniGo from '@/utils/unIGO.js';
...@@ -86,8 +87,8 @@ ...@@ -86,8 +87,8 @@
pageNum: 1, pageNum: 1,
status: 0, status: 0,
deleteStatus: 0, deleteStatus: 0,
orderByColumn:'modifyTime', orderByColumn: 'modifyTime',
isAsc:'desc' isAsc: 'desc'
}, },
statusNeedList: [] statusNeedList: []
} }
...@@ -108,6 +109,12 @@ ...@@ -108,6 +109,12 @@
let that = this let that = this
that.needInfo.status = that.subscript that.needInfo.status = that.subscript
that.statusNeedList = [] that.statusNeedList = []
if (that.subscript == 3) {
that.$delete(that.needInfo, "status")
that.$set(that.needInfo, 'statusList', '3,5,6')
} else {
that.$delete(that.needInfo, "statusList")
}
const data_back = await orderDetailList(that.needInfo) const data_back = await orderDetailList(that.needInfo)
const { const {
code, code,
...@@ -121,7 +128,7 @@ ...@@ -121,7 +128,7 @@
that.statusNeedList = [] that.statusNeedList = []
} }
} }
}, },
jump(ind) { jump(ind) {
let that = this let that = this
...@@ -152,12 +159,15 @@ ...@@ -152,12 +159,15 @@
} }
}, },
// 立即退款接口 // 立即退款接口
async handleRefund(id,price){ async handleRefund(id, price) {
const data_back = await refundFunction({refundeAmount:price,orderId:id}) const data_back = await refundFunction({
console.log(data_back,'退款') refundeAmount: price,
orderId: id
})
console.log(data_back, '退款')
const { const {
code code
} = back_data } = data_back
if (code == 200) { if (code == 200) {
uni.showToast({ uni.showToast({
title: '退款成功!', title: '退款成功!',
...@@ -171,15 +181,32 @@ ...@@ -171,15 +181,32 @@
}) })
} }
}, },
//申请退款接口
async applyRefundFun(id){
let that = this
const data_back = await applyRefund({id:id,status:'4'})
const {code} = data_back
if(code === 200){
uni.showToast({
title: '提交申请成功!',
icon: 'none',
duration: 2000,
success() {
setTimeout(() => {
that.getMyNeedList()
}, 1000)
}
})
}
},
// 取消订单2 立即退款3 // 取消订单2 立即退款3
handleStatus(val,id,price) { handleStatus(val, id, price) {
console.log(val,id,price, '装订好')
let that = this let that = this
if (val == 2) { if (val == 2) {
that.handleCancle(id) that.handleCancle(id)
}else if(val == 3){ } else if (val == 3) {
that.handleRefund(id,price) // that.handleRefund(id, price)
that.applyRefundFun(id)
} }
} }
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 158rpx)` }"></view> <view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 158rpx)` }"></view>
<view class="content-in"> <view class="content-in">
<view class="content-in-info baiyin-flex baiyin-flex-c-b"> <view class="content-in-info baiyin-flex baiyin-flex-c-b">
<button class="content-in-info-l" type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar"> <button class="content-in-info-l" type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
<image src="@/static/icon/my03.png" mode=""></image> <image src="@/static/icon/my03.png" mode=""></image>
</button> </button>
<view class="content-in-info-r"> <view class="content-in-info-r">
...@@ -125,19 +125,17 @@ export default { ...@@ -125,19 +125,17 @@ export default {
}, },
onLoad() { onLoad() {
this.nickname = this.$store.state.login.userInfo.user.nickname this.nickname = this.$store.state.login.userInfo.user.nickname
console.log(this.$store.state.login.userInfo.user.nickname,'D撒')
let mobile = uni.getStorageSync('mobile') let mobile = uni.getStorageSync('mobile')
this.mobile = mobile this.mobile = mobile
}, },
methods: { methods: {
...mapMutations(['upDateUserInfoMount']), ...mapMutations(['upDateUserInfoMount']),
onChooseavatar(e) { onChooseavatar(e) {
console.log(e); console.log(e,'1211');
return; return;
let self = this; let self = this;
const { avatarUrl } = e.detail; const { avatarUrl } = e.detail;
this.fdsa = avatarUrl; this.fdsa = avatarUrl;
console.log(avatarUrl, e, 'fsdafdsa');
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath: avatarUrl, //选择图片返回的相对路径 filePath: avatarUrl, //选择图片返回的相对路径
encoding: 'base64', //编码格式 encoding: 'base64', //编码格式
......
...@@ -2,9 +2,15 @@ ...@@ -2,9 +2,15 @@
<view class="content"> <view class="content">
<view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 130rpx)` }"></view> <view :style="{ height: `calc(${globalData.statusBarHeight}rpx + 130rpx)` }"></view>
<view class="friends-list-box"> <view v-if="articleList.length" class="friends-list-box">
<evaluateList :list="articleList" @getId="handleDetail"></evaluateList> <evaluateList :list="articleList" @getId="handleDetail"></evaluateList>
</view> </view>
<view v-else class="diagram">
<image src="@/static/icon/qst.png" mode=""></image>
<view class="">
暂无数据
</view>
</view>
<com-navbar :leftIcon="false" :homeShow="false" bgColor="#fff" title="动态" <com-navbar :leftIcon="false" :homeShow="false" bgColor="#fff" title="动态"
:titleStyle="{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" /> :titleStyle="{ color: '#000', fontSize: '32rpx',scrollTopHeader: scrollTopHeader }" />
<com-tabbar :list=" [{ <com-tabbar :list=" [{
...@@ -137,7 +143,7 @@ ...@@ -137,7 +143,7 @@
} }
</script> </script>
<style> <style lang="scss" scoped>
.friends-list-box { .friends-list-box {
/* background-color: #FFFFFF; /* background-color: #FFFFFF;
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
...@@ -145,4 +151,20 @@ ...@@ -145,4 +151,20 @@
margin: 10px 20rpx 0 20rpx; margin: 10px 20rpx 0 20rpx;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1); */ box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1); */
} }
.diagram {
text-align: center;
margin-top: 335rpx;
>image {
width: 396rpx;
height: 243rpx;
}
>view {
margin-top: 20rpx;
font-size: 24rpx;
font-weight: 400;
color: #444444;
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment