hmp 4 лет назад
Родитель
Сommit
6b01c7f033

+ 1 - 1
common/utils/global.js

@@ -1,6 +1,6 @@
 let global = {
 	baseUrl: 'https://yyzs.nanyue6688.com/ldt/api'
-	// baseUrl: 'http://192.168.1.48:9612'
+	// baseUrl: 'http://192.168.1.168:9612'
 }
 
 export default global

+ 1 - 0
common/utils/mixin.js

@@ -12,6 +12,7 @@ let page = {
   },
   onLoad(options) {
 	  let userId=uni.getStorageSync("userId")
+	  console.log(userId,'我是userid===============>');
 	  if (!this.$u.test.isEmpty(userId)) {
 		  let link=window.location.href
 		  if (link.indexOf("?")!=-1) {

+ 2 - 1
common/utils/share.js

@@ -1,6 +1,7 @@
 import wx from 'weixin-js-sdk'
-const url = (window.location.href.split('#')[0])
+const url = (window.location.href.split('index.html')[0])+'index.html'
 export const shareConfig = (shareData, vm) => {
+	console.log(url,"url=>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
 	vm.$u.api.wxInfo.getWxShareData({
 		url
 	}).then(res => {

+ 23 - 5
pages/activityList/goods/detail.vue

@@ -38,7 +38,7 @@
 			<view class="padding-sm">
 				<view class="flex padding-xs">
 					<text class="flex justify-center align-center">现金值:</text>
-					<u-number-box :input-width="200" :min="0" :max="+detail.cashValue" v-model="data.cashValue">
+					<u-number-box :input-width="200" :min="0" :step="cashStep" :positive-integer="cashPositive" :max="+detail.cashValue" v-model="data.cashValue">
 					</u-number-box>
 					<view v-if="data.cashValue!=0" class="padding-left-sm text-red flex justify-center align-center">
 						=
@@ -48,7 +48,7 @@
 			
 				<view class="flex padding-xs">
 					<text class="flex justify-center align-center">热力值:</text>
-					<u-number-box :disabled="$u.test.isEmpty(proportion.usableHot)" :step="10" @change="hotValueChange" :input-width="200" :min="0" :max="+proportion.usableHot"  v-model="data.hotValue">
+					<u-number-box :disabled="$u.test.isEmpty(proportion.usableHot)" :step="otherStep" :positive-integer="otherPositive" @change="hotValueChange" :input-width="200" :min="0" :max="+proportion.usableHot"  v-model="data.hotValue">
 					</u-number-box>
 					<view v-if="changeCash.hotCash!=0" class="padding-left-sm text-red flex justify-center align-center">
 						=
@@ -58,7 +58,7 @@
 			
 				<view class="flex padding-xs">
 					<text class="flex justify-center align-center">积分值:</text>
-					<u-number-box :disabled="$u.test.isEmpty(proportion.usablePoints)" @change="pointsValueChange" :input-width="200" :min="0" :max="+proportion.usablePoints" v-model="data.pointsValue">
+					<u-number-box :disabled="$u.test.isEmpty(proportion.usablePoints)" :step="otherStep" :positive-integer="otherPositive" @change="pointsValueChange" :input-width="200" :min="0" :max="+proportion.usablePoints" v-model="data.pointsValue">
 					</u-number-box>
 					<view v-if="changeCash.pointsCash!=0" class="padding-left-sm text-red flex justify-center align-center">
 						=
@@ -125,6 +125,11 @@
 					hotCash: 0,
 					pointsCash: 0
 				},
+				
+				cashStep:1,
+				cashPositive:true,
+				otherStep:10,
+				otherPositive:true,
 			}
 		},
 		onLoad(options) {
@@ -146,6 +151,19 @@
 			this.getAddress()
 		},
 		methods: {
+			initStep(){
+				let cashValue=parseFloat(this.detail.cashValue)
+				let equalPoints=parseFloat(this.detail.equalPoints)
+				if (cashValue<1.0) {
+					this.cashStep=0.1
+					this.cashPositive=false
+				}
+				if (equalPoints<1.0) {
+					this.otherStep=0.1
+					this.otherPositive=false
+				}
+				console.log(this.cashStep,this.otherStep);
+			},
 			getAddress(){
 				this.$u.api.user.userAddress({userId: this.userId}).then(res => {
 					this.address = res.records[0];
@@ -154,7 +172,7 @@
 			fetchGoodsDetail() {
 				this.$u.api.pointsGoods.list({id: this.id}).then(res => {
 					this.detail = res.records[0];
-					console.log(this.detail);
+					this.initStep()
 				})
 			},
 			getUsableHotAndPoints() {
@@ -219,7 +237,7 @@
 				}
 				
 			},
-			toPay() {
+			toPay(info) {
 				WeixinJSBridge.invoke('getBrandWCPayRequest', info, (res) => {
 					if (res.err_msg == "get_brand_wcpay_request:ok" ) {
 						this.$u.api.boost.billRecord({

+ 0 - 1
pages/activityList/home/home.vue

@@ -56,7 +56,6 @@
 		},
 		methods: {
 			async authorization(current) {
-				console.log("+++++++++++++++++++++++=>");
 				let agenterId=uni.getStorageSync("agenterId")
 				let params = getUrlParams(window.location.search);
 				if (!this.$u.test.isEmpty(params.code)) {