111
This commit is contained in:
commit
64b5293d7f
|
|
@ -9,7 +9,7 @@ export default {
|
|||
return uni.api.post("/product/queryProduct", data);
|
||||
},
|
||||
// 下单详情
|
||||
getproductorderConfirm(data) {
|
||||
getproductorderConfirm(data) {
|
||||
return uni.api.get("/product/orderConfirm", data);
|
||||
},
|
||||
// 下单
|
||||
|
|
@ -57,7 +57,7 @@ export default {
|
|||
return uni.api.post("/pay/memeberIn", data);
|
||||
},
|
||||
// 支付
|
||||
payOrderPay(data){
|
||||
payOrderPay(data) {
|
||||
return uni.api.post("/pay/groupOrderPay", data);
|
||||
},
|
||||
paymodfiyOrderInfo(data) { //查询订单支付状态
|
||||
|
|
@ -82,13 +82,13 @@ export default {
|
|||
return uni.api.post("/home/homePageUp", data);
|
||||
},
|
||||
home(data) { //首页上半部分
|
||||
return uni.api.post("/home", data,false);
|
||||
return uni.api.post("/home", data, false);
|
||||
},
|
||||
locationdistrict(data) { //获取行政区域(区,街道)
|
||||
return uni.api.get("/location/district", data);
|
||||
},
|
||||
ordermineCoupons(data) { //我的优惠券
|
||||
return uni.api.get("/order/mineCoupons", data,false);
|
||||
return uni.api.get("/order/mineCoupons", data, false);
|
||||
},
|
||||
ordergetYhqPara(data) { //获取优惠券参数列表
|
||||
return uni.api.get("/order/getYhqPara", data);
|
||||
|
|
@ -112,7 +112,7 @@ export default {
|
|||
return uni.api.get("/order/findWiningUser", data);
|
||||
},
|
||||
indexlist(data) { //商品列表(今日上新/热榜/咖啡饮品)
|
||||
return uni.api.get("/distirict/productCate", data,false);
|
||||
return uni.api.get("/distirict/productCate", data, false);
|
||||
},
|
||||
productproductInfo(data) { //商品详情
|
||||
return uni.api.get("/product/productInfo", data);
|
||||
|
|
@ -129,4 +129,8 @@ export default {
|
|||
geocodelocation(data) { //根据经纬度获取信息
|
||||
return uni.api.get("/location/geocode", data);
|
||||
},
|
||||
// 修改头像和昵称
|
||||
upUserInfo(data) {
|
||||
return uni.api.post("/login/upUserInfo", data);
|
||||
},
|
||||
}
|
||||
|
|
@ -5,21 +5,22 @@
|
|||
<view class="onecontent">
|
||||
<view :style="[{'padding-top':HeighT.customBar +44+'px'}]"></view>
|
||||
<view class="onecontentbox">
|
||||
<image class="onecontentboximage" src="@/static/avatar.png" mode=""></image>
|
||||
<image class="onecontentboximage" :src="userHeadImg" mode="" @click="uploadImg"></image>
|
||||
<view class="onecontentboxitem flex-between">
|
||||
<view class="onecontentboxitemtext">
|
||||
昵称
|
||||
</view>
|
||||
<input class="onecontentboxiteminput" type="text" placeholder="请输入昵称">
|
||||
<input class="onecontentboxiteminput" v-model="userName" type="text" placeholder="请输入昵称">
|
||||
</view>
|
||||
<view class="onecontentboxitem flex-between" style="border-top: 1rpx dotted #333333;">
|
||||
<view class="onecontentboxitemtext">
|
||||
手机号
|
||||
</view>
|
||||
<input class="onecontentboxiteminput" type="text" placeholder="请输入手机号">
|
||||
<input class="onecontentboxiteminput" disabled v-model="userInfo.telephone" type="text"
|
||||
placeholder="请输入手机号">
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentboxitemnamber">
|
||||
<view class="onecontentboxitemnamber" @click="sumbit">
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -33,6 +34,11 @@
|
|||
components: {
|
||||
navseat
|
||||
},
|
||||
onLoad() {
|
||||
this.userInfo = uni.cache.get('userInfo')
|
||||
this.userName = this.userInfo.nickName
|
||||
this.userHeadImg = this.userInfo.headImg
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
titlename: '完善信息',
|
||||
|
|
@ -44,8 +50,11 @@
|
|||
other: '', //附近1KM 1选中 0不选中
|
||||
page: 1, //页数
|
||||
size: 10, //页容量
|
||||
status: 'loadmore'
|
||||
status: 'loadmore',
|
||||
},
|
||||
userInfo: uni.cache.get('userInfo'),
|
||||
userHeadImg: "",
|
||||
userName: ''
|
||||
};
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
|
@ -55,6 +64,48 @@
|
|||
this.opacitys = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
uploadImg() {
|
||||
let _this = this
|
||||
uni.chooseImage({
|
||||
crop: {
|
||||
width: 200,
|
||||
height: 200
|
||||
},
|
||||
success: (chooseImageRes) => {
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
uni.uploadFile({
|
||||
url: uni.conf.baseUrl + '/common/upload',
|
||||
filePath: tempFilePaths[0],
|
||||
header: {
|
||||
environment: 'app',
|
||||
type: 'android',
|
||||
version: '1.7.3',
|
||||
},
|
||||
name: "file",
|
||||
formData: {
|
||||
file: chooseImageRes.tempFiles[0],
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
let {
|
||||
data
|
||||
} = JSON.parse(uploadFileRes.data)
|
||||
this.userHeadImg = data
|
||||
},
|
||||
});
|
||||
},
|
||||
})
|
||||
},
|
||||
async sumbit() {
|
||||
let res = await this.api.upUserInfo({
|
||||
headImg: this.userHeadImg,
|
||||
nickName: this.userName
|
||||
})
|
||||
if(res.code == 0){
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
HeighT() { //手机类型的尺寸
|
||||
return this.$store.getters.is_BarHeight
|
||||
|
|
@ -95,13 +146,15 @@
|
|||
|
||||
.onecontentboxitem {
|
||||
padding: 24rpx 0;
|
||||
.onecontentboxitemtext{
|
||||
|
||||
.onecontentboxitemtext {
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.onecontentboxiteminput{
|
||||
|
||||
.onecontentboxiteminput {
|
||||
text-align: right;
|
||||
flex: auto;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
|
|
@ -112,7 +165,8 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.onecontentboxitemnamber{
|
||||
|
||||
.onecontentboxitemnamber {
|
||||
margin-top: 84rpx;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
<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.avatar"
|
||||
:src="userInfo.avatar" mode="aspectFill" >
|
||||
<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.telephone || '无'}}</text>
|
||||
<text class="phone">{{userInfo.nickName || '无'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="userinfoone">
|
||||
|
|
|
|||
Loading…
Reference in New Issue