This commit is contained in:
renjianbo
2026-01-06 15:59:20 +08:00
parent 4a773d4182
commit 5d4928cc30
15 changed files with 91 additions and 533 deletions

6
app.js
View File

@@ -25,7 +25,7 @@ App({
version_number: '1.0.0', version_number: '1.0.0',
}, },
console: function (msg) { console: function (msg) {
console.log(msg); // 日志输出已隐藏
}, },
tip: function (params) { tip: function (params) {
var that = this; var that = this;
@@ -95,12 +95,12 @@ App({
content: '请先登录', content: '请先登录',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定') // 用户点击确定
wx.switchTab({ wx.switchTab({
url: '/pages/my/my' url: '/pages/my/my'
}) })
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消') // 用户点击取消
} }
} }
}) })

View File

@@ -1,10 +1,8 @@
{ {
"pages": [ "pages": [
"pages/home/home", "pages/home/home",
"pages/order/order", "pages/order/order",
"pages/my/my", "pages/my/my",
"pages/news/news-details",
"pages/guanyu/guanyu", "pages/guanyu/guanyu",
"pages/ghdCalculator/ghdCalculator", "pages/ghdCalculator/ghdCalculator",
"pages/webpage/webpage", "pages/webpage/webpage",

View File

@@ -205,14 +205,7 @@ Page({
throw new Error('计算结果无效'); throw new Error('计算结果无效');
} }
// 添加计算过程日志 // 计算过程已隐藏
console.log('SDS计算过程', {
个体身高: height.toFixed(1),
平均身高: mean.toFixed(1),
标准差: sd.toFixed(1),
计算公式: `(${height.toFixed(1)} - ${mean.toFixed(1)}) / ${sd.toFixed(1)}`,
计算结果: sds.toFixed(2)
});
return sds; return sds;
}, },

View File

@@ -1,66 +0,0 @@
// pages/news/news-details.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@@ -1,2 +0,0 @@
<!-- pages/webview/index.wxml -->
<web-view src="{{url}}"></web-view>

View File

@@ -47,17 +47,17 @@ Page({
content: '是否删除', content: '是否删除',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定') // 用户点击确定
that.go_delete(e) that.go_delete(e)
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消') // 用户点击取消
} }
} }
}) })
}, },
//删除点击 //删除点击
go_delete(e) { go_delete(e) {
console.log("列表条目的index==" + e.currentTarget.dataset.index) // 列表条目的index
//去订单详情页 //去订单详情页
// if (e.currentTarget.dataset.item != 0) { // if (e.currentTarget.dataset.item != 0) {
// let item = JSON.stringify(e.currentTarget.dataset.item); // let item = JSON.stringify(e.currentTarget.dataset.item);
@@ -66,7 +66,7 @@ Page({
// url: "/pages/orderdetail/orderdetail?item=" + item, // url: "/pages/orderdetail/orderdetail?item=" + item,
// }); // });
// } // }
console.log("列表条目的item==" + e.currentTarget.dataset.item.id) // 列表条目的item
this.deleteRecord(e.currentTarget.dataset.item.id) this.deleteRecord(e.currentTarget.dataset.item.id)
}, },
deleteRecord(itemid) { deleteRecord(itemid) {
@@ -166,7 +166,7 @@ Page({
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function () {
console.log("==页面上拉触底事件的处理函数==") // 页面上拉触底事件的处理函数
this.getOrderList(); this.getOrderList();
}, },
@@ -193,10 +193,10 @@ Page({
var resp = res.data; var resp = res.data;
if (res.data.erro == 0) { if (res.data.erro == 0) {
if (res.data.currentPage == 1) { if (res.data.currentPage == 1) {
console.log("xxxe==" + res.data.currentPage) // 当前页码
// 检查列表数量是否等于30 // 检查列表数量是否等于30
if (this.data.order_list.length === 30){ if (this.data.order_list.length === 30){
console.log("列表数量等于30") // 列表数量等于30
that.setData({ that.setData({
order_list: resp.lists, order_list: resp.lists,
pageNum: res.data.currentPage + 1 pageNum: res.data.currentPage + 1
@@ -206,9 +206,9 @@ Page({
order_list: resp.lists, order_list: resp.lists,
}); });
} }
console.log("xxxe=pageNum=" + this.data.pageNum) // 页码更新
} else { } else {
console.log("dddddddddd==") // 加载更多数据
that.setData({ that.setData({
order_list: this.data.order_list.concat(resp.lists), order_list: this.data.order_list.concat(resp.lists),
pageNum: res.data.currentPage + 1 pageNum: res.data.currentPage + 1

View File

@@ -1,190 +0,0 @@
//获取应用实例
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
dingdan_msg:false,
order_id:0,
goods_id:'',
type:'',
fileListtwo: [],
refund_remark:'',
voucher_img:[]
},
afterReadtwo(event) {
var that = this;
const { file } = event.detail;
// 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式
wx.uploadFile({
url: app.buildUrl("/app/Agentwechat/uploadImg"),
filePath: file.url,
name: 'file',
formData: {
uid:app.getCache('uid'),
token:app.getCache('token'),
file:file.url
},
success: (res)=> {
var resp = res.data;
var rstObj = JSON.parse(resp); //字符串转为对象
if(rstObj.erro==0){
app.console(rstObj.file_path+'cccccccc')
// 上传完成需要更新 fileList
const { fileListtwo = [] } = that.data;
fileListtwo.push({ ...file, url: rstObj.file_path});
that.setData({ fileListtwo });
}else{
wx.showToast({ title: rstObj.msg, icon: 'none' });
return;
}
},
});
},
deletetwo(event){
app.console(event.detail.index+"================="+222),
this.data.fileListtwo.splice([event.detail.index],1)
this.setData({fileListtwo:this.data.fileListtwo});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options.type)
console.log(options.id)
if(options.type==2){
this.setData({
order_id:options.id,
type:2
})
}
if(options.type==3){
this.setData({
order_id:options.id,
type:3
})
}
},
onClickLeft() {
wx.navigateBack()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getRefundOrderDetail();
},
//退款订单详情
getRefundOrderDetail: function () {
var that = this;
wx.request({
url: app.buildUrl("/app/Goddesswechat/getOrderDetail"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: this.data.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
order_id:this.data.order_id
},
success: function (res) {
var resp = res.data;
if(resp.erro==0){
that.setData({
detail:resp.detail,
order:resp.order,
goods_id:resp.detail.goods_id,
id:resp.detail.id,
refund:resp.detail.refund,
charge_phone:resp.detail.charge_phone
});
console.log("上传的图片路径================="+that.data.voucher_img)
if(that.data.voucher_img.length>0){
that.data.voucher_img.forEach(item => {
app.console('长度=item================'+item)
const { fileListtwo = [] } = that.data;
fileListtwo.push({ url: item });
that.setData({ fileListtwo });
})
}
}
}
});
},
tongyi(){
this.handleRefundOrder()
},
jujue(){
this.handleRefundOrderr()
},
//退款审核
handleRefundOrder: function () {
var that = this;
wx.request({
url: app.buildUrl("/app/Agentwechat/handleRefundOrder"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: app.globalData.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
id:this.data.order_id,
status:1,
reject:''
},
success: function (res) {
var resp = res.data;
if(resp.erro==0){
wx.showToast({ title: resp.msg, icon: 'none' });
setTimeout(function () {
//要延时执行的代码
wx.navigateBack()
}, 2000) //延迟时间 这里是2秒
}
}
});
},
//退款审核
handleRefundOrderr: function () {
var that = this;
wx.request({
url: app.buildUrl("/app/Agentwechat/handleRefundOrder"),
header: app.getRequestHeader(),
method:'POST',
data: {
version_number: this.data.version_number,
uid:wx.getStorageSync('uid'),
token:wx.getStorageSync('token'),
id:this.data.order_id,
status:2,
reject:''
},
success: function (res) {
var resp = res.data;
if(resp.erro==0){
wx.showToast({ title: resp.msg, icon: 'none' });
}
}
});
},
})

View File

@@ -1,7 +0,0 @@
{
"usingComponents": {
"van-nav-bar":"/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index",
"van-uploader": "/miniprogram/miniprogram_npm/@vant/weapp/uploader/index"
},
"navigationBarTitleText": "订单详情"
}

View File

@@ -1,96 +0,0 @@
<view style=" height:340rpx;position: relative;background: #ffffff;margin-top:8rpx;">
<view style="height:66rpx;padding: 0 24rpx;">
<text class="time_msg"></text>
<text wx:if="{{refund_infro.status==0}}" class="status_msg">待退款</text>
<text wx:if="{{refund_infro.status==1}}" class="status_msg">退款成功</text>
<text wx:if="{{refund_infro.status==2}}" class="status_msg">申请驳回</text>
</view>
<view class="details_box">
<image src="{{detail.index_img}}" style="width:230rpx;height:230rpx;"></image>
<view style="margin-left: 31rpx;">
<view class="title">{{detail.goods_name}}</view>
<view class="detail_number">数量x{{detail.num}}</view>
<view class="money">实付款:<text
style="font-size: 30rpx;color: #FF4A4A;font-family: PingFang SC;font-weight: bold;">¥{{detail.total_money}}</text></view>
</view>
</view>
</view>
<view class="information">
<view class="contact_title" style="font-size: 30rpx;font-weight: bold;line-height: 36rpx;color: #333333;">
订单信息
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">订单合计</text>
<text class="information_title" style="color:#FF4A4A;">¥{{order.total_money}}</text>
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">商品数量</text>
<text class="information_title">{{order.num}}</text>
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">订单时间</text>
<text class="information_title">{{order.time}}</text>
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">订单编号</text>
<text class="information_title" style="width: 100%; margin-right: 0rpx;">{{order.order_id}}</text>
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">手机号码</text>
<text class="information_title">{{order.phone}}</text>
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">付款时间</text>
<text class="information_title">{{order.time}}</text>
</view>
</view>
<view wx:if="{{type==3}}" class="informationtwo">
<view class="contact_title" style="font-size: 30rpx;font-weight: bold;line-height: 36rpx;color: #333333;">
退款信息
</view>
<view style="margin-bottom: 30rpx; border-bottom: 1rpx solid #eee;">
<text class="information_title">退款原因:</text>
<text class="information_title">{{refund_infro.refund_reason}}</text>
</view>
<view style="margin-bottom: 0rpx;">
<text class="information_title">退款金额:</text>
<text class="information_title" style="color:#FF4A4A;">¥{{refund_infro.refund_money}}</text>
</view>
<view style="margin-bottom: 30rpx; border-bottom: 1rpx solid #eee;">
<text class="information_title" style="font-size: 20rpx;">不可修改最多¥99</text>
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">退款说明:</text>
<text class="information_title">选填</text>
</view>
<view class="peisong-way" style="margin-bottom: 30rpx;">
<input style="font-size: 26rpx;padding-left: 19rpx;padding-top: 19rpxx;" model:value="{{refund_remark}}" bindinput="passwordInput" placeholder="填写补充说明,有利于您的售后哦~"/>
</view>
<view style="margin-bottom: 30rpx;">
<text class="information_title">上传凭证</text>
</view>
<view class="row-box">
<van-uploader file-list="{{fileListtwo}}"max-count="3" deletable="{{ true }}" bind:after-read="afterReadtwo" bind:delete="deletetwo"/>
</view>
</view>
<view wx:if="{{type==3&&refund_infro.status==0}}" class="addperson" bindtap="addperson" style="margin-top: 77rpx;">
<view class="text" style="background-color:#ffffff;color: #FF4C00;border: 1px solid #FF4C00;"bindtap="jujue">拒绝退款</view>
<view class="text" style="background-color: #FF4C00;"bindtap="tongyi">同意退款</view>
</view>

View File

@@ -5,7 +5,7 @@ Page({
}, },
onLoad(options) { onLoad(options) {
console.log("列表条目的index==" + options.url) // 获取URL参数
if(options.url){ if(options.url){
this.setData({ this.setData({
url: decodeURIComponent(options.url) // 如果url后面还有参数需要转码一下否则会丢失 url: decodeURIComponent(options.url) // 如果url后面还有参数需要转码一下否则会丢失

View File

@@ -1,78 +1,78 @@
{ {
"description": "项目配置文件", "description": "项目配置文件",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": true, "es6": true,
"enhance": true, "enhance": true,
"postcss": true, "postcss": true,
"preloadBackgroundData": false, "preloadBackgroundData": false,
"minified": true, "minified": true,
"newFeature": false, "newFeature": false,
"coverView": true, "coverView": true,
"nodeModules": true, "nodeModules": true,
"autoAudits": false, "autoAudits": false,
"showShadowRootInWxmlPanel": true, "showShadowRootInWxmlPanel": true,
"scopeDataCheck": false, "scopeDataCheck": false,
"uglifyFileName": false, "uglifyFileName": false,
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": false, "checkSiteMap": false,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"lazyloadPlaceholderEnable": false, "lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true, "useMultiFrameRuntime": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"enableEngineNative": false, "enableEngineNative": false,
"useIsolateContext": false, "useIsolateContext": false,
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"packNpmManually": true, "packNpmManually": true,
"packNpmRelationList": [ "packNpmRelationList": [
{ {
"packageJsonPath": "./package.json", "packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram/" "miniprogramNpmDistDir": "./miniprogram/"
} }
], ],
"minifyWXSS": true, "minifyWXSS": true,
"disableUseStrict": false, "disableUseStrict": false,
"minifyWXML": true, "minifyWXML": true,
"showES6CompileOption": false, "showES6CompileOption": false,
"useCompilerPlugins": false, "useCompilerPlugins": false,
"condition": false, "condition": false,
"ignoreUploadUnusedFiles": true "ignoreUploadUnusedFiles": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"condition": { "condition": {
"search": { "search": {
"list": [] "list": []
}, },
"conversation": { "conversation": {
"list": [] "list": []
}, },
"game": { "game": {
"list": [] "list": []
}, },
"plugin": { "plugin": {
"list": [] "list": []
}, },
"gamePlugin": { "gamePlugin": {
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"list": [] "list": []
} }
}, },
"editorSetting": { "editorSetting": {
"tabIndent": "insertSpaces", "tabIndent": "insertSpaces",
"tabSize": 2 "tabSize": 2
}, },
"libVersion": "2.21.0", "libVersion": "3.10.0",
"packOptions": { "packOptions": {
"ignore": [], "ignore": [],
"include": [] "include": []
}, },
"appid": "wxa75a76964ae7ce73", "appid": "wxa75a76964ae7ce73",
"simulatorPluginLibVersion": {} "simulatorPluginLibVersion": {}
} }

View File

@@ -1,66 +0,0 @@
// subPackages/pages/withdrawal/withdrawal.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

View File

@@ -1,3 +0,0 @@
{
"usingComponents": {}
}

View File

@@ -1,2 +0,0 @@
<!--subPackages/pages/withdrawal/withdrawal.wxml-->
<text>subPackages/pages/withdrawal/withdrawal.wxml</text>

View File

@@ -1 +0,0 @@
/* subPackages/pages/withdrawal/withdrawal.wxss */