Browse Source

订单列表接口对接

订单确认对接
新增订单支付页面
master
杜叶春 2 years ago
parent
commit
07834a4989
  1. 3
      app.json
  2. 5
      app.wxss
  3. BIN
      images/QR_code.png
  4. BIN
      images/order_success.png
  5. 232
      pages/address/address.js
  6. 45
      pages/address/address.wxml
  7. 77
      pages/address/index.js
  8. 12
      pages/address/index.wxml
  9. 229
      pages/address/upaddress.js
  10. 43
      pages/address/upaddress.wxml
  11. 6
      pages/chooseArea/chooseArea.js
  12. 2
      pages/index/index.wxml
  13. 16
      pages/index/index.wxss
  14. 2
      pages/login/register.wxml
  15. 24
      pages/order/detail.js
  16. 133
      pages/order/order.js
  17. 7
      pages/order/order.wxml
  18. 323
      pages/order/pay.js
  19. 1
      pages/order/pay.json
  20. 11
      pages/order/pay.wxml
  21. 21
      pages/order/pay.wxss
  22. 100
      pages/order/payment.js
  23. 4
      pages/order/payment.json
  24. 39
      pages/order/payment.wxml
  25. 109
      pages/order/payment.wxss
  26. 4
      pages/user/user.wxml
  27. 2
      project.private.config.json
  28. 55
      utils/server.js

3
app.json

