"vscode:/vscode.git/clone" did not exist on "70a751a80a858f75d6d1ac567aa2d047b317f6d0"
Commit 64f04a10 authored by Junling Bu's avatar Junling Bu
Browse files

chore[litemall-core]: 调整代码

parent 3759c910
# 阿里云对象存储配置信息 # 阿里云对象存储配置信息
aliyun.os.ENDPOINT=oss-cn-shenzhen.aliyuncs.com aliyun.os.ENDPOINT=oss-cn-shenzhen.aliyuncs.com
aliyun.os.ACCESS_KEY_ID= aliyun.os.ACCESS_KEY_ID=
aliyun.os.ACCESS_KEY_SECRET= aliyun.os.ACCESS_KEY_SECRET=
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"pages/ucenter/coupon/coupon", "pages/ucenter/coupon/coupon",
"pages/ucenter/collect/collect", "pages/ucenter/collect/collect",
"pages/auth/login/login", "pages/auth/login/login",
"pages/auth/accountLogin/accountLogin", "pages/auth/accountLogin/accountLogin",
"pages/auth/register/register", "pages/auth/register/register",
"pages/auth/reset/reset", "pages/auth/reset/reset",
"pages/payResult/payResult", "pages/payResult/payResult",
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
"pages/shopping/address/address", "pages/shopping/address/address",
"pages/shopping/addressAdd/addressAdd", "pages/shopping/addressAdd/addressAdd",
"pages/goods/goods", "pages/goods/goods",
"pages/about/index" "pages/about/about"
], ],
"window": { "window": {
"navigationBarTitleText": "litemall小程序商城", "navigationBarTitleText": "litemall小程序商城",
......
// index.js // about.js
var app = getApp() var app = getApp()
var util = require("../../utils/util.js"); var util = require("../../utils/util.js");
...@@ -14,9 +14,9 @@ Page({ ...@@ -14,9 +14,9 @@ Page({
shopInfo: { shopInfo: {
name: 'litemall', name: 'litemall',
address: 'https://github.com/linlinjava/litemall', address: 'https://github.com/linlinjava/litemall',
latitude: 22.60, latitude: 31.201900,
longitude: 116.87, longitude: 121.587839,
linkPhone: '0755-xxxx-xxxx', linkPhone: '021-xxxx-xxxx',
qqNumber: '738696120' qqNumber: '738696120'
}, },
}, },
......
/* index.wxss */ /* about.wxss */
page{ page{
height: 100%; height: 100%;
......
...@@ -24,12 +24,14 @@ Page({ ...@@ -24,12 +24,14 @@ Page({
openAttr: false, openAttr: false,
noCollectImage: '/static/images/icon_collect.png', noCollectImage: '/static/images/icon_collect.png',
hasCollectImage: '/static/images/icon_collect_checked.png', hasCollectImage: '/static/images/icon_collect_checked.png',
collectBackImage: '/static/images/icon_collect.png', collectImage: '/static/images/icon_collect.png',
soldout: false soldout: false
}, },
getGoodsInfo: function () { getGoodsInfo: function() {
let that = this; let that = this;
util.request(api.GoodsDetail, { id: that.data.id }).then(function (res) { util.request(api.GoodsDetail, {
id: that.data.id
}).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
let _specificationList = res.data.specificationList let _specificationList = res.data.specificationList
...@@ -67,11 +69,11 @@ Page({ ...@@ -67,11 +69,11 @@ Page({
if (res.data.userHasCollect == 1) { if (res.data.userHasCollect == 1) {
that.setData({ that.setData({
collectBackImage: that.data.hasCollectImage collectImage: that.data.hasCollectImage
}); });
} else { } else {
that.setData({ that.setData({
collectBackImage: that.data.noCollectImage collectImage: that.data.noCollectImage
}); });
} }
...@@ -82,9 +84,11 @@ Page({ ...@@ -82,9 +84,11 @@ Page({
}); });
}, },
getGoodsRelated: function () { getGoodsRelated: function() {
let that = this; let that = this;
util.request(api.GoodsRelated, { id: that.data.id }).then(function (res) { util.request(api.GoodsRelated, {
id: that.data.id
}).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
that.setData({ that.setData({
relatedGoods: res.data.goodsList, relatedGoods: res.data.goodsList,
...@@ -93,7 +97,7 @@ Page({ ...@@ -93,7 +97,7 @@ Page({
}); });
}, },
clickSkuValue: function (event) { clickSkuValue: function(event) {
let that = this; let that = this;
let specName = event.currentTarget.dataset.name; let specName = event.currentTarget.dataset.name;
let specValueId = event.currentTarget.dataset.valueId; let specValueId = event.currentTarget.dataset.valueId;
...@@ -127,7 +131,7 @@ Page({ ...@@ -127,7 +131,7 @@ Page({
//重新计算哪些值不可以点击 //重新计算哪些值不可以点击
}, },
//获取选中的规格信息 //获取选中的规格信息
getCheckedSpecValue: function () { getCheckedSpecValue: function() {
let checkedValues = []; let checkedValues = [];
let _specificationList = this.data.specificationList; let _specificationList = this.data.specificationList;
for (let i = 0; i < _specificationList.length; i++) { for (let i = 0; i < _specificationList.length; i++) {
...@@ -148,35 +152,35 @@ Page({ ...@@ -148,35 +152,35 @@ Page({
return checkedValues; return checkedValues;
}, },
//根据已选的值,计算其它值的状态 //根据已选的值,计算其它值的状态
setSpecValueStatus: function () { setSpecValueStatus: function() {
}, },
//判断规格是否选择完整 //判断规格是否选择完整
isCheckedAllSpec: function () { isCheckedAllSpec: function() {
return !this.getCheckedSpecValue().some(function (v) { return !this.getCheckedSpecValue().some(function(v) {
if (v.valueId == 0) { if (v.valueId == 0) {
return true; return true;
} }
}); });
}, },
getCheckedSpecKey: function () { getCheckedSpecKey: function() {
let checkedValue = this.getCheckedSpecValue().map(function (v) { let checkedValue = this.getCheckedSpecValue().map(function(v) {
return v.valueText; return v.valueText;
}); });
return checkedValue; return checkedValue;
}, },
changeSpecInfo: function () { changeSpecInfo: function() {
let checkedNameValue = this.getCheckedSpecValue(); let checkedNameValue = this.getCheckedSpecValue();
//设置选择的信息 //设置选择的信息
let checkedValue = checkedNameValue.filter(function (v) { let checkedValue = checkedNameValue.filter(function(v) {
if (v.valueId != 0) { if (v.valueId != 0) {
return true; return true;
} else { } else {
return false; return false;
} }
}).map(function (v) { }).map(function(v) {
return v.valueText; return v.valueText;
}); });
if (checkedValue.length > 0) { if (checkedValue.length > 0) {
...@@ -211,16 +215,14 @@ Page({ ...@@ -211,16 +215,14 @@ Page({
checkedSpecPrice: checkedProduct.price, checkedSpecPrice: checkedProduct.price,
soldout: false soldout: false
}); });
} } else {
else {
this.setData({ this.setData({
checkedSpecPrice: this.data.goods.retailPrice, checkedSpecPrice: this.data.goods.retailPrice,
soldout: true soldout: true
}); });
} }
} } else {
else {
this.setData({ this.setData({
checkedSpecText: '规格数量选择', checkedSpecText: '规格数量选择',
checkedSpecPrice: this.data.goods.retailPrice, checkedSpecPrice: this.data.goods.retailPrice,
...@@ -229,8 +231,8 @@ Page({ ...@@ -229,8 +231,8 @@ Page({
} }
}, },
getCheckedProductItem: function (key) { getCheckedProductItem: function(key) {
return this.data.productList.filter(function (v) { return this.data.productList.filter(function(v) {
if (v.specifications.toString() == key.toString()) { if (v.specifications.toString() == key.toString()) {
return true; return true;
} else { } else {
...@@ -238,21 +240,21 @@ Page({ ...@@ -238,21 +240,21 @@ Page({
} }
}); });
}, },
onLoad: function (options) { onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
this.setData({ this.setData({
id: parseInt(options.id) id: parseInt(options.id)
}); });
this.getGoodsInfo(); this.getGoodsInfo();
}, },
onReady: function () { onReady: function() {
// 页面渲染完成 // 页面渲染完成
}, },
onShow: function () { onShow: function() {
// 页面显示 // 页面显示
var that = this; var that = this;
util.request(api.CartGoodsCount).then(function (res) { util.request(api.CartGoodsCount).then(function(res) {
if (res.errno === 0) { if (res.errno === 0) {
that.setData({ that.setData({
cartGoodsCount: res.data cartGoodsCount: res.data
...@@ -260,79 +262,68 @@ Page({ ...@@ -260,79 +262,68 @@ Page({
} }
}); });
}, },
onHide: function () { onHide: function() {
// 页面隐藏 // 页面隐藏
}, },
onUnload: function () { onUnload: function() {
// 页面关闭 // 页面关闭
}, },
switchAttrPop: function () { switchAttrPop: function() {
if (this.data.openAttr == false) { if (this.data.openAttr == false) {
this.setData({ this.setData({
openAttr: !this.data.openAttr, openAttr: !this.data.openAttr
collectBackImage: '/static/images/detail_back.png'
}); });
} }
}, },
closeAttr: function () { closeAttr: function() {
this.setData({ this.setData({
openAttr: false, openAttr: false,
}); });
}, },
addCollectOrNot: function () { addCollectOrNot: function() {
let that = this; let that = this;
// if (this.data.openAttr) { //添加或是取消收藏
// this.setData({ util.request(api.CollectAddOrDelete, {
// openAttr: false, type: 0,
// }); valueId: this.data.id
// if (that.data.userHasCollect == 1) { }, "POST")
// that.setData({ .then(function(res) {
// collectBackImage: that.data.hasCollectImage let _res = res;
// }); if (_res.errno == 0) {
// } else { if (_res.data.type == 'add') {
// that.setData({ that.setData({
// collectBackImage: that.data.noCollectImage collectImage: that.data.hasCollectImage
// }); });
// }
// } else {
//添加或是取消收藏
util.request(api.CollectAddOrDelete, { type: 0, valueId: this.data.id }, "POST")
.then(function (res) {
let _res = res;
if (_res.errno == 0) {
if (_res.data.type == 'add') {
that.setData({
collectBackImage: that.data.hasCollectImage
});
} else {
that.setData({
collectBackImage: that.data.noCollectImage
});
}
} else { } else {
wx.showToast({ that.setData({
image: '/static/images/icon_error.png', collectImage: that.data.noCollectImage
title: _res.errmsg,
mask: true
}); });
} }
}); } else {
wx.showToast({
image: '/static/images/icon_error.png',
title: _res.errmsg,
mask: true
});
}
});
}, },
openCartPage: function () { openCartPage: function() {
wx.switchTab({ url: '/pages/cart/cart' }); wx.switchTab({
url: '/pages/cart/cart'
});
}, },
addFast: function () { addFast: function() {
var that = this; var that = this;
if (this.data.openAttr == false) { if (this.data.openAttr == false) {
//打开规格选择窗口 //打开规格选择窗口
this.setData({ this.setData({
openAttr: !this.data.openAttr, openAttr: !this.data.openAttr
collectBackImage: '/static/images/detail_back.png'
}); });
} else { } else {
...@@ -367,8 +358,12 @@ Page({ ...@@ -367,8 +358,12 @@ Page({
} }
//立即购买 //立即购买
util.request(api.CartFastAdd, { goodsId: this.data.goods.id, number: this.data.number, productId: checkedProduct.id }, "POST") util.request(api.CartFastAdd, {
.then(function (res) { goodsId: this.data.goods.id,
number: this.data.number,
productId: checkedProduct.id
}, "POST")
.then(function(res) {
if (res.errno == 0) { if (res.errno == 0) {
// 如果storage中设置了cartId,则是立即购买,否则是购物车购买 // 如果storage中设置了cartId,则是立即购买,否则是购物车购买
...@@ -377,8 +372,7 @@ Page({ ...@@ -377,8 +372,7 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: '/pages/shopping/checkout/checkout' url: '/pages/shopping/checkout/checkout'
}) })
} catch (e) { } catch (e) {}
}
} else { } else {
wx.showToast({ wx.showToast({
...@@ -392,13 +386,12 @@ Page({ ...@@ -392,13 +386,12 @@ Page({
}, },
addToCart: function () { addToCart: function() {
var that = this; var that = this;
if (this.data.openAttr == false) { if (this.data.openAttr == false) {
//打开规格选择窗口 //打开规格选择窗口
this.setData({ this.setData({
openAttr: !this.data.openAttr, openAttr: !this.data.openAttr
// collectBackImage: '/static/images/detail_back.png'
}); });
} else { } else {
...@@ -433,8 +426,12 @@ Page({ ...@@ -433,8 +426,12 @@ Page({
} }
//添加到购物车 //添加到购物车
util.request(api.CartAdd, { goodsId: this.data.goods.id, number: this.data.number, productId: checkedProduct.id }, "POST") util.request(api.CartAdd, {
.then(function (res) { goodsId: this.data.goods.id,
number: this.data.number,
productId: checkedProduct.id
}, "POST")
.then(function(res) {
let _res = res; let _res = res;
if (_res.errno == 0) { if (_res.errno == 0) {
wx.showToast({ wx.showToast({
...@@ -446,11 +443,11 @@ Page({ ...@@ -446,11 +443,11 @@ Page({
}); });
if (that.data.userHasCollect == 1) { if (that.data.userHasCollect == 1) {
that.setData({ that.setData({
collectBackImage: that.data.hasCollectImage collectImage: that.data.hasCollectImage
}); });
} else { } else {
that.setData({ that.setData({
collectBackImage: that.data.noCollectImage collectImage: that.data.noCollectImage
}); });
} }
} else { } else {
...@@ -465,12 +462,12 @@ Page({ ...@@ -465,12 +462,12 @@ Page({
} }
}, },
cutNumber: function () { cutNumber: function() {
this.setData({ this.setData({
number: (this.data.number - 1 > 1) ? this.data.number - 1 : 1 number: (this.data.number - 1 > 1) ? this.data.number - 1 : 1
}); });
}, },
addNumber: function () { addNumber: function() {
this.setData({ this.setData({
number: this.data.number + 1 number: this.data.number + 1
}); });
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<view class="info"> <view class="info">
<view class="c"> <view class="c">
<view class="p">价格:¥{{checkedSpecPrice}}</view> <view class="p">价格:¥{{checkedSpecPrice}}</view>
<view class="a" wx:if="{{productList.length>0}}">已选择:{{checkedSpecText}}</view> <view class="a">{{tmpSpecText}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<view class="spec-item" wx:for="{{specificationList}}" wx:key="name"> <view class="spec-item" wx:for="{{specificationList}}" wx:key="name">
<view class="name">{{item.name}}</view> <view class="name">{{item.name}}</view>
<view class="values"> <view class="values">
<view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name-id="{{vitem.specification}}">{{vitem.value}}</view> <view class="value {{vitem.checked ? 'selected' : ''}}" bindtap="clickSkuValue" wx:for="{{item.valueList}}" wx:for-item="vitem" wx:key="{{vitem.id}}" data-value-id="{{vitem.id}}" data-name="{{vitem.specification}}">{{vitem.value}}</view>
</view> </view>
</view> </view>
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
</view> </view>
<view class="bottom-btn"> <view class="bottom-btn">
<view class="l l-collect" bindtap="addCollectOrNot"> <view class="l l-collect" bindtap="addCollectOrNot">
<image class="icon" src="{{ collectBackImage }}"></image> <image class="icon" src="{{ collectImage }}"></image>
</view> </view>
<view class="l l-cart"> <view class="l l-cart">
<view class="box"> <view class="box">
......
...@@ -524,9 +524,10 @@ ...@@ -524,9 +524,10 @@
text-align: center; text-align: center;
width: 90rpx; width: 90rpx;
} }
.bottom-btn .l.l-kefu { .bottom-btn .l.l-kefu {
position: relative; position: relative;
height:54rpx; height: 54rpx;
width: 63rpx; width: 63rpx;
} }
...@@ -534,7 +535,6 @@ ...@@ -534,7 +535,6 @@
position: relative; position: relative;
height: 60rpx; height: 60rpx;
width: 60rpx; width: 60rpx;
} }
.bottom-btn .l.l-cart .cart-count { .bottom-btn .l.l-cart .cart-count {
...@@ -572,7 +572,8 @@ ...@@ -572,7 +572,8 @@
line-height: 28rpx; line-height: 28rpx;
border-radius: 50%; border-radius: 50%;
} }
.bottom-btn .l.l-kefu .icon{
.bottom-btn .l.l-kefu .icon {
position: absolute; position: absolute;
top: 10rpx; top: 10rpx;
left: 0; left: 0;
...@@ -584,36 +585,34 @@ ...@@ -584,36 +585,34 @@
width: 44rpx; width: 44rpx;
} }
.bottom-btn .c{ .bottom-btn .c {
float: left; float: left;
background: #f48f18; background: #f48f18;
height: 100rpx; height: 100rpx;
line-height: 96rpx; line-height: 96rpx;
flex: 1; flex: 1;
text-align: center; text-align: center;
color: #fff; color: #fff;
/* border-top: 2px solid #f4f4f4; */ /* border-top: 2px solid #f4f4f4; *//* border-bottom: 2px solid #f4f4f4; */
/* border-bottom: 2px solid #f4f4f4; */
} }
.bottom-btn .r{ .bottom-btn .r {
border:1px solid #b4282d; border: 1px solid #b4282d;
background: #b4282d; background: #b4282d;
float: left; float: left;
height: 100rpx; height: 100rpx;
line-height: 96rpx; line-height: 96rpx;
flex: 1; flex: 1;
text-align: center; text-align: center;
color: #fff; color: #fff;
} }
@import "../../lib/wxParse/wxParse.wxss"; @import "../../lib/wxParse/wxParse.wxss";
.attr-pop-box { .attr-pop-box {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
background: rgba(0, 0, 0, .5); background: rgba(0, 0, 0, 0.5);
z-index: 8; z-index: 8;
bottom: 0; bottom: 0;
/* display: none; */ /* display: none; */
...@@ -754,48 +753,32 @@ ...@@ -754,48 +753,32 @@
line-height: 65rpx; line-height: 65rpx;
} }
.contact{ .contact {
height: 100rpx;
height: 100rpx; width: 100rpx;
background-color: #008000;
width: 100rpx; border-radius: 100%;
position: fixed;
background-color: #008000; bottom: 150rpx;
right: 20rpx;
border-radius: 100%; display: flex;
align-items: center;
position: fixed; justify-content: center;
z-index: 9;
bottom: 150rpx;
right: 20rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 9;
flex-direction: column; flex-direction: column;
/*line-height: 100rpx; /*line-height: 100rpx;
text-align: center; text-align: center;
padding-top: 26rpx;*/ padding-top: 26rpx;*/
font-size: 20rpx; font-size: 20rpx;
color: #008000; color: #008000;
box-sizing: border-box; box-sizing: border-box;
background: url("https://litemall.oss-cn-shenzhen.aliyuncs.com/kefu.png") no-repeat center 21rpx; background: url("https://litemall.oss-cn-shenzhen.aliyuncs.com/kefu.png") no-repeat center 21rpx;
background-size: 55rpx auto; background-size: 55rpx auto;
} }
.contact .name{ .contact .name {
font-size: 32rpx;
font-size: 32rpx; max-width: 80rpx;
color: #fff;
max-width: 80rpx; text-align: center;
color: #fff;
text-align: center;
} }
...@@ -16,8 +16,8 @@ Page({ ...@@ -16,8 +16,8 @@ Page({
}, },
onShareAppMessage: function () { onShareAppMessage: function () {
return { return {
title: 'litemall小商场', title: 'litemall小程序商场',
desc: '仿网易严选微信小程序商城', desc: '开源微信小程序商城',
path: '/pages/index/index' path: '/pages/index/index'
} }
}, },
......
...@@ -10,16 +10,16 @@ Page({ ...@@ -10,16 +10,16 @@ Page({
avatarUrl: 'http://yanxuan.nosdn.127.net/8945ae63d940cc42406c3f67019c5cb6.png' avatarUrl: 'http://yanxuan.nosdn.127.net/8945ae63d940cc42406c3f67019c5cb6.png'
} }
}, },
onLoad: function (options) { onLoad: function(options) {
// 页面初始化 options为页面跳转所带来的参数 // 页面初始化 options为页面跳转所带来的参数
}, },
onReady: function () { onReady: function() {
}, },
onShow: function () { onShow: function() {
//获取用户的登录信息 //获取用户的登录信息
if (app.globalData.hasLogin){ if (app.globalData.hasLogin) {
let userInfo = wx.getStorageSync('userInfo'); let userInfo = wx.getStorageSync('userInfo');
this.setData({ this.setData({
userInfo: userInfo, userInfo: userInfo,
...@@ -27,82 +27,87 @@ Page({ ...@@ -27,82 +27,87 @@ Page({
} }
}, },
onHide: function () { onHide: function() {
// 页面隐藏 // 页面隐藏
}, },
onUnload: function () { onUnload: function() {
// 页面关闭 // 页面关闭
}, },
goLogin(){ goLogin() {
if (!app.globalData.hasLogin) { if (!app.globalData.hasLogin) {
wx.navigateTo({ url: "/pages/auth/login/login" }); wx.navigateTo({
url: "/pages/auth/login/login"
});
} }
}, },
goOrder() { goOrder() {
if (app.globalData.hasLogin) { if (app.globalData.hasLogin) {
wx.navigateTo({ url: "/pages/ucenter/order/order" }); wx.navigateTo({
} url: "/pages/ucenter/order/order"
else { });
wx.navigateTo({ url: "/pages/auth/login/login" }); } else {
wx.navigateTo({
url: "/pages/auth/login/login"
});
} }
}, },
goCoupon() { goCoupon() {
if (app.globalData.hasLogin) { if (app.globalData.hasLogin) {
wx.navigateTo({ url: "/pages/ucenter/coupon/coupon" }); wx.navigateTo({
} url: "/pages/ucenter/coupon/coupon"
else { });
wx.navigateTo({ url: "/pages/auth/login/login" }); } else {
wx.navigateTo({
url: "/pages/auth/login/login"
});
}; };
}, },
goCollect() { goCollect() {
if (app.globalData.hasLogin) { if (app.globalData.hasLogin) {
wx.navigateTo({ url: "/pages/ucenter/collect/collect" }); wx.navigateTo({
} url: "/pages/ucenter/collect/collect"
else { });
wx.navigateTo({ url: "/pages/auth/login/login" }); } else {
wx.navigateTo({
url: "/pages/auth/login/login"
});
}; };
}, },
goFootprint() { goFootprint() {
if (app.globalData.hasLogin) { if (app.globalData.hasLogin) {
wx.navigateTo({ url: "/pages/ucenter/footprint/footprint" }); wx.navigateTo({
} url: "/pages/ucenter/footprint/footprint"
else { });
wx.navigateTo({ url: "/pages/auth/login/login" }); } else {
wx.navigateTo({
url: "/pages/auth/login/login"
});
}; };
}, },
goAddress() { goAddress() {
if (app.globalData.hasLogin) { if (app.globalData.hasLogin) {
wx.navigateTo({ url: "/pages/ucenter/address/address" }); wx.navigateTo({
} url: "/pages/ucenter/address/address"
else { });
wx.navigateTo({ url: "/pages/auth/login/login" }); } else {
wx.navigateTo({
url: "/pages/auth/login/login"
});
}; };
}, },
aboutUs: function () { aboutUs: function() {
// wx.navigateTo({
// url: '/page/about/index',
// })
wx.navigateTo({ wx.navigateTo({
url: '../../about/index',//页面跳转相对路径要写清楚且准确 url: '/pages/about/about'
success: function (res) { });
console.log('跳转到news页面成功')// success
},
fail: function () {
console.log('跳转到news页面失败') // fail
},
complete: function () {
console.log('跳转到news页面完成') // complete
}
})
}, },
exitLogin: function () { exitLogin: function() {
wx.showModal({ wx.showModal({
title: '', title: '',
confirmColor: '#b4282d', confirmColor: '#b4282d',
content: '退出登录?', content: '退出登录?',
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
wx.removeStorageSync('token'); wx.removeStorageSync('token');
wx.removeStorageSync('userInfo'); wx.removeStorageSync('userInfo');
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 32, "current": 33,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -210,12 +210,12 @@ ...@@ -210,12 +210,12 @@
"pathName": "pages/auth/login/login", "pathName": "pages/auth/login/login",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "账号登录", "name": "账号登录",
"pathName": "pages/auth/accountLogin/accountLogin", "pathName": "pages/auth/accountLogin/accountLogin",
"query": "" "query": ""
}, },
{ {
"id": -1, "id": -1,
"name": "注册", "name": "注册",
...@@ -227,6 +227,11 @@ ...@@ -227,6 +227,11 @@
"name": "找回密码", "name": "找回密码",
"pathName": "pages/auth/reset/reset", "pathName": "pages/auth/reset/reset",
"query": "" "query": ""
},
{
"id": -1,
"name": "关于",
"pathName": "pages/about/about"
} }
] ]
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment