Browse Source

文档修改

master
nige 3 years ago
parent
commit
047d41adbe
  1. 2
      app.js
  2. 7
      pages/component/TitleHeader.js
  3. 58
      pages/order/scene/index.js
  4. 4
      pages/pbService/wwcx/index.wxml
  5. 4
      pages/search/list/index.wxml
  6. 8
      pages/user/address/add/index.js
  7. 8
      pages/user/order/list.js
  8. 3
      pages/user/order/postOrderInfo/index.js

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx" unique_key: "wechatxcx"
}).then(res => { }).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest54? true : false; data.isTest = data.isTest55? true : false;
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {
// 获取ui配置文件 // 获取ui配置文件

7
pages/component/TitleHeader.js

@ -75,15 +75,18 @@ Component({
// }) // })
// } // }
else if (pages[pages.length-1].route.indexOf('pages/order/pay/index') != -1){ else if (pages[pages.length-1].route.indexOf('pages/order/pay/index') != -1){
console.log(pages[pages.length-1]);
wx.redirectTo({ wx.redirectTo({
url:'/pages/user/order/list' url:'/pages/user/order/list'
}) })
} }
else if (pages[pages.length-1].route.indexOf('pages/user/order/list') != -1){
wx.switchTab({
url: '/pages/user/user'
})
}
else if (pages[pages.length-1].route.indexOf('orderList') != -1){ else if (pages[pages.length-1].route.indexOf('orderList') != -1){
console.log(11111);
wx.navigateTo({ wx.navigateTo({
url: '/pages/user/cartlist/list' url: '/pages/user/cartlist/list'
}) })

58
pages/order/scene/index.js

@ -378,35 +378,35 @@ Page({
coupon: app.globalData.couponInfo coupon: app.globalData.couponInfo
}) })
// 获取补贴 // 获取补贴
if (this.data.product) { // if (this.data.product) {
commonApi.user_post("product/getProductAllowancePrice", { // commonApi.user_post("product/getProductAllowancePrice", {
product_code: this.data.product.product.product_code // product_code: this.data.product.product.product_code
}).then(resTwo => { // }).then(resTwo => {
if (resTwo && resTwo.code == 1) { // if (resTwo && resTwo.code == 1) {
this.setData({ // this.setData({
allowance_data: resTwo.data // allowance_data: resTwo.data
}) // })
let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price) // let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price)
let sInfo = this.data.product.sku // let sInfo = this.data.product.sku
if (spread_price > 0) { // if (spread_price > 0) {
if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) { // if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) {
this.setData({ // this.setData({
allowance_price: spread_price // allowance_price: spread_price
}) // })
} else { // } else {
this.setData({ // this.setData({
allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price // allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price
}) // })
} // }
this.changePrice() // this.changePrice()
} else { // } else {
this.setData({ // this.setData({
allowance_price: 0 // allowance_price: 0
}) // })
} // }
} // }
}) // })
} // }
}, },
/** /**

4
pages/pbService/wwcx/index.wxml

@ -35,8 +35,8 @@
<image src="{{item.logo}}" mode="aspectFill"></image> <image src="{{item.logo}}" mode="aspectFill"></image>
<view class="feiyiinfo textOver"> <view class="feiyiinfo textOver">
<view class="title textOver">{{item.name}}</view> <view class="title textOver">{{item.name}}</view>
<view class="subtitle textOver" wx:if="{{type==1}}"><text>藏于</text>{{item.collection_name}}</view> <view class="subtitle textOver" wx:if="{{type==1 && item.collection_name}}"><text>藏于</text>{{item.collection_name}}</view>
<view class="subtitle textOver" wx:if="{{type==1}}"><text>入藏时间</text>{{item.age}}</view> <view class="subtitle textOver" wx:if="{{type==1 && item.age}}"><text>入藏时间</text>{{item.age}}</view>
<view class="subtitle textOver" wx:if="{{type==2}}"><text>等级</text>{{item.level_name}}</view> <view class="subtitle textOver" wx:if="{{type==2}}"><text>等级</text>{{item.level_name}}</view>
<view class="subtitle textOver" wx:if="{{type==2}}"><text>区域</text>{{item.area?areaName[item.area]:'苏州'}}</view> <view class="subtitle textOver" wx:if="{{type==2}}"><text>区域</text>{{item.area?areaName[item.area]:'苏州'}}</view>
<view class="subtitle textOver" wx:if="{{type==2}}"><text>历史年代</text>{{item.age}}</view> <view class="subtitle textOver" wx:if="{{type==2}}"><text>历史年代</text>{{item.age}}</view>

4
pages/search/list/index.wxml

@ -102,8 +102,8 @@
<view class="product-info show-info"> <view class="product-info show-info">
<view class="product-title">{{item.title}}</view> <view class="product-title">{{item.title}}</view>
<view class="show-info"> <view class="show-info">
<view>电话:{{item.ext.tel}}</view> <view>电话:{{item.ext.tel||item.ext.scene_tel}}</view>
<view>地址:{{item.ext.address}}</view> <view>地址:{{item.ext.address||item.ext.supplier_address}}</view>
</view> </view>
</view> </view>
</view> </view>

8
pages/user/address/add/index.js

@ -9,7 +9,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isDefault:true, is_default:true,
region: [], region: [],
customItem: '', customItem: '',
formData:{ formData:{
@ -38,7 +38,7 @@ Page({
if(this.data.id){ if(this.data.id){
// 获取当前收货地址详情 // 获取当前收货地址详情
user.user_post("user/getContactInfoById",{id:this.data.id}).then(res=>{ user.user_post("user/getContactInfoById",{id:this.data.id}).then(res=>{
res.data.isDefault = res.data.isDefault=='1'; res.data.is_default = res.data.is_default=='1';
res.data.mobile = res.data.tel; res.data.mobile = res.data.tel;
res.data.username = res.data.name; res.data.username = res.data.name;
res.data.address = res.data.detail_addr; res.data.address = res.data.detail_addr;
@ -117,7 +117,7 @@ Page({
// 设为默认 // 设为默认
setDefault:function(e){ setDefault:function(e){
var formData = this.data.formData; var formData = this.data.formData;
formData.isDefault = e.detail.value; formData.is_default = e.detail.value;
this.setData({ this.setData({
formData: formData formData: formData
}) })
@ -268,7 +268,7 @@ Page({
data.province_id = areaList.filter(item => item.name == province)[0].id; data.province_id = areaList.filter(item => item.name == province)[0].id;
data.city_id = areaList.filter(item => item.name == city && item.pid == data.province_id)[0].id; data.city_id = areaList.filter(item => item.name == city && item.pid == data.province_id)[0].id;
data.district_id = areaList.filter(item => item.name == area && item.pid == data.city_id)[0].id; data.district_id = areaList.filter(item => item.name == area && item.pid == data.city_id)[0].id;
data.is_default = data.isDefault?'1':'0'; data.is_default = data.is_default?'1':'0';
data.detail_addr = data.address data.detail_addr = data.address
let service ="addNewConsignee"; let service ="addNewConsignee";
if(this.data.id){ if(this.data.id){

8
pages/user/order/list.js

@ -133,12 +133,11 @@ Page({
}) })
}) })
}, },
gotoDetail:function(e){ gotoDetail:function(e){
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
item = this.getChild(item) item = this.getChild(item)
util.gotoOrder(item) util.gotoOrder(item)
}, },
@ -247,7 +246,10 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
this.setData({
list:[]
})
this.getList()
}, },
/** /**

3
pages/user/order/postOrderInfo/index.js

@ -66,8 +66,11 @@ Page({
icon:'success' icon:'success'
}) })
info.state = "CLOSED"; info.state = "CLOSED";
info.state_text = "已关闭";
info.order_product_list.map(item=>{ info.order_product_list.map(item=>{
item.state='CLOSED' item.state='CLOSED'
item.state_text='已关闭'
}) })
_this.setData({ _this.setData({
info:info info:info

Loading…
Cancel
Save