Commit 7750ba44 authored by 珠峰架构's avatar 珠峰架构

授权秀爱

parent ea73a5b2
......@@ -5,6 +5,7 @@
</template>
<script>
import http from '@/shopro/request/index';
export default {
data() {
return {
......@@ -13,8 +14,7 @@
} ,
onReady(){
// this.webUrl = "http://172.18.0.147:8000/#/?time="+new Date().getTime()
console.log(this.webUrl)
this.webUrl = "https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=171795610000098&time="+new Date().getTime()
// this.webUrl = "https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=171795610000098&time="+new Date().getTime()
// this.webUrl = "https://wx.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=134581110000230&companyId=00000310&time="+new Date().getTime()
},
methods:{
......@@ -22,12 +22,26 @@
console.log(e)
console.log('接收到消息:' + JSON.stringify(e.detail.data));
uni.navigateToMiniProgram({
orderId: data.orderId ,
orderId: data.orderId,
});
},
saveMiniCode(){
let fsCode = uni.getStorageSync('token');
http('user.miniCode', {fsCode:fsCode}).then(res => {
if (!res.code && res.data) {
let code = res.data.sfCode;
let time = new Date().getTime();
this.webUrl = `https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=106975910000477&companyId=999999998&time=${time}&sfCode=${code}`
// this.webUrl = `https://wxcs.zhonghuihaotai.com/webpage/wxdist/index.html#/?mallId=106975910000477&companyId=999999998&time=${time}&sfCode=${code}`
} else {
}
})
}
},
onLoad(){
uni.hideTabBar();
uni.hideTabBar();
this.saveMiniCode();
},
onLaunch(){
}
......
......@@ -8,44 +8,42 @@
export default {
data() {
return {
params:{}
}
},
methods: {
pay() {
let params = {
"prepay_id": "wx151613092294758229d4369b2a414d0000",
"appId": "wx60c6530c49c52ff7",
"timeStamp": "1678867989",
"nonceStr": "1gaLpfAGDaG70y7SlQMd4GDfd0SzhP8j",
"package": "prepay_id=wx151613092294758229d4369b2a414d0000",
"signType": "RSA",
"paySign": "DEZRfCE2eCZ5Oi+jzEx2qtnSZiDzqy0GE7GRHOfjf1zmwZXpE+OgW6+7ExpmHInNWmiBRoxuDX6TpjM1O/B1241yNi47buf2IsuLE49nlPqw/o0lv1o9zBav/7elM0o3d7jLTljhR6GguEpcBmwNkaFJGYmvO2kS3Llzwl+RHJUPTcfs3YgWFtdJTRhul9aBuIs0ZUAG3qSWIawipBfFBGUYBLusn6+ebYh+SRzOEPZSV8N5lEbLd8CqYq7CxNuJVG5IYZlva3cWRmK8f3R6F/t2gTQveFlI8jEl1OK5ZqEjvYi1ct64DHYtbUl/kzl4pMJAZweQnNbZk8bYQwPGsA=="
}
console.log(params)
console.log(this.params)
wx.requestPayment({
appId:params.appId,
timeStamp: params.timeStamp,
nonceStr: params.nonceStr,
package: params.nonceStr,
signType: params.signType,
paySign: params.paySign,
success(res) {
console.log("小程序成功。。。。")
appId:this.params.appId,
timeStamp: this.params.timeStamp,
nonceStr: this.params.nonceStr,
package: this.params.nonceStr,
signType: this.params.signType,
paySign: this.params.paySign,
success(res) {
console.log("小程序成功。。。。")
console.log(res)
console.log(res)
},
fail(res) {
console.log("shibai 。。。。")
console.log(res)
},
fail(res) {
console.log("shibai 。。。。")
console.log(res)
}
}
})
}
},
})
}
},
onLoad(option){
let {data,orderId} = option;
console.log(option);
this.params = JSON.parse(decodeURIComponent(data));
console.log(this.params);
}
}
</script>
<style>
......
......@@ -83,10 +83,19 @@
this.tabBarVal = name;
console.log(name)
if(name == '商城') {
uni.navigateTo({
url: '/pages/h5/index',
})
}
// let fsCode = uni.getStorageSync('token');
// http('user.miniCode', {fsCode:fsCode}).then(res => {
// if (!res.code && res.data) {
uni.navigateTo({
url: '/pages/h5/index',
})
// } else {
// that.todayNum = 0;
// }
// })
}
},
getPhoneNumber (e) {
if(!e.detail.code){
......
......@@ -28,9 +28,12 @@ export default {
url: 'mall/miniProgram/wxRun',
auth: true,
method: "post"
},
miniCode:{
url: 'mall/miniCode',
auth: true,
method: "get"
}
},
index:{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment