Browse Source

修改问题

lex-xin 9 months ago
parent
commit
39611b5e76

+ 1 - 1
miniprogram/config.ts

@@ -1,4 +1,4 @@
-const environmentVariable = "test";
+const environmentVariable = "dev";
 const apiUrlInfo = {
 const apiUrlInfo = {
   dev: "https://dev.kt.colexiu.com",
   dev: "https://dev.kt.colexiu.com",
   test: "https://test.kt.colexiu.com",
   test: "https://test.kt.colexiu.com",

+ 12 - 3
miniprogram/pages/address/index.ts

@@ -202,9 +202,9 @@ Page({
       detailAddress: '',
       detailAddress: '',
       cityCode: null,
       cityCode: null,
       cityName: "",
       cityName: "",
-      provinceCode: 0,
+      provinceCode: null,
       provinceName: "",
       provinceName: "",
-      regionCode: null,
+      regionCode: '',
       regionName: "",
       regionName: "",
     })
     })
   },
   },
@@ -239,6 +239,11 @@ Page({
       provinceName: addressInfo.provinceName,
       provinceName: addressInfo.provinceName,
       regionCode: addressInfo.region,
       regionCode: addressInfo.region,
       regionName: addressInfo.regionName,
       regionName: addressInfo.regionName,
+    }, () => {
+      const cityCode: any = this.formateCityCode(true)
+      this.setData({
+        cityCode
+      })
     })
     })
   },
   },
   /** 选择地址 */
   /** 选择地址 */
@@ -336,13 +341,17 @@ Page({
           icon: 'none'
           icon: 'none'
         })
         })
       } else {
       } else {
-        await api_userReceiveAddressSave({
+        const {data} = await api_userReceiveAddressSave({
           ...params
           ...params
         })
         })
         wx.showToast({
         wx.showToast({
           title: '添加成功',
           title: '添加成功',
           icon: 'none'
           icon: 'none'
         })
         })
+
+        this.setData({
+          id: data.data
+        })
       }
       }
       this.getAddress()
       this.getAddress()
       this.onCloseAddress()
       this.onCloseAddress()

+ 53 - 51
miniprogram/pages/address/index.wxml

@@ -1,66 +1,67 @@
 <!--pages/address/index.wxml-->
 <!--pages/address/index.wxml-->
-<view class="container">
-  <navigation-bar title="收货地址"></navigation-bar>
-  <scroll-view class="record-list" type="list" scroll-y>
-    <view class="address-list">
-      <view class="empty-box" wx:if="{{ addressList.length <= 0 }}">
-        <image src="https://oss.dayaedu.com/ktyq/1731839238916.png"></image>
-        <view class="empty-text">暂无收货地址</view>
-      </view>
-      <view wx:for="{{ addressList }}" wx:key="index">
-        <view class="address-item {{ item.id === id ? 'active' : '' }}" bind:tap="onSelectAddress" data-id="{{ item.id }}">
-          <view class="item-title">
-            {{ item.provinceName }}{{ item.cityName }}{{ item.regionName }}
-          </view>
-          <view class="detailAddress">
-            {{ item.detailAddress }}
-          </view>
-          <view class="item-users">
-            <view class="item-user">
-              <text>{{ item.name }}</text>
-              <text>{{ item.phoneNumber }}</text>
+<page-meta page-style="{{ addressShow || showArea ? 'overflow: hidden;' : '' }}" style="height: 100vh;">
+  <view class="container">
+    <navigation-bar title="收货地址"></navigation-bar>
+    <scroll-view class="record-list" type="list" scroll-y>
+      <view class="address-list">
+        <view class="empty-box" wx:if="{{ addressList.length <= 0 }}">
+          <image src="https://oss.dayaedu.com/ktyq/1731839238916.png"></image>
+          <view class="empty-text">暂无收货地址</view>
+        </view>
+        <view wx:for="{{ addressList }}" wx:key="index">
+          <view class="address-item {{ item.id === id ? 'active' : '' }}" bind:tap="onSelectAddress" data-id="{{ item.id }}">
+            <view class="item-title">
+              {{ item.provinceName }}{{ item.cityName }}{{ item.regionName }}
+            </view>
+            <view class="detailAddress">
+              {{ item.detailAddress }}
+            </view>
+            <view class="item-users">
+              <view class="item-user">
+                <text>{{ item.name }}</text>
+                <text>{{ item.phoneNumber }}</text>
+              </view>
+            </view>
+            <view class="item-btn-group">
+              <button class="btn del-btn" catch:tap="onRemoveAddress" data-id="{{ item.id }}">删除</button>
+              <button class="btn update-btn" catch:tap="onUpdateAddress" data-id="{{ item.id }}">编辑</button>
             </view>
             </view>
