1.调整H5 样式

yj-dev
杨杰 3 years ago
parent 037292eaf3
commit 4adbb012bf
  1. 16
      App.vue
  2. 4
      manifest.json
  3. 10
      pages/goods/refuel-confirm/refuel-confirm.vue
  4. 68
      pages/login/register.vue
  5. 17
      pages/login/updatePas/updatePas.vue
  6. 7
      pages/order/confirmation.vue
  7. 38
      pages/pay/payment/payment.vue
  8. 10
      pages/qianZhuPay/qianZhuPay.vue
  9. 30
      pages/tabBar/category/category.vue
  10. 117
      pages/tabBar/home/home.vue
  11. 28
      pages/tabBar/user/user.vue
  12. 226
      pages/user/coupon/coupon.vue
  13. 10
      pages/user/deposit/deposit.vue
  14. 10
      subPages/trade-union-recharge/trade-union-recharge.vue
  15. 39
      subPages/unionComfirmation/unionComfirmation.vue

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
// url: 'https://hsg.dctpay.com/crest',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl : 'https://hsg.dctpay.com/brest',
// imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest',
imageWxImg:'https://hsg.dctpay.com/filesystem/wxApplets/',
//
url: 'https://hsgcs.dctpay.com/crest',
brestUrl : 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
// url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "",
brestUserInfo : '',
openId: '',

@ -83,11 +83,11 @@
"title" : "嗨加油",
"router" : {
"mode" : "hash",
"base" : "/hsg-h5"
"base" : "/hsgH5"
},
"devServer" : {
"port" : "",
"https" : false
"https" : true
},
"domain" : "https://hsgcs.dctpay.com",
"template" : ""

@ -270,11 +270,21 @@
return;
}
if (that.paytype == 'weixin') {
// #ifdef H5
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
// #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP

@ -15,16 +15,7 @@
<view class="code">
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: #676767;" />
</view>
<!-- <view class="password">
<input placeholder="请输入密码" v-model="passwd" password=true placeholder-style="color: rgba(255,255,255,0.8);"/>
</view> -->
<view class="btn mart50" @tap="doReg">立即注册</view>
<!-- <view class="btn mart50" v-else @tap="doReg">绑定手机号</view> -->
<!-- <view class="res">
<view @tap="toLogin">已有账号立即登录</view>
</view> -->
<!-- <image v-if="Typeid == 1" @click="openWx" :src="imagewxUrl+imgadres" class="wximg"></image> -->
</view>
</view>
@ -52,6 +43,7 @@
}
},
onLoad() {
},
methods: {
Timer() {},
@ -74,6 +66,7 @@
phone: this.phoneNumber
}
sendSmsCode(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.getCodeisWaiting = true;
this.getCodeBtnColor = "rgba(255,255,255,0.5)"
@ -82,8 +75,6 @@
icon: "none"
});
this.setTimer();
} else {
uni.hideLoading()
}
})
},
@ -127,9 +118,8 @@
phone: this.phoneNumber,
code: this.code
}
// if (this.Typeid == 1) {
H5login(params).then(res => {
uni.hideLoading()
uni.hideLoading();
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
@ -145,7 +135,9 @@
key: "token",
data: res.return_data.uniqueCode
})
uni.navigateBack({})
uni.navigateBack({
delta:2
});
} else {
uni.showToast({
title: res.return_msg,
@ -153,55 +145,7 @@
});
}
})
// } else {
// bindUserPhone(params).then(res => {
// uni.hideLoading()
// if (res.return_code == '000000') {
// app.globalData.userInfo = res.return_data
// .object
// .highUser;
// app.globalData.token = res.return_data.uniqueCode;
// uni.setStorage({
// key: "user",
// data: res.return_data
// .object
// .highUser
// })
// uni.setStorage({
// key: "token",
// data: res.return_data.uniqueCode
// })
// uni.navigateBack({})
// } else {
// uni.showToast({
// title: res.return_msg,
// icon: "none"
// });
// }
// })
// }
},
//
isWeiXinLogin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.search(/MicroMessenger/i) > -1) {
return true;
} else {
return false;
}
},
//
openWx() {
location.href =
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsgcs.dctpay.com%2FH5%2Findex.html%23%2F&response_type=code&scope=snsapi_userinfo&state=2#wechat_redirect';
},
toLogin() {
uni.hideKeyboard()
uni.redirectTo({
url: 'login'
});
uni.navigateBack();
}
}
}

