银花优选微信小程序修改后的最新版本代码

This commit is contained in:
ss001
2026-02-07 16:22:31 +08:00
commit c00caf5744
516 changed files with 41796 additions and 0 deletions

14
.gitignore vendored Normal file
View File

@@ -0,0 +1,14 @@
# Windows
[Dd]esktop.ini
Thumbs.db
$RECYCLE.BIN/
# macOS
.DS_Store
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
# Node.js
node_modules/

206
app.js Normal file
View File

@@ -0,0 +1,206 @@
//app.js
var that=null
App({
onLaunch: function () {
console.log('App Launch')
//调用API从本地缓存中获取数据
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
that=this
},
getUserInfo:function(){
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
if(!userId||!LoginId){
//调用登录接口
that.onLogin()
}else{
var viewid = wx.getStorageSync('viewid')
var viewpoid = wx.getStorageSync('viewpoid')
if(viewid){
wx.removeStorageSync('viewid')
wx.removeStorageSync('viewpoid')
wx.navigateTo({
url: "../details/index?id=" + viewid + (viewpoid?"&poid=" +viewpoid:"")
})
}
var videoid = wx.getStorageSync('videoid0')
if(videoid){
if(videoid!=""){
wx.switchTab({
url: "../myvideo/index"
})
}
}
}
},
onLogin: function () {
wx.login({
success: function (res) {
if (res.code) {
//发起网络请求
var tguid = wx.getStorageSync('tguid');
wx.request({
url: that.globalData.apiurl+'/xapiajax.ashx',
method:"Get",
dataType:"json",
data: {
action:"onLogin",
tguid:(!tguid?"":tguid),
code: res.code
},
success: function(res0) {
if(res0.data.status==1){
wx.setStorageSync('userId', res0.data.userId)
wx.setStorageSync('LoginId', res0.data.LoginId)
wx.removeStorageSync('openid')
wx.removeStorageSync('IFLogin') //是微信登录0还是账号登录1
wx.removeStorageSync('IFYYD')
that.globalData.IFRefreshmy=1
that.globalData.IFRefreshindex=1
that.globalData.IFRefreshshop=1
wx.setStorageSync('userInfo', JSON.stringify(res0.data.userInfo))
if(res0.data.userInfo.uLevel2==2){
wx.setStorageSync('IFagent', 1);
}else{
wx.setStorageSync('IFagent', 0);
}
if(that.globalData.IFwxLogin==1){
that.globalData.IFwxLogin=0
wx.showToast({
title: res0.data.msg,
icon: "none",
duration: 2000
})
var sopenFrame=setInterval(function (){
clearInterval(sopenFrame);
wx.navigateBack({})
}, 1000)
}else{
var viewid = wx.getStorageSync('viewid')
var viewpoid = wx.getStorageSync('viewpoid')
if(viewid){
wx.removeStorageSync('viewid')
wx.removeStorageSync('viewpoid')
wx.navigateTo({
url: "../details/index?id=" + viewid + (viewpoid?"&poid=" +viewpoid:"")
})
}
var videoid = wx.getStorageSync('videoid0')
if(videoid){
if(videoid!=""){
wx.navigateTo({
url: "../myvideo/index"
})
}
}
}
}else{
wx.showToast({
title: res0.data.msg,
icon: "none",
duration: 3000
})
}
}
})
} else {
wx.showToast({
title: '登录失败!' + res.errMsg,
icon: "none",
duration: 3000
})
}
}
})
},
onShow: function () {
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
},isNumber:function (s) {//判断是否是数字
var regu = "^[0-9]+$";
var re = new RegExp(regu);
if (re.test(s)) {
return true;
} else {
return false;
}
},isamount:function(s) {
var fix_amountTest=/^(([1-9]\d*)|\d)(\.\d{1,2})?$/;
if(fix_amountTest.test(s)==false){
return false;
}else{
return true;
}
},isNumberOr_Letter:function(s) {//判断是否是数字或字母
var regu = "^[0-9a-zA-Z]+$";
var re = new RegExp(regu);
if (re.test(s)) {
return true;
} else {
b = false;
}
},changeTwoDecimal_f:function(x) {
var f_x = parseFloat(x);
var f_x = Math.round(x * 100) / 100;
var s_x = f_x.toString();
var pos_decimal = s_x.indexOf('.');
if (pos_decimal < 0) {
pos_decimal = s_x.length;
s_x += '.';
}
while (s_x.length <= pos_decimal + 2) {
s_x += '0';
}
return s_x;
},ccityname: function(value){
if(value){
value=value.replace("市","").replace("自治州","").replace("同治州","").replace("地区","");
}
return value
},replacebody: function(value){
if(value){
value=value.replace("<br>","");
}
return value
},
globalData:{
userInfo:null,
apiurl:"https://g.hnyhua.cn", //https://g.hnyhua.cn
IFRefreshCart:0,
IFRefreshsell:0,
IFRefreshsell0:0,
IFRefreshsell1:0,
IFRefreshmy:0,
IFRefreshindex:0,
IFRefreshshop:0,
IFRefreshordershop0:0,
IFRefreshmypt:0,
IFRefreshmydhm:0,
IFRefreshshangquan:0,
IFRefreshmyaddress:0,
IFRefreshmyagent_products:0,
IFRefreshmyhongbao:0,
IFRefreshmyorder:0,
IFRefreshduihuan:0,
IFRefreshmybalance:0,
IFRefreshzzjf:0,
selladdress:{},
selladdress0:{},
IFYGM:0,
IFwxLogin:0,//是否点击微信一键登录1还是扫码自动登录0
servermsg:""
}
})

