Browse Source

release版本

master
xpz2018 6 years ago
parent
commit
809a7ae4b5
5 changed files with 12 additions and 7 deletions
  1. 2
      app.js
  2. 7
      pages/mall/order-info/index.js
  3. 2
      pages/mall/order-info/index.wxml
  4. 4
      pages/mall/order-offer/index.js
  5. 4
      pages/mall/order-offer/index.wxml

2
app.js

@ -1,7 +1,7 @@
//app.js //app.js
App({ App({
//----------------------------------------------globalData-------------------------------------- //----------------------------------------------globalData--------------------------------------
release: true,
release: 1,
httpUrl: 'https://api-test.qniao.cn', httpUrl: 'https://api-test.qniao.cn',
tmplIds: ['kg0T1ve0FpYrEtZ4ExbypHm8mtS7OJaehvqN_T9ypoI'], tmplIds: ['kg0T1ve0FpYrEtZ4ExbypHm8mtS7OJaehvqN_T9ypoI'],
globalData: { globalData: {

7
pages/mall/order-info/index.js

@ -181,15 +181,20 @@ Page({
if(this.checkSkuPrice(this.data.matchTag, element)){ if(this.checkSkuPrice(this.data.matchTag, element)){
this.data.form.unitPrice = Number(element.price) this.data.form.unitPrice = Number(element.price)
this.data.form.stockNumber = Number(element.stockNumber) this.data.form.stockNumber = Number(element.stockNumber)
// 如果当前的数量大于所选规格的库存数量,那么就设置成库存数量;
if(this.data.form.number > this.data.form.stockNumber){
this.data.form.number = Number(element.stockNumber)
}
this.data.form.dividePrice = Number(element.dividePrice) this.data.form.dividePrice = Number(element.dividePrice)
this.data.form.skuId = element.id this.data.form.skuId = element.id
console.log(element)
// console.log(element)
break break
} }
} }
// 如果查询到了价格,进行价格计算 // 如果查询到了价格,进行价格计算
if(this.data.form.unitPrice){ if(this.data.form.unitPrice){
this.setData({ this.setData({
['form.number']: this.data.form.number,
['form.unitPrice']: this.data.form.unitPrice, ['form.unitPrice']: this.data.form.unitPrice,
['form.stockNumber']: this.data.form.stockNumber, ['form.stockNumber']: this.data.form.stockNumber,
amount: float.accMul(this.data.form.unitPrice, this.data.form.number) amount: float.accMul(this.data.form.unitPrice, this.data.form.number)

2
pages/mall/order-info/index.wxml

@ -37,7 +37,7 @@
</view> </view>
<view class="bg-white flex flex-justify" style="height:100rpx;;padding: 0rpx 32rpx"> <view class="bg-white flex flex-justify" style="height:100rpx;;padding: 0rpx 32rpx">
<view class="text-gray" style="font-size:28rpx">购买数量</view> <view class="text-gray" style="font-size:28rpx">购买数量</view>
<wux-input-number default-value="{{form.number}}" disabled="{{false}}" color="stable" min="{{1}}" max="{{stockNumber||orderInfo.stockNumber}}" bind:change="onNumChange" />
<wux-input-number value="{{form.number}}" controlled="{{true}}" disabled="{{false}}" color="stable" min="{{1}}" max="{{form.stockNumber||orderInfo.stockNumber}}" bind:change="onNumChange" />
</view> </view>
<view class="bg-white" style="padding:32rpx;margin-top:32rpx"> <view class="bg-white" style="padding:32rpx;margin-top:32rpx">

4
pages/mall/order-offer/index.js

@ -10,7 +10,7 @@ Page({
*/ */
data: { data: {
form: { form: {
payType: 1,
payType: 2,
}, },
addressInfo: null, addressInfo: null,
isIPhoneX: false isIPhoneX: false
@ -21,7 +21,7 @@ Page({
onLoad: function (options) { onLoad: function (options) {
if (options.json) { if (options.json) {
var form = JSON.parse(options.json) var form = JSON.parse(options.json)
form.payType = 1
form.payType = 2
// form.totalPrice = float.accAdd(float.accMul(form.unitPrice, form.number), form.dividePrice) // form.totalPrice = float.accAdd(float.accMul(form.unitPrice, form.number), form.dividePrice)
form.totalPrice = float.accMul(form.unitPrice, form.number).toFixed(2) form.totalPrice = float.accMul(form.unitPrice, form.number).toFixed(2)
form.preAmount = float.accMul(float.accMul(form.unitPrice, form.number), 0.1).toFixed(2) form.preAmount = float.accMul(float.accMul(form.unitPrice, form.number), 0.1).toFixed(2)

4
pages/mall/order-offer/index.wxml

@ -66,13 +66,13 @@
<text class="cuIcon-titles text-blue"></text> <text class="cuIcon-titles text-blue"></text>
<view style="color:black;font-size:32rpx">付款方式</view> <view style="color:black;font-size:32rpx">付款方式</view>
</view> </view>
<view class="flex flex-justify" style="height:80rpx" data-index="1" bindtap="checkMode">
<!-- <view class="flex flex-justify" style="height:80rpx" data-index="1" bindtap="checkMode">
<view class="flex align-end"> <view class="flex align-end">
<text style="font-size:28rpx">预付定金</text> <text style="font-size:28rpx">预付定金</text>
<text class="offer-hint" style="margin-left:10rpx">预付款10%,余款货到付款</text> <text class="offer-hint" style="margin-left:10rpx">预付款10%,余款货到付款</text>
</view> </view>
<text class="cuIcon-{{form.payType==1?'roundcheckfill':'roundcheck'}} text-{{form.payType==1?'blue':'grey'}}" style="font-size:36rpx"></text> <text class="cuIcon-{{form.payType==1?'roundcheckfill':'roundcheck'}} text-{{form.payType==1?'blue':'grey'}}" style="font-size:36rpx"></text>
</view>
</view> -->
<view class="flex flex-justify" style="height:80rpx" data-index="2" bindtap="checkMode"> <view class="flex flex-justify" style="height:80rpx" data-index="2" bindtap="checkMode">
<view style="font-size:28rpx">货到付款</view> <view style="font-size:28rpx">货到付款</view>
<text class="cuIcon-{{form.payType==2?'roundcheckfill':'roundcheck'}} text-{{form.payType==2?'blue':'grey'}}" style="font-size:36rpx"></text> <text class="cuIcon-{{form.payType==2?'roundcheckfill':'roundcheck'}} text-{{form.payType==2?'blue':'grey'}}" style="font-size:36rpx"></text>

Loading…
Cancel
Save