wkw vor 3 Wochen
Ursprung
Commit
c792bf629d

+ 2 - 2
components/Countdown/Countdown.js

@@ -23,8 +23,8 @@ Component({
   lifetimes: {
     attached() {
       if (this.properties.endTime && this.properties.startTime) {
-        const target = new Date(this.properties.endTime).getTime();
-        const start = new Date(this.properties.startTime).getTime();
+        const target = new Date(this.properties.endTime.replace(/-/g, '/')).getTime();
+        const start = new Date(this.properties.startTime.replace(/-/g, '/')).getTime();
         this.startCountdown(target,start);
       }
     },

+ 2 - 2
custom-tab-bar/index.wxss

@@ -69,6 +69,6 @@
 .btn-hover {
   opacity: 0.7;
 }
-button::after {
-  border: none;
+.share-item::after {
+  border: none !important;
 }

+ 2 - 0
pages/couponDetail/couponDetail.js

@@ -1,6 +1,8 @@
 import { couponDetail } from '../../api/other';
+import {BASE_URL} from '../../utils/request';
 Page({
   data: {
+    baseUrl:BASE_URL,
     codeType: 'qr',
     status:0,
     id:'',

+ 1 - 1
pages/couponDetail/couponDetail.wxml

@@ -20,7 +20,7 @@
       </block>
     </view>
     <view class="code-box" wx:if="{{status == 1}}">
-      <image class="yhx-img" src="/static/image/yhx-bg.png" mode="aspectFit"/>
+      <image class="yhx-img" src="{{baseUrl + '/static/image/yhx-bg.png'}}" mode="aspectFit"/>
       <view class="code-yhx-text">{{couponInfo.verify_status_text}}</view>
       <view class="barcode-yhx">{{couponInfo.verify_time}}核销</view>
     </view>

+ 6 - 2
pages/index/index.js

@@ -1,11 +1,14 @@
 import {miniProgramConfig} from '../../api/other';
+import {BASE_URL} from '../../utils/request';
 const app = getApp();
 Page({
   data: {
+    baseUrl:BASE_URL,
     banners: [],
     introduction:'',
     start_time:'',
-    end_time:''
+    end_time:'',
+    ad_img:''
   },
   async onLoad(){
     const res = await miniProgramConfig();
@@ -14,7 +17,8 @@ Page({
       banners:res.data.carousels,
       introduction:res.data.marathon_event.introduction,
       start_time:res.data.marathon_event.start_time,
-      end_time:res.data.marathon_event.end_time
+      end_time:res.data.marathon_event.end_time,
+      ad_img:res.data.ad_img
     })
   },
   onShow() {

+ 3 - 2
pages/index/index.wxml

@@ -42,14 +42,15 @@
         <!-- 报名 -->
         <view class="registration">
           <view class="registration-lf" bindtap="goRegister">
-            <image class="lf-bg-img" src="/static/image/registration.png" mode="aspectFit" />
+            <image class="lf-bg-img" src="{{baseUrl + '/static/image/registration.png'}}" mode="aspectFit" />
             <image class="registration-img" src="/static/image/lkbm.png" mode="aspectFit" />
           </view>
           <view class="registration-ri" bindtap="onShowShare">
-            <image class="ri-bg-img" src="/static/image/invitation.png" mode="aspectFit" />
+            <image class="ri-bg-img" src="{{baseUrl + '/static/image/invitation.png'}}" mode="aspectFit" />
             <image class="registration-img" src="/static/image/yqhy.png" mode="aspectFit"/>
           </view>
         </view>
+        <image class="ad-img" wx:if="{{ad_img}}" src="{{ad_img}}" mode="widthFix"/>
         <rich-text style="width: 100%;" nodes="{{introduction}}" />
       </view>
     </view>

+ 3 - 0
pages/index/index.wxss

@@ -82,4 +82,7 @@
   height: 438rpx;
   background: #FFFFFF;
   border-radius: 68rpx 68rpx 0rpx 0rpx;
+}
+.ad-img{
+  width: 100%;
 }

+ 2 - 2
pages/mine/mine.js

@@ -15,7 +15,7 @@ Page({
     ],
     userInfo: {},
     programConfig:{},
-    url:BASE_URL,
+    baseUrl:BASE_URL,
     showAgreementModal:false
   },
   goPage(e){
@@ -75,7 +75,7 @@ Page({
     }
   },
   onPhone(){
-    MAKE_PHONE_CALL('15527606226');
+    MAKE_PHONE_CALL(this.data.programConfig.customer_phone);
   },
 
   /**

+ 0 - 1
pages/mine/mine.json

@@ -2,7 +2,6 @@
   "usingComponents": {
     "van-image": "@vant/weapp/image/index",
     "van-cell": "@vant/weapp/cell/index",
-    "van-cell-group": "@vant/weapp/cell-group/index",
     "van-dialog": "@vant/weapp/dialog/index"
   },
   "navigationStyle": "custom"

+ 4 - 3
pages/mine/mine.wxml

@@ -1,5 +1,5 @@
 <view class="container">
-  <image class="index-img" src="{{url + '/static/image/me-bg.png'}}" mode="aspectFit"></image>
+  <image class="index-img" src="{{baseUrl + '/static/image/me-bg.png'}}" mode="aspectFit"></image>
   <view class="mine">
     <view class="user-box">
       <button class="avatar-wrapper" open-type="chooseAvatar"   bind:chooseavatar="onChooseAvatar">
@@ -22,7 +22,7 @@
         </view>
       </view>
       <view class="logo-item">
-        <image class="logo-img" src="/static/image/logo.png" mode="aspectFit"/>
+        <image class="logo-img" src="{{baseUrl + '/static/image/logo.png'}}" mode="aspectFit"/>
       </view>
     </view>
   </view>
@@ -36,7 +36,8 @@
   >
     <view class="dialog-box">
       <image class="box-code" src="{{programConfig.customer_qrcode}}" mode="aspectFill"></image>
-      <view class="box-text" bindtap="onPhone">客服电话:15527606226</view>
+      <view class="box-text" bindtap="onPhone" wx:if="{{programConfig.customer_phone}}">客服电话:{{programConfig.customer_phone}}</view>
+      <view class="box-text" wx:if="{{programConfig.customer_email}}">客服邮箱:{{programConfig.customer_email}}</view>
     </view>
   </van-dialog>
 </view>

+ 6 - 10
pages/register/register.js

@@ -1,6 +1,7 @@
 import { enroll,smsSend } from '../../api/other';
 import { FETCH_AND_FORMAT_USER_INFO } from '../../utils/util.js'
 import { uploadImage } from '../../utils/upload.js';
+import {BASE_URL} from '../../utils/request';
 const app = getApp();
 Page({
   data: {
@@ -16,7 +17,6 @@ Page({
     phoneError: '', 
     genders: ['女', '男'],
     showPicker: false,
-    pickerValue: '',
     fileList: [],
     checked: false,
     showRegistrationSuccess: false,
@@ -30,7 +30,8 @@ Page({
     countdown: 60,
     couponInfo:{},
     filePath: '',  // 上传成功的文件路径
-    fileType: ''   // image / pdf
+    fileType: '',   // image / pdf
+    baseUrl:BASE_URL
   },
 
   onShowPicker() {
@@ -39,16 +40,13 @@ Page({
   onCancel() {
     this.setData({ showPicker: false });
   },
-  onPickerChange(event) {
-    const { value } = event.detail;
-    this.setData({ pickerValue: value });
-  },
   // 性别确定
-  onConfirm() {
+  onConfirm(event) {
+    const { value } = event.detail;
     this.setData({
       formData: {
         ...this.data.formData,
-        gender: this.data.pickerValue
+        gender: value
       },
       showPicker: false
     }, () => this.checkFormValid());
@@ -119,7 +117,6 @@ Page({
       "formData.competition_image": ''
     });
   },
-
   // 输入框数据绑定
   onInput(e) {
     const field = e.currentTarget.dataset.field;
@@ -169,7 +166,6 @@ Page({
     }
     // 禁用按钮
     this.setData({ codeDisabled: true });
-    // 发送验证码请求给后台
     const res = await smsSend({phone:this.data.formData.phone});
     if (res.code == 200) {
       wx.showToast({ title: '验证码已发送', icon: 'none' });

+ 0 - 1
pages/register/register.json

@@ -5,7 +5,6 @@
     "van-popup": "@vant/weapp/popup/index",
     "van-picker": "@vant/weapp/picker/index",
     "van-icon": "@vant/weapp/icon/index",
-    "van-uploader": "@vant/weapp/uploader/index",
     "van-checkbox": "@vant/weapp/checkbox/index",
     "van-dialog": "@vant/weapp/dialog/index"
   },

+ 3 - 4
pages/register/register.wxml

@@ -2,7 +2,7 @@
   <header text="活动报名" url="{{false}}"></header>
   <view class="content">
     <view class="register">
-      <image class="register-img" src="/static/image/register/register-logo.png" mode="aspectFit" />
+      <image class="register-img" src="{{baseUrl + '/static/image/register/register-logo.png'}}" mode="aspectFit" />
       <view class="from-ul">
         
         <!-- 手机号 -->
@@ -95,7 +95,7 @@
             <block wx:if="{{filePath}}">
               <block wx:if="{{fileType === 'image'}}">
                 <view class="preview-wrap">
-                  <image src="{{filePath}}" class="preview-img" mode="aspectFit" />
+                  <image src="{{filePath}}" class="preview-img" mode="aspectFit"/>
                   <view class="delete-btn" bindtap="removeFile">
                     <van-icon name="cross" color="#fff" size="16" class="delete-btn-icon"/>
                   </view>
@@ -155,7 +155,6 @@
     <van-picker
       show-toolbar
       columns="{{genders}}"
-      bind:change="onPickerChange"
       bind:cancel="onCancel"
       bind:confirm="onConfirm"
     />
@@ -164,7 +163,7 @@
   <!-- 提交成功弹框 -->
   <van-popup class="registration" show="{{showRegistrationSuccess}}" round close-on-click-overlay="{{false}}">
     <view class="pop-content">
-      <image class="pop-img" src="/static/image/register/yhq-logo.png" mode="aspectFit"/>
+      <image class="pop-img" src="{{baseUrl + '/static/image/register/yhq-logo.png'}}" mode="aspectFit"/>
       <image class="pop-yhq" src="/static/image/register/yhq.png" mode="aspectFit"/>
       <view class="pop-card">
         <image class="pop-card-img" src="/static/image/register/yhq-bg.png" mode="aspectFit"/>

+ 1 - 1
pages/store/store.wxml

@@ -11,7 +11,7 @@
     bindrefresherrefresh="onPullDownRefresh"
   >
     <view wx:for="{{list}}" wx:key="index" class="list-card {{index === list.length - 1 ? 'no-margin' : ''}}" bindtap="goDetail" data-id="{{item.id}}">
-      <image class="card-img" src="{{ item.img || '/static/image/store-bg.png'}}"  mode="aspectFill"/>
+      <image class="card-img" src="{{ item.avatar}}"  mode="aspectFill"/>
       <view class="card-ri">
         <view class="card-ri-title m-ellipsis">{{item.name}}</view>
         <view class="card-ri-time">营业时间 {{item.business_hours}}</view>

+ 1 - 1
pages/storeDetail/storeDetail.wxml

@@ -2,7 +2,7 @@
   <header text="店铺详情"></header>
   <view class="content">
     <view class="shop-card">
-      <image class="card-img" src="{{dataInfo.img || '/static/image/store-bg.png'}}" mode="aspectFill"/>
+      <image class="card-img" src="{{dataInfo.avatar}}" mode="aspectFill"/>
       <view class="card-ri">
         <view class="card-ri-title">{{dataInfo.name}}</view>
         <view class="card-ri-time">营业时间 {{dataInfo.business_hours}}</view>

BIN
static/image/cover.jpg


BIN
static/image/invitation.png


BIN
static/image/logo.png


BIN
static/image/register/register-logo.png


BIN
static/image/register/yhq-logo.png


BIN
static/image/registration.png


BIN
static/image/store-bg.png


BIN
static/image/yhx-bg.png