-          </view>
-          <view class="item-btn-group">
-            <button class="btn del-btn" catch:tap="onRemoveAddress" data-id="{{ item.id }}">删除</button>
-            <button class="btn update-btn" catch:tap="onUpdateAddress" data-id="{{ item.id }}">编辑</button>
           </view>
           </view>
         </view>
         </view>
       </view>
       </view>
-    </view>
-  </scroll-view>
+    </scroll-view>
 
 
 
 
-  <view class="pop-btn-list">
-    <button class="submit-btn" bind:tap="onShowAddress">新建收货地址</button>
-  </view>
+    <view class="pop-btn-list">
+      <button class="submit-btn" bind:tap="onShowAddress">新建收货地址</button>
+    </view>
 
 
-  <van-popup show="{{ addressShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseAddress" position="bottom" round z-index="101" bind:after-leave="onAddressAfterLeave">
-    <view class="addressContainer" wx:if="{{ !addressAfterLeave }}">
-      <image src="./image/icon-close1.png" class="icon-close" bind:tap="onCloseAddress" />
-      <view class="pop-address-title">
-        {{ selectAddressId ? '修改收货地址' : '新建收货地址' }}
-      </view>
+    <van-popup show="{{ addressShow }}" safe-area-inset-bottom="{{false}}" lock-scroll="{{true}}" bind:close="onCloseAddress" position="bottom" round z-index="101" bind:after-leave="onAddressAfterLeave">
+      <view class="addressContainer" wx:if="{{ !addressAfterLeave }}">
+        <image src="./image/icon-close1.png" class="icon-close" bind:tap="onCloseAddress" />
+        <view class="pop-address-title">
+          {{ selectAddressId ? '编辑收货地址' : '新建收货地址' }}
+        </view>
 
 
-      <van-cell-group border="{{ false }}" class="cell-group">
-        <van-field model:value="{{ name }}" label="收货人" placeholder="请填写收货人姓名" placeholder-style="color: #bbb" />
-        <van-field model:value="{{ phoneNumber }}" label="电话号码" type="number" placeholder-style="color: #bbb" placeholder="请输入手机号码" maxlength="11" />
-        <van-field value="{{ provinceName ? provinceName + '/' + cityName + (regionName ? '/' + regionName : '' )  : '' }}" label="选择地区" placeholder-style="color: #bbb" placeholder="请选择省/市/区" readonly is-link bind:tap="onShowAreaList" />
-        <van-field model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" input-class="textarea" autosize />
-      </van-cell-group>
+        <van-cell-group border="{{ false }}" class="cell-group">
+          <van-field model:value="{{ name }}" label="收货人" placeholder="请填写收货人姓名" placeholder-style="color: #bbb" />
+          <van-field model:value="{{ phoneNumber }}" label="电话号码" type="number" placeholder-style="color: #bbb" placeholder="请输入手机号码" maxlength="11" />
+          <van-field value="{{ provinceName ? provinceName + '/' + cityName + (regionName ? '/' + regionName : '' )  : '' }}" label="选择地区" placeholder-style="color: #bbb" placeholder="请选择省/市/区" readonly is-link bind:tap="onShowAreaList" />
+          <van-field model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" input-class="textarea" autosize fixed />
+        </van-cell-group>
 
 
-      <view class="pop-btn-group">
-        <button class="submit-btn" bind:tap="onOperationAddress">确认</button>
+        <view class="pop-btn-group">
+          <button class="submit-btn" bind:tap="onOperationAddress">确认</button>
+        </view>
       </view>
       </view>
