From 2cccaf2c6206b93176873e576882a0eefd209c04 Mon Sep 17 00:00:00 2001
From: renjianbo <263303411@qq.com>
Date: Sun, 12 Mar 2023 21:05:54 +0800
Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 139 ++++---
pages/index/index.js | 396 ++++----------------
pages/orderdetail/orderdetail.js | 593 ++++++++++++++----------------
pages/peihu.js | 66 ++++
pages/peihu.wxml | 2 +
pages/peihu/peihu.js | 82 +++++
pages/peihu/peihu.json | 12 +
pages/peihu/peihu.wxml | 49 +++
pages/peihu/peihu.wxss | 119 ++++++
shopping/pages/goddess/goddess.js | 34 +-
10 files changed, 789 insertions(+), 703 deletions(-)
create mode 100644 pages/peihu.js
create mode 100644 pages/peihu.wxml
create mode 100644 pages/peihu/peihu.js
create mode 100644 pages/peihu/peihu.json
create mode 100644 pages/peihu/peihu.wxml
create mode 100644 pages/peihu/peihu.wxss
diff --git a/app.json b/app.json
index 0ca78bf..7561a92 100644
--- a/app.json
+++ b/app.json
@@ -1,74 +1,71 @@
{
- "pages": [
- "pages/index/index",
- "pages/tuiguang/extensionInfor",
-
- "pages/tuiguang/tuiguang",
-
- "pages/institutions/institutions",
- "pages/cardBag/cardBag",
- "pages/appointmentDetails/appointmentDetails",
- "pages/my/my",
- "pages/login/login",
- "pages/order/order",
- "pages/order/re_orderdetail",
- "pages/orderdetail/orderdetail",
- "pages/reforderdetail/reforderdetail",
- "pages/mechanism/mechanism",
- "pages/activity/activity",
- "pages/myshoucang/myshoucang_index",
- "pages/myshoucang/myorderdetail",
- "pages/wodeqianbao/qianbao",
- "pages/refund/refund"
- ],
- "window": {
- "backgroundTextStyle": "light",
- "navigationBarBackgroundColor": "#fff",
- "navigationBarTitleText": "Weixin",
- "navigationBarTextStyle": "black",
- "navigationStyle": "custom"
- },
- "subPackages": [
- {
- "root": "shopping",
- "name": "shopping",
- "pages": [
- "pages/goddess/goddess",
- "pages/paysuccess/paysuccess",
- "pages/withdrawal/withdrawal",
- "pages/payment/payment"
- ],
- "independent": false
- }
- ],
- "style": "v2",
- "sitemapLocation": "sitemap.json",
- "tabBar": {
- "color": "#C1C1C1",
- "selectedColor": "#606060",
- "backgroundColor": "#fff",
- "list": [
- {
- "pagePath": "pages/index/index",
- "text": "首页",
- "iconPath": "pages/image/income.png",
- "selectedIconPath": "pages/image/income_a.png"
- },
- {
- "pagePath": "pages/order/order",
- "text": "订单",
- "iconPath": "pages/image/order.png",
- "selectedIconPath": "pages/image/order_a.png"
- },
-
- {
- "pagePath": "pages/my/my",
- "text": "我的",
- "iconPath": "pages/image/my.png",
- "selectedIconPath": "pages/image/my_a.png"
- }
- ]
-
+ "pages": [
+ "pages/index/index",
+ "pages/peihu/peihu",
+ "pages/tuiguang/extensionInfor",
+ "pages/tuiguang/tuiguang",
+ "pages/institutions/institutions",
+ "pages/cardBag/cardBag",
+ "pages/appointmentDetails/appointmentDetails",
+ "pages/my/my",
+ "pages/login/login",
+ "pages/order/order",
+ "pages/order/re_orderdetail",
+ "pages/orderdetail/orderdetail",
+ "pages/reforderdetail/reforderdetail",
+ "pages/mechanism/mechanism",
+ "pages/activity/activity",
+ "pages/myshoucang/myshoucang_index",
+ "pages/myshoucang/myorderdetail",
+ "pages/wodeqianbao/qianbao",
+ "pages/refund/refund",
+ "pages/peihu"
+ ],
+ "window": {
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTitleText": "Weixin",
+ "navigationBarTextStyle": "black",
+ "navigationStyle": "custom"
+ },
+ "subPackages": [
+ {
+ "root": "shopping",
+ "name": "shopping",
+ "pages": [
+ "pages/goddess/goddess",
+ "pages/paysuccess/paysuccess",
+ "pages/withdrawal/withdrawal",
+ "pages/payment/payment"
+ ],
+ "independent": false
+ }
+ ],
+ "style": "v2",
+ "sitemapLocation": "sitemap.json",
+ "tabBar": {
+ "color": "#C1C1C1",
+ "selectedColor": "#606060",
+ "backgroundColor": "#fff",
+ "list": [
+ {
+ "pagePath": "pages/index/index",
+ "text": "首页",
+ "iconPath": "pages/image/income.png",
+ "selectedIconPath": "pages/image/income_a.png"
+ },
+ {
+ "pagePath": "pages/order/order",
+ "text": "订单",
+ "iconPath": "pages/image/order.png",
+ "selectedIconPath": "pages/image/order_a.png"
+ },
+ {
+ "pagePath": "pages/my/my",
+ "text": "我的",
+ "iconPath": "pages/image/my.png",
+ "selectedIconPath": "pages/image/my_a.png"
}
-
+ ]
+ }
}
\ No newline at end of file
diff --git a/pages/index/index.js b/pages/index/index.js
index 65e0cd9..2388181 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -1,329 +1,81 @@
//获取应用实例
var app = getApp();
-// pages/dtpicker/dtpicker.js
-var dateTimePicker = require('../../utils/dateTimePicker.js');
-const uilt = require('../../utils/util.js');
Page({
- data: {
- option1: [{
- text: '全部医院',
- value: 0
- },
- {
- text: '西京医院',
- value: 1
- },
- {
- text: '陕西省人民医院',
- value: 2
- },
- {
- text: '陕西省人民医院1',
- value: 5
- },
- ],
+ data: {
+ option1: [{
+ text: '全部医院',
+ value: 0
+ },
+ {
+ text: '西京医院',
+ value: 1
+ },
+ {
+ text: '陕西省人民医院',
+ value: 2
+ },
+ {
+ text: '陕西省人民医院1',
+ value: 5
+ },
+ ],
+ value1: 0,
+ version_number: '1.0',
+ height: '',
+ url: app.globalData.url,
+ },
+ onChange(e) {
+ this.setData({
+ timeData: e.detail,
+ });
+ },
+ //生命周期回调——监听小程序启动或切前台。
+ onShow: function () {
+ this.getBannerAndCat();
+ },
+ //首页信息
+ getBannerAndCat: function () {
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/system/hospitalUserView/list',
+ header: app.getRequestHeader(),
+ method: 'GET',
+ data: {
- value1: 0,
-
- current: 0, //当前所在页面的 index
- indicatorDots: false, //是否显示面板指示点
- autoplay: true, //是否自动切换
- interval: 3000, //自动切换时间间隔
- duration: 800, //滑动动画时长
- circular: true, //是否采用衔接滑动
- clock: '',
- version_number: '1.0',
- height: '',
- url: app.globalData.url,
- goods_discount: [
-
- ],
- banners: [],
- time: '',
- timeflag: 0,
- timeData: {},
- },
- onChange(e) {
- this.setData({
- timeData: e.detail,
- });
- },
- //轮播图的切换事件
-
- swiperChange: function (e) {
-
- this.setData({
-
- swiperCurrent: e.detail.current
-
- })
-
- },
- //解决切换不刷新维内托,每次展示都会调用这个方法
- //生命周期回调——监听小程序启动或切前台。
- onShow: function () {
- this.getBannerAndCat();
- // this.getToken();
- },
- //首页信息
- getBannerAndCat: function () {
- var that = this;
-
- wx.request({
- url: app.globalData.url + '/system/hospitalUserView/list',
- header: app.getRequestHeader(),
- method: 'GET',
- data: {
-
- },
- success: (res) => {
- var resp = res.data;
- if (res.data.code == 200) {
- that.setData({
- special_offer: resp.data,
- });
-
- // that.data.banners[0].seckill_end = '2022-01-24'
- // that.data.banners[1].seckill_end = '2022-01-30'
-
- for (let i in this.data.banners) {
-
- //截止时间
- if (this.data.banners[i].seckill_end != null) {
-
- var str2 = this.data.banners[i].seckill_end.substring(0, 10)
- app.console(str2 + "=========555555========")
- let currentt = formatTime(new Date('"' + str2 + '"'))
- let that = this;
- let t = currentt
- let repTime = t.replace(/-/g, '/');
- let timeTamp = Date.parse(repTime);
- let time = timeTamp / 1000
- let now = new Date().getTime();
- let diff = parseInt(time - now / 1000);
- app.console(diff + "=========555555========")
- if (diff < 0) {
- let banners = this.data.banners;
- that.data.banners[i].timeflag = 0
- this.setData({
- banners
- })
- } else {
- app.console(diff + "=========更新的时间========")
- that.data.banners[i].time = diff * 1000
- that.data.banners[i].timeflag = 1
- that.setData({
- banners: this.data.banners
- })
-
- }
-
- }
-
- }
-
- }
- }
- });
- },
- // 获取token
- getToken() {
- var that = this;
- wx.request({
- url: app.globalData.url + '/app/Goddesswechat/getToken',
- data: {
- uid: wx.getStorageSync('uid'),
- phone: wx.getStorageSync('phone')
- },
- method: 'POST',
- header: {
- 'content-type': 'application/x-www-form-urlencoded'
- },
- success: (res) => {
- console.log(res)
- if (res.data.erro == '0') {
- app.globalData.token = res.data.token;
- wx.setStorageSync('token', res.data.token);
-
-
- } else {
-
- // wx.showToast({ title: res.data.msg, icon: 'none' });
- }
- }
- })
- },
- //条目点击跳转
- itemgodetail(e) {
- wx.navigateTo({
- url: "/shopping/pages/goddess/goddess?id=" + e.currentTarget.dataset.id,
- });
- },
-
- //机构分类条目点击跳转
- itemfenlei(e) {
- if (wx.getStorageSync('phone') == '') {
- wx.setStorageSync('uidFlag', false);
- console.log('请登录')
- this.isdenglu()
- } else {
- console.log('活动跳转');
- wx.navigateTo({
- url: '/pages/activity/activity?id=' + e.currentTarget.dataset.id,
- })
+ },
+ success: (res) => {
+ var resp = res.data;
+ if (res.data.code == 200) {
+ that.setData({
+ special_offer: resp.data,
+ });
}
- },
- //点击指示点切换
+ }
+ });
+ },
- chuangEvent: function (e) {
-
- this.setData({
-
- swiperCurrent: e.currentTarget.id
-
- })
-
- },
-
- //点击图片触发事件
-
- swipclick: function (e) {
-
- console.log(this.data.swiperCurrent);
-
- wx.switchTab({
-
- url: this.data.links[this.data.swiperCurrent]
-
- })
-
- },
-
-
- //是否登录
- isdenglu() {
-
-
- wx.showModal({
- title: '提示',
- content: '请先登录',
- success(res) {
- if (res.confirm) {
- console.log('用户点击确定')
- wx.switchTab({
- url: '/pages/my/my'
- })
- } else if (res.cancel) {
- console.log('用户点击取消')
- wx.switchTab({
- url: '/pages/my/my'
- })
- }
- }
- })
-
-
- },
-
-
- // 跳转详情
- details(e) {
- if (e.currentTarget.dataset.item != 0) {
- let item = JSON.stringify(e.currentTarget.dataset.item);
- console.log("传递的item" + item);
- wx.navigateTo({
- url: "/shopping/pages/goddess/goddess?item=" + item,
- });
- }
- },
- //机构详情跳转
- mechanismitem(e) {
- if (wx.getStorageSync('phone') == '') {
- wx.setStorageSync('uidFlag', false);
- console.log('请登录')
- this.isdenglu()
- } else {
- wx.navigateTo({
- url: "/pages/institutions/institutions?id=" + e.currentTarget.dataset.id,
- })
- }
- },
- // 机构跳转
- mechanism() {
- if (wx.getStorageSync('phone') == '') {
- wx.setStorageSync('uidFlag', false);
- console.log('请登录')
- this.isdenglu()
- } else {
- console.log('机构跳转');
- wx.navigateTo({
- url: '/pages/mechanism/mechanism',
- })
- }
-
- },
- // 活动跳转
- activity() {
- if (wx.getStorageSync('phone') == '') {
- wx.setStorageSync('uidFlag', false);
- console.log('请登录')
- this.isdenglu()
- } else {
- console.log('活动跳转');
- wx.navigateTo({
- // url: '/pages/activity/activity',
- url: '/pages/activity/activity?id=' + "",
- })
- }
- },
-
- onLoad() {
- var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
- app.console(statusBarHeight + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
- this.setData({
- statusBarHeight: statusBarHeight,
- height: 46 + statusBarHeight,
- });
- app.console(this.data.height + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
- },
- changeDateTime1(e) {
- this.setData({
- dateTime1: e.detail.value
- });
- },
-
- changeDateTimeColumn1(e) {
- var arr = this.data.dateTime1,
- dateArr = this.data.dateTimeArray1;
- arr[e.detail.column] = e.detail.value;
- dateArr[2] = dateTimePicker.getMonthDay(dateArr[0][arr[0]], dateArr[1][arr[1]]);
- this.setData({
- dateTimeArray1: dateArr
- });
+ // 跳转详情
+ details(e) {
+ if (e.currentTarget.dataset.item != 0) {
+ let item = JSON.stringify(e.currentTarget.dataset.item);
+ console.log("传递的item" + item);
+ wx.navigateTo({
+ // url: "/shopping/pages/goddess/goddess?item=" + item,
+ url: "/pages/peihu/peihu",
+ });
}
-
-})
-
-
-
-
-
-const formatTime = date => {
- const year = date.getFullYear()
- const month = date.getMonth() + 1
- const day = date.getDate()
- const hour = date.getHours()
- const minute = date.getMinutes()
- const second = date.getSeconds()
-
- return `${[year, month, day].map(formatNumber).join('/')} ${[hour, minute, second].map(formatNumber).join(':')}`
-}
-
-const formatNumber = n => {
- n = n.toString()
- return n[1] ? n : `0${n}`
-}
-
-module.exports = {
- formatTime
-}
\ No newline at end of file
+ },
+
+ onLoad() {
+ var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
+ this.setData({
+ statusBarHeight: statusBarHeight,
+ height: 46 + statusBarHeight,
+ });
+ },
+ changeDateTime1(e) {
+ this.setData({
+ dateTime1: e.detail.value
+ });
+ },
+})
\ No newline at end of file
diff --git a/pages/orderdetail/orderdetail.js b/pages/orderdetail/orderdetail.js
index 613806f..95646c4 100644
--- a/pages/orderdetail/orderdetail.js
+++ b/pages/orderdetail/orderdetail.js
@@ -6,152 +6,130 @@ Page({
* 页面的初始数据
*/
data: {
- resp:{
- "detail": {
- "address": "陕西省人民医院地铁口A口",
- "charge_phone": "13772530001",
- "goods_id": "f76f6fc1e44f7627a3f54c55cbe3b984",
- "goods_name": "专业陪护服务",
- "id": "19fdf93c85c2f9f393a59bb8d64c3948",
- "index_img": "https://www.zoowoo.net/uploadnv/2022/02/09/164437226246602.png",
- "mechanism_name": "贺**",
- "num": "1",
- "refund": "1",
- "total_money": "0.01",
- "wechat_logo": "https://www.zoowoo.net/uploadnv/2022/02/08/164430729380625.png"
- },
- "erro": 0,
- "msg": "查询成功",
- "order": {
- "num": "1",
- "order_id": "2022021514543285003305",
- "phone": "18133922183",
- "time": "2022-02-15 14:54:32",
- "total_money": "0.01"
- }
- },
- dingdan_msg:false,
- ewm_msg:false,
- mengceng:false,
- order_id:0,
- goods_id:'',
- btn1:'',
- qrcode:'',
- id:'',
+ dingdan_msg: false,
+ ewm_msg: false,
+ mengceng: false,
+ order_id: 0,
+ goods_id: '',
+ btn1: '',
+ qrcode: '',
+ id: '',
item: {},
url: app.globalData.url,
- refund:'',
- charge_phone:'',
- refund_box:false,
- list:[
- {
- text:'不喜欢/不想要',
+ refund: '',
+ charge_phone: '',
+ refund_box: false,
+ list: [{
+ text: '不喜欢/不想要',
},
{
- text:'商品信息与描述不符'
+ text: '商品信息与描述不符'
},
{
- text:'买多/买错/计划有变'
+ text: '买多/买错/计划有变'
},
{
- text:'更换其他项目、购买了其他项目'
+ text: '更换其他项目、购买了其他项目'
},
{
- text:'没有时间/个人原因'
+ text: '没有时间/个人原因'
},
{
- text:'其他原因'
+ text: '其他原因'
}
],
show: false,
statusType: ["拼团"],
- status:[ "0"],
+ status: ["0"],
currentType: 0,
- nav_type:0,
- is_ok_click:false,
- height:''
+ nav_type: 0,
+ is_ok_click: false,
+ height: ''
},
statusTap: function (e) {
var curType = e.currentTarget.dataset.index;
this.setData({
- currentType: curType,
- nav_type:curType
+ currentType: curType,
+ nav_type: curType
});
-
- app.console("================="+curType)
-},
+ app.console("=================" + curType)
+ },
onClickShow() {
- this.setData({ show: true });
+ this.setData({
+ show: true
+ });
},
onClickHide() {
- this.setData({ show: false });
+ this.setData({
+ show: false
+ });
},
-isok(){
+ isok() {
var that = this;
wx.request({
- url: app.buildUrl("/app/Goddesswechat/submitRefund"),
- header: app.getRequestHeader(),
- method:'POST',
- data: {
- version_number: app.globalData.version_number,
- uid:wx.getStorageSync('uid'),
- token:wx.getStorageSync('token'),
- id:'',
- refund_id:'',
- refund_remark:'',
- voucher_img:'',
- },
- success: function (res) {
- var resp = res.data;
- console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
- if(resp.erro==0){
- that.setData({
- status:resp.infro.status
- });
- if(resp.infro.infro==1){
- wx.navigateTo({
- url: '/pages/tuiguang/tuiguang'
- })
- }
-
- }
+ url: app.buildUrl("/app/Goddesswechat/submitRefund"),
+ header: app.getRequestHeader(),
+ method: 'POST',
+ data: {
+ version_number: app.globalData.version_number,
+ uid: wx.getStorageSync('uid'),
+ token: wx.getStorageSync('token'),
+ id: '',
+ refund_id: '',
+ refund_remark: '',
+ voucher_img: '',
+ },
+ success: function (res) {
+ var resp = res.data;
+ console.log(resp + "=================dddddddddddddddddddddddddddddddddddddddddddd")
+ if (resp.erro == 0) {
+ that.setData({
+ status: resp.infro.status
+ });
+ if (resp.infro.infro == 1) {
+ wx.navigateTo({
+ url: '/pages/tuiguang/tuiguang'
+ })
+ }
+
}
- });
+ }
+ });
- this.setData({
- refund_box:false,
- mengceng:false
- })
-},
+ this.setData({
+ refund_box: false,
+ mengceng: false
+ })
+ },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (e) {
var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
- app.console(statusBarHeight+"=================xxxxxxxxxxxxxxxxxxxxxxxx")
+ app.console(statusBarHeight + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
this.setData({
- statusBarHeight: statusBarHeight,
- height: 46 + statusBarHeight,
+ statusBarHeight: statusBarHeight,
+ height: 46 + statusBarHeight,
});
- app.console(this.data.height+"=================xxxxxxxxxxxxxxxxxxxxxxxx")
+ app.console(this.data.height + "=================xxxxxxxxxxxxxxxxxxxxxxxx")
console.log(e.type)
console.log(e.id)
//条目点击进入详情页
this.setData({
- btn1:2,
- order_id:e.id
- })
+ btn1: 2,
+ order_id: e.id
+ })
- var that = this;
- let item = JSON.parse(e.item);
- that.setData({
- item: item,
- charge_phone:18133233292
- });
+ var that = this;
+ let item = JSON.parse(e.item);
+ that.setData({
+ item: item,
+ charge_phone: 18133233292
+ });
// if(options.type==1){
// this.setData({
// btn1:1,
@@ -169,78 +147,83 @@ isok(){
// order_id:options.id
// })
// }
- app.console("类型================="+this.data.btn1)
+ app.console("类型=================" + this.data.btn1)
},
- mengceng(){
+ mengceng() {
this.setData({
- dingdan_msg:false,
- ewm_msg:false,
- mengceng:false,
- refund_box:false
+ dingdan_msg: false,
+ ewm_msg: false,
+ mengceng: false,
+ refund_box: false
})
},
- seeQcode(){
+ seeQcode() {
console.log('点击了查看二维码')
//console.log(that.data.order_id)
this.setData({
- ewm_msg:true,
- mengceng:true
+ ewm_msg: true,
+ mengceng: true
})
- var that=this;
- wx.request({
- url: app.globalData.url + '/app/Goddesswechat/getOrderQrcode',
- data: {
- version_number: app.globalData.version_number,
- uid:wx.getStorageSync('uid'),
- token:wx.getStorageSync('token'),
- id:that.data.order_id
-
- },
- method: 'POST',
- header: { 'content-type': 'application/x-www-form-urlencoded' },
- success:(res)=>{
- console.log(res)
- if(res.data.erro==0){
- this.setData({
- qrcode:res.data.qrcode,
-
- })
- console.log(this.data.qrcode+"=================dddxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd")
- }else{
- wx.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 2000
- })
- }
- }
- })
-
-
- },
- cancelOrder(){
- console.log('点击了取消订单')
- this.setData({
- dingdan_msg:true,
- mengceng:true
- })
- },
- okcancel(){
var that = this;
wx.request({
- url: app.globalData.url + '/system/order/concelOrder/'+this.data.item.orderId,
- header: app.getRequestHeader(),
- method: 'GET',
- data: {
- // id: this.data.item.orderId,
- },
- success: (res) => {
- var resp = res.data;
- if (res.data.code == 200) {
- wx.showToast({ title: res.data.msg, icon: 'none' });
- }
+ url: app.globalData.url + '/app/Goddesswechat/getOrderQrcode',
+ data: {
+ version_number: app.globalData.version_number,
+ uid: wx.getStorageSync('uid'),
+ token: wx.getStorageSync('token'),
+ id: that.data.order_id
+
+ },
+ method: 'POST',
+ header: {
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ success: (res) => {
+ console.log(res)
+ if (res.data.erro == 0) {
+ this.setData({
+ qrcode: res.data.qrcode,
+
+ })
+ console.log(this.data.qrcode + "=================dddxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd")
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'none',
+ duration: 2000
+ })
}
+ }
+ })
+
+
+ },
+ cancelOrder() {
+ console.log('点击了取消订单')
+ this.setData({
+ dingdan_msg: true,
+ mengceng: true
+ })
+ },
+ okcancel() {
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/system/order/concelOrder/' + this.data.item.orderId,
+ header: app.getRequestHeader(),
+ method: 'GET',
+ data: {
+ // id: this.data.item.orderId,
+ },
+ success: (res) => {
+ var resp = res.data;
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'none'
+ });
+ }
+ }
});
console.log('点击了坚持取消');
@@ -261,28 +244,28 @@ isok(){
// if (res.data.erro == 0) {
// wx.showToast({ title: res.data.msg, icon: 'none' });
// }else{
-
+
// }
// }
// }
- // )
+ // )
this.setData({
- dingdan_msg:false,
- mengceng:false
+ dingdan_msg: false,
+ mengceng: false
})
},
- nocancel(){
+ nocancel() {
this.setData({
- dingdan_msg:false,
- mengceng:false
+ dingdan_msg: false,
+ mengceng: false
})
},
/**
* 拨打电话
*/
- callphone(){
+ callphone() {
wx.makePhoneCall({
phoneNumber: this.data.charge_phone,
@@ -292,50 +275,61 @@ isok(){
/**
* 发起拼团
*/
- pintuan(){
- this.setData({ show: true });
+ pintuan() {
+ this.setData({
+ show: true
+ });
},
- tiaoguo(){
- this.setData({ show: false });
+ tiaoguo() {
+ this.setData({
+ show: false
+ });
},
-/**
+ /**
* 同意发起
*/
- tongyifaqi(){
+ tongyifaqi() {
this.confirmCollage()
- },
- //确认发起团购/砍价
- confirmCollage: function () {
- var that = this;
- wx.request({
- url: app.buildUrl("/app/Goddesswechat/confirmCollage"),
- header: app.getRequestHeader(),
- method:'POST',
- data: {
- version_number: app.globalData.version_number,
- uid:wx.getStorageSync('uid'),
- token:wx.getStorageSync('token'),
- order_id:this.data.order_id
- },
- success: function (res) {
- var resp = res.data;
- console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
- if(resp.erro==0){
- wx.showToast({ title: resp.msg, icon: 'none' });
- that.setData({ show: false });
- }
- }
+ },
+ //确认发起团购/砍价
+ confirmCollage: function () {
+ var that = this;
+ wx.request({
+ url: app.buildUrl("/app/Goddesswechat/confirmCollage"),
+ header: app.getRequestHeader(),
+ method: 'POST',
+ data: {
+ version_number: app.globalData.version_number,
+ uid: wx.getStorageSync('uid'),
+ token: wx.getStorageSync('token'),
+ order_id: this.data.order_id
+ },
+ success: function (res) {
+ var resp = res.data;
+ console.log(resp + "=================dddddddddddddddddddddddddddddddddddddddddddd")
+ if (resp.erro == 0) {
+ wx.showToast({
+ title: resp.msg,
+ icon: 'none'
+ });
+ that.setData({
+ show: false
+ });
+ }
+ }
+ });
+ },
+ refund() {
+
+ if (this.data.refund == 0) {
+ app.tip({
+ content: '该订单不支持退款'
});
- },
- refund(){
-
- if (this.data.refund==0) {
- app.tip({content: '该订单不支持退款'});
return
}
wx.navigateTo({
- url: '/pages/reforderdetail/reforderdetail?'+"type="+'3'+ '&id=' +this.data.id,
+ url: '/pages/reforderdetail/reforderdetail?' + "type=" + '3' + '&id=' + this.data.id,
})
// this.setData({
@@ -343,100 +337,85 @@ isok(){
// mengceng:true
// })
},
- gang(){
+ gang() {
this.setData({
- refund_box:false,
- mengceng:false
+ refund_box: false,
+ mengceng: false
})
},
// 确认支付
- confirm_pay: async function (){
+ confirm_pay: async function () {
var that = this;
- if (!this.data.is_ok_click){
+ if (!this.data.is_ok_click) {
that.setData({
- is_ok_click:true
+ is_ok_click: true
})
-
-
- //你要执行的操作
- this.godetail()
+
+
+ //你要执行的操作
+ this.godetail()
setTimeout(function () {
that.setData({
is_ok_click: false
})
}, 10000) //阻止一秒点击多次
- }else{
+ } else {
// wx.showToast({
// title: '请勿重复操作!',
// })
}
},
- godetail(){
+ godetail() {
console.log('点击了去付款');
-
- var _this=this;
- console.log(this.data.id+'tttttttttttttttttttttttttttttttttt')
+ var _this = this;
+ console.log(this.data.id + 'tttttttttttttttttttttttttttttttttt')
wx.request({
- url: app.globalData.url + '/system/weixinPay/12345678',
+ // url: app.globalData.url + '/system/weixinPayNew/12345666',
+ //order_id为8位数字
+ url: app.globalData.url + '/system/weixinPay/'+this.data.item.orderId,
header: app.getRequestHeader(),
method: 'GET',
data: {
-
+ version_number: app.globalData.version_number,
+ uid: wx.getStorageSync('uid'),
+ token: wx.getStorageSync('token'),
+ goods_id: this.data.goods_id,
+ order_id: this.data.order_id,
+ tg_order: ''
},
-
- // url: app.globalData.url + '/system/weixinPay/123',
- // header: app.getRequestHeader(),
- // data: {
- // version_number: app.globalData.version_number,
- // uid: wx.getStorageSync('uid'),
- // token:wx.getStorageSync('token'),
- // goods_id:this.data.goods_id,
- // order_id:this.data.order_id,
- // tg_order:''
- // },
- //method: 'POST',
- // header: { 'content-type': 'application/x-www-form-urlencoded' },
- success(res) {
- console.log(1111111)
- console.log(res)
- if (res.data.code == 200) {
-
- wx.requestPayment({
- timeStamp: res.data.data.timeStamp,
- nonceStr: res.data.data.nonceStr,
- package: res.data.data.package,
- signType: 'MD5',
- paySign: res.data.data.paySign,
- success (res) {
- console.log('支付成功');
- wx.navigateTo({
- url: '/shopping/pages/paysuccess/paysuccess',
- })
-
- },
- fail (res) {
- console.log('支付失败');
- }
- })
- }else{
- wx.showToast({
- title: res.data.msg,
- icon: 'error',
- duration: 2000
- })
+ success(res) {
+ if (res.data.code == 200) {
+ console.log('timeStamp=='+res.data.data.timeStamp)
+ console.log('nonceStr=='+res.data.data.nonceStr)
+ console.log('package=='+res.data.data.package)
+ console.log('signType=='+res.data.data.signType)
+ console.log('paySign=='+res.data.data.paySign)
+ wx.requestPayment({
+ timeStamp: res.data.data.timeStamp,
+ nonceStr: res.data.data.nonceStr,
+ package: res.data.data.package,
+ signType: res.data.data.signType,
+ paySign: res.data.data.paySign,
+ success(res) {
+ console.log('支付成功');
+ wx.navigateTo({
+ url: '/shopping/pages/paysuccess/paysuccess',
+ })
+ },
+ fail(res) {
+ console.log('支付失败');
}
+ })
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'error',
+ duration: 2000
+ })
}
- }
-
-
-
-
-
- // wx.navigateTo({
- // url: '/shopping/pages/paysuccess/paysuccess',
- // }
- )
+ }
+ })
},
/**
* 生命周期函数--监听页面初次渲染完成
@@ -449,19 +428,19 @@ isok(){
* 生命周期函数--监听页面显示
*/
onShow: function () {
- // this.getOrderDetail();
+ // this.getOrderDetail();
//假数据
var that = this;
- if(this.data.resp.erro==0){
- that.setData({
- detail:this.data.resp.detail,
- order:this.data.resp.order,
- goods_id:this.data.resp.detail.goods_id,
- id:this.data.resp.detail.id,
- refund:this.data.resp.detail.refund,
- charge_phone:this.data.resp.detail.charge_phone
- });
- }
+ if (this.data.resp.erro == 0) {
+ that.setData({
+ detail: this.data.resp.detail,
+ order: this.data.resp.order,
+ goods_id: this.data.resp.detail.goods_id,
+ id: this.data.resp.detail.id,
+ refund: this.data.resp.detail.refund,
+ charge_phone: this.data.resp.detail.charge_phone
+ });
+ }
},
/**
@@ -500,34 +479,34 @@ isok(){
onShareAppMessage: function () {
},
- //订单详情
- getOrderDetail: function () {
+ //订单详情
+ getOrderDetail: 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;
- console.log(resp+"=================dddddddddddddddddddddddddddddddddddddddddddd")
- console.log(resp.erro+"=================dddddddddddddddddddddddddddddddddddddddddddd")
- 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
- });
- }
+ 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;
+ console.log(resp + "=================dddddddddddddddddddddddddddddddddddddddddddd")
+ console.log(resp.erro + "=================dddddddddddddddddddddddddddddddddddddddddddd")
+ 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
+ });
}
+ }
});
-},
+ },
})
\ No newline at end of file
diff --git a/pages/peihu.js b/pages/peihu.js
new file mode 100644
index 0000000..b5940b3
--- /dev/null
+++ b/pages/peihu.js
@@ -0,0 +1,66 @@
+// pages/peihu.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/peihu.wxml b/pages/peihu.wxml
new file mode 100644
index 0000000..bd6168b
--- /dev/null
+++ b/pages/peihu.wxml
@@ -0,0 +1,2 @@
+
+pages/peihu.wxml
diff --git a/pages/peihu/peihu.js b/pages/peihu/peihu.js
new file mode 100644
index 0000000..456c958
--- /dev/null
+++ b/pages/peihu/peihu.js
@@ -0,0 +1,82 @@
+//获取应用实例
+var app = getApp();
+Page({
+ data: {
+ option1: [{
+ text: '全部医院',
+ value: 0
+ },
+ {
+ text: '西京医院',
+ value: 1
+ },
+ {
+ text: '陕西省人民医院',
+ value: 2
+ },
+ {
+ text: '陕西省人民医院1',
+ value: 5
+ },
+ ],
+ value1: 0,
+ version_number: '1.0',
+ height: '',
+ url: app.globalData.url,
+ },
+ onChange(e) {
+ this.setData({
+ timeData: e.detail,
+ });
+ },
+ //生命周期回调——监听小程序启动或切前台。
+ onShow: function () {
+ this.getBannerAndCat();
+ },
+ //首页信息
+ getBannerAndCat: function () {
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/system/hospitalUserView/list',
+ header: app.getRequestHeader(),
+ method: 'GET',
+ data: {
+
+ },
+ success: (res) => {
+ var resp = res.data;
+ if (res.data.code == 200) {
+ that.setData({
+ special_offer: resp.data,
+ });
+ }
+ }
+ });
+ },
+
+ // 跳转详情
+ details(e) {
+ if (e.currentTarget.dataset.item != 0) {
+ let item = JSON.stringify(e.currentTarget.dataset.item);
+ console.log("传递的item" + item);
+ wx.navigateTo({
+ url: "/shopping/pages/goddess/goddess?item=" + item,
+ });
+ }
+ },
+ back(e){
+ wx.navigateBack()
+ },
+ onLoad() {
+ var statusBarHeight = wx.getSystemInfoSync().statusBarHeight;
+ this.setData({
+ statusBarHeight: statusBarHeight,
+ height: 46 + statusBarHeight,
+ });
+ },
+ changeDateTime1(e) {
+ this.setData({
+ dateTime1: e.detail.value
+ });
+ },
+})
\ No newline at end of file
diff --git a/pages/peihu/peihu.json b/pages/peihu/peihu.json
new file mode 100644
index 0000000..ede1a4a
--- /dev/null
+++ b/pages/peihu/peihu.json
@@ -0,0 +1,12 @@
+{
+ "usingComponents": {
+ "van-count-down": "/miniprogram/miniprogram_npm/@vant/weapp/count-down/index",
+ "van-dropdown-menu": "/miniprogram/miniprogram_npm/@vant/weapp/dropdown-menu/index",
+ "van-dropdown-item": "/miniprogram/miniprogram_npm/@vant/weapp/dropdown-item/index",
+ "van-calendar": "/miniprogram/miniprogram_npm/@vant/weapp/calendar/index",
+ "van-cell": "/miniprogram/miniprogram_npm/@vant/weapp/cell/index",
+ "van-nav-bar":"/miniprogram/miniprogram_npm/@vant/weapp/nav-bar/index"
+ },
+ "navigationBarTitleText": "服务列表"
+
+}
diff --git a/pages/peihu/peihu.wxml b/pages/peihu/peihu.wxml
new file mode 100644
index 0000000..56ca010
--- /dev/null
+++ b/pages/peihu/peihu.wxml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+ {{"服务列表"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.nickName}}
+ ({{"陪护员"}})
+ {{"男"}}
+ {{"女"}}
+ {{item.experience}}经验
+
+
+ {{item.introduce}}
+
+
+
+
+
+
+
+
+
diff --git a/pages/peihu/peihu.wxss b/pages/peihu/peihu.wxss
new file mode 100644
index 0000000..1033cd6
--- /dev/null
+++ b/pages/peihu/peihu.wxss
@@ -0,0 +1,119 @@
+@import "../../component/picker/picker.wxss";
+
+page{
+ background: #F8F8F8;
+ }
+
+
+.flex-item{
+ display:flex;
+ height: 270rpx;
+ width: 670rpx;
+ border-radius: 20rpx;
+ margin-top: 20rpx;
+ }
+.Discount {
+ margin-left: 40rpx;
+ margin-right: 40rpx;
+
+}
+
+.Group {
+ display: flex;
+ }
+
+ .Group-image {
+ width: 128rpx;
+ height: 128rpx;
+ margin: 84rpx 40rpx 84rpx 40rpx;
+ }
+
+ .Group-image image {
+ width: 100%;
+ height: 100%;
+ }
+
+
+ .content {
+
+ width: auto;
+ height: 201rpx;
+ margin-top: 48rpx;
+
+ }
+
+
+ .content .title1 {
+ font-size: 36rpx;
+ font-weight: 700;
+ }
+ .content .title2 {
+ font-size: 30rpx;
+ font-weight: 700;
+ }
+ .content .title3 {
+ font-size: 32rpx;
+ margin-left: 24rpx;
+ }
+ .content .title4 {
+ font-size: 28rpx;
+ color: #228BFE;
+ width: 132rpx;
+ height: 40rpx;
+ text-align: center;
+ background-color: #A5BBE0;
+ border-radius: 20rpx;
+ margin-left: 24rpx;
+ }
+
+ /* .content .title2 {
+ font-size: 26rpx;
+ display: flex;
+ color: #B4B4B4;
+ margin: 11rpx 0 18rpx 0;
+ } */
+
+ .content .title2 .house {
+ width: 24rpx;
+ height: 24rpx;
+ margin-right: 7rpx;
+ }
+
+ .content .title2 .house image {
+ width: 100%;
+ height: 100%;
+ }
+
+ .content .tejia {
+ display: flex;
+ width: 446rpx;
+ margin-top: 24rpx;
+ }
+
+
+ .content .tejia .Price2 {
+ font-size: 30rpx;
+ color: #666666;
+ line-height: 41rpx;
+ margin-right: 23rpx;
+ }
+
+ .area {
+ display: relative;
+ flex-direction: column;
+ align-items: center;
+ height: 300rpx;
+ }
+ .area1 {
+ height: 300rpx;
+ width: 100%;
+ }
+
+ .van-nav-bar {
+ background-color: #228BFE;
+ }
+
+
+
+
+
diff --git a/shopping/pages/goddess/goddess.js b/shopping/pages/goddess/goddess.js
index 6b2b4a6..a30a18b 100644
--- a/shopping/pages/goddess/goddess.js
+++ b/shopping/pages/goddess/goddess.js
@@ -123,6 +123,15 @@ Page({
});
},
payment() {
+
+ if (this.data.seckill_start == "请输入开始日期") {
+ wx.showToast({ title: '请输入开始日期', icon: 'none' });
+ return
+ }
+ if (this.data.seckill_endx == "请输入结束日期") {
+ wx.showToast({ title: '请输入结束日期', icon: 'none' });
+ return
+ }
var that = this;
wx.request({
url: app.globalData.url + '/system/order',
@@ -142,15 +151,12 @@ Page({
'Authorization': 'Bearer ' + app.getCache("token")
},
success(res) {
- console.log(1111111)
- console.log(res)
if (res.data.code == 200) {
that.setData({
// order_id: res.data.order_id,
order_id: 123456,
})
// wx.showToast({ title: res.data.msg, icon: 'none' });
-
wx.requestPayment({
timeStamp: res.data.data.timeStamp,
nonceStr: res.data.data.nonceStr,
@@ -177,6 +183,28 @@ Page({
}
})
},
+
+ //是否登录
+ isdenglu() {
+ wx.showModal({
+ title: '提示',
+ content: '请先登录',
+ success(res) {
+ if (res.confirm) {
+ console.log('用户点击确定')
+ wx.switchTab({
+ url: '/pages/my/my'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ wx.switchTab({
+ url: '/pages/my/my'
+ })
+ }
+ }
+ })
+ },
+
bindDateChange: function (e) {
this.setData({
seckill_start: e.detail.value