合并冲突
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,6 +11,6 @@ yarn-error.log*
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
|
||||
*.keystore
|
||||
unpackage/dist
|
||||
unpackage/resources
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -5077,11 +5077,13 @@ page {
|
||||
}
|
||||
|
||||
.product-con .assemble .item .pictxt {
|
||||
width: 2.95*100rpx;
|
||||
flex:1;
|
||||
}
|
||||
|
||||
.product-con .assemble .item .pictxt .text {
|
||||
width: 1.94*100rpx;
|
||||
flex:1;
|
||||
font-size: 0.24*100rpx;
|
||||
padding-left:15rpx
|
||||
}
|
||||
|
||||
.product-con .assemble .item .pictxt .pictrue {
|
||||
|
@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<view v-show="iShidden === false">
|
||||
<view class="WriteOff">
|
||||
<view class="pictrue"><image :src="orderInfo.image" /></view>
|
||||
<view class="num acea-row row-center-wrapper">
|
||||
{{ orderInfo.order_id }}
|
||||
{{ orderInfo.orderId }}
|
||||
</view>
|
||||
<view class="tip">确定要核销此订单吗?</view>
|
||||
<view class="sure" @click="confirm">确定核销</view>
|
||||
@ -15,7 +14,7 @@
|
||||
<style scoped lang="less">
|
||||
.WriteOff {
|
||||
width: 5.6*100rpx;
|
||||
height: 8*100rpx;
|
||||
height: 5*100rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 0.2*100rpx;
|
||||
position: fixed;
|
||||
@ -23,8 +22,8 @@
|
||||
left: 50%;
|
||||
margin-top: -4*100rpx;
|
||||
margin-left: -2.8*100rpx;
|
||||
z-index: 99;
|
||||
padding-top: 0.55*100rpx;
|
||||
z-index: 99999;
|
||||
}
|
||||
.WriteOff .pictrue {
|
||||
width: 3.4*100rpx;
|
||||
|
@ -2,6 +2,6 @@
|
||||
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
|
||||
export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
|
||||
// export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api';
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static';
|
||||
|
Binary file not shown.
Binary file not shown.
@ -71,7 +71,7 @@
|
||||
toLaunch() {
|
||||
console.log("loading home");
|
||||
this.changeAuthorization(false);
|
||||
let redirect = cookie.get('redirect')
|
||||
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
||||
if (redirect && redirect.indexOf('/pages') != -1) {
|
||||
this.$yrouter.replace({
|
||||
path: '/pages' + redirect.split('/pages')[1],
|
||||
|
@ -65,8 +65,8 @@
|
||||
<text class="font-color-red" v-text="item.count"></text>
|
||||
<text>人成团</text>
|
||||
</view>
|
||||
<count-down :isDay="false" :tipText="'剩余 '" :dayText="false" :hourText="':'" :minuteText="':'"
|
||||
:secondText="false" :datatime="item.stopTime/1000"></count-down>
|
||||
<count-down :isDay="true" :tipText="'剩余 '" :dayText="' 天 '" :hourText="' : '" :minuteText="' : '"
|
||||
:secondText="' '" :datatime="item.stopTime/1000"></count-down>
|
||||
</view>
|
||||
<view class="spellBnt" @click="groupRule(item.id)">
|
||||
去拼单
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="group-con">
|
||||
<view class="header acea-row row-between-wrapper">
|
||||
<view class="header acea-row row-between-wrapper" v-if="storeCombination">
|
||||
<view class="pictrue">
|
||||
<image :src="storeCombination.image" />
|
||||
</view>
|
||||
@ -15,20 +15,13 @@
|
||||
<view v-if="pinkBool === -1" class="iconfont icon-pintuanshibai"></view>
|
||||
<view v-else-if="pinkBool === 1" class="iconfont icon-pintuanchenggong font-color-red"></view>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="wrapper" v-if="pinkT">
|
||||
<view class="title acea-row row-center-wrapper">
|
||||
<view class="line"></view>
|
||||
<view class="name acea-row row-center-wrapper">
|
||||
<text>剩余</text>
|
||||
<count-down
|
||||
:isDay="false"
|
||||
:tipText="false"
|
||||
:dayText="false"
|
||||
:hourText="' : '"
|
||||
:minuteText="' : '"
|
||||
:secondText="false"
|
||||
:datatime="pinkT.stopTime/1000"
|
||||
></count-down>
|
||||
<count-down :isDay="true" :tipText="'倒计时 '" :dayText="' 天 '" :hourText="' 时 '" :minuteText="' 分 '"
|
||||
:secondText="' 秒'" :datatime="pinkT.stopTime/1000"></count-down>
|
||||
<text>结束</text>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
@ -38,11 +31,10 @@
|
||||
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text>
|
||||
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text>
|
||||
</view>
|
||||
<view
|
||||
class="list acea-row row-middle"
|
||||
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']"
|
||||
>
|
||||
<view class="pictrue">
|
||||
|
||||
<view class="list acea-row row-middle"
|
||||
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']">
|
||||
<view class="pictrue" v-if="pinkT">
|
||||
<image :src="pinkT.avatar" />
|
||||
</view>
|
||||
<view class="acea-row row-middle" v-if="pinkAll.length > 0">
|
||||
@ -54,29 +46,17 @@
|
||||
<image class="img-none" src="@/static/images/vacancy.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="(pinkBool === 1 || pinkBool === -1) && count > 9"
|
||||
class="lookAll acea-row row-center-wrapper"
|
||||
@click="lookAll"
|
||||
>
|
||||
<view v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" class="lookAll acea-row row-center-wrapper"
|
||||
@click="lookAll">
|
||||
{{ iShidden ? "收起" : "查看全部" }}
|
||||
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text>
|
||||
</view>
|
||||
<view
|
||||
class="teamBnt bg-color-red"
|
||||
v-if="userBool === 1 && isOk == 0 && pinkBool === 0"
|
||||
@click="goPoster"
|
||||
>邀请好友参团</view>
|
||||
<view
|
||||
class="teamBnt bg-color-red"
|
||||
v-else-if="userBool === 0 && pinkBool === 0 && count > 0"
|
||||
@click="pay"
|
||||
>我要参团</view>
|
||||
<view
|
||||
class="teamBnt bg-color-red"
|
||||
v-if="pinkBool === 1 || pinkBool === -1"
|
||||
@click="goDetail(storeCombination.id)"
|
||||
>再次开团</view>
|
||||
<view class="teamBnt bg-color-red" v-if="userBool === 1 && isOk == 0 && pinkBool === 0" @click="goPoster">邀请好友参团
|
||||
</view>
|
||||
<view class="teamBnt bg-color-red" v-else-if="userBool === 0 && pinkBool === 0 && count > 0" @click="pay">我要参团
|
||||
</view>
|
||||
<view class="teamBnt bg-color-red" v-if="pinkBool === 1 || pinkBool === -1"
|
||||
@click="goDetail(storeCombination.id)">再次开团</view>
|
||||
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
|
||||
<text class="iconfont icon-guanbi3"></text>
|
||||
<text>取消开团</text>
|
||||
@ -89,161 +69,169 @@
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CountDown from "@/components/CountDown";
|
||||
import { getCombinationPink, getCombinationRemove } from "@/api/activity";
|
||||
import { postCartAdd } from "@/api/store";
|
||||
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
|
||||
import CountDown from "@/components/CountDown";
|
||||
import {
|
||||
getCombinationPink,
|
||||
getCombinationRemove
|
||||
} from "@/api/activity";
|
||||
import {
|
||||
postCartAdd
|
||||
} from "@/api/store";
|
||||
import {
|
||||
isWeixin,
|
||||
parseQuery,
|
||||
handleQrCode
|
||||
} from "@/utils/index";
|
||||
|
||||
const NAME = "GroupRule";
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
CountDown
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
currentPinkOrder: "", //当前拼团订单
|
||||
isOk: 0, //判断拼团是否完成
|
||||
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功
|
||||
userBool: 0, //判断当前用户是否在团内|0=未在,1=在
|
||||
pinkAll: [], //团员
|
||||
pinkT: [], //团长信息
|
||||
storeCombination: [], //拼团产品
|
||||
pinkId: 0,
|
||||
uniqueId: "",
|
||||
count: 0, //拼团剩余人数
|
||||
iShidden: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$yroute(n) {
|
||||
const NAME = "GroupRule";
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
CountDown
|
||||
},
|
||||
props: {},
|
||||
data: function () {
|
||||
return {
|
||||
currentPinkOrder: "", //当前拼团订单
|
||||
isOk: 0, //判断拼团是否完成
|
||||
pinkBool: 0, //判断拼团是否成功|0=失败,1=成功
|
||||
userBool: 0, //判断当前用户是否在团内|0=未在,1=在
|
||||
pinkAll: [], //团员
|
||||
pinkT: {}, //团长信息
|
||||
storeCombination: {}, //拼团产品
|
||||
pinkId: 0,
|
||||
uniqueId: "",
|
||||
count: 0, //拼团剩余人数
|
||||
iShidden: false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$yroute(n) {
|
||||
var that = this;
|
||||
if (n.name === NAME) {
|
||||
that.pinkId = that.$yroute.query.id;
|
||||
that.getCombinationPink();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
var that = this;
|
||||
if (n.name === NAME) {
|
||||
let url = handleQrCode();
|
||||
if (url) {
|
||||
that.pinkId = url.pinkId;
|
||||
} else {
|
||||
that.pinkId = that.$yroute.query.id;
|
||||
that.getCombinationPink();
|
||||
}
|
||||
that.getCombinationPink();
|
||||
},
|
||||
methods: {
|
||||
pay: function () {
|
||||
var that = this;
|
||||
var data = {};
|
||||
data.productId = that.storeCombination.productId;
|
||||
data.cartNum = that.pinkT.totalNum;
|
||||
data.uniqueId = that.uniqueId;
|
||||
data.combinationId = that.storeCombination.id;
|
||||
data.new = 1;
|
||||
postCartAdd(data)
|
||||
.then(res => {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: {
|
||||
id: res.data.cartId,
|
||||
pinkid: that.pinkId
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
goPoster: function () {
|
||||
var that = this;
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/Poster/index",
|
||||
query: {
|
||||
id: that.pinkId,
|
||||
type: 1
|
||||
}
|
||||
});
|
||||
},
|
||||
goOrder: function () {
|
||||
var that = this;
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: that.currentPinkOrder
|
||||
}
|
||||
});
|
||||
},
|
||||
//拼团列表
|
||||
goList: function () {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GoodsGroup/index"
|
||||
});
|
||||
},
|
||||
//拼团详情
|
||||
goDetail: function (id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GroupDetails/index",
|
||||
query: {
|
||||
id
|
||||
}
|
||||
});
|
||||
},
|
||||
//拼团信息
|
||||
getCombinationPink: function () {
|
||||
var that = this;
|
||||
getCombinationPink(that.pinkId).then(res => {
|
||||
that.$set(that, "storeCombination", res.data.storeCombination);
|
||||
that.$set(that, "pinkT", res.data.pinkT);
|
||||
that.$set(that, "pinkAll", res.data.pinkAll);
|
||||
that.$set(that, "count", res.data.count);
|
||||
that.$set(that, "userBool", res.data.userBool);
|
||||
that.$set(that, "pinkBool", res.data.pinkBool);
|
||||
that.$set(that, "isOk", res.data.isOk);
|
||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
||||
that.$set(that, "uniqueId", res.data.uniqueId);
|
||||
});
|
||||
},
|
||||
//拼团取消
|
||||
getCombinationRemove: function () {
|
||||
var that = this;
|
||||
getCombinationRemove({
|
||||
id: that.pinkId,
|
||||
cid: that.storeCombination.id
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
lookAll: function () {
|
||||
this.iShidden = !this.iShidden;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
var that = this;
|
||||
let url = handleQrCode();
|
||||
if (url) {
|
||||
that.pinkId = url.pinkId;
|
||||
} else {
|
||||
that.pinkId = that.$yroute.query.id;
|
||||
}
|
||||
that.getCombinationPink();
|
||||
},
|
||||
methods: {
|
||||
pay: function() {
|
||||
var that = this;
|
||||
var data = {};
|
||||
data.productId = that.storeCombination.productId;
|
||||
data.cartNum = that.pinkT.totalNum;
|
||||
data.uniqueId = that.uniqueId;
|
||||
data.combinationId = that.storeCombination.id;
|
||||
data.new = 1;
|
||||
postCartAdd(data)
|
||||
.then(res => {
|
||||
that.$yrouter.push({
|
||||
path: "/pages/order/OrderSubmission/index",
|
||||
query: {
|
||||
id: res.data.cartId,
|
||||
pinkid: that.pinkId
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
goPoster: function() {
|
||||
var that = this;
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/Poster/index",
|
||||
query: {
|
||||
id: that.pinkId,
|
||||
type: 1
|
||||
}
|
||||
});
|
||||
},
|
||||
goOrder: function() {
|
||||
var that = this;
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/OrderDetails/index",
|
||||
query: {
|
||||
id: that.currentPinkOrder
|
||||
}
|
||||
});
|
||||
},
|
||||
//拼团列表
|
||||
goList: function() {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GoodsGroup/index"
|
||||
});
|
||||
},
|
||||
//拼团详情
|
||||
goDetail: function(id) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/activity/GroupDetails/index",
|
||||
query: {
|
||||
id
|
||||
}
|
||||
});
|
||||
},
|
||||
//拼团信息
|
||||
getCombinationPink: function() {
|
||||
var that = this;
|
||||
getCombinationPink(that.pinkId).then(res => {
|
||||
that.$set(that, "storeCombination", res.data.storeCombination);
|
||||
that.$set(that, "pinkT", res.data.pinkT);
|
||||
that.$set(that, "pinkAll", res.data.pinkAll);
|
||||
that.$set(that, "count", res.data.count);
|
||||
that.$set(that, "userBool", res.data.userBool);
|
||||
that.$set(that, "pinkBool", res.data.pinkBool);
|
||||
that.$set(that, "isOk", res.data.isOk);
|
||||
that.$set(that, "currentPinkOrder", res.data.currentPinkOrder);
|
||||
that.$set(that, "uniqueId", res.data.uniqueId);
|
||||
});
|
||||
},
|
||||
//拼团取消
|
||||
getCombinationRemove: function() {
|
||||
var that = this;
|
||||
getCombinationRemove({
|
||||
id: that.pinkId,
|
||||
cid: that.storeCombination.id
|
||||
})
|
||||
.then(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(res => {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
lookAll: function() {
|
||||
this.iShidden = !this.iShidden;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.tips-warp {
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.tips-warp {
|
||||
text-align: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
@ -90,8 +90,9 @@
|
||||
});
|
||||
login()
|
||||
.then((res) => {
|
||||
this.$yrouter.replace({
|
||||
path: cookie.get("redirect")
|
||||
console.log('重定向')
|
||||
this.$yrouter.reLaunch({
|
||||
path: cookie.get("redirect").replace(/\ /g, '')
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
|
@ -1,179 +1,200 @@
|
||||
<template>
|
||||
<view class="OrderCancellation">
|
||||
<view class="header">
|
||||
<image mode="aspectFit" src="@/static/images/writeOffBg.jpg" @click="openQRCode" />
|
||||
</view>
|
||||
<view class="whiteBg">
|
||||
<view class="input">
|
||||
<input type="number" placeholder="0" v-model="verify_code" />
|
||||
</view>
|
||||
<view class="bnt" @click="storeCancellation">立即核销</view>
|
||||
</view>
|
||||
<!-- <view class="scan" v-if="iswechat">
|
||||
<image src="@/static/images/scan.gif" @click="openQRCode" />
|
||||
</view> -->
|
||||
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
|
||||
</view>
|
||||
<view class="OrderCancellation">
|
||||
<view class="header">
|
||||
<image mode="aspectFit" src="@/static/images/writeOffBg.jpg" @click="openQRCode" />
|
||||
</view>
|
||||
<view class="whiteBg">
|
||||
<view class="input">
|
||||
<input type="number" placeholder="0" v-model="verify_code" />
|
||||
</view>
|
||||
<view class="bnt" @click="storeCancellation">立即核销</view>
|
||||
<view class="bnt" @click="openQRCode">扫码核销</view>
|
||||
</view>
|
||||
<!-- #ifndef H5 -->
|
||||
<!-- <view class="scan" v-if="iswechat">
|
||||
<image src="@/static/images/scan.gif" @click="openQRCode" />
|
||||
</view> -->
|
||||
<!-- #endif -->
|
||||
<WriteOff :iShidden="iShidden" :orderInfo="orderInfo" @cancel="cancel" @confirm="confirm"></WriteOff>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WriteOff from "@/components/WriteOff";
|
||||
import { isWeixin } from "@/utils";
|
||||
// import { wechatEvevt } from "@/libs/wechat";
|
||||
import { orderVerific } from "@/api/order";
|
||||
const NAME = "OrderCancellation";
|
||||
import WriteOff from "@/components/WriteOff";
|
||||
import {
|
||||
isWeixin
|
||||
} from "@/utils";
|
||||
// import { wechatEvevt } from "@/libs/wechat";
|
||||
import {
|
||||
orderVerific
|
||||
} from "@/api/order";
|
||||
const NAME = "OrderCancellation";
|
||||
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
WriteOff
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
iShidden: true,
|
||||
iswechat: isWeixin(),
|
||||
orderInfo: {},
|
||||
verify_code: ""
|
||||
};
|
||||
},
|
||||
mounted: function() {},
|
||||
methods: {
|
||||
cancel: function(res) {
|
||||
this.iShidden = res;
|
||||
},
|
||||
confirm: function() {
|
||||
orderVerific(this.verify_code, 1)
|
||||
.then(res => {
|
||||
this.iShidden = true;
|
||||
this.verify_code = "";
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title:
|
||||
err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
storeCancellation: function() {
|
||||
let ref = /[0-9]{12}/;
|
||||
if (!this.verify_code) {
|
||||
uni.showToast({
|
||||
title: "请输入核销码",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!ref.test(this.verify_code)) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的核销码",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "查询中"
|
||||
});
|
||||
orderVerific(this.verify_code, 0)
|
||||
.then(res => {
|
||||
uni.hideLoading();
|
||||
this.orderInfo = res.data;
|
||||
this.iShidden = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title:
|
||||
error.msg ||
|
||||
error.response.data.msg ||
|
||||
error.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
openQRCode: function() {
|
||||
let that = this;
|
||||
// 这里需要调用扫码功能
|
||||
}
|
||||
}
|
||||
};
|
||||
export default {
|
||||
name: NAME,
|
||||
components: {
|
||||
WriteOff
|
||||
},
|
||||
props: {},
|
||||
data: function() {
|
||||
return {
|
||||
iShidden: true,
|
||||
orderInfo: {},
|
||||
verify_code: ""
|
||||
};
|
||||
},
|
||||
mounted: function() {},
|
||||
methods: {
|
||||
cancel: function(res) {
|
||||
this.iShidden = res;
|
||||
},
|
||||
confirm: function() {
|
||||
orderVerific(this.verify_code, 1)
|
||||
.then(res => {
|
||||
this.iShidden = true;
|
||||
this.verify_code = "";
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
storeCancellation: function() {
|
||||
let ref = /[0-9]{12}/;
|
||||
if (!this.verify_code) {
|
||||
uni.showToast({
|
||||
title: "请输入核销码",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!ref.test(this.verify_code)) {
|
||||
uni.showToast({
|
||||
title: "请输入正确的核销码",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: "查询中"
|
||||
});
|
||||
orderVerific(this.verify_code, 0)
|
||||
.then(res => {
|
||||
uni.hideLoading();
|
||||
this.orderInfo = res.data;
|
||||
this.iShidden = false;
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: "success",
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: error.msg ||
|
||||
error.response.data.msg ||
|
||||
error.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
});
|
||||
},
|
||||
openQRCode: function() {
|
||||
let that = this;
|
||||
// 这里需要调用扫码功能
|
||||
uni.scanCode({
|
||||
success: (res) => {
|
||||
var result = res.result;
|
||||
if (result) {
|
||||
that.verify_code = res.result;
|
||||
that.storeCancellation();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '没有扫描到什么!',
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.OrderCancellation .header {
|
||||
width: 100%;
|
||||
height: 3 * 100rpx;
|
||||
background-size: 100% 100%;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 3 * 100rpx;
|
||||
}
|
||||
}
|
||||
.OrderCancellation .header {
|
||||
width: 100%;
|
||||
height: 3 * 100rpx;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.OrderCancellation .whiteBg {
|
||||
width: 6.9 * 100rpx;
|
||||
background-color: #fff;
|
||||
margin: -0.93 * 100rpx auto 0 auto;
|
||||
padding-top: 0.8 * 100rpx;
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 99;
|
||||
position: relative;
|
||||
border-radius: 0.06 * 100rpx 0.06 * 100rpx 0 0;
|
||||
}
|
||||
image {
|
||||
width: 100%;
|
||||
height: 3 * 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.OrderCancellation .whiteBg .input {
|
||||
width: 5.8 * 100rpx;
|
||||
margin: 0 auto;
|
||||
border-bottom: 0.01 * 100rpx solid #eee;
|
||||
}
|
||||
.OrderCancellation .whiteBg {
|
||||
width: 6.9 * 100rpx;
|
||||
background-color: #fff;
|
||||
margin: -0.93 * 100rpx auto 0 auto;
|
||||
padding-top: 0.8 * 100rpx;
|
||||
padding-bottom: 30rpx;
|
||||
z-index: 20;
|
||||
position: relative;
|
||||
border-radius: 0.06 * 100rpx 0.06 * 100rpx 0 0;
|
||||
}
|
||||
|
||||
.OrderCancellation .whiteBg .input input {
|
||||
padding-bottom: 0.25 * 100rpx;
|
||||
font-size: 0.6 * 100rpx;
|
||||
height: auto;
|
||||
color: #282828;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.OrderCancellation .whiteBg .input {
|
||||
width: 5.8 * 100rpx;
|
||||
margin: 0 auto;
|
||||
border-bottom: 0.01 * 100rpx solid #eee;
|
||||
}
|
||||
|
||||
.OrderCancellation .whiteBg .bnt {
|
||||
font-size: 0.32 * 100rpx;
|
||||
color: #fff;
|
||||
width: 5.8 * 100rpx;
|
||||
height: 0.86 * 100rpx;
|
||||
border-radius: 0.43 * 100rpx;
|
||||
background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
background-image: -webkit-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
text-align: center;
|
||||
line-height: 0.86 * 100rpx;
|
||||
margin: 0.55 * 100rpx auto 0 auto;
|
||||
}
|
||||
.OrderCancellation .whiteBg .input input {
|
||||
padding-bottom: 0.25 * 100rpx;
|
||||
font-size: 0.6 * 100rpx;
|
||||
height: auto;
|
||||
color: #282828;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.OrderCancellation .scan {
|
||||
width: 3 * 100rpx;
|
||||
height: 3 * 100rpx;
|
||||
margin: 1.1 * 100rpx auto 0 auto;
|
||||
}
|
||||
.OrderCancellation .whiteBg .bnt {
|
||||
font-size: 0.32 * 100rpx;
|
||||
color: #fff;
|
||||
width: 5.8 * 100rpx;
|
||||
height: 0.86 * 100rpx;
|
||||
border-radius: 0.43 * 100rpx;
|
||||
background-image: linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
background-image: -webkit-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
background-image: -moz-linear-gradient(to right, #eb3729 0%, #eb3729 100%);
|
||||
text-align: center;
|
||||
line-height: 0.86 * 100rpx;
|
||||
margin: 0.55 * 100rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.OrderCancellation .scan image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
.OrderCancellation .scan {
|
||||
width: 3 * 100rpx;
|
||||
height: 3 * 100rpx;
|
||||
margin: 1.1 * 100rpx auto 0 auto;
|
||||
}
|
||||
|
||||
.OrderCancellation .scan image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
@ -216,7 +216,6 @@
|
||||
title: "绑定中"
|
||||
});
|
||||
bindingPhone({
|
||||
code: cookie.get('wxLoginCode'),
|
||||
encryptedData: e.mp.detail.encryptedData,
|
||||
iv: e.mp.detail.iv
|
||||
})
|
||||
|
@ -13,7 +13,7 @@
|
||||
<view class="itemn acea-row row-between-wrapper">
|
||||
<view>
|
||||
<view class="name line1">{{ val.title }}</view>
|
||||
<view>{{ val.add_time }}</view>
|
||||
<view>{{ val.addTime }}</view>
|
||||
</view>
|
||||
<view
|
||||
class="num"
|
||||
|
@ -211,7 +211,7 @@ export const login = () => {
|
||||
if (code) {
|
||||
auth(code)
|
||||
.then(() => {
|
||||
let redirect = cookie.get('redirect')
|
||||
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
||||
console.log(redirect)
|
||||
if (redirect) {
|
||||
redirect = redirect.split('/pages')[1]
|
||||
@ -327,7 +327,7 @@ export const handleGetUserInfo = () => {
|
||||
store.dispatch('setUserInfo', res.data)
|
||||
console.log('获取用户信息后跳转回显的页面')
|
||||
|
||||
let redirect = cookie.get('redirect')
|
||||
let redirect = cookie.get('redirect').replace(/\ /g, '')
|
||||
if (redirect) {
|
||||
reLaunch({
|
||||
path: redirect,
|
||||
@ -585,11 +585,9 @@ export function routerPermissions(url, type) {
|
||||
})
|
||||
return
|
||||
}
|
||||
{
|
||||
push({
|
||||
path,
|
||||
})
|
||||
}
|
||||
push({
|
||||
path,
|
||||
})
|
||||
}).catch(error => {
|
||||
console.log('————————')
|
||||
console.log('自动登录失败,跳转到授权页面')
|
||||
@ -661,7 +659,7 @@ export function reLaunch(location, complete, fail, success) {
|
||||
uni.reLaunch(params)
|
||||
}).catch(error => {
|
||||
// 没有权限
|
||||
|
||||
console.log(error)
|
||||
})
|
||||
}
|
||||
|
||||
@ -850,6 +848,7 @@ export const handleLoginFailure = () => {
|
||||
// 改为授权取消
|
||||
store.commit("updateAuthorization", false);
|
||||
|
||||
|
||||
let currentPageUrl = getCurrentPageUrl()
|
||||
if (store.state.$deviceType == 'weixin') {
|
||||
// 如果不是授权页面,
|
||||
|
@ -42,7 +42,7 @@ fly.interceptors.response.use(
|
||||
handleLoginFailure();
|
||||
return Promise.reject({ msg: "未登录", toLogin: true });
|
||||
}
|
||||
if (error.response.data.status == 5109) {
|
||||
if (error.response.data.status == 5109) {
|
||||
uni.showToast({
|
||||
title: error.response.data.msg,
|
||||
icon: "none",
|
||||
@ -62,9 +62,16 @@ function baseRequest(options) {
|
||||
|
||||
// 合并传参过来的 headers
|
||||
// 如果接口需要登录,携带 token 去请求
|
||||
|
||||
options.headers = {
|
||||
...options.headers,
|
||||
Authorization: "Bearer " + token
|
||||
...options.headers
|
||||
}
|
||||
|
||||
if (options.login === true) {
|
||||
options.headers = {
|
||||
...options.headers,
|
||||
Authorization: "Bearer " + token
|
||||
}
|
||||
}
|
||||
|
||||
// 如果需要登录才可访问的接口没有拿到 token 视为登录失效
|
||||
|
@ -5,7 +5,7 @@ const doc = null;
|
||||
|
||||
function get(key) {
|
||||
if (!key || !_has(key)) {
|
||||
return null;
|
||||
return '';
|
||||
}
|
||||
return uni.getStorageSync(key)
|
||||
}
|
||||
|
Reference in New Issue
Block a user