120
app.json Normal file
View File

@@ -0,0 +1,120 @@
{
"pages": [
"pages/index/index",
"pages/othershop/index",
"pages/othershop00/index",
"pages/othershop0/index",
"pages/classify/index",
"pages/cart/index",
"pages/sell/index",
"pages/login/index",
"pages/register/index",
"pages/forgetPassword/index",
"pages/my/index",
"pages/mykf/index",
"pages/myincome/index",
"pages/myincome0/index",
"pages/myto/index",
"pages/mydata/index",
"pages/mybankdata/index",
"pages/mypassword/index",
"pages/mypassword2/index",
"pages/myaddress/index",
"pages/myaddress_add/index",
"pages/myorder/index",
"pages/myorder0/index",
"pages/myorderinfo/index",
"pages/myorderwlxx/index",
"pages/myfavorite/index",
"pages/mytgm/index",
"pages/mybalance/index",
"pages/mybonus/index",
"pages/mybonus0/index",
"pages/withdrawal/index",
"pages/zhuanzhang/index",
"pages/zhuanhuan/index",
"pages/shop/index",
"pages/details/index",
"pages/list/index",
"pages/news/index",
"pages/xsxt/index",
"pages/articles/index",
"pages/articledetail/index",
"pages/qhaddress/index",
"pages/myusers/index",
"pages/myskusers/index",
"pages/zzjf/index",
"pages/zzjf_log/index",
"pages/zzjf_qwlog/index",
"pages/kttgy/index",
"pages/appbusiness/index",
"pages/mybusiness/index",
"pages/mybusiness_info/index",
"pages/mybusiness_smlog/index",
"pages/appbusiness0/index",
"pages/mybusiness0/index",
"pages/myproducts/index",
"pages/business/index",
"pages/businessview/index",
"pages/pay/index",
"pages/map/index",
"pages/checkin_log/index",
"pages/detailsPoint/index",
"custom-tab-bar/index",
"wxParse/wxParse"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "银花优选",
"navigationBarBackgroundColor": "#00B050",
"backgroundColor": "#F2f2f2",
"enablePullDownRefresh": true
},
"tabBar": {
"custom": true,
"color": "#6e6d6b",
"selectedColor": "#00B050",
"borderStyle": "white",
"backgroundColor": "#292929",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "images/footer-icon-01.png",
"selectedIconPath": "images/footer-icon-01-active.png",
"text": "首页"
},{
"pagePath": "pages/news/index",
"iconPath": "images/footer-icon-05.png",
"selectedIconPath": "images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "pages/business/index",
"iconPath": "images/footer-icon-02.png",
"selectedIconPath": "images/footer-icon-02-active.png",
"text": "门店"
},
{
"pagePath": "pages/my/index",
"iconPath": "images/footer-icon-04.png",
"selectedIconPath": "images/footer-icon-04-active.png",
"text": "我的"
}
]
},"usingComponents": {
"custom-tab-bar": "custom-tab-bar/index"
},"requiredPrivateInfos": [
"chooseAddress",
"getLocation"
],
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于标注自提地址距离"
}
},
"debug": true,
"sitemapLocation": "sitemap.json"
}

13
app.wxs Normal file
View File

@@ -0,0 +1,13 @@
// 支持es4语法
var filter = {
ccityname: function(value){
if(value){
value=value.replace("市","").replace("自治州","").replace("同治州","").replace("地区","");
}
return value
}
}
// 导出对外暴露的属性
module.exports = {
ccityname: filter.ccityname
}

