xll 2 viikkoa sitten
vanhempi
commit
07b16a9c79
26 muutettua tiedostoa jossa 856 lisäystä ja 123 poistoa
  1. 2 1
      app.json
  2. 24 0
      nova-tourism/components/dev-route/index.js
  3. 4 0
      nova-tourism/components/dev-route/index.json
  4. 60 0
      nova-tourism/components/dev-route/index.less
  5. 60 0
      nova-tourism/components/dev-route/index.wxml
  6. 144 0
      nova-tourism/components/dev-route/index.wxss
  7. 21 0
      nova-tourism/components/my/index.js
  8. 1 1
      nova-tourism/components/my/index.less
  9. 52 51
      nova-tourism/components/my/index.wxml
  10. 0 0
      nova-tourism/components/my/index.wxss
  11. 1 1
      nova-tourism/pages/homestay/homestay-detail/index.wxml
  12. 66 0
      nova-tourism/pages/my/merchant/good/good-edit/index.js
  13. 3 0
      nova-tourism/pages/my/merchant/good/good-edit/index.json
  14. 0 0
      nova-tourism/pages/my/merchant/good/good-edit/index.less
  15. 2 0
      nova-tourism/pages/my/merchant/good/good-edit/index.wxml
  16. 1 0
      nova-tourism/pages/my/merchant/good/good-edit/index.wxss
  17. 1 1
      nova-tourism/pages/my/my-order/index.js
  18. 225 24
      nova-tourism/pages/my/my-order/my-refund/refund-good/index.js
  19. 2 1
      nova-tourism/pages/my/my-order/my-refund/refund-good/index.json
  20. 39 8
      nova-tourism/pages/my/my-order/my-refund/refund-good/index.less
  21. 46 13
      nova-tourism/pages/my/my-order/my-refund/refund-good/index.wxml
  22. 35 6
      nova-tourism/pages/my/my-order/my-refund/refund-good/index.wxss
  23. 4 2
      nova-tourism/pages/my/my-order/order-detail-good/index.js
  24. 7 3
      nova-tourism/pages/my/my-order/order-detail-good/index.wxml
  25. 52 0
      nova-tourism/service/auth.service.js
  26. 4 11
      project.private.config.json

+ 2 - 1
app.json

@@ -37,7 +37,8 @@
         "pages/my/my-wallet/loose-change/index",
         "pages/my/merchant/merchant-home/my-users/index",
         "pages/my/my-order/order-detail-good/index",
