This commit is contained in:
2026-03-12 13:32:10 +08:00
parent 3678cfe35f
commit deb949600b
6 changed files with 44 additions and 25 deletions

View File

@ -3,9 +3,9 @@
<!-- <view :style="{ height: ststuaBarHeight + 'px' }"></view> -->
<view
class="flex-row-center nav-title ali-puhui-bold"
:style="{ height: menuButtonHeight + 'px' }"
style="height:120px;"
>
{{ title }}
<text style="margin-top:35px;">{{ title }}</text>
</view>
</view>
</template>

View File

@ -86,7 +86,8 @@
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
"usingComponents" : true,
"appid" : "tte57093cd7a7fbf2401"
},
"mp-qq" : {
"usingComponents" : true

View File

@ -2,12 +2,12 @@
<view class="flex-column-start category-container">
<!-- 自定义导航栏 -->
<view class="custom-navbar">
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
<view class="status-bar" style="height:60px;"></view>
<view class="navbar-content">
<view class="back-btn" @click="handleBack">
<view class="back-icon"></view>
</view>
<view class="search-input-wrapper" :style="{ width: searchInputWidth + 'rpx' }">
<view class="search-input-wrapper" style="width:80%;">
<input class="search-input" type="text" placeholder="搜索商品" v-model="searchKeyword"
@confirm="handleSearch" @focus="handleSearchFocus" />
</view>
@ -406,6 +406,7 @@ export default {
padding: 0 32rpx;
height: 88rpx;
box-sizing: border-box;
margin-bottom: 20px;
.back-btn {
width: 60rpx;
@ -504,7 +505,7 @@ export default {
.category-content {
flex: 1;
overflow: hidden;
padding-top: 50rpx;
padding-top: 90rpx;
// 左侧:一级分类列表
.category-list-left {

View File

@ -44,7 +44,7 @@
<view class="goods-content">
<view class="goods-row-first">
<view class="goods-name">{{ item.item_name || item.product_name }}</view>
<text class="goods-price">¥{{ item.product_price }}</text>
<text class="goods-price">¥{{ item.product_price || item.goods_price }}</text>
</view>
<view class="goods-row-second">
<!-- <view class="goods-spec">
@ -297,7 +297,7 @@
const eventChannel = this.getOpenerEventChannel();
eventChannel.on("createOrder", (data) => {
this.orderData = data?.goodList || [];
this.payPrice = (data?.goodList || []).reduce((sum, item) => sum + Number(item.product_price * item.number || 0), 0);
this.payPrice = (data?.goodList || []).reduce((sum, item) => sum + Number( (item.product_price || item.goods_price ) * item.number || 0), 0);
console.log(data,'--=?')
const price = this.orderData.reduce(
(total, prev) => total + +prev.item_price,
@ -383,7 +383,7 @@
mask: true,
});
}
// console.log(this.orderData,'--=?')
const item = {
product_id:this.orderData[0].id,
price_id:this.orderData[0].prices[0].id,
@ -393,10 +393,11 @@
number:this.orderData[0].number,
product_price:this.orderData[0].prices[0].actual_price
}
createCartOrder({
type:this.sliverInfo.id,
original_price:this.orderData[0].prices[0].original_price, //付款金额
original_price:this.orderData[0].original_price, //付款金额
actual_price:this.payPrice + '', //付款金额
reduction_amount:'0',
pay_amount:this.payPrice +'', //付款金额
@ -533,7 +534,7 @@
createCartOrder({
type:this.sliverInfo.id,
original_price:this.orderData[0].prices[0].original_price, //付款金额
original_price:this.orderData[0].original_price, //付款金额
actual_price:this.payPrice + '', //付款金额
reduction_amount:'0',
pay_amount:this.payPrice + '', //付款金额

View File

@ -31,7 +31,7 @@
<view class="edit-form">
<form-cell title="宠物头像" type="custom" :showRightArrow="false">
<view class="uploadImgWrapper" slot="right">
<button class="upload-btn" open-type="chooseAvatar" @chooseavatar="changeAvator">
<button class="upload-btn" @click="changeAvator">
<image v-if="recordInfo.avatar" class="uploaded-img" :src="recordInfo.avatar"
mode="aspectFill" />
<image v-else :src="`${imgPrefix}record-cameraImg.png`" class="img" />
@ -255,26 +255,43 @@ export default {
methods: {
moment,
// 更新头像
async changeAvator(e) {
const {
avatarUrl
} = e.detail;
changeAvator() {
let that = this
// const {
// avatarUrl
// } = e.detail;
uni.showLoading({
title: "上传中..."
});
try {
const { url, objectKey } = await uploadImageToOSS_PUT(avatarUrl);
console.log(url, objectKey, 'url, objectKey');
this.recordInfo.avatar = url; // 完整URL
this.recordInfo.chongwu_pic = objectKey; // 对象键
this.$forceUpdate();
tt.chooseImage({
count: 1, // 最多可选图片数量默认为9
sourceType: ['album', 'camera'], // 来源:相册、相机或两者都有
success : async function(res) {
const { url, objectKey } = await uploadImageToOSS_PUT(res.tempFilePaths[0]);
// console.log(url, objectKey, 'url, objectKey');
that.recordInfo.avatar = url; // 完整URL
that.recordInfo.chongwu_pic = objectKey; // 对象键
that.$forceUpdate();
uni.hideLoading();
uni.showToast({
title: "上传成功",
icon: "success",
});
// 调用成功res.tempFilePaths 为图片本地路径数组
// console.log('选中的图片路径:', res.tempFilePaths);
},
fail: function(err) {
// 调用失败,例如用户取消、未授权或参数错误
console.log('选择图片失败:', err.errMsg);
},
complete: function() {
// 无论成功或失败都会执行
}
});
} catch (error) {
console.error('头像上传失败:', error);
uni.hideLoading();
@ -299,7 +316,6 @@ export default {
changeHair(value) {
this.recordInfo.hair = value;
this.recordInfo.weight_id = "";
this.getRecordWeightList();
this.$forceUpdate();
},
onBreedChange(val) {

View File

@ -1,9 +1,9 @@
<template>
<view class="flex-column-start shop-container">
<view class="shop-header">
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
<view class="status-bar" style="height:54px;"></view>
<view class="header-content">
<view class="search-bar" :style="{ width: searchBarWidth + 'rpx' }" @click="jumpToSearch">
<view class="search-bar" @click="jumpToSearch">
<text class="search-icon">🔍</text>
<text class="search-placeholder">猫猫主粮</text>
</view>
@ -29,7 +29,7 @@
</view>
</view>
</view>
<scroll-view class="shop-content" :style="{ paddingTop: headerHeight + 'rpx' }" scroll-y
<scroll-view class="shop-content" style="padding-top:141px;" scroll-y
:refresher-enabled="true" :refresher-triggered="refreshTriggered" @refresherrefresh="onRefresh"
@scrolltolower="onLoadMore">
<view>