chengjie 7 anni fa
parent
commit
c76035afda
8 ha cambiato i file con 1 aggiunte e 267 eliminazioni
  1. 1 1
      app.js
  2. 0 1
      app.json
  3. 0 76
      pages/about/share.js
  4. 0 6
      pages/about/share.json
  5. 0 36
      pages/about/share.wxml
  6. 0 132
      pages/about/share.wxss
  7. 0 10
      pages/main/default.js
  8. 0 5
      pages/main/default.wxml

+ 1 - 1
app.js

@@ -14,7 +14,7 @@ App({
14 14
     this.globalData.systemInfo = wx.getSystemInfoSync();
15 15
   },
16 16
   globalData: {
17
-    version: "1.0.10",
17
+    version: "1.0.11",
18 18
     IsProduction: true,
19 19
     ProgramID: 105,
20 20
     AppID: "wx1fef080f74481cbd",

+ 0 - 1
app.json

@@ -7,7 +7,6 @@
7 7
     "pages/main/detail",
8 8
     "pages/main/list",
9 9
     "pages/main/errorlist",
10
-    "pages/about/share",
11 10
     "pages/about/payfinished",
12 11
     "pages/main/default"
13 12
   ],

+ 0 - 76
pages/about/share.js

@@ -1,76 +0,0 @@
1
-import common from '../../utils/util';
2
-import server from '../../utils/main';
3
-
4
-const app = getApp();
5
-var imageIndex = 0;
6
-var arrBuildImageSource = [];
7
-var arrBuildImageTarget = [];
8
-
9
-Page({
10
-  data: {
11
-  },
12
-  onLoad: function (options) {
13
-    this.setData({
14
-      Height: common.getSystemHeight(),
15
-    });
16
-  },
17
-  onUnload: function () {
18
-    wx.setStorageSync("IsShare", true);
19
-  },
20
-  buildShareImage: function () {
21
-    imageIndex = 0;
22
-    arrBuildImageSource = [];
23
-    for (var i = 2; i < 6; i++)
24
-      arrBuildImageSource.push("../../images/programsystem_screenshot_pic0" + i + ".png");
25
-    arrBuildImageTarget = [];
26
-
27
-    this.buildImage();
28
-  },
29
-  buildImage: function () {
30
-    var that = this;
31
-    var ctx = wx.createCanvasContext("MyCanvas", this);
32
-    ctx.drawImage(arrBuildImageSource[imageIndex], 0, 0, 400, 300);
33
-    var avatar = wx.getStorageSync("Avatar");
34
-    if (avatar) {
35
-      ctx.drawImage(avatar, 15, 250, 40, 40);
36
-      ctx.drawImage("../../images/universalpic_mask_face_size01.png", 13, 248, 44, 44);
37
-
38
-      ctx.fillStyle = "#ffffff";
39
-      ctx.setFontSize(14);
40
-      ctx.fillText(app.globalData.userInfo.NickName, 65, 264);
41
-    }
42
-    ctx.draw(true, function (n) {
43
-      wx.canvasToTempFilePath({
44
-        x: 0,
45
-        y: 0,
46
-        width: 400,
47
-        height: 300,
48
-        canvasId: 'MyCanvas',
49
-        success: function (res2) {
50
-          console.log(res2.tempFilePath);
51
-
52
-          arrBuildImageTarget.push(res2.tempFilePath);
53
-
54
-          if (arrBuildImageTarget.length < arrBuildImageSource.length) {
55
-            imageIndex++;
56
-            that.buildImage();
57
-          }
58
-          else {
59
-            wx.previewImage({
60
-              current: arrBuildImageTarget[0], // 当前显示图片的http链接
61
-              urls: arrBuildImageTarget // 需要预览的图片http链接列表
62
-            });
63
-          }
64
-        }
65
-      })
66
-    });
67
-
68
-  },
69
-  onShareAppMessage: function () {
70
-    return {
71
-      title: app.globalData.ShareTitle,
72
-      path: 'pages/index/index?UserID=' + app.globalData.userInfo.UserID,
73
-      imageUrl: app.globalData.ShareImageUrl,
74
-    }
75
-  },
76
-});

+ 0 - 6
pages/about/share.json

@@ -1,6 +0,0 @@
1
-{
2
-  "navigationBarBackgroundColor": "#99607C",
3
-  "navigationBarTextStyle": "white",
4
-  "navigationBarTitleText": "分享",
5
-  "backgroundColor": "#99607C"
6
-}

+ 0 - 36
pages/about/share.wxml

@@ -1,36 +0,0 @@
1
-<view class="container FlexColumn" style='height:{{Height}}rpx;'>
2
-  <view class="btn">
3
-    <view class="btn1 FlexColumn">
4
-      <view class="panel1 FlexRow">
5
-        <view class="line"></view>
6
-        <view class="panel11 FlexColumn">
7
-          <view class="panel111 FlexColumn">
8
-            把我
9
-          </view>
10
-          <view class="panel112 FlexColumn">
11
-            分享给您的朋友吧
12
-          </view>
13
-        </view>
14
-      </view>
15
-      <view class="panel2 FlexRow">
16
-        <button class="panel2_1 FlexColumn" open-type="share">
17
-          <view class="textTitle">
18
-            <view class="textTitle1">转发给朋友</view>
19
-            <view class="textTitle2">转发给朋友</view>
20
-          </view>
21
-          <view class="panel212">直接转发</view>
22
-        </button>
23
-        <view class="line2"></view>
24
-        <view class="panel2_2 FlexColumn" bindtap='buildShareImage'>
25
-          <view class="textTitle textTitle3">
26
-            <view class="textTitle1">存图发朋友圈</view>
27
-            <view class="textTitle2">存图发朋友圈</view>
28
-          </view>
29
-          <view class="panel2121 panel212">生成图片 长按存图</view>
30
-        </view>
31
-      </view>
32
-    </view>
33
-  </view>
34
-  <image src="../../images/universalpic_share_guide_bg.png" class="universalpic_share_guide_bg" />
35
-</view>
36
-<canvas class='Canvas' canvas-id="MyCanvas"></canvas>

+ 0 - 132
pages/about/share.wxss

@@ -1,132 +0,0 @@
1
-.container {
2
-  background-color: #99607c;
3
-  justify-content: flex-start;
4
-}
5
-
6
-.btn {
7
-  width: 610rpx;
8
-  height: 422rpx;
9
-  background-color: #67453c;
10
-  margin-top: 212rpx;
11
-  border-radius: 14rpx;
12
-  z-index: 10;
13
-}
14
-
15
-.btn1 {
16
-  width: 100%;
17
-  height: 402rpx;
18
-  background-color: #ffd48b;
19
-  position: relative;
20
-  border-radius: 14rpx;
21
-  top: 0;
22
-}
23
-
24
-.panel1 {
25
-  width: 100%;
26
-  height: 260rpx;
27
-  border-bottom: 2rpx solid #e4b06c;
28
-  justify-content: flex-start;
29
-}
30
-
31
-.line {
32
-  width: 16rpx;
33
-  height:140rpx;
34
-  background-color: #EC4C56;
35
-  margin-left: 50rpx;
36
-}
37
-
38
-.panel11{
39
-  align-items: flex-start;
40
-  margin-left: 30rpx;
41
-}
42
-.panel111{
43
-  font-size:64rpx;
44
-  font-weight: 500;
45
-}
46
-.panel112{
47
-  font-size:48rpx;
48
-  font-weight: 500;
49
-}
50
-
51
-.panel2 {
52
-  width: 100%;
53
-  height: 140rpx;
54
-  background-color: #fec579;
55
-  border-bottom-left-radius: 14rpx;
56
-  border-bottom-right-radius: 14rpx;
57
-}
58
-
59
-.line2 {
60
-  width: 2rpx;
61
-  height: 90rpx;
62
-  background-color: #e4b06c;
63
-}
64
-
65
-.panel2_1 {
66
-  width: 305rpx;
67
-  height: 140rpx;
68
-  background-color: #fec579;
69
-  border-bottom-left-radius: 14rpx;
70
-  justify-content: flex-start;
71
-  padding-left: 0;
72
-  padding-right: 0;
73
-}
74
-
75
-.panel2_1::after {
76
-  border: 0px;
77
-}
78
-
79
-.panel2_2 {
80
-  width: 305rpx;
81
-  height: 140rpx;
82
-  background-color: #fec579;
83
-  border-bottom-right-radius: 14rpx;
84
-  justify-content: flex-start;
85
-}
86
-
87
-.textTitle {
88
-  font-size: 36rpx;
89
-  font-weight: 500;
90
-  width: 180rpx;
91
-  height:50rpx;
92
-  margin-top: 30rpx;
93
-}
94
-.textTitle3 {
95
-  width: 216rpx;
96
-}
97
-.textTitle1 {
98
-  -webkit-text-stroke:8rpx #8B4C28;
99
-  position: absolute;
100
-  text-align: center;
101
-  line-height: 50rpx;
102
-}
103
-.textTitle2 {
104
-  color: #FFFFFF;
105
-  position: absolute;
106
-  text-align: center;
107
-  line-height: 50rpx;
108
-}
109
-.panel212{
110
-  font-size: 22rpx;
111
-  font-weight: 500;
112
-  color:#8B4C28;
113
-  margin-top: -2rpx;
114
-}
115
-.panel2121{
116
-  margin-top: 8rpx;
117
-}
118
-
119
-.universalpic_share_guide_bg {
120
-  width: 100%;
121
-  height: 440rpx;
122
-  position: fixed;
123
-  bottom: 0;
124
-}
125
-
126
-.Canvas{
127
-  width: 400px; 
128
-  height: 300px;
129
-  position: fixed;
130
-  left:760rpx;
131
-  top:0rpx;
132
-}

+ 0 - 10
pages/main/default.js

@@ -72,16 +72,6 @@ Page({
72 72
         }
73 73
       }
74 74
     });
75
-
76
-    // if (list && list.length >= 5) {
77
-    //   common.getStorageValue(that, "IsShare", false, function () {
78
-    //     if (!that.data.IsShare) {
79
-    //       wx.navigateTo({
80
-    //         url: '../about/share',
81
-    //       });
82
-    //     }
83
-    //   });
84
-    // }
85 75
   },
86 76
   downloadUserAvatar: function () {
87 77
     var avatar = wx.getStorageSync("Avatar");

+ 0 - 5
pages/main/default.wxml

@@ -120,11 +120,6 @@
120 120
       <button class="panel FlexRow" open-type="share">
121 121
         <view>转发给朋友</view>
122 122
       </button>
123
-      <!-- <view class="line"></view>
124
-      <view class="panel2 panel FlexColumn" bindtap='buildShareImage' >
125
-        <view>存图发到朋友圈</view>
126
-        <view class="text3">点击后生成图片,长按图片选择保存到相册</view>
127
-      </view> -->
128 123
       <view class="line"></view>
129 124
       <view class="line2"></view>
130 125
       <view class="line"></view>