ymt-db-dev
游梦婷 1 year ago
parent 536dd4f10b
commit 417b7e0490
  1. 10
      App.vue
  2. 11
      common/share.js
  3. 15
      components/cart-choose/cart-choose.vue
  4. 10
      pages/goods/externalCoupon/externalCoupon.vue
  5. 7
      pages/goods/store-list/store-details.vue
  6. 7
      pages/login/register.vue
  7. 6
      pages/tabBar/user/user.vue
  8. 4
      pages/user/deposit/deposit.vue
  9. 30
      pages/welcome/welcome.vue

@ -81,11 +81,11 @@
const methodToPatch = ['navigateTo', 'redirectTo', 'switchTab', ];
let arr = [
"/subPages/recharge-centre/recharge-centre",//
// "/subPages/recharge-centre/recharge-centre",//
"/pages/user/mineCoupons/mineCoupons",//
"/pages/user/myPromotion/myPromotion",//广
"/subPages/cardsList/cardsList",//
"/pages/user/deposit/deposit",//
// "/pages/user/deposit/deposit",//
"/physical-merchants/address/address",//
"/pages/goods/recording/recording",//
"../../../subPages/cardsList/cardsList",//
@ -96,7 +96,11 @@
"/physical-merchants/classify/cart/cart",//
"../order/confirmation",//
"../coupon-comfirmation/coupon-comfirmation",//
"../coupon-comfirmation/coupon-comfirmation",//,
"/pages/goods/refuel-confirm/refuel-confirm",//
"../unionComfirmation/unionComfirmation",//
"/physical-merchants/settleAccounts/settleAccounts",//
"../rec-confirmation/rec-confirmation",//
];

@ -162,7 +162,7 @@ export default {
/* h5分享页面的回退 */
const app = getApp();
let str = uni.getStorageSync("accountType");
if(str == "0000016&key"){
// if(str == "0000016&key"){
if(getCurrentPages().length == 2 && getCurrentPages()[0].route == "pages/welcome/welcome"){
uni.switchTab({
@ -172,7 +172,16 @@ export default {
return true;
}
// }
if(getCurrentPages().length == 1){
uni.switchTab({
url:"/pages/tabBar/home/home"
})
return true;
}
return false;
},

@ -234,16 +234,21 @@
if (res.return_code == '000000') {
title = "加入购物车成功";
this.$emit("refreshCartNum")
}else{
title = res.return_msg;
}
uni.showToast({
title: title,
icon: 'none',
duration: 2000
})
}else{
// title = res.return_msg;
}
// uni.showToast({
// title: title,
// icon: 'none',
// duration: 2000
// })
this.chooseNumber = 1;
this.$emit("close")
@ -262,7 +267,7 @@
//
toBuy(){
console.log(this.specificationList[this.chooseIndex],this.goodsDetail)
// console.log(this.specificationList[this.chooseIndex],this.goodsDetail)
let _this = this
let obj =[{

@ -215,20 +215,20 @@
setTimeout(()=>{
/* let res = uni.getStorageSync("user");
let res = uni.getStorageSync("user");
app.globalData.userInfo = res;
console.log(app.globalData.userInfo,"=========app.globalData.userInfo=========")
if (app.globalData.userInfo.phone) {
this.userInfo = 2;
} else {
this.userInfo = 1;
} */
}
uni.getStorage({
/* uni.getStorage({
key: 'user',
success: (res) => {
app.globalData.userInfo = res.data;
if (app.globalData.userInfo.phone) {
if (app.globalData.userInfo&&app.globalData.userInfo.phone) {
this.userInfo = 2;
} else {
this.userInfo = 1;
@ -237,7 +237,7 @@
fail() {
this.userInfo = 1;
}
});
}); */
},0)

@ -125,9 +125,16 @@
methods: {
//
getuserinfo() {
// #ifdef MP
uni.navigateTo({
url: '../../userLogin/userLogin'
})
// #endif
// #ifdef H5
uni.navigateTo({
url: '/pages/login/register'
})
// #endif
},
//
getMerchantStoreById() {

@ -161,6 +161,13 @@
smsCode: this.code,
openIdH5:app.globalData.openId
}
if(app.globalData.accountType == '0000017&key'){
let value = uni.getStorageSync('goUrl');
value = value.slice(0, value.lastIndexOf("#"));
params.popularizeUserId = value;
}
phone(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {

@ -32,20 +32,20 @@
<view class="headcoun width100">
<view class="height80 alijus width92 border-8r backcorfff">
<view class=" fotct" style="width: 33%;" @click="jumppage(5)">
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{textnum}} </text> </view>
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{textnum || 0}} </text> </view>
<view class="width100 font18 fcor333 mart5">卡券</view>
</view>
<view style="width: 1px;height: 50px;background-color: #f6f6f6;">
</view>
<view class=" fotct" style="width: 33%;" @click="jumppage(6)">
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{textSend}} </text> </view>
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{textSend || 0}} </text> </view>
<view class="width100 font18 fcor333 mart5">优惠券</view>
</view>
<view style="width: 1px;height: 50px;background-color: #f6f6f6;">
</view>
<view class=" fotct" style="width: 33%;" @click="jumppage(7)">
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{payactivitynum}} </text> </view>
<view class="width100 font12 fcor333"><text class="font20 marglerig">{{payactivitynum || 0}} </text> </view>
<view class="width100 font18 fcor333 mart5">活动券</view>
</view>
</view>

@ -94,14 +94,16 @@
}
this.findUser();
},
onShow() {
this.getThirdPartyByDetail();
if(app.globalData.userInfo){
this.findUser();
}
console.log(this.user,"user")
},

@ -82,6 +82,7 @@
// 0014
// 0016
// 0017code
if (app.globalData.accountType == '0000011&key' && app.globalData.h5code) {
@ -136,6 +137,18 @@
return;
}
// goUrl
if (app.globalData.accountType == '0000017&key' && app.globalData.h5code){
if(!app.globalData.userInfo||!app.globalData.token){
uni.navigateTo({
url: '/pages/login/register'
})
return
}
}
uni.switchTab({
url: '../tabBar/home/home'
})
@ -169,10 +182,7 @@
if(arr1.indexOf("code") != -1){
let goUrl =arr1.slice(Number(arr1.indexOf("code"))+5) ;
uni.setStorage({
key: "goUrl",
data: decodeURIComponent(goUrl)
})
uni.setStorageSync("goUrl",decodeURIComponent(goUrl));
}
@ -255,6 +265,7 @@
data: res.return_data.uniqueCode
})
}else{
if(uni.getStorageSync("accountId")=="0000011&key"){
app.globalData.userInfo = '';
app.globalData.token = '';
uni.setStorage({
@ -266,6 +277,17 @@
data: ''
})
}
// app.globalData.userInfo = '';
// app.globalData.token = '';
// uni.setStorage({
// key: "user",
// data: ''
// })
// uni.setStorage({
// key: "token",
// data: ''
// })
}

Loading…
Cancel
Save