-    </view>
-  </van-popup>
+    </van-popup>
 
 
-  <!-- 地区 -->
-  <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{103}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList" bind:after-leave="onAreaAfterLeave" bind:before-enter="onAreaBeforeEnter">
-    <van-area  wx:if="{{ !showAreaAfterLeave }}" id='area1' areaList="{{areaList}}" visible-item-count="9" item-height="46" value="{{ regionCode || cityCode }}" bind:cancel="onCloseAreaList" bind:confirm="submitArea" />
-  </van-popup>
+    <!-- 地区 -->
+    <van-popup round="{{true}}" lock-scroll="{{true}}" z-index="{{103}}" show="{{showArea}}" position="bottom" safe-area-inset-bottom="{{false}}" bind:close="onCloseAreaList" bind:after-leave="onAreaAfterLeave" bind:before-enter="onAreaBeforeEnter">
+      <van-area wx:if="{{ !showAreaAfterLeave }}" id='area1' areaList="{{areaList}}" visible-item-count="9" item-height="46" value="{{ regionCode || cityCode }}" bind:cancel="onCloseAreaList" bind:confirm="submitArea" />
+    </van-popup>
 
 
-  <van-popup round lock-scroll="{{true}}" z-index="{{102}}" show="{{showDialog}}">
+    <van-popup round lock-scroll="{{true}}" z-index="{{102}}" show="{{showDialog}}">
       <view class="dialog-section">
       <view class="dialog-section">
         <view class="dialog-title">删除地址</view>
         <view class="dialog-title">删除地址</view>
 
 
@@ -72,4 +73,5 @@
         </view>
         </view>
       </view>
       </view>
     </van-popup>
     </van-popup>
-</view>
+  </view>
+</page-meta>

+ 1 - 1
miniprogram/pages/download/download.ts

@@ -89,7 +89,7 @@ Page({
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   }
   }
 })
 })

+ 6 - 6
miniprogram/pages/index/index.ts

@@ -234,12 +234,12 @@ Page({
   // 格式化类型
   // 格式化类型
   formatPeriod(num: number, type: string) {
   formatPeriod(num: number, type: string) {
     const template: any = {
     const template: any = {
-      DAY: "天",
-      MONTH: "月",
-      YEAR: "年"
+      DAY: "天",
+      MONTH: "月",
+      YEAR: "年"
     }
     }
     if (type === "YEAR" && num >= 99) {
     if (type === "YEAR" && num >= 99) {
-      return '永久卡'
+      return '终身'
     }
     }
     return num + (template[type] || '')
     return num + (template[type] || '')
   },
   },
@@ -508,14 +508,14 @@ Page({
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   },
   },
   onShareTimeline() {
   onShareTimeline() {
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   },
   },
 
 

+ 1 - 1
miniprogram/pages/index/index.wxml

@@ -154,7 +154,7 @@
                       </block>
                       </block>
                     </view>
                     </view>
 
 
-                    <view class="current-select-text">已选:{{ formatSelectGood.typeName }}</view>
+                    <view class="current-select-text">已选:会员有效期{{ formatSelectGood.typeName }}</view>
                   </view>
                   </view>
                   <view class="btnGroup">
                   <view class="btnGroup">
                     <button type="primary" catch:tap="onSubmit">立即享受专属权益</button>
                     <button type="primary" catch:tap="onSubmit">立即享受专属权益</button>

+ 1 - 1
miniprogram/pages/login/login.ts

@@ -146,7 +146,7 @@ Page({
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   }
   }
 })
 })

