Skip to content
Permalink
Browse files

上传2.6小程序模板

  • Loading branch information...
LiaoFeiweiaini committed May 16, 2019
1 parent 58f76bc commit 52393844fa5d3f63992529500156a67a18244ca6
Showing 368 changed files with 20,335 additions and 0 deletions.
@@ -0,0 +1,118 @@
//app.js

//请配置请求url
//请修改开发者工具中【详情】->【AppID】改为自己的Appid
//请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret
//请不要修改globalData中的其他配置,如自行开发可不用理会这句话
//配置完以上就可以访问小程序啦
const URL ='http://datong.crmeb.net';

const util = require('utils/util.js');

App({
onLaunch: function (option) {
if (URL==''){
console.error("请配置请求url\n请修改开发者工具中【详情】->【AppID】改为自己的Appid\n请前往后台【小程序】->【小程序配置】填写自己的 appId and AppSecret");
return false;
}
if (option.query.hasOwnProperty('scene') && option.scene == 1047) this.globalData.code = option.query.scene;
if (option.query.hasOwnProperty('scene') && option.scene == 1001) this.globalData.spid = option.query.scene;
this.getMyMenus();
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || [],that=this;
logs.unshift(Date.now())
wx.setStorageSync('logs', logs);
// 获取导航高度;
wx.getSystemInfo({
success: res => {
//导航高度
this.globalData.navHeight = res.statusBarHeight * (750 / res.windowWidth) + 97;
}, fail(err) {
console.log(err);
}
})
},
globalData: {
navHeight: 0,
routineStyle: '#ffffff',
openPages: '',
spid: 0,
code:0,
urlImages: '',
url: URL,
token: '',
isLog:false,
MyMenus:[],
header: {
'content-type': 'application/json',
'token': ''
}
},
/**
*
* 获取个人中心图标
*/
getMyMenus: function () {
var that = this;
if (that.globalData.MyMenus.legnth) return;
that.baseGet(that.U({ c: 'public_api', a: 'get_my_naviga'},that.globalData.url), function (res) {
that.globalData.MyMenus = res.data.routine_my_menus;
});
},
/*
* POST 访问快捷方法
* @param string | object url 访问地址
* @param callable successCallback 成功执行函数
* @param callable errorCallback 失败执行函数
* @param object header 访问header头
*/
basePost: function (url, data, successCallback, errorCallback, header) {
if (header == undefined) header = this.globalData.header;
header['token'] = this.globalData.token;
util.basePost(url, data, successCallback, errorCallback,header);
},
/*
* GET 访问快捷方法
* @param string | object url 访问地址
* @param callable successCallback 成功执行函数
* @param callable errorCallback 失败执行函数
* @param isMsg 错误信息提醒 默认提醒
* @param object header 访问header头
*/
baseGet: function (url, successCallback, errorCallback, isMsg, header) {
if (header == undefined) header = this.globalData.header;
header['token'] = this.globalData.token;
util.baseGet(url, successCallback, errorCallback, isMsg,header);
},
/*
* 信息提示 + 跳转
* @param object opt {title:'提示语',icon:''} | url
* @param object to_url 跳转url 有5种跳转方式 {tab:1-5,url:跳转地址}
*/
Tips: function (opt, to_url) {
return util.Tips(opt, to_url);
},
/*
* 访问Url拼接
* @param object opt {c:'控制器',a:'方法',q:{get参数},p:{parma参数}}
* @param url 接口访问地址
* @return string
*/
U: function (opt,url){
return util.U(opt,url);
},
/**
* 快捷调取助手函数
*/
help:function()
{
return util.$h;
},
/*
* 合并数组
* @param array list 请求返回数据
* @param array sp 原始数组
* @return array
*/
SplitArray: function (list, sp) { return util.SplitArray(list, sp)},
})
@@ -0,0 +1,111 @@
{
"pages": [
"pages/index/index",
"pages/goods_cate/goods_cate",
"pages/quality-recommend/index",
"pages/order_details/index",
"pages/user_sgin/index",
"pages/user/user",
"pages/user_get_coupon/index",
"pages/order_confirm/index",
"pages/goods_list/goods_list",
"pages/user_coupon/index",
"pages/goods_comment_list/index",
"pages/user_goods_collection/index",
"pages/user_address_list/index",
"pages/news_list/index",
"pages/goods_search/index",
"pages/user_vip/index",
"pages/user_spread_money/index",
"pages/user_integral/index",
"pages/user_bill/index",
"pages/user_money/index",
"pages/user_spread_user/index",
"pages/user_sgin_list/index",
"pages/order_list/index",
"pages/goods_details/index",
"pages/news_details/index",
"pages/promoter-list/index",
"pages/promoter-order/index",
"pages/cash-audit/index",
"pages/user_cash/index",
"pages/user_return_list/index",
"pages/user_goods_return/index",
"pages/goods_return/index",
"pages/goods_comment_con/index",
"pages/promotional-items/index",
"pages/first-new-product/index",
"pages/user_spread_code/index",
"pages/cut-poster/index",
"pages/user_info/index",
"pages/order_pay_status/index",
"pages/goods_logistics/index",
"pages/user_address/index",
"pages/order_addcart/order_addcart",
"pages/logs/logs",
"pages/user_payment/index",
"components/navbar/index",
"components/recommend/index",
"components/share-red-packets/index",
"components/orderGoods/index",
"components/swipers/index",
"components/goodList/index",
"components/promotionGood/index",
"components/productConSwiper/index",
"components/userEvaluation/index",
"components/coupon-window/index",
"components/product-window/index",
"components/coupon-list-window/index",
"components/address-window/index",
"components/home/index"
],
"subPackages": [
{
"root": "pages/activity",
"name": "activity",
"pages": [
"goods_seckill_details/index",
"goods_seckill/index"
]
}
],
"window": {
"backgroundTextStyle": "dark",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "WeChat",
"navigationBarTextStyle": "black",
"navigationStyle": "custom"
},
"tabBar": {
"backgroundColor": "#ffffff",
"color": "#282828",
"selectedColor": "#e93323",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "images/1-001.png",
"selectedIconPath": "images/1-002.png",
"text": "首页"
},
{
"pagePath": "pages/goods_cate/goods_cate",
"iconPath": "images/2-001.png",
"selectedIconPath": "images/2-002.png",
"text": "分类"
},
{
"pagePath": "pages/order_addcart/order_addcart",
"iconPath": "images/3-001.png",
"selectedIconPath": "images/3-002.png",
"text": "购物车"
},
{
"pagePath": "pages/user/user",
"iconPath": "images/4-001.png",
"selectedIconPath": "images/4-002.png",
"text": "我的"
}
]
},
"sitemapLocation": "sitemap.json"
}
@@ -0,0 +1,68 @@
/**app.wxss**/
@import '/font/iconfont.wxss';
@import '/css/style.wxss';
@import '/css/animate.wxss';
.start{width: 122rpx; height: 30rpx;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHoAAADMCAYAAAC8yreMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0i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QiaETQiKARQaMMNY1h4tRUDggMk/BqJAck5t4bxzBpMgck5t4bxTDxaiwHJObem8YwcWosByTm3mthmKRMT43mgMTcey0Mk1g5IDH3XhfDJEoOSMy918owiY0DEnPvtTNMYuKAxNx77QyTmDggMffeFIZJFByQmHuvnWHSf34SAQck5t6bwDBJkkg4IDH3XjvDJCYOSMy9N4FhEg0HJObeR56jh5bnGxM/Z6TIfXbeVxKS8b2bDcaxOvR3Z7tFe+2M/6q1Kd5R9Q7DpCXip0QEjQgaETQiaETQiKARQSOCRgRN0IigEUEjgkYEjQgamQhqQDt6L3tEt5IaEHPvhYNuMzUg5t7LHNGtpQbE3HuZoFtLDYi590UFp4/jV977yzmPXXkfcHoy8297790xxlADWkI8gBowYb13oAZAPDj+IT2BGhB975mLMagBk9F73lU31IDIe+/mfEGoAZH3nveIhhoQee95FmNT/nPbDn/OeLh/UbYeW67hVdWnyTwXdL0eO1JwQRPUn95LLsYSqAET0XueczTUgAnoHeJBS8RPiQgaETQiaNRM/S/AAOykxVBJG5QXAAAAAElFTkSuQmCC');background-repeat: no-repeat; background-size: 122rpx auto;}
.start.star5{background-position: 0 3rpx;}
.start.star4{background-position: 0 -30rpx;}
.start.star3{background-position: 0 -70rpx;}
.start.star2{background-position: 0 -105rpx;}
.start.star1{background-position: 0 -140rpx;}
.start.star0{background-position: 0 -175rpx;}
page{font-size:28rpx;background-color: #f5f5f5; color: #333;}
view{box-sizing:border-box;}
.acea-row{display:flex;flex-wrap:wrap;}
.acea-row.row-top{align-items:flex-start;}
.acea-row.row-middle{align-items:center;}
.acea-row.row-bottom{align-items:flex-end;}
.acea-row.row-left{justify-content:flex-start;}
.acea-row.row-center{justify-content:center;}
.acea-row.row-right{justify-content:flex-end;}
.acea-row.row-between{justify-content:space-between;}
.acea-row.row-around{justify-content:space-around;}
.acea-row.row-column{flex-direction:column;}
.acea-row.row-column-between{flex-direction:column;justify-content:space-between;}
.acea-row.row-column-around{flex-direction:column;justify-content:space-around;}
.acea-row.row-center-wrapper{align-items:center;justify-content:center;}
.acea-row.row-between-wrapper{align-items:center;justify-content:space-between;}
.font-color{color:#fc4141!important;}
.bg-color{background-color:#e93323!important;}
.icon-color{color:#ff3c2b;}
.cart-color{color:#ff3700!important;border:1px solid #ff3700!important;}
/* 单选 */
radio .wx-radio-input{border-radius:50%;width:38rpx;height:38rpx;}
radio .wx-radio-input.wx-radio-input-checked{border: 1px solid #e93323 !important;
background-color: #e93323 !important;}
/* 多选 */
checkbox .wx-checkbox-input{border-radius:50%;width:38rpx;height:38rpx;}
checkbox .wx-checkbox-input.wx-checkbox-input-checked{
border: 1px solid #e93323 !important;background-color: #e93323 !important;color:#fff!important;}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {font-size:35rpx;}
.line1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.mask{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:0.5;z-index:5;}
button{padding:0;margin:0;line-height:normal;background-color:#fff;}
button::after{border:0;}
@keyframes load
{
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
.loadingpic {
animation: load 3s linear 1s infinite;
}
.loading-list {
animation: load linear 1s infinite;
font-size:40rpx;margin-right:22rpx;
}
.loading{width:100%;height:100rpx;line-height:100rpx;align-items:center;justify-content:center;position: relative;text-align:center;}
.loading .line{position: absolute;width: 450rpx;left: 150rpx;top: 50rpx;height: 1px;border-top:1px solid #eee ;}
.loading .text{position: relative;display: inline-block;padding: 0 20rpx;background: #fff;z-index: 2;color: #777;}

.loadingicon .loading {animation: load linear 1s infinite;font-size:45rpx;color:#000;}
.loadingicon{width:100%;height:80rpx;}





@@ -0,0 +1,55 @@
var app = getApp();
Component({
properties: {
//跳转url链接
pagesUrl:{
type:String,
value:'',
},
address:{
type: Object,
value:{
address:true,
addressId:0,
}
},
isLog:{
type:Boolean,
value:false,
},
},
data: {
active: 0,
//地址列表
addressList:[],
},
attached: function () {

},
methods: {
tapAddress: function (e) {
this.setData({ active: e.currentTarget.dataset.id });
this.triggerEvent('OnChangeAddress', e.currentTarget.dataset.addressid);
},
close: function () {
this.setData({ 'address.address': false });
this.triggerEvent('changeTextareaStatus');
},
goAddressPages:function(){
this.setData({ 'address.address': false });
this.triggerEvent('changeTextareaStatus');
wx.navigateTo({url: this.data.pagesUrl});
},
getAddressList:function(){
var that=this;
app.baseGet(app.U({ c: "user_api", a:'user_address_list'}),function(res){
var addressList=res.data;
//处理默认选中项
for (var i = 0, leng = addressList.length; i < leng;i++){
if (addressList[i].id == that.data.address.addressId) that.setData({ active:i});
}
that.setData({ addressList: addressList});
});
}
}
})
@@ -0,0 +1,4 @@
{
"usingComponents": {},
"component": true
}
@@ -0,0 +1,17 @@
<view class="address-window {{address.address==true?'on':''}}">
<view class='title'>选择地址<text class='iconfont icon-guanbi' bindtap='close'></text></view>
<view class='list'>
<view class='item acea-row row-between-wrapper {{active==index?"font-color":""}}' wx:for="{{addressList}}" data-id='{{index}}' bindtap='tapAddress' wx:key data-addressId="{{item.id}}">
<text class='iconfont icon-ditu {{active==index?"font-color":""}}'></text>
<view class='address'>
<view class='name {{active==index?"font-color":""}}'>{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
<view class='line1'>{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
</view>
<text class='iconfont icon-complete{{active==index?" font-color":""}}'></text>
</view>
</view>
<!-- 无地址 -->
<!-- <view class='pictrue'><image src='/images/noCoupon.png'></image></view> -->
<view class='addressBnt bg-color' bindtap='goAddressPages'>选择其他地址</view>
</view>
<view class='mask' catchtouchmove="true" hidden='{{address.address==false}}' bindtap='close'></view>
@@ -0,0 +1,15 @@
@import '/app.wxss';
.address-window{background-color:#fff;position:fixed;bottom:0;left:0;width:100%;z-index:101;transform:translate3d(0,100%,0);transition:all .3s cubic-bezier(.25,.5,.5,.9);}
.address-window.on{transform:translate3d(0,0,0);}
.address-window .title{font-size:32rpx;font-weight:bold;text-align:center;height:123rpx;line-height:123rpx;position:relative;}
.address-window .title .iconfont{position:absolute;right:30rpx;color:#8a8a8a;font-size:35rpx;}
.address-window .list .item{margin-left:30rpx;padding-right:30rpx;border-bottom:1px solid #eee;height:129rpx;font-size:25rpx;color:#333;}
.address-window .list .item .iconfont{font-size:37rpx;color:#2c2c2c;}
.address-window .list .item .iconfont.icon-complete{font-size:30rpx;color:#fff;}
.address-window .list .item .address{width:560rpx;}
.address-window .list .item .address .name{font-size:28rpx;font-weight:bold;color:#282828;margin-bottom:4rpx;}
.address-window .list .item .address .name .phone{margin-left:18rpx;}
.address-window .addressBnt{font-size:30rpx;font-weight:bold;color:#fff;width:690rpx;height:86rpx;border-radius:43rpx;text-align:center;line-height:86rpx;margin:85rpx auto;}
.address-window .pictrue{width:414rpx;height:336rpx;margin:0 auto;}
.address-window .pictrue image{width:100%;height:100%;}

0 comments on commit 5239384

Please sign in to comment.
You can’t perform that action at this time.