-        "pages/my/my-order/my-refund/refund-good/index"
+        "pages/my/my-order/my-refund/refund-good/index",
+        "pages/my/merchant/good/good-edit/index"
       ]
     },
     {

+ 24 - 0
nova-tourism/components/dev-route/index.js

@@ -0,0 +1,24 @@
+// nova-tourism/components/dev-route/index.js
+Component({
+
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
nova-tourism/components/dev-route/index.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 60 - 0
nova-tourism/components/dev-route/index.less

@@ -0,0 +1,60 @@
+@import '../../styles/base.less';
+page {
+    // background: #f6f6f6;
+}
+.form {
+    display: flex;
+    flex-wrap: wrap;
+.col-12 {
+    width: 50%;
+}
+}
+.form-item {
+    width: 100%;
+    margin: 20rpx 0;
+    color:#382E2E;
+    .form-label {
+        font-size: 28rpx;
+        margin:20rpx;
+        color: @grey;
+        .required {
+            font-size: 40rpx;
+            vertical-align: middle;
+        }
+    }
+    .form-field {
+        padding: 10rpx;
+        // background: #ffffff;
+        .form-input {
+            padding: 10rpx;
+            border: 0.5px solid #eee;
+            border-radius: 10rpx;
+        }
+        .form-input-num {
+            width: 200rpx;
+        }
+    }
+}
+
+
+.tag-wrapper{
+    display: flex;
+    align-items: center;
+    color:#382E2E;
+    .add-btn {
+        width: auto;
+    }
+    .tags {
+        flex: 1;
+        display: flex;
+        flex-wrap: wrap;
+        .tag {
+            margin:10rpx;
+        }
+    }
+    
+}
+.footer {
+    margin-bottom: 100rpx;
+    padding: 20rpx;
+}

+ 60 - 0
nova-tourism/components/dev-route/index.wxml

@@ -0,0 +1,60 @@
+<view class="page-section form" style="color:#382E2E; ">
+    <block wx:for="{{route['editFields']}}" wx:key="index" wx:for-item="field">
+                <view class="form-item {{field.type == 'Number'?'col-12':''}}" wx:if="{{field.key != ( 'shop' || 'company' ||  'department')}}">
+                    <view class="form-label" >
+                        <text wx:if="{{field.required}}" class="red required">*</text>
+                        <text class="form-label-text">{{field.name}}:</text>
+                    </view>
+                    <view class="form-field">
+                        <block wx:if="{{field.type == 'String'}}">
+                            <block wx:if="{{!field.view}}">
+                                <input class="form-input" border="{{true}}"
+                                value="{{ formData[field.key] }}"
+                                placeholder="请输入{{field.name}}"  data-field="{{field.key}}" data-type="{{field.type}}"
+                                bindinput="onChange"/>
+                            </block>
+                        </block>
+                        <block wx:if="{{field.type == 'Number'}}">
+                            <block wx:if="{{!field.view}}">
+                                <input class="form-input form-input-num" min="0" type="number" border="{{true}}"
+                                value="{{ formData[field.key] }}" 
+                                placeholder="请输入{{field.name}}" data-field="{{field.key}}" data-type="{{field.type}}"
+                                bindinput="onChange"/>
+                            </block>
+                        </block>
+                        <block wx:if="{{field.type == 'Boolean'}}">
+                            <block wx:if="{{!field.view}}">
+                                <van-switch checked="{{ formData[field.key] }}" data-field="{{field.key}}"  data-type="{{field.type}}" active-color="#07c160"  size="24px" bind:change="onChange" />
+                            </block>
+                        </block>
+                        <block wx:if="{{field.type == 'Array'}}">
+                            <block wx:if="{{!field.view}}">
+                                <view class="tag-wrapper">
+                                    <view class="tags">
+                                        <block wx:for="{{formData[field.key]}}" wx:key="index" wx:for-item="tag">
+                                            <van-tag plain size="large" closeable data-field="{{field.key}}" data-index="{{index}}" bind:close="tagClose"  class="tag" type="primary">{{tag}}</van-tag>
+                                        </block>
+                                    </view>
+                                    <van-button plain type="primary" data-field="{{field.key}}" data-name="{{field.name}}"  bindtap="showTagEdit"  class="add-btn">添加{{field.name}}</van-button>
+        
+                                </view>
+                            </block>
+                            <block wx:if="{{field.view == 'edit-filemanager'}}">
+                                <upload data-field="{{field.key}}" bind:onChangeFile="changeFile" fileList="{{ formData[field.key] }}" accept="image" maxCount="9" uploadURL="{{uploadURL}}" domain="{{domain}}" uptokenURL="{{uptokenURL}}"></upload>
+                            </block>
+                        </block>
+                        <block wx:if="{{field.type == 'GeoPoint'}}">
+                            <block wx:if="{{!field.view}}">
+                                <van-button data-field="{{field.key}}" bind:tap="chooseGeoPoint" type="primary" size="small">选择{{field.name}}</van-button>
+                                <view>
+                                    <text class="text-small grey">{{formData['address']}}</text>
+                                </view>
+                            </block>
+                        </block>
+                    </view>
+                </view>
+    </block>
+</view>
+<view class="footer">
+    <van-button class="btn" size="large" color="#46a9a4" bindtap="submit">提交</van-button>
+</view>

+ 144 - 0
nova-tourism/components/dev-route/index.wxss

@@ -0,0 +1,144 @@
+.red {
+  color: #F01740;
+}
+.grey {
+  color: #666666;
+}
+.black {
+  color: #000000;
+}
+.title {
+  font-weight: Medium;
+  font-size: 36rpx;
+  color: #222222;
+}
+.text-large {
+  font-size: 36rpx;
+}
+.text {
+  font-size: 30rpx;
+}
+.text-left {
+  text-align: left;
+}
+.text-center {
+  text-align: center;
+}
+.text-small {
+  font-size: 24rpx;
+  /* word-break: keep-all; */
+}
+.flex {
+  display: flex;
+}
+.justify-between {
+  justify-content: space-between;
+}
+.flex-aligin-center {
+  display: flex;
+  align-items: center;
+}
+.flex-justify-between {
+  display: flex;
+  justify-content: space-between;
+}
+.flex-1 {
+  flex: 1;
+}
+.flex-grow-1 {
+  flex-grow: 1;
+}
+.fixed-bottom {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+.w-100 {
+  width: 100%;
+}
+.h-100 {
+  height: 100%;
+}
+.page-section {
+  margin: 20rpx;
+  border-radius: 20rpx;
+  background-color: #ffffff;
+}
+.page-section-spacing {
+  padding: 20rpx;
+}
+.spacing-small {
+  padding: 10rpx;
+}
+.border-trans {
+  border: 1px solid transparent;
+}
+.ellipsis {
+  width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 1;
+  -webkit-box-orient: vertical;
+}
+.ellipsis-2 {
+  width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+}
+.form {
+  display: flex;
+  flex-wrap: wrap;
+}
+.form .col-12 {
+  width: 50%;
+}
+.form-item {
+  width: 100%;
+  margin: 20rpx 0;
+  color: #382E2E;
+}
+.form-item .form-label {
+  font-size: 28rpx;
+  margin: 20rpx;
+  color: #666666;
+}
+.form-item .form-label .required {
+  font-size: 40rpx;
+  vertical-align: middle;
+}
+.form-item .form-field {
+  padding: 10rpx;
+}
+.form-item .form-field .form-input {
+  padding: 10rpx;
+  border: 0.5px solid #eee;
+  border-radius: 10rpx;
+}
+.form-item .form-field .form-input-num {
+  width: 200rpx;
+}
+.tag-wrapper {
+  display: flex;
+  align-items: center;
+  color: #382E2E;
+}
+.tag-wrapper .add-btn {
+  width: auto;
+}
+.tag-wrapper .tags {
+  flex: 1;
+  display: flex;
+  flex-wrap: wrap;
+}
+.tag-wrapper .tags .tag {
+  margin: 10rpx;
+}
+.footer {
+  margin-bottom: 100rpx;
+  padding: 20rpx;
+}

+ 21 - 0
nova-tourism/components/my/index.js

@@ -1,6 +1,8 @@
 // nova-tourism/components/my/index.js
 let Parse = getApp().Parse;
 const company = getApp().globalData.company
+const auth = require('../../service/auth.service')
+
 Component({
     /**
      * 组件的属性列表
@@ -49,6 +51,25 @@ Component({
      * 组件的方法列表
      */
     methods: {
+      /**退出登录 */
+    outLogin() {
+      wx.showModal({
+        title: '提示',
+        content: '你确定退出登录吗?',
+        showCancel: true,
+        cancelText: '取消',
+        cancelColor: '#000000',
+        confirmText: '确定',
+        confirmColor: '#3CC51F',
+        success: (result) => {
+          if (result.confirm) {
+            auth.logout()
+          }
+        },
+        fail: () => {},
+        complete: () => {}
+      });
+    },
         gourl(e) {
             const url = e.currentTarget.dataset.url;
             wx.navigateTo({

+ 1 - 1
nova-tourism/components/my/index.less

@@ -1,7 +1,7 @@
 /* nova-tourism/components/my/index.wxss */
 .all {
     width: 100vw;
-    height: 100vh; /* 如果你希望高度为视口高度,可以设置为 100vh */
+    // height: 100vh; /* 如果你希望高度为视口高度,可以设置为 100vh */
     background-image: url(https://file-cloud.fmode.cn/EbxZUK5lBI/20241122/28334h050437823.png);
     background-position: center; /* 背景图片居中 */
     background-size: cover; /* 背景图片覆盖整个元素 */

+ 52 - 51
nova-tourism/components/my/index.wxml

@@ -1,60 +1,61 @@
 <!--nova-tourism/components/my/index.wxml-->
 <nav type="title" background-color="#ffffff" frontColor="#000000" title="云上望仙" />
 <view class="all" style="height: {{contentHeight}}rpx;">
-    <view class="infobox">
-        <image src="{{User1List[0].avatar}}"></image>
-        <view class="info">
-            <view class="name">{{User1List[0].nickname}}</view>
-            <view class="uid">UID:{{User1List[0].objectId}}</view>
-            <view class="labelbox">
-                    <view class="label" wx:if="{{User1List[0].type=='shop-admin'}}">民宿主</view>
-                    <view class="label"  wx:if="{{User1List[0].type=='user'}}">用户</view>
-            </view>
-        </view>
+  <view class="infobox">
+    <image src="{{User1List[0].avatar}}"></image>
+    <view class="info">
+      <view class="name">{{User1List[0].nickname}}</view>
+      <view class="uid">UID:{{User1List[0].objectId}}</view>
+      <view class="labelbox">
+        <view class="label" wx:if="{{User1List[0].type=='shop-admin'}}">民宿主</view>
+        <view class="label" wx:if="{{User1List[0].type=='user'}}">用户</view>
+      </view>
     </view>
-    <view class="tatlebox">
-        <view class="tatle" data-url="../../pages/my/my-card/index" bindtap="gourl">
-            <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/nb541o104029705.png"></image>
-            <view class="text">卡券包</view>
-        </view>
-        <view class="tatle" data-url="../../pages/my/my-wallet/index" bindtap="gourl">
-            <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/6u1kj2104029980.png"></image>
-            <view class="text">钱包</view>
-        </view>
+  </view>
+  <view class="tatlebox">
+    <view class="tatle" data-url="../../pages/my/my-card/index" bindtap="gourl">
+      <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/nb541o104029705.png"></image>
+      <view class="text">卡券包</view>
     </view>
-    <view class="myorderbox">
-        <view class="my-name">我的订单</view>
-        <view class="or-box">
-            <view class="myorder" bindtap="goorder" data-url="../../pages/my/my-order/index" data-active="0" >
-                <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/t0nmv1104029230.png"></image>
-                <view class="or-tex">处理中</view>
-            </view>
-            <view class="myorder" bindtap="goorder" data-url="../../pages/my/my-order/index" data-active="1">
-                <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/dums1u104029603.png"></image>
-                <view class="or-tex">进行中</view>
-            </view>
-            <view class="myorder" bindtap="goorder" data-url="../../pages/my/my-order/index" data-active="2">
-                <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/1ha691104644184.png"></image>
-                <view class="or-tex">已完成</view>
-            </view>
-            <view class="myorder" bindtap="gorefund">
-                <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/erk8bg104030058.png"></image>
-                <view class="or-tex" >退款/售后</view>
-            </view>
-        </view>
-
-
+    <view class="tatle" data-url="../../pages/my/my-wallet/index" bindtap="gourl">
+      <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/6u1kj2104029980.png"></image>
+      <view class="text">钱包</view>
     </view>
-    <view class="tuiguangbox" data-url="/common-page/pages/sharing/index?path=yswx&uid={{uid}}" bindtap="gourl">
-        <view class="tuibox">
-            <view class="tui-title">推广中心</view>
-            <view class="tuiguang-tex">成为推广达人,获取佣金返利</view>
-        </view>
-        <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241211/i18ml9095731989.png"></image>
+  </view>
+  <view class="myorderbox">
+    <view class="my-name">我的订单</view>
+    <view class="or-box">
+      <view class="myorder" bindtap="goorder" data-url="../../pages/my/my-order/index" data-active="0">
+        <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/t0nmv1104029230.png"></image>
+        <view class="or-tex">处理中</view>
+      </view>
+      <view class="myorder" bindtap="goorder" data-url="../../pages/my/my-order/index" data-active="1">
+        <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/dums1u104029603.png"></image>
+        <view class="or-tex">进行中</view>
+      </view>
+      <view class="myorder" bindtap="goorder" data-url="../../pages/my/my-order/index" data-active="2">
+        <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/1ha691104644184.png"></image>
+        <view class="or-tex">已完成</view>
+      </view>
+      <view class="myorder" bindtap="gorefund">
+        <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/erk8bg104030058.png"></image>
+        <view class="or-tex">退款/售后</view>
+      </view>
     </view>
-    <view class="myshop" bindtap="merchant">我是商户</view>
-    <view class="leavebox">
-        <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/0i1usn030423248.png"></image>
-        <view class="leave-tex">退出登录</view>
+
+
+  </view>
+  <view class="tuiguangbox" data-url="/common-page/pages/sharing/index?path=yswx&uid={{uid}}" bindtap="gourl">
+    <view class="tuibox">
+      <view class="tui-title">推广中心</view>
+      <view class="tuiguang-tex">成为推广达人,获取佣金返利</view>
     </view>
+    <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241211/i18ml9095731989.png"></image>
+  </view>
+  <view class="myshop" bindtap="merchant">我是商户</view>
+  <view class="leavebox" bind:tap="outLogin">
+    <image src="https://file-cloud.fmode.cn/EbxZUK5lBI/20241212/0i1usn030423248.png"></image>
+    <view class="leave-tex">退出登录</view>
+  </view>
+  <view style="height: 150rpx;"></view>
 </view>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
nova-tourism/components/my/index.wxss


+ 1 - 1
nova-tourism/pages/homestay/homestay-detail/index.wxml

@@ -10,7 +10,7 @@
         </swiper-item>
       </block>
     </swiper>
-    <view class="numberbox">{{index}}/{{imageUrls.length}}</view>
+    <view class="numberbox">{{index}}/{{shopStore.image.length||0}}</view>
   </view>
 
   <view class="card">

+ 66 - 0
nova-tourism/pages/my/merchant/good/good-edit/index.js

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

+ 3 - 0
nova-tourism/pages/my/merchant/good/good-edit/index.json

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

+ 0 - 0
nova-tourism/pages/my/merchant/good/good-edit/index.less


+ 2 - 0
nova-tourism/pages/my/merchant/good/good-edit/index.wxml

@@ -0,0 +1,2 @@
+<!--nova-tourism/pages/my/merchant/good/good-edit/index.wxml-->
+<text>nova-tourism/pages/my/merchant/good/good-edit/index.wxml</text>

+ 1 - 0
nova-tourism/pages/my/merchant/good/good-edit/index.wxss

@@ -0,0 +1 @@
+/* nova-tourism/pages/my/merchant/good/good-edit/index.wxss */

+ 1 - 1
nova-tourism/pages/my/my-order/index.js

@@ -70,7 +70,6 @@ Page({
     this.setData({
       currentTab: Number(options.active)
     })
-    this.refersh()
   },
   async refersh() {
     this.getOrder()
@@ -168,6 +167,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
+    this.getOrder()
 
   },
 

+ 225 - 24
nova-tourism/pages/my/my-order/my-refund/refund-good/index.js

@@ -1,44 +1,245 @@
 // nova-tourism/pages/my/my-order/my-refund/refund-good/index.js
+let Parse = getApp().Parse;
+const company = getApp().globalData.company
+const uid = Parse.User.current()?.id
+const dateF = require("../../../../../../utils/date")
+const qiniuUploader = require("../../../../../../utils/qiniuUploader");
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    statusBarHeight: 0,
-    screenHeight: 0,
-    customHeight: 0,
-    bottomNavHeight: 0,
-    contentHeight: 0,
+    order: null, //订单
+    way: '退货退款', //退换方式
+    wayList: [{
+        name: '退货退款'
+      },
+      {
+        name: '退款(无需退货)'
+      },
+      {
+        name: '换货'
+      },
+    ], //可选退换方式
+    cause: '不想要了', //原因
+    causeList: [{
+        name: '不想要了'
+      },
+      {
+        name: '商品瑕疵'
+      },
+      {
+        name: '少件漏发'
+      },
+      {
+        name: '商家发错货'
+      },
+      {
+        name: '其他原因'
+      },
+    ], //可选原因
+    content: '', //描述
+    tempFiles: [], //图片-本地
+    refundImgs: [], //图片
+    isShowWay: false, //选择退货方式弹框
+    isShowCause: false, //选择原因弹框
 
-    text: '',
-    // 图片
-    fileList: [],
-    uptokenURL: '',
-    domain: '',
-    uploadURL: '',
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-    const systemInfo = wx.getSystemInfoSync();
-    const statusBarHeight = systemInfo.statusBarHeight || 0;
-    const screenHeight = systemInfo.screenHeight || 0;
-    const custom = wx.getMenuButtonBoundingClientRect();
-    const customHeight = custom.height + 10 + 2 || 0;
-    const bottomNavHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom || 0;
-
-    const contentHeight = (screenHeight - bottomNavHeight - statusBarHeight - customHeight) * 750 / systemInfo.windowWidth;
+    this.getToken()
+    let {
+      oid
+    } = options
+    console.log(options)
+    this.setData({
+      oid
+    })
+    this.getOrder()
+  },
+  /**上传图片 */
+  getTemp() {
+    let {
+      tempFiles
+    } = this.data
+    let that = this
+    wx.chooseMedia({
+      count: 9,
+      mediaType: 'image',
+      success: (res) => {
+        console.log(res)
+        let tempPathList = res.tempFiles?.map(item => item.tempFilePath)
+        that.setData({
+          tempFiles: [...tempFiles, ...(tempPathList || [])]
+        })
+      }
+    })
+  },
+  /**删除图片 */
+  del(e) {
+    let {
+      index
+    } = e.currentTarget.dataset
+    let {
+      tempFiles
+    } = this.data
+    tempFiles.splice(index, 1)
+    this.setData({
+      tempFiles
+    })
+  },
+  /** 获取token 上传图片所需*/
+  async getToken() {
+    let res = await Parse.Cloud.run('qiniu_uptoken', {
+      company: company
+    })
+    this.setData({
+      uptokenURL: res.uptoken,
+      domain: res.domain,
+      uploadURL: res.zoneUrl
+    })
+  },
+  /**转换图片链接 */
+  async upFileCall() {
+    let {
+      tempFiles
+    } = this.data
+    console.log(tempFiles)
+    let that = this
+    for (let i in tempFiles) {
+      let item = tempFiles[i]
+      await qiniuUploader.upload(
+        item,
+        async (res) => {
+            let {
+              refundImgs
+            } = that.data
+            console.log(res)
+            refundImgs.push(res?.imageURL)
+            that.setData({
+              refundImgs
+            })
+          },
+          (error) => {
+            console.log("error: " + error);
+          }, {
+            region: "SCN",
+            uploadURL: that.data.uploadURL,
+            domain: that.data.domain,
+            uptoken: that.data.uptokenURL,
+          }
+      );
+    }
+  },
+  /**提交 */
+  async submit() {
+    let {
+      content
+    } = this.data
+    if (!content) {
+      wx.showToast({
+        title: '请描述退款原因',
+        icon: 'none'
+      })
+      return
+    }
+    wx.showLoading()
+    let that = this
+    await this.upFileCall()
+    let interval = setInterval(async () => {
+      if (that.data.refundImgs?.length == that.data.tempFiles?.length) {
+        await that.saveOrder()
+        clearInterval(interval)
+      }
+    }, 1000);
+  },
+  async saveOrder() {
+    let {
+      way,
+      cause,
+      content,
+      refundImgs,
+      orderParse
+    } = this.data
+    orderParse.set('status', '500')
+    orderParse.set('content', `退换方式:${way}。原因:${cause}。描述:${content}`)
+    orderParse.set('refundImgs', refundImgs || [])
+    wx.hideLoading()
+    try {
+      await orderParse.save()
+      await wx.showToast({
+        title: '已提交退款申请',
+        icon: 'none'
+      })
+      setTimeout(() => {
+        wx.navigateBack({
+          delta: 2,
+        })
+      }, 900);
+
+    } catch (error) {
+      wx.showToast({
+        title: '出错了请检查后重试',
+        icon: 'error'
+      })
+    }
+  },
+
+
+
+  /**获取订单 */
+  async getOrder() {
+    let {
+      oid
+    } = this.data
+    let query = new Parse.Query('Order')
+    query.include('targetObject')
+    let d = await query.get(oid)
+    let order = d?.toJSON()
+    console.log(order)
+    this.setData({
+      order,
+      orderParse: d
+    })
+  },
+  closeWay() {
     this.setData({
-      statusBarHeight,
-      screenHeight,
-      customHeight,
-      bottomNavHeight,
-      contentHeight
+      isShowWay: false
     });
   },
+  openWay() {
+    this.setData({
+      isShowWay: true
+    });
+  },
+  selectWay(event) {
+    this.setData({
+      way: event?.detail?.name || '退货退款'
+    })
+  },
+  closeCause() {
+    this.setData({
+      isShowCause: false
+    });
+  },
+  openCause() {
+    this.setData({
+      isShowCause: true
+    });
+  },
+  selectCause(event) {
+    this.setData({
+      cause: event?.detail?.name || '不想要了'
+    })
+  },
+
+
+
 
   /**
    * 生命周期函数--监听页面初次渲染完成

+ 2 - 1
nova-tourism/pages/my/my-order/my-refund/refund-good/index.json

@@ -1,6 +1,7 @@
 {
   "usingComponents": {
     "van-divider": "@vant/weapp/divider/index",
-    "van-icon": "@vant/weapp/icon/index"
+    "van-icon": "@vant/weapp/icon/index",
+    "van-action-sheet": "@vant/weapp/action-sheet/index"
   }
 }

+ 39 - 8
nova-tourism/pages/my/my-order/my-refund/refund-good/index.less

@@ -1,6 +1,8 @@
 /* nova-tourism/pages/my/my-order/my-refund/refund-detail/index.wxss */
 page {
     background: white;
+    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
+
 }
 
 .title {
@@ -10,7 +12,7 @@ page {
     display: flex;
     justify-content: center;
     padding-bottom: 25rpx;
-    border-bottom:  #F4F4F4 20rpx solid;
+    border-bottom: #F4F4F4 20rpx solid;
 }
 
 .cardbox {
@@ -25,7 +27,6 @@ page {
     .title2 {
         width: 100%;
         font-size: 30rpx;
-        font-weight: 600;
         display: flex;
         align-items: center;
         margin-bottom: 30rpx;
@@ -34,8 +35,10 @@ page {
     .roombox {
         width: 100%;
         display: flex;
-        margin-top: 20rpx;
-
+        margin-top: 20rpx ;
+        padding-bottom: 20rpx;
+        margin-bottom: 20rpx;
+        border-bottom: 1rpx solid #D9D9D9;
         image {
             width: 150rpx;
             height: 150rpx;
@@ -47,7 +50,6 @@ page {
             .room-name {
                 width: 460rpx;
                 font-size: 24rpx;
-                font-weight: bold;
                 margin-bottom: 10rpx;
                 color: #000000;
 
@@ -76,6 +78,7 @@ page {
     }
 
     .text1 {
+        padding: 5rpx 0;
         width: 100%;
         font-size: 24rpx;
         display: flex;
@@ -84,7 +87,7 @@ page {
 
         .tex1 {
             display: flex;
-            font-weight: bold;
+
             .tex1-1 {
                 color: #E22525;
                 margin-left: 4rpx;
@@ -132,12 +135,40 @@ page {
     }
 
     .uploadbox {
-        width: 100%;
+        width: 100vw;
         margin-top: 20rpx;
+        display: flex;
+        justify-content: space-between;
+        .up{
+            width: 160rpx;
+        }
+        .box{
+            width:560rpx ;
+            display: flex;
+            flex-wrap: wrap;
+            .image{
+                position: relative;
+                image{
+                    margin: 5rpx;
+                    width: 160rpx;
+                    height: 160rpx;
+                }
+                van-icon{
+                    position: absolute;
+                    right: 0rpx;
+                    background: rgba(255, 255, 255, 0.87);
+                    border-radius: 0 0 0 30rpx;
+                    padding: 8rpx;
+                    font-size: 25rpx;
+                }
+            }
+          
+        }
     }
 }
 
 .submitbox {
+    margin-top: 20rpx;
     width: 100%;
     height: 110rpx;
     display: flex;
@@ -146,7 +177,7 @@ page {
     padding-bottom: 30rpx;
 
     .submit {
-        background-color: #F05C14;
+        background-color: #F89B7F;
         color: white;
         width: 50%;
         height: 100%;

+ 46 - 13
nova-tourism/pages/my/my-order/my-refund/refund-good/index.wxml

@@ -3,24 +3,32 @@
 <view class="cardbox">
   <view class="title2">确认退换信息</view>
   <view class="roombox">
-    <image src="https://file-cloud.fmode.cn//tmp/mqHkA2qV3Q8nca3dc59bad49de6e5ae57afa81d78ae8.jpeg?imageView2/1/w/200/h/200"></image>
+    <image src="{{order.targetObject[0].image||'https://file-cloud.fmode.cn//tmp/mqHkA2qV3Q8nca3dc59bad49de6e5ae57afa81d78ae8.jpeg'}}"></image>
     <view class="room">
-      <view class="room-name">房间描述房间描述</view>
-      <view class="room-text2">紫色经典款</view>
+      <view class="room-name">{{order.targetObject[0].name}}</view>
+      <view class="room-text2">
+        <block wx:if="{{order.specMap[order.targetObject[0].objectId].spec}}">
+            {{order.specMap[order.targetObject[0].objectId].spec}}
+            <van-icon name="cross" />{{order.specMap[order.targetObject[0].objectId].count}}
+          </block>
+          <block wx:for="{{order.specMap[order.targetObject[0].objectId].list}}" wx:key="index">
+            {{item.spec}}
+            <van-icon name="cross" />{{item.count}}
+          </block>
+      </view>
     </view>
   </view>
-  <van-divider customStyle="margin: 20rpx;border-color:'#B1B1B1' " />
-  <view class="text1">
+  <view class="text1" bind:tap="openWay">
     <view class="tex1">退换方式</view>
     <view class="tex3">
-      退货退款
+      {{way}}
       <van-icon name="arrow" custom-style='margin-left:10rpx' />
     </view>
   </view>
-  <view class="text1">
+  <view class="text1" bind:tap="openCause">
     <view class="tex1">退货退款的原因</view>
     <view class="tex3">
-      商品瑕疵
+      {{cause}}
       <van-icon name="arrow" custom-style='margin-left:10rpx' />
     </view>
   </view>
@@ -34,13 +42,38 @@
     </view>
   </view>
   <view class="areabox">
-    <textarea auto-height model:value='{{text}}' bindinput='' maxlength='200'></textarea>
-    <view class="number">{{text.length}}/200</view>
+    <textarea auto-height model:value='{{content}}' maxlength='200'></textarea>
+    <view class="number">{{text.length||0}}/200</view>
   </view>
   <view class="uploadbox">
-    <upload bind:onChangeFile="picture" accept="image" uploadURL="{{uploadURL}}" domain="{{domain}}" uptokenURL="{{uptokenURL}}" maxCount="9" />
+    <image bind:tap="getTemp" class="up" src="https://file-cloud.fmode.cn/EbxZUK5lBI/20250326/og1bfn023609454.jpg" mode="widthFix" />
+    <view class="box">
+    <block wx:for="{{tempFiles}}" wx:key="index">
+      <view class="image">
+        <image src="{{item}}" mode="" />
+        <van-icon data-index="{{index}}" bind:tap="del" name="cross" />
+      </view>
+    </block>
+    
+    </view>
   </view>
 </view>
 <view class="submitbox">
-  <view class="submit">提交</view>
-</view>
+  <view class="submit" bind:tap="submit">提交</view>
+</view>
+<!-- 退换方式 -->
+<van-action-sheet
+  show="{{ isShowWay }}"
+  actions="{{ wayList }}"
+  bind:close="closeWay"
+  bind:select="selectWay"
+  description="退换方式"
+/>
+<!-- 原因 -->
+<van-action-sheet
+  show="{{ isShowCause }}"
+  actions="{{ causeList }}"
+  bind:close="closeCause"
+  bind:select="selectCause"
+  description="原因"
+/>

+ 35 - 6
nova-tourism/pages/my/my-order/my-refund/refund-good/index.wxss

@@ -1,6 +1,7 @@
 /* nova-tourism/pages/my/my-order/my-refund/refund-detail/index.wxss */
 page {
   background: white;
+  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
 }
 .title {
   width: 100%;
@@ -23,7 +24,6 @@ page {
 .cardbox .title2 {
   width: 100%;
   font-size: 30rpx;
-  font-weight: 600;
   display: flex;
   align-items: center;
   margin-bottom: 30rpx;
@@ -31,7 +31,10 @@ page {
 .cardbox .roombox {
   width: 100%;
   display: flex;
-  margin-top: 20rpx;
+  margin-top: 20rpx ;
+  padding-bottom: 20rpx;
+  margin-bottom: 20rpx;
+  border-bottom: 1rpx solid #D9D9D9;
 }
 .cardbox .roombox image {
   width: 150rpx;
@@ -43,7 +46,6 @@ page {
 .cardbox .roombox .room .room-name {
   width: 460rpx;
   font-size: 24rpx;
-  font-weight: bold;
   margin-bottom: 10rpx;
   color: #000000;
 }
@@ -65,6 +67,7 @@ page {
   color: #979797;
 }
 .cardbox .text1 {
+  padding: 5rpx 0;
   width: 100%;
   font-size: 24rpx;
   display: flex;
@@ -73,7 +76,6 @@ page {
 }
 .cardbox .text1 .tex1 {
   display: flex;
-  font-weight: bold;
 }
 .cardbox .text1 .tex1 .tex1-1 {
   color: #E22525;
@@ -111,10 +113,37 @@ page {
   font-size: 26rpx;
 }
 .cardbox .uploadbox {
-  width: 100%;
+  width: 100vw;
   margin-top: 20rpx;
+  display: flex;
+  justify-content: space-between;
+}
+.cardbox .uploadbox .up {
+  width: 160rpx;
+}
+.cardbox .uploadbox .box {
+  width: 560rpx ;
+  display: flex;
+  flex-wrap: wrap;
+}
+.cardbox .uploadbox .box .image {
+  position: relative;
+}
+.cardbox .uploadbox .box .image image {
+  margin: 5rpx;
+  width: 160rpx;
+  height: 160rpx;
+}
+.cardbox .uploadbox .box .image van-icon {
+  position: absolute;
+  right: 0rpx;
+  background: rgba(255, 255, 255, 0.87);
+  border-radius: 0 0 0 30rpx;
+  padding: 8rpx;
+  font-size: 25rpx;
 }
 .submitbox {
+  margin-top: 20rpx;
   width: 100%;
   height: 110rpx;
   display: flex;
@@ -123,7 +152,7 @@ page {
   padding-bottom: 30rpx;
 }
 .submitbox .submit {
-  background-color: #F05C14;
+  background-color: #F89B7F;
   color: white;
   width: 50%;
   height: 100%;

+ 4 - 2
nova-tourism/pages/my/my-order/order-detail-good/index.js

@@ -68,9 +68,11 @@ Page({
     query.include('targetObject', 'store','expressCompany')
     let d = await query.get(objectId)
     let order = d?.toJSON()
-    order.payTime = dateF.formatTime('YYYY-mm-dd HH:MM:SS', order.payTime.iso)
+    if(order.payTime){
+      order.payTime = dateF.formatTime('YYYY-mm-dd HH:MM:SS', order?.payTime?.iso)
+    }
     if (order.startTime) {
-      order.startTime = dateF.formatTime('YYYY-mm-dd HH:MM:SS', order.startTime.iso)
+      order.startTime = dateF.formatTime('YYYY-mm-dd HH:MM:SS', order?.startTime?.iso)
     }
     console.log(order)
     this.setData({

+ 7 - 3
nova-tourism/pages/my/my-order/order-detail-good/index.wxml

@@ -12,6 +12,10 @@
         <view class="room-name">{{order.targetObject[0].name}}</view>
 
         <view class="room-text">
+          <block wx:if="{{order.specMap[order.targetObject[0].objectId].spec}}">
+            {{order.specMap[order.targetObject[0].objectId].spec}}
+            <van-icon name="cross" />{{order.specMap[order.targetObject[0].objectId].count}}
+          </block>
           <block wx:for="{{order.specMap[order.targetObject[0].objectId].list}}" wx:key="index">
             {{item.spec}}
             <van-icon name="cross" />{{item.count}}
@@ -27,14 +31,14 @@
       <view class="text1">
         <view class="tex1">订单编号</view>
         <view class="tex3" data-str="{{order.orderNum}}" bind:tap="copyStr">
-          <view class="tex3-1">{{order.orderNum}} |</view>
+          <view class="tex3-1">{{order.orderNum||'暂无'}} |</view>
           <view class="tex3-2">复制</view>
         </view>
       </view>
       <view class="text1">
         <view class="tex1">付款时间</view>
         <view class="tex3">
-          {{order.payTime}}
+          {{order.payTime||'暂无'}}
         </view>
       </view>
       <!-- <view class="text1" data-url="/common/pages/nova-express/index?num=YT8746219700214&com=yuantong" bind:tap="tourl"> -->
@@ -69,7 +73,7 @@
       </view>
       <view class="btn">
         <block wx:if="{{order.status=='400'||order.status=='700'||order.status=='800'}}">
-          <view data-url="/nova-tourism/pages/my/my-order/my-refund/refund-good/index" bind:tap="tourl">退换</view>
+          <view data-url="/nova-tourism/pages/my/my-order/my-refund/refund-good/index?oid={{order.objectId}}" bind:tap="tourl">退换</view>
         </block>
       </view>
     </view>

+ 52 - 0
nova-tourism/service/auth.service.js

@@ -0,0 +1,52 @@
+const company = getApp().globalData.company
+const Parse = getApp().Parse
+
+
+/** 登录验证*/
+  function resetlogin() {
+    return new Promise((resolve, reject) => {
+      wx.login({
+        success: function (res) {
+          if (res.code) {
+            wx.request({
+              url: "https://server.fmode.cn/api/wxapp/auth_wxapp",
+              data: {
+                c: getApp().globalData.company,
+                code: res.code,
+              },
+              async success(res) {
+                wx.setStorageSync("userInfo", res.data);
+                resolve(res)
+              },
+            });
+          }
+        },
+        fail: function (err) {
+          wx.showToast({
+            title: '服务器繁忙,请稍后重试',
+          })
+        }
+      });
+    })
+  }
+  function logout() {
+    Parse.User.logOut().then(user => {
+      wx.showToast({
+        title: '退出成功',
+        icon: 'success',
+        image: '',
+        duration: 1500,
+        mask: false,
+      });
+      wx.clearStorage()
+      setTimeout(() => {
+        wx.redirectTo({
+          url: '/nova-tourism/pages/index/index',
+        });
+      }, 1000);
+    });
+  }
+module.exports = { 
+  resetlogin,
+  logout:logout
+}

+ 4 - 11
project.private.config.json

@@ -1,23 +1,16 @@
 {
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "setting": {
-    "compileHotReLoad": true,
+    "compileHotReLoad": false,
     "urlCheck": true
   },
   "condition": {
     "miniprogram": {
       "list": [
         {
-          "name": "nova-tourism/pages/my/my-order/order-detail-good/index",
-          "pathName": "nova-tourism/pages/my/my-order/order-detail-good/index",
-          "query": "objectId=qzN0MnYEba",
-          "launchMode": "default",
-          "scene": null
-        },
-        {
-          "name": "nova-tourism/pages/my/my-order/index",
-          "pathName": "nova-tourism/pages/my/my-order/index",
-          "query": "active=0",
+          "name": "nova-tourism/pages/my/my-order/my-refund/refund-good/index",
+          "pathName": "nova-tourism/pages/my/my-order/my-refund/refund-good/index",
+          "query": "oid=qzN0MnYEba",
           "launchMode": "default",
           "scene": null
         }

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä