Browse Source

no message

DaMowang 3 years ago
parent
commit
d8de85a163
3 changed files with 15 additions and 9 deletions
  1. 1 1
      src/main.js
  2. 5 6
      src/pages/my/login.vue
  3. 9 2
      src/pages/product/p_details.vue

+ 1 - 1
src/main.js

@@ -66,7 +66,7 @@ Array.prototype.remove = function (val) {
         this.splice(index, 1);
     }
 };
-Vue.directive('myfocus', {
+Vue.directive('focus', {
     inserted: (el, binding) => {
         if (binding.value == true || binding.value == undefined) {
             el.focus()

+ 5 - 6
src/pages/my/login.vue

@@ -5,9 +5,9 @@
             <p>欢迎登录数智云商城</p>
         </view>
         <view class="phoneL" v-if="LoginType == 1">
-            <view class="clearfix"><input v-model="formD2.mobile" placeholder="请输入手机号" type="number" maxlength="11" v-myfocus="true" /></view>
+            <view class="clearfix"><input v-model="formD2.mobile" placeholder="请输入手机号" type="number" maxlength="11" :focus="Focus == 1" /></view>
             <view class="clearfix">
-                <input v-model="formD2.captcha" placeholder="请输入验证码" confirm-type="go" type="number" maxlength="5" class="w70" />
+                <input v-model="formD2.captcha" placeholder="请输入验证码" confirm-type="go" type="number" maxlength="5" :focus="Focus == 2" class="w70" />
                 <view @click="getVerifyCode" :class="{w30:true,corb:msgNum!=='获取验证码'}">{{msgNum}}</view>
             </view>
             <view v-if="signIn" class="clearfix">
@@ -60,6 +60,8 @@ export default {
 
             ISFill: false,
             signIn: false, //是否为注册
+
+            Focus: 1, //输入框焦点  1手机号 2验证码
         };
     },
     onLoad(option) {
@@ -107,7 +109,6 @@ export default {
         },
 
         getVerifyCode() {
-            console.log(appEv);
             if (!this.isPhone(this.formD2.mobile)) {
                 appEv.errTips("手机号填写有误!");
                 return
@@ -116,9 +117,7 @@ export default {
                 mobile: this.formD2.mobile
             }).then((res) => {
                 if (res.code === 0) {
-
-                    // this.formD2.captcha = res.data.code
-
+                    this.Focus = 2; //给验证码框焦点
                     let number = 59;
                     let as = setInterval(() => {
                         this.msgNum = number + "s后重发"

+ 9 - 2
src/pages/product/p_details.vue

@@ -50,10 +50,12 @@
                     <image class="goods_img" :src="detail.original_img" mode=""></image>
                     <view class="goods_con flex_c flex_jb">
                         <view class="shop_names">{{ detail.goods_name }}</view>
-                        <!-- <view class="goods_msg">{{type == 2 ? detail.pfCombination : '¥' + detail.price}}</view> -->
-                        <view class="num_con flex_r flex_je">
+                        <view class="goods_msg" v-if="type == 2">{{detail.trade_price}}元+{{detail.trade_num}}批发积分+{{detail.treasure_price}}茶宝</view>
+                        <view class="goods_msg" v-else>¥{{ detail.cost_price }}</view>
+                        <view class="num_con flex_r flex_je" v-if="type != 6">
                             <uni-number-box :min="1" @change="bindChange" :value="buyNum"></uni-number-box>
                         </view>
+                        <view class="num_str flex_r flex_je" v-else>x 1</view>
                     </view>
                 </view>
                 <view class="goods_option flex_r flex_ac flex_jc" v-if="type == 2">
@@ -484,6 +486,11 @@ page {
     padding-bottom: 3rpx;
 }
 
+.num_str{
+    font-size: 14px;
+    color: #989898;
+}
+
 .goods_option {
     width: 100%;
     overflow: hidden;