Explorar o código

1580 进商品详情界面,数量不可更改

yuxingxing %!s(int64=2) %!d(string=hai) anos
pai
achega
46b38db65d
Modificáronse 3 ficheiros con 30 adicións e 20 borrados
  1. 25 15
      components/productWindow/index.vue
  2. 1 1
      libs/routine.js
  3. 4 4
      pages/users/wechat_login/index.vue

+ 25 - 15
components/productWindow/index.vue

@@ -12,9 +12,10 @@
 					</view>
 					<view class="money font-color">
 						<view class="acea-row row-middle">
-							{{ $t(`¥`) }}<text class="num">{{ attr.productSelect.salePrice - 0}}</text>
-							<text class='vip-money'
-								v-if="is_vip > 0 && attr.productSelect.vip_price">{{ $t(`¥`) }}{{ attr.productSelect.vip_price }}</text>
+							{{ $t(`¥`) }}<text class="num">{{ attr.productSelect.salePrice - 0 }}</text>
+							<text class='vip-money' v-if="is_vip > 0 && attr.productSelect.vip_price">{{ $t(`¥`) }}{{
+									attr.productSelect.vip_price
+							}}</text>
 							<view class="vipImg" v-if="is_vip > 0 && attr.productSelect.vip_price">
 								<image src="../../static/images/svip.gif"></image>
 							</view>
@@ -48,20 +49,28 @@
 							v-if="attr.productSelect.totalSales <= 1">
 							<text class="iconfont icon-shangpinshuliang-jian"></text>
 						</view>
+
 						<view class="item reduce acea-row row-center-wrapper"
 							:class="attr.productSelect.totalSales <= 1 ? 'on' : ''" @click="CartNumDes" v-else>
 							<text class="iconfont icon-shangpinshuliang-jian"></text>
 						</view>
 						<view class='item num acea-row row-middle'>
 							<input type="number" v-model="attr.productSelect.totalSales"
-								data-name="productSelect.totalSales" @input="bindCode(attr.productSelect.totalSales)" />
+								:disabled="attr.productSelect.zoneType == 8" data-name="productSelect.totalSales"
+								@input="bindCode(attr.productSelect.totalSales)" />
 						</view>
-						<view v-if="iSplus" class="item plus acea-row row-center-wrapper" :class="
-							attr.productSelect.totalSales >= attr.productSelect.totalStock
-								? 'on'
-								: ''
-						" @click="CartNumAdd">
-							<text class="iconfont icon-shangpinshuliang-jia"></text>
+						<view v-if="iSplus">
+							<view v-if="attr.productSelect.zoneType != 8" class="item plus acea-row row-center-wrapper"
+								:class="
+									attr.productSelect.totalSales >= attr.productSelect.totalStock
+										? 'on'
+										: ''
+								" @click="CartNumAdd">
+								<text class="iconfont icon-shangpinshuliang-jia"></text>
+							</view>
+							<view v-else class="item plus acea-row row-center-wrapper on">
+								<text class="iconfont icon-shangpinshuliang-jia"></text>
+							</view>
 						</view>
 						<view v-else class='item plus'
 							:class='attr.productSelect.totalSales >= attr.productSelect.totalStock ? "on" : ""'
@@ -77,7 +86,8 @@
 				v-else-if="(iSbnt && attr.productSelect.quota <= 0) || (iSbnt && attr.productSelect.product_stock <= 0)">
 				{{ $t(`已售罄`) }}
 			</view>
-			<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">{{ $t(`确定`) }}</view>
+			<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">{{ $t(`确定`) }}
+			</view>
 			<view class="joinBnt on" v-else-if="iScart && !attr.productSelect.stock">{{ $t(`已售罄`) }}</view>
 		</view>
 		<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
@@ -132,7 +142,7 @@ export default {
 		};
 	},
 	mounted() {
-
+		console.log(this.attr);
 	},
 	methods: {
 		getpreviewImage: function () {
@@ -149,14 +159,14 @@ export default {
 		 * 
 		 */
 		bindCode: function (e) {
-			if (e > this.attr.productSelect.totalStock){
+			if (e > this.attr.productSelect.totalStock) {
 				this.$util.Tips({
 					title: this.$t(`数量大于库存,请重新输入`),
 					success: () => {
 
 					},
 				});
-			}else{
+			} else {
 				this.$emit('iptCartNum', e);
 			}
 		},
@@ -171,7 +181,7 @@ export default {
 		},
 		tapAttr: function (item, indexn) {
 			let that = this;
-			if(item.canSale){
+			if (item.canSale) {
 				that.$emit("ChangeAttr", item);
 			}
 		},

+ 1 - 1
libs/routine.js

@@ -96,7 +96,7 @@ class Routine {
 		return new Promise((resolve, reject) => {
 			uni.getUserProfile({
 				lang: 'zh_CN',
-				desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+				desc: '用于用户注册,登录', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
 				success(user) {
 					if (code) user.code = code;
 					resolve({

+ 4 - 4
pages/users/wechat_login/index.vue

@@ -22,11 +22,11 @@
 				<!-- #endif -->
 				<!-- #ifdef MP -->
 				<button v-if="canUseGetUserProfile && code" hover-class="none" @tap="getUserProfile"
-					class="bg-green btn1">{{$t(`微信登录`)}}</button>
+					class="bg-green btn1">{{$t(`微信用户一键登录`)}}</button>
 				<button v-else hover-class="none" open-type="getUserInfo" @getuserinfo="setUserInfo"
-					class="bg-green btn1">{{$t(`微信登录`)}}</button>
+					class="bg-green btn1">{{$t(`微信用户一键登录`)}}</button>
 				<!-- #endif -->
-				<button hover-class="none" @click="isUp = true" class="btn2">{{$t(`手机号登录`)}}</button>
+				<button hover-class="none" @click="isUp = true" class="btn2">{{$t(`手机号登录/注册`)}}</button>
 			</view>
 		</view>
 		<block v-if="isUp">
@@ -70,7 +70,7 @@
 				phone: '',
 				statusBarHeight: statusBarHeight,
 				isHome: false,
-				isPhoneBox: true,
+				isPhoneBox: false,
 				logoUrl: '',
 				code: '',
 				authKey: '',