订单相关修改提测

This commit is contained in:
GaoHao
2024-09-09 11:08:04 +08:00
parent c2ff506543
commit 2dbcdf4300
45 changed files with 1377 additions and 3506 deletions

View File

@@ -88,7 +88,7 @@
onShow() {
this.init_fn()
this.loginwxuserInfo()
if (uni.cache.get('shopUser') ) {
if (uni.cache.get('shopId') ) {
this.getShopInfo();
this.getShopExtend();
} else{
@@ -107,7 +107,7 @@
*/
async getShopExtend () {
let res = await this.api.getShopExtend({
shopId: uni.cache.get('shopUser'),
shopId: uni.cache.get('shopId'),
autokey: "my_bg" //index_bg my_bg member_bg shopInfo_bg
})
if ( res.code == 0) {
@@ -120,11 +120,13 @@
*/
async loginwxuserInfo() {
let res = await this.api.loginwxuserInfo({
// userId: 109
userId: uni.cache.get('userInfo').id
})
console.log(res)
if (res.code == 0) {
uni.cache.set('userInfo', res.data);
this.userInfo = uni.cache.get('userInfo')
this.userInfo = res.data;
}
},
@@ -157,7 +159,7 @@
*/
async getShopInfo() {
let res = await this.api.shopUserInfo({
"shopId": uni.cache.get('shopUser'),
"shopId": uni.cache.get('shopId'),
"userId": uni.cache.get('userInfo').id,
})
if (res.code == 0) {
@@ -173,10 +175,10 @@
* 查看二维码
*/
clickEvent() {
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
if (uni.cache.get('shopId') && uni.cache.get('token')) {
if ( this.shopInfo.isVip == 0 ) {
uni.pro.navigateTo('member/memberdetails', {
shopId_id: uni.cache.get('shopUser')
shopId_id: uni.cache.get('shopId')
})
} else {
uni.navigateTo({
@@ -194,8 +196,8 @@
clickTo(item, index) {
let shopId = null;
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
shopId = uni.cache.get('shopUser');
if (uni.cache.get('shopId') && uni.cache.get('token')) {
shopId = uni.cache.get('shopId');
} else{
}
@@ -209,9 +211,9 @@
uni.pro.navigateTo('member/list')
break
case 'recharge':
if (uni.cache.get('shopUser') && uni.cache.get('token')) {
if (uni.cache.get('shopId') && uni.cache.get('token')) {
uni.pro.navigateTo('member/index', {
shopId: uni.cache.get('shopUser'),
shopId: uni.cache.get('shopId'),
type: 'index',
})
} else{