@ -49,7 +49,8 @@
"pages/chooseArea/chooseArea",
"pages/login/register",
"pages/shop/shop",
"pages/store/store"
"pages/store/store",
"pages/order/payment"
],
"window": {
"backgroundTextStyle": "light",

5
app.wxss

@ -4,14 +4,15 @@ page {
background: #fff;
height:100%;
width:100%;
font-family: "Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;
font-family: 'Microsoft YaHei';
}
.container {
height: 100%;
display: flex;
flex-direction: column;
box-sizing: border-box;
font-family: serif;
font-family: 'Microsoft YaHei';
/* font-family: serif; */
}
.df{
display: -webkit-box;

BIN
images/QR_code.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
images/order_success.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

232
pages/address/address.js

@ -3,201 +3,39 @@ var WXAPI = require('../../utils/server.js');
var t = 0;
var moveY = 200;
var index = [0, 0, 0];
var sheng = [];//省
var shi = [];//城市
var xian = [];//区县
Page({
data: {
sheng: sheng,
shi: shi,
xian: xian,
region: ['请选择','',''],
value: [0, 0, 0],
cartId: 0,
arr: [],
show: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.setNavigationBarColor({
frontColor: app.d.frontColor,
backgroundColor: app.d.bgcolor, //页面标题为路由参数
animation: {
duration: 400,
timingFunc: 'easeIn'
}
})
bindRegionChange: function (e) {
this.setData({
bgcolor: app.d.bgcolor,
cartId: options.cartId
});
this.AddressManagement();
},
aotuAddress: function () {
var that = this;
console.log(that.data.arr)
wx.chooseAddress({
success: function (res) {
var user_name = res.userName;
var mobile = res.telNumber;
var address = res.detailInfo;
that.setData({
sheng: res.provinceName,
shi: res.cityName,
xian: res.countyName,
province: res.provinceName,
city: res.cityName,
county: res.countyName,
user_name: user_name,
mobile: mobile,
address: address,
});
}
region: e.detail.value
})
},
/**
* 添加地址
* 生命周期函数--监听页面加载
*/
AddressManagement: function () {
var that = this;
WXAPI.addressManagement({
openid: app.globalData.userInfo.openid,
}).then(res => {
if (res.code == 200) {
var data = res;
var sheng = data.sheng;
var shi = data.shi;
var xian = data.xian;
that.setData({
sheng: sheng,
shi: shi,
xian: xian
});
}
else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
},
// 点击选择城市
translate: function (e) {
moveY = 200;
this.data.show = true;
t = 0;
var province = this.data.province ? this.data.province : this.data.sheng[0].G_CName,
city = this.data.city ? this.data.city : this.data.shi[0].G_CName,
county = this.data.county ? this.data.county : this.data.xian[0].G_CName;
console.log(province, city, county);
this.setData({
province: province,
city: city,
county: county
});
animationEvents(this, moveY, this.data.show);
},
//隐藏弹窗浮层
hiddenFloatView(e) {
moveY = 200;
this.setData({
show: false
});
t = 1;
},
//滑动事件
bindChange: function (e) {
var val = e.detail.value
//判断滑动的是第几个column
//若省份column做了滑动则定位到地级市和区县第一位
if (index[0] != val[0]) {
val[1] = 0;
val[2] = 0;
index[1] = 0;
index[2] = 0;
this.getCityArr(val[0]);//获取地级市数据
this.getCountyInfo(val[0], val[1]);//获取区县数据
} else { //若省份column未做滑动,地级市做了滑动则定位区县第一位
if (index[1] != val[1]) {
val[2] = 0;
index[2] = 0;
this.getCountyInfo(val[0], val[1]);//获取区县数据
}
}
index = val;
this.Preservation(index);
},
// 根据省获取市
getCityArr: function (count) {
var that = this;
WXAPI.getCityArr({
count: count,
}).then(res => {
if (res.code == 200) {
var data = res;
that.setData({
shi: data.shi
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
},
// 根据省市获取县
getCountyInfo: function (count, column) {
var that = this;
WXAPI.getCountyInfo({
count: count,
column: column,
}).then(res => {
if (res.code == 200) {
var data = res;
that.setData({
xian: data.xian
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
},
// 滑动事件结束
Preservation: function (rew) {
var that = this;
WXAPI.preservation({
sheng: rew[0],
shi: rew[1],
xuan: rew[2]
}).then(res => {
if (res.code == 200) {
var data = res;
var province = data.province;
var city = data.city;
var county = data.county;
that.setData({
province: province,
city: city,
county: county,
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
onLoad: function (options) {
// wx.setNavigationBarColor({
// frontColor: app.d.frontColor,
// backgroundColor: app.d.bgcolor, //页面标题为路由参数
// animation: {
// duration: 400,
// timingFunc: 'easeIn'
// }
// })
// this.setData({
// bgcolor: app.d.bgcolor,
// cartId: options.cartId
// });
},
// 点击保存
SaveAddress: function (e) {
var region = this.data.region
console.log(e.detail.value)
if (e.detail.value.user_name.length == 0) {
wx.showToast({
title: '联系人不得为空!',
@ -212,7 +50,7 @@ Page({
duration: 1500
})
wx.hideToast()
} else if (e.detail.value.province.length == 0) {
} else if (region[0] == '请选择') {
wx.showToast({
title: '城市不得为空!',
icon: 'loading',
@ -225,32 +63,28 @@ Page({
//预处理验证手机号码
if (mobile.match(/^\d{11}$/)) {
WXAPI.saveAddress({
openid: app.globalData.userInfo.openid,
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
user_name: e.detail.value.user_name,
mobile: e.detail.value.mobile,
province: e.detail.value.province,
city: e.detail.value.city,
county: e.detail.value.county,
address: e.detail.value.address
place: region[0]+'-'+region[1]+'-'+region[2],
is_default: 0,
address: e.detail.value.address,
}).then(res => {
if (res.code == 200) {
var data = res;
wx.showToast({
title: data.info,
icon: 'loading',
duration: 1500
})
} else {
var data = res.data;
app.d.islogin = true;
wx.showToast({
title: data.info,
icon: 'success',
duration: 1000
});
//成功后返回上一页面
wx.navigateBack({
delta: 1
});
} else {
wx.showToast({
title: res.message,
icon: 'loading',
duration: 1500
});
}
});
} else {

45
pages/address/address.wxml

@ -10,49 +10,14 @@
<input name="mobile" type="number" maxlength="11" value="{{mobile}}" placeholder="联系人电话"/>
</view>
<view class="section">
<view class="section_title">所在地区:</view>
<input type="text" wx:if="{{province && city && county}}" value="{{province}}--{{city}}--{{county}}" disabled bindtap="translate"/>
<input type="text" wx:else placeholder="请选择" disabled bindtap="translate"/>
<input class='xzdq' disabled="false" name="province" value="{{province}}" />
<input class='xzdq' disabled="false" name="city" value="{{city}}" />
<input class='xzdq' disabled="false" name="county" value="{{county}}" />
<picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
<view class="picker">{{region[0]}} {{region[1]}} {{region[2]}}</view>
</picker>
<view class="section_right" bindtap="translate">
<image src="/images/x_right.png"></image>
</view>
<view class="animation-element-wrapper {{ show?'openBG':'closeBG' }}" style="visibility:{{show ? 'visible':'hidden'}}" bindtap="hiddenFloatView" data-id="444">
<view class="animation-element {{ show?'open':'closes' }}" catchtap="nono">
<text class="left-bt" catchtap="hiddenFloatView" data-id="555">取消</text>
<text class="right-bt" style='color:#50b674;' catchtap="hiddenFloatView" data-id="666">确定</text>
<view class="line"></view>
<picker-view class="{{ show?'openpuls':'closepuls' }}" indicator-style = "height: 50rpx;" value="{{value}}" bindchange="bindChange" catchtap="nono">
<!--省-->
<picker-view-column>
<view wx:for="{{sheng}}" wx:for-item="sheng" wx:key="">
{{sheng.G_CName}}
</view>
</picker-view-column>
<!--地级市-->
<picker-view-column>
<view wx:for="{{shi}}" wx:key="">
{{item.G_CName}}
</view>
</picker-view-column>
<!--区县-->
<picker-view-column>
<view wx:for="{{xian}}" wx:key="">
{{item.G_CName}}
</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
<view class="section">
@ -62,8 +27,8 @@
<view class="btn-area">
<button formType="submit" style='background-color:#FF6347;'>保存</button>
</view>
<view class="btn-area">
<!-- <view class="btn-area">
<button bindtap="aotuAddress" style='background-color:#FF6347;'>导入微信收货地址</button>
</view>
</view> -->
</form>
</view>

77
pages/address/index.js

@ -71,39 +71,42 @@ Page({
onLoad: function (options) {
wx.setNavigationBarColor({
frontColor: app.d.frontColor,
backgroundColor: app.d.bgcolor, //页面标题为路由参数
animation: {
duration: 400,
timingFunc: 'easeIn'
}
})
this.setData({
bgcolor: app.d.bgcolor
});
// wx.setNavigationBarColor({
// frontColor: app.d.frontColor,
// backgroundColor: app.d.bgcolor, //页面标题为路由参数
// animation: {
// duration: 400,
// timingFunc: 'easeIn'
// }
// })
// this.setData({
// bgcolor: app.d.bgcolor
// });
var that = this;
// 页面初始化 options为页面跳转所带来的参数
if (options.cartId) {
var cartId = options.cartId;
} else {
var cartId = 0;
}
WXAPI.addressIndex({
openid: app.globalData.userInfo.openid
}).then(res => {
if (res.code == 200) {
var data = res;
var address = data.adds;
if (address == '') {
var address = []
}
that.setData({
address: address,
cartId: cartId,
})
}
});
// if (options.cartId) {
// var cartId = options.cartId;
// } else {
// var cartId = 0;
// }
that.DataonLoad()
// WXAPI.addressIndex({
// accessId: app.globalData.accessId,
// storeId: 239,
// storeType: 1,
// }).then(res => {
// if (res.code == 200) {
// var data = res;
// var address = data.adds;
// if (address == '') {
// var address = []
// }
// that.setData({
// address: address,
// cartId: cartId,
// })
// }
// });
},
bindCheckbox: function (e) {
@ -255,8 +258,10 @@ Page({
content: '你确认移除吗',
success: function (res) {
res.confirm && WXAPI.addressDelAdds({
openid: app.globalData.userInfo.openid,
id_arr: addrId
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
addr_id: addrId
}).then(res => {
if (res.code == 200) {
that.DataonLoad();
@ -276,10 +281,12 @@ Page({
var that = this;
// 页面初始化 options为页面跳转所带来的参数
WXAPI.addressIndex({
openid: app.globalData.userInfo.openid,
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
}).then(res => {
if (res.code == 200) {
var data = res;
var data = res.data;
var address = data.adds;
that.numbers = data.adds;
if (address == '') {

12
pages/address/index.wxml

@ -12,7 +12,9 @@
<text class="address-phone">{{item.tel}}</text>
</view>
<view class="address-info">{{item.address_xq}}</view>
<navigator class='address_img_div' url="../address/upaddress?addr_id={{item.id}}"><image src='../../images/x_right.png' class='address_img'></image></navigator>
<navigator class='address_img_div' url="../address/upaddress?addr_id={{item.id}}&name={{item.name}}&tel={{item.tel}}&sheng={{item.sheng}}&city={{item.city}}&quyu={{item.quyu}}&address={{item.address}}">
<image src='/images/x_right.png' class='address_img'></image>
</navigator>
</view>
<view class="address-edit">
@ -38,9 +40,7 @@
</view>
<navigator style='display:inline-block;' url="../address/upaddress?addr_id={{item.id}}">
<navigator style='display:inline-block;' url="../address/upaddress?addr_id={{item.id}}&name={{item.name}}&tel={{item.tel}}&sheng={{item.sheng}}&city={{item.city}}&quyu={{item.quyu}}&address={{item.address}}">
<text style='margin:10px'>编辑</text>
</navigator>
<text data-id="{{item.id}}" bindtap="delAddress">删除</text>
@ -49,13 +49,11 @@
</view>
</view>
</radio-group>
<navigator wx:if="{{!flag}}" url="../address/address?cartId={{cartId}}" style='width: 94%;margin: 0 auto;margin-bottom: 50px;'>
<navigator wx:if="{{!flag}}" url="../address/address" style='width: 94%;margin: 0 auto;margin-bottom: 50px;'>
<view hidden="{{hiddenAddress}}" class="add-address" style="background-color:#FF6347;">
<view class="iconfont icon-tianjia"></view>
<view style='color:#fff'>新增地址</view>
</view>
</navigator>
<view class="add_dell" wx:if="{{flag}}">
<view class='add_left'>

229
pages/address/upaddress.js

@ -4,10 +4,6 @@ var t = 0;
var show = false;
var moveY = 200;
var index = [0, 0, 0];
var sheng = [];//省
var shi = [];//城市
var xian = [];//区县
Page({
@ -15,10 +11,9 @@ Page({
* 页面的初始数据
*/
data: {
sheng: sheng,
shi: shi,
xian: xian,
region: ['请选择','',''],
value: [0, 0, 0],
address: ''
},
// 下拉刷新
onPullDownRefresh: function () {
@ -32,178 +27,30 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.setNavigationBarColor({
frontColor: app.d.frontColor,
backgroundColor: app.d.bgcolor, //页面标题为路由参数
animation: {
duration: 400,
timingFunc: 'easeIn'
}
})
console.log(options)
// wx.setNavigationBarColor({
// frontColor: app.d.frontColor,
// backgroundColor: app.d.bgcolor, //页面标题为路由参数
// animation: {
// duration: 400,
// timingFunc: 'easeIn'
// }
// })
var region = []
region.push(options.sheng)
region.push(options.city)
region.push(options.quyu)
this.setData({
bgcolor: app.d.bgcolor,
id_arr: options.addr_id
address: options,
region: region
});
this.AddressManagement();
},
/**
* 修改地址
*/
AddressManagement: function () {
var that = this;
WXAPI.addressUpAddsIndex({
openid: app.globalData.userInfo.openid,
id_arr: that.data.id_arr,
}).then(res => {
if (res.code == 200) {
var data = res;
var address = data.adds;
var province = data.province;
var city = data.city;
var county = data.county;
if (address == '') {
var address = []
}
that.setData({
address: address,
province: province,
city: city,
county: county
})
}
});
},
AddressManagement1: function () {
var that = this;
WXAPI.addressManagement({
openid: app.globalData.userInfo.openid,
}).then(res => {
if (res.code == 200) {
var data = res;
var sheng = data.sheng;
var shi = data.shi;
var xian = data.xian;
that.setData({
sheng: sheng,
shi: shi,
xian: xian
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
},
// 点击选择城市
translate: function (e) {
if (t == 0) {
moveY = 0;
show = false;
t = 1;
} else {
moveY = 200;
show = true;
t = 0;
}
animationEvents(this, moveY, show);
this.AddressManagement1();
},
//隐藏弹窗浮层
hiddenFloatView(e) {
moveY = 200;
this.setData({
show: false
});
t = 1;
},
//滑动事件
bindChange: function (e) {
var val = e.detail.value
//判断滑动的是第几个column
//若省份column做了滑动则定位到地级市和区县第一位
if (index[0] != val[0]) {
this.getCityArr(val[0]);//获取地级市数据
this.getCountyInfo(val[0], val[1]);//获取区县数据
} else { //若省份column未做滑动,地级市做了滑动则定位区县第一位
if (index[1] != val[1]) {
this.getCountyInfo(val[0], val[1]);//获取区县数据
}
}
index = val;
this.Preservation(index);
},
// 根据省获取市
getCityArr: function (count) {
var that = this;
WXAPI.getCityArr({
count: count,
}).then(res => {
if (res.code == 200) {
var data = res;
that.setData({
shi: data.shi
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
},
// 根据省市获取县
getCountyInfo: function (count, column) {
var that = this;
WXAPI.getCountyInfo({
count: count,
column: column,
}).then(res => {
if (res.code == 200) {
var data = res;
that.setData({
xian: data.xian
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
},
// 滑动事件结束
Preservation: function (rew) {
var that = this;
WXAPI.preservation({
sheng: rew[0],
shi: rew[1],
xuan: rew[2]
}).then(res => {
if (res.code == 200) {
var data = res;
var province = data.province;
var city = data.city;
var county = data.county;
that.setData({
province: province,
city: city,
county: county,
});
} else {
wx.showToast({
title: '非法操作!',
duration: 2000
});
}
});
},
// 点击保存
SaveAddress: function (e) {
var region = this.data.region
var that = this;
if (e.detail.value.user_name.length == 0) {
wx.showToast({
@ -219,7 +66,7 @@ Page({
duration: 1500
})
wx.hideToast()
} else if (e.detail.value.province.length == 0) {
} else if (region[0] == '请选择') {
wx.showToast({
title: '城市不得为空!',
icon: 'loading',
@ -227,44 +74,28 @@ Page({
})
wx.hideToast()
} else {
WXAPI.saveAddress({
openid: app.globalData.userInfo.openid,
var that = this;
WXAPI.addressUpAdds({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
user_name: e.detail.value.user_name,
id_arr: that.data.id_arr,
mobile: e.detail.value.mobile,
province: e.detail.value.province,
city: e.detail.value.city,
county: e.detail.value.county,
address: e.detail.value.address
place: region[0]+'-'+region[1]+'-'+region[2],
is_default: 0,
address: e.detail.value.address,
addr_id: that.data.address.addr_id,
}).then(res => {
if (res.code == 200) {
var data = res;
wx.showModal({
title: '提示',
content: data.info,
success: function (res) {
wx.navigateBack({
delta: 1
})
}
});
wx.navigateBack()
} else {
wx.showToast({
title: res.err,
title: res.message,
icon: 'loading',
duration: 1500
})
}
});
// WXAPI.addressUpAdds({
// from_id: formId,
// userid: app.globalData.userInfo.openid
// }).then(res => {
// if (res.code == 200) {
// var data = res;
// }
// });
}
}
})

43
pages/address/upaddress.wxml

@ -2,55 +2,26 @@
<form bindsubmit="SaveAddress">
<view class="section">
<view class="section_title" style='float:left;'>联系人:</view>
<input name="user_name" type="text" value="{{address[0]['name']}}" placeholder="联系人"/>
<input name="user_name" type="text" value="{{address.name}}" placeholder="联系人"/>
</view>
<view class="section">
<view class="section_title" style='float:left;'>联系电话:</view>
<input name="mobile" type="number" maxlength="11" value="{{address[0]['tel']}}" placeholder="联系人电话"/>
<input name="mobile" type="number" maxlength="11" value="{{address.tel}}" placeholder="联系人电话"/>
</view>
<view class="section">
<view class="section_title" style='float:left;'>所在地区:</view>
<input type="text" value="{{province}}--{{city}}--{{county}}" disabled bindtap="translate"/>
<input class='xzdq' disabled="false" name="province" value="{{province}}" />
<input class='xzdq' disabled="false" name="city" value="{{city}}" />
<input class='xzdq' disabled="false" name="county" value="{{county}}" />
<picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
<view class="picker">{{region[0]}} {{region[1]}} {{region[2]}}</view>
</picker>
<view class="section_right" bindtap="translate">
<image src="../../../images/x_right.png"></image>
</view>
<view class="animation-element-wrapper {{ show?'openBG':'closeBG' }}" style="visibility:{{show ? 'visible':'hidden'}}" bindtap="hiddenFloatView" data-id="444">
<view class="animation-element {{ show?'open':'closes' }}" catchtap="nono">
<text class="left-bt" catchtap="hiddenFloatView" data-id="555">取消</text>
<text class="right-bt" catchtap="hiddenFloatView" data-id="666">确定</text>
<view class="line"></view>
<picker-view class="{{ show?'openpuls':'closepuls' }}" indicator-style = "height: 50rpx;" value="{{value}}" bindchange="bindChange" catchtap="nono">
<!--省-->
<picker-view-column>
<view wx:for="{{sheng}}" wx:for-item="sheng" wx:key="">
{{sheng.G_CName}}
</view>
</picker-view-column>
<!--地级市-->
<picker-view-column>
<view wx:for="{{shi}}" wx:key="">
{{item.G_CName}}
</view>
</picker-view-column>
<!--区县-->
<picker-view-column>
<view wx:for="{{xian}}" wx:key="">
{{item.G_CName}}
</view>
</picker-view-column>
</picker-view>
</view>
<image src="/images/x_right.png"></image>
</view>
</view>
<view class="section">
<view class="section_title">详细地址:</view>
<input name="address" type="text" value="{{address[0]['address']}}" placeholder="详细地址"/>
<input name="address" type="text" value="{{address.address}}" placeholder="详细地址"/>
</view>
<view class="btn-area">
<button formType="submit" style='background-color:#FE6347;'>保存</button>

6
pages/chooseArea/chooseArea.js

@ -15,12 +15,16 @@ Page({
filterKey: '',
level: 0,
region: '',
GroupID: '',
GroupID: 111,
titleKey: 'A',
scrollKey: 'A',
},
getLocation(groupID) {
var that = this;
var groupID = groupID
if (!groupID) {
groupID = that.data.GroupID
}
WXAPI.getLocation({
accessId: app.globalData.accessId,
GroupID: groupID

2
pages/index/index.wxml

@ -262,7 +262,7 @@
<!-- <view>
<image class='scimg' style="margin-top: 15%;margin-bottom: 5%;" src='/images/search_no.png'></image>
</view> -->
<view style='font-size:27rpx;color:#999;padding-top:20rpx;padding-bottom:50rpx;font-family: serif;'>~ 我是有底线的 ~</view>
<view style='font-size:27rpx;color:#999;padding-top:20rpx;padding-bottom:50rpx;'>~ 我是有底线的 ~</view>
</view>
</scroll-view>

16
pages/index/index.wxss

@ -859,14 +859,14 @@ margin-left: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-family: serif;
/* font-family: serif; */
}
.mch_content_item text{
color: #999999;
font-size: 26rpx;
line-height: 26rpx;
margin: 0 14rpx;
font-family: serif;
/* font-family: serif; */
}
.mch {
background-color: #ffffff;
@ -883,7 +883,7 @@ margin-left: 24rpx;
position: relative;
}
.home_title .mch_name {
font-family: serif;
/* font-family: serif; */
font-size: 35rpx;
position: absolute;
color: #FA5555;
@ -898,7 +898,7 @@ margin-left: 24rpx;
.home_title .more {
color: #999999;
font-size: 28rpx;
font-family: serif;
/* font-family: serif; */
}
.more image {
width: 22rpx;
@ -934,12 +934,12 @@ margin-left: 24rpx;
.goods_title_item.active view{
color: #333333;
font-weight: bold;
font-family: serif;
/* font-family: serif; */
}
.goods_title_item.active text{
color:#FA5151;
font-family: serif;
/* font-family: serif; */
}
.goods_title_item.active:after{
@ -960,14 +960,14 @@ margin-left: 24rpx;
color: #020202;
line-height: 34rpx;
white-space: nowrap;
font-family: serif;
/* font-family: serif; */
}
.goods_title_item text{
color: #666666;
font-size: 22rpx;
line-height: 22rpx;
white-space: nowrap;
font-family: serif;
/* font-family: serif; */
}
.zhiding{
position: fixed;

2
pages/login/register.wxml

@ -1,5 +1,5 @@
<!--pages/login/register.wxml-->
<view class="container">
<image class="codeImage" src="/images/red_packet_share.png" mode="aspectFill"></image>
<image class="codeImage" src="/images/QR_code.png" mode="aspectFill"></image>
<view class="title">请添加上方二维码联系客服注册账号</view>
</view>

24
pages/order/detail.js

@ -297,18 +297,18 @@ Page({
onLoad: function (options) {
console.log(options)
this.get_plug();
wx.setNavigationBarColor({
frontColor: app.d.frontColor,
backgroundColor: app.d.bgcolor, //页面标题为路由参数
animation: {
duration: 400,
timingFunc: 'easeIn'
}
})
this.setData({
orderId: options.orderId,
bgcolor: '#FF6347',
})
// wx.setNavigationBarColor({
// frontColor: app.d.frontColor,
// backgroundColor: app.d.bgcolor, //页面标题为路由参数
// animation: {
// duration: 400,
// timingFunc: 'easeIn'
// }
// })
// this.setData({
// orderId: options.orderId,
// bgcolor: '#FF6347',
// })
this.loadProductDetail();
},
onReady: function () {

133
pages/order/order.js

@ -7,7 +7,7 @@ Page({
winHeight: 0,
// tab切换
currentTab: 0,
isStatus: 'payment', //10待付款,20待发货,30待收货 40、50已完成
isStatus: 'payment', //1待付款,2待发货,3待收货 4、5已完成
page: 0,
refundpage: 0,
ordert0: [],
@ -114,14 +114,14 @@ Page({
});
}
}
wx.setNavigationBarColor({
frontColor: app.d.frontColor,
backgroundColor: app.d.bgcolor, //页面标题为路由参数
animation: {
duration: 400,
timingFunc: 'easeIn'
}
})
// wx.setNavigationBarColor({
// frontColor: app.d.frontColor,
// backgroundColor: app.d.bgcolor, //页面标题为路由参数
// animation: {
// duration: 400,
// timingFunc: 'easeIn'
// }
// })
this.initSystemInfo();
this.setData({
@ -138,67 +138,122 @@ Page({
loadOrderList: function () {
var that = this;
var isStatus1 = that.options.order_type1
wx.request({
url: app.d.ceshiUrl + '&action=order&m=index',
method: 'post',
data: {
openid: app.globalData.userInfo.openid,
order_type: that.data.isStatus,
otype: that.data.otype,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: function (res) {
var status = res.data.status;
var order = res.data.order;
WXAPI.orderList({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
queryOrderType: that.data.isStatus,
}).then(res => {
if (res.code == 200) {
var data = res.data;
//成功返回设置数据
if (data == '') {
that.setData({
loading: false,
});
return;
} else {
switch (that.data.currentTab) {
case 0:
that.setData({
ordert0: order,
ordert0: data.order,
});
break;
case 5:
that.setData({
ordert0: order,
ordert0: data.order,
});
break;
case 6:
that.setData({
ordert0: order,
ordert0: data.order,
});
break;
case 1:
that.setData({
ordert1: order,
ordert1: data.order,
});
break;
case 2:
that.setData({
ordert2: order,
ordert2: data.order,
});
break;
case 3:
that.setData({
ordert3: order,
ordert3: data.order,
});
break;
case 4:
that.setData({
ordert4: order,
ordert4: data.order,
});
break;
}
//console.log(that.data.ordert0)
},
fail: function () {
// fail
wx.showToast({
title: '网络异常!',
duration: 2000
});
}
}
});
// wx.request({
// url: app.d.ceshiUrl + '&action=order&m=index',
// method: 'post',
// data: {
// openid: app.globalData.userInfo.openid,
// order_type: that.data.isStatus,
// otype: that.data.otype,
// },
// header: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// },
// success: function (res) {
// var status = res.data.status;
// var order = res.data.order;
// switch (that.data.currentTab) {
// case 0:
// that.setData({
// ordert0: order,
// });
// break;
// case 5:
// that.setData({
// ordert0: order,
// });
// break;
// case 6:
// that.setData({
// ordert0: order,
// });
// break;
// case 1:
// that.setData({
// ordert1: order,
// });
// break;
// case 2:
// that.setData({
// ordert2: order,
// });
// break;
// case 3:
// that.setData({
// ordert3: order,
// });
// break;
// case 4:
// that.setData({
// ordert4: order,
// });
// break;
// }
// //console.log(that.data.ordert0)
// },
// fail: function () {
// // fail
// wx.showToast({
// title: '网络异常!',
// duration: 2000
// });
// }
// });
},
// 确认收货
recOrder: function (e) {
@ -331,7 +386,7 @@ Page({
} else if (currentTab == 4) {
that.setData({
currentTab: parseInt(currentTab),
isStatus: 'evaluate',
isStatus: 'evaluete',
});
that.loadOrderList();
}

7
pages/order/order.wxml

@ -31,10 +31,11 @@
hover-class="click-once">{{item.value}}</view>
</view>
<!-- 下拉菜单 -->
<view class="swiper-tab-list phone_personal {{currentTab==0 ? 'on' : ''}} " hover-class="click-once-opaque" bindtap="clickPerson">
<!-- <view class="swiper-tab-list phone_personal {{currentTab==0 ? 'on' : ''}} " hover-class="click-once-opaque" bindtap="clickPerson">
{{activeSortingName}}
<text class='icon iconfont {{sortingChioceIcon}}'></text>
</view>
</view> -->
<view class="swiper-tab-list phone_personal {{currentTab==0 ? 'on' : ''}} " data-otype="" bindtap="swichNav">全部订单</view>
<!-- </view> -->
<view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" data-otype="payment" bindtap="swichNav">待付款</view>
<view class="swiper-tab-list {{currentTab==2 ? 'on' : ''}}" data-current="2" data-otype="send" bindtap="swichNav">待发货</view>
@ -99,7 +100,7 @@
</view>
</navigator>
<view class="total">
<view class="zhifu mt10" style=''>
<view class="zhifu mt10">
合计:
<span class="font_20 red" style="margin-left:5px;" wx:if="{{item.info != 0}}">¥ {{item.z_price}}</span>
<span class="font_20 red" style="margin-left:5px;" wx:if="{{item.info == 0}}">¥ {{item.total}}</span>

323
pages/order/pay.js

@ -35,6 +35,7 @@ Page({
pay_xs: true,
pages_sx: true,
dz_stu: false,
productAry: '',
},
go: function (e) {
console.log(e);
@ -96,8 +97,6 @@ Page({
wallet: wallet, // 钱包状态
});
this.Settlement(options);
},
//页面加载完成函数
onReady: function () {
@ -185,7 +184,15 @@ Page({
if (that.data.d_yuan) {
data.coupon_money = Number(data.coupon_money) - Number(that.data.user_money);
}
var pays = []
if (data.payment.bank_pay == 1) {
pays.push({'name':'银行转账','icon':'/images/order_success.png'})
}
// if (data.payment.wallet_pay == 1) {
// pays.push({'name':'余额支付','icon':'/images/wx.png'})
// }
that.setData({
productAry: options.product,
addemt: data.addemt, // 是否有收货地址
address: data.address, // 收货地址
addrId: data.address.id ? data.address.id : '', // 收货地址id
@ -199,7 +206,8 @@ Page({
scorebuy: data.grade_rate_amount, //积分消费规则
zhekou: data.preferential_amount ? data.preferential_amount : '', //会员折扣
freight: data.freight ? data.freight : 0, //运费
remind: false
remind: false,
pays: pays,
});
} else {
that.setData({
@ -421,92 +429,91 @@ Page({
// 提交订单支付
createProductOrderByWX: function (e) {
var that = this;
if (this.data.ispayOrder) {
return
}
this.setData({
ispayOrder: true
})
// if (that.data.ispayOrder) {
// return
// }
// that.setData({
// ispayOrder: true
// })
var paytype = that.data.paytype;
if (paytype) {
that.setData({
paytype: paytype,
});
} else {
wx.showToast({
title: '已为您选择默认支付方式',
icon: 'none',
duration: 2000,
});
//当都没有选中时 循环找到默认的支付方式 在设置支付方式数据
var pays = that.data.pays,
j = 0;
for (j = 0; j < pays.length; j++) {
if (pays[j].value == 'wxPay') {
pays[j].checked = true;
} else {
pays[j].checked = false;
}
}
// var paytype = that.data.paytype;
// if (paytype) {
// that.setData({
// paytype: paytype,
// });
// } else {
// wx.showToast({
// title: '已为您选择默认支付方式',
// icon: 'none',
// duration: 2000,
// });
// //当都没有选中时 循环找到默认的支付方式 在设置支付方式数据
// var pays = that.data.pays,
// j = 0;
// for (j = 0; j < pays.length; j++) {
// if (pays[j].value == 'wxPay') {
// pays[j].checked = true;
// } else {
// pays[j].checked = false;
// }
// }
that.setData({
pays: pays,
paytype: 'wxPay',
});
// that.setData({
// pays: pays,
// paytype: 'wxPay',
// });
paytype = 'wxPay';
return;
}
that.setData({
form_id: e.detail.formId,
});
var address = e.detail.value.address;
// paytype = 'wxPay';
// return;
// }
// that.setData({
// form_id: e.detail.formId,
// });
var address = that.data.address;
if (address) {
// 收货地址存在
if (paytype == 'wallet_Pay') {
if (that.data.pay_xs) {
wx.showModal({
title: '余额支付',
content: '是否使用余额支付?',
success: function (res) {
if (res.confirm) {
//组合支付 替换数据
that.createProductOrder();
console.log('用户点击确定');
} else if (res.cancel) {
that.setData({
ispayOrder: false
})
wx.hideLoading()
console.log('用户点击取消')
}
}
})
} else {
wx.showModal({
title: '订单提交',
content: '是否使用消费金支付?',
success: function (res) {
if (res.confirm) {
//组合支付 替换数据
that.createProductOrder();
console.log('用户点击确定');
} else if (res.cancel) {
this.setData({
ispayOrder: false
})
wx.hideLoading()
console.log('用户点击取消')
}
}
})
}
} else {
// // 收货地址存在
// if (paytype == 'wallet_Pay') {
// if (that.data.pay_xs) {
// wx.showModal({
// title: '余额支付',
// content: '是否使用余额支付?',
// success: function (res) {
// if (res.confirm) {
// //组合支付 替换数据
// that.createProductOrder();
// console.log('用户点击确定');
// } else if (res.cancel) {
// that.setData({
// ispayOrder: false
// })
// wx.hideLoading()
// console.log('用户点击取消')
// }
// }
// })
// } else {
// wx.showModal({
// title: '订单提交',
// content: '是否使用消费金支付?',
// success: function (res) {
// if (res.confirm) {
// //组合支付 替换数据
// that.createProductOrder();
// console.log('用户点击确定');
// } else if (res.cancel) {
// this.setData({
// ispayOrder: false
// })
// wx.hideLoading()
// console.log('用户点击取消')
// }
// }
// })
// }
// } else {
// that.createProductOrder();
// }
that.createProductOrder();
}
} else {
// 没有收货地址
wx.showToast({
@ -519,67 +526,119 @@ Page({
// 确认订单
createProductOrder: function () {
var that = this;
this.setData({
btnDisabledbtnDisabled: false,
pages_sx: false
})
var paytype = that.data.paytype;
var type1 = that.data.type1;
app.d.purchase = 1; //设置购物车刷新
wx.request({
url: app.d.ceshiUrl + '&action=product&m=payment',
method: 'post',
data: {
uid: that.data.userId, // 微信id
cart_id: that.data.cartId, // 购物车id
type: paytype, // 支付方式
total: that.data.coupon_money, // 付款金额
coupon_id: that.data.coupon_id, // 优惠券ID
allow: that.data.allow, // 用户使用消费金
name: that.data.name, // 满减金额名称
reduce_money: that.data.reduce_money, // 满减金额
dkyuan: that.data.d_yuan,
freight: that.data.freight,
num: that.data.num1 ? that.data.num1 : 0, //直接购买数量
typee: that.data.type ? that.data.type : 0, //购买类型1直接购买,0从购物车买
},
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: function (res) {
var data = res.data;
console.log(res)
if (data.status == 1) {
// 余额支付
if (data.arr.pay_type == 'wallet_Pay') {
that.wallet_pay(data.arr);
}
if (data.arr.pay_type == 'wxPay') {
// 微信支付
wx.showLoading({
title: '加载中',
})
that.wxpay(data.arr);
WXAPI.orderPayment({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
cart_id: '',
address_id: that.data.addrId,
coupon_id: 0,
remarks: '',
vipSource: 0,
product: that.data.productAry,
pay_type: '',
}).then(res => {
if (res.code == 200) {
var data = res.data
var jsonstr = JSON.stringify(data)
var result = {
orderStr: jsonstr,
price: data.total
}
wx.navigateTo({
url: "/pages/order/payment?orderId="+data.sNo+"&price="+data.total,
})
// that.leaveSettlement(result)
} else {
wx.showToast({
title: res.data.err,
title: res.message,
icon: 'none',
duration: 2500
duration: 2000
});
}
});
// this.setData({
// btnDisabledbtnDisabled: false,
// pages_sx: false
// })
// var paytype = that.data.paytype;
// var type1 = that.data.type1;
// app.d.purchase = 1; //设置购物车刷新
// wx.request({
// url: app.d.ceshiUrl + '&action=product&m=payment',
// method: 'post',
// data: {
// uid: that.data.userId, // 微信id
// cart_id: that.data.cartId, // 购物车id
// type: paytype, // 支付方式
// total: that.data.coupon_money, // 付款金额
// coupon_id: that.data.coupon_id, // 优惠券ID
// allow: that.data.allow, // 用户使用消费金
// name: that.data.name, // 满减金额名称
// reduce_money: that.data.reduce_money, // 满减金额
// dkyuan: that.data.d_yuan,
// freight: that.data.freight,
// num: that.data.num1 ? that.data.num1 : 0, //直接购买数量
// typee: that.data.type ? that.data.type : 0, //购买类型1直接购买,0从购物车买
// },
// header: {
// 'Content-Type': 'application/x-www-form-urlencoded'
// },
// success: function (res) {
// var data = res.data;
// console.log(res)
// if (data.status == 1) {
// // 余额支付
// if (data.arr.pay_type == 'wallet_Pay') {
// that.wallet_pay(data.arr);
// }
// if (data.arr.pay_type == 'wxPay') {
// // 微信支付
// wx.showLoading({
// title: '加载中',
// })
// that.wxpay(data.arr);
// }
// } else {
// wx.showToast({
// title: res.data.err,
// icon: 'none',
// duration: 2500
// });
// }
// },
// fail: function (e) {
// wx.showToast({
// title: '网络异常!err:createProductOrder',
// duration: 2000
// });
// }
// });
// }
},
fail: function (e) {
//结算支付
leaveSettlement(result) {
var that = this;
WXAPI.leaveSettlement({
accessId: app.globalData.accessId,
storeId: 239,
storeType: 1,
order_list: result.orderStr,
price: result.price
}).then(res => {
if (res.code == 200) {
var data = res.data
console.log(data)
} else {
wx.showToast({
title: '网络异常!err:createProductOrder',
title: res.message,
icon: 'none',
duration: 2000
});
}
});
// }
},
// 发起钱包支付
wallet_pay: function (order) {
wx.hideLoading()

1
pages/order/pay.json

@ -1,3 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "订单确认"
}

11
pages/order/pay.wxml

@ -46,6 +46,7 @@
<view class="df">添加收货地址</view>
</view>
</view>
<view style='height:10px;width:100%;background:#eee;'></view>
<!-- 产品信息 -->
<view class="shop-list" wx:key="key" wx:for="{{productData}}" >
<view class="shop-view">
@ -53,6 +54,7 @@
<text class="left">{{item.shop_name}}</text>
<image class="jiantou-img" src="/images/x_right.png" mode="aspectFill"></image>
</view>
<view style="margin-left:30rpx;width:720px;height:2rpx;background-color:#eee;"></view>
<view class="p_all bg_white df item" style='height:70px;' wx:key="key" wx:for="{{item.list}}">
<view class="cp_photo">
<image src="{{item.img}}" mode="aspectFill"></image>
@ -73,7 +75,6 @@
</view>
</view>
<view style='height:10px;width:100%;background:#eee;'></view>
<!-- 信息 -->
<view style='background:#fff;'>
<view class="pay_qb pd" style='border-bottom:1px solid #eee;'>
@ -106,10 +107,10 @@
<view class="pay_zf pd" style='border-bottom:none;padding-right:3px;'>
<checkbox-group class="radio-group left">
<label class="radio" wx:for-items="{{pays}}" wx:key="key" style='border-bottom:1px solid #eee;'>
<view style='width:100%;padding:13px 0;'>
<image class='img' src='{{item.icon}}' style='width:20px;height:20px;vertical-align:-5px;'></image>
{{item.name}}
<switch bindchange="switchChange" checked="{{item.checked}}" data-index="{{index}}" data-check="{{item.value}}" class="right" style='vertical-align:2px;float:right;margin-bottom:20px;' />
<view class="payment">
<image src='{{item.icon}}'></image>
<text>{{item.name}}</text>
<!-- <switch bindchange="switchChange" checked="{{item.checked}}" data-index="{{index}}" data-check="{{item.value}}" class="right" style='vertical-align:2px;float:right;margin-bottom:20px;' /> -->
</view>
</label>
</checkbox-group>

21
pages/order/pay.wxss

@ -130,7 +130,7 @@ width: 100%;
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-top: 5px;
/* margin-top: 5px; */
font-size: 16px;
width: 100%;
}
@ -603,10 +603,19 @@ color:#fff;
display:block;
width:100%;
}
.payment{
width:100%;
padding:15rpx 5rpx;
display: flex;
align-items: center;
}
.payment image{
width: 42rpx;
height: 42rpx;
}
.payment text{
margin-left: 15rpx;
}
/*优惠券 */
.orderDetails {
@ -736,7 +745,7 @@ left:-13px;
}
.shop-view {
display:flex;
height: 60rpx;
height: 85rpx;
align-items: center;
}
.shop-view image {

100
pages/order/payment.js

@ -0,0 +1,100 @@
// pages/order/payment.js
Page({
/**
* 页面的初始数据
*/
data: {
orderId: '',
price: '',
company: '常州互利智能科技有限公司',
account: '123 4567 1234 456 1234',
bank: '中国银行',
},
copyAct() {
var that = this
wx.setClipboardData({
data: that.data.orderId,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none',
duration: 2000
})
}
})
},
copyAccount() {
var that = this
var content = '收款方 '+that.data.company+'\n'+'收款账号 '+that.data.account+'\n'+'开户银行'+that.data.bank
wx.setClipboardData({
data: content,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none',
duration: 2000
})
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
var that = this
that.setData({
orderId: options.orderId,
price: options.price,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

4
pages/order/payment.json

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "订单支付"
}

39
pages/order/payment.wxml

@ -0,0 +1,39 @@
<!--pages/order/payment.wxml-->
<view class="container">
<view class="codeView">
<text class="name">订单编号:</text>
<text class="order">{{orderId}}</text>
<view class="copyBtn" bindtap="copyAct">| 复制</view>
</view>
<view class="header">
<image src="/images/order_success.png"></image>
<text>订单提交成功\n请转账至以下银行账户</text>
<view class="accountCopy" bindtap="copyAccount">复制账户信息</view>
</view>
<!-- 支付信息 -->
<view class="info">
<text>支付金额</text>
<view class="price">¥{{price}}</view>
</view>
<!-- 账户信息 -->
<view class="account">
<view class="titleView">
<text class="name">收款方</text>
<text class="detail">{{company}}</text>
</view>
<view class="titleView">
<text class="name">收款账号</text>
<text class="detail">{{account}}</text>
</view>
<view class="titleView">
<text class="name">开户银行</text>
<text class="detail">{{bank}}</text>
</view>
</view>
<!-- 二维码 -->
<view class="qrcode">
<view class="title">如有其他问题,请联系客服</view>
<image src="/images/QR_code.png" mode="aspectFill"></image>
</view>
</view>

109
pages/order/payment.wxss

@ -0,0 +1,109 @@
/* pages/order/payment.wxss */
page {
height: 100%;
background-color: #F6F6FB;
}
.codeView{
padding-top: 25rpx;
display: flex;
height: 60rpx;
background-color: white;
}
.codeView .order{
font-size: 28rpx;
color: #333333;
}
.copyBtn{
margin-left: 16rpx;
width: 80rpx;
height: 60rpx;
font-size: 28rpx;
color: #D4282D;
}
.header {
display: flex;
height: 150rpx;
background-color: white;
}
.header image{
margin-top: 10rpx;
margin-left: 35rpx;
width: 48rpx;
height: 48rpx;
}
.header text{
margin-top: 10rpx;
margin-left: 10rpx;
height: 48rpx;
font-weight: bold;
line-height: 48rpx;
font-size: 32rpx;
color: #333333;
}
.info{
margin-top: 35rpx;
/* margin-bottom: 10rpx; */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.info text{
font-size: 28rpx;
color: #333333;
height: 50rpx;
line-height: 50rpx;
}
.info .price{
font-weight: bold;
font-size: 64rpx;
color: #D4282D;
}
.accountCopy{
position: absolute;
right: 32rpx;
font-size: 24rpx;
color: #D4282D;
padding: 0rpx 10rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 8rpx;
border: 1rpx solid #D4282D;
}
.account{
margin-top: 30rpx;
margin-left: 32rpx;
margin-right: 32rpx;
background-color: white;
}
.titleView{
height: 90rpx;
line-height: 90rpx;
border-bottom: solid 1px #F6F6F6;
}
.name{
margin-left: 24rpx;
font-size: 28rpx;
color: #999999;
}
.detail{
margin-left: 100rpx;
font-size: 28rpx;
color: #333333;
}
.qrcode{
margin-top: 35rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.qrcode text{
font-size: 32rpx;
color: #333333;
}
.qrcode image{
margin-top: 30rpx;
width: 320rpx;
height: 320rpx;
}

4
pages/user/user.wxml

@ -132,7 +132,7 @@
<view class="function" style='background:#fff'>
<block wx:for="{{list}}" wx:key="id">
<navigator class="function_list" catchtap='jumpgo' data-id="../{{item.url}}">
<view class="function_list" catchtap='jumpgo' data-id="../{{item.url}}">
<view class='function_left'>
<image style="width: 25px;height: 25px;margin: auto;" src='../../images/icons/{{item.icon}}'></image>
<view class='function_text'>{{item.text}} </view>
@ -140,7 +140,7 @@
<view class='function_right jiantou'>
<image src="../../images/x_right.png"></image>
</view>
</navigator>
</view>
</block>
</view>

2
project.private.config.json

@ -5,5 +5,5 @@
"compileHotReLoad": true,
"urlCheck": false
},
"libVersion": "2.20.2"
"libVersion": "2.25.3"
}

55
utils/server.js

@ -102,8 +102,33 @@ module.exports = {
productAddCart: (data) => { //加入购物车
return requestServer('&action=product&app=add_cart', 'post', data)
},
//确认订单 payment
orderPayment: (data) => {
return requestServer('&action=order&app=payment', 'post', data)
},
leaveSettlement: (data) => {
return requestServer('&action=order&app=leave_Settlement', 'post', data)
},
addressIndex: (data) => { //地址管理列表
return requestServer('&action=address&app=index', 'post', data)
},
saveAddress: (data) => { //添加地址
return requestServer('&action=address&app=SaveAddress', 'post', data)
},
addressDelAdds: (data) => { //删除地址
return requestServer('&action=address&app=del_adds', 'post', data)
},
addressUpAdds: (data) => { //修改地址
return requestServer('&action=address&app=up_adds', 'post', data)
},
getLocation: (data) => { //获取地址信息
return requestServer('&action=index&app=get_location', 'post', data)
},
//确认订单 payment
orderList: (data) => {
return requestServer('&action=order&app=index', 'post', data)
},
/* -------------------- */
productSaveFormid: (data) => {
return requestServer('&action=product&m=save_formid', 'post', data)
},
@ -133,41 +158,23 @@ module.exports = {
return requestServer('&action=product&m=delcart', 'post', data)
},
addressManagement: (data) => { //添加地址
return requestServer('&action=user&m=AddressManagement', 'post', data)
},
getCityArr: (data) => { //根据省获取市
return requestServer('&action=user&m=getCityArr', 'post', data)
},
getCountyInfo: (data) => { //根据省市获取县
return requestServer('&action=user&m=getCountyInfo', 'post', data)
},
getLocation: (data) => { //获取地址信息
return requestServer('&action=index&app=get_location', 'post', data)
return requestServer('&action=user&app=AddressManagement', 'post', data)
},
preservation: (data) => {
return requestServer('&action=user&m=Preservation', 'post', data)
},
saveAddress: (data) => {
return requestServer('&action=user&m=SaveAddress', 'post', data)
},
addressDelselect: (data) => {
return requestServer('&action=address&m=del_select', 'post', data)
},
addressIndex: (data) => {
return requestServer('&action=address&m=index', 'post', data)
},
addressSetDefault: (data) => { //设置默认地址
return requestServer('&action=address&m=set_default', 'post', data)
},
addressDelAdds: (data) => { //删除地址
return requestServer('&action=address&m=del_adds', 'post', data)
},
addressUpAddsIndex: (data) => { //修改地址
return requestServer('&action=address&m=up_addsindex', 'post', data)
},
addressUpAdds: (data) => { //修改地址
return requestServer('&action=address&m=up_adds', 'post', data)
},
envelopeIndex: (data) => { //
return requestServer('&action=envelope&m=index', 'post', data)
},

Loading…
Cancel
Save