作者 liaolinfeng

提交

... ... @@ -3,77 +3,25 @@ var e = require("./utils/network.js");
require("./utils/util.js");
App({
onLaunch: function() {
wx.login({
success: function(s) {
if (s.code) {
var o = s.code;
wx.getSetting({
success: function(s) {
s.authSetting["scope.userInfo"] || wx.authorize({
scope: "scope.userInfo",
success: function() {
wx.getUserInfo ? wx.getUserInfo({
success: function(s) {
wx.showToast({
title: "加载中",
icon: "loading",
duration: 1500,
mask: !0
});
var t = s.userInfo;
wx.setStorage({
key: "userInfo",
data: t
}), wx.getStorage({
key: "userInfo",
success: function(s) {
console.log(s), e.POST({
url: "User/register",
header: "application/x-www-form-urlencoded",
params: {
code: o,
nickname: s.data.nickName,
headimg: s.data.avatarUrl
},
success: function(e) {
var s = e.data.ouid;
wx.setStorage({
key: "ouid",
data: s,
success: function(e) {
console.log(e), wx.hideToast(), wx.showToast({
title: "登录成功!",
icon: "success",
mask: !0,
duration: 1e3
});
}
});
}
});
}
});
}
}) : wx.showToast({
title: "版本过低",
icon: "none"
});
},
fail: function() {
var e = new Object();
e.userid = "", wx.setStorage({
key: "userInfo",
data: e
});
}
}), wx.hideToast();
}
});
}
}
});
},
onLaunch: function (options) {
console.log('onLaunch');
},
onShow:function(options){
let that=this;
if (options.scene !=undefined){
this.globalData.scene = options.scene;
var scene = [1007, 1008];
var indexof = scene.indexOf(options.scene);
if (indexof == -1) {
//场景不在在数组中的处理
that.globalData.share_id = 0;
} else {
}
}
},
uploadimg: function(e) {
var s = this, o = e.i ? e.i : 0, t = e.success ? e.success : 0, a = e.fail ? e.fail : 0;
wx.uploadFile({
... ... @@ -93,5 +41,10 @@ App({
++o == e.path.length || (e.i = o, e.success = t, e.fail = a, s.uploadimg(e));
}
});
}
},
globalData: {
userInfo: null,
share_id:0,
}
});
\ No newline at end of file
... ...
{
"pages": [
"pages/index/index",
"pages/index/search/search",
"pages/classify/classify",
"pages/my/my",
"pages/cart/cart",
"pages/my/comment/comment",
"pages/my/payment/payment",
"pages/my/delivery/delivery",
"pages/my/shipped/shipped",
"pages/my/completed/completed",
"pages/my/pay/pay",
"pages/my/myoder/myoder",
"pages/classify/detail/detail",
"pages/index/goodsdetail/goodsdetail",
"pages/index/discuss/discuss",
"pages/index/paydetail/paydetail",
"pages/template/template",
"pages/my/logistic/logistic"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "礼寓Leemoral",
"navigationBarTextStyle": "black"
},
"tabBar": {
"selectedColor": "#ffb866",
"list": [
{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "pages/src/img/nav02.png",
"selectedIconPath": "pages/src/img/nav_02.png"
},
{
"text": "分类",
"pagePath": "pages/classify/classify",
"iconPath": "pages/src/img/nav03.png",
"selectedIconPath": "pages/src/img/nav_04.png"
},
{
"text": "购物车",
"pagePath": "pages/cart/cart",
"iconPath": "pages/src/img/nav04.png",
"selectedIconPath": "pages/src/img/nav_06.png"
},
{
"text": "我的",
"pagePath": "pages/my/my",
"iconPath": "pages/src/img/nav05.png",
"selectedIconPath": "pages/src/img/nav_08.png"
}
]
},
"networkTimeout": {
"request": 1000,
"connectSocket": 1000,
"uploadFile": 1000,
"downloadFile": 1000
},
"debug": true
"pages": [
"pages/start/start",
"pages/index/index",
"pages/index/search/search",
"pages/classify/classify",
"pages/my/my",
"pages/cart/cart",
"pages/my/comment/comment",
"pages/my/payment/payment",
"pages/my/delivery/delivery",
"pages/my/shipped/shipped",
"pages/my/completed/completed",
"pages/my/pay/pay",
"pages/my/myoder/myoder",
"pages/classify/detail/detail",
"pages/index/goodsdetail/goodsdetail",
"pages/index/discuss/discuss",
"pages/index/paydetail/paydetail",
"pages/template/template",
"pages/my/logistic/logistic",
"pages/invoice/invoice",
"pages/my_wallet/my_wallet",
"pages/my_walletlog/my_walletlog"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "搭咕商城",
"navigationBarTextStyle": "black"
},
"tabBar": {
"selectedColor": "#FF87B1",
"list": [
{
"text": "首页",
"pagePath": "pages/index/index",
"iconPath": "pages/imgs/nav01@2x.png",
"selectedIconPath": "pages/imgs/nav02@2x.png"
},
{
"text": "分类",
"pagePath": "pages/classify/classify",
"iconPath": "pages/imgs/nav03@2x.png",
"selectedIconPath": "pages/imgs/nav04@2x.png"
},
{
"text": "购物车",
"pagePath": "pages/cart/cart",
"iconPath": "pages/imgs/nav05@2x.png",
"selectedIconPath": "pages/imgs/nav06@2x.png"
},
{
"text": "会员中心",
"pagePath": "pages/my/my",
"iconPath": "pages/imgs/nav07@2x.png",
"selectedIconPath": "pages/imgs/nav08@2x.png"
}
]
},
"networkTimeout": {
"request": 1000,
"connectSocket": 1000,
"uploadFile": 1000,
"downloadFile": 1000
},
"debug": true
}
\ No newline at end of file
... ...
... ... @@ -97,7 +97,7 @@ input,textarea {
margin: 16rpx auto;
border-radius: 30rpx;
display: flex;
padding: 18rpx 20rpx;
padding: 12rpx 20rpx;
font-size: 24rpx;
align-items: center;
position: fixed;
... ... @@ -114,7 +114,7 @@ input,textarea {
}
.index_box {
padding: 26rpx 20rpx;
padding: 18rpx 20rpx;
align-items: stretch;
}
... ... @@ -288,7 +288,7 @@ input,textarea {
}
.payactive {
border-bottom: 2rpx solid #e91b1d;
border-bottom: 2rpx solid #E91B1D;
}
.payorder {
... ... @@ -347,7 +347,7 @@ input,textarea {
}
.rightprice {
color: #f00;
color: #FF87B1;
}
.rightnum {
... ... @@ -365,8 +365,8 @@ input,textarea {
.gopay text {
padding: 14rpx 32rpx;
border: 1px solid #f00;
color: #f00;
border: 1px solid #FF87B1;
color: #FF87B1;
border-radius: 5rpx;
font-size: 26rpx;
margin: 0 0 0 25rpx;
... ... @@ -381,6 +381,7 @@ input,textarea {
}
.goodsList {
width: 100%;
background-color: #f5f9fa;
padding: 16rpx 24rpx;
box-sizing: border-box;
... ... @@ -392,7 +393,7 @@ input,textarea {
margin-bottom: 16rpx;
background-color: #fff;
font-size: 24rpx;
width: 343rpx;
width: 340rpx;
}
.goods_box image {
... ... @@ -404,6 +405,8 @@ input,textarea {
text-overflow: ellipsis;
padding: 0 8rpx;
margin-top: 32rpx;
color:#000;
font-size:24rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
... ... @@ -413,13 +416,15 @@ input,textarea {
}
.price {
color: #f00;
padding: 0 8rpx;
color: #FF87B1;
padding: 0 18rpx 0 8rpx;
font-size:30rpx;
}
.old_price {
text-decoration: line-through;
color: #666;
font-size:24rpx;
}
.waterfall {
... ... @@ -518,7 +523,7 @@ input,textarea {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 10rpx 10rpx 0;
padding: 30rpx 10rpx 30rpx 0;
}
.price_box_month text {
... ...
... ... @@ -64,28 +64,41 @@ Page({
ouid: e.data.ouid
},
success: function(t) {
let totalnum=0;
let ids='';
var a = [];
if (t.data.cars) {
var a = [];
a = t.data.cars;
for (var i = 0; i < a.length; i++) a[i].selected = !1;
for (var obj of a){
if (obj.selected){
totalnum++;
ids += obj.id+','
}
}
}
e.setData({
carlist: a
carlist: a,
totalnum: totalnum,
ids:ids
});
e.getTotalPrice();
}
});
},
selectList: function(t) {
var a = [], e = [], i = t.currentTarget.dataset.index, s = this.data.carlist, c = s[i].selected;
s[i].selected = !c;
for (var n = 0; n < this.data.carlist.length; n++) 1 == this.data.carlist[n].selected && (a.push(this.data.carlist[n].selected),
e.push(this.data.carlist[n].id));
this.setData({
carlist: s,
selected: c,
totalnum: a.length,
ids: e.join(",")
}), this.getTotalPrice();
selectList: function(e) {
let that=this;
t.POST({
url: "pay/selected",
header: "application/x-www-form-urlencoded",
params: {
ouid: that.data.ouid,
id: e.currentTarget.dataset.id
},
success: function (e) {
that.getcartlist();
}
});
},
getTotalPrice: function() {
for (var t = this.data.carlist, a = 0, e = 0; e < t.length; e++) t[e].selected && (a += t[e].count * t[e].pprice);
... ... @@ -150,5 +163,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -3,10 +3,10 @@
</view>
<view class="carts" wx:else>
<view class="cartitem" wx:for="{{carlist}}" wx:key="{{item.id}}">
<view bindtap="selectList" class="cartbox" data-index="{{index}}" wx:if="{{item.selected}}">
<view bindtap="selectList" class="cartbox" data-id="{{item.id}}" wx:if="{{item.selected}}">
<view class=" iconfont icon-duihao-copy"></view>
</view>
<view bindtap="selectList" class="cartbox" data-index="{{index}}" wx:else></view>
<view bindtap="selectList" class="cartbox" data-id="{{item.id}}" wx:else></view>
<navigator class="cartimg" url="../index/goodsdetail/goodsdetail?id={{item.gid}}">
<image src="{{item.thumb}}"></image>
</navigator>
... ...
... ... @@ -88,12 +88,12 @@ page {
.del {
font-size: 24rpx;
color: #f00;
color: #FF87B1;
}
.prices {
font-size: 32rpx;
color: #f00;
color: #FF87B1;
margin: 0 0 0 32rpx;
}
... ... @@ -121,7 +121,7 @@ page {
padding: 33rpx 0;
text-align: center;
width: 250rpx;
background-color: #d70000;
background-color: #FF87B1;
color: #fff;
font-size: 36rpx;
}
... ...
... ... @@ -34,5 +34,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -113,5 +113,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -54,5 +54,5 @@ page {
}
.active {
color: #ffb866;
color: #FF87B1;
}
\ No newline at end of file
... ...
... ... @@ -46,5 +46,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -237,7 +237,8 @@ Page({
ouid: this.data.ouid,
gid: this.data.id,
standard: this.data.selectName,
count: this.data.num
count: this.data.num,
},
success: function(t) {
if (t.data.state = "success") {
... ... @@ -300,5 +301,31 @@ Page({
o = t, this.setData({
selectName: o
});
},
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -39,7 +39,7 @@ page {
.nowprice text {
font-weight: 600;
font-size: 36rpx;
color: #f00;
color: #FF87B1;
}
.nowprice .oldprice {
... ... @@ -95,7 +95,7 @@ page {
}
.typecolor .actvietext {
background-color: #ffad02;
background-color: #FF87B1;
color: #fff;
}
... ... @@ -271,7 +271,7 @@ page {
}
.icon-shoucang1 {
color: #f4ea2a;
color: #FF87B1;
}
.imglist {
... ...
... ... @@ -116,21 +116,30 @@ Page({
onShow: function() {
this.getbanner();
},
onShareAppMessage: function(a) {
return a.from, {
title: "礼寓Leemoral",
path: "/pages/index/index",
success: function(a) {
wx.showToast({
title: "转发成功"
});
},
fail: function(a) {
wx.showToast({
title: "转发取消",
icon: "none"
});
}
};
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -36,7 +36,7 @@
<text class="old_price">¥{{item.oprice}}</text>
</view>
</view>
<text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text>
<!-- <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text> -->
</navigator>
</view>
</view>
... ... @@ -51,7 +51,7 @@
<text class="old_price">¥{{item.oprice}}</text>
</view>
</view>
<text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text>
<!-- <text class="sales">月销量:{{item.month_sale?item.month_sale:0}}</text> -->
</navigator>
</view>
</view>
... ...
... ... @@ -40,7 +40,13 @@ Page({
});
},
pay_order: function(a) {
for (var e = a.currentTarget.dataset.id, o = this.data.info, i = 0, n = 0; n < o.length; n++) i += o[n].count * details[n].pprice;
let i=0;
let e = a.currentTarget.dataset.id;
let o = this.data.goods;
for (let n = 0; n < o.length; n++){
i += parseInt(o[n].count)* o[n].pprice;
}
console.log('jiage',i);
t.POST({
url: "Pay/pay_order",
header: "application/x-www-form-urlencoded",
... ... @@ -123,5 +129,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -96,14 +96,14 @@ page {
}
.goodsprice {
color: #f00;
color:#FF87B1;
font-size: 30rpx;
}
.orderbox {
background-color: #fff;
margin: 16rpx 0 200rpx 0;
padding-bottom: 150rpx;
/* padding-bottom: 150rpx; */
}
.orderitem {
... ... @@ -123,17 +123,17 @@ page {
}
.totalprice {
color: #f00;
color: #FF87B1;
}
.del {
font-size: 32rpx;
border: 1px solid #f00;
border: 1px solid #FF87B1;
border-radius: 35rpx;
padding: 15rpx 0;
text-align: center;
width: 200rpx;
color: #f00;
color: #FF87B1;
}
.buy {
... ...
... ... @@ -66,5 +66,31 @@ Page({
searchPageNum: a.data.searchPageNum + 1,
isFromSearch: !1
}), a.fetchSearchList());
},
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -93,7 +93,7 @@ Page({
uploadimg: function() {
var t = this.data.pics;
i.uploadimg({
url: "https://leemoral.wx.bronet.cn/index.php/Api/User/upload_wxpic",
url: "https://ailingcheng.cn/index.php/Api/User/upload_wxpic",
path: t
});
},
... ... @@ -116,5 +116,31 @@ Page({
current: i[e],
urls: i
});
},
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -65,6 +65,7 @@ page {
height: 330rpx;
width: 100%;
line-height: 44rpx;
font-size:28rpx;
}
.comments {
... ...
... ... @@ -56,6 +56,14 @@ Page({
url: "../comment/comment?odid=" + this.data.odid
});
},
//开发票
goinvoice(e){
let that=this;
let index = parseInt(e.currentTarget.dataset.index) ;
wx.navigateTo({
url: "/pages/invoice/invoice?order_id="+e.currentTarget.dataset.id+'&price='+that.data.orders[index].details[0].pprice
});
},
onLoad: function(e) {},
del_order: function(t) {
var o = t.currentTarget.dataset.id, a = t.currentTarget.dataset.index, n = this.data.orders, d = this;
... ... @@ -100,5 +108,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -37,6 +37,7 @@
</view>
</view>
<view class="gopay">
<text bindtap="goinvoice" data-id="{{item.id}}" data-index="{{index}}" wx:if='{{item.is_up==1}}'>开发票</text>
<text bindtap="del_order" data-id="{{item.id}}" data-index="{{index}}">删除订单</text>
</view>
</view>
... ...
... ... @@ -9,6 +9,6 @@ page {
}
.comment {
font-size: 24rpx;
color: #FF0000;
font-size: 26rpx;
color: #FF87B1;
}
\ No newline at end of file
... ...
... ... @@ -64,5 +64,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -36,5 +36,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
getApp(), require("../../utils/util.js");
var e = require("../../utils/network.js");
Page({
data: {
userInfo: []
userInfo: [],
unpaynum0:0,
unpaynum1: 0,
unpaynum2: 0,
unpaynum3: 0,
},
my_order: function (ouid, status) {
var t = this;
e.POST({
url: "User/my_order",
header: "application/x-www-form-urlencoded",
params: {
ouid: ouid,
status: status
},
success: function (e) {
if (status == 0){
t.setData({
unpaynum0: e.data.orders.length
})
} else if (status == 1){
t.setData({
unpaynum1: e.data.orders.length
})
} else if (status == 2){
t.setData({
unpaynum2: e.data.orders.length
})
}else{
t.setData({
unpaynum3: e.data.orders.length
})
}
}
});
},
payment: function() {
wx.navigateTo({
... ... @@ -34,6 +69,11 @@ Page({
url: "myoder/myoder"
});
},
gomy_wallet(){
wx.navigateTo({
url: "../my_wallet/my_wallet"
});
},
onLoad: function(n) {
var e = this;
wx.getStorage({
... ... @@ -43,9 +83,18 @@ Page({
userInfo: n.data
});
}
}), wx.getStorage({
}),
wx.getStorage({
key: "ouid",
success: function(n) {}
success: function(n) {
e.my_order(n.data,0);
e.my_order(n.data, 1);
e.my_order(n.data, 2);
e.my_order(n.data, 3);
}
});
},
onReady: function() {},
... ... @@ -54,5 +103,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
<import src="../template/template.wxml"></import>
<image class="myimg" mode="scaleToFill" src="../src/img/bg.png"></image>
<image class="myimg" mode="scaleToFill" src="../imgs/bg@2x.png"></image>
<view class="headbox">
<image class="myhead" src="{{userInfo.avatarUrl}}"></image>
<!-- <image class="myhead" src="../imgs/head01@2x.png"></image> -->
</view>
<view class="myname">{{userInfo.nickName}}</view>
<view class="mylist">
<view bindtap="payment" class="myitem">
<text class='hint' wx:if='{{unpaynum0>0}}'>{{unpaynum0}}</text>
<view class="iconfont icon-daifukuan1"></view>
<text>待付款</text>
</view>
<view bindtap="delivery" class="myitem">
<text class='hint' wx:if='{{unpaynum1>0}}'>{{unpaynum1}}</text>
<view class="iconfont icon-daifahuo"></view>
<text>待发货</text>
</view>
<view bindtap="shipped" class="myitem">
<text class='hint' wx:if='{{unpaynum2>0}}'>{{unpaynum2}}</text>
<view class="iconfont icon-yifahuo"></view>
<text>已发货</text>
</view>
<view bindtap="completed" class="myitem">
<text class='hint' wx:if='{{unpaynum3>0}}'>{{unpaynum3}}</text>
<view class="iconfont icon-dingdanyiwancheng"></view>
<text>已完成</text>
</view>
... ... @@ -31,5 +36,9 @@
<text>我的收藏</text>
<view class="iconfont icon-jinru"></view>
</view>
<view bindtap="gomy_wallet" class="myoder">
<text>我的钱包</text>
<view class="iconfont icon-jinru"></view>
</view>
</view>
<template is="kefu" data></template>
... ...
page {
background-color: #F5F9FA;
}
.myimg {
height: 258rpx;
width: 100%;
}
.headbox {
width: 160rpx;
height: 160rpx;
... ... @@ -35,6 +33,7 @@ page {
}
.myitem {
position: relative;
display: flex;
flex: 1;
flex-direction: column;
... ... @@ -53,13 +52,15 @@ page {
.myoder {
display: flex;
justify-content: space-between;
padding: 45rpx 20rpx 45rpx 24rpx;
padding: 37rpx 20rpx 37rpx 24rpx;
margin: 0 32rpx;
font-size: 28rpx;
background-color: #fff;
border-bottom: 1rpx solid #E6EAEB;
}
.myoder:last-child{
border:none;
}
.myoder:active {
background-color: rgba(0,0,0,0.08);
}
... ... @@ -67,4 +68,18 @@ page {
.my {
margin: 75rpx 0 0 0;
box-shadow: 2rpx 0 4rpx rgba(0,0,0,0.08);
}
.hint{
position: absolute;
top:-6rpx;
right:46rpx;
width:30rpx;
height: 30rpx;
border-radius: 50%;
text-align: center;
line-height: 30rpx;
color:#fff;
font-size:24rpx;
z-index:10;
background: red;
}
\ No newline at end of file
... ...
... ... @@ -48,5 +48,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
var t = require("../../../utils/network.js");
const app=getApp();
Page({
data: {
type: "",
... ... @@ -72,10 +72,13 @@ Page({
total: this.data.totalmoney,
name: this.data.address.userName,
tel: this.data.address.telNumber,
addr: this.data.address.provinceName + this.data.address.cityName + this.data.address.countyName + this.data.address.detailInfo,
leave: this.data.user_msg ? this.data.user_msg : ""
addr: this.data.address.provinceName + this.data.address.cityName + this.data.address.countyName +
this.data.address.detailInfo,
leave: this.data.user_msg ? this.data.user_msg : "",
share_id: app.globalData.share_id ? app.globalData.share_id :0
},
success: function(t) {
wx.showLoading({
title: "处理中..."
}), "success" == t.data.state && a.setData({
... ... @@ -85,6 +88,7 @@ Page({
});
},
pay_order: function() {
let that=this;
t.POST({
url: "Pay/pay_order",
header: "application/x-www-form-urlencoded",
... ... @@ -94,7 +98,7 @@ Page({
money: this.data.totalmoney
},
success: function(t) {
console.log(t), t.data && wx.requestPayment({
t.data && wx.requestPayment({
timeStamp: t.data.timeStamp,
nonceStr: t.data.nonceStr,
package: t.data.package,
... ... @@ -105,8 +109,16 @@ Page({
url: "../delivery/delivery"
});
},
fail: function(t) {}
fail: function(t) {
wx.redirectTo({
url: '/pages/index/paydetail/paydetail?id=' + that.data.oid + '&type=0'
})
}
});
},
fail:function(){
}
});
},
... ... @@ -117,7 +129,32 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {},
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
getaddress: function() {
var t = this;
wx.chooseAddress ? wx.chooseAddress({
... ...
... ... @@ -97,7 +97,7 @@ page {
}
.goodsprice {
color: #f00;
color: #FF87B1;
font-size: 30rpx;
}
... ... @@ -121,6 +121,7 @@ page {
.orderitem:last-child {
border: 0;
}
.orderitem .usermsg {
... ... @@ -132,7 +133,7 @@ page {
}
.totalprice {
color: #f00;
color: #FF87B1;
}
.del {
... ... @@ -178,7 +179,7 @@ page {
}
.money {
color: #f00;
color: #FF87B1;
margin-right: 40rpx;
}
... ...
... ... @@ -84,5 +84,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
... ... @@ -93,5 +93,30 @@ Page({
onUnload: function() {},
onPullDownRefresh: function() {},
onReachBottom: function() {},
onShareAppMessage: function() {}
onShareAppMessage: function (options) {
let that = this;
let ouid;
// 设置菜单中的转发按钮触发转发事件时的转发内容
var shareObj = {
title: '嗒咕商场', // 默认是小程序的名称(可以写slogan等)
path: '/pages/start/start?share_id=' + wx.getStorageSync('ouid'), // 默认是当前页面,必须是以‘/’开头的完整路径
imgUrl: '',//自定义图片路径,可以是本地文件路径、代码包文件路径或者网络图片路径,支持PNG及JPG,不传入 imageUrl 则使用默认截图。显示图片长宽比是 5:4
success: function (res) {
// 转发成功之后的回调
if (res.errMsg == 'shareAppMessage:ok') { }
},
fail: function () {
// 转发失败之后的回调
if (res.errMsg == 'shareAppMessage:fail cancel') {
// 用户取消转发
} else if (res.errMsg == 'shareAppMessage:fail') {
// 转发失败,其中 detail message 为详细失败信息
}
},
complete: function () {
// 转发结束之后的回调(转发成不成功都会执行)
}
}
return shareObj;
},
});
\ No newline at end of file
... ...
<template name="kefu">
<view class="service">
<image mode="scaleToFill" src="../src/img/kefu.png "></image>
<image mode="scaleToFill" src="../imgs/aicon01@2x.png "></image>
</view>
<view class="services">
<button openType="contact" style="height:100rpx;width:100rpx;opacity: 0"></button>
... ...
... ... @@ -11,9 +11,9 @@
"newFeature": true
},
"compileType": "miniprogram",
"libVersion": "2.3.0",
"appid": "wx75855734b0730d64",
"projectname": "%E7%A4%BC%E9%81%87",
"libVersion": "2.4.0",
"appid": "wx0091d8ff6b11f5b1",
"projectname": "%E6%90%AD%E5%92%95%E5%95%86%E5%9F%8E%E5%AE%A2%E6%88%B7APPID2",
"debugOptions": {
"hidedInDevtools": []
},
... ... @@ -27,13 +27,24 @@
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
"list": [
{
"id": -1,
"name": "my",
"pathName": "pages/my/my",
"query": ""
}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -16,9 +16,7 @@ function e(e, n) {
complete: function() {}
});
}
var t = "https://leemoral.wx.bronet.cn/index.php/Api/";
var t = "https://ailingcheng.cn/index.php/Api/";
module.exports = {
GET: function(t) {
e("GET", t);
... ...
... ... @@ -19,7 +19,7 @@ module.exports = {
},
getSearchMusic: function(t, e, i) {
wx.request({
url: "https://leemoral.wx.bronet.cn/index.php/Api/Index/ajax_goods_search",
url: "https://ailingcheng.cn/index.php/Api/Index/ajax_goods_search",
data: {
p: e,
keyword: t
... ...