@ -76,7 +76,13 @@
uni.showToast({
title: '设置成功',
icon: "none",
duration: 2000
duration: 2000,
success() {
setTimeout(() => {
uni.navigateBack({
})
}, 800);
}
});
app.globalData.userInfo = res.return_data
.object
@ -87,12 +93,17 @@
.object
.highUser
})
uni.navigateBack({})
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: "none"
icon: "none",
success() {
setTimeout(() => {
uni.navigateBack({
})
}, 800);
}
})
}
})

@ -296,12 +296,10 @@
couponId: this.couponId
}
getCouponById(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.couponList = res.return_data;
this.paytheprice = res.return_data.discountPrice;
uni.hideLoading()
} else {
uni.hideLoading()
}
})
},
@ -437,8 +435,8 @@
}]
}
addOrder(goods).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
uni.hideLoading();
// uni.redirectTo({
// url: '../pay/payment/payment?amount=' + res.return_data.payPrice +
// '&paytype=' + this.couponList.payType + '&orderId=' + res.return_data.id +
@ -450,7 +448,6 @@
this.orderDetails = res.return_data;
this.orderToPay(res.return_data);
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: 'none',

@ -18,7 +18,7 @@
</view>
<view class="content">
<view class="pay-list">
<view class="row" @tap="paytype='jinbi'" v-if="(pryType == 2 || pryType==3) && goodsType != 1">
<view class="row" @tap="paytype='jinbi'" v-if="goodsType != 2 && goodsType != 8">
<view class="left">
<image src="../../../static/img/jfx.png"></image>
</view>
@ -29,7 +29,7 @@
<radio :checked="paytype=='jinbi'" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='gonghuika'" v-if="goodsType != 2 && goodsType != 8">
<view class="row" @tap="paytype='gonghuika'" v-if="goodsType == 1 && goodsType == 6">
<view class="left">
<image style="border-radius: 50%;" src="../../../static/img/ghkpay.png"></image>
</view>
@ -40,7 +40,7 @@
<radio :checked="paytype=='gonghuika'" @click="changeRiado()" color="#0083f5" />
</view>
</view>
<view class="row" @tap="paytype='wxpay'" v-if="pryType == 1 || pryType==3 ">
<view class="row" @tap="paytype='wxpay'">
<view class="left">
<image :src="imagewxUrl+imgadres"></image>
</view>
@ -112,14 +112,33 @@
} else {
this.paytype = ''
}
if (!app.globalData.userInfo) {
this.findUser()
}
this.amount = parseFloat(e.amount).toFixed(2);
},
onShow() {
let that = this;
that.user = app.globalData.userInfo;
that.getHuiLianTongCardBalance();
if (app.globalData.userInfo) {
this.findUser();
}
},
methods: {
findUser() {
let params;
findUser(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
uni.setStorage({
key: "user",
data: res.return_data
})
}
});
},
//
changeRiado() {
if (!this.user.isSetHltCard) {
@ -155,12 +174,21 @@
orderToPay() {
let that = this;
if (that.paytype == 'wxpay') {
// #ifdef H5
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
// #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP
@ -344,7 +372,7 @@
title: '支付中...'
})
jweixin.config({
// debug: false, // ,apialertpclogpc
// debug: true, // ,apialertpclogpc
appId: self.return_data.appId, //
timestamp: self.return_data.timeStamp, //
nonceStr: self.return_data.nonceStr, //

@ -31,11 +31,21 @@
//
orderToPay() {
let that = this;
// #ifdef H5
let params = {
"orderId": that.orderNo,
"openId": app.globalData.openId,
"orderScene": that.source,
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderNo": that.orderNo,
"openId": app.globalData.openId,
"source": that.source
}
// #endif
qzOrderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP

@ -61,12 +61,12 @@
</view>
</view>
</wybPopup> -->
<!-- #ifdef H5 -->
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="H5xfimg"></image>
<!-- #endif -->
<!-- #ifdef MP-->
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="xfimg"></image>
<!-- #endif -->
<!-- #ifdef H5-->
<image :src="imagewxUrl+imgadres5" mode="widthFix" class="h5xfimg" @click="playPhone"></image>
<!-- #endif -->
</view>
</template>
<script>
@ -267,6 +267,27 @@
url: '../../goods/HM-search/HM-search'
})
// uni.showToast({title: ""});
},
//
playPhone() {
uni.showModal({
title: '客服',
content: '4006780738',
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: '4006780738', //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
}
})
}
}
}
@ -276,13 +297,12 @@
background-color: #f1f3f5;
}
.H5xfimg {
.h5xfimg {
width: 80rpx;
bottom: 140rpx;
position: fixed;
right: 40rpx;
}
.xfimg {
width: 80rpx;
bottom: 60rpx;

@ -85,14 +85,14 @@
<wybPopup ref="popup" type="center" height="850" width="600" bgColor="" radius="6" :showCloseIcon="true">
<image class="popImg" :src="imageUrl+imgadres3" @click="jumpWeb"></image>
</wybPopup>
<!-- #ifdef MP-->
<button open-type="contact">
<!-- #ifdef H5 -->
<image :src="imagewxUrl+imgadres4" mode="widthFix" class="H5xfimg"></image>
<!-- #endif -->
<!-- #ifdef MP-->
<image :src="imagewxUrl+imgadres4" mode="widthFix" class="xfimg"></image>
<!-- #endif -->
</button>
<!-- #endif -->
<!-- #ifdef H5 -->
<image :src="imagewxUrl+imgadres4" mode="widthFix" class="h5xfimg" @click="playPhone"></image>
<!-- #endif -->
<view class="height40"></view>
<!-- <official-account bindload="bindload" binderror="binderror"></official-account> -->
<!-- <view class="height20"></view> -->
@ -105,7 +105,6 @@
HandleCode,
WXlogin,
getCouponList,
getH5UserInfo,
getH5AccessToken,
getTPigKFCToken,
getTPigCinemaToken,
@ -168,17 +167,6 @@
},
onShow() {
// #ifdef H5
var arr1 = window.location.href;
var arr2 = arr1.split('=');
if (!app.globalData.userInfo && arr2[1] != undefined && arr2[2] == '2#/') {
this.getH5UserInfo(arr2[1]);
}
if (app.globalData.userInfo && arr2[1] != undefined && arr2[2] == '1#/') {
this.getH5AccessToken(arr2[1]);
}
// #endif
if (app.globalData.cityName != '') {
this.city = app.globalData.cityName;
this.getCouponListArea();
@ -192,8 +180,21 @@
}
},
onLoad(options) {
app.globalData.accountId = options.accountId;
let that = this;
// #ifdef H5
var arr1 = window.location.href;
var arr2 = arr1.split('=');
if (arr2[1] != undefined && arr2[2] == '1#/') {
app.globalData.h5code = arr2[1];
} else {
// openid
this.jumpcdx();
}
if (app.globalData.h5code) {
this.getH5AccessToken();
}
// #endif
app.globalData.accountId = options.accountId;
// 1.wxcode
// #ifdef MP
uni.login({
@ -227,15 +228,6 @@
},
fail: res => {}
})
// #ifdef H5
uni.getStorage({
key: "openId",
success(e) {
app.globalData.openId = e.data
},
fail: res => {}
})
// #endif
if (JSON.stringify(options.id)) {
app.globalData.identificationCode = options.id;
return;
@ -250,6 +242,10 @@
},
methods: {
jumpcdx() {
location.href =
'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa075e8509802f826&redirect_uri=https%3A%2F%2Fhsg.dctpay.com%2FhsgH5%2Findex.html%23%2F&response_type=code&scope=snsapi_base&state=1#wechat_redirect';
},
//
getCmsContentcmsContent() {
let params = {
@ -420,55 +416,19 @@
});
},
//H5 openId
getH5AccessToken(item) {
getH5AccessToken() {
let params = {
code: item
code: app.globalData.h5code
}
getH5AccessToken(params).then(res => {
if (res.return_code == '000000') {
if (res.return_code == '000000' && res.return_data.openid) {
app.globalData.openId = res.return_data.openid;
uni.setStorage({
key: "openId",
data: res.return_data.openid
})
}
});
},
//H5
getH5UserInfo(item) {
let params = {
code: item
}
getH5UserInfo(params).then(res => {
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data
.object
.highUser;
app.globalData.token = res.return_data.uniqueCode;
uni.setStorage({
key: "user",
data: res.return_data
.object
.highUser
})
uni.setStorage({
key: "token",
data: res.return_data.uniqueCode
})
uni.setStorage({
key: "openId",
data: res.return_data
.object
.highUser.openIdH5
})
app.globalData.openId = res.return_data
.object
.highUser.openIdH5;
} else {
uni.showToast({
title: res.return_msg
})
this.jumpcdx();
}
});
},
@ -746,6 +706,27 @@
url: '/pages/goods/goods-list/goods-list?id=' + item
})
},
//
playPhone() {
uni.showModal({
title: '客服',
content: '4006780738',
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: '4006780738', //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
}
})
}
},
};
@ -761,7 +742,7 @@
height: 440px;
}
.H5xfimg{
.h5xfimg {
width: 80rpx;
bottom: 140rpx;
position: fixed;

@ -14,8 +14,13 @@
</view>
<!-- 昵称,个性签名 -->
<view class="right">
<!-- #ifdef MP -->
<view class="username" v-if="user && user.infoCompleteStatus == 1" @click="jumplogin">点击获取信息</view>
<view class="username" v-else>{{user.name}}</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="username" >{{user.name}}</view>
<!-- #endif -->
<view class="font14 fcorfff" v-if="!user.gold">积分: 0</view>
<view class="font14 fcorfff" v-else>积分: {{user.gold}} </view>
<!-- <view class="signature" @tap="toSetting">{{user.signature}}</view> -->
@ -418,7 +423,28 @@
url: url
})
}
// #ifdef H5
if (item == '客服') {
uni.showModal({
title: '客服',
content: '4006780738',
success: function(res) {
if (res.confirm) {
uni.makePhoneCall({
phoneNumber: '4006780738', //
success: function(e) {
console.log(e);
},
fail: function(e) {
console.log(e);
}
})
}
}
})
}
// #endif
}
}
}

