gcz 2 gadi atpakaļ
vecāks
revīzija
f05a9faffe

+ 23 - 15
center/addrForm.vue

@@ -116,7 +116,10 @@
 				this.getAddrById(this.id)
 			}
 			this.fromPage = page.from;
-			this.backUrl = decodeURIComponent(page.backUrl);
+			if(page.backUrl){
+				this.backUrl = decodeURIComponent(page.backUrl);
+			}
+			
 		},
 		onReady() {
 			//如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
@@ -156,18 +159,19 @@
 				})
 			},
 			addAddr(){
+				let that = this;
 				this.$u.api.addAddr(this.model).then(res=>{
-					// console.log('res',res);
-					if(this.backUrl){
-						uni.$u.route(this.backUrl, {
-							// type: 'redirectTo'
-						});
-					}else{
-						uni.$u.route('/center/addrlist', {
-							type: 'redirectTo'
-						});
-					}
-					
+					uni.$u.toast('保存成功')
+					setTimeout(()=>{
+						if(that.backUrl){
+							console.log('that.backUrl',that.backUrl);
+							uni.$u.route(that.backUrl, {});
+						}else{
+							uni.$u.route('/center/addrlist', {
+								type: 'redirectTo'
+							});
+						}
+					},1500)
 				}).catch(err=>{
 					console.log('addAddr',err.data);
 				})
@@ -175,10 +179,14 @@
 			editAddr(){
 				this.model.id = this.id;
 				this.$u.api.editAddr(this.model).then(res=>{
+					uni.$u.toast('保存成功')
 					// console.log('res',res);
-					uni.$u.route('/center/addrlist', {
-						type: 'redirectTo'
-					});
+					setTimeout(()=>{
+						uni.$u.route('/center/addrlist', {
+							type: 'redirectTo'
+						});
+					},1500)
+					
 				}).catch(err=>{
 					console.log('addAddr',err.data);
 				})

+ 23 - 2
center/memberinfo.vue

@@ -29,8 +29,8 @@
 					</view>
 				</view>
 				<u-cell title="昵称" @click="nameShow=true" :value="memberInfo.name"></u-cell>
-				<u-cell title="性别" @click="showSex=true" :value="memberInfo.sex|filterSex"></u-cell>
-				<u-cell title="生日" :value="memberInfo.birthdayTime||'未设置'" @click="timeShow = true" :isLink="true"></u-cell>
+				<u-cell title="性别" @click="handleChangeSex" :value="memberInfo.sex|filterSex"></u-cell>
+				<u-cell title="生日" :value="memberInfo.birthdayTime||'未设置'" @click="handleChangeBirthday" :isLink="true"></u-cell>
 				<u-cell title="会员等级" :value="memberInfo.levelName"></u-cell>
 				<u-cell title="实名制认证" @click="factorAuth" :value="memberInfo.isAuth==1?'已认证':'去认证'"></u-cell>
 			</u-cell-group>
@@ -66,6 +66,7 @@
 				@select="sexSelect"
 		>
 		</u-action-sheet>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
@@ -120,6 +121,26 @@
 					console.log('memberInfo',err.data);
 				})
 			},
+			handleChangeSex(){
+				if(this.memberInfo.isAuth==1){
+					this.$refs.uToast.show({
+						type: 'default',
+						message: "实名信息不能修改!",
+					})
+				}else{
+					this.showSex = true
+				}
+			},
+			handleChangeBirthday(){
+				if(this.memberInfo.isAuth==1){
+					this.$refs.uToast.show({
+						type: 'default',
+						message: "实名信息不能修改!",
+					})
+				}else{
+					this.timeShow = true
+				}
+			},
 			updateBirthday(e){
 				// console.log('000',e);
 				let birthday = uni.$u.timeFormat(e.value, 'yyyy-mm-dd');

+ 4 - 2
pages/login/login.vue

@@ -215,7 +215,9 @@
 					key: 'scene',
 					success: function (res) {
 						// console.log('scene====',res.data);
-						_this.scene = res.data;
+						if(res.data){
+							_this.scene = res.data
+						}
 					}
 				});
 				
@@ -253,7 +255,7 @@
 					sourceType:1,
 					mobile:this.mobile
 				}
-				if(this.scene!='undefined'){
+				if(this.scene&&this.scene!='undefined'){
 					await this.$u.api.uncompress({scene:this.scene}).then(res=>{
 						data.agentId = res.data.agentId;
 						data.agentShopId = res.data.agentShopId;

+ 4 - 1
shopping/productList.vue

@@ -38,7 +38,10 @@
 									<view class="down">
 										<!-- <text class="discount">8.8折</text> -->
 										<text v-if="vuex_member_info.priceType>1" class="original-price gray line-through">¥ {{item.salePrice}}</text>
-										<text class="sales gray">销量 {{item.saleCount}}</text>
+										<text class="sales gray">
+											<text v-if="typeName=='特价专区'">抢购量</text>
+											<text v-else>销量</text>
+										{{item.saleCount}}</text>
 									</view>
 								</view>
 								<u--image :showLoading="false" @click.native.stop="addCart(item.id)" :src="staticUrl+'/img/add.png'" width="48rpx" height="48rpx"></u--image>

+ 2 - 1
shopping/submitorder.vue

@@ -190,7 +190,8 @@
 			},
 			selectAddr(){
 				uni.$u.route('/center/addrlist', {
-					from: 'settlement'
+					from: 'submitorder',
+					// backUrl:'/shopping/submitorder'
 				});
 			},
 			// getAddrList(){