银花优选微信小程序修改后的最新版本代码
This commit is contained in:
142
pages/mybusiness0/index.js
Normal file
142
pages/mybusiness0/index.js
Normal file
@@ -0,0 +1,142 @@
|
||||
var app = getApp()
|
||||
var that=null
|
||||
var sopenFrame=null
|
||||
var areas = null;
|
||||
Page( {
|
||||
data: {
|
||||
loadingHidden:false,
|
||||
IFDefault:true,
|
||||
loginurl:app.globalData.apiurl+"/gl.aspx?g=0&tt=0000000",
|
||||
userid:"",
|
||||
userpwd:"",
|
||||
userpwd0:"",
|
||||
hkdjye:0,
|
||||
hkjdye:0,
|
||||
hkksye:0,
|
||||
productcount:0,
|
||||
productcount0:0,
|
||||
fhordercount0:0,
|
||||
fhordercount1:0,
|
||||
fhordercount2:0,
|
||||
kdordercount0:0,
|
||||
kdordercount1:0,
|
||||
kdordercount2:0,
|
||||
ztordercount0:0,
|
||||
ztordercount1:0,
|
||||
ztordercount2:0,
|
||||
},
|
||||
onLoad: function() {
|
||||
that = this
|
||||
that.rdata()
|
||||
},rdata: function() {
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
var userInfodata = wx.getStorageSync("userInfo")
|
||||
var userInfo = JSON.parse(userInfodata)
|
||||
wx.request({
|
||||
url: app.globalData.apiurl + "/xapiajax.ashx",
|
||||
data: {
|
||||
action:"getmybusinessdata",
|
||||
userId:(!userId?"":userId),
|
||||
LoginId:(!LoginId?"":LoginId)
|
||||
},
|
||||
method:"GET",
|
||||
dataType:"json",
|
||||
success (res) {
|
||||
if(res.data.status==1){
|
||||
that.setData({
|
||||
userid:res.data.zh,
|
||||
userpwd:res.data.mm,
|
||||
userpwd:res.data.mm,
|
||||
hkdjye:res.data.userInfo.hkdjye,
|
||||
hkjdye:res.data.userInfo.hkjdye,
|
||||
hkksye:res.data.userInfo.hkksye,
|
||||
productcount:res.data.productcount,
|
||||
productcount0:res.data.productcount0,
|
||||
fhordercount0:res.data.fhordercount0,
|
||||
fhordercount1:res.data.fhordercount1,
|
||||
fhordercount2:res.data.fhordercount2,
|
||||
kdordercount0:res.data.kdordercount0,
|
||||
kdordercount1:res.data.kdordercount1,
|
||||
kdordercount2:res.data.kdordercount2,
|
||||
ztordercount0:res.data.ztordercount0,
|
||||
ztordercount1:res.data.ztordercount1,
|
||||
ztordercount2:res.data.ztordercount2,
|
||||
loadingHidden:true
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
},changeisDefault:function(e) {
|
||||
var ifdefault = e.detail.value
|
||||
that.setData({
|
||||
IFDefault:ifdefault
|
||||
})
|
||||
},oncopy0:function(e) {
|
||||
var font = e.currentTarget.dataset.id
|
||||
wx.setClipboardData({
|
||||
data: font,
|
||||
success: function (res) {
|
||||
wx.showToast({
|
||||
title: "复制成功"
|
||||
})
|
||||
}
|
||||
})
|
||||
},onlog:function(e) {
|
||||
var id = e.currentTarget.dataset.id
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
var userInfodata = wx.getStorageSync("userInfo")
|
||||
var ifdl=true;
|
||||
if(!userId||!LoginId){
|
||||
ifdl=false;
|
||||
wx.navigateTo({
|
||||
url: "../login/index"
|
||||
})
|
||||
}
|
||||
if(ifdl){
|
||||
var t = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: "../mybalance/index?t=" + t
|
||||
})
|
||||
}
|
||||
},onproduct:function(e) {
|
||||
var id = e.currentTarget.dataset.id
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
var userInfodata = wx.getStorageSync("userInfo")
|
||||
var ifdl=true;
|
||||
if(!userId||!LoginId){
|
||||
ifdl=false;
|
||||
wx.navigateTo({
|
||||
url: "../login/index"
|
||||
})
|
||||
}
|
||||
if(ifdl){
|
||||
var t = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: "../myproducts/index?t=" + t
|
||||
})
|
||||
}
|
||||
},onorders:function(e) {
|
||||
var id = e.currentTarget.dataset.id
|
||||
var userId = wx.getStorageSync("userId")
|
||||
var LoginId = wx.getStorageSync("LoginId")
|
||||
var userInfodata = wx.getStorageSync("userInfo")
|
||||
var ifdl=true;
|
||||
if(!userId||!LoginId){
|
||||
ifdl=false;
|
||||
wx.navigateTo({
|
||||
url: "../login/index"
|
||||
})
|
||||
}
|
||||
if(ifdl){
|
||||
var index = e.currentTarget.dataset.index
|
||||
var id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: "../myorder0/index?t=" + index + "&nav=" + id
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
3
pages/mybusiness0/index.json
Normal file
3
pages/mybusiness0/index.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "事业部管理"
|
||||
}
|
||||
161
pages/mybusiness0/index.wxml
Normal file
161
pages/mybusiness0/index.wxml
Normal file
@@ -0,0 +1,161 @@
|
||||
<view class="container">
|
||||
<view class="login_box">
|
||||
<view class="mybusiness_title">商品管理后台网址和账号<view class="close">
|
||||
<switch checked='{{IFDefault}}' color="#00B050" bindchange="changeisDefault"></switch>
|
||||
</view></view>
|
||||
<view class="login_box_to" wx:if="{{IFDefault}}">
|
||||
|
||||
<view class="login_item">
|
||||
<view class="item_title">
|
||||
登录网址
|
||||
</view>
|
||||
<view class="item_box">
|
||||
<textarea id="txturl">{{loginurl}}</textarea>
|
||||
</view>
|
||||
<view class="copy">
|
||||
<image src="../../images/copy.png" bindtap="oncopy0" data-id="{{loginurl}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_item">
|
||||
<view class="item_title">
|
||||
登录账号
|
||||
</view>
|
||||
<view class="item_box">
|
||||
<input type="text" name="txtuserid" value="{{userid}}" />
|
||||
</view>
|
||||
<view class="copy">
|
||||
<image src="../../images/copy.png" bindtap="oncopy0" data-id="{{userid}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_item">
|
||||
<view class="item_title">
|
||||
登录密码
|
||||
</view>
|
||||
<view class="item_box">
|
||||
<input type="text" name="txtuserpwd" value="{{userpwd}}" />
|
||||
</view>
|
||||
<view class="copy">
|
||||
<image src="../../images/copy.png" bindtap="oncopy0 "data-id="{{userpwd}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_item" >
|
||||
<view class="item_title">
|
||||
二级密码
|
||||
</view>
|
||||
<view class="item_box">
|
||||
<input type="text" name="txtuserpwd0" value="{{userpwd0}}" />
|
||||
</view>
|
||||
<view class="copy">
|
||||
<image src="../../images/copy.png" bindtap="oncopy0" data-id="{{userpwd0}}" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="login_box" style=" margin-top:0.8em;">
|
||||
<view class="mybusiness_title">我的货款</view>
|
||||
<view class="mydata_box0 jfbox" style="border-radius:0;">
|
||||
<view id="djhkye">
|
||||
<view bindtap="onlog" data-id="16">
|
||||
<text>冻结货款</text>
|
||||
<text class="je" id="hkdjye_box">{{hkdjye}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view id="jdhkye">
|
||||
<view bindtap="onlog" data-id="17">
|
||||
<text>解冻货款</text>
|
||||
<text class="je" id="hkjdye_box">{{hkjdye}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view id="hkksye">
|
||||
<view bindtap="onlog" data-id="18">
|
||||
<text>货款扣税</text>
|
||||
<text class="je" id="hkksye_box">{{hkksye}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_box" style=" margin-top:0.8em">
|
||||
<view class="mybusiness_title">商品管理<view class="close" bindtap="onproduct" data-id="0">全部商品</view></view>
|
||||
<view class="mydata_box0 orderbox">
|
||||
<view bindtap="onproduct" data-id="1">
|
||||
|
||||
<text>已上架</text>
|
||||
<text>{{productcount}}</text>
|
||||
</view>
|
||||
<view bindtap="onproduct" data-id="2">
|
||||
|
||||
<text>未上架</text>
|
||||
<text>{{productcount0}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_box" style=" margin-top:0.8em">
|
||||
<view class="mybusiness_title">发货订单<view class="close" bindtap="onorders" data-index="1" data-id="0">全部订单</view></view>
|
||||
<view class="mydata_box0 orderbox">
|
||||
|
||||
<view bindtap="onorders" data-index="1" data-id="1">
|
||||
<text>待发货</text>
|
||||
<text>{{fhordercount0}}</text>
|
||||
</view>
|
||||
<view bindtap="onorders" data-index="1" data-id="2">
|
||||
|
||||
<text>待收货</text>
|
||||
<text>{{fhordercount1}}</text>
|
||||
</view>
|
||||
<view bindtap="onorders" data-index="1" data-id="3">
|
||||
|
||||
<text>已完成</text>
|
||||
<text>{{fhordercount2}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_box" style=" margin-top:0.8em">
|
||||
<view class="mybusiness_title">快递订单<view class="close" bindtap="onorders" data-index="2" data-id="0">全部订单</view></view>
|
||||
<view class="mydata_box0 orderbox">
|
||||
|
||||
<view bindtap="onorders" data-index="2" data-id="1">
|
||||
|
||||
<text>待发货</text>
|
||||
<text>{{kdordercount0}}</text>
|
||||
</view>
|
||||
<view bindtap="onorders" data-index="2" data-id="2">
|
||||
|
||||
<text>待收货</text>
|
||||
<text>{{kdordercount1}}</text>
|
||||
</view>
|
||||
<view bindtap="onorders" data-index="2" data-id="3">
|
||||
|
||||
<text>已完成</text>
|
||||
<text>{{kdordercount2}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="login_box" style=" margin-top:0.8em">
|
||||
<view class="mybusiness_title">自提订单<view class="close" bindtap="onorders" data-index="3" data-id="0">全部订单</view></view>
|
||||
<view class="mydata_box0 orderbox">
|
||||
|
||||
<view bindtap="onorders" data-index="3" data-id="1">
|
||||
|
||||
<text>待发货</text>
|
||||
<text>{{ztordercount0}}</text>
|
||||
</view>
|
||||
<view bindtap="onorders" data-index="3" data-id="2">
|
||||
|
||||
<text>待收货</text>
|
||||
<text>{{ztordercount1}}</text>
|
||||
</view>
|
||||
<view bindtap="onorders" data-index="3" data-id="3">
|
||||
<text>已完成</text>
|
||||
<text>{{ztordercount2}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<loading hidden="{{loadingHidden}}">
|
||||
加载中...
|
||||
</loading>
|
||||
140
pages/mybusiness0/index.wxss
Normal file
140
pages/mybusiness0/index.wxss
Normal file
@@ -0,0 +1,140 @@
|
||||
page{
|
||||
background: #ccc;
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-flex-flow: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0.8em;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
.login_box{
|
||||
background-color: #fff; border-radius:0.5em; overflow: hidden; box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mybusiness_title{
|
||||
width: 100%;
|
||||
height: 3.5em;
|
||||
line-height: 3.5em;
|
||||
padding: 0 0.8em;
|
||||
font-weight: 900;
|
||||
background-color: #00B050;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
}
|
||||
.mybusiness_title .close{
|
||||
float: right;
|
||||
width: auto;
|
||||
}
|
||||
.mybusiness_title .close .wx-switch-input{
|
||||
background:#ff4d00 !important;
|
||||
border: #ff4d00 !important;
|
||||
}
|
||||
.login_box_to{
|
||||
padding: 0.8em;
|
||||
padding-bottom: 0.4em;
|
||||
}
|
||||
.login_item{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
.login_item .item_title{
|
||||
width: 5em;
|
||||
}
|
||||
.login_item .item_box{
|
||||
flex-grow: 1;
|
||||
width: 80%;
|
||||
}
|
||||
.login_item .item_box textarea{
|
||||
width: 100%; height:3em; padding: 0.2em; line-height: 1.2em; text-align: center;background-color: #e1e1e1;border:1px solid #DfDfDf; border-radius: 0.4em; box-sizing: border-box;word-break: break-all;
|
||||
}
|
||||
.login_item .item_box input{
|
||||
width: 100%; height:2.2em;padding: 0.2em; line-height:2.2em; text-align: center;background-color: #e1e1e1;border:1px solid #DfDfDf; border-radius: 0.4em; box-sizing: border-box;
|
||||
}
|
||||
.login_item .copy{
|
||||
margin-top: 0.4em;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
}
|
||||
.login_item .copy image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.mydata_box0 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.mydata_box0 view{
|
||||
width: 33.33333333333%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.mydata_box0.logbox {
|
||||
border-top: 1px solid #00B050;
|
||||
}
|
||||
.mydata_box0.logbox view {
|
||||
height: 3em;
|
||||
}
|
||||
|
||||
.mydata_box0 view.umoney1 {
|
||||
border-right: 1px solid #0835AF;
|
||||
color: #E1FFFF;
|
||||
}
|
||||
.mydata_box0 view.umoney1.end {
|
||||
border-right: 0;
|
||||
}
|
||||
.mydata_box0 view.umoney1 text.num {
|
||||
color: #E1FFFF;
|
||||
}
|
||||
.mydata_box0 view image {
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
}
|
||||
.mydata_box0 view view{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
.mydata_box0.jfbox {
|
||||
height: 4em;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.mydata_box0.jfbox view {
|
||||
height: 4em;
|
||||
width: 33.333333333333333332%;
|
||||
}
|
||||
|
||||
.mydata_box0.jfbox view view {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mydata_box0.orderbox view {
|
||||
width: 33.333333333333333332%;
|
||||
height: 4em;
|
||||
}
|
||||
|
||||
.mydata_box0.orderbox view view.order_yuan {
|
||||
font-size: 1em;
|
||||
}
|
||||
.mydata_box0.orderbox view image {
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
}
|
||||
.nodata{padding-top:1em; text-align: center; line-height: 1.5em; color:#939393;}
|
||||
.nodata image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
Reference in New Issue
Block a user