@ -1,22 +1,19 @@
<template>
<view>
<view class="tabr" :style="{top:headerTop}">
<view :class="{on:typeClass=='valid'}" @tap="switchType('valid')">可用({{couponcout}})</view>
<view :class="{on:typeClass=='invalid'}" @tap="switchType('invalid')">已失效</view>
<view class="border" :class="typeClass"></view>
<!-- ({{couponcout}}) -->
<view :class="{on:typeClass=='valid'}" @tap="switchType('valid')">待使用</view>
<view :class="{on:typeClass=='invalid'}" @tap="switchType('invalid')">已使用</view>
<view :class="{on:typeClass=='noinvalid'}" @tap="switchType('noinvalid')">已过期</view>
</view>
<view class="place"></view>
<view class="list">
<!-- 优惠券列表 -->
<view class="sub-list valid" :class="subState">
<view class="sub-list" v-if="typeClass == 'valid'">
<view class="tis" v-if="couponValidList.length==0">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in couponValidList" :key="index" @click="jumpcoupons(row)">
<!-- 删除按钮 -->
<view class="menu" @tap.stop="deleteCoupon(row.id,couponValidList)">
<view class="icon shanchu"></view>
</view>
<!-- content -->
<view class="carrier">
<view class="left">
@ -26,8 +23,6 @@
<view class="term">
截止时间:{{row.useEndTime | formatDate('-')}}
</view>
<view class="gap-top"></view>
<view class="gap-bottom"></view>
</view>
<view class="right">
<view class="ticket">
@ -47,22 +42,19 @@
<!-- <view class="criteria">
{{row.highDiscount.discountName}}
</view> -->
<view class="use" >
<view class="use">
去使用
</view>
</view>
</view>
</view>
</view>
<view class="sub-list invalid" :class="subState">
<!-- //使 -->
<view class="sub-list" v-if="typeClass == 'invalid'">
<view class="tis" v-if="couponinvalidList.length==0">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in couponinvalidList" :key="index">
<!-- 删除按钮 -->
<view class="menu" @tap.stop="deleteCoupon(row.id,couponinvalidList)">
<view class="icon shanchu"></view>
</view>
<!-- content -->
<view class="carrier">
<view class="left">
@ -70,13 +62,43 @@
{{row.highDiscount.discountName}}
</view>
<view class="term">
截止时间:{{row.highDiscount.salesEndTime | formatDate('-')}}
使用时间:{{row.useTime | formatDate('-')}}
</view>
<view class="icon shixiao">
</view>
<view class="right invalid">
<view class="ticket">
<view class="num">
{{row.highDiscount.discountPrice}}
</view>
<view class="unit">
</view>
</view>
<view class="criteria">
{{row.highDiscount.discountName}}
</view>
<view class="use">
已使用
</view>
</view>
</view>
</view>
</view>
<!-- 已过期 -->
<view class="sub-list" v-if="typeClass == 'noinvalid'">
<view class="tis" v-if="couponnoinvalidList.length==0">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view>
<view class="row" v-for="(row,index) in couponnoinvalidList" :key="index">
<!-- content -->
<view class="carrier">
<view class="left">
<view class="title">
{{row.highDiscount.discountName}}
</view>
<view class="term">
过期时间:{{row.useEndTime | formatDate('-')}}
</view>
<view class="gap-top"></view>
<view class="gap-bottom"></view>
</view>
<view class="right invalid">
<view class="ticket">
@ -91,7 +113,7 @@
{{row.highDiscount.discountName}}
</view>
<view class="use">
失效
过期
</view>
</view>
</view>
@ -112,8 +134,9 @@
return {
couponValidList: [],
couponinvalidList: [],
couponnoinvalidList: [],
imagewxUrl: app.globalData.imageWxImg,
imgadres:'noorder.png',
imgadres: 'noorder.png',
headerTop: 0,
//
typeClass: 'valid',
@ -125,7 +148,7 @@
pageSize: 10,
isNoMoreData: false,
loadingText: '',
couponcout:0
couponcout: 0
}
},
onPageScroll(e) {
@ -172,8 +195,10 @@
onReachBottom() {
if (this.typeClass == 'valid') {
this.getUserDiscountList(1);
} else {
} else if (this.typeClass == 'invalid') {
this.getUserDiscountList(2);
} else {
this.getUserDiscountList(0);
}
},
methods: {
@ -203,24 +228,27 @@
if (this.typeClass == 'valid') {
this.couponValidList = this.couponValidList.concat(res.return_data.list);
this.couponcout = res.return_data.total;
} else {
} else if (this.typeClass == 'invalid') {
this.couponinvalidList = this.couponinvalidList.concat(res.return_data.list);
} else {
this.couponnoinvalidList = this.couponnoinvalidList.concat(res.return_data.list);
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.couponValidList = [];
this.couponinvalidList = [];
this.couponnoinvalidList = [];
uni.hideLoading()
}
})
},
//
jumpcoupons(e) {
if(e.highDiscount.useScope == 3){
if (e.highDiscount.useScope == 3) {
uni.navigateTo({
url: '../../../subPages/recharge/recharge'
})
}else{
} else {
uni.navigateTo({
url: '../mineCouponsDestails/mineCouponsDestails?id=' + e.id
})
@ -237,91 +265,28 @@
})
this.typeClass = type;
this.subState = this.typeClass == '' ? '' : 'show' + type;
setTimeout(() => {
this.oldIndex = null;
this.theIndex = null;
this.subState = this.typeClass == 'valid' ? '' : this.subState;
}, 200)
// setTimeout(() => {
// this.oldIndex = null;
// this.theIndex = null;
// this.subState = this.typeClass == 'valid' ? '' : this.subState;
// }, 200)
if (this.typeClass == 'valid') {
this.pageNum = 1;
this.couponValidList = []
this.isNoMoreData = false;
this.getUserDiscountList(1);
} else {
} else if (this.typeClass == 'invalid') {
this.pageNum = 1;
this.couponinvalidList = []
this.isNoMoreData = false;
this.getUserDiscountList(2);
} else {
this.pageNum = 1;
this.couponnoinvalidList = []
this.isNoMoreData = false;
this.getUserDiscountList(0);
}
},
//-begin
touchStart(index, event) {
//
if (event.touches.length > 1) {
this.isStop = true;
return;
}
this.oldIndex = this.theIndex;
this.theIndex = null;
//
this.initXY = [event.touches[0].pageX, event.touches[0].pageY];
},
touchMove(index, event) {
//
if (event.touches.length > 1) {
this.isStop = true;
return;
}
let moveX = event.touches[0].pageX - this.initXY[0];
let moveY = event.touches[0].pageY - this.initXY[1];
if (this.isStop || Math.abs(moveX) < 5) {
return;
}
if (Math.abs(moveY) > Math.abs(moveX)) {
// -
this.isStop = true;
return;
}
if (moveX < 0) {
this.theIndex = index;
this.isStop = true;
} else if (moveX > 0) {
if (this.theIndex != null && this.oldIndex == this.theIndex) {
this.oldIndex = index;
this.theIndex = null;
this.isStop = true;
setTimeout(() => {
this.oldIndex = null;
}, 150)
}
}
},
touchEnd(index, $event) {
//
this.isStop = false;
},
//
deleteCoupon(id, List) {
let len = List.length;
for (let i = 0; i < len; i++) {
if (id == List[i].id) {
List.splice(i, 1);
break;
}
}
this.oldIndex = null;
this.theIndex = null;
},
discard() {
//
}
}
}
</script>
@ -357,7 +322,7 @@
z-index: 10;
view {
width: 50%;
width: 33.3%;
height: 90upx;
justify-content: center;
align-items: center;
@ -367,16 +332,7 @@
.on {
color: #0083f5;
}
.border {
height: 4upx;
background-color: #0083f5;
transition: all .3s ease-out;
&.invalid {
transform: translate3d(100%, 0, 0);
}
border-bottom: 2px solid #0083f5;
}
}
@ -407,6 +363,16 @@
}
}
@keyframes shownoInvalid {
0% {
transform: translateX(0);
}
100% {
transform: translateX(-200%);
}
}
.sub-list {
&.invalid {
position: absolute;
@ -425,6 +391,11 @@
animation: showInvalid 0.20s linear both;
}
&.shownoinvalid {
display: flex;
animation: shownoInvalid 0.20s linear both;
}
width: 100%;
padding: 20upx 0 120upx 0;
@ -605,35 +576,6 @@
}
}
/*
<view class="carrier" :class="[theIndex==index?'open':oldIndex==index?'close':'']" @touchstart="touchStart(index,$event)" @touchmove="touchMove(index,$event)" @touchend="touchEnd(index,$event)">
<view class="left">
<view class="title">
10元日常用品类
</view>
<view class="term">
2019-04-01~2019-05-30
</view>
</view>
<view class="right">
<view class="ticket">
<view class="num">
10
</view>
<view class="unit">
</view>
</view>
<view class="criteria">
满50使用
</view>
<view class="use">
去使用
</view>
</view>
</view>
*
* */
}
}
</style>