11
app.wxss Normal file
View File

@@ -0,0 +1,11 @@
.container {
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
}
page {
background-color: #F2f2f2;
}

33
area.js Normal file

File diff suppressed because one or more lines are too long

67
custom-tab-bar/index.js Normal file
View File

@@ -0,0 +1,67 @@
Component({
data: {
selected: 0,
color: "#6e6d6b",
selectedColor: "#00B050",
"list": [
{
"pagePath": "/pages/index/index",
"text": "首页",
"iconPath": "/images/footer-icon-01.png",
"selectedIconPath": "/images/footer-icon-01-active.png"
},
{
"pagePath": "/pages/news/index",
"iconPath": "/images/footer-icon-05.png",
"selectedIconPath": "/images/footer-icon-05-active.png",
"text": "资讯"
},
{
"pagePath": "/pages/business/index",
"iconPath": "/images/footer-icon-02.png",
"selectedIconPath": "/images/footer-icon-02-active.png",
"text": "门店"
},
{
"pagePath": "/pages/my/index",
"text": "我的",
"iconPath": "/images/footer-icon-04.png",
"selectedIconPath": "/images/footer-icon-04-active.png"
}
]
},
attached() {
},
methods: {
switchTab(e) {
var data = e.currentTarget.dataset
var url = data.path
if(data.index==8){
var userId = wx.getStorageSync("userId")
var LoginId = wx.getStorageSync("LoginId")
var userInfodata = wx.getStorageSync("userInfo")
if(userId&&LoginId&&userInfodata){
wx.switchTab({
url: url,
});
this.setData({
selected: data.index
})
}else{
wx.navigateTo({
url: "../login/index"
})
}
}else{
wx.switchTab({
url: url,
});
this.setData({
selected: data.index
})
}
}
}
})

View File

@@ -0,0 +1,3 @@
{
"component":true
}

View File

@@ -0,0 +1,7 @@
<cover-view class="tab-bar">
<cover-view class="tab-bar-border"></cover-view>
<cover-view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab">
<cover-image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></cover-image>
<cover-view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</cover-view>
</cover-view>
</cover-view>

39
custom-tab-bar/index.wxss Normal file
View File

@@ -0,0 +1,39 @@
.tab-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 48px;
background: white;
display: flex;
padding-bottom: env(safe-area-inset-bottom);
background-color: #292929;
}
.tab-bar-border {
background-color: rgba(0, 0, 0, 0.1);
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 1px;
transform: scaleY(0.5);
}
.tab-bar-item {
flex: 1;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.tab-bar-item cover-image {
width: 27px;
height: 27px;
}
.tab-bar-item cover-view {
font-size: 11px;
}

BIN
images/2wm_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
images/Delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

BIN
images/IFIndex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

BIN
images/Pin-Assistor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

BIN
images/QRcode-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

BIN
images/add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

BIN
images/add0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

BIN
images/addandcut0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

BIN
images/addandcut1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

BIN
images/addandcut2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

BIN
images/addandcut3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 305 B

BIN
images/addandcut4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

BIN
images/address-null.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

BIN
images/aixin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

BIN
images/aixin_active.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

BIN
images/ajaxLoader.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/alipay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

BIN
images/arrowleft.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

BIN
images/arrowright.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

BIN
images/bank.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

BIN
images/cart-null.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

BIN
images/cart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
images/cart0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

BIN
images/check.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

BIN
images/checked.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 B

BIN
images/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

BIN
images/copy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

BIN
images/dagou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

BIN
images/dhm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

BIN
images/edit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

BIN
images/emojicons/0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/emojicons/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/100.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
images/emojicons/101.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/102.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
images/emojicons/103.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/104.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
images/emojicons/105.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
images/emojicons/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
images/emojicons/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
images/emojicons/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/25.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/26.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/27.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/emojicons/28.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/29.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/emojicons/30.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/emojicons/31.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/33.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/34.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/35.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/36.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
images/emojicons/37.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
images/emojicons/38.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/emojicons/39.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
images/emojicons/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
images/emojicons/40.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/41.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/42.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
images/emojicons/43.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/44.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
images/emojicons/45.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/46.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
images/emojicons/47.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
images/emojicons/48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/49.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
images/emojicons/50.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/emojicons/51.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/52.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/53.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
images/emojicons/54.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
images/emojicons/55.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
images/emojicons/56.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
images/emojicons/57.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Some files were not shown because too many files have changed in this diff Show More