更新补贴,扫码支付

This commit is contained in:
weipengfei 2024-03-02 16:34:42 +08:00
parent ab9545ad20
commit 4e38320e3a
3 changed files with 34 additions and 15 deletions

View File

@ -110,7 +110,7 @@
},
onShow() {
if (!this.isLogin) {
Cache.set("login_back_url_weixin", getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
Cache.set("login_back_url_weixin", "/" + getCurrentPages()[0].route + "?mer_id=" + this.mer_id);
this.isAuto = true;
this.isShowAuth = true;
} else {

View File

@ -572,6 +572,7 @@
page: 1,
limit: 10
},
mer_cate_id: '',
//
select: {
show: false,
@ -737,6 +738,7 @@
},
onLoad: function(options) {
this.isLihaiYun = options.LihaiYun //
this.mer_cate_id = options.mer_cate_id
this.type = parseInt(options.type) || 3
this.id = options.mer_id || options.id || 0;
this.isCoupon = options.coupon || 0;
@ -833,7 +835,10 @@
if (that.goodsLoading) return;
that.goodsLoading = true;
that.loadTitle = '';
getProductSpuAPI(that.id, that.where).then(res => {
getProductSpuAPI(that.id, {
...that.where,
mer_cate_id: that.mer_cate_id
}).then(res => {
that.goodsLoading = false;
let list = res.data.list;
let goodsList = that.$util.SplitArray(list, that.goods);
@ -960,7 +965,10 @@
that.goodsLoading = true;
that.loadTitle = '';
that.where.product_type = ''
storeServiceList(that.id, that.where).then(res => {
storeServiceList(that.id, {
...that.where,
mer_cate_id: that.mer_cate_id
}).then(res => {
that.goodsLoading = false;
let list = res.data.list;
let productList = that.$util.SplitArray(list, that.productList);
@ -1047,7 +1055,10 @@
if (that.goodsLoading) return;
that.goodsLoading = true;
that.loadTitle = '';
getStoreGoods(that.id, that.where).then(res => {
getStoreGoods(that.id, {
...that.where,
mer_cate_id: that.mer_cate_id
}).then(res => {
that.goodsLoading = false;
let list = res.data.list;
let goodsList = that.$util.SplitArray(list, that.goods);

View File

@ -347,8 +347,9 @@ import { Toast } from "../../../libs/uniApi";
}).then(({
data
}) => {
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", {
'token': data.token,
'time': data.exp
@ -465,8 +466,9 @@ import { Toast } from "../../../libs/uniApi";
}).then(res => {
const data = res.data;
if (res.data.status == 200) {
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", {
'token': data.result.token,
'time': data.result.exp
@ -554,8 +556,9 @@ import { Toast } from "../../../libs/uniApi";
}).then(res => {
const data = res.data;
if (res.data.status == 200) {
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
that.$store.commit("LOGIN", {
'token': data.result.token,
'time': data.result.exp
@ -648,22 +651,23 @@ import { Toast } from "../../../libs/uniApi";
data
}) => {
this.checkOpenId(data.user)
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$store.commit("LOGIN", {
'token': data.token,
'time': data.exp
});
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user){
if(data.is_new_user && !that.$Cache.get('login_back_url_weixin')){
return uni.navigateTo({
url: '/pages/helpPeople/helpPeople'
})
}
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
@ -734,6 +738,8 @@ import { Toast } from "../../../libs/uniApi";
that.$store.commit("SETUID", res.data.user.uid);
that.$store.commit('UPDATE_USERINFO', res.data.user);
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',
@ -826,8 +832,7 @@ import { Toast } from "../../../libs/uniApi";
data
}) => {
this.checkOpenId(data.user)
const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$Cache.clear(BACK_URL);
const backUrl = that.$Cache.get('login_back_url_weixin') || that.$Cache.get(BACK_URL) || "/pages/index/index";
that.$store.commit("LOGIN", {
'token': data.token,
'time': data.exp
@ -835,12 +840,15 @@ import { Toast } from "../../../libs/uniApi";
that.$store.commit("SETUID", data.user.uid);
that.$store.commit('UPDATE_USERINFO', data.user);
if(data.is_new_user){
if(data.is_new_user && !that.$Cache.get('login_back_url_weixin')){
return uni.navigateTo({
url: '/pages/helpPeople/helpPeople'
})
}
that.$Cache.clear(BACK_URL);
that.$Cache.clear('login_back_url_weixin');
let method
let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
'/pages/goods_cate/goods_cate',