+ 10 - 3
miniprogram/pages/orders/order-detail.ts

@@ -70,6 +70,8 @@ Page({
       const infos = {
       const infos = {
         allSalePrice: 0,
         allSalePrice: 0,
         allOriginPrice: 0,
         allOriginPrice: 0,
+        originIntegerPart: '',
+        originDecimalPart: '',
         allDiscountPrice: '',
         allDiscountPrice: '',
         discountIntegerPart: '',
         discountIntegerPart: '',
         discountDecimalPart: '',
         discountDecimalPart: '',
@@ -96,6 +98,7 @@ Page({
         // console.log(infos.goodsList, 'infos.goodsList')
         // console.log(infos.goodsList, 'infos.goodsList')
         infos.goodsList.push({
         infos.goodsList.push({
           ...item,
           ...item,
+          originalPrice: formatPrice(Number(item.originalPrice || 0), 'ALL'),
           typePeriod: this.formatPeriod(item.num, item.period),
           typePeriod: this.formatPeriod(item.num, item.period),
           ...afterPrice
           ...afterPrice
         })
         })
@@ -111,7 +114,11 @@ Page({
       infos.decimalPart = allAfterPrice.decimalPart
       infos.decimalPart = allAfterPrice.decimalPart
       infos.discountIntegerPart = allDiscount.integerPart
       infos.discountIntegerPart = allDiscount.integerPart
       infos.discountDecimalPart = allDiscount.decimalPart
       infos.discountDecimalPart = allDiscount.decimalPart
-      // console.log(infos, 'infos')
+
+      const allOriginPrices: any = formatPrice(infos.allOriginPrice)
+      infos.originIntegerPart = allOriginPrices.integerPart
+      infos.originDecimalPart = allOriginPrices.decimalPart
+      
       this.setData({
       this.setData({
         goodsInfo: infos,
         goodsInfo: infos,
         userBeneficiaryId: options.userBeneficiaryId,
         userBeneficiaryId: options.userBeneficiaryId,
@@ -165,7 +172,7 @@ Page({
       YEAR: "年"
       YEAR: "年"
     }
     }
     if (type === "YEAR" && num >= 99) {
     if (type === "YEAR" && num >= 99) {
-      return '永久'
+      return '终身'
     }
     }
     return num + (template[type] || '')
     return num + (template[type] || '')
   },
   },
@@ -597,7 +604,7 @@ Page({
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   }
   }
 })
 })

+ 5 - 5
miniprogram/pages/orders/order-detail.wxml

@@ -42,7 +42,7 @@
           <view class="goods-desc">
           <view class="goods-desc">
             <view class="goodsInfo">
             <view class="goodsInfo">
               <view class="goods-name">{{ item.name }}</view>
               <view class="goods-name">{{ item.name }}</view>
-              <view class="goods-current-price">¥<text>{{ item.integerPart }}.{{ item.decimalPart }}</text></view>
+              <view class="goods-current-price">¥<text>{{ item.originalPrice }}</text></view>
             </view>
             </view>
             <view class="goods-type">
             <view class="goods-type">
               <view>
               <view>
@@ -59,8 +59,8 @@
 
 
             <view class="goods-price">
             <view class="goods-price">
               <text class="stuff">¥</text>
               <text class="stuff">¥</text>
-              <text class="priceZ">{{ goodsInfo.integerPart }}</text>
-              <text class="priceF">.{{ goodsInfo.decimalPart }}</text>
+              <text class="priceZ">{{ goodsInfo.originIntegerPart }}</text>
+              <text class="priceF">.{{ goodsInfo.originDecimalPart }}</text>
             </view>
             </view>
           </view>
           </view>
 
 
@@ -69,7 +69,7 @@
 
 
             <!-- <view class="calc-price">-¥ {{ goodsInfo.allDiscountPrice }}</view> -->
             <!-- <view class="calc-price">-¥ {{ goodsInfo.allDiscountPrice }}</view> -->
             <view class="goods-price calc-price">
             <view class="goods-price calc-price">
-              <text class="stuff">¥</text>
+              <text class="stuff">-¥</text>
               <text class="priceZ">{{ goodsInfo.discountIntegerPart }}</text>
               <text class="priceZ">{{ goodsInfo.discountIntegerPart }}</text>
               <text class="priceF">.{{ goodsInfo.discountDecimalPart }}</text>
               <text class="priceF">.{{ goodsInfo.discountDecimalPart }}</text>
             </view>
             </view>
@@ -162,7 +162,7 @@
       </view>
       </view>
 
 
       <van-cell-group border="{{ false }}" class="cell-group">
       <van-cell-group border="{{ false }}" class="cell-group">
-        <van-field model:value="{{ name }}" label="收货人" placeholder="请填写收货人姓名" placeholder-style="color: #bbb" />
+        <van-field model:value="{{ name }}" label="收货人" placeholder="请填写收货人姓名" placeholder-style="color: #bbb" maxlength="50" />
         <van-field model:value="{{ phoneNumber }}" label="电话号码" type="number" placeholder-style="color: #bbb" placeholder="请输入手机号码" maxlength="11" />
         <van-field model:value="{{ phoneNumber }}" label="电话号码" type="number" placeholder-style="color: #bbb" placeholder="请输入手机号码" maxlength="11" />
         <van-field value="{{ provinceName ? provinceName + '/' + cityName + '/' + regionName : '' }}" label="选择地区" placeholder-style="color: #bbb" placeholder="请选择省/市/区" readonly is-link bind:tap="onShowAreaList" />
         <van-field value="{{ provinceName ? provinceName + '/' + cityName + '/' + regionName : '' }}" label="选择地区" placeholder-style="color: #bbb" placeholder="请选择省/市/区" readonly is-link bind:tap="onShowAreaList" />
         <van-field model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" input-class="textarea" autosize maxlength="100" />
         <van-field model:value="{{ detailAddress }}" label="详细地址" type="textarea" placeholder-style="color: #bbb" placeholder="请填写小区/楼号/单元/门牌号" input-class="textarea" autosize maxlength="100" />

+ 2 - 2
miniprogram/pages/orders/order-result.ts

@@ -135,7 +135,7 @@ Page({
       YEAR: "年"
       YEAR: "年"
     }
     }
     if (type === "YEAR" && num >= 99) {
     if (type === "YEAR" && num >= 99) {
-      return '永久'
+      return '终身'
     }
     }
     return num + template[type]
     return num + template[type]
   },
   },
@@ -185,7 +185,7 @@ Page({
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   }
   }
 })
 })

+ 2 - 2
miniprogram/pages/orders/orders.ts

@@ -164,7 +164,7 @@ Page({
       YEAR: "年"
       YEAR: "年"
     }
     }
     if (type === "YEAR" && num >= 99) {
     if (type === "YEAR" && num >= 99) {
-      return '永久'
+      return '终身'
     }
     }
     return num + template[type]
     return num + template[type]
   },
   },
@@ -348,7 +348,7 @@ Page({
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   }
   }
 })
 })

+ 1 - 1
miniprogram/pages/protocol/register.ts

@@ -80,7 +80,7 @@ Page({
     return {
     return {
       title: '器乐数字AI工具',
       title: '器乐数字AI工具',
       path: '/pages/index/index',
       path: '/pages/index/index',
-      imageUrl: 'https://oss.dayaedu.com/ktyq/1733312164991.png'
+      imageUrl: 'https://oss.dayaedu.com/ktyq/1739764429916.png'
     }
     }
   }
   }
 })
 })