Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
user
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
mp
user
Commits
467b32c6
Commit
467b32c6
authored
Jul 05, 2022
by
宋冰琦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复订阅消息失败时不可支付的问题
parent
dd014f2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
12 deletions
+17
-12
orderSubPackage/pages/settlement/index.vue
+2
-0
request/index.js
+2
-1
request/mine/index.js
+4
-3
request/user/index.js
+5
-4
utils/utils.js
+4
-4
No files found.
orderSubPackage/pages/settlement/index.vue
View file @
467b32c6
...
@@ -224,6 +224,8 @@ export default {
...
@@ -224,6 +224,8 @@ export default {
},
},
fail
:
(
err
)
=>
{
fail
:
(
err
)
=>
{
console
.
log
(
err
);
console
.
log
(
err
);
User
.
setAllow
(
2
)
this
.
saveReserve
()
}
}
})
})
},
},
...
...
request/index.js
View file @
467b32c6
import
appConfig
from
'@/static/config/index.js'
;
import
appConfig
from
'@/static/config/index.js'
;
import
User
from
'@/request/user'
;
import
User
from
'@/request/user'
;
import
context
from
'../main.js'
export
function
getBaseUrl
()
{
export
function
getBaseUrl
()
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
return
appConfig
.
devApi
;
return
appConfig
.
devApi
;
...
@@ -58,7 +59,7 @@ module.exports = (vm) => {
...
@@ -58,7 +59,7 @@ module.exports = (vm) => {
if
(
response
.
data
.
code
==
401
&&
phoneNumber
)
{
if
(
response
.
data
.
code
==
401
&&
phoneNumber
)
{
User
.
getAuthorization
(
phoneNumber
);
User
.
getAuthorization
(
phoneNumber
);
}
}
uni
.
showToast
({
context
.
showToast
({
title
:
response
.
data
.
msg
,
title
:
response
.
data
.
msg
,
icon
:
'none'
,
icon
:
'none'
,
duration
:
2000
,
duration
:
2000
,
...
...
request/mine/index.js
View file @
467b32c6
import
context
from
'../../main.js'
export
default
{
export
default
{
getList
(
id
)
{},
getList
(
id
)
{},
getMsg
()
{
getMsg
()
{
...
@@ -7,7 +8,7 @@ export default {
...
@@ -7,7 +8,7 @@ export default {
return
res
;
return
res
;
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
context
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
});
});
},
},
read
(
data
)
{
read
(
data
)
{
...
@@ -17,7 +18,7 @@ export default {
...
@@ -17,7 +18,7 @@ export default {
return
res
;
return
res
;
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
context
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
});
});
},
},
getMessageCount
()
{
getMessageCount
()
{
...
@@ -27,7 +28,7 @@ export default {
...
@@ -27,7 +28,7 @@ export default {
return
res
;
return
res
;
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
context
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
});
});
}
}
};
};
request/user/index.js
View file @
467b32c6
...
@@ -2,6 +2,7 @@ import Store from '@/store';
...
@@ -2,6 +2,7 @@ import Store from '@/store';
import
{
$EventBus
}
from
'@/utils/EventBus'
;
import
{
$EventBus
}
from
'@/utils/EventBus'
;
import
loadingIcon
from
'uview-ui/libs/config/props/loadingIcon'
;
import
loadingIcon
from
'uview-ui/libs/config/props/loadingIcon'
;
import
{
data
}
from
'uview-ui/libs/mixin/mixin'
;
import
{
data
}
from
'uview-ui/libs/mixin/mixin'
;
import
context
from
'../../main.js'
export
default
{
export
default
{
getLocation
(
callback
)
{
getLocation
(
callback
)
{
let
_this
=
this
;
let
_this
=
this
;
...
@@ -71,7 +72,7 @@ export default {
...
@@ -71,7 +72,7 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
uni
.
showToast
({
context
.
showToast
({
title
:
err
.
msg
,
title
:
err
.
msg
,
});
});
});
});
...
@@ -86,7 +87,7 @@ export default {
...
@@ -86,7 +87,7 @@ export default {
const
{
data
}
=
res
;
const
{
data
}
=
res
;
uni
.
setStorage
({
key
:
'Authorization'
,
data
:
data
.
token
});
uni
.
setStorage
({
key
:
'Authorization'
,
data
:
data
.
token
});
Store
.
commit
(
'setAuthorization'
,
data
.
token
);
Store
.
commit
(
'setAuthorization'
,
data
.
token
);
uni
.
showToast
({
title
:
'登录成功!'
});
context
.
showToast
({
title
:
'登录成功!'
});
});
});
},
},
wxLoginAndGetOpenid
(
loding
,
updata
)
{
wxLoginAndGetOpenid
(
loding
,
updata
)
{
...
@@ -149,7 +150,7 @@ export default {
...
@@ -149,7 +150,7 @@ export default {
return
callback
();
return
callback
();
}
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
uni
.
showToast
({
context
.
showToast
({
title
:
err
.
msg
,
title
:
err
.
msg
,
});
});
});
});
...
@@ -165,7 +166,7 @@ export default {
...
@@ -165,7 +166,7 @@ export default {
return
res
;
return
res
;
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
uni
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
context
.
showToast
({
title
:
'服务器错误'
,
icon
:
'none'
});
});
});
},
},
};
};
utils/utils.js
View file @
467b32c6
...
@@ -37,7 +37,7 @@ export default {
...
@@ -37,7 +37,7 @@ export default {
};
};
return
DAta
;
return
DAta
;
}
else
{
}
else
{
uni
.
showToast
({
context
.
showToast
({
title
:
'请选择商品'
,
title
:
'请选择商品'
,
});
});
}
}
...
@@ -84,7 +84,7 @@ export default {
...
@@ -84,7 +84,7 @@ export default {
goodsList
.
forEach
((
item
)
=>
(
size
+=
item
.
num
));
goodsList
.
forEach
((
item
)
=>
(
size
+=
item
.
num
));
let
countOfOrder
=
uni
.
getStorageSync
(
'countOfOrder'
);
let
countOfOrder
=
uni
.
getStorageSync
(
'countOfOrder'
);
if
(
size
>=
countOfOrder
)
{
if
(
size
>=
countOfOrder
)
{
uni
.
showToast
({
context
.
showToast
({
title
:
'最多可一次购买'
+
countOfOrder
+
'杯'
,
title
:
'最多可一次购买'
+
countOfOrder
+
'杯'
,
icon
:
'none'
,
icon
:
'none'
,
});
});
...
@@ -122,7 +122,7 @@ export default {
...
@@ -122,7 +122,7 @@ export default {
url
:
`/pages/index/index?q=
${
res
.
result
}
`
,
url
:
`/pages/index/index?q=
${
res
.
result
}
`
,
});
});
}
else
{
}
else
{
uni
.
showToast
({
context
.
showToast
({
title
:
'二维码错误'
,
title
:
'二维码错误'
,
icon
:
'none'
,
icon
:
'none'
,
});
});
...
@@ -130,7 +130,7 @@ export default {
...
@@ -130,7 +130,7 @@ export default {
}
}
},
},
fail
()
{
fail
()
{
uni
.
showToast
({
context
.
showToast
({
icon
:
'none'
,
icon
:
'none'
,
title
:
'扫码失败'
,
title
:
'扫码失败'
,
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment