Commit 2afab7cf by sunchao

Merge branch 'dev' of http://139.224.139.2:9091/chaosun/CFFP into dev

parents 8f37bef8 da40084c
node_modules
.vscode
.DS_Store
*.log
/out/
node_modules
.vscode
.DS_Store
*.log
.gitignore
.npmignore
build
src
# jweixin-module
微信JS-SDK
## 安装
### NPM
```shell
npm install jweixin-module --save
```
### UMD
```http
https://unpkg.com/jweixin-module/lib/index.js
```
## 使用
```js
var jweixin = require('jweixin-module')
jweixin.ready(function(){
// TODO
});
```
## 完整API
>[微信JS-SDK说明文档](https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115)
{
"name": "jweixin-module",
"version": "1.6.0",
"lockfileVersion": 1
}
{
"name": "jweixin-module",
"version": "1.6.0",
"description": "微信JS-SDK",
"main": "lib/index.js",
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/zhetengbiji/jweixin-module.git"
},
"keywords": [
"wxjssdk",
"weixin",
"jweixin",
"wechat",
"jssdk",
"wx"
],
"author": "Shengqiang Guo",
"license": "ISC",
"bugs": {
"url": "https://github.com/zhetengbiji/jweixin-module/issues"
},
"homepage": "https://github.com/zhetengbiji/jweixin-module#readme",
"devDependencies": {}
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<link rel="stylesheet" href="./static/font/iconfont.css"> <link rel="stylesheet" href="./static/font/iconfont.css">
<!--preload-links--> <!--preload-links-->
<!--app-context--> <!--app-context-->
<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script> <script src="https://unpkg.com/jweixin-module/lib/index.js"></script>
</head> </head>
<body> <body>
<div id="app"><!--app-html--></div> <div id="app"><!--app-html--></div>
......
...@@ -63,8 +63,17 @@ ...@@ -63,8 +63,17 @@
}else{ }else{
this.queryById(null,uni.getStorageSync('cffp_userId')) this.queryById(null,uni.getStorageSync('cffp_userId'))
} }
// this.norebound()
}, },
methods: { methods: {
// 禁止微信浏览器回弹效果
// norebound(){
// // #ifdef H5
// document.body.addEventListener("touchmove",function(e)
// e.preventDefault();
// ,passive:false)
// // #endif
// },
save(){ save(){
if(this.applyParam.personalSignOssPath){ if(this.applyParam.personalSignOssPath){
this.saveApplyInfo(); this.saveApplyInfo();
......
...@@ -131,9 +131,7 @@ ...@@ -131,9 +131,7 @@
import BootPage from "@/components/bootpage/bootpage.vue"; import BootPage from "@/components/bootpage/bootpage.vue";
import UniShareWx from "@/uni_modules/uni-share-wx/index.vue"; import UniShareWx from "@/uni_modules/uni-share-wx/index.vue";
import dataHandling from "@/util/dataHandling"; import dataHandling from "@/util/dataHandling";
// import { import {hshare} from '@/util/fiveshare'
// hshare
// } from '@/util/fiveshare'
import { import {
nanoid nanoid
} from 'nanoid'; } from 'nanoid';
...@@ -495,16 +493,16 @@ ...@@ -495,16 +493,16 @@
}) })
}, },
// H5 自定义分享 // H5 自定义分享
// getshareData(){ getshareData(){
// let data = { let data = {
// title:this.courseInfo.fileTitle, title:this.courseInfo.fileTitle,
// desc:'加入我们开启学习之旅', desc:'加入我们开启学习之旅',
// link: window.location.href,//分享链接 link: window.location.href,//分享链接
// imgUrl: this.courseInfo.displayImage, //图片 imgUrl: this.courseInfo.displayImage, //图片
// } }
// var url = window.location.href.split('#')[0] var url = window.location.href.split('#')[0]
// hshare(data,url) hshare(data,url)
// }, },
}, },
onLoad(option) { onLoad(option) {
this.fileId = option.fileId; this.fileId = option.fileId;
...@@ -522,7 +520,7 @@ ...@@ -522,7 +520,7 @@
localStorage.setItem('h5_userId', '') localStorage.setItem('h5_userId', '')
} }
uni.setStorageSync('h5_coursesharing', this.coursesharing); uni.setStorageSync('h5_coursesharing', this.coursesharing);
// this.getshareData() this.getshareData()
} }
let dataForm = uni.getStorageSync('userinfodataForm') let dataForm = uni.getStorageSync('userinfodataForm')
this.realName = dataForm.realName this.realName = dataForm.realName
......
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
<text style="color: #F15A1F;">{{(Number(nowSumCommissionAmount)).toFixed(2)}}</text> <text style="color: #F15A1F;">{{(Number(nowSumCommissionAmount)).toFixed(2)}}</text>
<text>{{getName(timeFlag)}}获得积分</text> <text>{{getName(timeFlag)}}获得积分</text>
</view> </view>
<view class=""> <!-- <view class="">
<text style="color: #0A2F99;">{{(Number(prePercent)).toFixed(2)}}%</text> <text style="color: #0A2F99;">{{(Number(prePercent)).toFixed(2)}}%</text>
<text>{{getInfo(timeFlag)}}得分</text> <text>{{getInfo(timeFlag)}}得分</text>
</view> </view> -->
</view> </view>
<view class="point_content"> <view class="point_content">
<view class="title"> <view class="title">
...@@ -201,10 +201,10 @@ ...@@ -201,10 +201,10 @@
.statistics_wrapper{ .statistics_wrapper{
margin: 30rpx; margin: 30rpx;
display: flex; display: flex;
justify-content: space-around;
view{ view{
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-around;
font-size: 36rpx; font-size: 36rpx;
width: 33%; width: 33%;
overflow: hidden; overflow: hidden;
......
// var wx = require("weixin-js-sdk/index.js") //引入刚下载的js文件
// import $H from '@/api/request.js' //封装好的接口请求\
// import * as jweixinmodule from "jweixin-module"
// var wx = require("jweixin-module")
// @ts-ignore
import * as wx from "../components/jweixin-module/lib/index.js"
import api from "../api/api";
//初始化
export function initJssdkShare(callback, url) {
console.log(callback,url, '第二步');
var url = url
//这一步需要调用后台接口,返回需要的签名 签名时间戳 随机串 和公众号appid
//注意url:window.location.href.split('#')[0] //
// request.post("", {
// url // url是当前页面的url
// },
let WxConfigRequestVO = {
url:url,
systemType:'1'
}
// @ts-ignore
api.Wxshare(WxConfigRequestVO).then((res, wx) => {
wx.config({
debug: true,//调试的时候需要 在app上回弹出errmg:config ok 的时候就证明没问题了 这时候就可以改为false
appId: res.data.appId,//appid
timestamp: res.data.timestamp,//时间戳
nonceStr: res.data.nonceStr,//随机串
signature: res.data.signature,//签名
jsApiList: res.data.jsApiList//必填 是下面需要用到的方法集合
})
if(callback){
callback()
}
})
}
// data是穿的参数 url是当前页面的链接
export function hshare(data,url){
console.log(data, url, '第一步')
// initJssdkShare(data, url)
initJssdkShare(function(wx){
wx.ready(function(){
console.log(data);
var sharedata={
title: data.title, //标题
desc: data.desc, //描述
link: data.link ,//分享链接
imgUrl:data.imgUrl, //图片
success:(res=>{
})
};
wx.updateAppMessageShareData(sharedata)//自定义微信分享给朋友
wx.updateTimelineShareData(sharedata);//自定义微信分享给朋友
wx.onMenuShareAppMessage(sharedata);//获取“分享给朋友”按钮点击状态及自定义分享内容接口(即将废弃)
})
},url)
}
\ No newline at end of file
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