@ -127,11 +127,21 @@
uni.hideLoading();
if (res.return_code == '000000') {
///
// #ifdef H5
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
// #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP

@ -157,11 +157,21 @@
uni.hideLoading();
if (res.return_code == '000000') {
///
// #ifdef H5
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER",
"openIdType": 2
}
// #endif
// #ifdef MP
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"orderScene": "GOODS_ORDER"
}
// #endif
orderToPay(params).then(res => {
if (res.return_code == '000000') {
// #ifdef MP

@ -331,6 +331,41 @@
})
return;
}
// #ifdef H5
uni.showLoading({
title: '提交订单中...'
})
let params = {
"memDiscountId": that.memDiscountId,
"orderPrice": that.orderPrice,
"payPrice": that.payPrice,
"rechargeContent": that.rechargeContent,
"rechargeModel": that.rechargeModel,
"agentKey": that.agentKey,
"objectId": that.objectId,
"identificationCode": app.globalData.identificationCode
}
addOrderPay(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
that.orderId = res.return_data.id;
let params = {
"orderId": res.return_data.id,
"openId": app.globalData.openId,
"openIdType": 2
}
that.orderToUNionPay(params);
} else {
uni.hideLoading();
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
});
}
})
// #endif
// #ifdef MP
uni.requestSubscribeMessage({
tmplIds: ['ZO6kC3oJv0zj9QzL0htsF-mM9vAElcgPZEcUGglxsoU'],
success(res) {
@ -366,8 +401,10 @@
}
})
},
fail(res) {},
fail(res) {
},
})
// #endif
},
//
changeRiado() {

Loading…
Cancel
Save