作者 朱振飞

initi

正在显示 38 个修改的文件 包含 2369 行增加869 行删除

要显示太多修改。

为保证性能只显示 38 of 38+ 个文件。

//app.js
App({
onLaunch: function () {
onLaunch: function() {
let that = this;
// 展示本地存储能力
wx.request({
url: 'http://39.97.184.199:8080/CommonInterface/GetToken',
method: 'POST',
success: function (res) {//返回取得的数据
console.log(res.data.ResultObj)
success: function(res) { //返回取得的数据
// console.log(res.data.ResultObj)
wx.setStorageSync('authToken', res.data.ResultObj)
if (res.data.code == '20000') {
resolve(res.data.data);
}
},
fail: function (e) {
fail: function(e) {
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
... ... @@ -26,37 +25,62 @@ App({
}
})
// wx.request({
// url: 'http://39.97.184.199:8080//Staff/GetAccessToken',
wx.login({
success: function(res) {
wx.login({
success: (res) => {
console.log(res)
let url = '/Staff/GetOpenID';
let params = {
code: res.code,
}
that.post(url, params).then(res => {
wx.setStorageSync('openid', res.openid);
}).catch((errMsg) => {})
}
});
},
fail: function(res) {},
complete: function(res) {},
})
setTimeout(function(){
that.getuserinfo()
},1500)
// method: 'POST',
// success: function (res) {//返回取得的数据
// console.log(res.data.ResultObj)
// wx.setStorageSync('authToken', res.data.ResultObj)
// if (res.data.code == '20000') {
// resolve(res.data.data);
// }
// },
// fail: function (e) {
// reject('网络出错');
// // wx.hideLoading()
// wx.hideNavigationBarLoading()
// },
// complate() {
// wx.hideLoading({
// title: '加载中',
// })
// }
// })
},
getuserinfo() {
let that = this;
var url = '/Staff/SelectRoleMenuByUser';
var params = {
openid: wx.getStorageSync('openid'),
}
that.post(url, params).then((res) => {
console.log(res);
wx.setStorageSync('current', 0)
wx.setStorageSync('Suid', res.Suid);
wx.setStorageSync('UserType', res.UserType)
//usertyppe 1生活家 2散户 3 经销商
// that.setData({
// usertype: res.UserType,
// usercode: res.UserCode
// })
}).catch((err) => {
})
},
//封装post
post: function (url, data, headerParams) {
post: function(url, data, headerParams) {
/**
* 自定义post函数,返回Promise
* +-------------------
... ... @@ -80,8 +104,9 @@ App({
//网络请求
let header = {
'content-type': 'application/x-www-form-urlencoded',
'authToken': wx.getStorageSync('authToken')||''
'content-type': 'application/json;charset=utf-8',
//'content-type':'application/x-www-form-urlencoded',
'authToken': wx.getStorageSync('authToken') || ''
}
header = Object.assign(header, headerParams)
wx.request({
... ... @@ -89,77 +114,19 @@ App({
data: postData,
method: 'POST',
header: header,
success: function (res) {//返回取得的数据
if (res.data.code == '20000') {
resolve(res.data.data);
} else if (res.data.code == '40000') {//返回错误提示信息
reject(res.data)
wx.showToast({
title: res.data.msg,
icon: 'none'
})
// if (res.data.msg == "缺少必要参数:USER_ID") {
// wx.showToast({
// title: '需要授权登录',
// })
// wx.navigateTo({
// url: '/pages/index/index?status=' + 3,
// })
// }
} else if (res.data.code == '40001') {//返回错误提示信息
wx.showModal({
title: '提示',
content: '登录已过期请重新登录!',
showCancel: false,
success: function (res) {
if (res.confirm) {
wx.removeStorageSync('token');
wx.navigateTo({
// url: '/pages/startRecord/startRecord',
})
}
}
})
} else if (res.data.code == '40002') {
console.log(res)
wx.showToast({
title: res.data.msg,
icon: 'none'
})
// wx.showModal({
// title: '提示',
// content: res.data.msg,
// showCancel: false,
// success: function (res) { }
// })
} else if (res.data.code == '40003') {
// 初始化用户信息判断
let usetrInfoType = {
hasUserInfo: false
}
resolve(usetrInfoType);
// wx.showModal({
// title: '提示',
// content: res.data.msg,
// showCancel: false
// })
success: function(res) { //返回取得的数据
console.log(res)
if (res.data.ResultCode == '1') {
resolve(res.data.ResultObj);
} else {
console.log(res)
// wx.showModal({
// title: '提示',
// // content: res.data.msg,
// showCancel: false
// })
reject(res.data)
}
setTimeout(function () {
setTimeout(function() {
wx.hideLoading()
wx.hideNavigationBarLoading()
}, 600)
},
fail: function (e) {
fail: function(e) {
reject('网络出错');
// wx.hideLoading()
wx.hideNavigationBarLoading()
... ... @@ -168,67 +135,25 @@ App({
wx.hideLoading({
title: '加载中',
})
}
},
complete: function () {
wx.hideNavigationBarLoading()
},
})
});
return promise;
},
//上传文件
upload(filetype, file) {
var promise = new Promise((resolve, reject) => {
wx.showNavigationBarLoading()
wx.showLoading({
title: '上传中',
})
let url = 'https://anleguo.w.brotop.cn/portal/common/upload';
let head = {
'XX-Token': wx.getStorageSync('token'),
'XX-Device-Type': ''
}
let typename = {
filetype: filetype
}
wx.uploadFile({
url: url, //仅为示例,非真实的接口地址
filePath: file,
name: 'file',
header: {},
formData: typename,
success: function (res) {
console.log('上传文件后', res)
let temdata = JSON.parse(res.data);
let urlobj = {
url: temdata.data.preview_url
//url: temdata.data.filepath
}
resolve(urlobj);
wx.hideNavigationBarLoading();
wx.hideLoading();
},
fail: function (res) {
reject('网络出错');
wx.hideNavigationBarLoading()
wx.hideLoading()
},
complete: () => {
wx.hideNavigationBarLoading()
wx.hideLoading()
},
})
});
return promise;
},
globalData: {
userInfo: null,
baseUrl : 'http://39.97.184.199:8080'
baseUrl: 'http://39.97.184.199:8080'
},
... ... @@ -246,7 +171,7 @@ App({
// wx.navigateTo({
// url: '/pages/homeindex/homeindex',
// })
// } else if (number == 2) {
// wx.reLaunch({
// url: '../publicindex/publicindex',
... ...
// pages/ordercontainer/drawbill/drawbill.js
const app=getApp()
Page({
/**
... ... @@ -7,15 +8,356 @@ Page({
data: {
billselect:true,
kind:true,
num:4
num:4,
ticket:'',
shuinum:'',
bank:'',
banknum:'',
companyaddress:'',
enterphone:'',
invoiceType:1,
sendType:2,
orderno:"",
detail:"",
email:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if(options.orderno!=undefined){
this.setData({
orderno:options.orderno
})
}
console.log(options)
console.log(this.data.kind)
},
//抬头类型
ticket(e){
this.setData({
ticket:e.detail.value
})
},
//税号
shuinum(e){
this.setData({
shuinum:e.detail.value
})
},
//开户银行
bank(e){
this.setData({
bank:e.detail.value
})
},
//银行账号
banknum(e){
this.setData({
banknum:e.detail.value
})
},
//企业地址
companyaddress(e){
this.setData({
companyaddress:e.detail.value
})
},
//企业电话
enterphone(e){
this.setData({
enterphone:e.detail.value
})
},
email(e){
this.setData({
email:e.detail.value
})
},
//发票明细
enterdetail(e){
this.setData({
detail:e.detail.value
})
console.log(this.data.detail)
},
//确定
sure(){
let that = this;
// if (that.data.billselect==true){
// if(that.data.kind==true){
// if(that.data.ticket==''){
// wx.showToast({
// title: '请输入发票抬头',
// icon:"none"
// })
// return false
// }
// if (that.data.email == '') {
// wx.showToast({
// title: '请输入接受发票邮箱',
// icon: "none"
// })
// return false
// }
// } else if (that.data.kind == false){
// if (that.data.ticket == '') {
// wx.showToast({
// title: '请输入发票抬头',
// icon: "none"
// })
// return false
// }
// if (that.data.shuinum == '') {
// wx.showToast({
// title: '请输入发票抬头',
// icon: "none"
// })
// return false
// }
// if (that.data.bank == '') {
// wx.showToast({
// title: '请输入开户银行',
// icon: "none"
// })
// return false
// }
// if (that.data.banknum == '') {
// wx.showToast({
// title: '请输入银行账号',
// icon: "none"
// })
// return false
// }
// if (that.data.companyaddress == '') {
// wx.showToast({
// title: '请输入企业地址',
// icon: "none"
// })
// return false
// }
// if (that.data.enterphone == '') {
// wx.showToast({
// title: '请输入企业电话',
// icon: "none"
// })
// return false
// }
// if (that.data.email == '') {
// wx.showToast({
// title: '请输入接受发票邮箱',
// icon: "none"
// })
// return false
// }
// }
// }else{
// if (that.data.kind == true) {
// if (that.data.ticket == '') {
// wx.showToast({
// title: '请输入发票抬头',
// icon: "none"
// })
// return false
// }
// } else if (that.data.kind == false) {
// if (that.data.ticket == '') {
// wx.showToast({
// title: '请输入发票抬头',
// icon: "none"
// })
// return false
// }
// if (that.data.shuinum == '') {
// wx.showToast({
// title: '请输入发票抬头',
// icon: "none"
// })
// return false
// }
// if (that.data.bank == '') {
// wx.showToast({
// title: '请输入开户银行',
// icon: "none"
// })
// return false
// }
// if (that.data.banknum == '') {
// wx.showToast({
// title: '请输入银行账号',
// icon: "none"
// })
// return false
// }
// if (that.data.companyaddress == '') {
// wx.showToast({
// title: '请输入企业地址',
// icon: "none"
// })
// return false
// }
// if (that.data.enterphone == '') {
// wx.showToast({
// title: '请输入企业电话',
// icon: "none"
// })
// return false
// }
// let phonereg = /^[1][3,4,5,7,8][0-9]{9}$/;
// if(!phonereg.test(that.data.enterphone)){
// wx.showToast({
// title: '请输入正确的手机号',
// icon:'none'
// })
// return false
// }
// if (that.data.email == '') {
// wx.showToast({
// title: '请输入接受发票邮箱',
// icon: "none"
// })
// return false
// }
// var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
// if(!reg.test(that.data.email)){
// wx.showToast({
// title: '请输入正确邮箱格式',
// icon: "none"
// })
// return false
// }
// }
// }
console.log(that.data.enterphone)
if (that.data.enterphone!=''){
let phonereg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!phonereg.test(that.data.enterphone)) {
wx.showToast({
title: '请输入正确的企业电话',
icon: 'none'
})
return false
}
}
console.log(that.data.email)
if (that.data.email!=''){
var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
if (!reg.test(that.data.email)) {
wx.showToast({
title: '请输入正确邮箱格式',
icon: "none"
})
return false
}
}
console.log(that.data.invoiceType)
let url = '/OrderManagement/AddInvoice', params = {
// orderNo:that.data.orderno,
orderNo:'',
invoiceType: that.data.invoiceType,
rise:this.data.ticket,
taxNo:this.data.shuinum,
bankName:this.data.bank,
bankNo:this.data.banknum,
registerAddress:this.data.companyaddress,
registerPhone:this.data.enterphone,
sendType: this.data.sendType,
contents:that.data.detail,
recipetEmail:that.data.email
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '提交成功',
icon:'none'
})
console.log(res.id)
wx.setStorageSync('drawbill', res);
wx.setStorageSync('invoiceId', res.id)
setTimeout(function(){
wx.navigateBack({
checked: true
})
},1500)
}).catch((err) => {
console.log(err);
if (err.ResultMsg =='请选择发票明细!'){
wx.showToast({
title:'请输入发票内容!',
icon: "none"
})
}else{
wx.showToast({
title: err.ResultMsg,
icon: "none"
})
}
})
},
//不开发票
nodrawbill(){
wx.setStorageSync("drawbill", '');
wx.setStorageSync("invoiceId",0);
wx.navigateBack({
checked:true
})
},
jump(e) {
console.log(e)
var that = this;
... ... @@ -53,14 +395,38 @@ Page({
},
selectkind(){
this.setData({
kind:!this.data.kind
kind:!this.data.kind,
})
if(this.data.kind==true){
this.setData({
invoiceType:1
})
}else{
this.setData({
invoiceType:2
})
}
console.log(this.data.invoiceType)
},
// 选择电子发票
selectbill(){
this.setData({
billselect:!this.data.billselect
})
if (this.data.billselect==true){
this.setData({
sendType:2
})
}else{
this.setData({
sendType:1
})
}
console.log(this.data.sendType)
},
//下单
... ... @@ -80,7 +446,77 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let newdrawbill=wx.getStorageSync('drawbill');
if (newdrawbill!=''){
this.setData({
drawbill: newdrawbill
})
if (newdrawbill.sendType == 1) {
this.setData({
billselect: false
})
} else {
this.setData({
billselect: true
})
}
if (newdrawbill.invoiceType == 1) {
this.setData({
kind: true
})
} else {
this.setData({
kind: false
})
}
console.log(this.data.kind);
if (newdrawbill.taxNo!=null){
this.setData({
shuinum: newdrawbill.taxNo,
})
}
if (newdrawbill.bankName != null){
this.setData({
bank: newdrawbill.bankName,
})
}
if (newdrawbill.bankNo != null) {
this.setData({
banknum: newdrawbill.bankNo,
})
}
if (newdrawbill.registerAddress != null) {
this.setData({
companyaddress: newdrawbill.registerAddress,
})
}
if (newdrawbill.registerPhone != null) {
this.setData({
enterphone: newdrawbill.registerPhone,
})
}
if (newdrawbill.contents != null) {
this.setData({
detail: newdrawbill.contents,
})
}
this.setData({
ticket: newdrawbill.rise,
email: newdrawbill.recipetEmail
})
}
},
/**
... ...
... ... @@ -26,11 +26,11 @@
<view class="drawbillmiddlelistleft">抬头类型</view>
<view class="drawbillmiddlelistright">
<view class="drawrightimg" bindtap="selectkind">
<image src="{{kind==true?'/img/aicon_02@2x.png':'/img/aicon_01@2x.png'}}"></image>
<image src="{{kind==true?'/img/aicon_01@2x.png':'/img/aicon_02@2x.png'}}"></image>
</view>
<view class="drawrightword">个人或事业单位</view>
<view class="drawrightimg" bindtap="selectkind">
<image src="{{kind==false?'/img/aicon_02@2x.png':'/img/aicon_01@2x.png'}}"></image>
<image src="{{kind==false?'/img/aicon_01@2x.png':'/img/aicon_02@2x.png'}}"></image>
</view>
<view class="drawrightword">公司</view>
... ... @@ -40,37 +40,37 @@
<view class="drawbillmiddlelist">
<view class="drawbillmiddlelistleft">发票抬头</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入' />
<input placeholder='请输入' bindinput="ticket" value="{{ticket}}"/>
</view>
</view>
<view class="drawbillmiddlelist">
<view class="drawbillmiddlelistleft">税号</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入' />
<input placeholder='请输入' bindinput="shuinum" value="{{shuinum}}"/>
</view>
</view>
<view class="drawbillmiddlelist">
<view class="drawbillmiddlelistleft">开户银行</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入' />
<input placeholder='请输入' bindinput="bank" value="{{bank}}"/>
</view>
</view>
<view class="drawbillmiddlelist">
<view class="drawbillmiddlelistleft">银行账号</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入' />
<input placeholder='请输入' bindinput="banknum" value="{{banknum}}"/>
</view>
</view>
<view class="drawbillmiddlelist">
<view class="drawbillmiddlelistleft">企业地址</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入' />
<input placeholder='请输入' bindinput="companyaddress" value="{{companyaddress}}"/>
</view>
</view>
<view class="drawbillmiddlelist">
<view class="drawbillmiddlelistleft">企业电话</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入' />
<input placeholder='请输入' bindinput="enterphone" value="{{enterphone}}"/>
</view>
</view>
... ... @@ -79,22 +79,24 @@
<view class='receiveyouxiang'>
<view class="drawbillmiddlelistleft">接受发票信息邮箱</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入' />
<input placeholder='请输入' bindinput="email" value="{{email}}"/>
</view>
</view>
<view class="fapiaocontent">
<view class="fapiaocontentleft">发票内容</view>
<view class="fapiaocontentright">明细</view>
<view class="drawbillmiddlelistright">
<input placeholder='请输入发票明细' bindinput="enterdetail" value="{{detail}}"/>
</view>
</view>
<view class="fapiaocontent" bindtap="xiadan">
<view class="fapiaocontentleft">本次不开具发票,继续下单</view>
<view class="fapiaocontentleft" bindtap="nodrawbill">本次不开具发票,继续下单</view>
<view class="fapiaocontentright drawrightrow">
<image src="../../../img/aicon_08@2x.png"></image>
</view>
</view>
<view class="suredrawbill">确定</view>
<view class="suredrawbill" bindtap="sure">确定</view>
</view>
... ...
<!-- <import src="../template/template.wxml" />
<template is="tabBar" data='{{num:num}}' /> -->
... ... @@ -18,27 +16,37 @@
<!-- 客服弹层 -->
<view class="kefuregister" catchtouchmove='true' wx:if="{{phonemode}}">
<view class="kefuwrap">
<view class="kefuwrap">
<view class="pohone" bindtap="makePhoneCall" data-mobile="{{mobile}}">
{{mobile}}
{{mobile}}
</view>
<view class="iconfont icon-shanchuguanbicha" bindtap="cancelphone"></view>
</view>
</view>
</view>
<view class="containbox">
<view class="head">
<image src="../../img/headimg.png"></image>
<view class="peopleimg">
<image src="../../img/peopleimg.png"></image>
</view>
<view class="head">
<image src="../../img/headimg.png"></image>
<view class="peopleimg">
<image src="../../img/peopleimg.png"></image>
</view>
<view class="peoplename">挪威躺</view>
<view class="codenum"> 专属挪威生活家编号:SHJ008654</view>
<view class="peoplename">挪威躺</view>
<view class="codenum"> 专属挪威生活家编号:SHJ008654</view>
<view class="headbottom" bindtap="seeaddress">
<view class="address">地址管理</view>
<view class="headbottom" bindtap="seeaddress">
<view class="address">地址管理</view>
<view class="looklist">
<view class="look">查看</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png"></image>
</view>
</view>
</view>
</view>
<view class="myinfolist" bindtap="seeinfo">
<view class="address">我的信息</view>
<view class="looklist">
<view class="look">查看</view>
<view class="rowimg">
... ... @@ -46,91 +54,81 @@
</view>
</view>
</view>
</view>
<view class="myinfolist" bindtap="seeinfo">
<view class="address">我的信息</view>
<view class="looklist">
<view class="look">查看</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png"></image>
</view>
</view>
</view>
<view class="myorder">
<view class="myorderlist">
<view class="address">我的订单</view>
<view class="looklist" bindtap="seeorder">
<view class="look">查看全部订单</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png" mode="aspectFit"></image>
<view class="myorder">
<view class="myorderlist">
<view class="address">我的订单</view>
<view class="looklist" bindtap="seeorder">
<view class="look">查看全部订单</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
<view class="ordercontent">
<view class="ordercontentitem" data-current="1" bindtap="orderlist">
<view class="myorderimg">
<!-- aicon_40@2x -->
<image src="/img/daifukuan.png"></image>
<view class="ordercontent">
<view class="ordercontentitem" data-current="1" bindtap="orderlist">
<view class="myorderimg">
<!-- aicon_40@2x -->
<image src="/img/daifukuan.png"></image>
</view>
<view class="alreadyname">未付款</view>
</view>
<view class="alreadyname">未付款</view>
</view>
<view class="ordercontentitem" data-current="2" bindtap="orderlist">
<view class="myorderimg">
<!-- aicon_24@2x -->
<image src="/img/daishouhuo.png" mode="aspectFit"></image>
<view class="ordercontentitem" data-current="2" bindtap="orderlist">
<view class="myorderimg">
<!-- aicon_24@2x -->
<image src="/img/daishouhuo.png" mode="aspectFit"></image>
</view>
<view class="alreadyname">已付款</view>
</view>
<view class="alreadyname">已付款</view>
</view>
<view class="ordercontentitem" data-current="3" bindtap="orderlist">
<view class="myorderimg">
<!-- aicon_26@2x -->
<image src="/img/finish.png" mode="aspectFit"></image>
<view class="ordercontentitem" data-current="3" bindtap="orderlist">
<view class="myorderimg">
<!-- aicon_26@2x -->
<image src="/img/finish.png" mode="aspectFit"></image>
</view>
<view class="alreadyname">已完成</view>
</view>
<view class="alreadyname">已完成</view>
</view>
</view>
</view>
<view class="myorder nouweiborder">
<view class="nuoweihome">
<view class="address">挪威生活家</view>
<view class="myorder nouweiborder">
<view class="nuoweihome">
<view class="address">挪威生活家</view>
</view>
</view>
<view class="ordercontent">
<view class="ordercontentitem" bindtap="shouyi">
<view class="shouorderimg">
<image src="/img/aicon_40@2x.png" mode="aspectFit"></image>
<view class="ordercontent">
<view class="ordercontentitem" bindtap="shouyi">
<view class="shouorderimg">
<image src="/img/aicon_40@2x.png" mode="aspectFit"></image>
</view>
<view class="alreadyname">收益报表</view>
</view>
<view class="alreadyname">收益报表</view>
</view>
<view class="ordercontentitem" bindtap="showcodemodel">
<view class="shouorderimg" >
<image src="/img/myselefselect.png" mode="aspectFit"></image>
<view class="ordercontentitem" bindtap="showcodemodel">
<view class="shouorderimg">
<image src="/img/myselefselect.png" mode="aspectFit"></image>
</view>
<view class="alreadyname">邀请分享</view>
</view>
<view class="kefulist" bindtap="phone">
<view class="kefuimg">
<image src="../../img/aicon_16@2x.png"></image>
</view>
<view class="kefuname">客服</view>
</view>
<view class="alreadyname">邀请分享</view>
</view>
<view class="kefulist" bindtap="phone">
<view class="kefuimg">
<image src="../../img/aicon_16@2x.png"></image>
</view>
<view class="kefuname">客服</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -2,7 +2,8 @@
// const app = getApp();
// import menu from '../template/template'
const app=getApp()
var WxParse = require('../../wxParse/wxParse.js');
const app = getApp()
Page({
/**
... ... @@ -19,56 +20,82 @@ Page({
interval: 2000,
duration: 1000,
currentSwiper: 0,
imgUrlsmiddle:[
imgUrlsmiddle: [
'../../img/middlebanner1.png',
'../../img/middlebanner1.png',
'../../img/middlebanner1.png',
'../../img/middlebanner1.png'
],
autoplaytwo:false,
secondcurrentSwiper:0,
num:1
autoplaytwo: false,
secondcurrentSwiper: 0,
num: 1,
//首页信息
homeinfo:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
this.gethomeinfo();
this.getaccessToken()
},
// this.getinfo();
},
getinfo() {
getaccessToken() {
let that = this;
var url = '/Staff/GetAccessToken';
var params = {
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
// app.globalData.userInfo = e.detail.userInfo
wx.login({
success: (res) => {
console.log(res)
let url = '/Staff/GetOpenID';
let params = {
code: res.code,
// user_nickname: e.detail.userInfo.nickName,
// avatar: e.detail.userInfo.avatarUrl
// user_nickname: e.detail.userInfo.nickName,
// avatar: e.detail.userInfo.avatarUrl //分享进入的需要此参数
}
app.post(url, params).then((res) => {
console.log('999', res.openid)
wx.setStorageSync('openid', res.openid);
}).catch((errMsg) => {
// console.log(errMsg)
})
})
}
});
},
gethomeinfo(){
gethomeinfo() {
let that = this;
var url = '/Notice/SelectNoticeMessage';
var params = {
}
var params = {}
app.post(url, params).then((res) => {
console.log(res);
console.log(res)
that.setData({
imgUrls: res.topImgUrl.split(","),
imgUrlsmiddle: res.middleImgUrl.split(","),
homeinfo: res,
})
WxParse.wxParse('article', 'html', res.noticeContent, that, 5)
console.log(that.data.imgUrls)
}).catch((err) => {
})
},
jump(e) {
console.log(e)
var that = this;
... ... @@ -77,12 +104,12 @@ Page({
console.log(number)
if (number == 1) {
wx.reLaunch({
url:'/pages/homeindex/homeindex'
url: '/pages/homeindex/homeindex'
})
} else if (number == 2) {
wx.redirectTo({
// url: '/pages/shop/goodtail/goodtail',
// url: '/pages/shop/goodtail/goodtail',
url: '/pages/shopgoods/shopgoods'
})
} else if (number == 3) {
... ... @@ -98,7 +125,7 @@ Page({
let type = e.currentTarget.dataset.type;
if (type == 1) {
wx.reLaunch({
// url: '/pages/visitormine/visitormine',
// url: '/pages/visitormine/visitormine',
//url: '/pages/guidemine/guidemine'
url: '/pages/jingxiaoshangmine/jingxiaoshangmine'
})
... ... @@ -107,13 +134,13 @@ Page({
}
},
swiperChangetwo: function (e) {
swiperChangetwo: function(e) {
console.log(e)
this.setData({
secondcurrentSwiper: e.detail.current
})
},
swiperChange(e){
swiperChange(e) {
this.setData({
currentSwiper: e.detail.current
})
... ... @@ -122,49 +149,49 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
<!-- <import src="../template/template.wxml" />
<template is="tabBar" data='{{num:num}}' /> -->
<import src="../../wxParse/wxParse.wxml"/>
<view class="pagebox">
<view class="swiper_image">
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_img" bindchange="swiperChange">
<block wx:for="{{imgUrls}}" wx:key="doct">
<swiper-item>
<image src="{{item}}" class="slide-image" width="355" height="150" mode="aspectFit"/>
<image src="{{item}}" class="slide-image" width="355" height="150" mode="aspectFill"/>
</swiper-item>
</block>
</swiper>
</view>
<view class="title">沿袭北欧设计,传递幸福哲学 </view>
<!-- <view class="title">沿袭北欧设计,传递幸福哲学 </view> -->
<view class="title">{{homeinfo.title}} </view>
<view class="secondtitle">放下身段、感受自然</view>
<view class="thirdtitle">为忙碌的生活带来全新的舒适体验</view>
... ... @@ -28,7 +30,7 @@
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplaytwo}}" interval="{{interval}}" duration="{{duration}}" class="swiper_item_imgtwo" bindchange="swiperChangetwo">
<block wx:for="{{imgUrlsmiddle}}" wx:key="doct">
<swiper-item>
<image src="{{item}}" class="slide-image" width="355" height="150" mode="aspectFit"/>
<image src="{{item}}" class="slide-image" width="355" height="150" mode="aspectFill"/>
</swiper-item>
</block>
</swiper>
... ... @@ -42,13 +44,15 @@
<!-- 底部图片 -->
<view class="bottomimg">
<view class="bottomimgitem">
<!-- <view class="bottomimgitem">
<image src="../../img/bannerbottom.png"></image>
</view>
<view class="bottomimgitem">
<image src="../../img/bannerbottom_07.png"></image>
</view>
</view> -->
<template is="wxParse" data="{{wxParseData:article.nodes}}"/>
</view>
... ...
... ... @@ -63,18 +63,19 @@ page{
/* 中间轮播图 */
.swiper_image_two{
padding-top:50rpx;
width:750rpx;
height:420rpx;
height:650rpx;
position:relative;
}
.swiper_item_imgtwo{
width:750rpx;
height:420rpx;
height:520rpx;
}
.swiper_item_imgtwo swiper-item{
width:750rpx;
height:420rpx;
height:520rpx;
}
.swiper_item_imgtwo swiper-item image{
width:100%;
... ... @@ -90,7 +91,7 @@ page{
align-items: center;
position: absolute;
bottom: -20rpx;
bottom: 110rpx;
}
/*未选中时的小圆点样式 */
.dot{
... ... @@ -118,4 +119,13 @@ page{
.bottomimgitem image{
width:100%;
height:100%;
}
/* 副文本内容 */
.wxParse-p{
display:flex;
justify-content: center
}
.wxParse-p image{
display:block
}
\ No newline at end of file
... ...
... ... @@ -14,14 +14,14 @@
<!-- 客服弹层 -->
<view class="kefuregister" catchtouchmove='true' wx:if="{{phonemode}}">
<view class="kefuwrap">
<view class="kefuwrap">
<view class="pohone" bindtap="makePhoneCall" data-mobile="{{mobile}}">
{{mobile}}
{{mobile}}
</view>
<view class="iconfont icon-shanchuguanbicha" bindtap="cancelphone"></view>
</view>
</view>
</view>
... ... @@ -30,18 +30,28 @@
<template is="tabBar" data='{{num:num}}' /> -->
<view class="jixbox">
<view class="head">
<image src="../../img/headimg.png"></image>
<view class="peopleimg">
<image src="../../img/peopleimg.png"></image>
</view>
<view class="head">
<image src="../../img/headimg.png"></image>
<view class="peopleimg">
<image src="../../img/peopleimg.png"></image>
</view>
<view class="peoplename">挪威躺</view>
<view class="codenum">经销商编号:SHJ008654</view>
<view class="peoplename">挪威躺</view>
<view class="codenum">经销商编号:SHJ008654</view>
<view class="headbottom" bindtap="seeaddress">
<view class="address">地址管理</view>
<view class="headbottom" bindtap="seeaddress">
<view class="address">地址管理</view>
<view class="looklist">
<view class="look">查看</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png"></image>
</view>
</view>
</view>
</view>
<view class="myinfolist" bindtap="seeinfo">
<view class="address">我的信息</view>
<view class="looklist">
<view class="look">查看</view>
<view class="rowimg">
... ... @@ -49,55 +59,46 @@
</view>
</view>
</view>
</view>
<view class="myinfolist" bindtap="seeinfo">
<view class="address">我的信息</view>
<view class="looklist">
<view class="look">查看</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png"></image>
</view>
</view>
</view>
<!-- 经销商 -->
<view class="myorder">
<view class="myorderlist">
<view class="address">我的订单</view>
<view class="looklist" bindtap="seeorder">
<view class="look">查看全部订单</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png"></image>
<!-- 经销商 -->
<view class="myorder">
<view class="myorderlist">
<view class="address">我的订单</view>
<view class="looklist" bindtap="seeorder">
<view class="look">查看全部订单</view>
<view class="rowimg">
<image src="../../img/aicon_08@2x.png"></image>
</view>
</view>
</view>
</view>
<view class="ordercontent">
<view class="ordercontentitem" bindtap="orderlist" data-current="1">
<view class="myorderimg">
<!-- aicon_40@2x.png -->
<image src="/img/daishouhuo.png"></image>
<view class="ordercontent">
<view class="ordercontentitem" bindtap="orderlist" data-current="1">
<view class="myorderimg">
<!-- aicon_40@2x.png -->
<image src="/img/daishouhuo.png"></image>
</view>
<view class="alreadyname">已提交</view>
</view>
<view class="alreadyname">已提交</view>
</view>
<view class="ordercontentitem" bindtap="orderlist" data-current="2">
<view class="myorderimg">
<!-- aicon_41@2x.png -->
<image src="/img/finish.png"></image>
<view class="ordercontentitem" bindtap="orderlist" data-current="2">
<view class="myorderimg">
<!-- aicon_41@2x.png -->
<image src="/img/finish.png"></image>
</view>
<view class="alreadyname">已完成</view>
</view>
<view class="alreadyname">已完成</view>
</view>
</view>
</view>
</view>
<!-- 客服 -->
<!-- 客服 -->
<view class="kefulist" bindtap="phone">
<view class="kefuimg">
<image src="../../img/aicon_16@2x.png"></image>
<view class="kefulist" bindtap="phone">
<view class="kefuimg">
<image src="../../img/aicon_16@2x.png"></image>
</view>
<view class="kefuname">客服</view>
</view>
<view class="kefuname">客服</view>
</view>
\ No newline at end of file
... ...
... ... @@ -11,14 +11,18 @@ Page({
disable: false,
time: '获取验证码', //倒计时
currentTime: 60,
code: ''
code: '',
guid:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
guid: options.scene
})
},
//输入手机号
enterphone(e) {
... ... @@ -72,13 +76,49 @@ Page({
})
}
}, 1000)
}
var url = '/Vertificateion/AddVertificateCode';
var params = {
phone: that.data.phonenum,
msgType:1
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
console.log(err)
wx.showToast({
title: err.ResultMsg,
icon: "none"
})
})
}
},
//输入验证码
entercode(e){
this.setData({
code:e.detail.value
})
},
login(){
let that = this;
let url = '/Vertificateion/VerifyVertificateCode', params = {
suid: wx.getStorageSync('Suid'),
guid: that.data.guid,
phone:that.data.phonenum
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
})
wx.reLaunch({
url: '/pages/homeindex/homeindex',
})
... ...
... ... @@ -19,7 +19,7 @@
<image src="../../img/aicon_34@2x.png"></image>
</view>
<view class="enterinput">
<input placeholder='请输入手机验证码' placeholder-class="phcolor"/>
<input placeholder='请输入手机验证码' bindinput="entercode" placeholder-class="phcolor"/>
</view>
<button class="getcode" disabled='{{disabled}}' bindtap="getcode">{{time}}</button>
</view>
... ...
... ... @@ -63,10 +63,11 @@ Page({
}
that.setData({
items: newitems
items: newitems,
suid: wx.getStorageSync("Suid")
})
that.getaddress()
},
//获取收货地址
... ... @@ -79,6 +80,11 @@ Page({
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
items:res
})
console.log(this.data.items.length)
}).catch((err) => {
})
... ... @@ -91,10 +97,19 @@ Page({
},
//编辑地址
edit(){
console.log(9090)
edit(e){
let id=e.currentTarget.dataset.id
let newaddress=this.data.items;
let editaddressinfo=''
for(var obj of newaddress){
if(id==obj.id){
editaddressinfo=obj
}
}
wx.setStorageSync('addressinfo', editaddressinfo)
// editaddressinfo = JSON.stringify(editaddressinfo)
wx.navigateTo({
url: '/pages/myinfo/newaddress/newaddress',
url: '/pages/myinfo/newaddress/newaddress?editid=' + id +'&addresstype='+1,
})
},
... ... @@ -108,18 +123,33 @@ Page({
let newcarlist = that.data.items;
for (var obj of newcarlist) {
if (id == obj.id) {
obj.select=!obj.select
obj.isDefault = !obj.isDefault
}else{
obj.select=false
obj.isDefault=false
}
}
that.setData({
items: newcarlist
})
let newaddress=that.data.items
let editaddressinfo = ''
for (var obj of newaddress) {
if (id == obj.id) {
editaddressinfo = obj
}
}
wx.setStorageSync('addressinfo', editaddressinfo)
wx.setStorageSync('editid', id)
// editaddressinfo = JSON.stringify(editaddressinfo)
wx.navigateBack({
checked:true
})
console.log(that.data.arr);
console.log(that.data.money)
... ... @@ -181,7 +211,7 @@ Page({
//删除事件
del: function (e) {
let that = this;
// this.data.items.splice(e.currentTarget.dataset.index, 1)
this.data.items.splice(e.currentTarget.dataset.index, 1)
that.setData({
items: that.data.items
})
... ... @@ -196,6 +226,11 @@ Page({
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '删除成功',
icon:'none'
})
}).catch((err) => {
... ... @@ -214,6 +249,7 @@ Page({
*/
onShow: function () {
this.getaddress();
},
/**
... ...
<!-- 购物车列表 -->
<!-- 地址列表 -->
<view class="container">
<view class="touch-item {{item.isTouchMove ? 'touch-move-active' : ''}}" data-index="{{index}}" bindtouchstart="touchstart" bindtouchmove="touchmove" wx:for="{{items}}" wx:key="">
<view class="shopcarlsit content">
<!-- <view class="selectimg" catchtap='select' data-idx="{{index}}" data-id="{{item.id}}">
<image src="{{item.select==true?'../../../img/aicon_35@2x.png':'../../../img/aicon_02@2x.png'}}"></image>
</view>
<view class="shocarpimg">
<view class="shopitemimg">
<image src="../../img/tu@2x.png"></image>
</view>
<view class="shopremainnum">仅剩5件</view>
</view>
<view class="shopcarmem">
<view class="shopcarinfo">
<view class="shopcarname">办公足踏系统</view>
<view class="shopcarcolor">颜色:深蓝色</view>
</view>
<view class="shopcarplace">
<view class="shopcarprice">¥{{item.sell_price}}</view>
<view class="shopcarnum">
<view class="reduceimg" catchtap="reducenum" data-index="{{index}}" data-id="{{item.id}}">
<image src="../../img/aicon_05@2x.png"></image>
</view>
<view class="carnum">{{item.num}}</view>
<view class="addimg" catchtap="add" data-index="{{index}}" data-id="{{item.id}}">
<image src="../../img/aicon_03@2x.png"></image>
</view>
</view>
</view>
</view> -->
<view class="addressmanageleft">
<view class="addressmanagename">陈生
<text class="addtel">1368788744444</text>
<view class="addressmanagename">{{item.name}}
<text class="addtel">{{item.phone}}</text>
</view>
<view class="addressdetail">
北京 北京市朝阳区保利T1
{{item.address}}
</view>
</view>
<view class="addressimgright">
<view class="selectimg" catchtap='select' data-idx="{{index}}" data-id="{{item.id}}">
<image src="{{item.select==true?'../../../img/aicon_35@2x.png':'../../../img/aicon_02@2x.png'}}"></image>
<image src="{{item.isDefault==true?'../../../img/aicon_35@2x.png':'../../../img/aicon_02@2x.png'}}"></image>
</view>
<view class="addeditimg" catchtap="edit">
<view class="addeditimg" catchtap="edit" data-id="{{item.id}}">
<image src="../../../img/aicon_10@2x.png"></image>
</view>
</view>
... ... @@ -63,7 +29,4 @@
</view>
<view class="clearshop" bindtap="newaddress">+新建地址</view>
</view>
\ No newline at end of file
... ...
// pages/ordercontainer/applayofhome/applayofhome.js
const app=getApp()
const app = getApp()
Page({
/**
... ... @@ -7,32 +7,158 @@ Page({
*/
data: {
region: ['北京市', '北京市', '东城区'],
reginname:"省份 城市 区域",
reginname: "省份 城市 区域",
//身份证正面
fronthumb:'',
fronthumb: '',
//身份证反面
beithumb:'',
beithumb: '',
frontbase: '',
backbase: '',
//姓名
entername:'',
name: '',
//手机号
phone:'',
phone: '',
//详细地址
address:'',
address: '',
//身份证号
identitynumber:''
identitynumber: '',
provinceId: 1,
//省市区
province: [],
city: [],
multiArray: [],
multiIndex: [0, 0, 0],
zone: [],
detailvalue: 0,
cityid: "",
areaid: ""
// currnetCityId:'',
// currnetCityId:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
this.setData({
suid: wx.getStorageSync('Suid')
})
this.getprovince()
},
//获取省份
getprovince() {
let that = this;
let url = '/Address/GetProvinceCity',
params = {
provinceId: that.data.provinceId,
}
app.post(url, params).then((res) => {
console.log(res);
console.log(res.city[0].id)
that.setData({
currnetCityId: res.city[0].id,
province: res.province,
city: res.city,
multiArray: [res.province, res.city, []],
})
console.log(that.data.currnetCityId)
that.getcity(res.city[0].id)
}).catch((err) => {
})
},
bindRegionChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
region: e.detail.value,
reginname: e.detail.value
//获取市
getcity(cityid) {
let that = this;
let url = '/Address/GetZone',
params = {
cityid: cityid,
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
currnetAreaId: res.zone[0].id,
zone: res.zone,
multiArray: [that.data.province, that.data.city,
res.zone
],
})
console.log(that.data.multiArray)
}).catch((err) => {
})
},
columnchange(e) {
let that = this;
let column = e.detail.column
let data = {
multiIndex: JSON.parse(JSON.stringify(that.data.multiIndex)),
multiArray: JSON.parse(JSON.stringify(that.data.multiArray))
}
data.multiIndex[column] = e.detail.value;
switch (column) {
case 0:
console.log(e.detail.value)
console.log(that.data.province)
let currnetCityId = that.data.city[e.detail.value];
let provinceId = that.data.province[e.detail.value].id;
that.setData({
provinceId: provinceId,
})
that.getprovince();
console.log(that.data.currnetCityId)
if (currnetCityId != that.data.currnetCityId) {
that.getprovince()
}
data.multiIndex[1] = that.data.detailvalue
break;
case 1:
console.log(that.data.zone)
let currnetAreaId = that.data.city[e.detail.value].id;
if (currnetAreaId != that.data.currnetAreaId) {
that.getcity(currnetAreaId)
}
data.multiIndex[2] = that.data.detailvalue
break;
}
this.setData(data)
},
pickreginchange(e) {
let that = this
let index = e.detail.value[2]
that.setData({
multiIndex: [e.detail.value[0], e.detail.value[1], e.detail.value[2]],
reginname: that.data.multiArray[0][e.detail.value[0]].name + that.data.multiArray[1][e.detail.value[1]].name + that.data.multiArray[2][e.detail.value[2]].name,
cityid: that.data.multiArray[1][e.detail.value[1]].id,
areaid: that.data.multiArray[2][e.detail.value[2]].id,
})
},
... ... @@ -42,123 +168,134 @@ Page({
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
success: function (res) {
app.upload('image', res.tempFilePaths[0]).then((res) => {
console.log('上传文件' + res);
that.setData({
fronthumb: res.url
})
}).catch((err) => {
console.log(err)
sourceType: ['album', 'camera'],
success: function(res) {
console.log(res)
let img = res.tempFilePaths[0];
let tempFilePaths = wx.getFileSystemManager().readFileSync(res.tempFilePaths[0], "base64")
that.setData({
fronthumb: img,
//frontbase: 'data:image/png;base64,'+tempFilePaths
frontbase: tempFilePaths
})
},
fail: function (res) { }
}
})
},
upbei(){
upbei() {
let that = this;
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
success: function (res) {
app.upload('image', res.tempFilePaths[0]).then((res) => {
console.log('上传文件' + res);
that.setData({
beithumb: res.url
})
}).catch((err) => {
console.log(err)
sourceType: ['album', 'camera'],
success: function(res) {
console.log(res)
let img = res.tempFilePaths[0];
let tempFilePaths = wx.getFileSystemManager().readFileSync(res.tempFilePaths[0], "base64")
console.log(tempFilePaths)
that.setData({
beithumb: img,
backbase: tempFilePaths
})
},
fail: function (res) { }
}
})
},
//姓名
entername(e){
entername(e) {
this.setData({
name:e.detail.value
name: e.detail.value
})
},
//手机号
enterphone(e){
//手机号
enterphone(e) {
this.setData({
phone:e.detail.value
phone: e.detail.value
})
},
//详细地址
detailaddress(){
detailaddress(e) {
this.setData({
address:e.detail.value
address: e.detail.value
})
},
//身份证号
entercard(e){
entercard(e) {
this.setData({
identitynumber:e.detail.value
identitynumber: e.detail.value
})
},
//提交审核
subshen(){
subshen() {
let that = this;
if(that.data.name==''){
if (that.data.name == '') {
wx.showToast({
title: '请填写姓名',
icon:"none"
icon: "none"
})
return false
}
if(that.data.phone==''){
if (that.data.phone == '') {
wx.showToast({
title: '请输入手机号',
icon:'none'
icon: 'none'
})
return false
}
let reg = /^[1][3,4,5,6,7,8][0-9]{9}$/;
if(!reg.test(that.data.phone)){
if (!reg.test(that.data.phone)) {
wx.showToast({
title: '请输入正确的手机号',
icon:'none'
icon: 'none'
})
return false
}
if (that.data.reginname ='省份 城市 区域'){
console.log(that.data.reginname)
if (that.data.setname == '省份 城市 区域') {
wx.showToast({
title: '请选择地址',
icon:'none'
icon: 'none'
})
return false
}
if(that.data.address==''){
console.log(that.data.reginname)
if (that.data.address == '') {
wx.showToast({
title: '请输入详细地址',
icon:'none'
icon: 'none'
})
return false
}
if (that.data.identitynumber==''){
if (that.data.identitynumber == '') {
wx.showToast({
title: '请输入身份证号',
icon:'none'
icon: 'none'
})
return false
}
let cardreg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if (!cardreg.test(that.data.identitynumber)){
let cardreg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if (!cardreg.test(that.data.identitynumber)) {
wx.showToast({
title: '请输入正确的身份证号',
icon: 'none'
... ... @@ -166,7 +303,7 @@ Page({
return false
}
if (that.data.fronthumb==''){
if (that.data.fronthumb == '') {
wx.showToast({
title: '请上传身份证正面照',
icon: 'none'
... ... @@ -183,74 +320,83 @@ Page({
return false
}
let url = '/api/portal/archives/archivesList', params = {
suid: that.data.suid,
name:that.data.name,
phone:that.data.phone,
identitynumber: taht.data.identitynumber,
city:that.data.cityid,
area:that.data.areaid,
address: that.data.address,
front: that.data.fronthumb,
rear: that.data.beithumb
}
let url = '/Staff/RegisterToB',
params = {
suid: that.data.suid,
name: that.data.name,
phone: that.data.phone,
identitynumber: that.data.identitynumber,
city: that.data.cityid,
area: that.data.areaid,
address: that.data.address,
front: that.data.frontbase,
rear: that.data.backbase,
province: that.data.provinceId,
city: that.data.cityid,
area: that.data.areaid
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
wx.showToast({
title: err.ResultMsg,
cion:'none'
,
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -14,15 +14,12 @@
</view>
</view>
<picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
<picker mode="multiSelector" range="{{multiArray}}" bindcolumnchange="columnchange" value="{{multiIndex}}" bindchange='pickreginchange' range-key='name'>
<view class="applayofhomeitem">
<view class='applayofhomeleft'>地址:</view>
<view class="applayofhomeright">
{{reginname}}
</view>
</view>
</picker>
... ...
... ... @@ -21,7 +21,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
openid:wx.getStorageSync('openid')
})
},
close(){
this.setData({
... ... @@ -90,14 +92,18 @@ Page({
var url = '/Vertificateion/AddVertificateCode';
var params = {
phone: that.data.phonenum,
msgType:1
msgType:2
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
console.log(err)
wx.showToast({
title: err.ResultMsg,
icon:"none"
})
})
}
... ... @@ -156,7 +162,11 @@ Page({
app.post(url, params).then(res => {
console.log(res);
}).catch((err) => {
console.log(err)
wx.showToast({
title: err.ResultMsg,
icon:'none'
})
})
},
... ...
// pages/myinfo/applaywidthdraw/applaywidthdraw.js
const app=getApp()
Page({
/**
... ... @@ -7,20 +8,20 @@ Page({
data: {
select:false,
money:'',
suid:""
suid:"",
applaymoney:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
subapplay(){
wx.navigateTo({
url: '/pages/myinfo/withdrawcash/withdrawcash',
this.setData({
suid: wx.getStorageSync("Suid"),
applaymoney:options.money
})
},
applaycash(){
this.setData({
select:!this.data.select
... ... @@ -34,7 +35,7 @@ Page({
},
//提现
getmoney(){
subapplay(){
let that = this;
if(that.data.money==''){
wx.showToast({
... ... @@ -44,15 +45,49 @@ Page({
return false
}
let url = '/api/portal/archives/archivesList', params = {
console.log(typeof(that.data.money));
console.log(typeof(that.data.applaymoney))
if (Number(that.data.money)>Number(that.data.applaymoney)){
wx.showToast({
title: '提现金额要小于可提现金额',
icon: 'none'
})
return false
}
if (that.data.select==false){
wx.showToast({
title: '请选择提现到微信',
icon: 'none'
})
return false
}
let url = '/Staff/SubmitWithdrawApply', params = {
cash: that.data.money,
suid:that.data.suid
// suid:'A28F3A32-912E-4948-9439-9C985C7D87F6'
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '提现成功',
icon:'none'
})
setTimeout(function(){
wx.navigateBack({
checked:true
})
},1500)
// wx.navigateTo({
// url: '/pages/myinfo/withdrawcash/withdrawcash',
// })
}).catch((err) => {
... ...
... ... @@ -12,7 +12,7 @@
<view class="canmoney">
<view class="canmoneyleft">可申请提现金额 52.74</view>
<view class="canmoneyleft">可申请提现金额 {{applaymoney}}</view>
<view class="canmoneyright">全部申请提现</view>
</view>
... ...
... ... @@ -13,6 +13,10 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
suid: wx.getStorageSync("Suid")
})
this.getmymessage()
},
... ...
... ... @@ -12,25 +12,259 @@ Page({
fronthumb: '',
//身份证反面
beithumb: '',
selectkind:['住宅','公司','学校','家人','住宅','住宅'],
selectkind:[],
currnetindex:0,
suid:'',
name:'',
phone:'',
address:'',
tagId:''
tagId:'',
//省市区
province: [],
city: [],
multiArray: [],
multiIndex: [0, 0, 0],
zone: [],
detailvalue: 0,
cityid: "",
areaid: "",
provinceId:1,
suid:'',
labeid:"",
addressinfo:'',
editid:'',
placetype: 1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
if(options.editid!=undefined){
this.setData({
editid: options.editid
})
}
if(options.addresstype==1){
this.setData({
placetype:1
})
wx.setNavigationBarTitle({
title: '编辑地址' //页面切换,更换页面标题
})
}else{
this.setData({
placetype: 2
})
wx.setNavigationBarTitle({
title: '新增地址' //页面切换,更换页面标题
})
}
this.setData({
suid: wx.getStorageSync("Suid"),
})
//确认订单编辑地址
//地址管理编辑地址
// let editaddressinfo = options.editaddressinfo;
// console.log(editaddressinfo)
// if (editaddressinfo != undefined) {
// editaddressinfo = JSON.parse(editaddressinfo)
// console.log(editaddressinfo)
// // this.setData({
// // editaddressinfo: JSON.parse(editaddressinfo)
// // })
// let proname = editaddressinfo.address.split(",");
// console.log(editaddressinfo.cityId)
// this.setData({
// name: editaddressinfo.name,
// phone: editaddressinfo.phone,
// address: proname[1],
// reginname: proname[0],
// labeid: editaddressinfo.tagId,
// provinceId: editaddressinfo.provinceId,
// cityid: editaddressinfo.cityId,
// areaid: editaddressinfo.zoneId,
// })
// console.log(this.data.cityid)
// }
this.getprovince();
this.getlabel()
},
//获取地址标签
getlabel(){
let that = this;
let url = '/Address/SelectFoundationDates', params = {
type:5,
}
app.post(url, params).then((res) => {
console.log(res);
this.setData({
selectkind:res
})
let neweditaddressinfo = that.data.addressinfo;
console.log(neweditaddressinfo)
for (var i=0;i<res.length;i++) {
if (res[i].id == neweditaddressinfo.tagId){
that.setData({
currnetindex:i
})
}
that.setData({
currnetindex: that.data.currnetindex,
})
console.log(that.data.currnetindex)
}
console.log(that.data.cityid)
}).catch((err) => {
})
},
//获取省份
getprovince() {
let that = this;
let url = '/Address/GetProvinceCity',
params = {
provinceId: that.data.provinceId,
}
app.post(url, params).then((res) => {
console.log(res);
console.log(res.city[0].id)
that.setData({
currnetCityId: res.city[0].id,
province: res.province,
city: res.city,
multiArray: [res.province, res.city, []],
})
console.log(that.data.currnetCityId)
that.getcity(res.city[0].id)
}).catch((err) => {
})
},
//获取市
getcity(cityid) {
let that = this;
let url = '/Address/GetZone',
params = {
cityid: cityid,
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
currnetAreaId: res.zone[0].id,
zone: res.zone,
multiArray: [that.data.province, that.data.city,
res.zone
],
})
console.log(that.data.multiArray)
}).catch((err) => {
})
},
columnchange(e) {
let that = this;
let column = e.detail.column
let data = {
multiIndex: JSON.parse(JSON.stringify(that.data.multiIndex)),
multiArray: JSON.parse(JSON.stringify(that.data.multiArray))
}
data.multiIndex[column] = e.detail.value;
switch (column) {
case 0:
console.log(e.detail.value)
console.log(that.data.province)
let currnetCityId = that.data.city[e.detail.value];
let provinceId = that.data.province[e.detail.value].id;
that.setData({
provinceId: provinceId,
})
that.getprovince();
console.log(that.data.currnetCityId)
if (currnetCityId != that.data.currnetCityId) {
that.getprovince()
}
data.multiIndex[1] = that.data.detailvalue
break;
case 1:
console.log(that.data.zone)
let currnetAreaId = that.data.city[e.detail.value].id;
if (currnetAreaId != that.data.currnetAreaId) {
that.getcity(currnetAreaId)
}
data.multiIndex[2] = that.data.detailvalue
break;
}
this.setData(data)
},
pickreginchange(e) {
let that = this
let index = e.detail.value[2]
that.setData({
multiIndex: [e.detail.value[0], e.detail.value[1], e.detail.value[2]],
reginname: that.data.multiArray[0][e.detail.value[0]].name + that.data.multiArray[1][e.detail.value[1]].name + that.data.multiArray[2][e.detail.value[2]].name,
cityid: that.data.multiArray[1][e.detail.value[1]].id,
areaid: that.data.multiArray[2][e.detail.value[2]].id,
})
},
//选择地址标签
selectaddress(e){
this.setData({
currnetindex:e.currentTarget.dataset.index
currnetindex:e.currentTarget.dataset.index,
labeid:e.currentTarget.dataset.id
})
},
bindRegionChange(e) {
... ... @@ -101,9 +335,10 @@ Page({
})
},
//新增收货地址
saveaddress(){
saveplace(){
let that = this;
console.log(909)
if(that.data.name==''){
wx.showToast({
title: '请输入姓名',
... ... @@ -134,7 +369,7 @@ Page({
if (that.data.reginname == '省份 城市 区域') {
wx.showToast({
title: '请输入省份',
title: '请选择地址',
icon: 'none'
})
return false
... ... @@ -151,22 +386,145 @@ Page({
name:that.data.name,
phone:that.data.phone,
suid:that.data.suid,
provinceId: that.data.provinceId,
cityId: that.data.cityId,
zoneid: that.data.zoneid,
address: that.data.address,
tagId: that.data.tagId
provinceid: that.data.provinceId,
cityid: that.data.cityid,
zoneid: that.data.areaid,
address: that.data.reginname+','+that.data.address,
tagid: that.data.labeid
}
app.post(url, params).then((res) => {
console.log(res);
wx.setStorageSync('addressinfo', addressinfo)
wx.showToast({
title: '添加成功',
icon:"none"
})
setTimeout(function(){
wx.navigateBack({
checked:true
})
},1500)
}).catch((err) => {
})
},
//编辑收货地址
edit() {
let that = this;
console.log(909)
if (that.data.name == '') {
wx.showToast({
title: '请输入姓名',
icon: 'none'
})
return false
}
if (that.data.phone == '') {
wx.showToast({
title: '请输入电话',
icon: 'none'
})
return false
}
let reg = /^[1][3,4,5,6,7,8][0-9]{9}$/;
if (!reg.test(that.data.phone)) {
wx.showToast({
title: '请输入正确的手机号',
icon: 'none'
})
return false
}
if (that.data.reginname == '省份 城市 区域') {
wx.showToast({
title: '请选择地址',
icon: 'none'
})
return false
}
if (that.data.address == '') {
wx.showToast({
title: '请输入详细地址',
icon: 'none'
})
return false
}
console.log(that.data.editid)
let url = '/Address/UpdateAddress', params = {
id: that.data.editid,
name: that.data.name,
phone: that.data.phone,
suid: that.data.suid,
provinceid: that.data.provinceId,
cityid: that.data.cityid,
zoneid: that.data.areaid,
address: that.data.reginname + ',' + that.data.address,
tagid: that.data.labeid
}
app.post(url, params).then((res) => {
console.log(res);
let addressinfo = {
name: that.data.name,
phone: that.data.phone,
address: that.data.reginname +','+ that.data.address,
// detailaddress: that.data.address,
// reginname: that.data.reginname,
currnetindex: that.data.currnetindex,
tagId: that.data.labeid,
provinceId: that.data.provinceId,
cityId: that.data.cityid,
zoneId: that.data.areaid,
}
wx.setStorageSync('addressinfo', addressinfo)
wx.showToast({
title: '编辑成功',
icon: "none"
})
setTimeout(function () {
wx.navigateBack({
checked: true
})
}, 1500)
}).catch((err) => {
console.log(8080);
console.log(err)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -178,7 +536,35 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let newaddressinfo = wx.getStorageSync("addressinfo");
console.log(newaddressinfo)
if (newaddressinfo != '') {
console.log(7890)
this.setData({
addressinfo: newaddressinfo
})
}
console.log(this.data.addressinfo)
let proname = newaddressinfo.address.split(",");
if (this.data.addressinfo != '') {
this.setData({
name: newaddressinfo.name,
phone: newaddressinfo.phone,
address: proname[1],
reginname: proname[0],
labeid: newaddressinfo.tagId,
provinceId: newaddressinfo.provinceId,
cityid: newaddressinfo.cityId,
areaid: newaddressinfo.zoneId,
})
}
},
/**
... ...
... ... @@ -2,32 +2,29 @@
<view class="applayofhomeitem">
<view class='applayofhomeleft'>姓名:</view>
<view class='applayofhomeright'>
<input placeholder='请输入姓名' bindinput="entername"/>
<input placeholder='请输入姓名' bindinput="entername" value="{{name}}"/>
</view>
</view>
<view class="applayofhomeitem">
<view class='applayofhomeleft'>电话:</view>
<view class='applayofhomeright'>
<input placeholder='请输入电话' bindinput="enterphone"/>
<input placeholder='请输入电话' bindinput="enterphone" value="{{phone}}"/>
</view>
</view>
<picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
<picker mode="multiSelector" range="{{multiArray}}" bindcolumnchange="columnchange" value="{{multiIndex}}" bindchange='pickreginchange' range-key='name'>
<view class="applayofhomeitem">
<view class='applayofhomeleft'>省份</view>
<view class='applayofhomeleft'>地址:</view>
<view class="applayofhomeright">
{{reginname}}
</view>
</view>
</picker>
<view class="applayofhomeitem">
<view class='applayofhomeleft'>详细地址:</view>
<view class='applayofhomeright'>
<input placeholder='详细地址' bindinput="enteraddress"/>
<input placeholder='详细地址' bindinput="enteraddress" value="{{address}}"/>
</view>
</view>
</view>
... ... @@ -36,10 +33,11 @@
<view class="selectaddressname">选择地址标签</view>
<view class="signbox" >
<view class="{{currnetindex==index?'signboxitemactive':'signboxitem'}}" wx:for="{{selectkind}}" wx:key='' bindtap="selectaddress" data-index="{{index}}">{{item}}</view>
<view class="{{currnetindex==index?'signboxitemactive':'signboxitem'}}" wx:for="{{selectkind}}" wx:key='' bindtap="selectaddress" data-index="{{index}}" data-id="{{item.id}}">{{item.name}}</view>
</view>
</view>
<view class="clearshop" bindatap="saveaddress">保存</view>
\ No newline at end of file
<view class="clearshop" bindtap="saveplace" wx:if="{{ placetype==2}}">新增保存</view>
<view class="clearshop" bindtap="edit" wx:else>保存</view>
\ No newline at end of file
... ...
// pages/myinfo/settedamount/settedamount.js
const app=getApp()
Page({
/**
... ... @@ -18,14 +19,34 @@ Page({
more: 5
}
]
],
finishorder:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.maymoney()
},
maymoney(){
let that = this;
let url = '/OrderManagement/SelectOrderListBySUIDAndOrderStatus', params = {
suid: wx.getStorageSync('Suid'),
orderStatus:3
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
items:res.order
})
}).catch((err) => {
})
},
seemoreimg(e){
console.log(e)
... ...
... ... @@ -3,10 +3,10 @@
<!-- 订单列表 -->
<view class="orderlist" wx:for="{{items}}" wx:key=''>
<view class="orderlistitem" wx:if="{{item.more<=4}}">
<view class="orderlistitem" wx:if="{{item.orderGoodsInfo.length==1}}">
<view class="orderimage">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<image src="{{item.orderGoodsInfo[0].goodsImgUrl}}" mode="aspectFill"></image>
</view>
<view class="orderright">
... ... @@ -14,17 +14,17 @@
<view class="orderinfo">
<view class="ordername">
办公足踏系统
{{item.orderGoodsInfo[0].goodsName}}
</view>
<view class="oredercolor">颜色:深蓝色</view>
<view class="oredercolor">订单编号:WJZJ201903260102</view>
<view class="oredercolor">客户手机号码:18910323671</view>
<view class="oredercolor">颜色:{{item.orderGoodsInfo[0].goodsColorName}}</view>
<view class="oredercolor">订单编号:{{item.orderNo}}</view>
<view class="oredercolor">客户手机号码:{{item.phone}}</view>
</view>
<view class="orderinfonum">
<view class="orderinfoname orderfinish">已结算</view>
<view class="box">
<text class="orderinfomoney">¥ 3999</text>
<text class="orderinfocartnum">x1</text>
<text class="orderinfomoney">¥ {{item.orderGoodsInfo[0].goodsPrice}}</text>
<text class="orderinfocartnum">x{{item.orderGoodsInfo[0].numbers}}</text>
</view>
</view>
... ... @@ -33,15 +33,15 @@
<view class="orderinfobottom">
<view class="ordertotalnum">付款金额</view>
<view class="hejimoney">¥ 3999</view>
<view class="hejimoney">¥ {{item.price}}</view>
<view class="ordertotalnum">预估收益</view>
<view class="hejimoney">¥399</view>
<view class="hejimoney">¥{{item.preCommision}}</view>
</view>
<view class="orderinfobottom">
<view class="jienum"> 2018.11.26 20:21创建 </view>
<view class="jienum"> 2018.11.26 20:21结算 </view>
<view class="jienum"> {{item.cTime}}创建 </view>
<view class="jienum"> {{item.payTime}}结算 </view>
</view>
</view>
... ... @@ -52,12 +52,12 @@
<view class="moreorderlistitem" wx:else>
<view class="containertext">
<view class="imgcontainer" style="height:{{item.chose==true?'164rpx':'auto'}}">
<view class="containerimg">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<view class="containerimg" wx:for="{{item.orderGoodsInfo}}" wx:key=''>
<image src="{{item.goodsImgUrl}}" mode="aspectFill"></image>
<view class="remainnum">x1</view>
<view class="remainnum">x{{item.numbers}}</view>
</view>
<view class="containerimg">
<!-- <view class="containerimg">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<view class="remainnum">x1</view>
... ... @@ -76,7 +76,7 @@
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<view class="remainnum">x1</view>
</view>
</view> -->
</view>
... ... @@ -97,23 +97,23 @@
<view class="orderinfobottom">
<view>
<view class="oredercolor moreorder">订单编号:WJZJ201903260102</view>
<view class="oredercolor ">客户手机号码:18910323671</view>
<view class="oredercolor moreorder">订单编号:{{item.orderNo}}</view>
<view class="oredercolor ">客户手机号码:{{item.phone}}</view>
</view>
<view>
<view class="orderinfobottom">
<view class="ordertotalnum">付款金额</view>
<view class="hejimoney">¥ 3999</view>
<view class="hejimoney">¥ {{item.price}}</view>
<view class="ordertotalnum">预估收益</view>
<view class="hejimoney">¥399</view>
<view class="hejimoney">¥{{item.preCommision}}</view>
</view>
<view class="orderinfobottom lastbottom">
<view class="jienum"> 2018.11.26 20:21创建 </view>
<view class="jienum"> 2018.11.26 20:21结算 </view>
<view class="jienum">{{item.cTime}}创建 </view>
<view class="jienum">{{cTime}}结算 </view>
</view>
</view>
... ...
... ... @@ -171,8 +171,8 @@ position:relative;
color:#fff;
font-size: 20rpx;
position: absolute;
right:0;
bottom:20rpx;
right:5rpx;
bottom:10rpx;
}
.containertext{
display:flex;
... ... @@ -180,10 +180,11 @@ position:relative;
}
.containerimg{
width:146rpx;
width:136rpx;
height:164rpx;
font-size: 0;
position:relative;
margin-left:10rpx
}
.containerimg image{
width:100%;
... ...
... ... @@ -21,7 +21,9 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
openid:wx.getStorageSync('openid')
})
},
... ... @@ -98,14 +100,14 @@ Page({
var params = {
phone: that.data.phonenum,
msgType:2
msgType:3
}
app.post(url, params).then((res) => {
console.log(res);
}).catch((err) => {
})
}
},
... ... @@ -151,7 +153,7 @@ Page({
// success: true
// })
let url = '/Address/AddAddress',params = {
let url = '/Staff/ActivateAccount_Dealer',params = {
phone: that.data.phonenum,
openid:that.data.openid,
code:that.data.code
... ... @@ -161,7 +163,13 @@ Page({
app.post(url, params).then(res => {
console.log(res);
}).catch((err) => {
console.log(err)
if (err.ResultCode==0){
wx.showToast({
title: '激活失败',
icon:'none'
})
}
})
},
... ...
// pages/myinfo/settedamount/settedamount.js
const app=getApp()
Page({
/**
... ... @@ -25,7 +26,24 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getlist()
},
getlist(){
let that = this;
let url = '/OrderManagement/SelectOrderListBySUIDAndOrderStatus', params = {
suid: wx.getStorageSync('Suid'),
orderStatus:2
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
items:res.order
})
}).catch((err) => {
})
},
seemoreimg(e) {
console.log(e)
... ...
<!-- 订单列表 -->
<view class="orderlist" wx:for="{{items}}" wx:key=''>
<view class="orderlistitem" wx:if="{{item.more<=4}}">
<view class="orderlist" wx:for="{{items}}" wx:key=''>
<view class="orderlistitem" wx:if="{{item.orderGoodsInfo.length==1}}">
<view class="orderimage">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<image src="{{item.orderGoodsInfo[0].goodsImgUrl}}" mode="aspectFill"></image>
</view>
<view class="orderright">
... ... @@ -12,17 +11,17 @@
<view class="orderinfo">
<view class="ordername">
办公足踏系统
{{item.orderGoodsInfo[0].goodsName}}
</view>
<view class="oredercolor">颜色:深蓝色</view>
<view class="oredercolor">订单编号:WJZJ201903260102</view>
<view class="oredercolor">客户手机号码:18910323671</view>
<view class="oredercolor">颜色:{{item.orderGoodsInfo[0].goodsColorName}}</view>
<view class="oredercolor">订单编号:{{item.orderNo}}</view>
<view class="oredercolor">客户手机号码:{{item.phone}}</view>
</view>
<view class="orderinfonum">
<view class="orderinfoname orderfinish">结算中</view>
<view class="box">
<text class="orderinfomoney">¥ 3999</text>
<text class="orderinfocartnum">x1</text>
<view class="box">
<text class="orderinfomoney">¥ {{item.orderGoodsInfo[0].goodsPrice}}</text>
<text class="orderinfocartnum">x{{item.orderGoodsInfo[0].numbers}}</text>
</view>
</view>
... ... @@ -30,15 +29,15 @@
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">付款金额</view>
<view class="hejimoney">¥ 3999</view>
<view class="ordertotalnum">预估收益</view>
<view class="hejimoney">¥399</view>
<view class="hejimoney">¥ {{item.price}}</view>
<view class="ordertotalnum">预估收益</view>
<view class="hejimoney">¥{{item.preCommision}}</view>
</view>
<view class="orderinfobottom newbottom">
<view class="jienum"> 2018.11.26 20:21创建 </view>
<view class="jienum"> {{item.cTime}}创建 </view>
</view>
</view>
... ... @@ -49,12 +48,12 @@
<view class="moreorderlistitem" wx:else>
<view class="containertext">
<view class="imgcontainer" style="height:{{item.chose==true?'164rpx':'auto'}}">
<view class="containerimg">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<view class="containerimg" wx:for="{{item.orderGoodsInfo}}" wx:key=''>
<image src="{{item.goodsImgUrl}}" mode="aspectFill"></image>
<view class="remainnum">x1</view>
<view class="remainnum">x{{item.numbers}}</view>
</view>
<view class="containerimg">
<!-- <view class="containerimg">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<view class="remainnum">x1</view>
... ... @@ -64,24 +63,24 @@
<view class="remainnum">x1</view>
</view>
<view class="containerimg">
<view class="containerimg">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<view class="remainnum">x1</view>
</view>
<view class="containerimg">
<view class="containerimg">
<image src="../../../img/aicon_14@2x.png" mode="aspectFit"></image>
<view class="remainnum">x1</view>
</view>
</view> -->
</view>
<view class="conorderinfoname orderfinish">结算中</view>
<view class="searchmore" bindtap="seemoreimg" data-index="{{index}}">
<view class="searchnoreword" >查看更多</view>
<view class="conorderinfoname orderfinish">结算中</view>
<view class="searchmore" bindtap="seemoreimg" data-index="{{index}}">
<view class="searchnoreword">查看更多</view>
<view class="searchmoreimg">
<image src="{{item.chose==true?'../../../img/aicon_13@2x.png':'../../../img/aicon_37@2x.png'}}" mode="aspectFit"></image>
<image src="{{item.chose==true?'../../../img/aicon_13@2x.png':'../../../img/aicon_37@2x.png'}}" mode="widthFix"></image>
</view>
</view>
... ... @@ -93,27 +92,27 @@
<view class="orderright">
<view class="orderinfobottom">
<view>
<view class="oredercolor moreorder">订单编号:WJZJ201903260102</view>
<view class="oredercolor ">客户手机号码:18910323671</view>
</view>
<view>
<view class="oredercolor moreorder">订单编号:{{item.orderNo}}</view>
<view class="oredercolor ">客户手机号码:{{item.phone}}</view>
</view>
<view>
<view class="orderinfobottom">
<view class="ordertotalnum">付款金额</view>
<view class="hejimoney">¥ 3999</view>
<view class="ordertotalnum">预估收益</view>
<view class="hejimoney">¥399</view>
<view>
<view class="orderinfobottom">
<view class="ordertotalnum">付款金额</view>
</view>
<view class="hejimoney">¥ {{item.price}}</view>
<view class="ordertotalnum">预估收益</view>
<view class="hejimoney">¥{{item.preCommision}}</view>
<view class="orderinfobottom lastbottom">
<view class="jienum"> 2018.11.26 20:21创建 </view>
</view>
</view>
</view>
<view class="orderinfobottom lastbottom">
<view class="jienum">{{item.cTime}}创建 </view>
</view>
</view>
</view>
</view>
... ... @@ -121,6 +120,6 @@
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -171,8 +171,8 @@ position:relative;
color:#fff;
font-size: 20rpx;
position: absolute;
right:0;
bottom:20rpx;
right:5rpx;
bottom:10rpx;
}
.containertext{
display:flex;
... ... @@ -180,10 +180,11 @@ position:relative;
}
.containerimg{
width:146rpx;
width:136rpx;
height:164rpx;
font-size: 0;
position:relative;
margin-left:10rpx;
}
.containerimg image{
width:100%;
... ...
... ... @@ -19,7 +19,7 @@ Page({
getmoneylist(){
let that = this;
let url = '/Staff/SelectWithdrawRecord', params = {
suid: that.data.suid,
suid: wx.getStorageSync("Suid"),
}
app.post(url, params).then((res) => {
... ...
// pages/myorder/myorder.js
// const app = getApp();
// import menu from '../template/template'
const app=getApp()
Page({
/**
... ... @@ -22,7 +23,7 @@ Page({
],
currentTab:0,
myorder:false,
class:1,
class:'',
num:4,
navbarjingxiao: [{
name: '全部'
... ... @@ -35,13 +36,16 @@ Page({
},
],
jingxiaocurrentTab:0
jingxiaocurrentTab:0,
orderlist:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// if(options.current!=undefined){
// this.setData({
// currentTab:options.current,
... ... @@ -57,6 +61,101 @@ Page({
// }
},
//确认收货
sureshouhuo(e){
console.log(e)
let that = this;
let statusid = e.currentTarget.dataset.statusid
let orderno=e.currentTarget.dataset.orderno
let url = '/OrderManagement/UpdateOrderStatusByOrderNo', params = {
statusId: statusid,
orderNo: orderno,
payStatus:''
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '收货成功',
icon:'none'
})
}).catch((err) => {
wx.showToast({
title: err.ResultMsg,
icon:'none'
})
})
},
//获取订单 散客 导购
getorderlist(){
let that = this;
let url = '/OrderManagement/SelectOrderListBySUIDAndOrderStatus', params = {
suid: wx.getStorageSync('Suid'),
//suid:'A28F3A32-912E-4948-9439-9C985C7D87F6',
orderStatus: that.data.currentTab
}
app.post(url, params).then((res) => {
console.log(res);
let neworder=res.order;
for(var obj of neworder){
let total = 0;
for (var p of obj.orderGoodsInfo){
total =total+Number(p.totalGoodsPrice);
p.totalGoodsPrice = Number(p.goodsPrice)*Number(p.numbers)
}
obj.moretotalmoney=total
}
that.setData({
orderlist: neworder
})
console.log(that.data.orderlist)
}).catch((err) => {
})
},
//获取订单经销商
getjingxiaolist(){
let that = this;
let url = '/OrderManagement/SelectOrderListBySUIDAndOrderStatus', params = {
suid: wx.getStorageSync('Suid'),
//suid:'A28F3A32-912E-4948-9439-9C985C7D87F6',
orderStatus: that.data.jingxiaocurrentTab
}
app.post(url, params).then((res) => {
console.log(res);
let neworder = res.order;
for (var obj of neworder) {
let total = 0;
for (var p of obj.orderGoodsInfo) {
total = total + Number(p.totalGoodsPrice)
}
obj.moretotalmoney = total
}
that.setData({
orderlist: neworder
})
console.log(that.data.orderlist)
}).catch((err) => {
})
},
//底部导航跳转
jump(e) {
console.log(e)
... ... @@ -98,28 +197,85 @@ Page({
this.setData({
currentTab: e.currentTarget.dataset.idx,
})
that.getorderlist()
},
jingxiaonavbarTap: function (e) {
let that = this;
console.log(e)
this.setData({
jingxiaocurrentTab: e.currentTarget.dataset.idx,
currentTab: e.currentTarget.dataset.idx,
})
if(that.data.currentTab==0){
that.setData({
jingxiaocurrentTab:0
})
} else if (that.data.currentTab == 1){
that.setData({
jingxiaocurrentTab: 1
})
} else if (that.data.currentTab == 2) {
that.setData({
jingxiaocurrentTab: 3
})
}
that.getjingxiaolist()
},
//立即支付
paynow(){
wx.navigateTo({
//url: '/pages/shop/goodtail/goodtail',
url:'/pages/ordercontainer/sureorderone/sureorderone'
})
paynow(e){
console.log(e)
// let that=this;
// wx.setStorageSync('addressinfo', '');
// wx.setStorageSync('drawbill', '');
// let orderno=e.currentTarget.dataset.orderno;
// console.log(oederno)
// let statusid=e.currentTarget.dataset.statusid;
// console.log(e)
// let id=e.currentTarget.dataset.id;
// console.log(id)
// let neworderlist=that.data.orderlist;
// for(var obj of neworderlist){
// console.log(obj.$id)
// if(id==obj.$id){
// console.log(obj.orderGoodsInfo)
// wx.setStorageSync('listgood', obj.orderGoodsInfo);
// }
// }
// wx.navigateTo({
// url:'/pages/ordercontainer/sureorderone/sureorderone?statusid='+statusid+'&orderno='+orderno
// })
},
buyagain(){
buyagain(e){
let that=this;
wx.setStorageSync('addressinfo', '');
wx.setStorageSync('drawbill', '');
let orderno=e.currentTarget.dataset.orderno;
let statusid=e.currentTarget.dataset.statusid;
console.log(e)
let id=e.currentTarget.dataset.id;
console.log(id)
let neworderlist=that.data.orderlist;
for(var obj of neworderlist){
console.log(obj.$id)
if(id==obj.$id){
console.log(obj.orderGoodsInfo)
wx.setStorageSync('listgood', obj.orderGoodsInfo);
}
}
wx.navigateTo({
url: '/pages/ordercontainer/sureorderone/sureorderone',
url:'/pages/ordercontainer/sureorderone/sureorderone?statusid='+statusid+'&orderno='+orderno
})
},
//订单详情
... ... @@ -128,20 +284,23 @@ Page({
ordertail(e){
console.log(e)
let isReplaceOrder = e.currentTarget.dataset.isreplaceorder
let type=e.currentTarget.dataset.type;
let orderno=e.currentTarget.dataset.orderno;
let statusid = e.currentTarget.dataset.statusid;
console.log(isReplaceOrder)
let kind =e.currentTarget.dataset.kind
wx.navigateTo({
url: '/pages/ordercontainer/orderdetail/orderdetail?kind='+kind+'&type='+type,
url: '/pages/ordercontainer/orderdetail/orderdetail?kind=' + kind + '&type=' + type + '&orderno=' + orderno + '&statusid=' + statusid + '&isReplaceOrder=' + isReplaceOrder,
})
},
//经销商订单详情
jingxiaoordertail(e){
let type = e.currentTarget.dataset.type;
let statusid=e.currentTarget.dataset.statusid
wx.navigateTo({
url: '/pages/ordercontainer/jingxiaoorderdetail/jingxiaoorderdetail?type=' + type,
url: '/pages/ordercontainer/jingxiaoorderdetail/jingxiaoorderdetail?type=' + type+'&statusid='+statusid,
})
},
... ... @@ -163,12 +322,16 @@ Page({
*/
onShow: function () {
let current = wx.getStorageSync('current');
let kind = wx.getStorageSync('kind')
let usertype = wx.getStorageSync('UserType');
console.log(current);
console.log(usertype)
this.setData({
currentTab: current,
jingxiaocurrentTab:current,
class: kind
class: usertype,
})
this.getorderlist()
},
/**
... ...
<!-- <import src="../template/template.wxml" />
<template is="tabBar" data='{{num:num}}' /> -->
<view class="nav mainindex_nav " wx:if="{{class==1}}">
<view wx:for="{{navbar}}" data-idx="{{index}}" class="nav_item {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap" data-categoryid="{{item.id}}">{{item.name}}
<view class="shopnav" wx:if="{{class==3}}">
<view wx:for="{{navbarjingxiao}}" data-idx="{{index}}" class="nav_item shopnavitem {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="jingxiaonavbarTap" data-categoryid="{{item.id}}">{{item.name}}
</view>
</view>
<view class="shopnav" wx:else>
<view wx:for="{{navbarjingxiao}}" data-idx="{{index}}" class="nav_item shopnavitem {{jingxiaocurrentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="jingxiaonavbarTap" data-categoryid="{{item.id}}">{{item.name}}
<view class="nav mainindex_nav " wx:else>
<view wx:for="{{navbar}}" data-idx="{{index}}" class="nav_item {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap" data-categoryid="{{item.id}}">{{item.name}}
</view>
</view>
<!-- 没有订单 -->
<view class="cartkong" wx:if="{{myorder}}">
<view class="cartimg">
... ... @@ -24,209 +24,282 @@
<view wx:else>
<!-- 订单列表 普通客户 导购-->
<view class="orderlist" >
<view class="orderlistitem" bindtap="ordertail" data-type="3" data-kind="1">
<!-- 订单列表 经销商-->
<view class="orderimage">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
</view>
<block wx:if="{{class==3}}">
<view class="orderlist" wx:for="{{orderlist}}" wx:key=''>
<view class="orderlistitem" wx:if="{{item.orderGoodsInfo.length==1}}" data-type="3" data-kind="1" data-orderno="{{item.orderNo}}" data-statusid="{{item.statusId}}" bindtap="ordertail">
<view class="orderright">
<view class="orderfight_top">
<view class="orderimage">
<image src="{{item.orderGoodsInfo[0].goodsImgUrl}}" mode="widthFix"></image>
</view>
<view class="orderinfo">
<view class="ordername">
办公足踏系统
<view class="orderright">
<view class="orderfight_top">
<view class="orderinfo">
<view class="ordername">
{{item.orderGoodsInfo[0].goodsName}}
</view>
<view class="oredercolor">颜色:{{item.orderGoodsInfo[0].goodsColorName}}</view>
</view>
<view class="oredercolor">颜色:深蓝色</view>
</view>
<view class="orderinfonum">
<view class="conorderinfoname" wx:if="{{item.statusId==1}}">已提交</view>
<view class="conorderinfoname" wx:if="{{item.statusId==3}}">已完成</view>
<view class="orderinfomoney">¥ {{item.orderGoodsInfo[0].goodsPrice}}</view>
<view class="orderinfocartnum">x{{item.orderGoodsInfo[0].numbers}}</view>
</view>
<view class="orderinfonum">
<view class="orderinfoname">已完成</view>
<view class="orderinfomoney">¥ 3999</view>
<view class="orderinfocartnum">x1</view>
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计{{item.orderGoodsInfo[0].numbers}}件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥{{item.orderGoodsInfo[0].totalGoodsPrice}}</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付:</view>
<view class="hejimoney">¥{{item.orderGoodsInfo[0].totalGoodsPrice}}</view>
</view>
</view>
<view class="buybtn" catchtap="buyagain" data-id="{{item.$id}}" wx:if="{{item.statusId==3}}">再次购买</view>
</view>
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计1件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="moreorderlistitem" bindtap="ordertail" data-type="1" data-orderno="{{item.orderNo}}" data-statusid="{{item.statusId}}" wx:else>
<view class="containertext">
<view class="imgcontainer">
<view class="containerimg" wx:for="{{item.orderGoodsInfo}}" wx:key="">
<image src="{{item.goodsImgUrl}}" mode="aspectFill"></image>
<view class="remainnum">x{{item.numbers}}</view>
</view>
</view>
<view class="buybtn" catchtap="buyagain">再次购买</view>
<!-- <view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="moreorderlistitem" bindtap="ordertail" data-type="2" data-kind="1">
<view class="containertext">
<view class="imgcontainer">
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
</view>
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
<view class="remainnum">x1</view>
</view> -->
</view>
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
</view>
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="searchmore">
<view class="conorderinfoname" wx:if="{{item.statusId==1}}">已提交</view>
<view class="conorderinfoname" wx:if="{{item.statusId==3}}">已完成</view>
<view class="searchnoreword">查看更多</view>
<view class="searchmoreimg">
<image src="../../img/aicon_13@2x.png" mode="widthFix"></image>
</view>
<view class="remainnum">x1</view>
</view>
</view>
<view class="searchmore">
<view class="conorderinfoname">已付款</view>
<view class="searchnoreword">查看更多</view>
<view class="searchmoreimg">
<image src="../../img/aicon_13@2x.png"></image>
</view>
</view>
</view>
<view class="orderright">
<view class="orderright">
<view class="orderinfobottom">
<view class="ordertotalnum">共计{{item.orderGoodsInfo.length}}件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ {{item.moretotalmoney}}</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付:</view>
<view class="hejimoney">¥{{item.moretotalmoney}}</view>
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计1件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="again"></view>
</view>
<view class="buybtn" catchtap='sureshouhuo'>确认收货</view>
</view>
</view>
</view>
<view class="orderlistitem" bindtap="ordertail" data-type="1" data-kind="1">
<view class="orderimage">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
</view>
<view class="orderright">
<view class="orderfight_top">
<!-- <view class="orderlistitem" bindtap="jingxiaoordertail" data-type="1">
<view class="orderinfo">
<view class="ordername">
办公足踏系统
</view>
<view class="oredercolor">颜色:深蓝色</view>
</view>
<view class="orderimage">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
</view>
<view class="orderright">
<view class="orderfight_top">
<view class="orderinfo">
<view class="ordername">
办公足踏系统
</view>
<view class="oredercolor">颜色:深蓝色</view>
</view>
<view class="orderinfonum">
<view class="orderinfoname">未付款</view>
<view class="orderinfomoney">¥ 3999</view>
<view class="orderinfocartnum">x1</view>
</view>
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计1件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付</view>
<view class="hejimoney">¥ 3999</view>
<view class="orderinfonum">
<view class="orderinfoname">已提交</view>
<view class="orderinfomoney">¥ 3999</view>
<view class="orderinfocartnum">x1</view>
</view>
</view>
<view class="buybtn" catchtap="paynow">立即支付</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计1件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付</view>
<view class="hejimoney">¥ 3999</view>
</view>
</view>
<view class="again"></view>
</view>
</view>
</view>
</view> -->
</view>
</block>
<!-- 订单列表 普通客户 导购-->
<block wx:else>
<view class="orderlist" wx:for="{{orderlist}}" wx:key=''>
<view class="orderlistitem" bindtap="ordertail" data-type="1" data-kind="2">
<view class="orderlistitem" bindtap="ordertail" wx:if="{{item.orderGoodsInfo.length==1}}" data-type="3" data-kind="1" data-orderno="{{item.orderNo}}" data-statusid="{{item.statusId}}" data-isReplaceOrder="{{item.isReplaceOrder}}">
<view class="orderimage">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
</view>
<view class="orderimage">
<image src="{{item.orderGoodsInfo[0].goodsImgUrl}}" mode="aspectFill"></image>
</view>
<view class="orderright">
<view class="orderfight_top">
<view class="orderright">
<view class="orderfight_top">
<view class="orderinfo">
<view class="ordername">
办公足踏系统
<view class="orderinfo">
<view class="ordername">
{{item.orderGoodsInfo[0].goodsName}}
</view>
<view class="oredercolor">颜色:{{item.orderGoodsInfo[0].goodsColorName}}</view>
</view>
<view class="oredercolor">颜色:深蓝色</view>
</view>
<view class="orderinfonum">
<view class="orderinfoname">未付款</view>
<view class="orderinfomoney">¥ 3999</view>
<view class="orderinfocartnum">x1</view>
</view>
<view class="orderinfonum">
<view class="conorderinfoname" wx:if="{{item.statusId==1}}">未付款</view>
<view class="conorderinfoname" wx:if="{{item.statusId==2}}">已付款</view>
<view class="conorderinfoname" wx:if="{{item.statusId==3}}">已完成</view>
<view class="orderinfomoney">¥ {{item.orderGoodsInfo[0].goodsPrice}}</view>
<view class="orderinfocartnum">x{{item.orderGoodsInfo[0].numbers}}</view>
</view>
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计1件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ {{item.orderGoodsInfo[0].totalGoodsPrice}}</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付:</view>
<view class="hejimoney">¥ {{item.orderGoodsInfo[0].totalGoodsPrice}}</view>
</view>
</view>
<view class="buybtn" catchtap="paynow" wx:if="{{item.statusId==1}}" data-id="{{item.$id}}" data-orderno="{{item.orderNo}}" data-statusid="{{item.statusId}}">立即支付</view>
<view class="buybtn" catchtap='sureshouhuo' wx:if="{{item.statusId==2}}" data-orderno="{{item.orderNo}}">确认收货</view>
<view class="buybtn" catchtap="buyagain" data-id="{{item.$id}}" wx:if="{{item.statusId==3}}">再次购买</view>
</view>
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计1件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="moreorderlistitem" bindtap="ordertail" data-type="2" data-kind="1" data-orderno="{{item.orderNo}}" data-statusid="{{item.statusId}}" data-isReplaceOrder="{{item.isReplaceOrder}}" wx:else>
<view class="containertext">
<view class="imgcontainer">
<view class="containerimg" wx:for="{{item.orderGoodsInfo}}" wx:key="">
<image src="{{item.goodsImgUrl}}" mode="aspectFill"></image>
<view class="remainnum">x{{item.numbers}}</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付</view>
<view class="hejimoney">¥ 3999</view>
<!-- <view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
</view>
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
</view> -->
</view>
<view class="searchmore">
<view class="conorderinfoname" wx:if="{{item.statusId==1}}">未付款</view>
<view class="conorderinfoname" wx:if="{{item.statusId==2}}">已付款</view>
<view class="conorderinfoname" wx:if="{{item.statusId==3}}">已完成</view>
<view class="searchnoreword">查看更多</view>
<view class="searchmoreimg">
<image src="../../img/aicon_13@2x.png"></image>
</view>
</view>
<view class="buybtn" catchtap="paynow">立即支付</view>
</view>
</view>
</view>
<view class="orderright">
</view>
<view class="orderinfobottom">
<view class="ordertotalnum">共计{{item.orderGoodsInfo.length}}件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ {{item.moretotalmoney}}</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付:</view>
<view class="hejimoney">¥ {{item.moretotalmoney}}</view>
</view>
</view>
<view class="buybtn" catchtap="paynow" data-isReplaceOrder="{{item.isReplaceOrder}}" wx:if="{{item.statusId==1}}" data-id="{{item.$id}}" data-orderno="{{item.orderNo}}" data-statusid="{{item.statusId}}">立即支付</view>
<view class="buybtn" catchtap='sureshouhuo' data-orderno="{{item.orderNo}}" wx:if="{{item.statusId==2}}" data-statusid="{{item.statusId}}">确认收货</view>
<view class="buybtn" catchtap="buyagain" data-id="{{item.$id}}" wx:if="{{item.statusId==3}}">再次购买</view>
<!-- 订单列表 经销商-->
<!-- <view class="orderlist" wx:else>
<view class="orderlistitem" bindtap="jingxiaoordertail" data-type="2">
</view>
</view>
</view>
<!--
<view class="orderlistitem" bindtap="ordertail" data-type="1" data-kind="1">
<view class="orderimage">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
... ... @@ -245,7 +318,7 @@
<view class="orderinfonum">
<view class="orderinfoname">已完成</view>
<view class="orderinfoname">未付款</view>
<view class="orderinfomoney">¥ 3999</view>
<view class="orderinfocartnum">x1</view>
</view>
... ... @@ -265,63 +338,7 @@
</view>
</view>
<view class="buybtn" catchtap='submitbtn'>再次购买</view>
</view>
</view>
</view>
<view class="moreorderlistitem" bindtap="jingxiaoordertail" data-type="1">
<view class="containertext">
<view class="imgcontainer">
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
</view>
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
</view>
<view class="containerimg">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
<view class="remainnum">x1</view>
</view>
</view>
<view class="searchmore">
<view class="conorderinfoname">已提交</view>
<view class="searchnoreword">查看更多</view>
<view class="searchmoreimg">
<image src="../../img/aicon_13@2x.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="orderright">
<view class="orderinfobottom">
<view class="ordertotalnum">共计1件商品</view>
<view class="ordermiddlelist">
<view class="ordermiddlelistitem">
<view class="heji">合计:</view>
<view class="hejimoney">¥ 3999</view>
</view>
<view class="ordermiddlelistitem">
<view class="heji">实付</view>
<view class="hejimoney">¥ 3999</view>
</view>
</view>
<view class="again"></view>
<view class="buybtn" catchtap="paynow">立即支付</view>
</view>
</view>
... ... @@ -329,10 +346,7 @@
</view>
<view class="orderlistitem" bindtap="jingxiaoordertail" data-type="1">
<view class="orderlistitem" bindtap="ordertail" data-type="1" data-kind="2">
<view class="orderimage">
<image src="../../img/aicon_14@2x.png" mode="widthFix"></image>
... ... @@ -351,7 +365,7 @@
<view class="orderinfonum">
<view class="orderinfoname">已提交</view>
<view class="orderinfoname">未付款</view>
<view class="orderinfomoney">¥ 3999</view>
<view class="orderinfocartnum">x1</view>
</view>
... ... @@ -371,13 +385,16 @@
</view>
</view>
<view class="buybtn" catchtap="paynow">立即支付</view>
<view class="again"></view>
</view>
</view>
</view> -->
</view>
</block>
</view> -->
</view>
\ No newline at end of file
... ...
... ... @@ -81,14 +81,17 @@ position:relative;
box-sizing: border-box;
}
.imgcontainer{
width:450rpx;
overflow: hidden;
text-overflow: ellipsis;
display:flex;
}
.orderright{
margin-left:20rpx;
}
.orderimage{
width:128rpx;
height:220rpx;
width:136rpx;
height:157rpx;
font-size: 0;
flex:0 0 auto;
position: relative
... ... @@ -132,7 +135,8 @@ position:relative;
color:#15276D;
font-size: 30rpx;
font-weight: bold;
margin-top:11rpx;
margin-top:40rpx;
margin-left:10rpx;
}
.orderinfocartnum{
color:#707070;
... ... @@ -180,20 +184,26 @@ position:relative;
color:#fff;
font-size: 26rpx;
position: absolute;
right:0;
bottom:20rpx;
right:5rpx;
bottom:10rpx;
}
.containertext{
display:flex;
margin-left:24rpx;
border-bottom:1rpx solid #f5f5f5;
padding-bottom: 5rpx;
}
.containerimg{
width:146rpx;
height:164rpx;
width:136rpx;
height:157rpx;
font-size: 0;
position:relative;
margin-left:15rpx;
flex:0 0 auto;
}
.containerimg:first-child{
margin-left:0;
}
.containerimg image{
width:100%;
... ... @@ -217,7 +227,7 @@ position:relative;
}
.conorderinfoname{
position: absolute;
right:39rpx;
right:60rpx;
color:#707070;
font-size: 24rpx;
... ...
... ... @@ -3,7 +3,26 @@
</view>
<view class="agreementcontent">
欢迎您与各我方平台经营者(详见定义条款)共同签署本《用户
欢迎您与各我方平台经营者(详见定义条款)共同签署本《用户服务协议》(下称“本协议”)并使用我方平台服务!
</view>
<view class="agreementcontent">
各条款标题仅为帮助您理解该条款表达的主旨之用,不影响或限制本协议条款的含义或解释。为维护您自身权益,建议您仔细阅读各条款具体表述
</view>
<view class="agreementcontent">
【审慎阅读】 您在申请注册流程中点击同意本协议之前,应当认真阅读本协议。 请您务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款、法律适用和争议解决条款。免除或者限制责任的条款将以粗体下划线标识,您应重点阅读。 如您对协议有任何疑问,可向我方平台客服咨询。
</view>
<view class="agreementcontent">
签约动作】 当您按照注册页面提示填写信息、阅读并同意本协议且完成全部注册程序后,即表示您已充分阅读、理解并接受本协议的全部内容,并与我方平台网站达成一致,成为优酷网或我方平台“用户”。 阅读本协议的过程中,如果您不同意本协议或其中签约动作】 当您按照注册页面提示填写信息、阅读并同意本协议且完成全部注册程序后,即表示您已充分阅读、理解并接受本协议的全部内容,并与我方平台网站达成一致,成为优酷网或我方平台“用户”。 阅读本协议的过程中,如果您不同意本协议或其中任何条款约定,您应立即停止注册程序。
</view>
<view class="agreementcontent">
如果您在本协议生效前已成为我方平台的注册用户,则您通过访问和/或使用我方平台网站,即视为您表示同意接受本协议的全部内容,否则请您不要访问或使用我方平台网站。
<view>
</view>
</view>
<view class="agreementbottom">
... ...
// pages/ordercontainer/applayaftersell/applayaftersell.js
const app=getApp()
Page({
/**
* 页面的初始数据
*/
data: {
sellselect:1,
sellselect:0,
enterlen:0,
applaynum:1
applaynum:1,
appalygood:"",
applayaddress:'',
shotype:[],
applyTypeId:1,
orderno:'',
addressid:'',
describe:'',
applayaddress:'',
contacts:'',
telephone:''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
orderno: options.oederno,
addressid:options.addressid,
applayaddress: wx.getStorageSync("applayaddress")
})
console.log(this.data.orderno)
this.getshoutype()
},
//获取售后类型
getshoutype(){
let that = this;
let url = '/Address/SelectFoundationDates', params = {
type: 1,
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
shoutype:res
})
}).catch((err) => {
})
},
selectkind(e){
console.log(e)
let idx=e.currentTarget.dataset.idx;
this.setData({
sellselect:e.currentTarget.dataset.type
sellselect:idx,
applyTypeId: this.data.shoutype[idx].id
})
},
enterques(e){
enterdes(e){
this.setData({
enterlen:e.detail.value.length
enterlen:e.detail.value.length,
describe:e.detail.value
})
},
//地址编辑
... ... @@ -34,6 +74,27 @@ Page({
url: '/pages/myinfo/newaddress/newaddress',
})
},
//售后描述
enterques(e){
this.setData({
describe:e.detail.value
})
},
//联系人
enterconnect(e){
this.setData({
contacts:e.detail.value
})
},
//联系人手机号
enterphone(e){
this.setData({
telephone:e.detail.value
})
},
//增加数量
addnum(){
let num=this.data.applaynum;
... ... @@ -54,6 +115,74 @@ Page({
applaynum: num
})
},
//提交
submit(){
let that = this;
console.log(9090)
console.log(that.data.orderno)
if (that.data.describe==''){
wx.showToast({
title: '请输入问题描述',
icon:'none'
})
return false
}
if (that.data.contacts == '') {
wx.showToast({
title: '请输入联系人',
icon: 'none'
})
return false
}
if (that.data.telephone == '') {
wx.showToast({
title: '请输入联系电话',
icon: 'none'
})
return false
}
let reg = /^[1][3,4,5,7,8][0-9]{9}$/;
if (!reg.test(that.data.telephone)){
wx.showToast({
title: '请输入正确的联系电话',
icon: 'none'
})
return false
}
let url = '/AfterSalesApply/AddAfterSaleApply', params = {
orderNo:that.data.orderno,
applyNumber: that.data.applaynum,
applyTypeId: that.data.applyTypeId,
receiptAddressId:that.data.addressid,
describe: that.data.describe,
contacts: that.data.contacts,
telephone: that.data.telephone,
operatorID: wx.getStorageSync("Suid"),
goodsLeatherid: that.data.appalygood.id
}
app.post(url, params).then((res) => {
console.log(res);
wx.showToast({
title: '提交成功',
icon:"none"
})
setTimeout(function(){
wx.navigateBack({
checked:true
})
},1500)
}).catch((err) => {
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
... ... @@ -65,7 +194,12 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
appalygood: wx.getStorageSync("applaygood"),
applayaddress: wx.getStorageSync("applayaddress")
})
console.log(this.data.appalygood)
console.log(this.data.applayaddress)
},
/**
... ...
... ... @@ -3,7 +3,7 @@
<view class="ordertailgood">
<view class="ordertaile">
<view class="orderdetailimg">
<image src="../../../img/aicon_14@2x.png"></image>
<image src="{{appalygood.goodsImgUrl}}"></image>
</view>
</view>
... ... @@ -14,20 +14,20 @@
<view class="ordertailrtop">
<view class="ordertailgoodinfotop">
<view class="ordertailgoodinfotopname">办公足踏系统</view>
<view class="ordertailgoodinfobottomcolor">颜色:黄色</view>
<view class="ordertailgoodinfotopname">{{appalygood.goodsName}}</view>
<view class="ordertailgoodinfobottomcolor">颜色:{{appalygood.goodsColorName}}</view>
</view>
<view class="ordertailgoodinfobottom">
<view class="ordertailgoodinfotopprice">¥ 3999</view>
<view class="ordertailgoodinfobottomnum">x1</view>
<view class="ordertailgoodinfotopprice">¥ {{appalygood.goodsPrice}}</view>
<view class="ordertailgoodinfobottomnum">x{{appalygood.numbers}}</view>
</view>
</view>
<view class="ordertailshenqing">
<view class="sehqningword">申请售后</view>
<view class="shenqingmoney">实付金额</view>
<view class="shenqingprice"> ¥99</view>
<view class="shenqingprice"> ¥{{appalygood.totalGoodsPrice}}</view>
</view>
</view>
... ... @@ -57,15 +57,15 @@
<view class="aftersellkind">售后类型</view>
<view class="sellkind">
<view class="{{sellselect==1?'wexiuactive':'sellkinditem'}}" data-type="1" bindtap="selectkind">维修</view>
<view class="{{sellselect==2?'wexiuactive':'sellkinditem'}}" data-type="2" bindtap="selectkind">退货</view>
<view class="{{sellselect==3?'wexiuactive':'sellkinditem'}}" data-type="3" bindtap="selectkind">换货</view>
<view class="{{sellselect==index?'wexiuactive':'sellkinditem'}}" data-id="{{item.id}}" bindtap="selectkind" data-idx="{{index}}" wx:for="{{shoutype}}" wx:key=''>{{item.name}}</view>
<!-- <view class="{{sellselect==2?'wexiuactive':'sellkinditem'}}" data-type="2" bindtap="selectkind">退货</view>
<view class="{{sellselect==3?'wexiuactive':'sellkinditem'}}" data-type="3" bindtap="selectkind">换货</view> -->
</view>
<view class="aftersellkind ques">问题描述</view>
<view class="describeques">
<textarea bindinput="enterques" placeholder="" />
<textarea bindinput="enterdes" placeholder="" />
<view class="entertext">
<text class="textnum">{{enterlen}}/</text>
... ... @@ -78,19 +78,19 @@
<view class="sureorderhead">
<view class="orderaddresslist">
<view class="ordername">陈生 北京市朝阳区保利T1</view>
<view class="ordername">{{applayaddress.name}} {{applayaddress.phone}}</view>
<view class="orderaddress">
<view class="ordersign">
<image src="../../../img/aicon_11@2x.png"></image>
</view>
<view class="addressname">
收货地址:北京市朝阳区保利T1
收货地址:{{applayaddress.address}}
</view>
</view>
</view>
<view class="editimg" bindtap="address">
<!-- <view class="editimg" bindtap="address">
<image src="../../../img/aicon_10@2x.png"></image>
</view>
</view> -->
</view>
<!-- 联系人 -->
... ... @@ -101,7 +101,9 @@
联系人
</view>
<view class="realname">陈生</view>
<view class="realname">
<input placeholder='请输入联系人' bindinput="enterconnect"/>
</view>
</view>
<view class="connectpeopletop connectphone">
... ... @@ -109,7 +111,11 @@
联系电话
</view>
<view class="realname">158446456456</view>
<view class="realname">
<input placeholder='请输入联系人手机号' bindinput='enterphone' type="number"/>
</view>
</view>
</view>
... ... @@ -119,5 +125,5 @@
</view>
<view class="applaybottom">
<view class="applaysub">提交</view>
<view class="applaysub" bindtap="submit">提交</view>
</view>
\ No newline at end of file
... ...
... ... @@ -8,8 +8,8 @@ page{
}
.ordertaile{
width:206rpx;
height:227rpx;
width:200rpx;
height:256rpx;
border-radius: 10rpx;
background: #fff;
display:flex;
... ... @@ -18,8 +18,8 @@ page{
}
.orderdetailimg{
width:110rpx;
height:147rpx;
width:136rpx;
height:157rpx;
font-size: 0
}
... ... @@ -69,6 +69,7 @@ page{
.ordertailshenqing{
display:flex;
align-items: center;
justify-content: flex-end;
margin-top:23rpx;
}
.sehqningword{
... ... @@ -296,8 +297,10 @@ page{
align-items: center
}
.connectpeoplename{
width:115rpx;
color:#333;
font-size: 28rpx;
text-align: right
}
.realname{
color:#333333;
... ...
... ... @@ -6,26 +6,33 @@ Page({
* 页面的初始数据
*/
data: {
suid:''
suid:'',
withdrawalCash: '',
cashRemain: '',
totalCash: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getmoney()
},
//获取员工可提现总额
getmoney(){
let that = this;
let url = '/Staff/SelectPersonWithdrawByUserId', params = {
suid: that.data.suid,
suid: wx.getStorageSync("Suid"),
//suid: 'A28F3A32-912E-4948-9439-9C985C7D87F6'
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
withdrawalCash: res.withdrawalCash,
cashRemain: res.cashRemain,
totalCash: res.totalCash
})
}).catch((err) => {
... ... @@ -52,9 +59,10 @@ Page({
},
//申请提现
applaytixian(){
applaytixian(e){
let money=e.currentTarget.dataset.money;
wx.navigateTo({
url: "/pages/myinfo/applaywidthdraw/applaywidthdraw",
url: "/pages/myinfo/applaywidthdraw/applaywidthdraw?money="+money,
})
},
/**
... ... @@ -68,7 +76,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getmoney()
},
/**
... ...
... ... @@ -4,7 +4,7 @@
<view class="tixianmoney">可提现金额</view>
<view class="incomemoney">
<view class="incomemoneynum">¥ 30342.32</view>
<view class="incomemoneynum">¥{{totalCash}}</view>
<view class="detailright" bindtap="ketixian">
<view class="detail">明细</view>
... ... @@ -14,7 +14,7 @@
</view>
</view>
<view class="applaymoney" bindtap="applaytixian">申请提现</view>
<view class="applaymoney" bindtap="applaytixian" data-money="{{totalCash}}">申请提现</view>
</view>
</view>
... ... @@ -22,7 +22,7 @@
<view class="incomelist" bindtap="tixiandinish">
<view class="applayincomemoney">已提现金额(元)</view>
<view class="applayincomenum">¥ 1238.32</view>
<view class="applayincomenum">¥{{withdrawalCash}}</view>
<view class="detailincome">
<view class="detail">明细</view>
... ... @@ -35,7 +35,7 @@
<view class="incomelist" bindtap="weisettle">
<view class="applayincomemoney">待结算金额(元)</view>
<view class="applayincomenum">¥ 1238.32</view>
<view class="applayincomenum">¥{{cashRemain}}</view>
<view class="detailincome">
<view class="detail">明细</view>
... ...
// pages/ordercontainer/orderdetail/orderdetail.js
const app=getApp()
Page({
/**
... ... @@ -10,6 +11,15 @@ Page({
phonemode: false,
mobile: '010-4001685',
showcode:false,
statusid:'',
orderno:'',
addressinfo:'',
orderGoodsInfo:'',
orders:'',
drawbill:false,
drawinfo:'',
usertype:'',
isReplaceOrder:''
},
/**
... ... @@ -20,17 +30,79 @@ Page({
if(options.type!=undefined){
this.setData({
type:options.type,
kind:options.kind
kind:options.kind,
orderno:options.orderno,
isReplaceOrder: options.isReplaceOrder
})
}
console.log(this.data.kind)
this.setData({
statusid:options.statusid
})
console.log(this.data.isReplaceOrder);
this.getorderdetail();
this.getfapiao()
},
getorderdetail(){
let that = this;
let url = '/OrderManagement/SelectOrderDetailByOrderNO', params = {
orderNo: that.data.orderno,
}
app.post(url, params).then((res) => {
console.log(res);
that.setData({
addressinfo:res.address,
orderGoodsInfo: res.orderGoodsInfo,
orders: res.orders
})
}).catch((err) => {
})
},
//发票信息
getfapiao(){
let that = this;
let url = '/OrderManagement/SelectInvoiceById', params = {
orderNo:that.data.orderno,
}
app.post(url, params).then((res) => {
console.log(res);
console.log(res.registerPhone)
if (res.rise!=null){
that.setData({
drawbill: true
})
}
that.setData({
drawinfo:res
})
}).catch((err) => {
})
},
//申请售后
aftersell(){
aftersell(e){
let that=this;
let id=e.currentTarget.dataset.id;
let neworderGoodsInfo = that.data.orderGoodsInfo;
console.log(that.data.addressinfo)
wx.setStorageSync('applayaddress', that.data.addressinfo)
for (var obj of neworderGoodsInfo){
if(id==obj.$id){
wx.setStorageSync('applaygood',obj)
}
}
wx.navigateTo({
url: '/pages/ordercontainer/applayaftersell/applayaftersell',
url: '/pages/ordercontainer/applayaftersell/applayaftersell?oederno=' + that.data.orderno + '&addressid=' + that.data.addressinfo.id,
})
},
... ... @@ -77,7 +149,9 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
usertype: wx.getStorageSync("UserType")
})
},
/**
... ...