feat: 新增商品详情搭配优惠组件和客服弹窗

refactor: 优化页面样式和交互逻辑

fix: 修复洗车券列表和详情页的数据展示问题

style: 调整用户页面按钮样式和布局

chore: 移除无用页面和代码,更新项目配置

docs: 更新单次启动页面的使用说明和注意事项

perf: 优化网络请求和数据处理逻辑

build: 更新依赖和配置文件

test: 更新测试用例以适应新功能

ci: 调整CI配置以适应新项目结构
This commit is contained in:
2026-01-03 11:26:51 +08:00
parent b80b33c81f
commit 95eed74b96
68 changed files with 1197 additions and 2036 deletions

View File

@@ -6,22 +6,22 @@ Page({
urlList: [],
user: {}
},
onLoad: function (n) {
onLoad: function(n) {
var o = this;
e.pageStart(t).then(function (t) {
e.pageStart(t).then(function(t) {
o.getContent();
});
},
onShow: function () {
onShow: function() {
this.refresh && this.getContent();
},
onPullDownRefresh: function () { },
onShareAppMessage: function () { },
getContent: function () {
onPullDownRefresh: function() {},
onShareAppMessage: function() {},
getContent: function() {
var n = this;
wx.showLoading({
title: ""
}), e.request('/miniprogram/user', {}, !0).then(function (t) {
}), e.request('/miniprogram/user', {}, !0).then(function(t) {
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
title: "提示",
content: t.message
@@ -30,18 +30,18 @@ Page({
showLoding: !1,
user: t.data.user,
urlList: t.data.menu
}, function () { });
}).catch(function (t) {
}, function() {});
}).catch(function(t) {
wx.hideLoading();
});
},
islogin: function () {
islogin: function() {
wx.showLoading({
title: "加载中"
});
},
refresh: 0,
toPage: function (t) {
toPage: function(t) {
var e = t.currentTarget.dataset, n = (e.refresh, e.url);
n ? wx.navigateTo({
url: "/pages/".concat(n)
@@ -51,29 +51,29 @@ Page({
duration: 2e3
}), this.refresh = 1;
},
callUs: function () {
callUs: function() {
if (!t.globalData.servicetel) return !1;
wx.makePhoneCall({
phoneNumber: "" + t.globalData.servicetel
});
},
updateUserAvatar: function () {
updateUserAvatar: function() {
var that = this;
wx.chooseMedia({
count: 1,
mediaType: ['image'],
sourceType: ['album', 'camera'],
success: function (res) {
success: function(res) {
wx.uploadFile({
url: 'https://t-jm.v0750.com/miniprogram/user/upload',
url: 'https://t-jm.v0750.com/miniprogram/upload',
filePath: res.tempFiles[0].tempFilePath,
name: 'file',
success: function (uploadRes) {
success: function(uploadRes) {
var data = JSON.parse(uploadRes.data);
if (data.code == 200) {
e.request('/miniprogram/user/update', {
avatar: data.data.url
}, true).then(function (res) {
}, true).then(function(res) {
if (res.code == 200) {
that.getContent();
wx.showToast({
@@ -93,18 +93,18 @@ Page({
}
});
},
updateUserNickname: function () {
updateUserNickname: function() {
var that = this;
wx.showModal({
title: '修改昵称',
editable: true,
placeholderText: '请输入新昵称',
success: function (res) {
success: function(res) {
if (res.confirm && res.content) {
// 发送请求到后端,更新用户昵称
e.request('/miniprogram/user/update', {
nickname: res.content
}, true).then(function (res) {
}, true).then(function(res) {
if (res.code == 200) {
that.getContent();
wx.showToast({

View File

@@ -11,14 +11,14 @@
<view class="tel">{{user.mobile}}</view>
</view>
<view class="right">
<image class="xunzhang" mode="widthFix" src="https://jm-static.v0750.com/image/xunzhang.png" wx:if="{{user.groupid==6}}"></image>
<image class="zhe" mode="widthFix" src="https://jm-static.v0750.com/image/zhe.png" wx:if="{{user.isdiscount}}"></image>
<image class="xunzhang" mode="widthFix" src="http://jm.v0750.com/image/xunzhang.png" wx:if="{{user.groupid==6}}"></image>
<image class="zhe" mode="widthFix" src="http://jm.v0750.com/image/zhe.png" wx:if="{{user.isdiscount}}"></image>
</view>
</view>
<view class="my-capital shadow">
<view class="title">
<view class="text">我的资产</view>
<view bindtap="toPage" class="btn" data-refresh="1" data-url="voucher/voucher">立即购买 ></view>
<view bindtap="toPage" class="btn" data-refresh="1" data-url="voucher/voucher">立即充值 ></view>
</view>
<view class="money-box">
<view class="item">
@@ -62,14 +62,17 @@
<text class="iconfont icon-{{item.img}}"></text>
<view class="name">{{item.name}}</view>
</view>
<!-- <view bindtap="callUs" class="item" openType="contact">
<view class="item" openType="contact">
<button size="mini" type="default" plain="ture" open-type="contact" >
<text class="iconfont icon-10"></text>
<view class="name">联系客服</view>
</view> -->
</button>
</view>
</view>
<view class="footer-btn">
<navigator class="btn" hoverClass="hover" url="/pages/index/index">首页</navigator>
<view class="btn">扫一扫</view>
<navigator class="btn" hoverClass="hover" url="/pages/voucher/voucher">购买洗车金额</navigator>
<navigator class="btn" hoverClass="hover" url="/pages/voucher/voucher">充值</navigator>
</view>
</view>

View File

@@ -194,8 +194,23 @@ button::after {
width: 33.33%;
}
.url-list .item button {
border: 0;
padding: 0;
margin: 0;
width: 100%;
}
.url-list .item button .iconfont {
line-height: 52rpx;
}
.url-list .item button .name {
margin-top: -2rpx;
}
.url-list .item .name {
margin-top: 22rpx;
line-height: 1;
}
.footer-btn {