master
13285100733@qq.com 2 years ago
parent adce0f5120
commit 2ebc67070f

@ -3,7 +3,7 @@
<image src="{{detailObj.url}}"></image>
<view class="detail" >
<text class="title">{{detailObj.food_name}}</text>
<text>{{detailObj.food_shop}}</text>
<text class="shop">{{detailObj.food_shop}}</text>
<text class="price">¥{{detailObj.price}}</text>
</view>
</view>

@ -14,10 +14,22 @@ page {
font-size: 40rpx;
margin: 10rpx;
color: black;
text-align: justify;
text-align: center;
}
.detail .shop {
font-size: 40rpx;
margin: 10rpx;
color: black;
text-align: center;
}
.detail .price {
color: red;
font-size: 40rpx;
margin: 10rpx;
}
text-align: center;
}
text{
text-align: center;
}

@ -3,7 +3,8 @@ Page({
data:{
userInfo:'',
avatarUrl:'',
nickName:''
nickName:'',
cartlist:[]
},
onLoad(){
/*
@ -36,11 +37,13 @@ Page({
}).get().then(res => {
if (!res.data.length) {
// 没有存在同样的内容
var cartlist=[]
wx.cloud.database().collection('user').add({
data: {
userInfo:user,
avatarUrl:user.avatarUrl,
nickName:user.nickName
nickName:user.nickName,
cartlist:cartlist
}
})
}

@ -1,18 +1,30 @@
// pages/usercenter/usercenter.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
avatarUrl:'',
nickName:'',
userInfo:{}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
userInfo:wx.getStorageSync('user'),
avatarUrl:wx.getStorageSync('avatarUrl'),
nickName:wx.getStorageSync('nickName')
})
console.log(avatarUrl)
console.log(nickName)
},
/**

@ -2,8 +2,8 @@
<!-- 第一部分 -->
<view class="view_1">
<view class="view_image_text">
<image class="image_radius" src="../images/icon9.jpeg" />
<text>张三</text>
<image class="touxiang" src="{{userInfo.avatarUrl}}"></image>
<text class="nicheng">{{userInfo.nickName}}</text>
</view>
</view>
<!-- 第二部分 -->

@ -108,3 +108,8 @@ page {
margin-left: 90rpx;
}
.view_image_text image {
width: 150rpx;
height: 150rpx;
border-radius: 50%;
}

Loading…
Cancel
Save